spb/autoscholar
Public
1%% autoscholar.bst — AutoScholar author-year bibliography style, derived from plainnat.bst (natbib, LPPL).2%% File: `plainnat.bst'3%% A modification of `plain.bst' for use with natbib package 4%%5%% Copyright 1993-2007 Patrick W Daly6%% Max-Planck-Institut f\"ur Sonnensystemforschung7%% Max-Planck-Str. 28%% D-37191 Katlenburg-Lindau9%% Germany10%% E-mail: daly@mps.mpg.de11%%12%% This program can be redistributed and/or modified under the terms13%% of the LaTeX Project Public License Distributed from CTAN14%% archives in directory macros/latex/base/lppl.txt; either15%% version 1 of the License, or any later version.16%%17 % Version and source file information:18 % \ProvidesFile{natbst.mbs}[2007/11/26 1.93 (PWD)]19 %20 % BibTeX `plainnat' family21 % version 0.99b for BibTeX versions 0.99a or later,22 % for LaTeX versions 2.09 and 2e.23 %24 % For use with the `natbib.sty' package; emulates the corresponding25 % member of the `plain' family, but with author-year citations.26 %27 % With version 6.0 of `natbib.sty', it may also be used for numerical28 % citations, while retaining the commands \citeauthor, \citefullauthor,29 % and \citeyear to print the corresponding information.30 %31 % For version 7.0 of `natbib.sty', the KEY field replaces missing32 % authors/editors, and the date is left blank in \bibitem.33 %34 % Includes field EID for the sequence/citation number of electronic journals35 % which is used instead of page numbers.36 %37 % Includes fields ISBN and ISSN.38 %39 % Includes field URL for Internet addresses.40 %41 % Includes field DOI for Digital Object Idenfifiers.42 %43 % Works best with the url.sty package of Donald Arseneau.44 %45 % Works with identical authors and year are further sorted by46 % citation key, to preserve any natural sequence.47 %48ENTRY49 { address50 author51 booktitle52 chapter53 doi54 eid55 edition56 editor57 howpublished58 institution59 isbn60 issn61 journal62 key63 month64 note65 number66 organization67 pages68 publisher69 school70 series71 title72 type73 url74 volume75 year76 }77 {}78 { label extra.label sort.label short.list }7980INTEGERS { output.state before.all mid.sentence after.sentence after.block }8182FUNCTION {init.state.consts}83{ #0 'before.all :=84 #1 'mid.sentence :=85 #2 'after.sentence :=86 #3 'after.block :=87}8889STRINGS { s t }9091FUNCTION {output.nonnull}92{ 's :=93 output.state mid.sentence =94 { ", " * write$ }95 { output.state after.block =96 { add.period$ write$97 newline$98 "\newblock " write$99 }100 { output.state before.all =101 'write$102 { add.period$ " " * write$ }103 if$104 }105 if$106 mid.sentence 'output.state :=107 }108 if$109 s110}111112FUNCTION {output}113{ duplicate$ empty$114 'pop$115 'output.nonnull116 if$117}118119FUNCTION {output.check}120{ 't :=121 duplicate$ empty$122 { pop$ "empty " t * " in " * cite$ * warning$ }123 'output.nonnull124 if$125}126127FUNCTION {fin.entry}128{ add.period$129 write$130 newline$131}132133FUNCTION {new.block}134{ output.state before.all =135 'skip$136 { after.block 'output.state := }137 if$138}139140FUNCTION {new.sentence}141{ output.state after.block =142 'skip$143 { output.state before.all =144 'skip$145 { after.sentence 'output.state := }146 if$147 }148 if$149}150151FUNCTION {not}152{ { #0 }153 { #1 }154 if$155}156157FUNCTION {and}158{ 'skip$159 { pop$ #0 }160 if$161}162163FUNCTION {or}164{ { pop$ #1 }165 'skip$166 if$167}168169FUNCTION {new.block.checka}170{ empty$171 'skip$172 'new.block173 if$174}175176FUNCTION {new.block.checkb}177{ empty$178 swap$ empty$179 and180 'skip$181 'new.block182 if$183}184185FUNCTION {new.sentence.checka}186{ empty$187 'skip$188 'new.sentence189 if$190}191192FUNCTION {new.sentence.checkb}193{ empty$194 swap$ empty$195 and196 'skip$197 'new.sentence198 if$199}200201FUNCTION {field.or.null}202{ duplicate$ empty$203 { pop$ "" }204 'skip$205 if$206}207208FUNCTION {emphasize}209{ duplicate$ empty$210 { pop$ "" }211 { "\emph{" swap$ * "}" * }212 if$213}214215INTEGERS { nameptr namesleft numnames }216217FUNCTION {format.names}218{ 's :=219 #1 'nameptr :=220 s num.names$ 'numnames :=221 numnames 'namesleft :=222 { namesleft #0 > }223 { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=224 nameptr #1 >225 { namesleft #1 >226 { ", " * t * }227 { numnames #2 >228 { "," * }229 'skip$230 if$231 t "others" =232 { " et~al." * }233 { " and " * t * }234 if$235 }236 if$237 }238 't239 if$240 nameptr #1 + 'nameptr :=241 namesleft #1 - 'namesleft :=242 }243 while$244}245246FUNCTION {format.key}247{ empty$248 { key field.or.null }249 { "" }250 if$251}252253FUNCTION {format.authors}254{ author empty$255 { "" }256 { author format.names }257 if$258}259260FUNCTION {format.editors}261{ editor empty$262 { "" }263 { editor format.names264 editor num.names$ #1 >265 { ", editors" * }266 { ", editor" * }267 if$268 }269 if$270}271272FUNCTION {format.isbn}273{ isbn empty$274 { "" }275 { new.block "ISBN " isbn * }276 if$277}278279FUNCTION {format.issn}280{ issn empty$281 { "" }282 { new.block "ISSN " issn * }283 if$284}285286FUNCTION {format.url}287{ url empty$288 { "" }289 { new.block "URL \url{" url * "}" * }290 if$291}292293FUNCTION {format.doi}294{ doi empty$295 { "" }296 { new.block "\doi{" doi * "}" * }297 if$298}299300FUNCTION {format.title}301{ title empty$302 { "" }303 { title "t" change.case$ }304 if$305}306307FUNCTION {format.full.names}308{'s :=309 #1 'nameptr :=310 s num.names$ 'numnames :=311 numnames 'namesleft :=312 { namesleft #0 > }313 { s nameptr314 "{vv~}{ll}" format.name$ 't :=315 nameptr #1 >316 {317 namesleft #1 >318 { ", " * t * }319 {320 numnames #2 >321 { "," * }322 'skip$323 if$324 t "others" =325 { " et~al." * }326 { " and " * t * }327 if$328 }329 if$330 }331 't332 if$333 nameptr #1 + 'nameptr :=334 namesleft #1 - 'namesleft :=335 }336 while$337}338339FUNCTION {author.editor.full}340{ author empty$341 { editor empty$342 { "" }343 { editor format.full.names }344 if$345 }346 { author format.full.names }347 if$348}349350FUNCTION {author.full}351{ author empty$352 { "" }353 { author format.full.names }354 if$355}356357FUNCTION {editor.full}358{ editor empty$359 { "" }360 { editor format.full.names }361 if$362}363364FUNCTION {make.full.names}365{ type$ "book" =366 type$ "inbook" =367 or368 'author.editor.full369 { type$ "proceedings" =370 'editor.full371 'author.full372 if$373 }374 if$375}376377FUNCTION {output.bibitem}378{ newline$379 "\bibitem[" write$380 label write$381 ")" make.full.names duplicate$ short.list =382 { pop$ }383 { * }384 if$385 "]{" * write$386 cite$ write$387 "}" write$388 newline$389 ""390 before.all 'output.state :=391}392393FUNCTION {n.dashify}394{ 't :=395 ""396 { t empty$ not }397 { t #1 #1 substring$ "-" =398 { t #1 #2 substring$ "--" = not399 { "--" *400 t #2 global.max$ substring$ 't :=401 }402 { { t #1 #1 substring$ "-" = }403 { "-" *404 t #2 global.max$ substring$ 't :=405 }406 while$407 }408 if$409 }410 { t #1 #1 substring$ *411 t #2 global.max$ substring$ 't :=412 }413 if$414 }415 while$416}417418FUNCTION {format.date}419{ year duplicate$ empty$420 { "empty year in " cite$ * warning$421 pop$ "" }422 'skip$423 if$424 month empty$425 'skip$426 { month427 " " * swap$ *428 }429 if$430 extra.label *431}432433FUNCTION {format.btitle}434{ title emphasize435}436437FUNCTION {tie.or.space.connect}438{ duplicate$ text.length$ #3 <439 { "~" }440 { " " }441 if$442 swap$ * *443}444445FUNCTION {either.or.check}446{ empty$447 'pop$448 { "can't use both " swap$ * " fields in " * cite$ * warning$ }449 if$450}451452FUNCTION {format.bvolume}453{ volume empty$454 { "" }455 { "volume" volume tie.or.space.connect456 series empty$457 'skip$458 { " of " * series emphasize * }459 if$460 "volume and number" number either.or.check461 }462 if$463}464465FUNCTION {format.number.series}466{ volume empty$467 { number empty$468 { series field.or.null }469 { output.state mid.sentence =470 { "number" }471 { "Number" }472 if$473 number tie.or.space.connect474 series empty$475 { "there's a number but no series in " cite$ * warning$ }476 { " in " * series * }477 if$478 }479 if$480 }481 { "" }482 if$483}484485FUNCTION {format.edition}486{ edition empty$487 { "" }488 { output.state mid.sentence =489 { edition "l" change.case$ " edition" * }490 { edition "t" change.case$ " edition" * }491 if$492 }493 if$494}495496INTEGERS { multiresult }497498FUNCTION {multi.page.check}499{ 't :=500 #0 'multiresult :=501 { multiresult not502 t empty$ not503 and504 }505 { t #1 #1 substring$506 duplicate$ "-" =507 swap$ duplicate$ "," =508 swap$ "+" =509 or or510 { #1 'multiresult := }511 { t #2 global.max$ substring$ 't := }512 if$513 }514 while$515 multiresult516}517518FUNCTION {format.pages}519{ pages empty$520 { "" }521 { pages multi.page.check522 { "pages" pages n.dashify tie.or.space.connect }523 { "page" pages tie.or.space.connect }524 if$525 }526 if$527}528529FUNCTION {format.eid}530{ eid empty$531 { "" }532 { "art." eid tie.or.space.connect }533 if$534}535536FUNCTION {format.vol.num.pages}537{ volume field.or.null538 number empty$539 'skip$540 { "\penalty0 (" number * ")" * *541 volume empty$542 { "there's a number but no volume in " cite$ * warning$ }543 'skip$544 if$545 }546 if$547 pages empty$548 'skip$549 { duplicate$ empty$550 { pop$ format.pages }551 { ":\penalty0 " * pages n.dashify * }552 if$553 }554 if$555}556557FUNCTION {format.vol.num.eid}558{ volume field.or.null559 number empty$560 'skip$561 { "\penalty0 (" number * ")" * *562 volume empty$563 { "there's a number but no volume in " cite$ * warning$ }564 'skip$565 if$566 }567 if$568 eid empty$569 'skip$570 { duplicate$ empty$571 { pop$ format.eid }572 { ":\penalty0 " * eid * }573 if$574 }575 if$576}577578FUNCTION {format.chapter.pages}579{ chapter empty$580 'format.pages581 { type empty$582 { "chapter" }583 { type "l" change.case$ }584 if$585 chapter tie.or.space.connect586 pages empty$587 'skip$588 { ", " * format.pages * }589 if$590 }591 if$592}593594FUNCTION {format.in.ed.booktitle}595{ booktitle empty$596 { "" }597 { editor empty$598 { "In " booktitle emphasize * }599 { "In " format.editors * ", " * booktitle emphasize * }600 if$601 }602 if$603}604605FUNCTION {empty.misc.check}606{ author empty$ title empty$ howpublished empty$607 month empty$ year empty$ note empty$608 and and and and and609 key empty$ not and610 { "all relevant fields are empty in " cite$ * warning$ }611 'skip$612 if$613}614615FUNCTION {format.thesis.type}616{ type empty$617 'skip$618 { pop$619 type "t" change.case$620 }621 if$622}623624FUNCTION {format.tr.number}625{ type empty$626 { "Technical Report" }627 'type628 if$629 number empty$630 { "t" change.case$ }631 { number tie.or.space.connect }632 if$633}634635FUNCTION {format.article.crossref}636{ key empty$637 { journal empty$638 { "need key or journal for " cite$ * " to crossref " * crossref *639 warning$640 ""641 }642 { "In \emph{" journal * "}" * }643 if$644 }645 { "In " }646 if$647 " \citet{" * crossref * "}" *648}649650FUNCTION {format.book.crossref}651{ volume empty$652 { "empty volume in " cite$ * "'s crossref of " * crossref * warning$653 "In "654 }655 { "Volume" volume tie.or.space.connect656 " of " *657 }658 if$659 editor empty$660 editor field.or.null author field.or.null =661 or662 { key empty$663 { series empty$664 { "need editor, key, or series for " cite$ * " to crossref " *665 crossref * warning$666 "" *667 }668 { "\emph{" * series * "}" * }669 if$670 }671 'skip$672 if$673 }674 'skip$675 if$676 " \citet{" * crossref * "}" *677}678679FUNCTION {format.incoll.inproc.crossref}680{ editor empty$681 editor field.or.null author field.or.null =682 or683 { key empty$684 { booktitle empty$685 { "need editor, key, or booktitle for " cite$ * " to crossref " *686 crossref * warning$687 ""688 }689 { "In \emph{" booktitle * "}" * }690 if$691 }692 { "In " }693 if$694 }695 { "In " }696 if$697 " \citet{" * crossref * "}" *698}699700FUNCTION {article}701{ output.bibitem702 format.authors "author" output.check703 author format.key output704 new.block705 format.title "title" output.check706 new.block707 crossref missing$708 { journal emphasize "journal" output.check709 eid empty$710 { format.vol.num.pages output }711 { format.vol.num.eid output }712 if$713 format.date "year" output.check714 }715 { format.article.crossref output.nonnull716 eid empty$717 { format.pages output }718 { format.eid output }719 if$720 }721 if$722 format.issn output723 format.doi output724 format.url output725 new.block726 note output727 fin.entry728}729730FUNCTION {book}731{ output.bibitem732 author empty$733 { format.editors "author and editor" output.check734 editor format.key output735 }736 { format.authors output.nonnull737 crossref missing$738 { "author and editor" editor either.or.check }739 'skip$740 if$741 }742 if$743 new.block744 format.btitle "title" output.check745 crossref missing$746 { format.bvolume output747 new.block748 format.number.series output749 new.sentence750 publisher "publisher" output.check751 address output752 }753 { new.block754 format.book.crossref output.nonnull755 }756 if$757 format.edition output758 format.date "year" output.check759 format.isbn output760 format.doi output761 format.url output762 new.block763 note output764 fin.entry765}766767FUNCTION {booklet}768{ output.bibitem769 format.authors output770 author format.key output771 new.block772 format.title "title" output.check773 howpublished address new.block.checkb774 howpublished output775 address output776 format.date output777 format.isbn output778 format.doi output779 format.url output780 new.block781 note output782 fin.entry783}784785FUNCTION {inbook}786{ output.bibitem787 author empty$788 { format.editors "author and editor" output.check789 editor format.key output790 }791 { format.authors output.nonnull792 crossref missing$793 { "author and editor" editor either.or.check }794 'skip$795 if$796 }797 if$798 new.block799 format.btitle "title" output.check800 crossref missing$801 { format.bvolume output802 format.chapter.pages "chapter and pages" output.check803 new.block804 format.number.series output805 new.sentence806 publisher "publisher" output.check807 address output808 }809 { format.chapter.pages "chapter and pages" output.check810 new.block811 format.book.crossref output.nonnull812 }813 if$814 format.edition output815 format.date "year" output.check816 format.isbn output817 format.doi output818 format.url output819 new.block820 note output821 fin.entry822}823824FUNCTION {incollection}825{ output.bibitem826 format.authors "author" output.check827 author format.key output828 new.block829 format.title "title" output.check830 new.block831 crossref missing$832 { format.in.ed.booktitle "booktitle" output.check833 format.bvolume output834 format.number.series output835 format.chapter.pages output836 new.sentence837 publisher "publisher" output.check838 address output839 format.edition output840 format.date "year" output.check841 }842 { format.incoll.inproc.crossref output.nonnull843 format.chapter.pages output844 }845 if$846 format.isbn output847 format.doi output848 format.url output849 new.block850 note output851 fin.entry852}853854FUNCTION {inproceedings}855{ output.bibitem856 format.authors "author" output.check857 author format.key output858 new.block859 format.title "title" output.check860 new.block861 crossref missing$862 { format.in.ed.booktitle "booktitle" output.check863 format.bvolume output864 format.number.series output865 format.pages output866 address empty$867 { organization publisher new.sentence.checkb868 organization output869 publisher output870 format.date "year" output.check871 }872 { address output.nonnull873 format.date "year" output.check874 new.sentence875 organization output876 publisher output877 }878 if$879 }880 { format.incoll.inproc.crossref output.nonnull881 format.pages output882 }883 if$884 format.isbn output885 format.doi output886 format.url output887 new.block888 note output889 fin.entry890}891892FUNCTION {conference} { inproceedings }893894FUNCTION {manual}895{ output.bibitem896 format.authors output897 author format.key output898 new.block899 format.btitle "title" output.check900 organization address new.block.checkb901 organization output902 address output903 format.edition output904 format.date output905 format.url output906 new.block907 note output908 fin.entry909}910911FUNCTION {mastersthesis}912{ output.bibitem913 format.authors "author" output.check914 author format.key output915 new.block916 format.title "title" output.check917 new.block918 "Master's thesis" format.thesis.type output.nonnull919 school "school" output.check920 address output921 format.date "year" output.check922 format.url output923 new.block924 note output925 fin.entry926}927928FUNCTION {misc}929{ output.bibitem930 format.authors output931 author format.key output932 title howpublished new.block.checkb933 format.title output934 howpublished new.block.checka935 howpublished output936 format.date output937 format.issn output938 format.url output939 new.block940 note output941 fin.entry942 empty.misc.check943}944945FUNCTION {phdthesis}946{ output.bibitem947 format.authors "author" output.check948 author format.key output949 new.block950 format.btitle "title" output.check951 new.block952 "PhD thesis" format.thesis.type output.nonnull953 school "school" output.check954 address output955 format.date "year" output.check956 format.url output957 new.block958 note output959 fin.entry960}961962FUNCTION {proceedings}963{ output.bibitem964 format.editors output965 editor format.key output966 new.block967 format.btitle "title" output.check968 format.bvolume output969 format.number.series output970 address output971 format.date "year" output.check972 new.sentence973 organization output974 publisher output975 format.isbn output976 format.doi output977 format.url output978 new.block979 note output980 fin.entry981}982983FUNCTION {techreport}984{ output.bibitem985 format.authors "author" output.check986 author format.key output987 new.block988 format.title "title" output.check989 new.block990 format.tr.number output.nonnull991 institution "institution" output.check992 address output993 format.date "year" output.check994 format.url output995 new.block996 note output997 fin.entry998}9991000FUNCTION {unpublished}1001{ output.bibitem1002 format.authors "author" output.check1003 author format.key output1004 new.block1005 format.title "title" output.check1006 new.block1007 note "note" output.check1008 format.date output1009 format.url output1010 fin.entry1011}10121013FUNCTION {default.type} { misc }101410151016MACRO {jan} {"January"}10171018MACRO {feb} {"February"}10191020MACRO {mar} {"March"}10211022MACRO {apr} {"April"}10231024MACRO {may} {"May"}10251026MACRO {jun} {"June"}10271028MACRO {jul} {"July"}10291030MACRO {aug} {"August"}10311032MACRO {sep} {"September"}10331034MACRO {oct} {"October"}10351036MACRO {nov} {"November"}10371038MACRO {dec} {"December"}1039104010411042MACRO {acmcs} {"ACM Computing Surveys"}10431044MACRO {acta} {"Acta Informatica"}10451046MACRO {cacm} {"Communications of the ACM"}10471048MACRO {ibmjrd} {"IBM Journal of Research and Development"}10491050MACRO {ibmsj} {"IBM Systems Journal"}10511052MACRO {ieeese} {"IEEE Transactions on Software Engineering"}10531054MACRO {ieeetc} {"IEEE Transactions on Computers"}10551056MACRO {ieeetcad}1057 {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}10581059MACRO {ipl} {"Information Processing Letters"}10601061MACRO {jacm} {"Journal of the ACM"}10621063MACRO {jcss} {"Journal of Computer and System Sciences"}10641065MACRO {scp} {"Science of Computer Programming"}10661067MACRO {sicomp} {"SIAM Journal on Computing"}10681069MACRO {tocs} {"ACM Transactions on Computer Systems"}10701071MACRO {tods} {"ACM Transactions on Database Systems"}10721073MACRO {tog} {"ACM Transactions on Graphics"}10741075MACRO {toms} {"ACM Transactions on Mathematical Software"}10761077MACRO {toois} {"ACM Transactions on Office Information Systems"}10781079MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}10801081MACRO {tcs} {"Theoretical Computer Science"}108210831084READ10851086FUNCTION {sortify}1087{ purify$1088 "l" change.case$1089}10901091INTEGERS { len }10921093FUNCTION {chop.word}1094{ 's :=1095 'len :=1096 s #1 len substring$ =1097 { s len #1 + global.max$ substring$ }1098 's1099 if$1100}11011102FUNCTION {format.lab.names}1103{ 's :=1104 s #1 "{vv~}{ll}" format.name$1105 s num.names$ duplicate$1106 #2 >1107 { pop$ " et~al." * }1108 { #2 <1109 'skip$1110 { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =1111 { " et~al." * }1112 { " and " * s #2 "{vv~}{ll}" format.name$ * }1113 if$1114 }1115 if$1116 }1117 if$1118}11191120FUNCTION {author.key.label}1121{ author empty$1122 { key empty$1123 { cite$ #1 #3 substring$ }1124 'key1125 if$1126 }1127 { author format.lab.names }1128 if$1129}11301131FUNCTION {author.editor.key.label}1132{ author empty$1133 { editor empty$1134 { key empty$1135 { cite$ #1 #3 substring$ }1136 'key1137 if$1138 }1139 { editor format.lab.names }1140 if$1141 }1142 { author format.lab.names }1143 if$1144}11451146FUNCTION {author.key.organization.label}1147{ author empty$1148 { key empty$1149 { organization empty$1150 { cite$ #1 #3 substring$ }1151 { "The " #4 organization chop.word #3 text.prefix$ }1152 if$1153 }1154 'key1155 if$1156 }1157 { author format.lab.names }1158 if$1159}11601161FUNCTION {editor.key.organization.label}1162{ editor empty$1163 { key empty$1164 { organization empty$1165 { cite$ #1 #3 substring$ }1166 { "The " #4 organization chop.word #3 text.prefix$ }1167 if$1168 }1169 'key1170 if$1171 }1172 { editor format.lab.names }1173 if$1174}11751176FUNCTION {calc.short.authors}1177{ type$ "book" =1178 type$ "inbook" =1179 or1180 'author.editor.key.label1181 { type$ "proceedings" =1182 'editor.key.organization.label1183 { type$ "manual" =1184 'author.key.organization.label1185 'author.key.label1186 if$1187 }1188 if$1189 }1190 if$1191 'short.list :=1192}11931194FUNCTION {calc.label}1195{ calc.short.authors1196 short.list1197 "("1198 *1199 year duplicate$ empty$1200 short.list key field.or.null = or1201 { pop$ "" }1202 'skip$1203 if$1204 *1205 'label :=1206}12071208FUNCTION {sort.format.names}1209{ 's :=1210 #1 'nameptr :=1211 ""1212 s num.names$ 'numnames :=1213 numnames 'namesleft :=1214 { namesleft #0 > }1215 {1216 s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=1217 nameptr #1 >1218 {1219 " " *1220 namesleft #1 = t "others" = and1221 { "zzzzz" * }1222 { numnames #2 > nameptr #2 = and1223 { "zz" * year field.or.null * " " * }1224 'skip$1225 if$1226 t sortify *1227 }1228 if$1229 }1230 { t sortify * }1231 if$1232 nameptr #1 + 'nameptr :=1233 namesleft #1 - 'namesleft :=1234 }1235 while$1236}12371238FUNCTION {sort.format.title}1239{ 't :=1240 "A " #21241 "An " #31242 "The " #4 t chop.word1243 chop.word1244 chop.word1245 sortify1246 #1 global.max$ substring$1247}12481249FUNCTION {author.sort}1250{ author empty$1251 { key empty$1252 { "to sort, need author or key in " cite$ * warning$1253 ""1254 }1255 { key sortify }1256 if$1257 }1258 { author sort.format.names }1259 if$1260}12611262FUNCTION {author.editor.sort}1263{ author empty$1264 { editor empty$1265 { key empty$1266 { "to sort, need author, editor, or key in " cite$ * warning$1267 ""1268 }1269 { key sortify }1270 if$1271 }1272 { editor sort.format.names }1273 if$1274 }1275 { author sort.format.names }1276 if$1277}12781279FUNCTION {author.organization.sort}1280{ author empty$1281 { organization empty$1282 { key empty$1283 { "to sort, need author, organization, or key in " cite$ * warning$1284 ""1285 }1286 { key sortify }1287 if$1288 }1289 { "The " #4 organization chop.word sortify }1290 if$1291 }1292 { author sort.format.names }1293 if$1294}12951296FUNCTION {editor.organization.sort}1297{ editor empty$1298 { organization empty$1299 { key empty$1300 { "to sort, need editor, organization, or key in " cite$ * warning$1301 ""1302 }1303 { key sortify }1304 if$1305 }1306 { "The " #4 organization chop.word sortify }1307 if$1308 }1309 { editor sort.format.names }1310 if$1311}131213131314FUNCTION {presort}1315{ calc.label1316 label sortify1317 " "1318 *1319 type$ "book" =1320 type$ "inbook" =1321 or1322 'author.editor.sort1323 { type$ "proceedings" =1324 'editor.organization.sort1325 { type$ "manual" =1326 'author.organization.sort1327 'author.sort1328 if$1329 }1330 if$1331 }1332 if$1333 " "1334 *1335 year field.or.null sortify1336 *1337 " "1338 *1339 cite$1340 *1341 #1 entry.max$ substring$1342 'sort.label :=1343 sort.label *1344 #1 entry.max$ substring$1345 'sort.key$ :=1346}13471348ITERATE {presort}13491350SORT13511352STRINGS { longest.label last.label next.extra }13531354INTEGERS { longest.label.width last.extra.num number.label }13551356FUNCTION {initialize.longest.label}1357{ "" 'longest.label :=1358 #0 int.to.chr$ 'last.label :=1359 "" 'next.extra :=1360 #0 'longest.label.width :=1361 #0 'last.extra.num :=1362 #0 'number.label :=1363}13641365FUNCTION {forward.pass}1366{ last.label label =1367 { last.extra.num #1 + 'last.extra.num :=1368 last.extra.num int.to.chr$ 'extra.label :=1369 }1370 { "a" chr.to.int$ 'last.extra.num :=1371 "" 'extra.label :=1372 label 'last.label :=1373 }1374 if$1375 number.label #1 + 'number.label :=1376}13771378FUNCTION {reverse.pass}1379{ next.extra "b" =1380 { "a" 'extra.label := }1381 'skip$1382 if$1383 extra.label 'next.extra :=1384 extra.label1385 duplicate$ empty$1386 'skip$1387 { "{\natexlab{" swap$ * "}}" * }1388 if$1389 'extra.label :=1390 label extra.label * 'label :=1391}13921393EXECUTE {initialize.longest.label}13941395ITERATE {forward.pass}13961397REVERSE {reverse.pass}13981399FUNCTION {bib.sort.order}1400{ sort.label 'sort.key$ :=1401}14021403ITERATE {bib.sort.order}14041405SORT14061407FUNCTION {begin.bib}1408{ preamble$ empty$1409 'skip$1410 { preamble$ write$ newline$ }1411 if$1412 "\begin{thebibliography}{" number.label int.to.str$ * "}" *1413 write$ newline$1414 "\providecommand{\natexlab}[1]{#1}"1415 write$ newline$1416 "\providecommand{\url}[1]{\texttt{#1}}"1417 write$ newline$1418 "\expandafter\ifx\csname urlstyle\endcsname\relax"1419 write$ newline$1420 " \providecommand{\doi}[1]{doi: #1}\else"1421 write$ newline$1422 " \providecommand{\doi}{doi: \begingroup \urlstyle{rm}\Url}\fi"1423 write$ newline$1424}14251426EXECUTE {begin.bib}14271428EXECUTE {init.state.consts}14291430ITERATE {call.type$}14311432FUNCTION {end.bib}1433{ newline$1434 "\end{thebibliography}" write$ newline$1435}14361437EXECUTE {end.bib}1438