diff options
Diffstat (limited to 'Master/texmf-dist/bibtex/bst/revtex/aipauth4-1.bst')
-rw-r--r-- | Master/texmf-dist/bibtex/bst/revtex/aipauth4-1.bst | 1288 |
1 files changed, 1036 insertions, 252 deletions
diff --git a/Master/texmf-dist/bibtex/bst/revtex/aipauth4-1.bst b/Master/texmf-dist/bibtex/bst/revtex/aipauth4-1.bst index 6aaab0d206b..797719716b8 100644 --- a/Master/texmf-dist/bibtex/bst/revtex/aipauth4-1.bst +++ b/Master/texmf-dist/bibtex/bst/revtex/aipauth4-1.bst @@ -4,13 +4,13 @@ %% %% The original source files were: %% -%% merlin.mbs (with options: `head,ay,nat,lang,pres,pres-bf,vonx,nm-rev,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,blkyear,yr-par,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,pre-pub,pre-edn,isbn,issn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') -%% physjour.mbs (with options: `ay,nat,lang,pres,pres-bf,vonx,nm-rev,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,blkyear,yr-par,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,pre-pub,pre-edn,isbn,issn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') -%% geojour.mbs (with options: `ay,nat,lang,pres,pres-bf,vonx,nm-rev,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,blkyear,yr-par,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,pre-pub,pre-edn,isbn,issn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') -%% photjour.mbs (with options: `ay,nat,lang,pres,pres-bf,vonx,nm-rev,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,blkyear,yr-par,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,pre-pub,pre-edn,isbn,issn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') -%% merlin.mbs (with options: `tail,ay,nat,lang,pres,pres-bf,vonx,nm-rev,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,blkyear,yr-par,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,pre-pub,pre-edn,isbn,issn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') +%% merlin.mbs (with options: `head,ay,nat,lang,pres,pres-bf,vonx,nm-rev,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,blkyear,yr-par,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,isbn,issn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') +%% physjour.mbs (with options: `ay,nat,lang,pres,pres-bf,vonx,nm-rev,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,blkyear,yr-par,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,isbn,issn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') +%% geojour.mbs (with options: `ay,nat,lang,pres,pres-bf,vonx,nm-rev,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,blkyear,yr-par,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,isbn,issn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') +%% photjour.mbs (with options: `ay,nat,lang,pres,pres-bf,vonx,nm-rev,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,blkyear,yr-par,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,isbn,issn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') +%% merlin.mbs (with options: `tail,ay,nat,lang,pres,pres-bf,vonx,nm-rev,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,blkyear,yr-par,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,isbn,issn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') %% ---------------------------------------- -%% *** REVTeX-compatible aipauth4-1.bst 2009-10-08 *** +%% *** REVTeX-compatible aipauth4-1.bst 2009-10-25 *** %% %% Copyright 1994-2007 Patrick W Daly % =============================================================== @@ -24,7 +24,6 @@ % version 1 of the License, or any later version. % =============================================================== % Name and version information of the main mbs file: - % \ProvidesFile{merlin.mbs}[2008/01/17 4.21 (PWD, AO, DPC)] % For use with BibTeX version 0.99a or later %------------------------------------------------------------------- % This bibliography style file is intended for texts in ENGLISH @@ -55,7 +54,7 @@ % \citeyear{key} ==>> 1990 %--------------------------------------------------------------------- -FUNCTION {id.bst} {"Merlin.mbs v4.21 2009-07-09. "} +FUNCTION {id.bst} {"merlin.mbs 2010-03-15 4.21a (PWD, AO, DPC)"} ENTRY { address @@ -114,6 +113,7 @@ INTEGERS } STRINGS { bibfield output.bibfield } + FUNCTION {not} { { #0 } { #1 } @@ -138,6 +138,399 @@ FUNCTION {non.stop} #-1 #1 substring$ "." = } +INTEGERS { arith.mulitplier arith.multiplicand } + +FUNCTION {multiply} +{ + 'arith.multiplicand := + 'arith.mulitplier := + #0 + { arith.mulitplier #0 > } + { arith.multiplicand + + arith.mulitplier #1 - 'arith.mulitplier := + } + while$ +} + +FUNCTION {chr.to.hex} +{ + chr.to.int$ + duplicate$ "0" chr.to.int$ - + duplicate$ duplicate$ #0 < swap$ #9 > or not + { swap$ pop$ } + { pop$ + duplicate$ "A" chr.to.int$ - + duplicate$ duplicate$ #0 < swap$ #5 > or not + { swap$ pop$ #10 + } + { pop$ + duplicate$ "a" chr.to.int$ - + duplicate$ duplicate$ #0 < swap$ #5 > or not + { swap$ pop$ #10 + } + { pop$ + pop$ #-1 + } + if$ + } + if$ + } + if$ +} + +INTEGERS { arith.accumulator } + +FUNCTION {str.to.hex} +{ #0 'arith.accumulator := + { duplicate$ empty$ not } + { duplicate$ #1 #1 substring$ chr.to.hex + duplicate$ #0 < + { pop$ pop$ "" + } + { arith.accumulator #16 multiply + 'arith.accumulator := + #2 global.max$ substring$ + } + if$ + } + while$ + pop$ arith.accumulator +} + +FUNCTION {diagn.cmntlog} +{ + duplicate$ top$ "%" swap$ * write$ newline$ +} + +INTEGERS { control.key control.author control.editor control.title control.pages control.eprint control.year } + +INTEGERS { control.author.jnrlst control.author.dotless control.author.nospace control.author.initials control.author.nocomma control.author.first control.author.reversed } + +FUNCTION { control.init } +{ + #0 + 'control.key := + #0 + #1 + + #8 + + 'control.author := + #0 + 'control.author.jnrlst := + #0 + 'control.author.dotless := + #0 + 'control.author.nospace := + #1 + 'control.author.initials := + #0 + 'control.author.nocomma := + #0 + 'control.author.first := + #1 + 'control.author.reversed := + #0 + 'control.editor := + #-1 + 'control.title := + #0 + 'control.pages := + #0 + 'control.eprint := + #1 + 'control.year := +} + +FUNCTION {warning.dependency} +{ + " (dependency: " * swap$ * ") set " * swap$ int.to.str$ * warning$ +} + +FUNCTION {control.check} +{ + control.editor + { + "editor formatted same as author" + control.author.reversed { + duplicate$ #0 swap$ "reversed" warning.dependency + #0 'control.author.reversed := + } 'skip$ if$ + control.author.first { + duplicate$ #0 swap$ "first" warning.dependency + #0 'control.author.first := + } 'skip$ if$ + control.author.nocomma { + duplicate$ #0 swap$ "nocomma" warning.dependency + #0 'control.author.nocomma := + } 'skip$ if$ + pop$ + } 'skip$ if$ + control.author.reversed 'skip$ + { + "not reversed" + control.author.nospace { + duplicate$ #0 swap$ "nospace" warning.dependency + #0 'control.author.nospace := + } 'skip$ if$ + control.author.jnrlst 'skip$ { + duplicate$ #1 swap$ "jnrlst" warning.dependency + #1 'control.author.jnrlst := + } if$ + control.author.initials { + duplicate$ ", initials" * + control.author.dotless { + duplicate$ #0 swap$ "dotless" warning.dependency + #0 'control.author.dotless := + } 'skip$ if$ + pop$ + } 'skip$ if$ + pop$ + } + if$ + control.author.initials 'skip$ { + "not initials" + control.author.nocomma { + duplicate$ #0 swap$ "nocomma" warning.dependency + #0 'control.author.nocomma := + } 'skip$ if$ + control.author.nospace { + duplicate$ #0 swap$ "nospace" warning.dependency + #0 'control.author.nospace := + } 'skip$ if$ + control.author.dotless 'skip$ { + duplicate$ #1 swap$ "dotless" warning.dependency + #1 'control.author.dotless := + } if$ + pop$ + } if$ +} + +FUNCTION {control.parse} +{ + duplicate$ duplicate$ missing$ + { + pop$ pop$ pop$ + } + { empty$ + { + pop$ #-1 + }{ + str.to.hex + } + if$ + swap$ := + } + if$ +} + +FUNCTION {control.dump} +{ + duplicate$ missing$ { pop$ "N/A" } 'skip$ if$ + "{" swap$ * "}, " * + * +} + +INTEGERS { decode.threshold } + +FUNCTION {control.decode} +{ + - duplicate$ + #0 < + { + skip$ pop$ swap$ #0 + } + { + swap$ pop$ swap$ #1 + } + if$ + swap$ := +} + +FUNCTION {control.author.decode} +{ + control.author + duplicate$ duplicate$ #0 < swap$ #128 < not or + { + int.to.str$ "(" swap$ * ")" * + "Control cannot interpret author " swap$ * + warning$ + }{ + 'control.author.jnrlst swap$ duplicate$ #64 control.decode + 'control.author.dotless swap$ duplicate$ #32 control.decode + 'control.author.nospace swap$ duplicate$ #16 control.decode + 'control.author.initials swap$ duplicate$ #8 control.decode + 'control.author.nocomma swap$ duplicate$ #4 control.decode + 'control.author.first swap$ duplicate$ #2 control.decode + 'control.author.reversed swap$ duplicate$ #1 control.decode + duplicate$ #0 = + 'skip$ + { + "Control: residue of author" + "(" swap$ * ")" * * + warning$ + } + if$ + pop$ + } + if$ +} + +FUNCTION {control.setup} +{ + type$ cite$ "{" swap$ * "}, " * * + "control.key" key control.dump * + "control.author" author control.dump * + "control.editor" editor control.dump * + "control.title" title control.dump * + "control.pages" pages control.dump * + "control.year" year control.dump * + "control.eprint" eprint control.dump * + top$ + 'control.key key control.parse + 'control.author author control.parse + 'control.editor editor control.parse + 'control.title title control.parse + 'control.pages pages control.parse + 'control.year year control.parse + 'control.eprint eprint control.parse + control.author.decode +} + +FUNCTION {control.pass} +{ type$ "control" = 'control.setup 'skip$ if$ +} + +FUNCTION {control.presort} +{ +} + +FUNCTION {control.forward} +{ +} + +FUNCTION {control.reverse} +{ +} + +FUNCTION {control.sort} +{ +} + +FUNCTION {control.longest.label} +{ +} + +FUNCTION {control.key.bib} +{ + "Control: key " + control.key + duplicate$ "(" swap$ int.to.str$ * ") " * swap$ + pop$ * + diagn.cmntlog +} + +FUNCTION {control.author.bib} +{ + "Control: author " + control.author "(" swap$ int.to.str$ * ")" * * + control.author.reversed { " reversed" * }{} if$ + control.author.first { " first" * }{} if$ + control.author.nocomma { " nocomma" * }{} if$ + control.author.initials { " initials" * }{} if$ + control.author.nospace { " nospace" * }{} if$ + control.author.dotless { " dotless" * }{} if$ + control.author.jnrlst { " jnrlst" * }{} if$ + diagn.cmntlog +} + +FUNCTION {control.editor.bib} +{ + "Control: editor formatted " + control.editor + duplicate$ "(" swap$ int.to.str$ * ") " * swap$ + duplicate$ #0 < { + pop$ + "disabled!" + } { + #0 > { + "identically to author" + } { + "differently from author" + } if$ + } if$ * * + diagn.cmntlog +} + +FUNCTION {control.title.bib} +{ + "Control: production of article title " + control.title + duplicate$ "(" swap$ int.to.str$ * ") " * swap$ + duplicate$ #0 < { + pop$ + "disabled" + } { + #0 > { + "required" + } { + "allowed" + } if$ + } if$ * * + diagn.cmntlog +} + +FUNCTION {control.pages.bib} +{ + "Control: page " + control.pages + duplicate$ "(" swap$ int.to.str$ * ") " * swap$ + duplicate$ #0 < { + pop$ + "none" + } { + #0 > { + "range" + } { + "single" + } if$ + } if$ * * + diagn.cmntlog +} + +FUNCTION {control.year.bib} +{ + "Control: year " + control.year + duplicate$ "(" swap$ int.to.str$ * ") " * swap$ + duplicate$ #0 < { + pop$ + "disabled!" + } { + #0 > { + "truncated" + } { + "verbatim" + } if$ + } if$ * * + diagn.cmntlog +} + +FUNCTION {control.eprint.bib} +{ + "Control: production of eprint " + control.eprint + duplicate$ "(" swap$ int.to.str$ * ") " * swap$ + #0 < { "disabled" } { "enabled" } if$ * * + diagn.cmntlog +} + +FUNCTION {control.bib} +{ + control.key.bib + control.author.bib + control.editor.bib + control.title.bib + control.pages.bib + control.year.bib + control.eprint.bib +} + FUNCTION {init.state.consts} { #0 'before.all := @@ -182,7 +575,7 @@ FUNCTION {show.stackstring.two}{ duplicate$ "2(" swap$ * ")" * top$ } -FUNCTION {bibfield.command}{ "\bibfield"} +FUNCTION {bibfield.command}{ "\bibfield "} FUNCTION {output.nonnull} { @@ -212,9 +605,7 @@ FUNCTION {output.nonnull} output.bibfield duplicate$ empty$ 'pop$ { bibfield.command - "{" * swap$ * "}{%" * write$ newline$ - " " swap$ * "}%" * write$ newline$ - " " + " {" * swap$ * "} {" * swap$ * "}" * } if$ write$ @@ -245,6 +636,12 @@ FUNCTION {output} if$ } +FUNCTION {output.nopunct} +{ + punctuation.no 'punctuation.state := + output.nonnull +} + FUNCTION {output.check} { swap$ duplicate$ empty$ @@ -253,9 +650,9 @@ FUNCTION {output.check} if$ } -FUNCTION {bbl.open} { "\BibitemOpen" } +FUNCTION {bbl.open} { "\BibitemOpen " } -FUNCTION {bbl.shut} { "\BibitemShut" } +FUNCTION {bbl.shut} { "\BibitemShut " } FUNCTION {bibitem.shut.stop} { bbl.shut "{Stop}%" * } @@ -332,7 +729,7 @@ FUNCTION {add.blank} FUNCTION {no.blank.or.punct} { - "\hspace{0pt}" * + "\hspace {0pt}" * before.all 'output.state := } @@ -342,6 +739,23 @@ FUNCTION {date.block} skip$ } +STRINGS {z} +FUNCTION {remove.dots} +{ + control.author.dotless { + 'z := + "" + { z empty$ not } + { z #1 #1 substring$ + z #2 global.max$ substring$ 'z := + duplicate$ "." = 'pop$ + { * } + if$ + } + while$ + } 'skip$ if$ +} + FUNCTION {new.block.checkb} { empty$ swap$ empty$ @@ -363,7 +777,7 @@ FUNCTION {emphasize} duplicate$ empty$ { pop$ "" } { - "\emph{" swap$ * "}" * + "\emph {" swap$ * "}" * } if$ } @@ -371,7 +785,7 @@ FUNCTION {emphasize} FUNCTION {bolden} { duplicate$ empty$ { pop$ "" } - { "\textbf{" swap$ * "}" * } + { "\textbf {" swap$ * "}" * } if$ } @@ -380,7 +794,7 @@ FUNCTION {bib.name.font} duplicate$ empty$ { pop$ "" } { - "\bibnamefont{" swap$ * "}" * + "\bibnamefont {" swap$ * "}" * } if$ } @@ -390,7 +804,7 @@ FUNCTION {bib.fname.font} duplicate$ empty$ { pop$ "" } { - "\bibfnamefont{" swap$ * "}" * + "\bibfnamefont {" swap$ * "}" * } if$ } @@ -400,7 +814,7 @@ FUNCTION {cite.name.font} duplicate$ empty$ { pop$ "" } { - "\citenamefont{" swap$ * "}" * + "\citenamefont {" swap$ * "}" * } if$ } @@ -424,6 +838,7 @@ FUNCTION {space.word} % 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" @@ -563,7 +978,7 @@ MACRO {dec} {"Dec."} FUNCTION {bbl.url.prefix} { - "\urlprefix" + "\urlprefix " } FUNCTION {eng.ord} @@ -875,7 +1290,7 @@ MACRO {toplas} {"ACM Trans. Progr. Lang. Syst."} MACRO {tcs} {"Theor. Comput. Sci."} -FUNCTION {bibinfo.command} { "\bibinfo" } +FUNCTION {bibinfo.command} { "\bibinfo " } FUNCTION {bibinfo.check} { swap$ @@ -889,7 +1304,7 @@ FUNCTION {bibinfo.check} swap$ pop$ }{ swap$ - bibinfo.command " {" * swap$ * "} {" * swap$ * "}" * + bibinfo.command "{" * swap$ * "} {" * swap$ * "}" * } if$ } @@ -927,11 +1342,14 @@ FUNCTION {archiv.prefix.base} FUNCTION {eprint.command} { - "\Eprint" + "\Eprint " } FUNCTION {format.eprint} -{ eprint duplicate$ empty$ +{ + eprint duplicate$ empty$ + control.eprint #0 < + or { pop$ "" } { duplicate$ @@ -939,13 +1357,13 @@ FUNCTION {format.eprint} archive duplicate$ empty$ { pop$ archiv.base } 'skip$ if$ * "/" * swap$ * - "{" swap$ * "}" * + "{" swap$ * "} " * swap$ "" archivePrefix duplicate$ empty$ { pop$ "" } { ":" * } if$ * swap$ * primaryClass duplicate$ empty$ { pop$ "" } { " [" swap$ * "]" * } if$ * - "{" swap$ * "}" * + "{" swap$ * "} " * * eprint.command swap$ * } @@ -967,7 +1385,7 @@ FUNCTION {format.url} url duplicate$ empty$ { pop$ "" } { - "\url" + "\url " "{" * swap$ * "}" * } if$ @@ -990,127 +1408,339 @@ FUNCTION {check.speaker} STRINGS { bibinfo} +FUNCTION {format.names.fname} +{ + control.author.initials { + control.author.dotless { + control.author.nospace { + "f{}" + } { + "f{~}" + } if$ + } { + control.author.nospace { + "f{.}." + } { + "f." + } if$ + } if$ + } { + "ff" + } if$ +} + +FUNCTION {bracify} +{ + "{" swap$ * "}" * +} + +FUNCTION {name.comma} +{ + control.author.nocomma 'skip$ { "," swap$ * } if$ +} + +FUNCTION {format.names.format.onefont} +{ + "{vv~}{ll}" + nameptr #1 > + control.author.first + and + control.author.reversed not + or + { + control.author.initials { + "f" + control.author.dotless 'skip$ { + "." * + } if$ + "~" * + } { + "ff" + } if$ + bracify + swap$ + } { + format.names.fname + " " swap$ * + name.comma + bracify + } + if$ + "jj" + " " swap$ * + name.comma + bracify + control.author.jnrlst 'skip$ 'swap$ if$ + * * +} + +FUNCTION {format.names.onefont} +{ + s nameptr format.names.format.onefont format.name$ + remove.dots + bib.name.font +} + +FUNCTION {format.names.morfont} +{ s nameptr + "{vv~}{ll}" format.name$ bib.name.font + nameptr #1 > + control.author.first + and + control.author.reversed not + or + { + s nameptr + control.author.initials { + "f" % default: name + surname + comma junior + } { + "ff" + } if$ + control.author.dotless 'skip$ { + "." * % nm-init % Initials. + surname (J. F. Smith) control.author.initials + } if$ + bracify + format.name$ duplicate$ empty$ 'skip$ + { tie.or.space.prefix bib.fname.font swap$ * } + if$ + swap$ + * + s nameptr + "{jj}" format.name$ duplicate$ empty$ 'skip$ + { bib.fname.font ", " swap$ * } + if$ + } { + s nameptr + format.names.fname + "jj" + " " + name.comma + control.author.jnrlst { + swap$ * skip$ + } { + skip$ * swap$ + } if$ + bracify swap$ bracify swap$ + * + format.name$ + remove.dots + duplicate$ empty$ 'skip$ + { bib.fname.font " " swap$ * } + if$ + } if$ + * +} + +FUNCTION {names.punctuate} +{ + "," * + " " * +} + 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, }{f.}" - format.name$ duplicate$ empty$ 'skip$ - { bib.fname.font ", " swap$ * } - if$ - * - bibinfo bibinfo.check - type$ "presentation" = - { check.speaker } - 'skip$ - if$ - '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$ + duplicate$ empty$ { pop$ "" } { + duplicate$ num.names$ + duplicate$ 'numnames := + 'namesleft := + 's := + #1 'nameptr := + "" + { namesleft #0 > } + { + format.names.morfont + bibinfo bibinfo.check + type$ "presentation" = + 'check.speaker + 'skip$ + if$ + 't := + nameptr #1 > not + { + t * + } { + namesleft #1 > + { + names.punctuate + t * + } { + s nameptr "{ll}" format.name$ duplicate$ "others" = + { 't := } + { pop$ } + if$ + numnames #2 > + 'names.punctuate + 'skip$ + if$ + t "others" = + { + " " * + bbl.etal + emphasize + * + } { + bbl.and + space.word * + t * + } + if$ + } + if$ + } + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ } if$ } -FUNCTION {format.names.ed} +FUNCTION {format.names.ed.onefont} { - 'bibinfo := - duplicate$ empty$ 'skip$ { - 's := - "" 't := - #1 'nameptr := - s num.names$ 'numnames := - numnames 'namesleft := - { namesleft #0 > } - { s nameptr - "{f.}" format.name$ duplicate$ empty$ 'skip$ + s nameptr + control.author.initials { + control.author.dotless { + control.author.nospace { + "{f{}~}{vv~}{ll}{ jj}" % nm-rvx|nm-rvcx + } { + "{f{~}~}{vv~}{ll}{ jj}" % nm-rv + } if$ + } { + control.author.nospace { + "{f{.}.~}{vv~}{ll}{ jj}" % nm-rvv|nm-rvvc + }{ + "{f.~}{vv~}{ll}{, jj}" % nm-init|nm-rev|nm-rev1 + } if$ + } if$ + } { + "{ff~}{vv~}{ll}{, jj}" + } if$ + format.name$ + remove.dots + bib.name.font +} + +FUNCTION {format.names.ed.morfont} +{ + control.author.reversed { % + control.author.initials { % + control.author.dotless { % + s nameptr + control.author.nospace { % nm-rvx nm-rvcx + "{f{}}" + } { % nm-rv + "{f{~}}" + } if$ + 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$ + remove.dots + duplicate$ empty$ 'skip$ + { bib.fname.font " " swap$ * } + if$ + } { % !control.author.dotless + s nameptr + control.author.nospace { % nm-rvv + "{ff}" + } { % nm-rev nm-rev1 + "{f.}" + } if$ + 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$ + } if$ + } { % Full names !control.author.initials nm-revf nm-revv1 + 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$ + "{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$ - numnames #2 > - { - "," * - } - { skip$ } - if$ - t "others" = - { + } if$ + } { % !control.author.reversed nm-init + s nameptr + "{f.}" + 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$ + } if$ + * +} - " " * bbl.etal emphasize * - }{ - bbl.and - space.word * t * - } - if$ - } - if$ - } - 't - if$ - nameptr #1 + 'nameptr := - namesleft #1 - 'namesleft := - } - while$ +FUNCTION {format.names.ed} +{ + control.editor #0 > { + format.names + } { + 'bibinfo := + duplicate$ empty$ 'skip$ { + 's := + "" 't := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { + format.names.ed.morfont + bibinfo bibinfo.check + 't := + nameptr #1 > + { + namesleft #1 > + { + names.punctuate + t * + }{ + s nameptr "{ll}" format.name$ duplicate$ "others" = + { 't := } + { pop$ } + if$ + numnames #2 > + 'names.punctuate + 'skip$ + if$ + t "others" = + { + " " * bbl.etal emphasize * + }{ + bbl.and + space.word * t * + } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ + } if$ } if$ } @@ -1175,18 +1805,28 @@ FUNCTION {doi.base} "http://dx.doi.org/" } +FUNCTION {noop.command} +{ + "\href@noop " +} + FUNCTION {doi.command} { - "\doi" + "\doi " } FUNCTION {doi.command.href} { - "\Doi" + "\Doi " +} + +FUNCTION {href.command} +{ + "\href " } FUNCTION {format.doi} -{ doi "doi" bibinfo.check +{ doi duplicate$ empty$ 'skip$ { new.block.comma @@ -1195,22 +1835,67 @@ FUNCTION {format.doi} if$ } -FUNCTION {add.doi} +FUNCTION {add.doi.old} { duplicate$ empty$ 'skip$ { - doi duplicate$ empty$ 'pop$ + doi duplicate$ empty$ { - "{" swap$ * "}" * - swap$ - "{" swap$ * "}" * - * - doi.command.href swap$ * + pop$ + url duplicate$ empty$ + { + pop$ + }{ + href.command " {" * swap$ * "} {" * swap$ * "}" * + } + if$ + } + { + doi.command.href " {" * swap$ * "} {" * swap$ * "}" * } if$ } if$ } +FUNCTION {link.tag.open} +{ + doi duplicate$ empty$ + { + pop$ + url duplicate$ empty$ + { + pop$ "" noop.command + }{ + href.command + } + if$ + } + { + doi.command.href + } + if$ + "{" * swap$ * "} {" * +} + +FUNCTION {link.tag.shut} +{ + "}" +} + +FUNCTION {link.open} +{ + link.tag.open output.nopunct +} + +FUNCTION {link.shut} +{ + link.tag.shut * +} + +FUNCTION {add.doi} +{ + link.tag.open swap$ * link.tag.shut * +} FUNCTION {select.language} { duplicate$ empty$ @@ -1244,7 +1929,7 @@ FUNCTION {format.note} FUNCTION {bbl.enquote} { - "\enquote" + "\enquote " } FUNCTION {string.enquote} @@ -1252,7 +1937,7 @@ FUNCTION {string.enquote} punctuation.no 'punctuation.state := non.stop { block.punctuation - } { "." } if$ + } { "" } if$ swap$ pop$ * bbl.enquote "{" * swap$ * "}" * @@ -1279,6 +1964,14 @@ FUNCTION {end.quote.title} if$ } +FUNCTION {format.name.apply} +{ + s nameptr + "{vv~}{ll}" + format.name$ + cite.name.font +} + FUNCTION {format.full.names} { 's := @@ -1287,10 +1980,7 @@ FUNCTION {format.full.names} s num.names$ 'numnames := numnames 'namesleft := { namesleft #0 > } - { s nameptr - "{vv~}{ll}" - format.name$ - cite.name.font + { format.name.apply 't := nameptr #1 > { @@ -1366,13 +2056,13 @@ FUNCTION {output.bibitem} "" label * - ")" * make.full.names duplicate$ short.list = { pop$ }{ * } if$ - "{" swap$ * "}" * + bracify "[" swap$ * "]" * - "{" * cite$ * "}%" * - "\bibitem" + cite$ bracify "%" * + * + "\bibitem " swap$ * write$ newline$ " " @@ -1668,7 +2358,16 @@ FUNCTION {format.journal.pages} { pop$ pop$ format.pages } { volnum.punct * swap$ - first.page + control.pages duplicate$ #0 < { + pop$ pop$ + }{ + #0 > + { + n.dashify + }{ + first.page + } if$ + } if$ "pages" bibinfo.check * } @@ -1699,7 +2398,6 @@ FUNCTION {eid.or.pages} FUNCTION {format.ser.vol.num} { series "series" bibinfo.check output - after.punctuation 'output.state := volume field.or.null duplicate$ empty$ 'skip$ { @@ -1774,7 +2472,7 @@ FUNCTION {format.in.ed.booktitle} { format.booktitle duplicate$ empty$ 'pop$ { - add.doi + add.doi word.in swap$ * output.nonnull bookaddress "address" bibinfo.check output format.number.series "series and number" bibinfo.check output @@ -1788,7 +2486,7 @@ FUNCTION {format.in.ed.booktitle.inbook} { format.booktitle duplicate$ empty$ 'pop$ { - add.doi + add.doi word.in swap$ * output.nonnull bookaddress "address" bibinfo.check output format.number.series "series and number" bibinfo.check output @@ -1930,6 +2628,27 @@ FUNCTION {format.school.address.output} output } +FUNCTION {article.title.produce} +{ + control.title duplicate$ #0 < + { pop$ + }{ + format.title + "title" 'bibfield := + swap$ #0 > + { + "title" output.check + }{ + output + } if$ + new.block.comma + } if$ +} + +FUNCTION {control} +{ +} + FUNCTION {article} { output.bibitem format.authors @@ -1938,18 +2657,20 @@ FUNCTION {article} }{ output } if$ author format.key output new.block.comma + article.title.produce output.article.booktitle crossref missing$ { + link.open journal "journal" bibinfo.warn - pages empty$ 'skip$ { add.doi } if$ "journal" 'bibfield := output format.ser.vol.num output eid.or.pages format.date.output.check + link.shut }{ format.article.crossref output.nonnull format.pages output @@ -1963,7 +2684,6 @@ FUNCTION {article} new.sentence.comma format.note output format.eprint output - format.url output format.translation output fin.entry } @@ -1972,25 +2692,28 @@ FUNCTION {book} { output.bibitem author empty$ { + format.editors "author and editor" output.check + editor format.key output }{ format.authors output.nonnull - crossref missing$ { editor.check.book } 'skip$ if$ +% crossref missing$ { editor.check.book } 'skip$ if$ } if$ new.block.comma + link.open format.btitle - add.doi "title" output.check + link.shut format.edition output author empty$ { - format.editor.in output - editor format.key output } { + format.editor.in output + editor format.key output } if$ - format.number.series output + format.number.series output crossref missing$ { format.bvolume output @@ -2003,13 +2726,12 @@ FUNCTION {book} } if$ format.isbn output - format.chapter.pages - output + format.chapter.pages + output new.block.comma new.sentence.comma format.note output format.eprint output - format.url output fin.entry } @@ -2018,9 +2740,10 @@ FUNCTION {booklet} format.authors output author format.key output new.block.comma + link.open format.title - add.doi "title" output.check + link.shut new.block.comma howpublished "howpublished" bibinfo.check output address "address" bibinfo.check output @@ -2031,7 +2754,12 @@ FUNCTION {booklet} new.sentence.comma format.note output format.eprint output - format.url output + fin.entry +} + +FUNCTION {footnote} +{ output.bibitem + format.note output fin.entry } @@ -2078,7 +2806,6 @@ FUNCTION {inbook} new.sentence.comma format.note output format.eprint output - format.url output fin.entry } @@ -2087,6 +2814,7 @@ FUNCTION {incollection} format.authors "author" output.check author format.key output new.block.comma + article.title.produce crossref missing$ { format.in.ed.booktitle @@ -2103,7 +2831,6 @@ FUNCTION {incollection} new.sentence.comma format.note output format.eprint output - format.url output fin.entry } @@ -2112,6 +2839,7 @@ FUNCTION {inproceedings} format.authors "author" output.check author format.key output new.block.comma + article.title.produce crossref missing$ { format.in.ed.booktitle @@ -2128,7 +2856,6 @@ FUNCTION {inproceedings} new.sentence.comma format.note output format.eprint output - format.url output fin.entry } @@ -2138,9 +2865,10 @@ FUNCTION {manual} format.authors output author format.key output new.block.comma + link.open format.btitle - add.doi "title" output.check + link.shut organization "organization" bibinfo.check output address "address" bibinfo.check output format.edition output @@ -2149,7 +2877,6 @@ FUNCTION {manual} new.sentence.comma format.note output format.eprint output - format.url output fin.entry } @@ -2161,17 +2888,17 @@ FUNCTION {mastersthesis} format.btitle output new.block.comma + link.open bbl.mthesis format.thesis.type - add.doi output.nonnull + link.shut format.school.address.output format.date.output.check new.block.comma new.sentence.comma format.note output format.eprint output - format.url output fin.entry } @@ -2180,9 +2907,10 @@ FUNCTION {misc} format.authors output author format.key output new.block.comma + link.open format.title - add.doi output + link.shut new.block.comma howpublished "howpublished" bibinfo.check output format.date.output @@ -2190,7 +2918,6 @@ FUNCTION {misc} new.sentence.comma format.note output format.eprint output - format.url output fin.entry } @@ -2202,17 +2929,17 @@ FUNCTION {phdthesis} format.btitle output new.block.comma + link.open bbl.phdthesis format.thesis.type - add.doi output.nonnull + link.shut format.school.address.output format.date.output.check new.block.comma new.sentence.comma format.note output format.eprint output - format.url output fin.entry } @@ -2221,7 +2948,10 @@ FUNCTION {presentation} format.authors output author format.key output new.block.comma - format.title output + link.open + format.title + output + link.shut new.block.comma format.organization.address "organization and address" output.check month "month" output.check @@ -2233,7 +2963,6 @@ FUNCTION {presentation} type missing$ 'skip$ {"(" type capitalize * ")" * output} if$ - new.block.comma format.url output fin.entry } @@ -2242,9 +2971,10 @@ FUNCTION {proceedings} format.editors output editor format.key output new.block.comma + link.open format.btitle - add.doi "title" output.check + link.shut bookaddress "address" bibinfo.check output format.number.series output format.bvolume output @@ -2255,7 +2985,6 @@ FUNCTION {proceedings} new.sentence.comma format.note output format.eprint output - format.url output fin.entry } @@ -2264,9 +2993,10 @@ FUNCTION {techreport} format.authors "author" output.check author format.key output new.block.comma + link.open format.title - add.doi "title" output.check + link.shut new.block.comma format.tr.number output.nonnull @@ -2276,7 +3006,6 @@ FUNCTION {techreport} new.sentence.comma format.note output format.eprint output - format.url output fin.entry } @@ -2285,26 +3014,35 @@ FUNCTION {unpublished} format.authors "author" output.check author format.key output new.block.comma + link.open format.title - add.doi "title" output.check + link.shut format.date.output new.block.comma new.sentence.comma format.note "note" output.check format.eprint output - format.url output fin.entry } FUNCTION {default.type} { misc } + READ + +EXECUTE {control.init} + +ITERATE {control.pass} + +EXECUTE {control.check} + FUNCTION {sortify} { purify$ "l" change.case$ } INTEGERS { len } + FUNCTION {chop.word} { 's := 'len := @@ -2314,28 +3052,29 @@ FUNCTION {chop.word} if$ } +FUNCTION {cite.name.font.apply} +{ + word.space * bbl.etal + emphasize + * +} + FUNCTION {format.lab.names} { 's := "" 't := - s #1 - "{vv~}{ll}" - format.name$ - cite.name.font + #1 'nameptr := + format.name.apply s num.names$ duplicate$ #2 > { pop$ - word.space * bbl.etal - emphasize - * + cite.name.font.apply }{ #2 < 'skip$ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = { - word.space * bbl.etal - emphasize - * + cite.name.font.apply }{ bbl.and space.word * s #2 "{vv~}{ll}" format.name$ @@ -2401,19 +3140,18 @@ FUNCTION {calc.short.authors} } FUNCTION {calc.label} -{ calc.short.authors +{ + calc.short.authors short.list - "(" - * year duplicate$ empty$ { pop$ "" }{ - purify$ #-1 #4 substring$ + control.year #0 > { purify$ #-1 #4 substring$ } 'skip$ if$ } if$ - * - 'label := + "(" swap$ * ")" * + * 'label := } FUNCTION {sort.format.names} @@ -2424,7 +3162,13 @@ FUNCTION {sort.format.names} numnames 'namesleft := { namesleft #0 > } { s nameptr - "{ll{ }}{ f{ }}{ jj{ }}" + "{ll{ }}" + control.author.initials { + "{ f{ }}" * + }{ + "{ ff{ }}" * + } if$ + "{ jj{ }}" * format.name$ 't := nameptr #1 > { @@ -2485,6 +3229,11 @@ FUNCTION {author.editor.sort} if$ } +FUNCTION {year.sort.key} +{ + year +} + FUNCTION {editor.sort} { editor empty$ { key empty$ @@ -2498,8 +3247,21 @@ FUNCTION {editor.sort} if$ } -FUNCTION {presort} -{ calc.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 {label.presort} +{ + calc.label label sortify " " * @@ -2519,17 +3281,24 @@ FUNCTION {presort} * " " * - title field.or.null - sort.format.title + title field.or.null sort.format.title * #1 entry.max$ substring$ 'sort.key$ := } -ITERATE {presort} +FUNCTION {presort.pass} +{ type$ "control" = 'control.presort 'label.presort if$ +} + +ITERATE {presort.pass} + 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 := @@ -2537,8 +3306,9 @@ FUNCTION {initialize.extra.label.stuff} #0 'number.label := } -FUNCTION {forward.pass} -{ last.label label = +FUNCTION {label.forward} +{ + last.label label = { last.extra.num #1 + 'last.extra.num := last.extra.num int.to.chr$ 'extra.label := } @@ -2550,7 +3320,7 @@ FUNCTION {forward.pass} number.label #1 + 'number.label := } -FUNCTION {reverse.pass} +FUNCTION {label.reverse} { next.extra "b" = { "a" 'extra.label := } 'skip$ @@ -2566,31 +3336,47 @@ FUNCTION {reverse.pass} } EXECUTE {initialize.extra.label.stuff} + +FUNCTION {forward.pass} +{ type$ "control" = 'control.forward 'label.forward if$ +} + ITERATE {forward.pass} + +FUNCTION {reverse.pass} +{ type$ "control" = 'control.reverse 'label.reverse if$ +} + REVERSE {reverse.pass} -FUNCTION {bib.sort.order} + +FUNCTION {sortkey.sort} { sort.label " " * - year + year.sort.key field.or.null sortify * " " * - title field.or.null - sort.format.title + title field.or.null sort.format.title * #1 entry.max$ substring$ 'sort.key$ := } -ITERATE {bib.sort.order} +FUNCTION {bib.sort.pass} +{ type$ "control" = 'control.sort 'sortkey.sort if$ +} + +ITERATE {bib.sort.pass} + SORT + FUNCTION {init.bib.eprint} { - "\texttt{" + "\texttt {" pop$ - "\providecommand \url [0]{\begingroup\@sanitize \@url }%" write$ newline$ + "\providecommand \url [0]{\begingroup\@sanitize@url \@url }%" write$ newline$ "\providecommand \@url [1]{\endgroup\@href {#1}{" "}}%" bbl.url.prefix swap$ * * write$ newline$ "\providecommand " " [0]{URL }%" bbl.url.prefix swap$ * * write$ newline$ eprint.command "\providecommand " swap$ * "[0]{\href }%" * write$ newline$ @@ -2599,36 +3385,26 @@ FUNCTION {init.bib.eprint} FUNCTION {init.bib.doi} { "\@ifxundefined \urlstyle {%" write$ newline$ - " \providecommand \doi [1]{doi:\discretionary{}{}{}#1}%" write$ newline$ + " \providecommand " doi.command " [0]{\begingroup \@sanitize@url \@doi}%" * * write$ newline$ + " \providecommand \@doi [1]{\endgroup \@@startlink {\doibase #1}doi:\discretionary {}{}{}#1\@@endlink }%" write$ newline$ "}{%" write$ newline$ - " \providecommand \doi [0]{doi:\discretionary{}{}{}\begingroup \urlstyle{rm}\Url }%" - write$ newline$ + " \providecommand " doi.command " [0]{doi:\discretionary{}{}{}\begingroup \urlstyle{rm}\Url }%" * * write$ newline$ "}%" write$ newline$ - "\providecommand \doibase [0]{" doi.base * "}%" * write$ newline$ - doi.command.href "\providecommand " swap$ * "[1]{\href{\doibase#1}}%" * write$ newline$ + "\providecommand \doibase [0]{" doi.base "}%" * * write$ newline$ + "\providecommand " doi.command.href "[0]{\begingroup \@sanitize@url \@Doi }%" * * write$ newline$ + "\providecommand \@Doi [1]{\endgroup\@@startlink{\doibase#1}\@@Doi}%" write$ newline$ + "\providecommand \@@Doi [1]{#1\@@endlink}%" write$ newline$ } FUNCTION {init.bib.hypertex} { - "\providecommand\href[0]{\@sanitize\@href}%" write$ newline$ - "\providecommand\@href[1]{\endgroup\@@startlink{#1}\endgroup\@@href}%" write$ newline$ - "\providecommand\@@href[1]{#1\@@endlink}%" write$ newline$ - "\providecommand \@sanitize [0]{\begingroup\catcode`\&12\catcode`\#12\relax}%" write$ newline$ - "\@ifxundefined \pdfoutput {\@firstoftwo}{%" write$ newline$ - " \@ifnum{\z@=\pdfoutput}{\@firstoftwo}{\@secondoftwo}%" write$ newline$ - "}{%" write$ newline$ - " \providecommand\@@startlink[1]{\leavevmode\special{html:<a href=" quote$ * "#1" * quote$ * ">}}%" * write$ newline$ - " \providecommand\@@endlink[0]{\special{html:</a>}}%" write$ newline$ - "}{%" write$ newline$ - " \providecommand\@@startlink[1]{%" write$ newline$ - " \leavevmode" write$ newline$ - " \pdfstartlink" write$ newline$ - " attr{/Border[0 0 1 ]/H/I/C[0 1 1]}%" write$ newline$ - " user{/Subtype/Link/A<</Type/Action/S/URI/URI(#1)>>}%" write$ newline$ - " \relax" write$ newline$ - " }%" write$ newline$ - " \providecommand\@@endlink[0]{\pdfendlink}%" write$ newline$ - "}%" write$ newline$ + "\providecommand " noop.command "[0]{\@secondoftwo}%" * * write$ newline$ + "\providecommand " href.command "[0]{\begingroup \@sanitize@url \@href}%" * * write$ newline$ + "\providecommand \@href[1]{\@@startlink{#1}\@@href}%" write$ newline$ + "\providecommand \@@href[1]{\endgroup#1\@@endlink}%" write$ newline$ + "\providecommand \@sanitize@url [0]{\catcode `\\12\catcode `\$12\catcode `\&12\catcode `\#12\catcode `\^12\catcode `\_12\catcode `\%12\relax}%" write$ newline$ + "\providecommand \@@startlink[1]{}%" write$ newline$ + "\providecommand \@@endlink[0]{}%" write$ newline$ } FUNCTION {init.bib.namefont} @@ -2683,15 +3459,18 @@ FUNCTION {init.bib} { warn.bib "\makeatletter" write$ newline$ - "\providecommand \@ifxundefined [1]{%" write$ newline$ - " \ifx #1\undefined \expandafter \@firstoftwo" write$ newline$ - " \else \expandafter \@secondoftwo" write$ newline$ - "\fi" write$ newline$ + "\providecommand \@ifxundefined [1]{%" write$ newline$ + " \@ifx{#1\undefined}" write$ newline$ "}%" write$ newline$ "\providecommand \@ifnum [1]{%" write$ newline$ " \ifnum #1\expandafter \@firstoftwo" write$ newline$ " \else \expandafter \@secondoftwo" write$ newline$ - "\fi" write$ newline$ + " \fi" write$ newline$ + "}%" write$ newline$ + "\providecommand \@ifx [1]{%" write$ newline$ + " \ifx #1\expandafter \@firstoftwo" write$ newline$ + " \else \expandafter \@secondoftwo" write$ newline$ + " \fi" write$ newline$ "}%" write$ newline$ init.bib.ay init.bib.quote @@ -2709,7 +3488,8 @@ FUNCTION {init.bib} FUNCTION {begin.bib} { - id.bst duplicate$ top$ "%" swap$ * write$ newline$ + id.bst diagn.cmntlog + control.bib preamble$ empty$ 'skip$ { preamble$ write$ newline$ } @@ -2722,8 +3502,11 @@ FUNCTION {begin.bib} } EXECUTE {begin.bib} + EXECUTE {init.state.consts} + ITERATE {call.type$} + FUNCTION {end.bib} { newline$ "\end{thebibliography}%" @@ -2731,6 +3514,7 @@ FUNCTION {end.bib} } EXECUTE {end.bib} + %% End of customized bst file %% %% End of file `aipauth4-1.bst'. |