diff options
author | Karl Berry <karl@freefriends.org> | 2018-07-04 21:25:46 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-07-04 21:25:46 +0000 |
commit | f21cb173e4a42219a48195c2a268320d358c5894 (patch) | |
tree | 179d6d888ced3d473e51c1c64afb0ee9ea3299b0 /Master/texmf-dist/bibtex | |
parent | a2dda8b02b5516aca742efff690705ee720d810a (diff) |
elsarticle (4jul18)
git-svn-id: svn://tug.org/texlive/trunk@48134 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/bibtex')
3 files changed, 1548 insertions, 1428 deletions
diff --git a/Master/texmf-dist/bibtex/bst/elsarticle/elsarticle-harv.bst b/Master/texmf-dist/bibtex/bst/elsarticle/elsarticle-harv.bst index fb668b8f85e..ff7a583bad7 100644 --- a/Master/texmf-dist/bibtex/bst/elsarticle/elsarticle-harv.bst +++ b/Master/texmf-dist/bibtex/bst/elsarticle/elsarticle-harv.bst @@ -1,5 +1,7 @@ +%% +%% This is file `elsarticle-harv.bst' (Version 2.1), %% -%% Copyright 2007, 2008, 2009 Elsevier Ltd +%% Copyright 2009-2018 Elsevier Ltd %% %% This file is part of the 'Elsarticle Bundle'. %% --------------------------------------------- @@ -10,46 +12,19 @@ %% 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. +%% +%% $Id: elsarticle-harv.bst 116 2018-06-29 04:55:48Z rishi $ +%% +%% $URL: http://lenova.river-valley.com/svn/elsarticle/trunk/elsarticle-harv.bst $ %% -%% The list of all files belonging to the 'Elsarticle Bundle' is -%% given in the file `manifest.txt'. -%% - - %%------------------------------------------------------------------- - %% 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 edition editor howpublished @@ -66,28 +41,42 @@ ENTRY series title type - url volume year + url + doi + eprint + pubmed } {} { label extra.label sort.label short.list } INTEGERS { output.state before.all mid.sentence after.sentence after.block } +STRINGS { urlprefix doiprefix eprintprefix pubmedprefix } + +FUNCTION {init.web.variables} +{ + "\URLprefix " 'urlprefix := + "\DOIprefix" 'doiprefix := + "\ArXivprefix " 'eprintprefix := + "\Pubmedprefix " 'pubmedprefix := +} + FUNCTION {init.state.consts} { #0 'before.all := #1 'mid.sentence := #2 'after.sentence := #3 'after.block := } - -STRINGS { s t } - +STRINGS { s t} +FUNCTION {output.comma} +{ ", " * write$} + FUNCTION {output.nonnull} { 's := output.state mid.sentence = - { ", " * write$ } + { ". " * write$ } { output.state after.block = { add.period$ write$ newline$ @@ -95,6 +84,26 @@ FUNCTION {output.nonnull} } { output.state before.all = 'write$ + { ", " * write$ } + if$ + } + if$ + mid.sentence 'output.state := + } + if$ + s +} +FUNCTION {output.commanull} +{ 's := + output.state mid.sentence = + { ", " * write$ } + { output.state after.block = + { ", " * write$ + newline$ + "\newblock " write$ + } + { output.state before.all = + 'write$ { add.period$ " " * write$ } if$ } @@ -104,14 +113,12 @@ FUNCTION {output.nonnull} if$ s } - FUNCTION {output} { duplicate$ empty$ 'pop$ 'output.nonnull if$ } - FUNCTION {output.check} { 't := duplicate$ empty$ @@ -119,7 +126,13 @@ FUNCTION {output.check} 'output.nonnull if$ } - +FUNCTION {output.book.check} +{ 't := + duplicate$ empty$ + { pop$ "empty " t * " in " * cite$ * warning$ } + 'output.nonnull + if$ +} FUNCTION {fin.entry} { add.period$ write$ @@ -132,7 +145,6 @@ FUNCTION {new.block} { after.block 'output.state := } if$ } - FUNCTION {new.sentence} { output.state after.block = 'skip$ @@ -143,16 +155,13 @@ FUNCTION {new.sentence} } if$ } - -%%SP 2003/07/25 -%% No longer used FUNCTION {add.blank} { " " * before.all 'output.state := } FUNCTION {date.block} { - new.sentence + new.block } FUNCTION {not} @@ -160,19 +169,16 @@ FUNCTION {not} { #1 } if$ } - FUNCTION {and} { 'skip$ { pop$ #0 } if$ } - FUNCTION {or} { { pop$ #1 } 'skip$ if$ } - FUNCTION {new.block.checkb} { empty$ swap$ empty$ @@ -181,26 +187,34 @@ FUNCTION {new.block.checkb} 'new.block if$ } - FUNCTION {field.or.null} { duplicate$ empty$ { pop$ "" } 'skip$ if$ } - FUNCTION {emphasize} -{ skip$ } +{ 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 + % 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"} @@ -217,16 +231,16 @@ FUNCTION {bbl.edby} { "edited by" } FUNCTION {bbl.edition} -{ "Edition" } +{ "ed." } FUNCTION {bbl.volume} -{ "Vol." } +{ "volume" } FUNCTION {bbl.of} { "of" } FUNCTION {bbl.number} -{ "no." } +{ "number" } FUNCTION {bbl.nr} { "no." } @@ -241,10 +255,10 @@ FUNCTION {bbl.page} { "p." } FUNCTION {bbl.chapter} -{ "Ch." } +{ "chapter" } FUNCTION {bbl.techrep} -{ "Tech. Rep." } +{ "Technical Report" } FUNCTION {bbl.mthesis} { "Master's thesis" } @@ -252,77 +266,29 @@ FUNCTION {bbl.mthesis} 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" } +MACRO {jan} {"January"} -FUNCTION {bbl.nd} -{ "nd" } +MACRO {feb} {"February"} -FUNCTION {bbl.rd} -{ "rd" } +MACRO {mar} {"March"} -FUNCTION {bbl.th} -{ "th" } - -MACRO {jan} {"Jan."} - -MACRO {feb} {"Feb."} - -MACRO {mar} {"Mar."} - -MACRO {apr} {"Apr."} +MACRO {apr} {"April"} MACRO {may} {"May"} -MACRO {jun} {"Jun."} +MACRO {jun} {"June"} -MACRO {jul} {"Jul."} +MACRO {jul} {"July"} -MACRO {aug} {"Aug."} +MACRO {aug} {"August"} -MACRO {sep} {"Sep."} +MACRO {sep} {"September"} -MACRO {oct} {"Oct."} +MACRO {oct} {"October"} -MACRO {nov} {"Nov."} +MACRO {nov} {"November"} -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 {dec} {"December"} MACRO {acmcs} {"ACM Comput. Surv."} @@ -334,12 +300,12 @@ MACRO {ibmjrd} {"IBM J. Res. Dev."} MACRO {ibmsj} {"IBM Syst.~J."} -MACRO {ieeese} {"IEEE Trans. Softw. Eng."} +MACRO {ieeese} {"IEEE Trans. Software Eng."} MACRO {ieeetc} {"IEEE Trans. Comput."} MACRO {ieeetcad} - {"IEEE Trans. Comput.-Aided Design Integrated Circuits"} + {"IEEE Trans. Comput. Aid. Des."} MACRO {ipl} {"Inf. Process. Lett."} @@ -347,7 +313,7 @@ MACRO {jacm} {"J.~ACM"} MACRO {jcss} {"J.~Comput. Syst. Sci."} -MACRO {scp} {"Sci. Comput. Programming"} +MACRO {scp} {"Sci. Comput. Program."} MACRO {sicomp} {"SIAM J. Comput."} @@ -355,34 +321,71 @@ MACRO {tocs} {"ACM Trans. Comput. Syst."} MACRO {tods} {"ACM Trans. Database Syst."} -MACRO {tog} {"ACM Trans. Gr."} +MACRO {tog} {"ACM Trans. Graphic."} -MACRO {toms} {"ACM Trans. Math. Softw."} +MACRO {toms} {"ACM Trans. Math. Software"} MACRO {toois} {"ACM Trans. Office Inf. Syst."} -MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."} +MACRO {toplas} {"ACM Trans. Progr. Lang. Syst."} -MACRO {tcs} {"Theoretical Comput. Sci."} +MACRO {tcs} {"Theor. Comput. Sci."} -FUNCTION {write.url} -{ url empty$ - { skip$ } - { "\newline\urlprefix\url{" url * "}" * write$ newline$ } +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$ + pop$ + } + if$ + } if$ } +STRINGS { bibinfo} + INTEGERS { nameptr namesleft numnames } FUNCTION {format.names} -{ 's := +{ 'bibinfo := + duplicate$ empty$ 'skip$ { + 's := + "" 't := #1 'nameptr := s num.names$ 'numnames := numnames 'namesleft := { namesleft #0 > } { s nameptr - "{vv~}{ll}{, jj}{, f.}" format.name$ - 't := + "{vv~}{ll}{, jj}{, f{.}.}" + format.name$ + bibinfo bibinfo.check + 't := nameptr #1 > { namesleft #1 > @@ -408,9 +411,12 @@ FUNCTION {format.names} namesleft #1 - 'namesleft := } while$ + } if$ } FUNCTION {format.names.ed} -{ format.names } +{ + format.names +} FUNCTION {format.key} { empty$ { key field.or.null } @@ -419,36 +425,31 @@ FUNCTION {format.key} } 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 * ")" * } +{ author "author" format.names + duplicate$ empty$ 'skip$ + { collaboration "collaboration" bibinfo.check + duplicate$ empty$ 'skip$ + { " (" swap$ * ")" * } if$ + * } if$ } -FUNCTION {format.in.editors} -{ editor empty$ - { "" } - { editor format.names.ed - editor num.names$ #1 > - { " (" * bbl.editors * ")" * } - { " (" * bbl.editor * ")" * } - 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 + capitalize + "(" swap$ * ")" * + * } if$ } - FUNCTION {format.note} { note empty$ @@ -463,21 +464,21 @@ FUNCTION {format.note} change.case$ } if$ - note #2 global.max$ substring$ * + note #2 global.max$ substring$ * "note" bibinfo.check } if$ } FUNCTION {format.title} -{ title empty$ - { "" } - { title "t" change.case$ - } +{ 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 := @@ -490,10 +491,6 @@ FUNCTION {format.full.names} namesleft #1 > { ", " * t * } { - numnames #2 > - { "," * } - 'skip$ - if$ s nameptr "{ll}" format.name$ duplicate$ "others" = { 't := } { pop$ } @@ -502,7 +499,8 @@ FUNCTION {format.full.names} { " " * bbl.etal * } - { bbl.and + { + bbl.and space.word * t * } if$ @@ -610,145 +608,82 @@ FUNCTION {n.dashify} } FUNCTION {word.in} -{ bbl.in capitalize +{ bbl.in %capitalize ":" * " " * } FUNCTION {format.date} -{ year duplicate$ empty$ - { "empty year in " cite$ * "; set to ????" * warning$ - pop$ "????" } - 'skip$ - if$ - month empty$ - 'skip$ - { month - " " * swap$ * +{ year "year" bibinfo.check duplicate$ empty$ + { } + 'skip$ if$ extra.label * before.all 'output.state := ", " swap$ * } - FUNCTION {format.btitle} -{ title -} - -FUNCTION {tie.or.space.connect} -{ duplicate$ text.length$ #3 < - { "~" } - { " " } +{ title "title" bibinfo.check + duplicate$ empty$ 'skip$ + { + } 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 * } + { 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.connect - series empty$ - { "there's a number but no series in " cite$ * warning$ } - { bbl.in space.word * series * } - if$ + number tie.or.space.prefix "number" bibinfo.check * * + bbl.in space.word * + series "series" bibinfo.check * } 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$ +{ 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 := @@ -768,52 +703,58 @@ FUNCTION {multi.page.check} while$ multiresult } +%FUNCTION {format.pages} +%{ pages duplicate$ empty$ 'skip$ +% { duplicate$ multi.page.check +% { +% n.dashify +% } +% { +% } +% if$ +% "pages" bibinfo.check +% } +% if$ +%} 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 } +{ 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 empty$ - 'skip$ - { duplicate$ empty$ - { pop$ format.pages } +{ pages duplicate$ empty$ 'pop$ + { swap$ duplicate$ empty$ + { pop$ pop$ format.pages } { ", " * - pages n.dashify * + swap$ + n.dashify + "pages" bibinfo.check + * } if$ } if$ } - -%%SP 2001/01/23 -%% Only used in articles FUNCTION {format.vol.num.pages} -{ -%%SP 2001/01/23 -%% Add the leading space only if there is a volume - %% volume field.or.null - " " - volume empty$ - { pop$ "" } - { volume * } - if$ - number empty$ - 'skip$ +{ volume field.or.null + duplicate$ empty$ 'skip$ { - "~(" number * ")" * * - volume empty$ - { "there's a number but no volume in " cite$ * warning$ } - 'skip$ - if$ + "volume" bibinfo.check } if$ } @@ -823,70 +764,79 @@ FUNCTION {format.chapter.pages} { "" } { type empty$ { bbl.chapter } - { type "l" change.case$ } + { type "l" change.case$ + "type" bibinfo.check + } if$ - chapter tie.or.space.connect + chapter tie.or.space.prefix + "chapter" bibinfo.check + * * } if$ } +FUNCTION {format.booktitle} +{ + booktitle "booktitle" bibinfo.check +} FUNCTION {format.in.ed.booktitle} -{ booktitle empty$ - { "" } - { editor empty$ - { word.in booktitle * } - { word.in format.in.editors * ", " * - 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 empty$ - 'skip$ - { pop$ - type "t" change.case$ +{ type duplicate$ empty$ + 'pop$ + { swap$ pop$ + "t" change.case$ "type" bibinfo.check } if$ } - FUNCTION {format.tr.number} -{ type empty$ - { bbl.techrep } - 'type +{ number "number" bibinfo.check + type duplicate$ empty$ + { pop$ bbl.techrep } + 'skip$ if$ - number empty$ - { "t" change.case$ } - { number tie.or.space.connect } + "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 empty$ +{ volume duplicate$ empty$ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ - word.in + pop$ word.in } - { bbl.volume capitalize - volume tie.or.space.connect - bbl.of space.word * + { 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 := "" @@ -894,69 +844,118 @@ FUNCTION {format.org.or.pub} 'skip$ { t empty$ - { address empty$ - 'skip$ - { address * } - if$ + { address "address" bibinfo.check * } { t * address empty$ 'skip$ - { ", " * address * } + { ", " * address "address" bibinfo.check * } if$ } if$ } if$ } - FUNCTION {format.publisher.address} -{ publisher empty$ - { "empty publisher in " cite$ * warning$ - "" - } - { publisher } - if$ - format.org.or.pub +{ publisher "publisher" bibinfo.check format.org.or.pub } FUNCTION {format.organization.address} -{ organization empty$ - { "" } - { organization } +{ organization "organization" bibinfo.check format.org.or.pub +} + +FUNCTION {print.url} + {url duplicate$ empty$ + { pop$ "" } + { new.sentence + urlprefix "\url{" * swap$ * "}" * + } + if$ + } + +FUNCTION {print.doi} + {doi duplicate$ empty$ + { pop$ "" } + { new.sentence + doiprefix "\doi{" * swap$ * "}" * + } + if$ + } + +FUNCTION {print.eprint} + {eprint duplicate$ empty$ + { pop$ "" } + { new.sentence + duplicate$ "\href{http://arxiv.org/abs/" swap$ * "}{{\tt arXiv:" * swap$ * "}}" * } + if$ + } + +FUNCTION {print.pubmed} + {pubmed duplicate$ empty$ + { pop$ "" } + { new.sentence + pubmedprefix "\Pubmed{" * swap$ * "}" * + } + if$ + } + +FUNCTION {webpage} +{ "%Type = Webpage" write$ + output.bibitem + format.authors "author" output.check + author format.key output + author empty$ + { + format.title "title" output.check + new.block + format.date "year" output.check + date.block + } + { + format.date "year" output.check + date.block + format.title "title" output.check + new.block +} if$ - format.org.or.pub + print.url output + fin.entry } + FUNCTION {article} -{ output.bibitem +{ "%Type = Article" write$ + 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 + new.block crossref missing$ - { journal + { + journal + "journal" bibinfo.check "journal" output.check -%%SP 2001/01/23 -%% Add the space in format.vol.num.pages - %% add.blank - before.all 'output.state := + add.blank format.vol.num.pages output } { format.article.crossref output.nonnull - format.pages output } if$ format.journal.pages + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output format.note output fin.entry - write.url } FUNCTION {book} -{ output.bibitem +{ "%Type = Book" write$ + output.bibitem author empty$ { format.editors "author and editor" output.check editor format.key output @@ -972,40 +971,50 @@ FUNCTION {book} date.block format.btitle "title" output.check crossref missing$ - { format.edition output - new.sentence - format.bvolume output + { format.bvolume output + new.block format.number.series output + format.edition output new.sentence format.publisher.address output } { - new.sentence + new.block format.book.crossref output.nonnull } if$ + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output format.note output fin.entry - write.url } FUNCTION {booklet} -{ output.bibitem +{ "%Type = Booklet" write$ + output.bibitem format.authors output author format.key output format.date "year" output.check date.block format.title "title" output.check - new.sentence - howpublished output - address output + new.block + howpublished "howpublished" bibinfo.check output + address "address" bibinfo.check output + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output format.note output fin.entry - write.url } FUNCTION {inbook} -{ output.bibitem +{ "%Type = Inbook" write$ + output.bibitem author empty$ { format.editors "author and editor" output.check editor format.key output @@ -1020,217 +1029,258 @@ FUNCTION {inbook} format.date "year" output.check date.block format.btitle "title" output.check + format.edition output crossref missing$ { - format.edition output - new.sentence + format.publisher.address output 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 } { format.chapter.pages "chapter and pages" output.check - new.sentence + new.block format.book.crossref output.nonnull } if$ format.pages "pages" output.check + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output format.note output fin.entry - write.url } FUNCTION {incollection} -{ output.bibitem +{ "%Type = Incollection" write$ + output.bibitem format.authors "author" output.check author format.key output format.date "year" output.check date.block - format.title "title" output.check + format.title "title" output.book.check new.sentence crossref missing$ - { format.in.ed.booktitle "booktitle" output.check + { format.in.ed.booktitle "booktitle" output.book.check format.edition output - new.sentence + format.publisher.address output format.bvolume output format.number.series output - new.sentence - format.publisher.address output format.chapter.pages output + new.sentence } { format.incoll.inproc.crossref output.nonnull format.chapter.pages output } if$ format.pages "pages" output.check + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output format.note output fin.entry - write.url } FUNCTION {inproceedings} -{ output.bibitem +{ "%Type = Inproceedings" write$ + output.bibitem format.authors "author" output.check author format.key output format.date "year" output.check date.block - format.title "title" output.check + format.title "title" output.book.check new.sentence crossref missing$ { format.in.ed.booktitle "booktitle" output.check - format.edition output - new.sentence - format.bvolume output - format.number.series output new.sentence publisher empty$ { format.organization.address output } - { organization output + { organization "organization" bibinfo.check output format.publisher.address output } if$ -%%SP 2001/01/23 -%% format.pages output +% format.bvolume output +% format.number.series output +% format.pages output } { format.incoll.inproc.crossref output.nonnull -%%SP 2001/01/23 -%% format.pages output + format.pages output } if$ -%%SP 2001/01/23 format.pages "pages" output.check + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output format.note output fin.entry - write.url } FUNCTION {conference} { inproceedings } FUNCTION {manual} -{ output.bibitem +{ "%Type = Manual" write$ + output.bibitem format.authors output author format.key output format.date "year" output.check date.block format.btitle "title" output.check - new.sentence - organization output - address output format.edition output + organization address new.block.checkb + organization "organization" bibinfo.check output + address "address" bibinfo.check output + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output format.note output fin.entry - write.url } FUNCTION {mastersthesis} -{ output.bibitem +{ "%Type = Masterthesis" write$ + 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.btitle + "title" output.check + new.block bbl.mthesis format.thesis.type output.nonnull - school "school" output.check - address output + school "school" bibinfo.warn output + address "address" bibinfo.check output + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output format.note output fin.entry - write.url } FUNCTION {misc} -{ output.bibitem +{ "%Type = Misc" write$ + output.bibitem format.authors output author format.key output format.date "year" output.check date.block format.title output - new.sentence - howpublished output + new.block + howpublished "howpublished" bibinfo.check output + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output format.note output fin.entry - write.url } FUNCTION {phdthesis} -{ output.bibitem +{ "%Type = Phdthesis" write$ + 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.btitle + "title" output.check + new.block bbl.phdthesis format.thesis.type output.nonnull - school "school" output.check - address output + school "school" bibinfo.warn output + address "address" bibinfo.check output + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output format.note output fin.entry - write.url } FUNCTION {proceedings} -{ output.bibitem +{ "%Type = Proceedings" write$ + output.bibitem format.editors output editor format.key output format.date "year" output.check date.block format.btitle "title" output.check - new.sentence format.bvolume output format.number.series output new.sentence publisher empty$ { format.organization.address output } - { organization output + { organization "organization" bibinfo.check output format.publisher.address output } if$ + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output format.note output fin.entry - write.url } FUNCTION {techreport} -{ output.bibitem +{ "%Type = Techreport" write$ + 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.btitle + "title" output.check + new.block format.tr.number output.nonnull - institution "institution" output.check - address output + institution "institution" bibinfo.warn output + address "address" bibinfo.check output + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output format.note output fin.entry - write.url } FUNCTION {unpublished} -{ output.bibitem +{ "%Type = Unpublished" write$ + 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 + print.url output + print.doi output + print.eprint output + print.pubmed output 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 := @@ -1239,9 +1289,9 @@ FUNCTION {chop.word} 's if$ } - FUNCTION {format.lab.names} { 's := + "" 't := s #1 "{vv~}{ll}" format.name$ s num.names$ duplicate$ #2 > @@ -1320,7 +1370,8 @@ FUNCTION {calc.label} "(" * year duplicate$ empty$ - { pop$ "????" } + short.list key field.or.null = or + { pop$ "" } 'skip$ if$ * @@ -1335,7 +1386,7 @@ FUNCTION {sort.format.names} numnames 'namesleft := { namesleft #0 > } { s nameptr - "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" + "{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't := nameptr #1 > { @@ -1363,7 +1414,6 @@ FUNCTION {sort.format.title} sortify #1 global.max$ substring$ } - FUNCTION {author.sort} { author empty$ { key empty$ @@ -1376,7 +1426,6 @@ FUNCTION {author.sort} { author sort.format.names } if$ } - FUNCTION {author.editor.sort} { author empty$ { editor empty$ @@ -1393,7 +1442,6 @@ FUNCTION {author.editor.sort} { author sort.format.names } if$ } - FUNCTION {editor.sort} { editor empty$ { key empty$ @@ -1406,7 +1454,6 @@ FUNCTION {editor.sort} { editor sort.format.names } if$ } - FUNCTION {presort} { calc.label label sortify @@ -1436,20 +1483,15 @@ FUNCTION {presort} } 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 := @@ -1462,7 +1504,6 @@ FUNCTION {forward.pass} if$ number.label #1 + 'number.label := } - FUNCTION {reverse.pass} { next.extra "b" = { "a" 'extra.label := } @@ -1472,18 +1513,15 @@ FUNCTION {reverse.pass} extra.label duplicate$ empty$ 'skip$ - { "{\natexlab{" swap$ * "}}" * } +% { "{\natexlab{" swap$ * "}}" * } + { "" 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 " " @@ -1498,11 +1536,8 @@ FUNCTION {bib.sort.order} #1 entry.max$ substring$ 'sort.key$ := } - ITERATE {bib.sort.order} - SORT - FUNCTION {begin.bib} { preamble$ empty$ 'skip$ @@ -1512,26 +1547,51 @@ FUNCTION {begin.bib} write$ newline$ "\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi" write$ newline$ - "\expandafter\ifx\csname url\endcsname\relax" + "\providecommand{\url}[1]{\texttt{#1}}" write$ newline$ - " \def\url#1{\texttt{#1}}\fi" + "\providecommand{\href}[2]{#2}" write$ newline$ - "\expandafter\ifx\csname urlprefix\endcsname\relax\def\urlprefix{URL }\fi" + "\providecommand{\path}[1]{#1}" + write$ newline$ + "\providecommand{\DOIprefix}{doi:}" + write$ newline$ + "\providecommand{\ArXivprefix}{arXiv:}" + write$ newline$ + "\providecommand{\URLprefix}{URL: }" + write$ newline$ + "\providecommand{\Pubmedprefix}{pmid:}" + write$ newline$ + "\providecommand{\doi}[1]{\href{http://dx.doi.org/#1}{\path{#1}}}" + write$ newline$ + "\providecommand{\Pubmed}[1]{\href{pmid:#1}{\path{#1}}}" + write$ newline$ + "\providecommand{\bibinfo}[2]{#2}" + write$ newline$ + "\ifx\xfnm\relax \def\xfnm[#1]{\unskip,\space#1}\fi" write$ newline$ } - EXECUTE {begin.bib} - EXECUTE {init.state.consts} - +EXECUTE {init.web.variables} ITERATE {call.type$} - FUNCTION {end.bib} { newline$ "\end{thebibliography}" write$ newline$ } - EXECUTE {end.bib} %% End of customized bst file %% %% End of file `elsarticle-harv.bst'. +%% +%% Change log: +%% ----------- +%% 22.04.2011 +%% +%% 10.08.2012 +%% a. doi, url, eprint, pmid added +%% b. Bibtype `webpage' defined +%% +%% 30.08.2012 +%% a. collaboration added. +%% + diff --git a/Master/texmf-dist/bibtex/bst/elsarticle/elsarticle-num-names.bst b/Master/texmf-dist/bibtex/bst/elsarticle/elsarticle-num-names.bst index 51a4a3cb343..5ed53b22b9d 100644 --- a/Master/texmf-dist/bibtex/bst/elsarticle/elsarticle-num-names.bst +++ b/Master/texmf-dist/bibtex/bst/elsarticle/elsarticle-num-names.bst @@ -1,5 +1,7 @@ +%% +%% This is file `elsarticle-num-names.bst' (Version 2.1), %% -%% Copyright 2007, 2008, 2009 Elsevier Ltd +%% Copyright 2009-2018 Elsevier Ltd %% %% This file is part of the 'Elsarticle Bundle'. %% --------------------------------------------- @@ -10,131 +12,119 @@ %% 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. -%% -%% The list of all files belonging to the 'Elsarticle Bundle' is -%% given in the file `manifest.txt'. -%% %% -%% This is file `elsearticle-num-names.bst', -%% generated with the docstrip utility. +%% $Id: elsarticle-num-names.bst 117 2018-06-29 04:56:59Z rishi $ %% -%% The original source files were: +%% $URL: http://lenova.river-valley.com/svn/elsarticle/trunk/elsarticle-num-names.bst $ %% -%% merlin.mbs (with options: `head,exlang,ay,nat,seq-no,nm-init,ed-au,dt-jnl,dt-end,atit-u,jttl-rm,vnum-sp,volp-blk,jdt-p,pp-last,num-xser,jnm-x,btit-rm,bt-rm,bkpg-x,isbn,issn,doi,edpar,bkedcap,blk-com,in-col,english,ppx,ed,abr,xedn,varand,xand,url,url-blk,bibinfo,nfss,,{}') -%% english.mbs (with options: `exlang,ay,nat,seq-no,nm-init,ed-au,dt-jnl,dt-end,atit-u,jttl-rm,vnum-sp,volp-blk,jdt-p,pp-last,num-xser,jnm-x,btit-rm,bt-rm,bkpg-x,isbn,issn,doi,edpar,bkedcap,blk-com,in-col,english,ppx,ed,abr,xedn,varand,xand,url,url-blk,bibinfo,nfss,,{}') -%% merlin.mbs (with options: `tail,exlang,ay,nat,seq-no,nm-init,ed-au,dt-jnl,dt-end,atit-u,jttl-rm,vnum-sp,volp-blk,jdt-p,pp-last,num-xser,jnm-x,btit-rm,bt-rm,bkpg-x,isbn,issn,doi,edpar,bkedcap,blk-com,in-col,english,ppx,ed,abr,xedn,varand,xand,url,url-blk,bibinfo,nfss,,{}') -%% ---------------------------------------- -%% *** Journal of Sound and Vibration *** %% -%% 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 - %------------------------------------------------------------------- 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 } + { address + author + booktitle + chapter + collaboration + edition + editor + howpublished + institution + journal + key + month + note + number + organization + pages + publisher + school + series + title + type + volume + year + url + doi + eprint + pubmed + } + {} + { label extra.label sort.label short.list } + INTEGERS { output.state before.all mid.sentence after.sentence after.block } + +STRINGS { urlprefix doiprefix eprintprefix pubmedprefix } + +FUNCTION {init.web.variables} +{ + "\URLprefix " 'urlprefix := + "\DOIprefix" 'doiprefix := + "\ArXivprefix " 'eprintprefix := + "\Pubmedprefix " 'pubmedprefix := +} + FUNCTION {init.state.consts} { #0 'before.all := - #1 'mid.sentence := - #2 'after.sentence := - #3 'after.block := + #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 + output.state mid.sentence = + { ", " * write$ } + { output.state after.block = +% { add.period$ write$ + { ", " * 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$ + 'pop$ + 'output.nonnull + if$ } FUNCTION {output.check} { 't := - duplicate$ empty$ - { pop$ "empty " t * " in " * cite$ * warning$ } - 'output.nonnull - if$ + duplicate$ empty$ + { pop$ "empty " t * " in " * cite$ * warning$ } + 'output.nonnull + if$ } FUNCTION {fin.entry} { add.period$ - write$ - newline$ + write$ + newline$ } FUNCTION {new.block} { output.state before.all = - 'skip$ - { after.block 'output.state := } - if$ + '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$ + 'skip$ + { output.state before.all = + 'skip$ + { after.sentence 'output.state := } + if$ + } + if$ } FUNCTION {add.blank} { " " * before.all 'output.state := @@ -142,50 +132,50 @@ FUNCTION {add.blank} FUNCTION {date.block} { - skip$ + skip$ } FUNCTION {not} { { #0 } - { #1 } - if$ + { #1 } + if$ } FUNCTION {and} { 'skip$ - { pop$ #0 } - if$ + { pop$ #0 } + if$ } FUNCTION {or} { { pop$ #1 } - 'skip$ - if$ + 'skip$ + if$ } FUNCTION {new.block.checkb} { empty$ - swap$ empty$ - and - 'skip$ - 'new.block - if$ + swap$ empty$ + and + 'skip$ + 'new.block + if$ } FUNCTION {field.or.null} { duplicate$ empty$ - { pop$ "" } - 'skip$ - if$ + { pop$ "" } + 'skip$ + if$ } FUNCTION {emphasize} { duplicate$ empty$ - { pop$ "" } - { "\emph{" swap$ * "}" * } - if$ + { pop$ "" } + { "\textit{" swap$ * "}" * } + if$ } FUNCTION {tie.or.space.prefix} { duplicate$ text.length$ #3 < - { "~" } - { " " } - if$ - swap$ + { "~" } + { " " } + if$ + swap$ } FUNCTION {capitalize} @@ -195,10 +185,6 @@ 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{english.mbs}[2003/11/06 4.2 (PWD)] - % The language selected here is ENGLISH FUNCTION {bbl.and} { "and"} @@ -216,16 +202,16 @@ FUNCTION {bbl.edby} { "edited by" } FUNCTION {bbl.edition} -{ "edn." } +{ "ed." } FUNCTION {bbl.volume} -{ "vol." } +{ "volume" } FUNCTION {bbl.of} { "of" } FUNCTION {bbl.number} -{ "no." } +{ "number" } FUNCTION {bbl.nr} { "no." } @@ -234,16 +220,16 @@ FUNCTION {bbl.in} { "in" } FUNCTION {bbl.pages} -{ "" } +{ "pp." } FUNCTION {bbl.page} -{ "" } +{ "p." } FUNCTION {bbl.chapter} -{ "chap." } +{ "chapter" } FUNCTION {bbl.techrep} -{ "Tech. Rep." } +{ "Technical Report" } FUNCTION {bbl.mthesis} { "Master's thesis" } @@ -251,237 +237,219 @@ FUNCTION {bbl.mthesis} FUNCTION {bbl.phdthesis} { "Ph.D. thesis" } -MACRO {jan} {"Jan."} +MACRO {jan} {"January"} -MACRO {feb} {"Feb."} +MACRO {feb} {"February"} -MACRO {mar} {"Mar."} +MACRO {mar} {"March"} -MACRO {apr} {"Apr."} +MACRO {apr} {"April"} MACRO {may} {"May"} -MACRO {jun} {"Jun."} +MACRO {jun} {"June"} -MACRO {jul} {"Jul."} +MACRO {jul} {"July"} -MACRO {aug} {"Aug."} +MACRO {aug} {"August"} -MACRO {sep} {"Sep."} +MACRO {sep} {"September"} -MACRO {oct} {"Oct."} +MACRO {oct} {"October"} -MACRO {nov} {"Nov."} +MACRO {nov} {"November"} -MACRO {dec} {"Dec."} +MACRO {dec} {"December"} - % End module: english.mbs -%% Copyright 1994-2004 Patrick W Daly -MACRO {acmcs} {"ACM Computing Surveys"} +MACRO {acmcs} {"ACM Comput. Surv."} -MACRO {acta} {"Acta Informatica"} +MACRO {acta} {"Acta Inf."} -MACRO {cacm} {"Communications of the ACM"} +MACRO {cacm} {"Commun. ACM"} -MACRO {ibmjrd} {"IBM Journal of Research and Development"} +MACRO {ibmjrd} {"IBM J. Res. Dev."} -MACRO {ibmsj} {"IBM Systems Journal"} +MACRO {ibmsj} {"IBM Syst.~J."} -MACRO {ieeese} {"IEEE Transactions on Software Engineering"} +MACRO {ieeese} {"IEEE Trans. Software Eng."} -MACRO {ieeetc} {"IEEE Transactions on Computers"} +MACRO {ieeetc} {"IEEE Trans. Comput."} MACRO {ieeetcad} - {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"} + {"IEEE Trans. Comput. Aid. Des."} -MACRO {ipl} {"Information Processing Letters"} +MACRO {ipl} {"Inf. Process. Lett."} -MACRO {jacm} {"Journal of the ACM"} +MACRO {jacm} {"J.~ACM"} -MACRO {jcss} {"Journal of Computer and System Sciences"} +MACRO {jcss} {"J.~Comput. Syst. Sci."} -MACRO {scp} {"Science of Computer Programming"} +MACRO {scp} {"Sci. Comput. Program."} -MACRO {sicomp} {"SIAM Journal on Computing"} +MACRO {sicomp} {"SIAM J. Comput."} -MACRO {tocs} {"ACM Transactions on Computer Systems"} +MACRO {tocs} {"ACM Trans. Comput. Syst."} -MACRO {tods} {"ACM Transactions on Database Systems"} +MACRO {tods} {"ACM Trans. Database Syst."} -MACRO {tog} {"ACM Transactions on Graphics"} +MACRO {tog} {"ACM Trans. Graphic."} -MACRO {toms} {"ACM Transactions on Mathematical Software"} +MACRO {toms} {"ACM Trans. Math. Software"} -MACRO {toois} {"ACM Transactions on Office Information Systems"} +MACRO {toois} {"ACM Trans. Office Inf. Syst."} -MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"} +MACRO {toplas} {"ACM Trans. Progr. Lang. Syst."} + +MACRO {tcs} {"Theor. Comput. Sci."} -MACRO {tcs} {"Theoretical Computer Science"} FUNCTION {bibinfo.check} { swap$ - duplicate$ missing$ - { - pop$ pop$ - "" - } - { duplicate$ empty$ - { - swap$ pop$ - } - { swap$ - "\bibinfo{" swap$ * "}{" * swap$ * "}" * - } - if$ - } - if$ + 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$ -} -FUNCTION {format.url} -{ url empty$ - { "" } - { "\urlprefix\url{" url * "}" * } - if$ + 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 - "{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 * - } - { " " * t * } - if$ - } - if$ - } - 't - if$ - nameptr #1 + 'nameptr := - namesleft #1 - 'namesleft := - } - while$ - } if$ + 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 * + } + { " " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ + } if$ } FUNCTION {format.names.ed} { - format.names + format.names } FUNCTION {format.key} { empty$ - { key field.or.null } - { "" } - if$ + { key field.or.null } + { "" } + if$ } +%FUNCTION {format.authors} +%{ author "author" format.names +%} + 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 - 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$ * "}" * + " " * + 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$ + { "" } + { 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$ + { "t" change.case$ } + if$ + "title" bibinfo.check } + FUNCTION {format.full.names} {'s := "" 't := @@ -593,869 +561,974 @@ FUNCTION {output.bibitem} 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$ + '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 * + { + "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$ * ")" * + { "empty year in " cite$ * + "; set to ????" * + warning$ + pop$ "????" + } + { + } + if$ + extra.label * + " (" swap$ * ")" * } FUNCTION {format.btitle} { title "title" bibinfo.check - duplicate$ empty$ 'skip$ - { - } - if$ + duplicate$ empty$ 'skip$ + { + } + if$ } FUNCTION {either.or.check} { empty$ - 'pop$ - { "can't use both " swap$ * " fields in " * cite$ * warning$ } - if$ + '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$ + { "" } + { 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$ + { 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$ + { + 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 + #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$ + { 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 } - { - " " * - 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$ + { 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$ - 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$ * + duplicate$ empty$ 'skip$ + { + "volume" bibinfo.check + } + if$ + format.year * } 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$ + { "" } + { 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 + 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$ + { + 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$ + '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$ + 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 * "}" * + 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 * "}" * + { "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 * "}" * + 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$ + "" + 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 +{ publisher "publisher" bibinfo.check 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.title "title" output.check - crossref missing$ - { - journal - "journal" bibinfo.check - "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.issn output - 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 +FUNCTION {print.url} + {url duplicate$ empty$ + { pop$ "" } + { new.sentence + urlprefix "\url{" * swap$ * "}" * } - { format.authors output.nonnull - crossref missing$ - { "author and editor" editor either.or.check } - 'skip$ - if$ + if$ + } + +FUNCTION {print.doi} + {doi duplicate$ empty$ + { pop$ "" } + { new.sentence + doiprefix "\doi{" * swap$ * "}" * } - if$ - format.btitle "title" output.check - crossref missing$ - { format.bvolume output - format.number.series output - format.publisher.address output + if$ + } + +FUNCTION {print.eprint} + {eprint duplicate$ empty$ + { pop$ "" } + { new.sentence + duplicate$ "\href{http://arxiv.org/abs/" swap$ * "}{{\tt arXiv:" * swap$ * "}}" * } - { - format.book.crossref output.nonnull + if$ + } + +FUNCTION {print.pubmed} + {pubmed duplicate$ empty$ + { pop$ "" } + { new.sentence + pubmedprefix "\Pubmed{" * swap$ * "}" * } - if$ - format.edition output - format.isbn output - format.doi output - format.url output - format.note output - format.date "year" output.check - fin.entry + if$ + } + +FUNCTION {webpage} +{ "%Type = Webpage" write$ + output.bibitem + format.authors "author" output.check + author format.key output + author empty$ + { + format.title "title" output.check + new.block + format.date "year" output.check + date.block + } + { + format.date "year" output.check + date.block + format.title "title" output.check + new.block +} + if$ + print.url output + fin.entry +} + + +FUNCTION {article} +{ "%Type = Article" write$ + 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 + "journal" output.check + add.blank + format.vol.num.pages output + } + { format.article.crossref output.nonnull + } + if$ + format.journal.pages + new.sentence + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} +FUNCTION {book} +{ "%Type = Book" write$ + 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.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.date "year" output.check + new.sentence + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry } FUNCTION {booklet} -{ output.bibitem - format.authors output - author format.key output - format.title "title" output.check - howpublished "howpublished" bibinfo.check output - address "address" bibinfo.check output - format.isbn output - format.doi output - format.url output - format.note output - format.date "year" output.check - fin.entry +{ "%Type = Booklet" write$ + output.bibitem + format.authors output + author format.key output + format.title "title" output.check + howpublished "howpublished" bibinfo.check output + address "address" bibinfo.check output + format.date "year" output.check + new.sentence + print.url output + print.doi output + print.eprint output + print.pubmed 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.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 - crossref missing$ - { format.isbn output } - 'skip$ - if$ - format.pages "pages" output.check - format.doi output - format.url output - format.note output - format.date "year" output.check - fin.entry +{ "%Type = Inbook" write$ + 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.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.date "year" output.check + format.pages "pages" output.check + new.sentence + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry } FUNCTION {incollection} -{ output.bibitem - format.authors "author" output.check - author format.key output - 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.isbn 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 - format.date "year" output.check - fin.entry +{ "%Type = Incollection" write$ + 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.edition output + format.publisher.address output + } + { format.incoll.inproc.crossref output.nonnull + } + if$ + format.date "year" output.check + format.pages "pages" output.check + new.sentence + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry } FUNCTION {inproceedings} -{ output.bibitem - format.authors "author" output.check - author format.key output - 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.isbn output - format.issn output - } - { format.incoll.inproc.crossref output.nonnull - } - if$ - format.pages "pages" output.check - format.doi output - format.url output - format.note output - format.date "year" output.check - fin.entry +{ "%Type = Inproceedings" write$ + 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 + 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 output + format.pages "pages" output.check + new.sentence + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry } FUNCTION {conference} { inproceedings } FUNCTION {manual} -{ output.bibitem - format.authors output - author format.key output - 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 - format.date "year" output.check - fin.entry +{ "%Type = Manual" write$ + output.bibitem + format.authors output + author format.key output + format.btitle "title" output.check + format.edition output + organization "organization" bibinfo.check output + address "address" bibinfo.check output + format.date "year" output.check + new.sentence + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry } FUNCTION {mastersthesis} -{ output.bibitem - format.authors "author" output.check - author format.key output - 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 - format.date "year" output.check - fin.entry +{ "%Type = Masterthesis" write$ + output.bibitem + format.authors "author" output.check + author format.key output + 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 + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry } FUNCTION {misc} -{ output.bibitem - format.authors output - author format.key output - format.title output - howpublished "howpublished" bibinfo.check output - format.doi output - format.url output - format.note output - format.date "year" output.check - fin.entry +{ "%Type = Misc" write$ + output.bibitem + format.authors output + author format.key output + format.title output + howpublished "howpublished" bibinfo.check output + format.date "year" output.check + new.sentence + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry } FUNCTION {phdthesis} -{ output.bibitem - format.authors "author" output.check - author format.key output - 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 - format.date "year" output.check - fin.entry +{ "%Type = Phdthesis" write$ + output.bibitem + format.authors "author" output.check + author format.key output + 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 + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry } FUNCTION {proceedings} -{ output.bibitem - format.editors output - editor format.key output - 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.url output - format.note output - format.date "year" output.check - fin.entry +{ "%Type = Proceedings" write$ + output.bibitem + format.editors output + editor format.key output + 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 + new.sentence + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry } FUNCTION {techreport} -{ output.bibitem - format.authors "author" output.check - author format.key output - format.title - "title" output.check - format.tr.number output.nonnull - institution "institution" bibinfo.warn output - address "address" bibinfo.check output - format.doi output - format.url output - format.note output - format.date "year" output.check - fin.entry +{ "%Type = Techreport" write$ + output.bibitem + format.authors "author" output.check + author format.key output + format.btitle + "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 + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry } FUNCTION {unpublished} -{ output.bibitem - format.authors "author" output.check - author format.key output - format.title "title" output.check - format.doi output - format.url output - format.note "note" output.check - format.date output - fin.entry +{ "%Type = Unpublished" write$ + output.bibitem + format.authors "author" output.check + author format.key output + format.title "title" output.check + format.date "year" output.check + new.sentence + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note "note" output.check + fin.entry } FUNCTION {default.type} { misc } READ FUNCTION {sortify} { purify$ - "l" change.case$ + "l" change.case$ } INTEGERS { len } FUNCTION {chop.word} { 's := - 'len := - s #1 len substring$ = - { s len #1 + global.max$ substring$ } - 's - if$ + '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$ + "" '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$ + { 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$ + { 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$ + { 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 := + 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$ "????" } - { purify$ #-1 #4 substring$ } - if$ - * - 'label := + short.list + "(" + * + year duplicate$ empty$ + { pop$ "????" } + { purify$ #-1 #4 substring$ } + 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$ + #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$ + "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$ + { 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$ + { 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$ -} -INTEGERS { seq.num } -FUNCTION {init.seq} -{ #0 'seq.num :=} -EXECUTE {init.seq} -FUNCTION {int.to.fix} -{ "000000000" swap$ int.to.str$ * - #-1 #10 substring$ + { 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 - " " - * - seq.num #1 + 'seq.num := - seq.num int.to.fix - 'sort.label := - sort.label - * - " " - * - title field.or.null - sort.format.title - * - #1 entry.max$ substring$ - 'sort.key$ := + 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 +%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 := + "" '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 := + { 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 := + { "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$ := + " " + * + year field.or.null sortify + * + " " + * + title field.or.null + sort.format.title + * + #1 entry.max$ substring$ + 'sort.key$ := } ITERATE {bib.sort.order} -SORT +%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}[1]{doi:\discretionary{}{}{}\begingroup \urlstyle{rm}\url{#1}\endgroup}\fi" - write$ newline$ - "\providecommand{\bibinfo}[2]{#2}" - write$ newline$ + '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$ + "\providecommand{\url}[1]{\texttt{#1}}" + write$ newline$ + "\providecommand{\href}[2]{#2}" + write$ newline$ + "\providecommand{\path}[1]{#1}" + write$ newline$ + "\providecommand{\DOIprefix}{doi:}" + write$ newline$ + "\providecommand{\ArXivprefix}{arXiv:}" + write$ newline$ + "\providecommand{\URLprefix}{URL: }" + write$ newline$ + "\providecommand{\Pubmedprefix}{pmid:}" + write$ newline$ + "\providecommand{\doi}[1]{\href{http://dx.doi.org/#1}{\path{#1}}}" + write$ newline$ + "\providecommand{\Pubmed}[1]{\href{pmid:#1}{\path{#1}}}" + write$ newline$ + "\providecommand{\bibinfo}[2]{#2}" + write$ newline$ + "\ifx\xfnm\relax \def\xfnm[#1]{\unskip,\space#1}\fi" + write$ newline$ } EXECUTE {begin.bib} EXECUTE {init.state.consts} +EXECUTE {init.web.variables} ITERATE {call.type$} FUNCTION {end.bib} { newline$ - "\end{thebibliography}" write$ newline$ + "\end{thebibliography}" write$ newline$ } EXECUTE {end.bib} %% End of customized bst file %% -%% %% End of file `elsarticle-num-names.bst'. +%% +%% +%% Change log: +%% ----------- +%% 22.04.2011 +%% +%% 10.08.2012 +%% a. doi, url, eprint, pmid added +%% b. Bibtype `webpage' defined +%% +%% 30.08.2012 +%% a. collaboration added. + diff --git a/Master/texmf-dist/bibtex/bst/elsarticle/elsarticle-num.bst b/Master/texmf-dist/bibtex/bst/elsarticle/elsarticle-num.bst index 0257b4fe747..bc70da91225 100644 --- a/Master/texmf-dist/bibtex/bst/elsarticle/elsarticle-num.bst +++ b/Master/texmf-dist/bibtex/bst/elsarticle/elsarticle-num.bst @@ -1,5 +1,7 @@ +%% +%% This is file `elsarticle-num.bst' (Version 2.1), %% -%% Copyright 2007, 2008, 2009 Elsevier Ltd +%% Copyright 2007-2018 Elsevier Ltd %% %% This file is part of the 'Elsarticle Bundle'. %% --------------------------------------------- @@ -11,27 +13,11 @@ %% and version 1.2 or later is part of all distributions of LaTeX %% version 1999/12/01 or later. %% -%% The list of all files belonging to the 'Elsarticle Bundle' is -%% given in the file `manifest.txt'. %% -%%% Modification of BibTeX style file elsarticle-num.bst -%%% ... by urlbst, version 0.6 (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 hyperref support. -%%% Original headers follow... - -%% -%% This is file `elsarticle-num.bst', -%% generated with the docstrip utility. -%% -%% The original source files were: +%% $Id: elsarticle-num.bst 118 2018-06-29 04:58:02Z rishi $ +%% +%% $URL: http://lenova.river-valley.com/svn/elsarticle/trunk/elsarticle-num.bst $ %% -%% merlin.mbs (with options: `,seq-no,nm-init,ed-au,dt-end,yr-par,yrp-x,jttl-rm,thtit-a,vnum-sp,volp-blk,jdt-p,pp-last,jnm-x,btit-rm,bt-rm,pub-date,pub-xpar,pre-edn,url,url-nl,edpar,blk-com,in-col,pp,ed,abr,ednx,ord,jabr,and-xcom,xand,em-x,nfss') -%% After docstrip generation some manual changes were made (SP) - %% ---------------------------------------- ENTRY @@ -74,7 +60,7 @@ 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 + "https://doi.org/" 'doiurl := % prefix to make URL from DOI "doi:" 'doiprefix := % text prefix printed before DOI ref #1 'addeprints := % 0=no eprints; 1=include eprints #1 'adddoiresolver := % 0=no DOI resolver; 1=include it @@ -1515,3 +1501,4 @@ EXECUTE {end.bib} %% End of customized bst file %% %% End of file `elsarticle-num.bst'. + |