From: Kahina Guidouche Date: Tue, 20 Oct 2015 07:46:34 +0000 (+0200) Subject: onjour je viens de rajouter quelques fichiers X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/kahina_paper1.git/commitdiff_plain/a601f08e009efccb69bc30f54a76342afca25273?ds=inline;hp=-c onjour je viens de rajouter quelques fichiers --- a601f08e009efccb69bc30f54a76342afca25273 diff --git a/elsarticle-num.bst b/elsarticle-num.bst new file mode 100644 index 0000000..24654f1 --- /dev/null +++ b/elsarticle-num.bst @@ -0,0 +1,1507 @@ +%% +%% This is file `elsarticle-num.bst', +%% +%% Copyright 2007, 2008, 2009 Elsevier Ltd +%% +%% This file is part of the 'Elsarticle Bundle'. +%% --------------------------------------------- +%% +%% It may be distributed under the conditions of the LaTeX Project Public +%% License, either version 1.2 of this license or (at your option) any +%% later version. The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.2 or later is part of all distributions of LaTeX +%% version 1999/12/01 or later. +%% +%% The list of all files belonging to the 'Elsarticle Bundle' is +%% given in the file `manifest.txt'. +%% +%% +%% $Id: elsarticle-num.bst 19 2009-12-17 07:07:52Z rishi $ +%% +%% +%% ---------------------------------------- +%% +ENTRY + { address + author + booktitle + chapter + edition + editor + howpublished + institution + journal + key + month + note + number + organization + pages + publisher + school + series + title + type + volume + year + eprint % urlbst + doi % urlbst + url % urlbst + lastchecked % urlbst + } + {} + { label } + +INTEGERS { output.state before.all mid.sentence after.sentence after.block } + +STRINGS { urlintro eprinturl eprintprefix doiprefix doiurl openinlinelink closeinlinelink } % urlbst... +INTEGERS { hrefform inlinelinks makeinlinelink addeprints adddoiresolver } +FUNCTION {init.urlbst.variables} +{ + "Available from: " 'urlintro := % prefix before URL + "http://arxiv.org/abs/" 'eprinturl := % prefix to make URL from eprint ref + "arXiv:" 'eprintprefix := % text prefix printed before eprint ref + "http://dx.doi.org/" 'doiurl := % prefix to make URL from DOI + "doi:" 'doiprefix := % text prefix printed before DOI ref + #1 'addeprints := % 0=no eprints; 1=include eprints + #1 'adddoiresolver := % 0=no DOI resolver; 1=include it + #2 'hrefform := % 0=no crossrefs; 1=hypertex xrefs; 2=hyperref refs + #1 'inlinelinks := % 0=URLs explicit; 1=URLs attached to titles + % the following are internal state variables, not config constants + #0 'makeinlinelink := % state variable managed by setup.inlinelink + "" 'openinlinelink := % ditto + "" 'closeinlinelink := % ditto +} +INTEGERS { + bracket.state + outside.brackets + open.brackets + within.brackets + close.brackets +} +FUNCTION {init.state.consts} +{ #0 'outside.brackets := % urlbst + #1 'open.brackets := + #2 'within.brackets := + #3 'close.brackets := + + #0 'before.all := + #1 'mid.sentence := + #2 'after.sentence := + #3 'after.block := +} + +STRINGS { s t } + +FUNCTION {output.nonnull.original} +{ 's := + output.state mid.sentence = + { ", " * write$ } + { output.state after.block = + { add.period$ write$ + newline$ + "\newblock " write$ + } + { output.state before.all = + 'write$ + { add.period$ " " * write$ } + if$ + } + if$ + mid.sentence 'output.state := + } + if$ + s +} + +FUNCTION {setup.inlinelink} +{ makeinlinelink + { hrefform #1 = % hypertex + { "\special {html: }{" * 'openinlinelink := + "\special {html:}" 'closeinlinelink := + } + { hrefform #2 = % hyperref + { "\href{" url * "}{" * 'openinlinelink := + "}" 'closeinlinelink := + } + 'skip$ + if$ % hrefform #2 = + } + if$ % hrefform #1 = + #0 'makeinlinelink := + } + 'skip$ + if$ % makeinlinelink +} +FUNCTION {add.inlinelink} +{ openinlinelink empty$ + 'skip$ + { openinlinelink swap$ * closeinlinelink * + "" 'openinlinelink := + } + if$ +} +FUNCTION {output.nonnull} +{ % Save the thing we've been asked to output + 's := + % If the bracket-state is close.brackets, then add a close-bracket to + % what is currently at the top of the stack, and set bracket.state + % to outside.brackets + bracket.state close.brackets = + { "]" * + outside.brackets 'bracket.state := + } + 'skip$ + if$ + bracket.state outside.brackets = + { % We're outside all brackets -- this is the normal situation. + % Write out what's currently at the top of the stack, using the + % original output.nonnull function. + s + add.inlinelink + output.nonnull.original % invoke the original output.nonnull + } + { % Still in brackets. Add open-bracket or (continuation) comma, add the + % new text (in s) to the top of the stack, and move to the close-brackets + % state, ready for next time (unless inbrackets resets it). If we come + % into this branch, then output.state is carefully undisturbed. + bracket.state open.brackets = + { " [" * } + { ", " * } % bracket.state will be within.brackets + if$ + s * + close.brackets 'bracket.state := + } + if$ +} + +FUNCTION {inbrackets} +{ bracket.state close.brackets = + { within.brackets 'bracket.state := } % reset the state: not open nor closed + { open.brackets 'bracket.state := } + if$ +} + +FUNCTION {format.lastchecked} +{ lastchecked empty$ + { "" } + { inbrackets "cited " lastchecked * } + if$ +} + +FUNCTION {output} +{ duplicate$ empty$ + 'pop$ + 'output.nonnull + if$ +} + +FUNCTION {output.check} +{ 't := + duplicate$ empty$ + { pop$ "empty " t * " in " * cite$ * warning$ } + 'output.nonnull + if$ +} + +FUNCTION {fin.entry.original} +{ add.period$ + write$ + newline$ +} + +FUNCTION {new.block} +{ output.state before.all = + 'skip$ + { after.block 'output.state := } + if$ +} + +FUNCTION {new.sentence} +{ output.state after.block = + 'skip$ + { output.state before.all = + 'skip$ + { after.sentence 'output.state := } + if$ + } + if$ +} + +FUNCTION {add.blank} +{ " " * before.all 'output.state := +} + +FUNCTION {date.block} +{ + add.blank +} + +FUNCTION {not} +{ { #0 } + { #1 } + if$ +} + +FUNCTION {and} +{ 'skip$ + { pop$ #0 } + if$ +} + +FUNCTION {or} +{ { pop$ #1 } + 'skip$ + if$ +} + +FUNCTION {new.block.checka} +{ empty$ + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.block.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.sentence.checka} +{ empty$ + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {new.sentence.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {field.or.null} +{ duplicate$ empty$ + { pop$ "" } + 'skip$ + if$ +} + +FUNCTION {emphasize} +{ skip$ } + +FUNCTION {capitalize} +{ "u" change.case$ "t" change.case$ } + +FUNCTION {space.word} +{ " " swap$ * " " * } + + % Here are the language-specific definitions for explicit words. + % Each function has a name bbl.xxx where xxx is the English word. + % The language selected here is ENGLISH +FUNCTION {bbl.and} +{ "and"} + +FUNCTION {bbl.etal} +{ "et~al." } + +FUNCTION {bbl.editors} +{ "Eds." } + +FUNCTION {bbl.editor} +{ "Ed." } + +FUNCTION {bbl.edby} +{ "edited by" } + +FUNCTION {bbl.edition} +{ "Edition" } + +FUNCTION {bbl.volume} +{ "Vol." } + +FUNCTION {bbl.of} +{ "of" } + +FUNCTION {bbl.number} +{ "no." } + +FUNCTION {bbl.nr} +{ "no." } + +FUNCTION {bbl.in} +{ "in" } + +FUNCTION {bbl.pages} +{ "pp." } + +FUNCTION {bbl.page} +{ "p." } + +FUNCTION {bbl.chapter} +{ "Ch." } + +FUNCTION {bbl.techrep} +{ "Tech. Rep." } + +FUNCTION {bbl.mthesis} +{ "Master's thesis" } + +FUNCTION {bbl.phdthesis} +{ "Ph.D. thesis" } + +FUNCTION {bbl.first} +{ "1st" } + +FUNCTION {bbl.second} +{ "2nd" } + +FUNCTION {bbl.third} +{ "3rd" } + +FUNCTION {bbl.fourth} +{ "4th" } + +FUNCTION {bbl.fifth} +{ "5th" } + +FUNCTION {bbl.st} +{ "st" } + +FUNCTION {bbl.nd} +{ "nd" } + +FUNCTION {bbl.rd} +{ "rd" } + +FUNCTION {bbl.th} +{ "th" } + +MACRO {jan} {"Jan."} + +MACRO {feb} {"Feb."} + +MACRO {mar} {"Mar."} + +MACRO {apr} {"Apr."} + +MACRO {may} {"May"} + +MACRO {jun} {"Jun."} + +MACRO {jul} {"Jul."} + +MACRO {aug} {"Aug."} + +MACRO {sep} {"Sep."} + +MACRO {oct} {"Oct."} + +MACRO {nov} {"Nov."} + +MACRO {dec} {"Dec."} + +FUNCTION {eng.ord} +{ duplicate$ "1" swap$ * + #-2 #1 substring$ "1" = + { bbl.th * } + { duplicate$ #-1 #1 substring$ + duplicate$ "1" = + { pop$ bbl.st * } + { duplicate$ "2" = + { pop$ bbl.nd * } + { "3" = + { bbl.rd * } + { bbl.th * } + if$ + } + if$ + } + if$ + } + if$ +} + +MACRO {acmcs} {"ACM Comput. Surv."} + +MACRO {acta} {"Acta Inf."} + +MACRO {cacm} {"Commun. ACM"} + +MACRO {ibmjrd} {"IBM J. Res. Dev."} + +MACRO {ibmsj} {"IBM Syst.~J."} + +MACRO {ieeese} {"IEEE Trans. Softw. Eng."} + +MACRO {ieeetc} {"IEEE Trans. Comput."} + +MACRO {ieeetcad} + {"IEEE Trans. Comput.-Aided Design Integrated Circuits"} + +MACRO {ipl} {"Inf. Process. Lett."} + +MACRO {jacm} {"J.~ACM"} + +MACRO {jcss} {"J.~Comput. Syst. Sci."} + +MACRO {scp} {"Sci. Comput. Programming"} + +MACRO {sicomp} {"SIAM J. Comput."} + +MACRO {tocs} {"ACM Trans. Comput. Syst."} + +MACRO {tods} {"ACM Trans. Database Syst."} + +MACRO {tog} {"ACM Trans. Gr."} + +MACRO {toms} {"ACM Trans. Math. Softw."} + +MACRO {toois} {"ACM Trans. Office Inf. Syst."} + +MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."} + +MACRO {tcs} {"Theoretical Comput. Sci."} + +FUNCTION {write.url} +{ url empty$ + { skip$ } + { "\newline\urlprefix\url{" url * "}" * write$ newline$ } + if$ +} + +INTEGERS { nameptr namesleft numnames } + +FUNCTION {format.names} +{ 's := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{f.~}{vv~}{ll}{, jj}" format.name$ + 't := + nameptr #1 > + { + namesleft #1 > + { ", " * t * } + { + "," * + s nameptr "{ll}" format.name$ duplicate$ "others" = + { 't := } + { pop$ } + if$ + t "others" = + { + " " * bbl.etal * + } + { " " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} +FUNCTION {format.names.ed} +{ format.names } +FUNCTION {format.authors} +{ author empty$ + { "" } + { author format.names } + if$ +} + +FUNCTION {format.editors} +{ editor empty$ + { "" } + { editor format.names + editor num.names$ #1 > + { " (" * bbl.editors * ")" * } + { " (" * bbl.editor * ")" * } + if$ + } + if$ +} + +FUNCTION {format.in.editors} +{ editor empty$ + { "" } + { editor format.names.ed + editor num.names$ #1 > + { " (" * bbl.editors * ")" * } + { " (" * bbl.editor * ")" * } + if$ + } + if$ +} + +FUNCTION {format.note} +{ + note empty$ + { "" } + { note #1 #1 substring$ + duplicate$ "{" = + 'skip$ + { output.state mid.sentence = + { "l" } + { "u" } + if$ + change.case$ + } + if$ + note #2 global.max$ substring$ * + } + if$ +} + +FUNCTION {format.title} +{ title empty$ + { "" } + { title "t" change.case$ + } + if$ +} + +FUNCTION {output.bibitem.original} +{ newline$ + "\bibitem{" write$ + cite$ write$ + "}" write$ + newline$ + "" + before.all 'output.state := +} + +FUNCTION {n.dashify} +{ + 't := + "" + { t empty$ not } + { t #1 #1 substring$ "-" = + { t #1 #2 substring$ "--" = not + { "--" * + t #2 global.max$ substring$ 't := + } + { { t #1 #1 substring$ "-" = } + { "-" * + t #2 global.max$ substring$ 't := + } + while$ + } + if$ + } + { t #1 #1 substring$ * + t #2 global.max$ substring$ 't := + } + if$ + } + while$ +} + +FUNCTION {word.in} +{ bbl.in + ":" * + " " * } + +FUNCTION {format.date} +{ year empty$ + { month empty$ + { "" } + { "there's a month but no year in " cite$ * warning$ + month + } + if$ + } + { month empty$ + 'year + { month " " * year * } + if$ + } + if$ + duplicate$ empty$ + 'skip$ + { + before.all 'output.state := + " (" swap$ * ")" * + } + if$ +} + +FUNCTION{format.year} +{ year duplicate$ empty$ + { "empty year in " cite$ * warning$ pop$ "" } + { "(" swap$ * ")" * } + if$ +} + +FUNCTION {format.btitle} +{ title +} + +FUNCTION {tie.or.space.connect} +{ duplicate$ text.length$ #3 < + { "~" } + { " " } + if$ + swap$ * * +} + +FUNCTION {either.or.check} +{ empty$ + 'pop$ + { "can't use both " swap$ * " fields in " * cite$ * warning$ } + if$ +} + +FUNCTION {format.bvolume} +{ volume empty$ + { "" } + { bbl.volume volume tie.or.space.connect + series empty$ + 'skip$ + { bbl.of space.word * series emphasize * } + if$ + "volume and number" number either.or.check + } + if$ +} + +FUNCTION {format.number.series} +{ volume empty$ + { number empty$ + { series field.or.null } + { output.state mid.sentence = + { bbl.number } + { bbl.number capitalize } + if$ + number tie.or.space.connect + series empty$ + { "there's a number but no series in " cite$ * warning$ } + { bbl.in space.word * series * } + if$ + } + if$ + } + { "" } + if$ +} + +FUNCTION {is.num} +{ chr.to.int$ + duplicate$ "0" chr.to.int$ < not + swap$ "9" chr.to.int$ > not and +} + +FUNCTION {extract.num} +{ duplicate$ 't := + "" 's := + { t empty$ not } + { t #1 #1 substring$ + t #2 global.max$ substring$ 't := + duplicate$ is.num + { s swap$ * 's := } + { pop$ "" 't := } + if$ + } + while$ + s empty$ + 'skip$ + { pop$ s } + if$ +} + +FUNCTION {convert.edition} +{ edition extract.num "l" change.case$ 's := + s "first" = s "1" = or + { bbl.first 't := } + { s "second" = s "2" = or + { bbl.second 't := } + { s "third" = s "3" = or + { bbl.third 't := } + { s "fourth" = s "4" = or + { bbl.fourth 't := } + { s "fifth" = s "5" = or + { bbl.fifth 't := } + { s #1 #1 substring$ is.num + { s eng.ord 't := } + { edition 't := } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + t +} + +FUNCTION {format.edition} +{ edition empty$ + { "" } + { output.state mid.sentence = + { convert.edition "l" change.case$ " " * bbl.edition * } + { convert.edition "t" change.case$ " " * bbl.edition * } + if$ + } + if$ +} + +INTEGERS { multiresult } + +FUNCTION {multi.page.check} +{ 't := + #0 'multiresult := + { multiresult not + t empty$ not + and + } + { t #1 #1 substring$ + duplicate$ "-" = + swap$ duplicate$ "," = + swap$ "+" = + or or + { #1 'multiresult := } + { t #2 global.max$ substring$ 't := } + if$ + } + while$ + multiresult +} + +FUNCTION {format.pages} +{ pages empty$ + { "" } + { pages multi.page.check + { bbl.pages pages n.dashify tie.or.space.connect } + { bbl.page pages tie.or.space.connect } + if$ + } + if$ +} + +FUNCTION {format.journal.pages} +{ pages empty$ + 'skip$ + { duplicate$ empty$ + { pop$ format.pages } + { + " " * + format.year * " " * + pages n.dashify * + } + if$ + } + if$ +} + +FUNCTION {format.vol.num.pages} +{ + % volume field.or.null + " " + volume empty$ + { pop$ "" } + { volume * } + if$ + number empty$ + 'skip$ + { + "~(" number * ")" * * + volume empty$ + { "there's a number but no volume in " cite$ * warning$ } + 'skip$ + if$ + } + if$ +} + +FUNCTION {format.chapter.pages} +{ chapter empty$ + { "" } + { type empty$ + { bbl.chapter } + { type "l" change.case$ } + if$ + chapter tie.or.space.connect + } + if$ +} + +FUNCTION {format.in.ed.booktitle} +{ booktitle empty$ + { "" } + { editor empty$ + { word.in booktitle * } + { word.in format.in.editors * ", " * + booktitle * } + if$ + } + if$ +} + +FUNCTION {empty.misc.check} +{ author empty$ title empty$ howpublished empty$ + month empty$ year empty$ note empty$ + and and and and and + { "all relevant fields are empty in " cite$ * warning$ } + 'skip$ + if$ +} + +FUNCTION {format.thesis.type} +{ type empty$ + 'skip$ + { pop$ + type "t" change.case$ + } + if$ +} + +FUNCTION {format.tr.number} +{ type empty$ + { bbl.techrep } + 'type + if$ + number empty$ + { "t" change.case$ } + { number tie.or.space.connect } + if$ +} + +FUNCTION {format.article.crossref} +{ + key empty$ + { journal empty$ + { "need key or journal for " cite$ * " to crossref " * crossref * + warning$ + "" + } + { word.in journal emphasize * } + if$ + } + { word.in key * " " *} + if$ + " \cite{" * crossref * "}" * +} + +FUNCTION {format.crossref.editor} +{ editor #1 "{vv~}{ll}" format.name$ + editor num.names$ duplicate$ + #2 > + { pop$ + " " * bbl.etal * + } + { #2 < + 'skip$ + { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = + { + " " * bbl.etal * + } + { bbl.and space.word * editor #2 "{vv~}{ll}" format.name$ + * } + if$ + } + if$ + } + if$ +} + +FUNCTION {format.book.crossref} +{ volume empty$ + { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ + word.in + } + { bbl.volume volume tie.or.space.connect + bbl.of space.word * + } + if$ + editor empty$ + editor field.or.null author field.or.null = + or + { key empty$ + { series empty$ + { "need editor, key, or series for " cite$ * " to crossref " * + crossref * warning$ + "" * + } + { series emphasize * } + if$ + } + { key * } + if$ + } + { format.crossref.editor * } + if$ + " \cite{" * crossref * "}" * +} + +FUNCTION {format.incoll.inproc.crossref} +{ + editor empty$ + editor field.or.null author field.or.null = + or + { key empty$ + { booktitle empty$ + { "need editor, key, or booktitle for " cite$ * " to crossref " * + crossref * warning$ + "" + } + { word.in booktitle * } + if$ + } + { word.in key * " " *} + if$ + } + { word.in format.crossref.editor * " " *} + if$ + " \cite{" * crossref * "}" * +} + +FUNCTION {format.org.or.pub} +{ 't := + "" + year empty$ + { "empty year in " cite$ * warning$ } + 'skip$ + if$ + address empty$ t empty$ and + year empty$ and + 'skip$ + { + t empty$ + { address empty$ + 'skip$ + { address * } + if$ + } + { t * + address empty$ + 'skip$ + { ", " * address * } + if$ + } + if$ + year empty$ + 'skip$ + { t empty$ address empty$ and + 'skip$ + { ", " * } + if$ + year * + } + if$ + } + if$ +} + +FUNCTION {format.publisher.address} +{ publisher empty$ + { "empty publisher in " cite$ * warning$ + "" + } + { publisher } + if$ + format.org.or.pub +} + +FUNCTION {format.organization.address} +{ organization empty$ + { "" } + { organization } + if$ + format.org.or.pub +} + +FUNCTION {make.href.null} +{ + pop$ +} +FUNCTION {make.href.hypertex} +{ + "\special {html: }" * swap$ * + "\special {html:}" * +} +FUNCTION {make.href.hyperref} +{ + "\href {" swap$ * "} {\path{" * swap$ * "}}" * +} +FUNCTION {make.href} +{ hrefform #2 = + 'make.href.hyperref % hrefform = 2 + { hrefform #1 = + 'make.href.hypertex % hrefform = 1 + 'make.href.null % hrefform = 0 (or anything else) + if$ + } + if$ +} + +FUNCTION {format.url} +{ inlinelinks #1 = url empty$ or + { "" } + { hrefform #1 = + { % special case -- add HyperTeX specials + urlintro "\url{" url * "}" * url make.href.hypertex * } + { urlintro "\url{" * url * "}" * } + if$ + } + if$ +} + +FUNCTION {format.eprint} +{ eprint empty$ + { "" } + { eprintprefix eprint * eprinturl eprint * make.href } + if$ +} + +FUNCTION {format.doi} +{ doi empty$ + { "" } + { doiprefix doi * doiurl doi * make.href } + if$ +} + +FUNCTION {output.url} +{ url empty$ + 'skip$ + { new.block + format.url output + format.lastchecked output + } + if$ +} + +FUNCTION {output.web.refs} +{ + new.block + output.url + addeprints eprint empty$ not and + { format.eprint output.nonnull } + 'skip$ + if$ + adddoiresolver doi empty$ not and + { format.doi output.nonnull } + 'skip$ + if$ +} + +FUNCTION {output.bibitem} +{ outside.brackets 'bracket.state := + output.bibitem.original + inlinelinks url empty$ not and + { #1 'makeinlinelink := } + { #0 'makeinlinelink := } + if$ +} + +FUNCTION {fin.entry} +{ output.web.refs % urlbst + makeinlinelink % ooops, it appears we didn't have a title for inlinelink + { setup.inlinelink % add some artificial link text here, as a fallback + "[link]" output.nonnull } + 'skip$ + if$ + bracket.state close.brackets = % urlbst + { "]" * } + 'skip$ + if$ + fin.entry.original +} + +FUNCTION {webpage} +{ output.bibitem + author empty$ + { editor empty$ + 'skip$ % author and editor both optional + { format.editors output.nonnull } + if$ + } + { editor empty$ + { format.authors output.nonnull } + { "can't use both author and editor fields in " cite$ * warning$ } + if$ + } + if$ + new.block + title empty$ 'skip$ 'setup.inlinelink if$ + format.title "title" output.check + inbrackets "online" output + new.block + year empty$ + 'skip$ + { format.date "year" output.check } + if$ + % We don't need to output the URL details ('lastchecked' and 'url'), + % because fin.entry does that for us, using output.web.refs. The only + % reason we would want to put them here is if we were to decide that + % they should go in front of the rather miscellaneous information in 'note'. + new.block + note output + fin.entry +} + +FUNCTION {article} +{ output.bibitem + format.authors "author" output.check + title empty$ 'skip$ 'setup.inlinelink if$ % urlbst + format.title "title" output.check + crossref missing$ + { journal + "journal" output.check + % add.blank + before.all 'output.state := + format.vol.num.pages output + } + { format.article.crossref output.nonnull + format.pages output + } + if$ + format.journal.pages + format.note output + fin.entry + write.url +} + +FUNCTION {book} +{ output.bibitem + author empty$ + { format.editors "author and editor" output.check + } + { format.authors output.nonnull + crossref missing$ + { "author and editor" editor either.or.check } + 'skip$ + if$ + } + if$ + title empty$ 'skip$ 'setup.inlinelink if$ % urlbst + format.btitle "title" output.check + crossref missing$ + { format.edition output + format.bvolume output + format.number.series output + format.publisher.address output + } + { + format.book.crossref output.nonnull + } + if$ + format.note output + fin.entry + write.url +} + +FUNCTION {booklet} +{ output.bibitem + format.authors output + title empty$ 'skip$ 'setup.inlinelink if$ % urlbst + format.title "title" output.check + howpublished output + address output + format.note output + format.date output + fin.entry + write.url +} + +FUNCTION {inbook} +{ output.bibitem + author empty$ + { format.editors "author and editor" output.check + } + { format.authors output.nonnull + crossref missing$ + { "author and editor" editor either.or.check } + 'skip$ + if$ + } + if$ + title empty$ 'skip$ 'setup.inlinelink if$ % urlbst + format.btitle "title" output.check + crossref missing$ + { + format.edition output + format.bvolume output + format.number.series output + format.publisher.address output + format.chapter.pages "chapter and pages" output.check + } + { + format.chapter.pages "chapter and pages" output.check + format.book.crossref output.nonnull + } + if$ + format.pages "pages" output.check + format.note output + fin.entry + write.url +} + +FUNCTION {incollection} +{ output.bibitem + format.authors "author" output.check + title empty$ 'skip$ 'setup.inlinelink if$ % urlbst + format.title "title" output.check + crossref missing$ + { format.in.ed.booktitle "booktitle" output.check + format.edition output + format.bvolume output + format.number.series output + format.publisher.address output + format.chapter.pages output + } + { format.incoll.inproc.crossref output.nonnull + format.chapter.pages output + } + if$ + format.pages "pages" output.check + format.note output + fin.entry + write.url +} + +FUNCTION {inproceedings} +{ output.bibitem + format.authors "author" output.check + title empty$ 'skip$ 'setup.inlinelink if$ % urlbst + format.title "title" output.check + crossref missing$ + { format.in.ed.booktitle "booktitle" output.check + format.edition output + format.bvolume output + format.number.series output + publisher empty$ + { format.organization.address output } + { organization output + format.publisher.address output + } + if$ + } + { format.incoll.inproc.crossref output.nonnull + } + if$ + format.pages "pages" output.check + format.note output + fin.entry + write.url +} + +FUNCTION {conference} { inproceedings } + +FUNCTION {manual} +{ output.bibitem + author empty$ + { organization empty$ + 'skip$ + { organization output.nonnull + address output + } + if$ + } + { format.authors output.nonnull } + if$ + title empty$ 'skip$ 'setup.inlinelink if$ % urlbst + format.btitle "title" output.check + author empty$ + { organization empty$ + { + address output + } + 'skip$ + if$ + } + { + organization output + address output + } + if$ + format.edition output + format.note output + format.date output + fin.entry + write.url +} + +FUNCTION {mastersthesis} +{ output.bibitem + format.authors "author" output.check + title empty$ 'skip$ 'setup.inlinelink if$ % urlbst + format.title "title" output.check + bbl.mthesis format.thesis.type output.nonnull + school "school" output.check + address output + format.note output + format.date "year" output.check + fin.entry + write.url +} + +FUNCTION {misc} +{ output.bibitem + format.authors output + title empty$ 'skip$ 'setup.inlinelink if$ % urlbst + format.title output + howpublished output + format.note output + format.date output + fin.entry + write.url + empty.misc.check +} + +FUNCTION {phdthesis} +{ output.bibitem + format.authors "author" output.check + title empty$ 'skip$ 'setup.inlinelink if$ % urlbst + format.title "title" output.check + bbl.phdthesis format.thesis.type output.nonnull + school "school" output.check + address output + format.note output + format.date "year" output.check + fin.entry + write.url +} + +FUNCTION {proceedings} +{ output.bibitem + editor empty$ + { organization output } + { format.editors output.nonnull } + if$ + title empty$ 'skip$ 'setup.inlinelink if$ % urlbst + format.btitle "title" output.check + format.bvolume output + format.number.series output + editor empty$ + { publisher empty$ + 'skip$ + { + format.publisher.address output + } + if$ + } + { publisher empty$ + { + format.organization.address output } + { + organization output + format.publisher.address output + } + if$ + } + if$ + format.note output + fin.entry + write.url +} + +FUNCTION {techreport} +{ output.bibitem + format.authors "author" output.check + title empty$ 'skip$ 'setup.inlinelink if$ % urlbst + format.title "title" output.check + format.tr.number output.nonnull + institution "institution" output.check + address output + format.note output + format.date "year" output.check + fin.entry + write.url +} + +FUNCTION {unpublished} +{ output.bibitem + format.authors "author" output.check + title empty$ 'skip$ 'setup.inlinelink if$ % urlbst + format.title "title" output.check + format.note "note" output.check + format.date output + fin.entry + write.url +} + +FUNCTION {default.type} { misc } + +READ + +STRINGS { longest.label } + +INTEGERS { number.label longest.label.width } + +FUNCTION {initialize.longest.label} +{ "" 'longest.label := + #1 'number.label := + #0 'longest.label.width := +} + +FUNCTION {longest.label.pass} +{ number.label int.to.str$ 'label := + number.label #1 + 'number.label := + label width$ longest.label.width > + { label 'longest.label := + label width$ 'longest.label.width := + } + 'skip$ + if$ +} + +EXECUTE {initialize.longest.label} + +ITERATE {longest.label.pass} + +FUNCTION {begin.bib} +{ preamble$ empty$ + 'skip$ + { preamble$ write$ newline$ } + if$ + "\begin{thebibliography}{" longest.label * "}" * + write$ newline$ + "\expandafter\ifx\csname url\endcsname\relax" + write$ newline$ + " \def\url#1{\texttt{#1}}\fi" + write$ newline$ + "\expandafter\ifx\csname urlprefix\endcsname\relax\def\urlprefix{URL }\fi" + write$ newline$ + "\expandafter\ifx\csname href\endcsname\relax" + write$ newline$ + " \def\href#1#2{#2} \def\path#1{#1}\fi" + write$ newline$ +} + +EXECUTE {begin.bib} + +EXECUTE {init.urlbst.variables} +EXECUTE {init.state.consts} + +ITERATE {call.type$} + +FUNCTION {end.bib} +{ newline$ + "\end{thebibliography}" write$ newline$ +} + +EXECUTE {end.bib} +%% End of customized bst file +%% +%% End of file `elsarticle-num.bst'. + + diff --git a/elsarticle-template.aux b/elsarticle-template.aux new file mode 100644 index 0000000..751cc5f --- /dev/null +++ b/elsarticle-template.aux @@ -0,0 +1,128 @@ +\relax +\providecommand\hyper@newdestlabel[2]{} +\providecommand\HyperFirstAtBeginDocument{\AtBeginDocument} +\HyperFirstAtBeginDocument{\ifx\hyper@anchor\@undefined +\global\let\oldcontentsline\contentsline +\gdef\contentsline#1#2#3#4{\oldcontentsline{#1}{#2}{#3}} +\global\let\oldnewlabel\newlabel +\gdef\newlabel#1#2{\newlabelxx{#1}#2} +\gdef\newlabelxx#1#2#3#4#5#6{\oldnewlabel{#1}{{#2}{#3}}} +\AtEndDocument{\ifx\hyper@anchor\@undefined +\let\contentsline\oldcontentsline +\let\newlabel\oldnewlabel +\fi} +\fi} +\global\let\hyper@last\relax +\gdef\HyperFirstAtBeginDocument#1{#1} +\providecommand*\HyPL@Entry[1]{} +\bibstyle{elsarticle-num} +\emailauthor{kahina.ghidouche@gmail.com}{Ghidouche Kahina\corref {mycorrespondingauthor}} +\emailauthor{raphael.couturier@univ-fcomte.fr}{Couturier Raphael\corref {mycorrespondingauthor}} +\emailauthor{ar.sider@univ-bejaia.dz}{Abderrahmane Sider\corref {mycorrespondingauthor}} +\HyPL@Entry{0<>} +\Newlabel{mycorrespondingauthor}{1} +\Newlabel{myfootnote}{1} +\Newlabel{mymainaddress}{a} +\Newlabel{mysecondaryaddress}{b} +\@writefile{toc}{\contentsline {section}{\numberline {1}Root finding problem}{1}{section.1}} +\citation{Weierstrass03} +\citation{Ilie50} +\citation{Docev62} +\citation{Durand60} +\citation{Kerner66} +\citation{Borch-Supan63} +\citation{Ehrlich67} +\citation{Aberth73} +\citation{Loizon83} +\citation{Freeman89} +\citation{Loizon83} +\citation{Freemanall90} +\citation{Raphaelall01} +\citation{CUDA10} +\citation{Kahinall14} +\@writefile{toc}{\contentsline {paragraph}{}{3}{section*.1}} +\citation{Aberth73} +\citation{Weierstrass03} +\citation{Aberth73} +\citation{Bini96} +\citation{Ostrowski41} +\@writefile{toc}{\contentsline {section}{\numberline {2}Aberth method}{4}{section.2}} +\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}Polynomials Initialization}{4}{subsection.2.1}} +\citation{Karimall98} +\@writefile{toc}{\contentsline {subsection}{\numberline {2.2}Vector $Z^{(0)}$ Initialization}{5}{subsection.2.2}} +\@writefile{toc}{\contentsline {subsection}{\numberline {2.3}Iterative Function $H_{i}$}{5}{subsection.2.3}} +\@writefile{toc}{\contentsline {subsection}{\numberline {2.4}Convergence condition}{5}{subsection.2.4}} +\@writefile{toc}{\contentsline {section}{\numberline {3}Amelioration of Aberth method }{5}{section.3}} +\citation{Karimall98} +\citation{Mirankar68,Mirankar71} +\citation{Schedler72} +\citation{Winogard72} +\citation{Benall68,Jana06,Janall99,Riceall06} +\citation{Azad07,Gemignani07,Kalantari08,Skachek08,Zhancall08,Zhuall08} +\citation{Bini04} +\citation{Cosnard90,Freeman89,Freemanall90,,Jana99,Janall99} +\citation{Freemanall90} +\citation{Mirankar71} +\@writefile{toc}{\contentsline {section}{\numberline {4}The implementation of simultaneous methods in a parallel computer}{6}{section.4}} +\citation{Kahinall14} +\citation{NVIDIA10} +\@writefile{toc}{\contentsline {section}{\numberline {5}A parallel implementation of Aberth method}{8}{section.5}} +\@writefile{toc}{\contentsline {subsection}{\numberline {5.1}Background on the GPU architecture}{8}{subsection.5.1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {5.2}Background on the CUDA Programming Model}{9}{subsection.5.2}} +\@writefile{toc}{\contentsline {subsection}{\numberline {5.3} The implementation of Aberth method on GPU}{10}{subsection.5.3}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {5.3.1}A sequential Aberth algorithm}{10}{subsubsection.5.3.1}} +\@writefile{loa}{\contentsline {algocf}{\numberline {1}{\ignorespaces Algorithm to find root polynomial with Aberth method}}{10}{algocf.1}} +\@writefile{toc}{\contentsline {paragraph}{The execution time}{11}{section*.2}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {5.3.2}Parallelize the steps on GPU }{12}{subsubsection.5.3.2}} +\@writefile{loa}{\contentsline {algocf}{\numberline {2}{\ignorespaces Algorithm to find root polynomial with Aberth method}}{13}{algocf.2}} +\@writefile{loa}{\contentsline {algocf}{\numberline {3}{\ignorespaces A global Algorithm for the iterative function}}{14}{algocf.3}} +\@writefile{toc}{\contentsline {subsection}{\numberline {5.4}Experimental study}{14}{subsection.5.4}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {5.4.1}Definition of the polynomial used}{14}{subsubsection.5.4.1}} +\bibdata{mybibfile} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {5.4.2}The study condition}{15}{subsubsection.5.4.2}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {5.4.3}Comparative study}{15}{subsubsection.5.4.3}} +\@writefile{lot}{\contentsline {table}{\numberline {1}{\ignorespaces the convergence of Aberth algorithm}}{15}{table.1}} +\newlabel{tab:theConvergenceOfAberthAlgorithm}{{1}{15}{the convergence of Aberth algorithm}{table.1}{}} +\@writefile{toc}{\contentsline {paragraph}{Aberth algorithm on CPU and GPU}{15}{table.1}} +\@writefile{toc}{\contentsline {paragraph}{The impact of the thread's number into the convergence of Aberth algorithm}{15}{table.2}} +\bibcite{Weierstrass03}{{1}{}{{}}{{}}} +\bibcite{Ilie50}{{2}{}{{}}{{}}} +\bibcite{Docev62}{{3}{}{{}}{{}}} +\bibcite{Durand60}{{4}{}{{}}{{}}} +\@writefile{lot}{\contentsline {table}{\numberline {2}{\ignorespaces The impact of the thread's number into the convergence of Aberth algorithm}}{16}{table.2}} +\newlabel{tab:Theimpactofthethread'snumberintotheconvergenceofAberthalgorithm}{{2}{16}{The impact of the thread's number into the convergence of Aberth algorithm}{table.2}{}} +\@writefile{lot}{\contentsline {table}{\numberline {3}{\ignorespaces Aberth algorithm compare to Durand-Kerner algorithm}}{16}{table.3}} +\newlabel{tab:AberthAlgorithCompareToDurandKernerAlgorithm}{{3}{16}{Aberth algorithm compare to Durand-Kerner algorithm}{table.3}{}} +\@writefile{toc}{\contentsline {paragraph}{A comparative study between Aberth and Durand-kerner algorithm}{16}{table.3}} +\bibcite{Kerner66}{{5}{}{{}}{{}}} +\bibcite{Borch-Supan63}{{6}{}{{}}{{}}} +\bibcite{Ehrlich67}{{7}{}{{}}{{}}} +\bibcite{Aberth73}{{8}{}{{}}{{}}} +\bibcite{Loizon83}{{9}{}{{}}{{}}} +\bibcite{Freeman89}{{10}{}{{}}{{}}} +\bibcite{Freemanall90}{{11}{}{{}}{{}}} +\bibcite{Raphaelall01}{{12}{}{{}}{{}}} +\bibcite{CUDA10}{{13}{}{{}}{{}}} +\bibcite{Kahinall14}{{14}{}{{}}{{}}} +\bibcite{Bini96}{{15}{}{{}}{{}}} +\bibcite{Ostrowski41}{{16}{}{{}}{{}}} +\bibcite{Karimall98}{{17}{}{{}}{{}}} +\bibcite{Mirankar68}{{18}{}{{}}{{}}} +\bibcite{Mirankar71}{{19}{}{{}}{{}}} +\bibcite{Schedler72}{{20}{}{{}}{{}}} +\bibcite{Winogard72}{{21}{}{{}}{{}}} +\bibcite{Benall68}{{22}{}{{}}{{}}} +\bibcite{Jana06}{{23}{}{{}}{{}}} +\bibcite{Janall99}{{24}{}{{}}{{}}} +\bibcite{Riceall06}{{25}{}{{}}{{}}} +\bibcite{Azad07}{{26}{}{{}}{{}}} +\bibcite{Gemignani07}{{27}{}{{}}{{}}} +\bibcite{Kalantari08}{{28}{}{{}}{{}}} +\bibcite{Skachek08}{{29}{}{{}}{{}}} +\bibcite{Zhancall08}{{30}{}{{}}{{}}} +\bibcite{Zhuall08}{{31}{}{{}}{{}}} +\bibcite{Bini04}{{32}{}{{}}{{}}} +\bibcite{Cosnard90}{{33}{}{{}}{{}}} +\bibcite{Jana99}{{34}{}{{}}{{}}} +\bibcite{NVIDIA10}{{35}{}{{}}{{}}} +\providecommand\NAT@force@numbers{}\NAT@force@numbers diff --git a/elsarticle-template.bbl b/elsarticle-template.bbl new file mode 100644 index 0000000..606edd7 --- /dev/null +++ b/elsarticle-template.bbl @@ -0,0 +1,161 @@ +\begin{thebibliography}{10} +\expandafter\ifx\csname url\endcsname\relax + \def\url#1{\texttt{#1}}\fi +\expandafter\ifx\csname urlprefix\endcsname\relax\def\urlprefix{URL }\fi +\expandafter\ifx\csname href\endcsname\relax + \def\href#1#2{#2} \def\path#1{#1}\fi + +\bibitem{Weierstrass03} +K.~Weierstrass, Neuer beweis des satzes, dass jede ganze rationale function + einer veranderlichen dagestellt werden kann als ein product aus linearen + functionen derselben veranderlichen, Ges. Werke 3 (1903) 251--269. + +\bibitem{Ilie50} +L.~Ilieff, On the approximations of newton, Annual Sofia Univ~(46) (1950) + 167--171. +\newblock \href {http://dx.doi.org/10.1016/0003-4916(63)90068-X} + {\path{doi:10.1016/0003-4916(63)90068-X}}. + +\bibitem{Docev62} +K.~Docev, An alternative method of newton for simultaneous calculation of all + the roots of a given algebraic equation, Phys. Math. J~(5) (1962) 136--139. + +\bibitem{Durand60} +E.~Durand, Solution numerique des equations algebriques, vol. 1, equations du + type f(x)=0, racines d'une polynome Vol.1. + +\bibitem{Kerner66} +I.~Kerner, Ein gesamtschritteverfahren zur berechnung der nullstellen von + polynomen~(8) (1966) 290--294. + +\bibitem{Borch-Supan63} +W.~Borch-Supan, A posteriori error for the zeros of polynomials~(5) (1963) + 380--398. + +\bibitem{Ehrlich67} +L.~Ehrlich, A modified newton method for polynomials, Comm. Ass. Comput. + Mach.~(10) (1967) 107--108. + +\bibitem{Aberth73} +O.~Aberth, Iteration methods for finding all zeros of a polynomial + simultaneously, Mathematics of Computation 27~(122) (1973) 339--344. +\newblock \href {http://dx.doi.org/10.1016/0003-4916(63)90068-X} + {\path{doi:10.1016/0003-4916(63)90068-X}}. + +\bibitem{Loizon83} +G.~Loizon, Higher-order iteration functions for simultaneously approximating + polynomial zeros, Intern. J. Computer Math~(14) (1983) 45--58. + +\bibitem{Freeman89} +T.~Freeman, Calculating polynomial zeros on a local memory parallel computer, + Parallel Computing~(12) (1989) 351--358. + +\bibitem{Freemanall90} +T.~Freeman, R.~Brankin, Asynchronous polynomial zero-finding algorithms, + Parallel Computing~(17) (1990) 673--681. + +\bibitem{Raphaelall01} +R.~Couturier, F.~Spetiri, Extraction de racines dans des polynômes creux de + degrées élevés.rsrcp (réseaux et systèmes répartis, calculateurs + parallèles), Algorithmes itératifs paralléles et distribués 1~(13) (1990) + 67--81. + +\bibitem{CUDA10} +Compute Unified Device Architecture Programming Guide Version 3.0. + +\bibitem{Kahinall14} +K.~Ghidouche, R.~Couturie, A.~Sider, parallel implementation of the + durand-kerner algorithm for polynomial root-finding on gpu, IEEE. Conf. on + advanced Networking, Distributed Systems and Applications (2014) 53--57. + +\bibitem{Bini96} +D.~Bini, Numerical computation of polynomial zeros by means of aberth s method, + Numerical Algorithms 13~(4) (1996) 179--200. + +\bibitem{Ostrowski41} +A.~Ostrowski, On a theorem by j.l. walsh concerning the moduli of roots of + algebraic equations,bull. a.m.s., Algorithmes itératifs paralléles et + distribués 1~(47) (1941) 742--746. + +\bibitem{Karimall98} +K.~Rhofir, F.~Spies, J.-C. Miellou, Perfectionnements de la méthode asynchrone + de durand-kerner pour les polynômes complexes, Calculateurs Parallèles + 10~(4) (1998) 449--458. + +\bibitem{Mirankar68} +W.~Mirankar, Parallel methods for approximating the roots of a function, IBM + Res Dev 30 (1968) 297--301. + +\bibitem{Mirankar71} +W.~Mirankar, A survey of parallelism in numerical analysis, SIAM Rev (1971) + 524--547. + +\bibitem{Schedler72} +G.~Schedler, Parallel iteration methods in complexity of computer + communications, Commun ACM (1967) 286--290. + +\bibitem{Winogard72} +S.~Winogard, Parallel iteration methods in complexity of computer + communications, Plenum, New York. + +\bibitem{Benall68} +M.~Ben-Or, E.~Feig, D.~Kozzen, P.~Tiwary, A fast parallel algorithm for + determining all roots of a polynomial with real roots, Int: Proc of ACM + (1968) 340--349. + +\bibitem{Jana06} +P.~Jana, Polynomial interpolation and polynomial root finding on otis-mesh, + Parallel Comput 32~(3) (2006) 301--312. + +\bibitem{Janall99} +P.~Jana, B.~Sinha, R.~D. Gupta, Efficient parallel algorithms for finding + polynomial zeroes, Proc of the 6th int conference on advance computing, CDAC, + Pune University Campus,India 15~(3) (1999) 189--196. + +\bibitem{Riceall06} +T.~Rice, L.~Jamieson, A highly parallel algorithm for root extraction, IEEE + Trans Comp 38~(3) (2006) 443--449. + +\bibitem{Azad07} +H.~Azad, The performance of synchronous parallel polynomial root extraction on + a ring multicomputer, Clust Comput 2~(10) (2007) 167--174. + +\bibitem{Gemignani07} +L.~Gemignani, Structured matrix methods for polynomial root finding., n: Proc + of the 2007 Intl symposium on symbolic and algebraic computation (2007) + 175--180. + +\bibitem{Kalantari08} +B.~Kalantari, Polynomial root finding and polynomiography., World + Scientifict,New Jersey. + +\bibitem{Skachek08} +V.~Skachek, Structured matrix methods for polynomial root finding., n: Proc of + the 2007 Intl symposium on symbolic and algebraic computation (2008) + 175--180. + +\bibitem{Zhancall08} +X.~Zhanc, Z.~M.~Wan, A constrained learning algorithm for finding multiple real + roots of polynomial, In: Proc of the 2008 intl symposium on computational + intelligence and design (2008) 38--41. + +\bibitem{Zhuall08} +W.~Zhu, w.~Zeng, D.~Lin, an adaptive algorithm finding multiple roots of + polynomials, Lect Notes Comput Sci~(5262) (2008) 674--681. + +\bibitem{Bini04} +D.~Bini, L.~Gemignani, Inverse power and durand kerner iterations for + univariate polynomial root finding, Comput Math Appl~(47) (2004) 447--459. + +\bibitem{Cosnard90} +M.~Cosnard, P.~Fraigniaud, Finding the roots of a polynomial on an mimd + multicomputer, Parallel Comput 15~(3) (1990) 75--85. + +\bibitem{Jana99} +P.~Jana, Finding polynomial zeroes on a multi-mesh of trees (mmt), In: Proc of + the 2nd int conference on information technology (1999) 202--206. + +\bibitem{NVIDIA10} +NVIDIA, NVIDIA CUDA C Programming Guide, Vol.~7 of 001, PG, 2015. + +\end{thebibliography} diff --git a/elsarticle-template.blg b/elsarticle-template.blg new file mode 100644 index 0000000..0a14f38 --- /dev/null +++ b/elsarticle-template.blg @@ -0,0 +1,20 @@ +This is BibTeX, Version 0.99dThe top-level auxiliary file: elsarticle-template.aux +The style file: elsarticle-num.bst +Database file #1: mybibfile.bib +Warning--I didn't find a database entry for "" +Warning--there's a number but no volume in Ilie50 +Warning--there's a number but no volume in Docev62 +Warning--empty journal in Durand60 +Warning--empty journal in Kerner66 +Warning--there's a number but no volume in Kerner66 +Warning--empty journal in Borch-Supan63 +Warning--there's a number but no volume in Borch-Supan63 +Warning--there's a number but no volume in Ehrlich67 +Warning--there's a number but no volume in Loizon83 +Warning--there's a number but no volume in Freeman89 +Warning--there's a number but no volume in Freemanall90 +Warning--there's a number but no volume in Zhuall08 +Warning--there's a number but no volume in Bini04 +Warning--can't use both author and editor fields in NVIDIA10 +Warning--can't use both volume and number fields in NVIDIA10 +(There were 16 warnings) diff --git a/elsarticle-template.dvi b/elsarticle-template.dvi new file mode 100644 index 0000000..f6b612a Binary files /dev/null and b/elsarticle-template.dvi differ diff --git a/elsarticle-template.log b/elsarticle-template.log new file mode 100644 index 0000000..8fd7379 --- /dev/null +++ b/elsarticle-template.log @@ -0,0 +1,517 @@ +This is pdfTeX, Version 3.14159265-2.6-1.40.16 (MiKTeX 2.9 64-bit) (preloaded format=latex 2015.9.8) 19 OCT 2015 12:48 +entering extended mode +**elsarticle-template.tex +(elsarticle-template.tex +LaTeX2e <2015/01/01> patch level 2 +Babel <3.9m> and hyphenation patterns for 69 languages loaded. +("C:\Program Files\MiKTeX 2.9\tex\latex\elsarticle\elsarticle.cls" +Document Class: elsarticle 2009/09/17, 1.2.0: Elsevier Ltd +\@bls=\dimen102 +("C:\Program Files\MiKTeX 2.9\tex\latex\base\article.cls" +Document Class: article 2014/09/29 v1.4h Standard LaTeX document class +("C:\Program Files\MiKTeX 2.9\tex\latex\base\size10.clo" +File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option) +) +\c@part=\count79 +\c@section=\count80 +\c@subsection=\count81 +\c@subsubsection=\count82 +\c@paragraph=\count83 +\c@subparagraph=\count84 +\c@figure=\count85 +\c@table=\count86 +\abovecaptionskip=\skip41 +\belowcaptionskip=\skip42 +\bibindent=\dimen103 +) ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\graphicx.sty" +Package: graphicx 2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR) + ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\keyval.sty" +Package: keyval 2014/10/28 v1.15 key=value parser (DPC) +\KV@toks@=\toks14 +) +("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\graphics.sty" +Package: graphics 2014/10/28 v1.0p Standard LaTeX Graphics (DPC,SPQR) + ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\trig.sty" +Package: trig 1999/03/16 v1.09 sin cos tan (DPC) +) ("C:\Program Files\MiKTeX 2.9\tex\latex\00miktex\graphics.cfg" +File: graphics.cfg 2007/01/18 v1.5 graphics configuration of teTeX/TeXLive +) +Package graphics Info: Driver file: dvips.def on input line 94. + +("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\dvips.def" +File: dvips.def 2014/10/14 v3.0j Driver-dependent file (DPC,SPQR) +)) +\Gin@req@height=\dimen104 +\Gin@req@width=\dimen105 +) ("C:\Program Files\MiKTeX 2.9\tex\latex\psnfss\pifont.sty" +Package: pifont 2005/04/12 PSNFSS-v9.2a Pi font support (SPQR) +LaTeX Font Info: Try loading font information for U+pzd on input line 63. + ("C:\Program Files\MiKTeX 2.9\tex\latex\psnfss\upzd.fd" +File: upzd.fd 2001/06/04 font definitions for U/pzd. +) +LaTeX Font Info: Try loading font information for U+psy on input line 64. + ("C:\Program Files\MiKTeX 2.9\tex\latex\psnfss\upsy.fd" +File: upsy.fd 2001/06/04 font definitions for U/psy. +)) +\c@tnote=\count87 +\c@fnote=\count88 +\c@cnote=\count89 +\c@ead=\count90 +\c@author=\count91 +\@eadauthor=\toks15 +\c@affn=\count92 +\absbox=\box26 +\keybox=\box27 +\Columnwidth=\dimen106 +\space@left=\dimen107 +\els@boxa=\box28 +\els@boxb=\box29 +\leftMargin=\dimen108 +\@enLab=\toks16 +\@sep=\skip43 +\@@sep=\skip44 + +(elsarticle-template.spl) ("C:\Program Files\MiKTeX 2.9\tex\latex\natbib\natbib.sty" +Package: natbib 2010/09/13 8.31b (PWD, AO) +\bibhang=\skip45 +\bibsep=\skip46 +LaTeX Info: Redefining \cite on input line 694. +\c@NAT@ctr=\count93 +) +\splwrite=\write3 +) +("C:\Program Files\MiKTeX 2.9\tex\latex\lineno\lineno.sty" +Package: lineno 2005/11/02 line numbers on paragraphs v4.41 +\linenopenalty=\count94 +\output=\toks17 +\linenoprevgraf=\count95 +\linenumbersep=\dimen109 +\linenumberwidth=\dimen110 +\c@linenumber=\count96 +\c@pagewiselinenumber=\count97 +\c@LN@truepage=\count98 +\c@internallinenumber=\count99 +\c@internallinenumbers=\count100 +\quotelinenumbersep=\dimen111 +\bframerule=\dimen112 +\bframesep=\dimen113 +\bframebox=\box30 +LaTeX Info: Redefining \\ on input line 3056. +) ("C:\Program Files\MiKTeX 2.9\tex\latex\hyperref\hyperref.sty" +Package: hyperref 2012/11/06 v6.83m Hypertext links for LaTeX + ("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\hobsub-hyperref.sty" +Package: hobsub-hyperref 2012/04/25 v1.12 Bundle oberdiek, subset hyperref (HO) + +("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\hobsub-generic.sty" +Package: hobsub-generic 2012/04/25 v1.12 Bundle oberdiek, subset generic (HO) +Package: hobsub 2012/04/25 v1.12 Construct package bundles (HO) +Package: infwarerr 2010/04/08 v1.3 Providing info/warning/error messages (HO) +Package: ltxcmds 2011/11/09 v1.22 LaTeX kernel commands for general use (HO) +Package: ifluatex 2010/03/01 v1.3 Provides the ifluatex switch (HO) +Package ifluatex Info: LuaTeX not detected. +Package: ifvtex 2010/03/01 v1.5 Detect VTeX and its facilities (HO) +Package ifvtex Info: VTeX not detected. +Package: intcalc 2007/09/27 v1.1 Expandable calculations with integers (HO) +Package: ifpdf 2011/01/30 v2.3 Provides the ifpdf switch (HO) +Package ifpdf Info: pdfTeX in PDF mode is not detected. +Package: etexcmds 2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO) +Package etexcmds Info: Could not find \expanded. +(etexcmds) That can mean that you are not using pdfTeX 1.50 or +(etexcmds) that some package has redefined \expanded. +(etexcmds) In the latter case, load this package earlier. +Package: kvsetkeys 2012/04/25 v1.16 Key value parser (HO) +Package: kvdefinekeys 2011/04/07 v1.3 Define keys (HO) +Package: pdftexcmds 2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO) +Package pdftexcmds Info: LuaTeX not detected. +Package pdftexcmds Info: \pdf@primitive is available. +Package pdftexcmds Info: \pdf@ifprimitive is available. +Package pdftexcmds Info: \pdfdraftmode is ignored in DVI mode. +Package: pdfescape 2011/11/25 v1.13 Implements pdfTeX's escape features (HO) +Package: bigintcalc 2012/04/08 v1.3 Expandable calculations on big integers (HO) +Package: bitset 2011/01/30 v1.1 Handle bit-vector datatype (HO) +Package: uniquecounter 2011/01/30 v1.2 Provide unlimited unique counter (HO) +) +Package hobsub Info: Skipping package `hobsub' (already loaded). +Package: letltxmacro 2010/09/02 v1.4 Let assignment for LaTeX macros (HO) +Package: hopatch 2011/06/24 v1.1 Wrapper for package hooks (HO) +Package: xcolor-patch 2011/01/30 xcolor patch +Package: atveryend 2011/06/30 v1.8 Hooks at the very end of document (HO) +Package atveryend Info: \enddocument detected (standard20110627). +Package: atbegshi 2011/10/05 v1.16 At begin shipout hook (HO) +Package: refcount 2011/10/16 v3.4 Data extraction from label references (HO) +Package: hycolor 2011/01/30 v1.7 Color options for hyperref/bookmark (HO) +) +("C:\Program Files\MiKTeX 2.9\tex\generic\ifxetex\ifxetex.sty" +Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional +) +("C:\Program Files\MiKTeX 2.9\tex\latex\oberdiek\auxhook.sty" +Package: auxhook 2011/03/04 v1.3 Hooks for auxiliary files (HO) +) +("C:\Program Files\MiKTeX 2.9\tex\latex\oberdiek\kvoptions.sty" +Package: kvoptions 2011/06/30 v3.11 Key value format for package options (HO) +) +\@linkdim=\dimen114 +\Hy@linkcounter=\count101 +\Hy@pagecounter=\count102 + +("C:\Program Files\MiKTeX 2.9\tex\latex\hyperref\pd1enc.def" +File: pd1enc.def 2012/11/06 v6.83m Hyperref: PDFDocEncoding definition (HO) +) +\Hy@SavedSpaceFactor=\count103 + +("C:\Program Files\MiKTeX 2.9\tex\latex\00miktex\hyperref.cfg" +File: hyperref.cfg 2002/06/06 v1.2 hyperref configuration of TeXLive +) +Package hyperref Info: Hyper figures OFF on input line 4443. +Package hyperref Info: Link nesting OFF on input line 4448. +Package hyperref Info: Hyper index ON on input line 4451. +Package hyperref Info: Plain pages OFF on input line 4458. +Package hyperref Info: Backreferencing OFF on input line 4463. +Package hyperref Info: Implicit mode ON; LaTeX internals redefined. +Package hyperref Info: Bookmarks ON on input line 4688. +\c@Hy@tempcnt=\count104 + ("C:\Program Files\MiKTeX 2.9\tex\latex\url\url.sty" +\Urlmuskip=\muskip10 +Package: url 2013/09/16 ver 3.4 Verb mode for urls, etc. +) +LaTeX Info: Redefining \url on input line 5041. +\XeTeXLinkMargin=\dimen115 +\Fld@menulength=\count105 +\Field@Width=\dimen116 +\Fld@charsize=\dimen117 +Package hyperref Info: Hyper figures OFF on input line 6295. +Package hyperref Info: Link nesting OFF on input line 6300. +Package hyperref Info: Hyper index ON on input line 6303. +Package hyperref Info: backreferencing OFF on input line 6310. +Package hyperref Info: Link coloring OFF on input line 6315. +Package hyperref Info: Link coloring with OCG OFF on input line 6320. +Package hyperref Info: PDF/A mode OFF on input line 6325. +LaTeX Info: Redefining \ref on input line 6365. +LaTeX Info: Redefining \pageref on input line 6369. +\Hy@abspage=\count106 +\c@Item=\count107 +\c@Hfootnote=\count108 +) + +Package hyperref Message: Driver (default): hdvips. + +("C:\Program Files\MiKTeX 2.9\tex\latex\hyperref\hdvips.def" +File: hdvips.def 2012/11/06 v6.83m Hyperref driver for dvips + ("C:\Program Files\MiKTeX 2.9\tex\latex\hyperref\pdfmark.def" +File: pdfmark.def 2012/11/06 v6.83m Hyperref definitions for pdfmark specials +\pdf@docset=\toks18 +\pdf@box=\box31 +\pdf@toks=\toks19 +\pdf@defaulttoks=\toks20 +\HyField@AnnotCount=\count109 +\Fld@listcount=\count110 +\c@bookmark@seq@number=\count111 + ("C:\Program Files\MiKTeX 2.9\tex\latex\oberdiek\rerunfilecheck.sty" +Package: rerunfilecheck 2011/04/15 v1.7 Rerun checks for auxiliary files (HO) +Package uniquecounter Info: New unique counter `rerunfilecheck' on input line 282. +) +\Hy@SectionHShift=\skip47 +)) +("C:\Program Files\MiKTeX 2.9\tex\latex\amsmath\amsmath.sty" +Package: amsmath 2013/01/14 v2.14 AMS math features +\@mathmargin=\skip48 + +For additional information on amsmath, use the `?' option. +("C:\Program Files\MiKTeX 2.9\tex\latex\amsmath\amstext.sty" +Package: amstext 2000/06/29 v2.01 + ("C:\Program Files\MiKTeX 2.9\tex\latex\amsmath\amsgen.sty" +File: amsgen.sty 1999/11/30 v2.0 +\@emptytoks=\toks21 +\ex@=\dimen118 +)) ("C:\Program Files\MiKTeX 2.9\tex\latex\amsmath\amsbsy.sty" +Package: amsbsy 1999/11/29 v1.2d +\pmbraise@=\dimen119 +) +("C:\Program Files\MiKTeX 2.9\tex\latex\amsmath\amsopn.sty" +Package: amsopn 1999/12/14 v2.01 operator names +) +\inf@bad=\count112 +LaTeX Info: Redefining \frac on input line 210. +\uproot@=\count113 +\leftroot@=\count114 +LaTeX Info: Redefining \overline on input line 306. +\classnum@=\count115 +\DOTSCASE@=\count116 +LaTeX Info: Redefining \ldots on input line 378. +LaTeX Info: Redefining \dots on input line 381. +LaTeX Info: Redefining \cdots on input line 466. +\Mathstrutbox@=\box32 +\strutbox@=\box33 +\big@size=\dimen120 +LaTeX Font Info: Redeclaring font encoding OML on input line 566. +LaTeX Font Info: Redeclaring font encoding OMS on input line 567. +\macc@depth=\count117 +\c@MaxMatrixCols=\count118 +\dotsspace@=\muskip11 +\c@parentequation=\count119 +\dspbrk@lvl=\count120 +\tag@help=\toks22 +\row@=\count121 +\column@=\count122 +\maxfields@=\count123 +\andhelp@=\toks23 +\eqnshift@=\dimen121 +\alignsep@=\dimen122 +\tagshift@=\dimen123 +\tagwidth@=\dimen124 +\totwidth@=\dimen125 +\lineht@=\dimen126 +\@envbody=\toks24 +\multlinegap=\skip49 +\multlinetaggap=\skip50 +\mathdisplay@stack=\toks25 +LaTeX Info: Redefining \[ on input line 2665. +LaTeX Info: Redefining \] on input line 2666. +) +("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\amsfonts.sty" +Package: amsfonts 2013/01/14 v3.01 Basic AMSFonts support +\symAMSa=\mathgroup4 +\symAMSb=\mathgroup5 +LaTeX Font Info: Overwriting math alphabet `\mathfrak' in version `bold' +(Font) U/euf/m/n --> U/euf/b/n on input line 106. +) +("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\amssymb.sty" +Package: amssymb 2013/01/14 v3.01 AMS font symbols +) +(C:\Users\MEZHOUD\AppData\Roaming\MiKTeX\2.9\tex\latex\algorithm2e\algorithm2e.sty +Package: algorithm2e 2013/01/06 v5.00 algorithms environments +\c@AlgoLine=\count124 + +("C:\Program Files\MiKTeX 2.9\tex\latex\base\ifthen.sty" +Package: ifthen 2014/09/29 v1.1c Standard LaTeX ifthen package (DPC) +) ("C:\Program Files\MiKTeX 2.9\tex\latex\tools\xspace.sty" +Package: xspace 2014/10/28 v1.13 Space after command names (DPC,MH) +) +("C:\Program Files\MiKTeX 2.9\tex\latex\ltxmisc\relsize.sty" +Package: relsize 2003/07/04 ver 3.1 +) +******************************************************** +Package `algorithm2e' Release 5.0 -- january 06 2013 -- +- algorithm2e-announce@lirmm.fr mailing list for announcement about releases +- algorithm2e-discussion@lirmm.fr mailing list for discussion about package +subscribe by emailing sympa@lirmm.fr with 'subscribe ' +- Author: Christophe Fiorio (cfiorio@um2.fr) +******************************************************** +\skiptotal=\skip51 +\skiplinenumber=\skip52 +\skiprule=\skip53 +\skiphlne=\skip54 +\skiptext=\skip55 +\skiplength=\skip56 +\algomargin=\skip57 +\skipalgocfslide=\skip58 +\algowidth=\dimen127 +\inoutsize=\dimen128 +\inoutindent=\dimen129 +\interspacetitleruled=\dimen130 +\interspacealgoruled=\dimen131 +\interspacetitleboxruled=\dimen132 +\algocf@inoutbox=\box34 +\algocf@inputbox=\box35 +\AlCapSkip=\skip59 +\AlCapHSkip=\skip60 +\algoskipindent=\skip61 +\algocf@nlbox=\box36 +\algocf@hangingbox=\box37 +\algocf@untilbox=\box38 +\algocf@skipuntil=\skip62 +\algocf@capbox=\box39 +\algoheightruledefault=\skip63 +\algoheightrule=\skip64 +\algotitleheightruledefault=\skip65 +\algotitleheightrule=\skip66 +\c@algocfline=\count125 +\c@algocfproc=\count126 +\c@algocf=\count127 +\algocf@algoframe=\box40 +\algocf@algobox=\box41 +) ("C:\Program Files\MiKTeX 2.9\tex\latex\tools\array.sty" +Package: array 2014/10/28 v2.4c Tabular extension package (FMi) +\col@sep=\dimen133 +\extrarowheight=\dimen134 +\NC@list=\toks26 +\extratabsurround=\skip67 +\backup@length=\skip68 +) ("C:\Program Files\MiKTeX 2.9\tex\latex\multirow\multirow.sty" +\bigstrutjot=\dimen135 +) ("C:\Program Files\MiKTeX 2.9\tex\latex\makecell\makecell.sty" +Package: makecell 2009/08/03 V0.1e Managing of Tab Column Heads and Cells +\rotheadsize=\dimen136 +\c@nlinenum=\count128 +\TeXr@lab=\toks27 +) (elsarticle-template.aux) +LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 51. +LaTeX Font Info: ... okay on input line 51. +LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 51. +LaTeX Font Info: ... okay on input line 51. +LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 51. +LaTeX Font Info: ... okay on input line 51. +LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 51. +LaTeX Font Info: ... okay on input line 51. +LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 51. +LaTeX Font Info: ... okay on input line 51. +LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 51. +LaTeX Font Info: ... okay on input line 51. +LaTeX Font Info: Checking defaults for PD1/pdf/m/n on input line 51. +LaTeX Font Info: ... okay on input line 51. +\AtBeginShipoutBox=\box42 +Package hyperref Info: Link coloring OFF on input line 51. + +("C:\Program Files\MiKTeX 2.9\tex\latex\hyperref\nameref.sty" +Package: nameref 2012/10/27 v2.43 Cross-referencing by name of section + +("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\gettitlestring.sty" +Package: gettitlestring 2010/12/03 v1.4 Cleanup title references (HO) +) +\c@section@level=\count129 +) +LaTeX Info: Redefining \ref on input line 51. +LaTeX Info: Redefining \pageref on input line 51. +LaTeX Info: Redefining \nameref on input line 51. + (elsarticle-template.out) +(elsarticle-template.out) +\@outlinefile=\write4 +LaTeX Font Info: Try loading font information for U+msa on input line 90. + ("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\umsa.fd" +File: umsa.fd 2013/01/14 v3.01 AMS symbols A +) +LaTeX Font Info: Try loading font information for U+msb on input line 90. + +("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\umsb.fd" +File: umsb.fd 2013/01/14 v3.01 AMS symbols B +) +Missing character: There is no à in font cmti8! +Missing character: There is no © in font cmti8! + + +LaTeX Font Warning: Command \Large invalid in math mode on input line 99. + +[1 + + +] [2] [3] + +Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): +(hyperref) removing `math shift' on input line 240. + + +Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): +(hyperref) removing `superscript' on input line 240. + + +Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): +(hyperref) removing `math shift' on input line 240. + +[4] + +Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): +(hyperref) removing `math shift' on input line 264. + + +Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): +(hyperref) removing `subscript' on input line 264. + + +Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): +(hyperref) removing `math shift' on input line 264. + +[5] + +Package natbib Warning: Citation `' on page 6 undefined on input line 352. + +[6] [7] [8] [9] [10] [11] +Underfull \hbox (badness 10000) in paragraph at lines 526--530 + + [] + +[12] +Underfull \hbox (badness 10000) in paragraph at lines 553--554 + + [] + +[13] +Overfull \hbox (9.92766pt too wide) in paragraph at lines 576--578 +\OT1/cmr/m/n/10 trans-fers from the CPU mem-ory to the GPU mem-ory []\OT1/cmtt/m/n/10 (cudaMemcpyHostToDevice) + [] + + +LaTeX Font Warning: Command \Large invalid in math mode on input line 597. + +[14] +Overfull \hbox (1.92747pt too wide) in paragraph at lines 622--633 + [][] + [] + + +LaTeX Warning: `!h' float specifier changed to `!ht'. + + +Overfull \hbox (1.92747pt too wide) in paragraph at lines 660--667 + [][] + [] + +(elsarticle-template.bbl [15] [16] +Missing character: There is no à in font cmr10! +Missing character: There is no ´ in font cmr10! +Missing character: There is no à in font cmr10! +Missing character: There is no © in font cmr10! +Missing character: There is no à in font cmr10! +Missing character: There is no © in font cmr10! +Missing character: There is no à in font cmr10! +Missing character: There is no © in font cmr10! +Missing character: There is no à in font cmr10! +Missing character: There is no © in font cmr10! +Missing character: There is no à in font cmr10! +Missing character: There is no ¨ in font cmr10! +Missing character: There is no à in font cmr10! +Missing character: There is no © in font cmr10! +Missing character: There is no à in font cmr10! +Missing character: There is no ¨ in font cmr10! +Missing character: There is no à in font cmr10! +Missing character: There is no © in font cmr10! +Missing character: There is no à in font cmr10! +Missing character: There is no © in font cmr10! +Missing character: There is no à in font cmr10! +Missing character: There is no © in font cmr10! +Missing character: There is no à in font cmr10! +Missing character: There is no © in font cmr10! +Missing character: There is no à in font cmr10! +Missing character: There is no © in font cmr10! +Missing character: There is no à in font cmr10! +Missing character: There is no © in font cmr10! + [17] +Missing character: There is no à in font cmr10! +Missing character: There is no © in font cmr10! +Missing character: There is no à in font cmr10! +Missing character: There is no ´ in font cmr10! +Missing character: There is no à in font cmr10! +Missing character: There is no ¨ in font cmr10! + [18]) + +Package natbib Warning: There were undefined citations. + +Package atveryend Info: Empty hook `BeforeClearDocument' on input line 675. +[19] +Package atveryend Info: Empty hook `AfterLastShipout' on input line 675. + (elsarticle-template.aux) +Package atveryend Info: Empty hook `AtVeryEndDocument' on input line 675. +Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 675. +Package rerunfilecheck Info: File `elsarticle-template.out' has not changed. +(rerunfilecheck) Checksum: D58FEC72D34B0C09E9A87851F40247DC;1417. +Package atveryend Info: Empty hook `AtVeryVeryEnd' on input line 675. + ) +Here is how much of TeX's memory you used: + 7944 strings out of 493674 + 111350 string characters out of 3143981 + 236548 words of memory out of 3000000 + 11205 multiletter control sequences out of 15000+200000 + 12426 words of font info for 47 fonts, out of 3000000 for 9000 + 1025 hyphenation exceptions out of 8191 + 32i,18n,32p,622b,531s stack positions out of 5000i,500n,10000p,200000b,50000s + +Output written on elsarticle-template.dvi (19 pages, 86420 bytes). diff --git a/elsarticle-template.out b/elsarticle-template.out new file mode 100644 index 0000000..202aedb --- /dev/null +++ b/elsarticle-template.out @@ -0,0 +1,18 @@ +\BOOKMARK [1][-]{section.1}{Root finding problem}{}% 1 +\BOOKMARK [1][-]{section.2}{Aberth method}{}% 2 +\BOOKMARK [2][-]{subsection.2.1}{Polynomials Initialization}{section.2}% 3 +\BOOKMARK [2][-]{subsection.2.2}{Vector Z\(0\) Initialization}{section.2}% 4 +\BOOKMARK [2][-]{subsection.2.3}{Iterative Function Hi}{section.2}% 5 +\BOOKMARK [2][-]{subsection.2.4}{Convergence condition}{section.2}% 6 +\BOOKMARK [1][-]{section.3}{Amelioration of Aberth method }{}% 7 +\BOOKMARK [1][-]{section.4}{The implementation of simultaneous methods in a parallel computer}{}% 8 +\BOOKMARK [1][-]{section.5}{A parallel implementation of Aberth method}{}% 9 +\BOOKMARK [2][-]{subsection.5.1}{Background on the GPU architecture}{section.5}% 10 +\BOOKMARK [2][-]{subsection.5.2}{Background on the CUDA Programming Model}{section.5}% 11 +\BOOKMARK [2][-]{subsection.5.3}{ The implementation of Aberth method on GPU}{section.5}% 12 +\BOOKMARK [3][-]{subsubsection.5.3.1}{A sequential Aberth algorithm}{subsection.5.3}% 13 +\BOOKMARK [3][-]{subsubsection.5.3.2}{Parallelize the steps on GPU }{subsection.5.3}% 14 +\BOOKMARK [2][-]{subsection.5.4}{Experimental study}{section.5}% 15 +\BOOKMARK [3][-]{subsubsection.5.4.1}{Definition of the polynomial used}{subsection.5.4}% 16 +\BOOKMARK [3][-]{subsubsection.5.4.2}{The study condition}{subsection.5.4}% 17 +\BOOKMARK [3][-]{subsubsection.5.4.3}{Comparative study}{subsection.5.4}% 18 diff --git a/elsarticle-template.pdf b/elsarticle-template.pdf new file mode 100644 index 0000000..247f1e2 Binary files /dev/null and b/elsarticle-template.pdf differ diff --git a/elsarticle-template.spl b/elsarticle-template.spl new file mode 100644 index 0000000..e69de29 diff --git a/elsarticle-template.tex b/elsarticle-template.tex new file mode 100644 index 0000000..df35ecb --- /dev/null +++ b/elsarticle-template.tex @@ -0,0 +1,675 @@ +\documentclass[review]{elsarticle} + +\usepackage{lineno,hyperref} +%%\usepackage[utf8]{inputenc} +%%\usepackage[T1]{fontenc} +%%\usepackage[french]{babel} +\usepackage{amsmath,amsfonts,amssymb} +\usepackage[ruled,vlined]{algorithm2e} +\usepackage{array,multirow,makecell} +\setcellgapes{1pt} +\makegapedcells +\newcolumntype{R}[1]{>{\raggedleft\arraybackslash }b{#1}} +\newcolumntype{L}[1]{>{\raggedright\arraybackslash }b{#1}} +\newcolumntype{C}[1]{>{\centering\arraybackslash }b{#1}} +\modulolinenumbers[5] + +\journal{Journal of \LaTeX\ Templates} + +%%%%%%%%%%%%%%%%%%%%%%% +%% Elsevier bibliography styles +%%%%%%%%%%%%%%%%%%%%%%% +%% To change the style, put a % in front of the second line of the current style and +%% remove the % from the second line of the style you would like to use. +%%%%%%%%%%%%%%%%%%%%%%% + +%% Numbered +%\bibliographystyle{model1-num-names} + +%% Numbered without titles +%\bibliographystyle{model1a-num-names} + +%% Harvard +%\bibliographystyle{model2-names.bst}\biboptions{authoryear} + +%% Vancouver numbered +%\usepackage{numcompress}\bibliographystyle{model3-num-names} + +%% Vancouver name/year +%\usepackage{numcompress}\bibliographystyle{model4-names}\biboptions{authoryear} + +%% APA style +%\bibliographystyle{model5-names}\biboptions{authoryear} + +%% AMA style +%\usepackage{numcompress}\bibliographystyle{model6-num-names} + +%% `Elsevier LaTeX' style +\bibliographystyle{elsarticle-num} +%%%%%%%%%%%%%%%%%%%%%%% + +\begin{document} + +\begin{frontmatter} + +\title{A parallel root finding polynomial on GPU} + +%% Group authors per affiliation: +\author{Elsevier\fnref{myfootnote}} +\address{Radarweg 29, Amsterdam} +\fntext[myfootnote]{Since 1880.} + +%% or include affiliations in footnotes: +\author[mymainaddress]{Ghidouche Kahina\corref{mycorrespondingauthor}} +%%\ead[url]{kahina.ghidouche@gmail.com} +\cortext[mycorrespondingauthor]{Corresponding author} +\ead{kahina.ghidouche@gmail.com} + +\author[mysecondaryaddress]{Couturier Raphael\corref{mycorrespondingauthor}} +%%\cortext[mycorrespondingauthor]{Corresponding author} +\ead{raphael.couturier@univ-fcomte.fr} + +\author[mymainaddress]{Abderrahmane Sider\corref{mycorrespondingauthor}} +%%\cortext[mycorrespondingauthor]{Corresponding author} +\ead{ar.sider@univ-bejaia.dz} + +\address[mymainaddress]{Department of informatics,University of Bejaia,Algeria} +\address[mysecondaryaddress]{FEMTO-ST Institute, University of Franche-Compté } + +\begin{abstract} +in this article we present a parallel implementation +of the Aberth algorithm for the problem root finding for +high degree polynomials on GPU architecture (Graphics +Processing Unit). +\end{abstract} + +\begin{keyword} +root finding of polynomials, high degree, iterative methods, Durant-Kerner, GPU, CUDA, CPU , Parallelization +\end{keyword} + +\end{frontmatter} + +\linenumbers + +\section{Root finding problem} +We consider a polynomial of degree \textit{n} having coefficients +in the complex \textit{C} and zeros $\alpha_{i},\textit{i=1,...,n}$. +%%\begin{center} +\begin{equation} + {\Large p(x)=\sum{a_{i}x^{i}}=a_{n}\prod(x-\alpha_{i}),a_{0} a_{n}\neq 0} +\end{equation} +%%\end{center} + + The root finding problem consist to find +all n root of \textit{p(x)}. the problem of finding a root is +equivalent to the problem of finding a fixed-point. To see this +consider the fixed-point problem of finding the n-dimensional +vector x such that +\begin{center} +$x=g(x). $ +\end{center} +Where $g : C^{n}\longrightarrow C^{n}$. Note that we can easily +rewrite this fixed-point problem as a root-finding problem by +setting $f (x) = x-g(x)$ and likewise we can recast the +root-finding problem into a fixed-point problem by setting +\begin{center} +$g(x)= f(x)-x$ +\end{center} +Often it will not be possible to solve such nonlinear equation +root-finding problems analytically. When this occurs we turn to +numerical methods to approximate the solution. Generally speaking, +algorithms for solving problems numerically can be divided into +two main groups: direct methods and iterative methods. +\\ + Direct methods exist only for $n \leq 4$,solved in closed form by G. Cardano +in the mid-16th century. However, N.H. Abel in the early 19th +century showed that polynomials of degree five or more could not +be solved by directs methods. Since then researchers have +concentrated on numerical (iterative) methods such as the famous +Newton's method, Bernoulli's method of the 18th, and Graeffe's. +With the advent of electronic computers, different methods has +been developed such as the Jenkins-Traub method, Larkin s method, +Muller's method, and several methods for simultaneous +approximation of all the roots, starting with the Durand-Kerner +method: +%%\begin{center} +\begin{equation} + Z_{i}=Z_{i}-\frac{P(Z_{i})}{\prod_{i\neq j}(z_{i}-z_{j})} +\end{equation} +%%\end{center} + +This formula is mentioned for the first time from +Weiestrass~\cite{Weierstrass03} as part of the fundamental theorem +of Algebra and is rediscovered from Ilieff~\cite{Ilie50}, +Docev~\cite{Docev62}, Durand~\cite{Durand60}, +Kerner~\cite{Kerner66}. Another method discovered from +Borsch-Supan~\cite{ Borch-Supan63} and also described and brought +in the following form from Ehrlich~\cite{Ehrlich67} and +Aberth~\cite{Aberth73}. +%%\begin{center} +\begin{equation} + Z_{i}=Z_{i}-\frac{1}{{\frac {P'(Z_{i})} {P(Z_{i})}}-{\sum_{i\neq j}(z_{i}-z_{j})}} +\end{equation} +%%\end{center} + +Aberth, Ehrlich and Farmer-Loizou~\cite{Loizon83} have proved that +the above method has cubic order of convergence for simple roots. + + +Iterative methods raise several problem when implemented e.g. +specific sizes of numbers must be used to deal with this +difficulty.Moreover,the convergence time of iterative methods +drastically increase like the degrees of high polynomials. The +parallelization of these algorithms will improve the convergence +time. + +Many authors have treated the problem of parallelization of +simultaneous methods. Freeman~\cite{Freeman89} has tested the DK +method, EA method and another method of the fourth order proposed +from Farmer and Loizou~\cite{Loizon83},on a 8- processor linear +chain, for polynomial of degree up to 8. The third method often +diverges, but the first two methods have speed-up 5.5 +(speed-up=(Time on one processor)/(Time on p processors)). Later +Freeman and Bane~\cite{Freemanall90} consider asynchronous +algorithms, in which each processor continues to update its +approximations even although the latest values of other $z_i((k))$ +have not received from the other processors, in difference with +the synchronous version where it would wait. +in~\cite{Raphaelall01}proposed two methods of parallelization for +architecture with shared memory and distributed memory,it able to +compute the root of polynomial degree 10000 on 430 s with only 8 +pc and 2 communications per iteration. Compare to the sequential +it take 3300 s to obtain the same results. + +After this few works discuses this problem until the apparition of +the Compute Unified Device Architecture (CUDA)~\cite{CUDA10},a +parallel computing platform and a programming model invented by +NVIDIA. The computing ability of GPU has exceeded the counterpart +of CPU. It is a waste of resource to be just a graphics card for +GPU. CUDA adopts a totally new computing architecture to use the +hardware resources provided by GPU in order to offer a stronger +computing ability to the massive data computing. + + +Indeed,~\cite{Kahinall14}proposed the implementation of the +Durand-Kerner method on GPU (Graphics Processing Unit). The main +result prove that a parallel implementation is 10 times as fast as +the sequential implementation on a single CPU for high degree +polynomials that is greater than about 48000. +\paragraph{} +The mean part of our work is to implement the Aberth method for the problem root finding for +high degree polynomials on GPU architecture (Graphics Processing Unit). Initially we present the Aberth method in section 1. Amelioration of Aberth method was proposed in section 2. A related works for the implementation of simultaneous methods in a parallel computer was discuss in section 3. Section 4 we propose a parallel implementation of Aberth method on GPU. Section 5, we present our result and discuss it. Finally, in Section 6, we present our conclusions and future research directions. + +\section{Aberth method} +A cubically convergent iteration method for finding zeros of +polynomials was proposed by O.Aberth~\cite{Aberth73}. The Aberth +method is a purely algebraic derivation.To illustrate the +derivation, we let $w_{i}(z)$ be the product of linear factor + +\begin{equation} +w_{i}(z)=\prod_{j=1,j \neq i}^{n} (z-x_{j}) +\end{equation} + +And rational function $R_{i}(z)$ be the correction term of +Weistrass method~\cite{Weierstrass03}: + +\begin{equation} +R_{i}(z)=\frac{p(z)}{w_{i}(z)} , i=1,2,...,n +\end{equation} + +Differentiating the rational function $R_{i}(z)$ and applying the +Newton method, we have: + +\begin{equation} +\frac{R_{i}(z)}{R_{i}^{'}(z)}= \frac{p(z)}{p^{'}(z)-p(z)\frac{w_{i}(z)}{w_{i}^{'}(z)}}= \frac{p(z)}{p^{'}(z)-p(z) \sum _{j=1,j \neq i}^{n}\frac{1}{z-x_{i}}}, i=1,2,...,n +\end{equation} + +Substituting $x_{j}$ for z we obtain the Aberth iteration method + +Let present the means stages of Aberth method. + +\subsection{Polynomials Initialization} + The initialization of polynomial P(z) with complex coefficients + are given by: + +\begin{equation} + p(z)=\sum{a_{i}z^{n-i}} , a_{n} \neq 0,a_{0}=1, a_{i}\subset C +\end{equation} + + +\subsection{Vector $Z^{(0)}$ Initialization} + +The choice of the initial points $z^{(0)}_{i}, i = 1, . . . , n.$ +from which starting the iteration (2) or (3), is rather delicate +since the number of steps needed by the iterative method to reach +a given approximation strongly depends on it. +In~\cite{Aberth73}the Aberth iteration is started by selecting n +equispaced points on a circle of center 0 and radius r, where r is +an upper bound to the moduli of the zeros. After,~\cite{Bini96} +performs this choice by selecting complex numbers along different +circles and relies on the result of~\cite{Ostrowski41}. + +\begin{equation} +%%\begin{align} +\sigma_{0}=\frac{u+v}{2};u=\frac{\sum_{i=1}^{n}u_{i}}{n.max_{i=1}^{n}u_{i}}; +v=\frac{\sum_{i=0}^{n-1}v_{i}}{n.min_{i=0}^{n-1}v_{i}};\\ +%%\end{align} +\end{equation} +Where: +\begin{equation} +u_{i}=2.|a_{i}|^{\frac{1}{i}}; +v_{i}=\frac{|\frac{a_{n}}{a_{i}}|^{\frac{1}{n-i}}}{2}. +\end{equation} + +\subsection{Iterative Function $H_{i}$} +The operator used with Aberth method is corresponding to the +following equation which will enable the convergence towards +polynomial solutions, provided all the roots are distinct. + +\begin{equation} +H_{i}(z)=z_{i}-\frac{1}{\frac{P^{'}(z_{i})}{P(z_{i})}-\sum_{j\neq +i}{\frac{1}{z_{i}-z_{j}}}} +\end{equation} + +\subsection{Convergence condition} +Determines the success of the termination. It consists in stopping +the iterative function $H_{i}(z)$ when the root are stable, the method +converge sufficiently: + +\begin{equation} +\forall i \in +[1,n];\frac{z_{i}^{(k)}-z_{i}^{(k-1)}}{z_{i}^{(k)}}<\xi +\end{equation} + + +\section{Amelioration of Aberth method } +The Aberth method implementation suffer of overflow problems. This +situation occurs, for instance, in the case where a polynomial +having positive coefficients and large degree is computed at a +point $\xi$ where $|\xi| > 1$. Indeed the limited number in the +mantissa of floating takings the computation of P(z) wrong when z +is large. for example $(10^{50}) +1+ (- 10^{50})$ will give result +0 instead of 1 in reality. Consequently we can not compute the roots +for large polynomial's degree. This problem was discuss in +~\cite{Karimall98} for the Durand-Kerner method, the authors +propose to use the logarithm and the exponential of a complex: + +\begin{equation} + \forall(x,y)\in R^{*2}; \ln (x+i.y)=\ln(x^{2}+y^{2}) +2+i.\arcsin(y\sqrt{x^{2}+y^{2}})_{\left] -\pi, \pi\right[ } +\end{equation} +%%\begin{equation} +\begin{align} + \forall(x,y)\in R^{*2}; \exp(x+i.y) & = \exp(x).\exp(i.y)\\ + & =\exp(x).\cos(y)+i.\exp(x).\sin(y) +\end{align} +%%\end{equation} + +The application of logarithm can replace any multiplications and +divisions with additions and subtractions. Consequently, it +manipulates lower absolute values and can be compute the roots for +large polynomial's degree exceed~\cite{Karimall98}. + +Applying this solution for the Aberth method we obtain the +iteration function with logarithm: +%%$$ \exp \bigl( \ln(p(z)_{k})-ln(\ln(p(z)_{k}^{'}))- \ln(1- \exp(\ln(p(z)_{k})-ln(\ln(p(z)_{k}^{'})+\ln\sum_{i\neq j}^{n}\frac{1}{z_{k}-z_{j}})$$ +\begin{equation} +H_{i}(z)=z_{i}^{k}-\exp \left(\ln \left( +p(z_{k})\right)-\ln\left(p(z_{k}^{'})\right)- \ln +\left(1-Q(z_{k})\right)\right) +\end{equation} +Where: + +\begin{equation} +Q(z_{k})=\exp\left( \ln (p(z_{k}))-\ln(p(z_{k}^{'}))+\ln \left( +\sum_{k\neq j}^{n}\frac{1}{z_{k}-z_{j}}\right)\right) +\end{equation} + +This solution is applying when it is necessary + +\section{The implementation of simultaneous methods in a parallel computer} + The main problem of the simultaneous methods is that the necessary +time needed for the convergence is increased with the increasing +of the degree of the polynomial. The parallelization of these +algorithms will improve the convergence time. Researchers usually +adopt one of the two following approaches to parallelize root +finding algorithms. One approach is to reduce the total number of +iterations as implemented by Miranker +~\cite{Mirankar68,Mirankar71}, Schedler~\cite{Schedler72} and +Winogard~\cite{Winogard72}. Another approach is to reduce the +computation time per iteration, as reported +in~\cite{Benall68,Jana06,Janall99,Riceall06}. There are many +schemes for simultaneous approximations of all roots of a given +polynomial. Several works on different methods and issues of root +finding have been reported in~\cite{Azad07, Gemignani07, Kalantari08, Skachek08, Zhancall08, Zhuall08}. However, Durand-Kerner and Ehrlich methods are the most practical choices among +them~\cite{Bini04}. These two methods have been extensively +studied for parallelization due to their following advantages. The +computation involved in these methods has some inherent +parallelism that can be suitably exploited by SIMD machines. +Moreover, they have fast rate of convergence (quadratic for the +Durand-Kerner method and cubic for the Ehrlich). Various parallel +algorithms reported for these methods can be found +in~\cite{Cosnard90, Freeman89,Freemanall90,,Jana99,Janall99}. +Freeman and Bane~\cite{Freemanall90} presented two parallel +algorithms on a local memory MIMD computer with the compute-to +communication time ratio O(n). However, their algorithms require +each processor to communicate its current approximation to all +other processors at the end of each iteration. Therefore they +cause a high degree of memory conflict. Recently the author +in~\cite{Mirankar71} proposed two versions of parallel algorithm +for the Durand-Kerner method, and Aberth method on model of +Optoelectronic Transpose Interconnection System (OTIS).The +algorithms are mapped on an OTIS-2D torus using N processors. This +solution need N processors to compute N roots, that it is not +practical (is not suitable to compute large polynomial's degrees). +Until then, the related works are not able to compute the root of +the large polynomial's degrees (higher then 1000) and with small +time. + + Finding polynomial roots rapidly and accurately it is our +objective, with the apparition of the CUDA(Compute Unified Device +Architecture), finding the roots of polynomials becomes rewarding +and very interesting, CUDA adopts a totally new computing +architecture to use the hardware resources provided by GPU in +order to offer a stronger computing ability to the massive data +computing. In~\cite{Kahinall14} we proposed the first implantation +of the root finding polynomials method on GPU (Graphics Processing +Unit),which is the Durand-Kerner method. The main result prove +that a parallel implementation is 10 times as fast as the +sequential implementation on a single CPU for high degree +polynomials that is greater than about 48000. Indeed, in this +paper we present a parallel implementation of Aberth method on +GPU, more details are discussed in the following of this paper. + + +\section {A parallel implementation of Aberth method} + +\subsection{Background on the GPU architecture} +A GPU is viewed as an accelerator for the data-parallel and +intensive arithmetic computations. It draws its computing power +from the parallel nature of its hardware and software +architectures. A GPU is composed of hundreds of Streaming +Processors (SPs) organized in several blocks called Streaming +Multiprocessors (SMs). It also has a memory hierarchy. It has a +private read-write local memory per SP, fast shared memory and +read-only constant and texture caches per SM and a read-write +global memory shared by all its SPs~\cite{NVIDIA10} + + On a CPU equipped with a GPU, all the data-parallel and intensive +functions of an application running on the CPU are off-loaded onto +the GPU in order to accelerate their computations. A similar +data-parallel function is executed on a GPU as a kernel by +thousands or even millions of parallel threads, grouped together +as a grid of thread blocks. Therefore, each SM of the GPU executes +one or more thread blocks in SIMD fashion (Single Instruction, +Multiple Data) and in turn each SP of a GPU SM runs one or more +threads within a block in SIMT fashion (Single Instruction, +Multiple threads). Indeed at any given clock cycle, the threads +execute the same instruction of a kernel, but each of them +operates on different data. + GPUs only work on data filled in their +global memories and the final results of their kernel executions +must be communicated to their CPUs. Hence, the data must be +transferred in and out of the GPU. However, the speed of memory +copy between the GPU and the CPU is slower than the memory +bandwidths of the GPU memories and, thus, it dramatically affects +the performances of GPU computations. Accordingly, it is necessary +to limit data transfers between the GPU and its CPU during the +computations. +\subsection{Background on the CUDA Programming Model} + +The CUDA programming model is similar in style to a single program +multiple-data (SPMD) softwaremodel. The GPU is treated as a +coprocessor that executes data-parallel kernel functions. CUDA +provides three key abstractions, a hierarchy of thread groups, +shared memories, and barrier synchronization. Threads have a three +level hierarchy. A grid is a set of thread blocks that execute a +kernel function. Each grid consists of blocks of threads. Each +block is composed of hundreds of threads. Threads within one block +can share data using shared memory and can be synchronized at a +barrier. All threads within a block are executed concurrently on a +multithreaded architecture.The programmer specifies the number of +threads per block, and the number of blocks per grid. A thread in +the CUDA programming language is much lighter weight than a thread +in traditional operating systems. A thread in CUDA typically +processes one data element at a time. The CUDA programming model +has two shared read-write memory spaces, the shared memory space +and the global memory space. The shared memory is local to a block +and the global memory space is accessible by all blocks. CUDA also +provides two read-only memory spaces, the constant space and the +texture space, which reside in external DRAM, and are accessed via +read-only caches. + +\subsection{ The implementation of Aberth method on GPU} +%%\subsection{A CUDA implementation of the Aberth's method } +%%\subsection{A GPU implementation of the Aberth's method } + + + +\subsubsection{A sequential Aberth algorithm} +The means steps of Aberth method can expressed as an algorithm +like: + +\begin{algorithm}[H] +\LinesNumbered +\caption{Algorithm to find root polynomial with Aberth method} + +\KwIn{$Z^{0}$(Initial root's vector),$\varepsilon$ (error +tolerance threshold),P(Polynomial to solve)} + +\KwOut {Z(The solution root's vector)} + +\BlankLine + +Initialization of the parameter of the polynomial to solve\; +Initialization of the solution vector $Z^{0}$\; + +\While {$\Delta z_{max}\succ \epsilon$}{ + Let $\Delta z_{max}=0$\; +\For{$j \gets 0 $ \KwTo $n$}{ +$ZPrec\left[j\right]=Z\left[j\right]$\; +$Z\left[j\right]=H\left(j,Z\right)$\; +} + +\For{$i \gets 0 $ \KwTo $n-1$}{ +$c=\frac{\left|Z\left[i\right]-ZPrec\left[i\right]\right|}{Z\left[i\right]}$\; +\If{$c\succ\Delta z_{max}$ }{ +$\Delta z_{max}$=c\;} +} +} +\end{algorithm} + +~\\ +In this sequential algorithm one thread CPU execute all steps. Let see the step 3 the execution of the iterative function, 2 instructions are needed, the first instruction \textit{save} the solution vector for the previous iteration, the second instruction \textit{update} or compute a new values of the roots. +We have two manner to execute the iterative function, taking a Jacobi iteration who need all the previous value $z^{(k)}_{i}$ to compute the new value $z^{(k+1)}_{i}$we have: + +\begin{equation} +H(i,z^{k+1})=\frac{p(z^{(k)}_{i})}{p'(z^{(k)}_{i})-p(z^{(k)}_{i})\sum^{n}_{j=1 j\neq i}\frac{1}{z^{(k)}_{i}-z^{(k)}_{j}}}, i=1,...,n. +\end{equation} + +Or with the Gauss-seidel iteration, we have: +\begin{equation} +H(i,z^{k+1})=\frac{p(z^{(k)}_{i})}{p'(z^{(k)}_{i})-p(z^{(k)}_{i})\sum^{i-1}_{j=1}\frac{1}{z^{(k)}_{i}-z^{(k+1)}_{j}}+\sum^{n}_{j=i+1}\frac{1}{z^{(k)}_{i}-z^{(k)}_{j}}}, i=1,...,n. +\end{equation} + +In formula(16), the Gauss-seidel iteration converge more quickly because they used the most fresh computed root $z^{k+1}_{i}$ , at this reason we used Gauss-seidel iteration. + +The steps 4 of the Aberth method compute the convergence of the roots, using(9) formula. +Both steps 3 and 4 use 1 thread to compute N roots on CPU, which is harmful for the large polynomial's roots finding. + +\paragraph{The execution time} +Let $T_{i}(N)$: the time to compute one new root's value of the step 3,$T_{i}$ depend on the polynomial's degrees N, when N increase $T_{i}$ increase to. We need $N.T_{i}(N)$ to compute all the new root's value in one iteration on the step 3. + +Let $T_{j}$: the time to compute one root's convergence value of the step 4, we need $N.T_{j}$ to compute all the root's convergence value in one iteration on the step 4. + +The execution time for both steps 3 and 4 can see like: +\begin{equation} +T_{exe}=N(T_{i}(N)+T_{j})+O(n). +\end{equation} +Let Nbr\_iter the number of iteration necessary to compute all the roots, so the total execution time $Total\_time_{exe}$ can give like: + +\begin{equation} +Total\_time_{exe}=\left[N\left(T_{i}(N)+T_{j}\right)+O(n)\right].Nbr\_iter +\end{equation} +The execution time increase with the increasing of the polynomial's root, which take necessary to parallelize this step to reduce the execution time. In the following paper you explain how we parrallelize this step using GPU architecture with CUDA platform. + +\subsubsection{Parallelize the steps on GPU } +On the CPU Aberth algorithm both steps 3 and 4 contain the loop \verb=for=, it use one thread to execute all the instruction in the loop N times. Here we explain how the GPU architecture can compute this loop and reduce the execution time. +The GPU architecture assign the execution of this loop to a groups of parallel threads organized as a grid of blocks each block contain a number of threads. All threads within a block are executed concurrently in parallel. The instruction are executed as a kernel. + +Let nbr\_thread be the number of threads executed in parallel, so you can easily transform the (18)formula like this: + +\begin{equation} +Total\_time_{exe}=\left[\frac{N}{nbr\_thread}\left(T_{i}(N)+T_{j}\right)+O(n)\right].Nbr\_iter. +\end{equation} + +In theory, the $Total\_time_{exe}$ on GPU is speed up nbr\_thread times as a $Total\_time_{exe}$ on CPU. We show more details in the experiment part. +~\\ +~\\ +In CUDA platform, All the instruction of the loop \verb=for= are executed by the GPU as a kernel form. A kernel is a procedure written in CUDA and defined by a heading \verb=__global__=, which means that it is to be executed by the GPU. The following algorithm see the Aberth algorithm on GPU: + +\begin{algorithm}[H] +\LinesNumbered +\caption{Algorithm to find root polynomial with Aberth method} + +\KwIn{$Z^{0}$(Initial root's vector),$\varepsilon$ (error +tolerance threshold),P(Polynomial to solve)} + +\KwOut {Z(The solution root's vector)} + +\BlankLine + +Initialization of the parameter of the polynomial to solve\; +Initialization of the solution vector $Z^{0}$\; +Allocate and fill the data in the global memory GPU\; + +\While {$\Delta z_{max}\succ \epsilon$}{ + Let $\Delta z_{max}=0$\; +$ kernel\_save(d\_Z^{k-1})$\; +$ kernel\_update(d\_z^{k})$\; +$kernel\_testConverge (d_?z_{max},d_Z^{k},d_Z^{k-1})$\; +} +\end{algorithm} +~\\ + +After the initialization step, all data of the root finding problem to be solved must be copied from the CPU memory to the GPU global memory, because the GPUs only work on the data filled in their memories. Next, all the data-parallel arithmetic operations inside the main loop \verb=(do ... while(...))= are executed as kernels by the GPU. The first kernel \textit{save} in line( 6, Algorithm 2) consist to save the vector of polynomial's root found at the previous time step on GPU memory, in order to test the convergence of the root at each iteration in line (8, Algorithm 2). + +The second kernel executes the iterative function and update Z(k),as formula (), we notice that the kernel update are called in two forms, separated with the value of \emph{R} which determines the radius beyond which we apply the logarithm formula like this: + +\begin{algorithm}[H] +\LinesNumbered +\caption{A global Algorithm for the iterative function} + +\eIf{$(\left|Z^{(k)}\right|<= R)$}{ +$kernel\_update(d\_z^{k})$\;} +{ +$kernel\_update\_Log(d\_z^{k})$\; +} +\end{algorithm} + +The first form execute the formula(8) if all the module's $( |Z(k)|<= R)$, else the kernel execute the formulas(13,14).the radius R was computed like: + +$$R = \exp( \log(DBL\_MAX) / (2*(double)P.degrePolynome) )$$ + +The last kernel verify the convergence of the root after each update of $Z^{(k)}$, as formula(), we used the function of the CUBLAS Library (CUDA Basic Linear Algebra Subroutines) to implement this kernel. + +The kernels terminates its computations when all the root are converged. Finally, the solution of the root finding problem is copied back from the GPU global memory to the CPU memory. We use the communication functions of CUDA for the memory allocations in the GPU \verb=(cudaMalloc())= and the data transfers from the CPU memory to the GPU memory \verb=(cudaMemcpyHostToDevice)= +or from the GPU memory to the CPU memory \verb=(cudaMemcpyDeviceToHost))=. +\subsection{Experimental study} + +\subsubsection{Definition of the polynomial used} +We use a polynomial of the following form for which the +roots are distributed on 2 distinct circles: +\begin{equation} + \forall \alpha_{1} \alpha_{2} \in C,\forall n_{1},n_{2} \in N^{*}; P(z)= (z^{n^{1}}-\alpha_{1})(z^{n^{2}}-\alpha_{2}) +\end{equation} + +This form makes it possible to associate roots having two +different modules and thus to work on a polynomial constitute +of four non zero terms. +\\ + An other form of the polynomial to obtain a full polynomial is: +%%\begin{equation} + %%\forall \alpha_{i} \in C,\forall n_{i}\in N^{*}; P(z)= \sum^{n}_{i=1}(z^{n^{i}}.a_{i}) +%%\end{equation} + +\begin{equation} + {\Large \forall a_{i} \in C; p(x)=\sum^{n-1}_{i=1} a_{i}.x^{i}} +\end{equation} +with this formula, we can have until \textit{n} non zero terms. + +\subsubsection{The study condition} +In order to have representative average values, for each +point of our curves we measured the roots finding of 10 +different polynomials. + +The our experiences results concern two parameters which are +the polynomial degree and the execution time of our program +to converge on the solution. The polynomial degree allows us +to validate that our algorithm is powerful with high degree +polynomials. The execution time remains the +element-key which justifies our work of parallelization. + For our tests we used a CPU Intel(R) Xeon(R) CPU +E5620@2.40GHz and a GPU Tesla C2070 (with 6 Go of ram) + +\subsubsection{Comparative study} +We initially carried out the convergence of Aberth algorithm with various sizes of polynomial, in second we evaluate the influence of the size of the threads per block.... + +\paragraph{Aberth algorithm on CPU and GPU} + +\begin{table}[!ht] + \centering + \begin{tabular} {|R{2cm}|L{2.5cm}|L{2.5cm}|L{1.5cm}|L{1.5cm}|} + \hline Polynomial's degrees & $T_{exe}$ on CPU & $T_{exe}$ on GPU & CPU iteration & GPU iteration\\ + \hline 5000 & 1.90 & 0.40 & 18 & 17\\ + \hline 10000 & 172.723 & 0.59 & 21 & 24\\ + \hline 20000 & 172.723 & 1.52 & 21 & 25\\ + \hline 30000 & 172.723 & 2.77 & 21 & 33\\ + \hline 50000 & 172.723 & 3.92 & 21 & 18\\ + \hline 500000 & $>$1h & 497.109 & & 24\\ + \hline 1000000 & $>$1h & 1,524.51& & 24\\ + \hline + \end{tabular} + \caption{the convergence of Aberth algorithm} + \label{tab:theConvergenceOfAberthAlgorithm} +\end{table} + +\paragraph{The impact of the thread's number into the convergence of Aberth algorithm} + +\begin{table}[!h] + \centering + \begin{tabular} {|R{2.5cm}|L{2.5cm}|L{2.5cm}|} + \hline Thread's numbers & Execution time &Number of iteration\\ + \hline 1024 & 523 & 27\\ + \hline 512 & 449.426 & 24\\ + \hline 256 & 440.805 & 24\\ + \hline 128 & 456.175 & 22\\ + \hline 64 & 472.862 & 23\\ + \hline 32 & 830.152 & 24\\ + \hline 8 & 2632.78 & 23 \\ + \hline + \end{tabular} + \caption{The impact of the thread's number into the convergence of Aberth algorithm} + \label{tab:Theimpactofthethread'snumberintotheconvergenceofAberthalgorithm} + +\end{table} + +\paragraph{A comparative study between Aberth and Durand-kerner algorithm} +\begin{table}[htbp] + \centering + \begin{tabular} {|R{2cm}|L{2.5cm}|L{2.5cm}|L{1.5cm}|L{1.5cm}|} + \hline Polynomial's degrees & Aberth $T_{exe}$ & D-Kerner $T_{exe}$ & Aberth iteration & D-Kerner iteration\\ + \hline 5000 & 0.40 & 3.42 & 17 & 138 \\ + \hline 50000 & 3.92 & 385.266 & 17 & 823\\ + \hline 500000 & 497.109 & 4677.36 & 24 & 214\\ + \hline + \end{tabular} + \caption{Aberth algorithm compare to Durand-Kerner algorithm} + \label{tab:AberthAlgorithCompareToDurandKernerAlgorithm} +\end{table} + + + +\bibliography{mybibfile} + +\end{document} \ No newline at end of file diff --git a/kahina_paper1 b/kahina_paper1 new file mode 100644 index 0000000..b187eff --- /dev/null +++ b/kahina_paper1 @@ -0,0 +1,189 @@ +%% +%% This is file 'numcompress'. +%% +%% Copyright (C) 2009-2012 River Valley Technologies +%% +%% +%% This package may be distributed under the terms of the LaTeX Project +%% Public License, as described in lppl.txt in the base LaTeX distribution. +%% Either version 1.0 or, at your option, any later version. +%% +%% $Id: numcompress.sty 187 2012-08-18 09:36:35Z rishi $ +%% $URL: http://lenova.river-valley.com/svn/elsbst/trunk/numcompress.sty $ +%% +\NeedsTeXFormat{LaTeX2e} +\def\Fileversion$#1: #2 ${\gdef\fileversion{#2}} +\def\Filedate$#1: #2-#3-#4 #5 #6 #7 ${\gdef\filedate{#2/#3/#4}} +\Fileversion$Rev: 187 $ +\Filedate$LastChangedDate: 2012-08-18 15:06:35 +0530 (Sat, 18 Aug 2012) $ +\ProvidesPackage{numcompress} + [\filedate\space\fileversion\space numcompress (CVR)] +\PackageWarningNoLine{numcompress} + {****************************************\MessageBreak + Package numcompress v,\fileversion\space loaded\MessageBreak + [Compress numbers (CVR)]\MessageBreak + ****************************************} +\newif\ifdots \dotsfalse +\newif\ifnumcompress \numcompresstrue + +\DeclareOption{dots}{\global\dotstrue} +\DeclareOption{nodots}{\global\dotsfalse} +\DeclareOption{compress}{\global\numcompresstrue} +\DeclareOption{nocompress}{\global\numcompressfalse} + +\ProcessOptions + +\def\removeDot#1{\def\tmp{#1}% + \ifx\tmp\@empty\else\@removeDot#1\@nil\fi} + +\def\@removeDot#1\@nil{\edef\fchar{\expandafter\@car#1\@nil}% + \edef\rchar{\expandafter\@cdr#1!\@nil}% + \def\@xmltempa{.}\def\@xmltempb{!}% + \ifx\fchar\@xmltempb\relax\else% + \ifx\fchar\@xmltempa\relax\else% + \fchar\ignorespaces\fi\removeDot{\rchar}\fi} + +\def\First[#1]{\csname First#1\endcsname} +\def\Second[#1]{\csname Second#1\endcsname} + +\def\parseFirstPage#1{\@tempcnta=0 + \@tfor\@digits:=#1\do{% + {\global\advance\@tempcnta by 1 + \expandafter\xdef\csname + First\the\@tempcnta\endcsname{\@digits}% + \xdef\flength{\the\@tempcnta}}}} + +\def\parseSecondPage#1{\@tempcnta=0 + \@tfor\@digits:=#1\do{% + {\global\advance\@tempcnta by 1 + \expandafter\xdef\csname + Second\the\@tempcnta\endcsname{\@digits}% + \xdef\llength{\the\@tempcnta}}}} + +\newif\ifdissimilar\dissimilarfalse +\def\checkequal#1#2{\edef\Farg{#1}\edef\Sarg{#2}% + \edef\One{A}% + \ifcat\One\Farg \relax\else% + \ifdissimilar\Sarg\else% + \ifnum\Farg=\Sarg\relax\else\Sarg\dissimilartrue\fi\fi\fi} +% +\let\@@fpage\@empty +\let\@@lpage\@empty +\def\fpage@compress#1{% + \gdef\@@fpage{#1}% + \edef\llength{0}% + \parseFirstPage{#1}% + \ifnum\flength=\llength% + \gdef\@fpage{\@@fpage}% + \gdef\@lpage{% + \@ifundefined{Second1}{}{\checkequal{\First[1]}{\Second[1]}}% + \@ifundefined{Second2}{}{\checkequal{\First[2]}{\Second[2]}}% + \@ifundefined{Second3}{}{\checkequal{\First[3]}{\Second[3]}}% + \@ifundefined{Second4}{}{\checkequal{\First[4]}{\Second[4]}}% + \@ifundefined{Second5}{}{\checkequal{\First[5]}{\Second[5]}}% + }% + \else% + \gdef\@fpage{\@@fpage}% + \gdef\@lpage{\@@lpage}% + \fi} + +\def\lpage@compress#1{% + \gdef\@@lpage{#1}% + \parseSecondPage{#1}% + \ifnum\flength=\llength% + \gdef\@fpage{\@@fpage}% + \gdef\@lpage{% + \edef\One{A}% + \edef\xFirst{\First[1]}% + \edef\xSecond{\Second[1]}% + \ifcat\One\xSecond\relax% + \ifx\xFirst\xSecond% + \@ifundefined{Second1}{}{\checkequal{\First[1]}{\Second[1]}}% + \@ifundefined{Second2}{}{\checkequal{\First[2]}{\Second[2]}}% + \@ifundefined{Second3}{}{\checkequal{\First[3]}{\Second[3]}}% + \@ifundefined{Second4}{}{\checkequal{\First[4]}{\Second[4]}}% + \@ifundefined{Second5}{}{\checkequal{\First[5]}{\Second[5]}}% + \else#1\fi% + \else% + \ifx\xFirst\xSecond% + \@ifundefined{Second1}{}{\checkequal{\First[1]}{\Second[1]}}% + \@ifundefined{Second2}{}{\checkequal{\First[2]}{\Second[2]}}% + \@ifundefined{Second3}{}{\checkequal{\First[3]}{\Second[3]}}% + \@ifundefined{Second4}{}{\checkequal{\First[4]}{\Second[4]}}% + \@ifundefined{Second5}{}{\checkequal{\First[5]}{\Second[5]}}% + \else#1\fi% + \fi% + }% + \else + \gdef\@fpage{\@@fpage}% + \gdef\@lpage{% + \edef\Targ{#1}% + \edef\One{A}% + \edef\xFirst{\First[1]}% + \edef\xSecond{\Second[1]}% + \ifx\xFirst\xSecond + \ifcat\One\xSecond\relax\else\@@lpage\fi% + \else#1\fi% + }% + \fi} + +%\newwrite\xx +%\immediate\openout\xx=tmpbib.tex +\gdef\@@lpage@compress#1--#2\@nil{\lpage@compress{#1}} +\gdef\@@@pages#1#2{\def\next{#2}% +% \immediate\write\xx{[\the\c@NAT@ctr.]\space [#1][#2]}% + \fpage@compress{#1}%\ifx\next\@empty\relax\else + \@@lpage@compress#2\@nil%\fi + {\@fpage\ifx\next\@empty\relax\else + --\@lpage\fi}\resetall} + +\gdef\@@@page#1{#1\resetall} + +\def\mk@empty#1{\@tempcnta=1 + \loop\ifnum\@tempcnta<6 + \expandafter\let\csname#1\the\@tempcnta\endcsname\relax + \advance\@tempcnta by 1 \repeat} +\def\resetall{\let\@lpage\@empty\let\@fpage\@empty + \def\flength{0}\def\llength{0}% + \let\@@fpage\@empty\let\@@lpage\@empty + \mk@empty{First}\mk@empty{Second}} + + +\ifdots + \gdef\xfnm[#1]{\unskip\space#1} + \def\bibinfo#1#2{\@ifnextchar.{\@@bibinfo{#1}{#2}}{\@@@bibinfo{#1}{#2}}} + \def\@@@bibinfo#1#2{\def\next{#1}% + \def\@@@pg{pages}\def\@@@au{author}% + \ifx\next\@@@pg\bibpages{#2}\else + \ifx\next\@@@au\bibauthor{#2}\else + #2\fi\fi} + \def\@@bibinfo#1#2.{\def\next{#1}% + \def\@@@pg{pages}\def\@@@au{author}% + \ifx\next\@@@pg\bibpages{#2}.\else + \ifx\next\@@@au\bibauthor{#2}\else + #2.\fi\fi} +\else + \gdef\xfnm[#1]{\unskip\space\removeDot{#1}} + \def\bibinfo#1#2{\def\next{#1}% + \def\@@@pg{pages}\def\@@@au{author}% + \ifx\next\@@@pg\bibpages{#2}\else + \ifx\next\@@@au\bibauthor{#2}\else + #2\fi\fi} +\fi + +\ifnumcompress + \def\bibpages#1{\@@bibpages#1--\\\@nil} + \def\@@bibpages#1--#2\@nil{% + \ifx\\#2\relax\@@@page{#1}\else + \@@@pages{#1}{#2}\fi} + \else + \def\bibpages#1{#1} +\fi + +\def\bibauthor#1{#1} + +\endinput + +%% +%% End of package 'numcompress.sty' +%% diff --git a/model1-num-names.bst b/model1-num-names.bst new file mode 100644 index 0000000..27b4bdc --- /dev/null +++ b/model1-num-names.bst @@ -0,0 +1,1529 @@ +%% +%% This is file `model1-num-names.bst' (Version 2.0), +%% +%% Copyright 2009-2012 Elsevier Ltd +%% +%% This file is part of the 'Elsarticle Bundle'. +%% --------------------------------------------- +%% +%% It may be distributed under the conditions of the LaTeX Project Public +%% License, either version 1.2 of this license or (at your option) any +%% later version. The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.2 or later is part of all distributions of LaTeX +%% version 1999/12/01 or later. +%% +%% $Id: model1-num-names.bst 206 2012-10-22 07:28:26Z rishi $ +%% +%% $URL: http://lenova.river-valley.com/svn/elsbst/trunk/New-Model-1/model1-num-names.bst $ +%% +%% + +ENTRY + { 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 := +} +STRINGS { s t} +FUNCTION {output.nonnull} +{ 's := + output.state mid.sentence = + { ", " * write$ } + { output.state after.block = +% { add.period$ write$ + { ", " * write$ + newline$ + "\newblock " write$ + } + { output.state before.all = + 'write$ + { add.period$ " " * write$ } + if$ + } + if$ + mid.sentence 'output.state := + } + if$ + s +} +FUNCTION {output} +{ duplicate$ empty$ + 'pop$ + 'output.nonnull + if$ +} +FUNCTION {output.check} +{ 't := + duplicate$ empty$ + { pop$ "empty " t * " in " * cite$ * warning$ } + 'output.nonnull + if$ +} +FUNCTION {fin.entry} +{ add.period$ + write$ + newline$ +} + +FUNCTION {new.block} +{ output.state before.all = + 'skip$ + { after.block 'output.state := } + if$ +} +FUNCTION {new.sentence} +{ output.state after.block = + 'skip$ + { output.state before.all = + 'skip$ + { after.sentence 'output.state := } + if$ + } + if$ +} +FUNCTION {add.blank} +{ " " * before.all 'output.state := +} + +FUNCTION {date.block} +{ + skip$ +} + +FUNCTION {not} +{ { #0 } + { #1 } + if$ +} +FUNCTION {and} +{ 'skip$ + { pop$ #0 } + if$ +} +FUNCTION {or} +{ { pop$ #1 } + 'skip$ + if$ +} +FUNCTION {new.block.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.block + if$ +} +FUNCTION {field.or.null} +{ duplicate$ empty$ + { pop$ "" } + 'skip$ + if$ +} +FUNCTION {emphasize} +{ duplicate$ empty$ + { pop$ "" } + { "\textit{" swap$ * "}" * } + if$ +} +FUNCTION {tie.or.space.prefix} +{ duplicate$ text.length$ #3 < + { "~" } + { " " } + if$ + swap$ +} + +FUNCTION {capitalize} +{ "u" change.case$ "t" change.case$ } + +FUNCTION {space.word} +{ " " swap$ * " " * } + % Here are the language-specific definitions for explicit words. + % Each function has a name bbl.xxx where xxx is the English word. + % The language selected here is ENGLISH +FUNCTION {bbl.and} +{ "and"} + +FUNCTION {bbl.etal} +{ "et~al." } + +FUNCTION {bbl.editors} +{ "eds." } + +FUNCTION {bbl.editor} +{ "ed." } + +FUNCTION {bbl.edby} +{ "edited by" } + +FUNCTION {bbl.edition} +{ "ed." } + +FUNCTION {bbl.volume} +{ "volume" } + +FUNCTION {bbl.of} +{ "of" } + +FUNCTION {bbl.number} +{ "number" } + +FUNCTION {bbl.nr} +{ "no." } + +FUNCTION {bbl.in} +{ "in" } + +FUNCTION {bbl.pages} +{ "pp." } + +FUNCTION {bbl.page} +{ "p." } + +FUNCTION {bbl.chapter} +{ "chapter" } + +FUNCTION {bbl.techrep} +{ "Technical Report" } + +FUNCTION {bbl.mthesis} +{ "Master's thesis" } + +FUNCTION {bbl.phdthesis} +{ "Ph.D. thesis" } + +MACRO {jan} {"January"} + +MACRO {feb} {"February"} + +MACRO {mar} {"March"} + +MACRO {apr} {"April"} + +MACRO {may} {"May"} + +MACRO {jun} {"June"} + +MACRO {jul} {"July"} + +MACRO {aug} {"August"} + +MACRO {sep} {"September"} + +MACRO {oct} {"October"} + +MACRO {nov} {"November"} + +MACRO {dec} {"December"} + +MACRO {acmcs} {"ACM Comput. Surv."} + +MACRO {acta} {"Acta Inf."} + +MACRO {cacm} {"Commun. ACM"} + +MACRO {ibmjrd} {"IBM J. Res. Dev."} + +MACRO {ibmsj} {"IBM Syst.~J."} + +MACRO {ieeese} {"IEEE Trans. Software Eng."} + +MACRO {ieeetc} {"IEEE Trans. Comput."} + +MACRO {ieeetcad} + {"IEEE Trans. Comput. Aid. Des."} + +MACRO {ipl} {"Inf. Process. Lett."} + +MACRO {jacm} {"J.~ACM"} + +MACRO {jcss} {"J.~Comput. Syst. Sci."} + +MACRO {scp} {"Sci. Comput. Program."} + +MACRO {sicomp} {"SIAM J. Comput."} + +MACRO {tocs} {"ACM Trans. Comput. Syst."} + +MACRO {tods} {"ACM Trans. Database Syst."} + +MACRO {tog} {"ACM Trans. Graphic."} + +MACRO {toms} {"ACM Trans. Math. Software"} + +MACRO {toois} {"ACM Trans. Office Inf. Syst."} + +MACRO {toplas} {"ACM Trans. Progr. Lang. Syst."} + +MACRO {tcs} {"Theor. Comput. Sci."} + +FUNCTION {bibinfo.check} +{ swap$ + duplicate$ missing$ + { + pop$ pop$ + "" + } + { duplicate$ empty$ + { + swap$ pop$ + } + { swap$ + "\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} +{ '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$ +} +FUNCTION {format.names.ed} +{ + format.names +} +FUNCTION {format.key} +{ empty$ + { 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.note} +{ + note empty$ + { "" } + { note #1 #1 substring$ + duplicate$ "{" = + 'skip$ + { output.state mid.sentence = + { "l" } + { "u" } + if$ + change.case$ + } + if$ + note #2 global.max$ substring$ * "note" bibinfo.check + } + if$ +} + +FUNCTION {format.title} +{ title + duplicate$ empty$ 'skip$ + { "t" change.case$ } + if$ + "title" bibinfo.check +} + +FUNCTION {format.full.names} +{'s := + "" 't := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{vv~}{ll}" format.name$ + 't := + nameptr #1 > + { + namesleft #1 > + { ", " * t * } + { + s nameptr "{ll}" format.name$ duplicate$ "others" = + { 't := } + { pop$ } + if$ + t "others" = + { + " " * bbl.etal * + } + { + numnames #2 > + { "," * } + 'skip$ + if$ + bbl.and + space.word * t * + } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {author.editor.key.full} +{ author empty$ + { editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.full.names } + if$ + } + { author format.full.names } + if$ +} + +FUNCTION {author.key.full} +{ author empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { author format.full.names } + if$ +} + +FUNCTION {editor.key.full} +{ editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.full.names } + if$ +} + +FUNCTION {make.full.names} +{ type$ "book" = + type$ "inbook" = + or + 'author.editor.key.full + { type$ "proceedings" = + 'editor.key.full + 'author.key.full + if$ + } + if$ +} + +FUNCTION {output.bibitem} +{ newline$ + "\bibitem[{" write$ + label write$ + ")" make.full.names duplicate$ short.list = + { pop$ } + { * } + if$ + "}]{" * write$ + cite$ write$ + "}" write$ + newline$ + "" + before.all 'output.state := +} + +FUNCTION {n.dashify} +{ + 't := + "" + { t empty$ not } + { t #1 #1 substring$ "-" = + { t #1 #2 substring$ "--" = not + { "--" * + t #2 global.max$ substring$ 't := + } + { { t #1 #1 substring$ "-" = } + { "-" * + t #2 global.max$ substring$ 't := + } + while$ + } + if$ + } + { t #1 #1 substring$ * + t #2 global.max$ substring$ 't := + } + if$ + } + while$ +} + +FUNCTION {word.in} +{ bbl.in + ":" * + " " * } + +FUNCTION {format.date} +{ year "year" bibinfo.check duplicate$ empty$ + { + "empty year in " cite$ * "; set to ????" * warning$ + pop$ "????" + } + 'skip$ + if$ + extra.label * +} +FUNCTION{format.year} +{ year "year" bibinfo.check duplicate$ empty$ + { "empty year in " cite$ * + "; set to ????" * + warning$ + pop$ "????" + } + { + } + if$ + extra.label * + " (" swap$ * ")" * +} +FUNCTION {format.btitle} +{ title "title" bibinfo.check + duplicate$ empty$ 'skip$ + { + } + if$ +} +FUNCTION {either.or.check} +{ empty$ + 'pop$ + { "can't use both " swap$ * " fields in " * cite$ * warning$ } + if$ +} +FUNCTION {format.bvolume} +{ volume empty$ + { "" } + { bbl.volume volume tie.or.space.prefix + "volume" bibinfo.check * * + series "series" bibinfo.check + duplicate$ empty$ 'pop$ + { swap$ bbl.of space.word * swap$ + emphasize * } + if$ + "volume and number" number either.or.check + } + if$ +} +FUNCTION {format.number.series} +{ volume empty$ + { number empty$ + { series field.or.null } + { series empty$ + { number "number" bibinfo.check } + { output.state mid.sentence = + { bbl.number } + { bbl.number capitalize } + if$ + number tie.or.space.prefix "number" bibinfo.check * * + bbl.in space.word * + series "series" bibinfo.check * + } + if$ + } + if$ + } + { "" } + if$ +} + +FUNCTION {format.edition} +{ edition duplicate$ empty$ 'skip$ + { + output.state mid.sentence = + { "l" } + { "t" } + if$ change.case$ + "edition" bibinfo.check + " " * bbl.edition * + } + if$ +} +INTEGERS { multiresult } +FUNCTION {multi.page.check} +{ 't := + #0 'multiresult := + { multiresult not + t empty$ not + and + } + { t #1 #1 substring$ + duplicate$ "-" = + swap$ duplicate$ "," = + swap$ "+" = + or or + { #1 'multiresult := } + { t #2 global.max$ substring$ 't := } + if$ + } + while$ + multiresult +} +FUNCTION {format.pages} +{ pages duplicate$ empty$ 'skip$ + { duplicate$ multi.page.check + { + bbl.pages swap$ + n.dashify + } + { + bbl.page swap$ + } + if$ + tie.or.space.prefix + "pages" bibinfo.check + * * + } + if$ +} +FUNCTION {format.journal.pages} +{ pages duplicate$ empty$ 'pop$ + { swap$ duplicate$ empty$ + { pop$ pop$ format.pages } + { + " " * + swap$ + n.dashify + "pages" bibinfo.check + * + } + if$ + } + if$ +} +FUNCTION {format.vol.num.pages} +{ volume field.or.null + duplicate$ empty$ 'skip$ + { + "volume" bibinfo.check + } + if$ + 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$ +} + +FUNCTION {format.booktitle} +{ + booktitle "booktitle" bibinfo.check +} +FUNCTION {format.in.ed.booktitle} +{ format.booktitle duplicate$ empty$ 'skip$ + { + editor "editor" format.names.ed duplicate$ empty$ 'pop$ + { + " " * + get.bbl.editor + capitalize + "(" swap$ * "), " * + * swap$ + * } + if$ + word.in swap$ * + } + if$ +} +FUNCTION {format.thesis.type} +{ type duplicate$ empty$ + 'pop$ + { swap$ pop$ + "t" change.case$ "type" bibinfo.check + } + if$ +} +FUNCTION {format.tr.number} +{ number "number" bibinfo.check + type duplicate$ empty$ + { pop$ bbl.techrep } + 'skip$ + if$ + "type" bibinfo.check + swap$ duplicate$ empty$ + { pop$ "t" change.case$ } + { tie.or.space.prefix * * } + if$ +} +FUNCTION {format.article.crossref} +{ + word.in + " \cite{" * crossref * "}" * +} +FUNCTION {format.book.crossref} +{ volume duplicate$ empty$ + { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ + pop$ word.in + } + { bbl.volume + swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word * + } + if$ + " \cite{" * crossref * "}" * +} +FUNCTION {format.incoll.inproc.crossref} +{ + word.in + " \cite{" * crossref * "}" * +} +FUNCTION {format.org.or.pub} +{ 't := + "" + address empty$ t empty$ and + 'skip$ + { + t empty$ + { address "address" bibinfo.check * + } + { t * + address empty$ + 'skip$ + { ", " * address "address" bibinfo.check * } + if$ + } + if$ + } + if$ +} +FUNCTION {format.publisher.address} +{ publisher "publisher" bibinfo.check format.org.or.pub +} + +FUNCTION {format.organization.address} +{ 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$ + 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 + 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} +{ "%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} +{ "%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} +{ "%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} +{ "%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} +{ "%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} +{ "%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} +{ "%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} +{ "%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} +{ "%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} +{ "%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} +{ "%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$ +} +INTEGERS { len } +FUNCTION {chop.word} +{ 's := + 'len := + s #1 len substring$ = + { s len #1 + global.max$ substring$ } + 's + if$ +} +FUNCTION {format.lab.names} +{ 's := + "" 't := + s #1 "{vv~}{ll}" format.name$ + s num.names$ duplicate$ + #2 > + { pop$ + " " * bbl.etal * + } + { #2 < + 'skip$ + { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = + { + " " * bbl.etal * + } + { bbl.and space.word * s #2 "{vv~}{ll}" format.name$ + * } + if$ + } + if$ + } + if$ +} + +FUNCTION {author.key.label} +{ author empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { author format.lab.names } + if$ +} + +FUNCTION {author.editor.key.label} +{ author empty$ + { editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.lab.names } + if$ + } + { author format.lab.names } + if$ +} + +FUNCTION {editor.key.label} +{ editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.lab.names } + if$ +} + +FUNCTION {calc.short.authors} +{ type$ "book" = + type$ "inbook" = + or + 'author.editor.key.label + { type$ "proceedings" = + 'editor.key.label + 'author.key.label + if$ + } + if$ + 'short.list := +} + +FUNCTION {calc.label} +{ calc.short.authors + short.list + "(" + * + year duplicate$ empty$ + { pop$ "????" } + { 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$ +} + +FUNCTION {sort.format.title} +{ 't := + "A " #2 + "An " #3 + "The " #4 t chop.word + chop.word + chop.word + sortify + #1 global.max$ substring$ +} +FUNCTION {author.sort} +{ author empty$ + { key empty$ + { "to sort, need author or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { author sort.format.names } + if$ +} +FUNCTION {author.editor.sort} +{ author empty$ + { editor empty$ + { key empty$ + { "to sort, need author, editor, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { editor sort.format.names } + if$ + } + { author sort.format.names } + if$ +} +FUNCTION {editor.sort} +{ editor empty$ + { key empty$ + { "to sort, need editor or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { editor sort.format.names } + if$ +} +FUNCTION {presort} +{ calc.label + label sortify + " " + * + type$ "book" = + type$ "inbook" = + or + 'author.editor.sort + { type$ "proceedings" = + 'editor.sort + 'author.sort + if$ + } + if$ + #1 entry.max$ substring$ + 'sort.label := + sort.label + * + " " + * + title field.or.null + sort.format.title + * + #1 entry.max$ substring$ + 'sort.key$ := +} + +ITERATE {presort} +%SORT +STRINGS { last.label next.extra } +INTEGERS { last.extra.num number.label } +FUNCTION {initialize.extra.label.stuff} +{ #0 int.to.chr$ 'last.label := + "" 'next.extra := + #0 'last.extra.num := + #0 'number.label := +} +FUNCTION {forward.pass} +{ last.label label = + { last.extra.num #1 + 'last.extra.num := + last.extra.num int.to.chr$ 'extra.label := + } + { "a" chr.to.int$ 'last.extra.num := + "" 'extra.label := + label 'last.label := + } + if$ + number.label #1 + 'number.label := +} +FUNCTION {reverse.pass} +{ next.extra "b" = + { "a" 'extra.label := } + 'skip$ + if$ + extra.label 'next.extra := + extra.label + duplicate$ empty$ + 'skip$ + { "{\natexlab{" swap$ * "}}" * } + if$ + 'extra.label := + label extra.label * 'label := +} +EXECUTE {initialize.extra.label.stuff} +ITERATE {forward.pass} +REVERSE {reverse.pass} +FUNCTION {bib.sort.order} +{ sort.label + " " + * + year field.or.null sortify + * + " " + * + title field.or.null + sort.format.title + * + #1 entry.max$ substring$ + 'sort.key$ := +} +ITERATE {bib.sort.order} +%SORT +FUNCTION {begin.bib} +{ preamble$ empty$ + 'skip$ + { preamble$ write$ newline$ } + if$ + "\begin{thebibliography}{" number.label int.to.str$ * "}" * + write$ newline$ + "\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi" + write$ newline$ + "\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$ +} +EXECUTE {end.bib} +%% End of customized bst file +%% +%% End of file `model1-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/model1a-num-names.bst b/model1a-num-names.bst new file mode 100644 index 0000000..551bbec --- /dev/null +++ b/model1a-num-names.bst @@ -0,0 +1,1520 @@ +%% +%% This is file `model1a-num-names.bst' (Version 2.0), +%% +%% Copyright 2009-2012 Elsevier Ltd +%% +%% This file is part of the 'Elsarticle Bundle'. +%% --------------------------------------------- +%% +%% It may be distributed under the conditions of the LaTeX Project Public +%% License, either version 1.2 of this license or (at your option) any +%% later version. The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.2 or later is part of all distributions of LaTeX +%% version 1999/12/01 or later. +%% +%% $Id: model1a-num-names.bst 207 2012-10-22 07:29:13Z rishi $ +%% +%% $URL: http://lenova.river-valley.com/svn/elsbst/trunk/New-Model-1a/model1a-num-names.bst $ +%% +%% + +ENTRY + { 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 := +} +STRINGS { s t} +FUNCTION {output.nonnull} +{ 's := + output.state mid.sentence = + { ", " * write$ } + { output.state after.block = + { add.period$ write$ + newline$ + "\newblock " write$ + } + { output.state before.all = + 'write$ + { add.period$ " " * write$ } + if$ + } + if$ + mid.sentence 'output.state := + } + if$ + s +} +FUNCTION {output} +{ duplicate$ empty$ + 'pop$ + 'output.nonnull + if$ +} +FUNCTION {output.check} +{ 't := + duplicate$ empty$ + { pop$ "empty " t * " in " * cite$ * warning$ } + 'output.nonnull + if$ +} +FUNCTION {fin.entry} +{ add.period$ + write$ + newline$ +} + +FUNCTION {new.block} +{ output.state before.all = + 'skip$ + { after.block 'output.state := } + if$ +} +FUNCTION {new.sentence} +{ output.state after.block = + 'skip$ + { output.state before.all = + 'skip$ + { after.sentence 'output.state := } + if$ + } + if$ +} +FUNCTION {add.blank} +{ " " * before.all 'output.state := +} + +FUNCTION {date.block} +{ + skip$ +} + +FUNCTION {not} +{ { #0 } + { #1 } + if$ +} +FUNCTION {and} +{ 'skip$ + { pop$ #0 } + if$ +} +FUNCTION {or} +{ { pop$ #1 } + 'skip$ + if$ +} +FUNCTION {new.block.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.block + if$ +} +FUNCTION {field.or.null} +{ duplicate$ empty$ + { pop$ "" } + 'skip$ + if$ +} +FUNCTION {emphasize} +{ duplicate$ empty$ + { pop$ "" } + { "\textit{" swap$ * "}" * } + if$ +} +FUNCTION {tie.or.space.prefix} +{ duplicate$ text.length$ #3 < + { "~" } + { " " } + if$ + swap$ +} + +FUNCTION {capitalize} +{ "u" change.case$ "t" change.case$ } + +FUNCTION {space.word} +{ " " swap$ * " " * } + % Here are the language-specific definitions for explicit words. + % Each function has a name bbl.xxx where xxx is the English word. + % The language selected here is ENGLISH +FUNCTION {bbl.and} +{ "and"} + +FUNCTION {bbl.etal} +{ "et~al." } + +FUNCTION {bbl.editors} +{ "eds." } + +FUNCTION {bbl.editor} +{ "ed." } + +FUNCTION {bbl.edby} +{ "edited by" } + +FUNCTION {bbl.edition} +{ "ed." } + +FUNCTION {bbl.volume} +{ "volume" } + +FUNCTION {bbl.of} +{ "of" } + +FUNCTION {bbl.number} +{ "number" } + +FUNCTION {bbl.nr} +{ "no." } + +FUNCTION {bbl.in} +{ "in" } + +FUNCTION {bbl.pages} +{ "pp." } + +FUNCTION {bbl.page} +{ "p." } + +FUNCTION {bbl.chapter} +{ "chapter" } + +FUNCTION {bbl.techrep} +{ "Technical Report" } + +FUNCTION {bbl.mthesis} +{ "Master's thesis" } + +FUNCTION {bbl.phdthesis} +{ "Ph.D. thesis" } + +MACRO {jan} {"January"} + +MACRO {feb} {"February"} + +MACRO {mar} {"March"} + +MACRO {apr} {"April"} + +MACRO {may} {"May"} + +MACRO {jun} {"June"} + +MACRO {jul} {"July"} + +MACRO {aug} {"August"} + +MACRO {sep} {"September"} + +MACRO {oct} {"October"} + +MACRO {nov} {"November"} + +MACRO {dec} {"December"} + +MACRO {acmcs} {"ACM Comput. Surv."} + +MACRO {acta} {"Acta Inf."} + +MACRO {cacm} {"Commun. ACM"} + +MACRO {ibmjrd} {"IBM J. Res. Dev."} + +MACRO {ibmsj} {"IBM Syst.~J."} + +MACRO {ieeese} {"IEEE Trans. Software Eng."} + +MACRO {ieeetc} {"IEEE Trans. Comput."} + +MACRO {ieeetcad} + {"IEEE Trans. Comput. Aid. Des."} + +MACRO {ipl} {"Inf. Process. Lett."} + +MACRO {jacm} {"J.~ACM"} + +MACRO {jcss} {"J.~Comput. Syst. Sci."} + +MACRO {scp} {"Sci. Comput. Program."} + +MACRO {sicomp} {"SIAM J. Comput."} + +MACRO {tocs} {"ACM Trans. Comput. Syst."} + +MACRO {tods} {"ACM Trans. Database Syst."} + +MACRO {tog} {"ACM Trans. Graphic."} + +MACRO {toms} {"ACM Trans. Math. Software"} + +MACRO {toois} {"ACM Trans. Office Inf. Syst."} + +MACRO {toplas} {"ACM Trans. Progr. Lang. Syst."} + +MACRO {tcs} {"Theor. Comput. Sci."} + +FUNCTION {bibinfo.check} +{ swap$ + duplicate$ missing$ + { + pop$ pop$ + "" + } + { duplicate$ empty$ + { + swap$ pop$ + } + { swap$ + "\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} +{ '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$ +} +FUNCTION {format.names.ed} +{ + format.names +} + +FUNCTION {format.key} +{ empty$ + { key field.or.null } + { "" } + if$ +} + +FUNCTION {format.authors} +{ author "author" format.names + duplicate$ empty$ 'skip$ + { collaboration "collaboration" bibinfo.check + duplicate$ empty$ 'skip$ + { " (" swap$ * ")" * } + if$ + * + } + if$ +} + +FUNCTION {get.bbl.editor} +{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ } + +FUNCTION {format.editors} +{ editor "editor" format.names duplicate$ empty$ 'skip$ + { + " " * + get.bbl.editor + capitalize + "(" swap$ * ")" * + * + } + if$ +} +FUNCTION {format.note} +{ + note empty$ + { "" } + { note #1 #1 substring$ + duplicate$ "{" = + 'skip$ + { output.state mid.sentence = + { "l" } + { "u" } + if$ + change.case$ + } + if$ + note #2 global.max$ substring$ * "note" bibinfo.check + } + if$ +} + +FUNCTION {format.title} +{ title + duplicate$ empty$ 'skip$ + { "t" change.case$ } + if$ + "title" bibinfo.check +} + +FUNCTION {format.full.names} +{'s := + "" 't := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{vv~}{ll}" format.name$ + 't := + nameptr #1 > + { + namesleft #1 > + { ", " * t * } + { + s nameptr "{ll}" format.name$ duplicate$ "others" = + { 't := } + { pop$ } + if$ + t "others" = + { + " " * bbl.etal * + } + { + numnames #2 > + { "," * } + 'skip$ + if$ + bbl.and + space.word * t * + } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {author.editor.key.full} +{ author empty$ + { editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.full.names } + if$ + } + { author format.full.names } + if$ +} + +FUNCTION {author.key.full} +{ author empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { author format.full.names } + if$ +} + +FUNCTION {editor.key.full} +{ editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.full.names } + if$ +} + +FUNCTION {make.full.names} +{ type$ "book" = + type$ "inbook" = + or + 'author.editor.key.full + { type$ "proceedings" = + 'editor.key.full + 'author.key.full + if$ + } + if$ +} + +FUNCTION {output.bibitem} +{ newline$ + "\bibitem[{" write$ + label write$ + ")" make.full.names duplicate$ short.list = + { pop$ } + { * } + if$ + "}]{" * write$ + cite$ write$ + "}" write$ + newline$ + "" + before.all 'output.state := +} + +FUNCTION {n.dashify} +{ + 't := + "" + { t empty$ not } + { t #1 #1 substring$ "-" = + { t #1 #2 substring$ "--" = not + { "--" * + t #2 global.max$ substring$ 't := + } + { { t #1 #1 substring$ "-" = } + { "-" * + t #2 global.max$ substring$ 't := + } + while$ + } + if$ + } + { t #1 #1 substring$ * + t #2 global.max$ substring$ 't := + } + if$ + } + while$ +} + +FUNCTION {word.in} +{ bbl.in + ":" * + " " * } + +FUNCTION {format.date} +{ year "year" bibinfo.check duplicate$ empty$ + { + "empty year in " cite$ * "; set to ????" * warning$ + pop$ "????" + } + 'skip$ + if$ + extra.label * +} +FUNCTION{format.year} +{ year "year" bibinfo.check duplicate$ empty$ + { "empty year in " cite$ * + "; set to ????" * + warning$ + pop$ "????" + } + { + } + if$ + extra.label * + " (" swap$ * ")" * +} +FUNCTION {format.btitle} +{ title "title" bibinfo.check + duplicate$ empty$ 'skip$ + { + } + if$ +} +FUNCTION {either.or.check} +{ empty$ + 'pop$ + { "can't use both " swap$ * " fields in " * cite$ * warning$ } + if$ +} +FUNCTION {format.bvolume} +{ volume empty$ + { "" } + { bbl.volume volume tie.or.space.prefix + "volume" bibinfo.check * * + series "series" bibinfo.check + duplicate$ empty$ 'pop$ + { swap$ bbl.of space.word * swap$ + emphasize * } + if$ + "volume and number" number either.or.check + } + if$ +} +FUNCTION {format.number.series} +{ volume empty$ + { number empty$ + { series field.or.null } + { series empty$ + { number "number" bibinfo.check } + { output.state mid.sentence = + { bbl.number } + { bbl.number capitalize } + if$ + number tie.or.space.prefix "number" bibinfo.check * * + bbl.in space.word * + series "series" bibinfo.check * + } + if$ + } + if$ + } + { "" } + if$ +} + +FUNCTION {format.edition} +{ edition duplicate$ empty$ 'skip$ + { + output.state mid.sentence = + { "l" } + { "t" } + if$ change.case$ + "edition" bibinfo.check + " " * bbl.edition * + } + if$ +} +INTEGERS { multiresult } +FUNCTION {multi.page.check} +{ 't := + #0 'multiresult := + { multiresult not + t empty$ not + and + } + { t #1 #1 substring$ + duplicate$ "-" = + swap$ duplicate$ "," = + swap$ "+" = + or or + { #1 'multiresult := } + { t #2 global.max$ substring$ 't := } + if$ + } + while$ + multiresult +} +FUNCTION {format.pages} +{ pages duplicate$ empty$ 'skip$ + { duplicate$ multi.page.check + { + bbl.pages swap$ + n.dashify + } + { + bbl.page swap$ + } + if$ + tie.or.space.prefix + "pages" bibinfo.check + * * + } + if$ +} +FUNCTION {format.journal.pages} +{ pages duplicate$ empty$ 'pop$ + { swap$ duplicate$ empty$ + { pop$ pop$ format.pages } + { + " " * + swap$ + n.dashify + "pages" bibinfo.check + * + } + if$ + } + if$ +} +FUNCTION {format.vol.num.pages} +{ volume field.or.null + duplicate$ empty$ 'skip$ + { + "volume" bibinfo.check + } + if$ + 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$ +} + +FUNCTION {format.booktitle} +{ + booktitle "booktitle" bibinfo.check +} +FUNCTION {format.in.ed.booktitle} +{ format.booktitle duplicate$ empty$ 'skip$ + { + editor "editor" format.names.ed duplicate$ empty$ 'pop$ + { + " " * + get.bbl.editor + capitalize + "(" swap$ * "), " * + * swap$ + * } + if$ + word.in swap$ * + } + if$ +} +FUNCTION {format.thesis.type} +{ type duplicate$ empty$ + 'pop$ + { swap$ pop$ + "t" change.case$ "type" bibinfo.check + } + if$ +} +FUNCTION {format.tr.number} +{ number "number" bibinfo.check + type duplicate$ empty$ + { pop$ bbl.techrep } + 'skip$ + if$ + "type" bibinfo.check + swap$ duplicate$ empty$ + { pop$ "t" change.case$ } + { tie.or.space.prefix * * } + if$ +} +FUNCTION {format.article.crossref} +{ + word.in + " \cite{" * crossref * "}" * +} +FUNCTION {format.book.crossref} +{ volume duplicate$ empty$ + { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ + pop$ word.in + } + { bbl.volume + swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word * + } + if$ + " \cite{" * crossref * "}" * +} +FUNCTION {format.incoll.inproc.crossref} +{ + word.in + " \cite{" * crossref * "}" * +} +FUNCTION {format.org.or.pub} +{ 't := + "" + address empty$ t empty$ and + 'skip$ + { + t empty$ + { address "address" bibinfo.check * + } + { t * + address empty$ + 'skip$ + { ", " * address "address" bibinfo.check * } + if$ + } + if$ + } + if$ +} +FUNCTION {format.publisher.address} +{ publisher "publisher" bibinfo.check format.org.or.pub +} + +FUNCTION {format.organization.address} +{ 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$ + print.url output + fin.entry +} + + +FUNCTION {article} +{ "%Type = Article" write$ + output.bibitem + format.authors "author" output.check + author format.key output + 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} +{ "%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 + format.note output + fin.entry +} + +FUNCTION {inbook} +{ "%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} +{ "%Type = Incollection" write$ + output.bibitem + format.authors "author" output.check + author format.key output + crossref missing$ + { format.in.ed.booktitle "booktitle" output.check + format.bvolume output + format.number.series output + format.publisher.address output + format.edition output + format.date output + } + { format.incoll.inproc.crossref output.nonnull + } + if$ + 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} +{ "%Type = Inproceedings" write$ + output.bibitem + format.authors "author" output.check + author format.key output + 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 + format.date output + } + if$ + } + { format.incoll.inproc.crossref output.nonnull + } + if$ + 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} +{ "%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} +{ "%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} +{ "%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} +{ "%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} +{ "%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} +{ "%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} +{ "%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$ +} +INTEGERS { len } +FUNCTION {chop.word} +{ 's := + 'len := + s #1 len substring$ = + { s len #1 + global.max$ substring$ } + 's + if$ +} +FUNCTION {format.lab.names} +{ 's := + "" 't := + s #1 "{vv~}{ll}" format.name$ + s num.names$ duplicate$ + #2 > + { pop$ + " " * bbl.etal * + } + { #2 < + 'skip$ + { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = + { + " " * bbl.etal * + } + { bbl.and space.word * s #2 "{vv~}{ll}" format.name$ + * } + if$ + } + if$ + } + if$ +} + +FUNCTION {author.key.label} +{ author empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { author format.lab.names } + if$ +} + +FUNCTION {author.editor.key.label} +{ author empty$ + { editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.lab.names } + if$ + } + { author format.lab.names } + if$ +} + +FUNCTION {editor.key.label} +{ editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.lab.names } + if$ +} + +FUNCTION {calc.short.authors} +{ type$ "book" = + type$ "inbook" = + or + 'author.editor.key.label + { type$ "proceedings" = + 'editor.key.label + 'author.key.label + if$ + } + if$ + 'short.list := +} + +FUNCTION {calc.label} +{ calc.short.authors + short.list + "(" + * + year duplicate$ empty$ + { pop$ "????" } + { purify$ #-1 #4 substring$ } + if$ + * + 'label := +} + +FUNCTION {sort.format.names} +{ 's := + #1 'nameptr := + "" + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{ll{ }}{ f{ }}{ jj{ }}" + format.name$ 't := + nameptr #1 > + { + " " * + namesleft #1 = t "others" = and + { "zzzzz" * } + { t sortify * } + if$ + } + { t sortify * } + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {sort.format.title} +{ 't := + "A " #2 + "An " #3 + "The " #4 t chop.word + chop.word + chop.word + sortify + #1 global.max$ substring$ +} +FUNCTION {author.sort} +{ author empty$ + { key empty$ + { "to sort, need author or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { author sort.format.names } + if$ +} +FUNCTION {author.editor.sort} +{ author empty$ + { editor empty$ + { key empty$ + { "to sort, need author, editor, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { editor sort.format.names } + if$ + } + { author sort.format.names } + if$ +} +FUNCTION {editor.sort} +{ editor empty$ + { key empty$ + { "to sort, need editor or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { editor sort.format.names } + if$ +} +FUNCTION {presort} +{ calc.label + label sortify + " " + * + type$ "book" = + type$ "inbook" = + or + 'author.editor.sort + { type$ "proceedings" = + 'editor.sort + 'author.sort + if$ + } + if$ + #1 entry.max$ substring$ + 'sort.label := + sort.label + * + " " + * + title field.or.null + sort.format.title + * + #1 entry.max$ substring$ + 'sort.key$ := +} + +ITERATE {presort} +%SORT +STRINGS { last.label next.extra } +INTEGERS { last.extra.num number.label } +FUNCTION {initialize.extra.label.stuff} +{ #0 int.to.chr$ 'last.label := + "" 'next.extra := + #0 'last.extra.num := + #0 'number.label := +} +FUNCTION {forward.pass} +{ last.label label = + { last.extra.num #1 + 'last.extra.num := + last.extra.num int.to.chr$ 'extra.label := + } + { "a" chr.to.int$ 'last.extra.num := + "" 'extra.label := + label 'last.label := + } + if$ + number.label #1 + 'number.label := +} +FUNCTION {reverse.pass} +{ next.extra "b" = + { "a" 'extra.label := } + 'skip$ + if$ + extra.label 'next.extra := + extra.label + duplicate$ empty$ + 'skip$ + { "{\natexlab{" swap$ * "}}" * } + if$ + 'extra.label := + label extra.label * 'label := +} +EXECUTE {initialize.extra.label.stuff} +ITERATE {forward.pass} +REVERSE {reverse.pass} +FUNCTION {bib.sort.order} +{ sort.label + " " + * + year field.or.null sortify + * + " " + * + title field.or.null + sort.format.title + * + #1 entry.max$ substring$ + 'sort.key$ := +} +ITERATE {bib.sort.order} +%SORT +FUNCTION {begin.bib} +{ preamble$ empty$ + 'skip$ + { preamble$ write$ newline$ } + if$ + "\begin{thebibliography}{" number.label int.to.str$ * "}" * + write$ newline$ + "\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$ +} +EXECUTE {end.bib} +%% End of customized bst file +%% +%% End of file `model1a-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/model2-names.bst b/model2-names.bst new file mode 100644 index 0000000..877f10c --- /dev/null +++ b/model2-names.bst @@ -0,0 +1,1656 @@ +%% +%% This is file `model2-names.bst' (Version 2.0), +%% +%% Copyright 2009-2013 Elsevier Ltd +%% +%% This file is part of the 'Elsarticle Bundle'. +%% --------------------------------------------- +%% +%% It may be distributed under the conditions of the LaTeX Project Public +%% License, either version 1.2 of this license or (at your option) any +%% later version. The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.2 or later is part of all distributions of LaTeX +%% version 1999/12/01 or later. +%% +%% $Id: model2-names.bst 217 2013-03-13 11:50:49Z rishi $ +%% +%% $URL: http://lenova.river-valley.com/svn/elsbst/trunk/New-Model-2/model2-names.bst $ +%% + +ENTRY + { address + archive + 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 := +} +STRINGS { s t} +FUNCTION {output.comma} +{ ", " * write$} + +FUNCTION {output.nonnull} +{ 's := + output.state mid.sentence = + { ". " * write$ } + { output.state after.block = + { add.period$ write$ + newline$ + "\newblock " write$ + } + { 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$ + } + if$ + mid.sentence 'output.state := + } + if$ + s +} +FUNCTION {output} +{ duplicate$ empty$ + 'pop$ + 'output.nonnull + if$ +} +FUNCTION {output.check} +{ 't := + duplicate$ empty$ + { pop$ "empty " t * " in " * cite$ * warning$ } + 'output.nonnull + if$ +} +FUNCTION {output.book.check} +{ 't := + duplicate$ empty$ + { pop$ "empty " t * " in " * cite$ * warning$ } + 'output.nonnull + if$ +} +FUNCTION {fin.entry} +{ add.period$ + write$ + newline$ +} + +FUNCTION {new.block} +{ output.state before.all = + 'skip$ + { after.block 'output.state := } + if$ +} +FUNCTION {new.sentence} +{ output.state after.block = + 'skip$ + { output.state before.all = + 'skip$ + { after.sentence 'output.state := } + if$ + } + if$ +} +FUNCTION {add.blank} +{ " " * before.all 'output.state := +} + +FUNCTION {date.block} +{ + new.block +} + +FUNCTION {not} +{ { #0 } + { #1 } + if$ +} +FUNCTION {and} +{ 'skip$ + { pop$ #0 } + if$ +} +FUNCTION {or} +{ { pop$ #1 } + 'skip$ + if$ +} +FUNCTION {new.block.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.block + if$ +} +FUNCTION {field.or.null} +{ duplicate$ empty$ + { pop$ "" } + 'skip$ + if$ +} +FUNCTION {emphasize} +{ duplicate$ empty$ + { pop$ "" } + { "\textit{" swap$ * "}" * } + if$ +} +FUNCTION {tie.or.space.prefix} +{ duplicate$ text.length$ #3 < + { "~" } + { " " } + if$ + swap$ +} + +FUNCTION {capitalize} +{ "u" change.case$ "t" change.case$ } + +FUNCTION {space.word} +{ " " swap$ * " " * } + % Here are the language-specific definitions for explicit words. + % Each function has a name bbl.xxx where xxx is the English word. + % The language selected here is ENGLISH +FUNCTION {bbl.and} +{ "and"} + +FUNCTION {bbl.etal} +{ "et~al." } + +FUNCTION {bbl.editors} +{ "Eds." } + +FUNCTION {bbl.editor} +{ "Ed." } + +FUNCTION {bbl.edby} +{ "edited by" } + +FUNCTION {bbl.edition} +{ "ed." } + +FUNCTION {bbl.volume} +{ "volume" } + +FUNCTION {bbl.of} +{ "of" } + +FUNCTION {bbl.number} +{ "number" } + +FUNCTION {bbl.nr} +{ "no." } + +FUNCTION {bbl.in} +{ "in" } + +FUNCTION {bbl.pages} +{ "pp." } + +FUNCTION {bbl.page} +{ "p." } + +FUNCTION {bbl.chapter} +{ "chapter" } + +FUNCTION {bbl.techrep} +{ "Technical Report" } + +FUNCTION {bbl.mthesis} +{ "Master's thesis" } + +FUNCTION {bbl.phdthesis} +{ "Ph.D. thesis" } + +MACRO {jan} {"January"} + +MACRO {feb} {"February"} + +MACRO {mar} {"March"} + +MACRO {apr} {"April"} + +MACRO {may} {"May"} + +MACRO {jun} {"June"} + +MACRO {jul} {"July"} + +MACRO {aug} {"August"} + +MACRO {sep} {"September"} + +MACRO {oct} {"October"} + +MACRO {nov} {"November"} + +MACRO {dec} {"December"} + +MACRO {acmcs} {"ACM Comput. Surv."} + +MACRO {acta} {"Acta Inf."} + +MACRO {cacm} {"Commun. ACM"} + +MACRO {ibmjrd} {"IBM J. Res. Dev."} + +MACRO {ibmsj} {"IBM Syst.~J."} + +MACRO {ieeese} {"IEEE Trans. Software Eng."} + +MACRO {ieeetc} {"IEEE Trans. Comput."} + +MACRO {ieeetcad} + {"IEEE Trans. Comput. Aid. Des."} + +MACRO {ipl} {"Inf. Process. Lett."} + +MACRO {jacm} {"J.~ACM"} + +MACRO {jcss} {"J.~Comput. Syst. Sci."} + +MACRO {scp} {"Sci. Comput. Program."} + +MACRO {sicomp} {"SIAM J. Comput."} + +MACRO {tocs} {"ACM Trans. Comput. Syst."} + +MACRO {tods} {"ACM Trans. Database Syst."} + +MACRO {tog} {"ACM Trans. Graphic."} + +MACRO {toms} {"ACM Trans. Math. Software"} + +MACRO {toois} {"ACM Trans. Office Inf. Syst."} + +MACRO {toplas} {"ACM Trans. Progr. Lang. Syst."} + +MACRO {tcs} {"Theor. Comput. Sci."} + +%% Begin - Added on March 13, 2013 + +MACRO {aj} {"Astron. J."} +MACRO {actaa} {"Acta Astron."} +MACRO {araa} {"Annu. Rev. Astron. Astrophys."} +MACRO {apj} {"Astrophys. J."} +MACRO {apjl} {"Astrophys. J. Lett."} +MACRO {apjs} {"Astrophys. J. Suppl. S"} +MACRO {ao} {"Appl. Optics"} +MACRO {apss} {"Astrophys. Space Sci."} +MACRO {aap} {"Astronom. Astrophys."} +MACRO {aapr} {"Astron. Astrophys Rev"} +MACRO {aaps} {"Astron. Astrophys. Sup."} +MACRO {azh} {"Astron. Zh+"} +MACRO {caa} {"Chinese Astron. Astr."} +MACRO {icarus} {"Icarus"} +MACRO {jcap} {"J. Cosmol. Astropart. Phys."} +MACRO {jrasc} {"J. Roy. Astron. Soc. Can."} +MACRO {memras} {"Memoirs of the RAS"} +MACRO {mnras} {"Mon. Not. R. Astron. Soc."} +MACRO {na} {"New Astron."} +MACRO {nar} {"New Astron. Rev."} +MACRO {pra} {"Phys. Rev. A"} +MACRO {prb} {"Phys. Rev. B"} +MACRO {prc} {"Phys. Rev. C"} +MACRO {prd} {"Phys. Rev. D"} +MACRO {pre} {"Phys. Rev. E"} +MACRO {prl} {"Phys. Rev. Lett"} +MACRO {pasa} {"Publ. Astron. Soc. Aust."} +MACRO {pasp} {"Publ. Astron. Soc. Pac."} +MACRO {pasj} {"Publ. Astron. Soc. Jpn."} +MACRO {rmxaa} {"Rev. Mex. Astron. Astr."} +MACRO {rjras} {"Q. J. Roy. Astron. Soc."} +MACRO {skytel} {"Sky Telescope"} +MACRO {solphys} {"Sol. Phys."} +MACRO {sovast} {"Sov. Astron."} +MACRO {ssr} {"Space Sci. Rev."} +MACRO {zap} {"Zeitschrift fuer Astrophysik"} +MACRO {nat} {"Nature"} +MACRO {iaucirc} {"IAU Cirulars"} +MACRO {gca} {"Geochim. Cosmochim. Ac."} +MACRO {grl} {"Geophys. Res. Lett."} +MACRO {jcp} {"J. Chem. Phys."} +MACRO {jgr} {"J. Geophys. Res."} +MACRO {jqsrt} {"J. Quant. Spectrosc. RA"} +MACRO {nphysa} {"Nucl. Phys. A"} +MACRO {physrep} {"Phys. Rep."} +MACRO {physscr} {"Phys. Scrip."} +MACRO {planss} {"Planet. Space Sci."} +MACRO {baas} {"Bull. Aust. Acoust. Soc"} +MACRO {aplett} {"Astrophys. Lett."} +MACRO {procspie} {"Proc. SPIE"} +MACRO {cjaa} {"Chinese J. Astron. Ast."} +MACRO {fcp} {"Fundam. Cosm. Phys."} +MACRO {memsai} {"Mem. Soc. Astron. Ital."} +MACRO {bain} {"Bull. Astron. Inst. Neth., Suppl. Ser."} + +%% End - Added on March 13, 2013 + + +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} +{ 'bibinfo := + duplicate$ empty$ 'skip$ { + 's := + "" 't := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{vv~}{ll}{, jj}{, f{.}.}" + format.name$ + bibinfo bibinfo.check + 't := + nameptr #1 > + { + namesleft #1 > + { ", " * t * } + { + "," * + s nameptr "{ll}" format.name$ duplicate$ "others" = + { 't := } + { pop$ } + if$ + t "others" = + { + " " * bbl.etal * + } + { " " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ + } if$ +} +FUNCTION {format.names.ed} +{ + format.names +} +FUNCTION {format.key} +{ empty$ + { key field.or.null } + { "" } + if$ +} + +FUNCTION {format.authors} +{ author "author" format.names + duplicate$ empty$ 'skip$ + { collaboration "collaboration" bibinfo.check + duplicate$ empty$ 'skip$ + { " (" swap$ * ")" * } + if$ + * + } + if$ +} + +FUNCTION {get.bbl.editor} +{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ } + +FUNCTION {format.editors} +{ editor "editor" format.names duplicate$ empty$ 'skip$ + { + " " * + get.bbl.editor + capitalize + "(" swap$ * ")" * + * + } + if$ +} +FUNCTION {format.note} +{ + note empty$ + { "" } + { note #1 #1 substring$ + duplicate$ "{" = + 'skip$ + { output.state mid.sentence = + { "l" } + { "u" } + if$ + change.case$ + } + if$ + note #2 global.max$ substring$ * "note" bibinfo.check + } + if$ +} + +FUNCTION {format.title} +{ title + duplicate$ empty$ 'skip$ + { "t" change.case$ } + if$ + "title" bibinfo.check +} +FUNCTION {format.full.names} +{'s := + "" 't := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{vv~}{ll}" format.name$ + 't := + nameptr #1 > + { + namesleft #1 > + { ", " * t * } + { + s nameptr "{ll}" format.name$ duplicate$ "others" = + { 't := } + { pop$ } + if$ + t "others" = + { + " " * bbl.etal * + } + { + bbl.and + space.word * t * + } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {author.editor.key.full} +{ author empty$ + { editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.full.names } + if$ + } + { author format.full.names } + if$ +} + +FUNCTION {author.key.full} +{ author empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { author format.full.names } + if$ +} + +FUNCTION {editor.key.full} +{ editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.full.names } + if$ +} + +FUNCTION {make.full.names} +{ type$ "book" = + type$ "inbook" = + or + 'author.editor.key.full + { type$ "proceedings" = + 'editor.key.full + 'author.key.full + if$ + } + if$ +} + +FUNCTION {output.bibitem} +{ newline$ + "\bibitem[{" write$ + label write$ + ")" make.full.names duplicate$ short.list = + { pop$ } + { * } + if$ + "}]{" * write$ + cite$ write$ + "}" write$ + newline$ + "" + before.all 'output.state := +} + +FUNCTION {n.dashify} +{ + 't := + "" + { t empty$ not } + { t #1 #1 substring$ "-" = + { t #1 #2 substring$ "--" = not + { "--" * + t #2 global.max$ substring$ 't := + } + { { t #1 #1 substring$ "-" = } + { "-" * + t #2 global.max$ substring$ 't := + } + while$ + } + if$ + } + { t #1 #1 substring$ * + t #2 global.max$ substring$ 't := + } + if$ + } + while$ +} + +FUNCTION {word.in} +{ bbl.in %capitalize + ":" * + " " * } + +FUNCTION {format.date} +{ year "year" bibinfo.check duplicate$ empty$ + { + } + 'skip$ + if$ + extra.label * + before.all 'output.state := + ", " swap$ * +} +FUNCTION {format.btitle} +{ title "title" bibinfo.check + duplicate$ empty$ 'skip$ + { + } + if$ +} +FUNCTION {either.or.check} +{ empty$ + 'pop$ + { "can't use both " swap$ * " fields in " * cite$ * warning$ } + if$ +} +FUNCTION {format.bvolume} +{ volume empty$ + { "" } + { bbl.volume volume tie.or.space.prefix + "volume" bibinfo.check * * + series "series" bibinfo.check + duplicate$ empty$ 'pop$ + { swap$ bbl.of space.word * swap$ + emphasize * } + if$ + "volume and number" number either.or.check + } + if$ +} +FUNCTION {format.number.series} +{ volume empty$ + { number empty$ + { series field.or.null } + { series empty$ + { number "number" bibinfo.check } + { output.state mid.sentence = + { bbl.number } + { bbl.number capitalize } + if$ + number tie.or.space.prefix "number" bibinfo.check * * + bbl.in space.word * + series "series" bibinfo.check * + } + if$ + } + if$ + } + { "" } + if$ +} + +FUNCTION {format.edition} +{ edition duplicate$ empty$ 'skip$ + { + output.state mid.sentence = + { "l" } + { "t" } + if$ change.case$ + "edition" bibinfo.check + " " * bbl.edition * + } + if$ +} +INTEGERS { multiresult } +FUNCTION {multi.page.check} +{ 't := + #0 'multiresult := + { multiresult not + t empty$ not + and + } + { t #1 #1 substring$ + duplicate$ "-" = + swap$ duplicate$ "," = + swap$ "+" = + or or + { #1 'multiresult := } + { t #2 global.max$ substring$ 't := } + if$ + } + while$ + multiresult +} +%FUNCTION {format.pages} +%{ pages duplicate$ empty$ 'skip$ +% { duplicate$ multi.page.check +% { +% n.dashify +% } +% { +% } +% if$ +% "pages" bibinfo.check +% } +% if$ +%} + +FUNCTION {format.pages} +{ pages duplicate$ empty$ 'skip$ + { duplicate$ multi.page.check + { + bbl.pages swap$ + n.dashify + } + { + bbl.page swap$ + } + if$ + tie.or.space.prefix + "pages" bibinfo.check + * * + } + if$ +} + +FUNCTION {format.journal.pages} +{ pages duplicate$ empty$ 'pop$ + { swap$ duplicate$ empty$ + { pop$ pop$ format.pages } + { + ", " * + swap$ + n.dashify + "pages" bibinfo.check + * + } + if$ + } + if$ +} +FUNCTION {format.vol.num.pages} +{ volume field.or.null + duplicate$ empty$ 'skip$ + { + "volume" bibinfo.check + } + if$ +} + +FUNCTION {format.chapter.pages} +{ chapter empty$ + { "" } + { type empty$ + { bbl.chapter } + { type "l" change.case$ + "type" bibinfo.check + } + if$ + chapter tie.or.space.prefix + "chapter" bibinfo.check + * * + } + if$ +} + +FUNCTION {format.booktitle} +{ + booktitle "booktitle" bibinfo.check +} +FUNCTION {format.in.ed.booktitle} +{ format.booktitle duplicate$ empty$ 'skip$ + { + editor "editor" format.names.ed duplicate$ empty$ 'pop$ + { + " " * + get.bbl.editor + capitalize + "(" swap$ * "), " * + * swap$ + * } + if$ + word.in swap$ * + } + if$ +} +FUNCTION {format.thesis.type} +{ type duplicate$ empty$ + 'pop$ + { swap$ pop$ + "t" change.case$ "type" bibinfo.check + } + if$ +} +FUNCTION {format.tr.number} +{ number "number" bibinfo.check + type duplicate$ empty$ + { pop$ bbl.techrep } + 'skip$ + if$ + "type" bibinfo.check + swap$ duplicate$ empty$ + { pop$ "t" change.case$ } + { tie.or.space.prefix * * } + if$ +} +FUNCTION {format.article.crossref} +{ + word.in + " \cite{" * crossref * "}" * +} +FUNCTION {format.book.crossref} +{ volume duplicate$ empty$ + { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ + pop$ word.in + } + { bbl.volume + capitalize + swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word * + } + if$ + " \cite{" * crossref * "}" * +} +FUNCTION {format.incoll.inproc.crossref} +{ + word.in + " \cite{" * crossref * "}" * +} +FUNCTION {format.org.or.pub} +{ 't := + "" + address empty$ t empty$ and + 'skip$ + { + t empty$ + { address "address" bibinfo.check * + } + { t * + address empty$ + 'skip$ + { ", " * address "address" bibinfo.check * } + if$ + } + if$ + } + if$ +} +FUNCTION {format.publisher.address} +{ publisher "publisher" bibinfo.check format.org.or.pub +} + +FUNCTION {format.organization.address} +{ 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$ + print.url output + fin.entry +} + + +FUNCTION {article} +{ "%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.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.block + 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.date "year" output.check + date.block + format.btitle "title" output.check + crossref missing$ + { format.bvolume output + new.block + format.number.series output + format.edition output + new.sentence + format.publisher.address output + } + { + new.block + format.book.crossref output.nonnull + } + if$ + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {booklet} +{ "%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.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 +} + +FUNCTION {inbook} +{ "%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.date "year" output.check + date.block + format.btitle "title" output.check + format.edition output + crossref missing$ + { + format.publisher.address output + format.bvolume output + format.chapter.pages "chapter and pages" output.check + new.block + format.number.series output + new.sentence + } + { + format.chapter.pages "chapter and pages" output.check + new.block + format.book.crossref output.nonnull + } + if$ + format.pages "pages" output.check + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {incollection} +{ "%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.book.check + new.sentence + crossref missing$ + { format.in.ed.booktitle "booktitle" output.book.check + format.edition output + format.publisher.address output + format.bvolume output + format.number.series 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 +} + +FUNCTION {inproceedings} +{ "%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.book.check + new.sentence + crossref missing$ + { format.in.ed.booktitle "booktitle" output.check + new.sentence + publisher empty$ + { format.organization.address output } + { organization "organization" bibinfo.check output + format.publisher.address output + } + if$ +% format.bvolume output +% format.number.series output +% format.pages output + } + { format.incoll.inproc.crossref output.nonnull + format.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 +} + +FUNCTION {conference} { inproceedings } + +FUNCTION {manual} +{ "%Type = Manual" write$ + output.bibitem + format.authors output + author format.key output + format.date "year" output.check + date.block + format.btitle "title" output.check + 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 +} + +FUNCTION {mastersthesis} +{ "%Type = Masterthesis" write$ + output.bibitem + format.authors "author" output.check + author format.key output + format.date "year" output.check + date.block + format.btitle + "title" output.check + new.block + bbl.mthesis format.thesis.type output.nonnull + school "school" bibinfo.warn output + address "address" bibinfo.check output + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {misc} +{ "%Type = Misc" write$ + output.bibitem + format.authors output + author format.key output + format.date "year" output.check + date.block + format.title output + new.block + howpublished "howpublished" bibinfo.check output + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {phdthesis} +{ "%Type = Phdthesis" write$ + output.bibitem + format.authors "author" output.check + author format.key output + format.date "year" output.check + date.block + format.btitle + "title" output.check + new.block + bbl.phdthesis format.thesis.type output.nonnull + school "school" bibinfo.warn output + address "address" bibinfo.check output + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {proceedings} +{ "%Type = Proceedings" write$ + output.bibitem + format.editors output + editor format.key output + format.date "year" output.check + date.block + format.btitle "title" output.check + format.bvolume output + format.number.series output + new.sentence + publisher empty$ + { format.organization.address output } + { organization "organization" bibinfo.check output + format.publisher.address output + } + if$ + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {techreport} +{ "%Type = Techreport" write$ + output.bibitem + format.authors "author" output.check + author format.key output + format.date "year" output.check + date.block + format.btitle + "title" output.check + new.block + format.tr.number output.nonnull + 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 +} + +FUNCTION {unpublished} +{ "%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 +} + +FUNCTION {default.type} { misc } +READ +FUNCTION {sortify} +{ purify$ + "l" change.case$ +} +INTEGERS { len } +FUNCTION {chop.word} +{ 's := + 'len := + s #1 len substring$ = + { s len #1 + global.max$ substring$ } + 's + if$ +} +FUNCTION {format.lab.names} +{ 's := + "" 't := + s #1 "{vv~}{ll}" format.name$ + s num.names$ duplicate$ + #2 > + { pop$ + " " * bbl.etal * + } + { #2 < + 'skip$ + { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = + { + " " * bbl.etal * + } + { bbl.and space.word * s #2 "{vv~}{ll}" format.name$ + * } + if$ + } + if$ + } + if$ +} + +FUNCTION {author.key.label} +{ author empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { author format.lab.names } + if$ +} + +FUNCTION {author.editor.key.label} +{ author empty$ + { editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.lab.names } + if$ + } + { author format.lab.names } + if$ +} + +FUNCTION {editor.key.label} +{ editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.lab.names } + if$ +} + +FUNCTION {calc.short.authors} +{ type$ "book" = + type$ "inbook" = + or + 'author.editor.key.label + { type$ "proceedings" = + 'editor.key.label + 'author.key.label + if$ + } + if$ + 'short.list := +} + +FUNCTION {calc.label} +{ calc.short.authors + short.list + "(" + * + year duplicate$ empty$ + short.list key field.or.null = or + { pop$ "" } + 'skip$ + if$ + * + 'label := +} + +FUNCTION {sort.format.names} +{ 's := + #1 'nameptr := + "" + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{ll{ }}{ f{ }}{ jj{ }}" + format.name$ 't := + nameptr #1 > + { + " " * + namesleft #1 = t "others" = and + { "zzzzz" * } + { t sortify * } + if$ + } + { t sortify * } + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {sort.format.title} +{ 't := + "A " #2 + "An " #3 + "The " #4 t chop.word + chop.word + chop.word + sortify + #1 global.max$ substring$ +} +FUNCTION {author.sort} +{ author empty$ + { key empty$ + { "to sort, need author or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { author sort.format.names } + if$ +} +FUNCTION {author.editor.sort} +{ author empty$ + { editor empty$ + { key empty$ + { "to sort, need author, editor, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { editor sort.format.names } + if$ + } + { author sort.format.names } + if$ +} +FUNCTION {editor.sort} +{ editor empty$ + { key empty$ + { "to sort, need editor or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { editor sort.format.names } + if$ +} +FUNCTION {presort} +{ calc.label + label sortify + " " + * + type$ "book" = + type$ "inbook" = + or + 'author.editor.sort + { type$ "proceedings" = + 'editor.sort + 'author.sort + if$ + } + if$ + #1 entry.max$ substring$ + 'sort.label := + sort.label + * + " " + * + title field.or.null + sort.format.title + * + #1 entry.max$ substring$ + 'sort.key$ := +} + +ITERATE {presort} +SORT +STRINGS { last.label next.extra } +INTEGERS { last.extra.num number.label } +FUNCTION {initialize.extra.label.stuff} +{ #0 int.to.chr$ 'last.label := + "" 'next.extra := + #0 'last.extra.num := + #0 'number.label := +} +FUNCTION {forward.pass} +{ last.label label = + { last.extra.num #1 + 'last.extra.num := + last.extra.num int.to.chr$ 'extra.label := + } + { "a" chr.to.int$ 'last.extra.num := + "" 'extra.label := + label 'last.label := + } + if$ + number.label #1 + 'number.label := +} +FUNCTION {reverse.pass} +{ next.extra "b" = + { "a" 'extra.label := } + 'skip$ + if$ + extra.label 'next.extra := + extra.label + duplicate$ empty$ + 'skip$ +% { "{\natexlab{" swap$ * "}}" * } + { "" swap$ * "" * } + if$ + 'extra.label := + label extra.label * 'label := +} +EXECUTE {initialize.extra.label.stuff} +ITERATE {forward.pass} +REVERSE {reverse.pass} +FUNCTION {bib.sort.order} +{ sort.label + " " + * + year field.or.null sortify + * + " " + * + title field.or.null + sort.format.title + * + #1 entry.max$ substring$ + 'sort.key$ := +} +ITERATE {bib.sort.order} +SORT +FUNCTION {begin.bib} +{ preamble$ empty$ + 'skip$ + { preamble$ write$ newline$ } + if$ + "\begin{thebibliography}{" number.label int.to.str$ * "}" * + write$ newline$ + "\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi" + write$ newline$ + "\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$ +} +EXECUTE {end.bib} +%% End of customized bst file +%% +%% End of file `model2-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/model3-num-names.bst b/model3-num-names.bst new file mode 100644 index 0000000..cd10393 --- /dev/null +++ b/model3-num-names.bst @@ -0,0 +1,1702 @@ +%% +%% This is file `model3-num-names.bst' (Version 2.0), +%% +%% Copyright 2009-2012 Elsevier Ltd +%% +%% This file is part of the 'Elsarticle Bundle'. +%% --------------------------------------------- +%% +%% It may be distributed under the conditions of the LaTeX Project Public +%% License, either version 1.2 of this license or (at your option) any +%% later version. The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.2 or later is part of all distributions of LaTeX +%% version 1999/12/01 or later. +%% +%% $Id: model3-num-names.bst 211 2012-10-22 07:31:59Z rishi $ +%% +%% $URL: http://lenova.river-valley.com/svn/elsbst/trunk/New-Model-3/model3-num-names.bst $ +%% +%% + +ENTRY + { address + archive + author + booktitle + chapter + collaboration + edition + editor + eid + howpublished + institution + isbn + journal + key + month + note + number + numpages + 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 := +} + +STRINGS { s t} + +FUNCTION {output.nonnull} +{ 's := + output.state mid.sentence = + { "; " * write$ } + { output.state after.block = + { add.period$ write$ + newline$ + "\newblock " write$ + } + { output.state before.all = + 'write$ + { add.period$ " " * write$ } + if$ + } + if$ + mid.sentence 'output.state := + } + if$ + s +} +FUNCTION {output} +{ duplicate$ empty$ + 'pop$ + 'output.nonnull + if$ +} +FUNCTION {output.check} +{ 't := + duplicate$ empty$ + { pop$ "empty " t * " in " * cite$ * warning$ } + 'output.nonnull + if$ +} +FUNCTION {fin.entry} +{ add.period$ + write$ + newline$ +} + +FUNCTION {new.block} +{ output.state before.all = + 'skip$ + { after.block 'output.state := } + if$ +} +FUNCTION {new.sentence} +{ output.state after.block = + 'skip$ + { output.state before.all = + 'skip$ + { after.sentence 'output.state := } + if$ + } + if$ +} +FUNCTION {add.blank} +{ " " * before.all 'output.state := +} + +FUNCTION {no.blank.or.punct} +{ "" * before.all 'output.state := +} + +FUNCTION {date.block} +{ + ";" * + no.blank.or.punct +} + +FUNCTION {book.date.block} +{ + "," * + no.blank.or.punct +} + +FUNCTION {not} +{ { #0 } + { #1 } + if$ +} +FUNCTION {and} +{ 'skip$ + { pop$ #0 } + if$ +} +FUNCTION {or} +{ { pop$ #1 } + 'skip$ + if$ +} +STRINGS {z} +FUNCTION {remove.dots} +{ 'z := + "" + { z empty$ not } + { z #1 #1 substring$ + z #2 global.max$ substring$ 'z := + duplicate$ "." = 'pop$ + { * } + if$ + } + while$ +} +FUNCTION {new.block.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.block + if$ +} +FUNCTION {field.or.null} +{ duplicate$ empty$ + { pop$ "" } + 'skip$ + if$ +} +FUNCTION {emphasize} +{ duplicate$ empty$ + { pop$ "" } + { "\emph{" swap$ * "}" * } + if$ +} +FUNCTION {tie.or.space.prefix} +{ duplicate$ text.length$ #3 < + { "~" } + { " " } + if$ + swap$ +} + +FUNCTION {capitalize} +{ "u" change.case$ "t" change.case$ } + +FUNCTION {space.word} +{ " " swap$ * " " * } + % Here are the language-specific definitions for explicit words. + % Each function has a name bbl.xxx where xxx is the English word. + % The language selected here is ENGLISH +FUNCTION {bbl.and} +{ "and"} + +FUNCTION {bbl.etal} +{ "et~al." } + +FUNCTION {bbl.editors} +{ "editors" } + +FUNCTION {bbl.editor} +{ "editor" } + +FUNCTION {bbl.edby} +{ "edited by" } + +FUNCTION {bbl.edition} +{ "ed." } + +FUNCTION {bbl.volume} +{ "vol." } + +FUNCTION {bbl.of} +{ "of" } + +FUNCTION {bbl.number} +{ "no." } + +FUNCTION {bbl.nr} +{ "no." } + +FUNCTION {bbl.in} +{ "in" } + +FUNCTION {bbl.pages} +{ " p." } + +FUNCTION {bbl.page} +{ " p." } + +FUNCTION {bbl.eidpp} +{ "pages" } + +FUNCTION {bbl.chapter} +{ "chap." } + +FUNCTION {bbl.techrep} +{ "Tech. Rep." } + +FUNCTION {bbl.mthesis} +{ "Master's thesis" } + +FUNCTION {bbl.phdthesis} +{ "Ph.D. thesis" } + +FUNCTION {close.brace} +{ "}{}" } + +MACRO {jan} {"Jan."} + +MACRO {feb} {"Feb."} + +MACRO {mar} {"Mar."} + +MACRO {apr} {"Apr."} + +MACRO {may} {"May"} + +MACRO {jun} {"Jun."} + +MACRO {jul} {"Jul."} + +MACRO {aug} {"Aug."} + +MACRO {sep} {"Sep."} + +MACRO {oct} {"Oct."} + +MACRO {nov} {"Nov."} + +MACRO {dec} {"Dec."} + +MACRO {acmcs} {"ACM Comput. Surv."} + +MACRO {acta} {"Acta Inf."} + +MACRO {cacm} {"Commun. ACM"} + +MACRO {ibmjrd} {"IBM J. Res. Dev."} + +MACRO {ibmsj} {"IBM Syst.~J."} + +MACRO {ieeese} {"IEEE Trans. Software Eng."} + +MACRO {ieeetc} {"IEEE Trans. Comput."} + +MACRO {ieeetcad} + {"IEEE Trans. Comput. Aid. Des."} + +MACRO {ipl} {"Inf. Process. Lett."} + +MACRO {jacm} {"J.~ACM"} + +MACRO {jcss} {"J.~Comput. Syst. Sci."} + +MACRO {scp} {"Sci. Comput. Program."} + +MACRO {sicomp} {"SIAM J. Comput."} + +MACRO {tocs} {"ACM Trans. Comput. Syst."} + +MACRO {tods} {"ACM Trans. Database Syst."} + +MACRO {tog} {"ACM Trans. Graphic."} + +MACRO {toms} {"ACM Trans. Math. Software"} + +MACRO {toois} {"ACM Trans. Office Inf. Syst."} + +MACRO {toplas} {"ACM Trans. Progr. Lang. Syst."} + +MACRO {tcs} {"Theor. Comput. Sci."} + +FUNCTION {bibinfo.check} +{ swap$ + duplicate$ missing$ + { + pop$ pop$ + "" + } + { duplicate$ empty$ + { + swap$ pop$ + } + { swap$ + "\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$ +} + + +INTEGERS { nameptr namesleft numnames } + + +STRINGS { bibinfo} + +% FUNCTION {format.names} +% { 'bibinfo := +% duplicate$ empty$ 'skip$ { +% 's := +% "" 't := +% #1 'nameptr := +% s num.names$ 'numnames := +% numnames 'namesleft := +% { namesleft #0 > } +% { s nameptr +% "{vv~}{ll}{ jj}{ f{}}" +% format.name$ +% remove.dots +% bibinfo bibinfo.check +% 't := +% nameptr #1 > +% { +% 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} +{ 'bibinfo := + duplicate$ empty$ 'skip$ { + 's := + "" 't := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{vv~}{ll}{ jj}\xfnm[{ f{.}.}]" + format.name$ +% remove.dots + bibinfo bibinfo.check + 't := + nameptr #1 > + { + nameptr #6 + #1 + = + numnames #6 + > and + { "others" 't := + #1 'namesleft := } + 'skip$ + if$ + namesleft #1 > + { ", " * t * } + { + "," * + s nameptr "{ll}" format.name$ duplicate$ "others" = + { 't := } + { pop$ } + if$ + t "others" = + { + " " * bbl.etal * + } + { " " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ + } if$ +} + + +FUNCTION {format.names.ed} +{ + format.names +} +FUNCTION {format.key} +{ empty$ + { key field.or.null } + { "" } + if$ +} + +FUNCTION {format.authors} +{ author "author" format.names + duplicate$ empty$ 'skip$ + { collaboration "collaboration" bibinfo.check + duplicate$ empty$ 'skip$ + { " (" swap$ * ")" * } + if$ + * + } + if$ +} +FUNCTION {get.bbl.editor} +{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ } + +FUNCTION {format.editors} +{ editor "editor" format.names duplicate$ empty$ 'skip$ + { + "," * + " " * + get.bbl.editor + * + } + if$ +} +FUNCTION {format.isbn} +{ isbn "isbn" bibinfo.check + duplicate$ empty$ 'skip$ + { + new.block + "ISBN " swap$ * + } + if$ +} + +FUNCTION {format.note} +{ + note empty$ + { "" } + { note #1 #1 substring$ + duplicate$ "{" = + 'skip$ + { output.state mid.sentence = + { "l" } + { "u" } + if$ + change.case$ + } + if$ + note #2 global.max$ substring$ * "note" bibinfo.check + } + if$ +} + +FUNCTION {format.title} +{ title + duplicate$ empty$ 'skip$ + { "t" change.case$ } + if$ + "title" bibinfo.check +} +FUNCTION {format.full.names} +{'s := + "" 't := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{vv~}{ll}" format.name$ + 't := + nameptr #1 > + { + nameptr #6 + #1 + = + numnames #6 + > and + { "others" 't := + #1 'namesleft := } + 'skip$ + if$ + namesleft #1 > + { ", " * t * } + { + s nameptr "{ll}" format.name$ duplicate$ "others" = + { 't := } + { pop$ } + if$ + t "others" = + { + " " * bbl.etal * + } + { + bbl.and + space.word * t * + } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {author.editor.key.full} +{ author empty$ + { editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.full.names } + if$ + } + { author format.full.names } + if$ +} + +FUNCTION {author.key.full} +{ author empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { author format.full.names } + if$ +} + +FUNCTION {editor.key.full} +{ editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.full.names } + if$ +} + +FUNCTION {make.full.names} +{ type$ "book" = + type$ "inbook" = + or + 'author.editor.key.full + { type$ "proceedings" = + 'editor.key.full + 'author.key.full + if$ + } + if$ +} + +FUNCTION {output.bibitem} +{ newline$ + "\bibitem[{" write$ + label write$ + ")" make.full.names duplicate$ short.list = + { pop$ } + { * } + if$ + "}]{" * write$ + cite$ write$ + "}" write$ + newline$ + "" + before.all 'output.state := +} + +FUNCTION {n.dashify} +{ + 't := + "" + { t empty$ not } + { t #1 #1 substring$ "-" = + { t #1 #2 substring$ "--" = not + { "--" * + t #2 global.max$ substring$ 't := + } + { { t #1 #1 substring$ "-" = } + { "-" * + t #2 global.max$ substring$ 't := + } + while$ + } + if$ + } + { t #1 #1 substring$ * + t #2 global.max$ substring$ 't := + } + if$ + } + while$ +} + +FUNCTION {word.in} +{ bbl.in capitalize + ":" * + " " * } + +FUNCTION {format.date} +{ year "year" bibinfo.check duplicate$ empty$ + { + "empty year in " cite$ * "; set to ????" * warning$ + pop$ "????" + } + 'skip$ + if$ + extra.label * +} +FUNCTION {format.btitle} +{ title "title" bibinfo.check + duplicate$ empty$ 'skip$ + { + } + if$ +} +FUNCTION {either.or.check} +{ empty$ + 'pop$ + { "can't use both " swap$ * " fields in " * cite$ * warning$ } + if$ +} +FUNCTION {format.bvolume} +{ volume empty$ + { "" } + { bbl.volume volume tie.or.space.prefix + "volume" bibinfo.check * * + series "series" bibinfo.check + duplicate$ empty$ 'pop$ + { swap$ bbl.of space.word * swap$ + emphasize * } + if$ + "volume and number" number either.or.check + } + if$ +} +FUNCTION {format.number.series} +{ volume empty$ + { number empty$ + { series field.or.null } + { series empty$ + { number "number" bibinfo.check } + { output.state mid.sentence = + { bbl.number } + { bbl.number capitalize } + if$ + number tie.or.space.prefix "number" bibinfo.check * * + bbl.in space.word * + series "series" bibinfo.check * + } + if$ + } + if$ + } + { "" } + if$ +} + +FUNCTION {format.edition} +{ edition duplicate$ empty$ 'skip$ + { + output.state mid.sentence = + { "l" } + { "t" } + if$ change.case$ + "edition" bibinfo.check + " " * bbl.edition * + } + if$ +} +INTEGERS { multiresult } +FUNCTION {multi.page.check} +{ 't := + #0 'multiresult := + { multiresult not + t empty$ not + and + } + { t #1 #1 substring$ + duplicate$ "-" = + swap$ duplicate$ "," = + swap$ "+" = + or or + { #1 'multiresult := } + { t #2 global.max$ substring$ 't := } + if$ + } + while$ + multiresult +} + +FUNCTION {format.pages} +{ pages duplicate$ empty$ 'skip$ + { duplicate$ multi.page.check + { + bbl.pages swap$ + n.dashify + } + { + bbl.page swap$ + } + if$ + tie.or.space.prefix + "pages" bibinfo.check + * * + } + if$ +} +FUNCTION {format.journal.pages} +{ pages duplicate$ empty$ 'pop$ + { swap$ duplicate$ empty$ + { pop$ pop$ format.pages } + { + ":" * + swap$ + n.dashify + "pages" bibinfo.check + * + } + if$ + } + if$ +} +FUNCTION {format.journal.eid} +{ eid "eid" bibinfo.check + duplicate$ empty$ 'pop$ + { swap$ duplicate$ empty$ 'skip$ + { + ":" * + } + if$ + swap$ * + numpages empty$ 'skip$ + { bbl.eidpp numpages tie.or.space.prefix + "numpages" bibinfo.check * * + " (" swap$ * ")" * * + } + if$ + } + if$ +} +FUNCTION {format.vol.num.pages} +{ volume field.or.null + duplicate$ empty$ 'skip$ + { + "volume" bibinfo.check + } + if$ + number "number" bibinfo.check duplicate$ empty$ 'skip$ + { + swap$ duplicate$ empty$ + { "there's a number but no volume in " cite$ * warning$ } + 'skip$ + if$ + swap$ + "(" swap$ * ")" * + } + if$ * +} + +FUNCTION {format.chapter.pages} +{ chapter empty$ + { "" } + { type empty$ + { bbl.chapter } + { type "l" change.case$ + "type" bibinfo.check + } + if$ + chapter tie.or.space.prefix + "chapter" bibinfo.check + * * + } + if$ +} + +FUNCTION {format.booktitle} +{ + booktitle "booktitle" bibinfo.check +} +FUNCTION {format.in.ed.booktitle} +{ format.booktitle duplicate$ empty$ 'skip$ + { + editor "editor" format.names.ed duplicate$ empty$ 'pop$ + { + "," * + " " * + get.bbl.editor + ". " * + * swap$ + * } + if$ + word.in swap$ * + } + if$ +} +FUNCTION {format.thesis.type} +{ type duplicate$ empty$ + 'pop$ + { swap$ pop$ + "t" change.case$ "type" bibinfo.check + } + if$ +} +FUNCTION {format.tr.number} +{ number "number" bibinfo.check + type duplicate$ empty$ + { pop$ bbl.techrep } + 'skip$ + if$ + "type" bibinfo.check + swap$ duplicate$ empty$ + { pop$ "t" change.case$ } + { tie.or.space.prefix * * } + if$ +} +FUNCTION {format.article.crossref} +{ + word.in + " \cite{" * crossref * "}" * +} +FUNCTION {format.book.crossref} +{ volume duplicate$ empty$ + { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ + pop$ word.in + } + { bbl.volume + capitalize + swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word * + } + if$ + " \cite{" * crossref * "}" * +} +FUNCTION {format.incoll.inproc.crossref} +{ + word.in + " \cite{" * crossref * "}" * +} +FUNCTION {format.org.or.pub} +{ 't := + "" + address empty$ t empty$ and + 'skip$ + { + address "address" bibinfo.check * + t empty$ + 'skip$ + { address empty$ + 'skip$ + { ": " * } + if$ + t * + } + if$ + } + if$ +} +FUNCTION {format.publisher.address} +{ publisher "publisher" bibinfo.check format.org.or.pub +} + +FUNCTION {format.organization.address} +{ 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$ + 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 + remove.dots + "journal" bibinfo.check + "journal" output.check + add.blank + format.date "year" output.check + date.block + format.vol.num.pages output + } + { format.article.crossref output.nonnull + } + if$ + eid empty$ + { format.journal.pages } + { format.journal.eid } + if$ + new.block + 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$ + new.block + format.btitle "title" output.check + crossref missing$ + { format.bvolume output + new.block + new.sentence + format.number.series output + format.edition output + format.publisher.address output + } + { + new.block + format.book.crossref output.nonnull + } + if$ + format.date "year" output.check + format.isbn output + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {booklet} +{ "%Type = Booklet" write$ + output.bibitem + format.authors output + author format.key output + new.block + format.title "title" output.check + new.block + howpublished "howpublished" bibinfo.check output + address "address" bibinfo.check output + format.date "year" output.check + format.isbn output + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {inbook} +{ "%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$ + new.block + format.btitle "title" output.check + crossref missing$ + { + format.bvolume output + format.chapter.pages "chapter and pages" output.check + new.block + new.sentence + format.number.series output + format.edition output + format.publisher.address output + } + { + format.chapter.pages "chapter and pages" output.check + new.block + format.book.crossref output.nonnull + } + if$ + crossref missing$ + { format.isbn output } + 'skip$ + if$ + format.date "year" output.check + book.date.block + format.pages "pages" output.check + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {incollection} +{ "%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.chapter.pages output + format.edition output + new.sentence + format.number.series output + format.publisher.address output + format.isbn output + } + { format.incoll.inproc.crossref output.nonnull + format.chapter.pages output + } + if$ + format.date "year" output.check + book.date.block + format.pages "pages" output.check + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {inproceedings} +{ "%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 + new.sentence + format.number.series output + publisher empty$ + { format.organization.address output } + { organization "organization" bibinfo.check output + format.publisher.address output + } + if$ + format.isbn output + } + { format.incoll.inproc.crossref output.nonnull + } + if$ + format.date "year" output.check + book.date.block + format.pages "pages" output.check + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {conference} { inproceedings } + +FUNCTION {manual} +{ "%Type = Manual" write$ + output.bibitem + format.authors output + author format.key output + new.block + format.btitle "title" output.check + format.edition output + organization address new.block.checkb + organization "organization" bibinfo.check output + address "address" bibinfo.check output + format.date "year" output.check + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {mastersthesis} +{ "%Type = Masterthesis" write$ + output.bibitem + format.authors "author" output.check + author format.key output + new.block + format.title + "title" output.check + new.block + bbl.mthesis format.thesis.type output.nonnull + school "school" bibinfo.warn output + address "address" bibinfo.check output + format.date "year" output.check + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {misc} +{ "%Type = Misc" write$ + output.bibitem + format.authors output + author format.key output + new.block + format.title output + new.block + howpublished "howpublished" bibinfo.check output + format.date "year" output.check + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {phdthesis} +{ "%Type = Phdthesis" write$ + output.bibitem + format.authors "author" output.check + author format.key output + new.block + format.title + "title" output.check + new.block + bbl.phdthesis format.thesis.type output.nonnull + school "school" bibinfo.warn output + address "address" bibinfo.check output + format.date "year" output.check + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {proceedings} +{ "%Type = Proceedings" write$ + output.bibitem + format.editors output + editor format.key output + new.block + format.btitle "title" output.check + format.bvolume output + new.sentence + format.number.series output + publisher empty$ + { format.organization.address output } + { organization "organization" bibinfo.check output + format.publisher.address output + } + if$ + format.date "year" output.check + format.isbn output + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {techreport} +{ "%Type = Techreport" write$ + output.bibitem + format.authors "author" output.check + author format.key output + new.block + format.title + "title" output.check + new.block + format.tr.number output.nonnull + institution "institution" bibinfo.warn output + address "address" bibinfo.check output + format.date "year" output.check + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {unpublished} +{ "%Type = Unpublished" write$ + output.bibitem + format.authors "author" output.check + author format.key output + new.block + format.title "title" output.check + format.date "year" output.check + new.block + 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$ +} +INTEGERS { len } +FUNCTION {chop.word} +{ 's := + 'len := + s #1 len substring$ = + { s len #1 + global.max$ substring$ } + 's + if$ +} +FUNCTION {format.lab.names} +{ 's := + "" 't := + s #1 "{vv~}{ll}" format.name$ + s num.names$ duplicate$ + #2 > + { pop$ + " " * bbl.etal * + } + { #2 < + 'skip$ + { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = + { + " " * bbl.etal * + } + { bbl.and space.word * s #2 "{vv~}{ll}" format.name$ + * } + if$ + } + if$ + } + if$ +} + +FUNCTION {author.key.label} +{ author empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { author format.lab.names } + if$ +} + +FUNCTION {author.editor.key.label} +{ author empty$ + { editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.lab.names } + if$ + } + { author format.lab.names } + if$ +} + +FUNCTION {editor.key.label} +{ editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.lab.names } + if$ +} + +FUNCTION {calc.short.authors} +{ type$ "book" = + type$ "inbook" = + or + 'author.editor.key.label + { type$ "proceedings" = + 'editor.key.label + 'author.key.label + if$ + } + if$ + 'short.list := +} + +FUNCTION {calc.label} +{ calc.short.authors + short.list + "(" + * + year duplicate$ empty$ + { pop$ "????" } + { 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{ }}" +% "{vv~}{ll~}{\rd[f.f.]}{jj~}" + format.name$ 't := + nameptr #1 > + { + " " * + namesleft #1 = t "others" = and + { "zzzzz" * } + { t sortify * } + if$ + } + { t sortify * } + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {sort.format.title} +{ 't := + "A " #2 + "An " #3 + "The " #4 t chop.word + chop.word + chop.word + sortify + #1 global.max$ substring$ +} +FUNCTION {author.sort} +{ author empty$ + { key empty$ + { "to sort, need author or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { author sort.format.names } + if$ +} +FUNCTION {author.editor.sort} +{ author empty$ + { editor empty$ + { key empty$ + { "to sort, need author, editor, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { editor sort.format.names } + if$ + } + { author sort.format.names } + if$ +} +FUNCTION {editor.sort} +{ editor empty$ + { key empty$ + { "to sort, need editor or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { editor sort.format.names } + if$ +} +INTEGERS { seq.num } +FUNCTION {init.seq} +{ #0 'seq.num :=} +EXECUTE {init.seq} +FUNCTION {int.to.fix} +{ "000000000" swap$ int.to.str$ * + #-1 #10 substring$ +} +FUNCTION {presort} +{ calc.label + label sortify + " " + * + seq.num #1 + 'seq.num := + seq.num int.to.fix + 'sort.label := + sort.label + * + " " + * + title field.or.null + sort.format.title + * + #1 entry.max$ substring$ + 'sort.key$ := +} + +ITERATE {presort} +SORT +STRINGS { last.label next.extra } +INTEGERS { last.extra.num number.label } +FUNCTION {initialize.extra.label.stuff} +{ #0 int.to.chr$ 'last.label := + "" 'next.extra := + #0 'last.extra.num := + #0 'number.label := +} +FUNCTION {forward.pass} +{ last.label label = + { last.extra.num #1 + 'last.extra.num := + last.extra.num int.to.chr$ 'extra.label := + } + { "a" chr.to.int$ 'last.extra.num := + "" 'extra.label := + label 'last.label := + } + if$ + number.label #1 + 'number.label := +} +FUNCTION {reverse.pass} +{ next.extra "b" = + { "a" 'extra.label := } + 'skip$ + if$ + extra.label 'next.extra := + extra.label + duplicate$ empty$ + 'skip$ + { "{\natexlab{" swap$ * "}}" * } + if$ + 'extra.label := + label extra.label * 'label := +} +EXECUTE {initialize.extra.label.stuff} +ITERATE {forward.pass} +REVERSE {reverse.pass} +FUNCTION {bib.sort.order} +{ sort.label + " " + * + year field.or.null sortify + * + " " + * + title field.or.null + sort.format.title + * + #1 entry.max$ substring$ + 'sort.key$ := +} +ITERATE {bib.sort.order} +SORT +FUNCTION {begin.bib} +{ preamble$ empty$ + 'skip$ + { preamble$ write$ newline$ } + if$ + "\begin{thebibliography}{" number.label int.to.str$ * "}" * + write$ newline$ + "\providecommand{\natexlab}[1]{#1}" + write$ newline$ + "\providecommand{\url}[1]{\texttt{#1}}" + write$ newline$ + "\providecommand{\href}[2]{#2}" + write$ newline$ + "\providecommand{\path}[1]{#1}" + write$ newline$ + "\providecommand{\eprint}[1]{\href{http://arxiv.org/abs/#1}{\path{#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{\BIBand}{and}" + write$ newline$ + "\providecommand{\bibinfo}[2]{#2}" + write$ newline$ + "\ifx\xfnm\undefined \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 `model3-num-names.bst'. +%% +%% Change log: +%% ----------- +%% 22.04.2011 +%% +%% 10.08.2012 +%% a. doi, url, eprint, pmid added +%% b. Bibtype `webpage' defined +%% diff --git a/model4-names.bst b/model4-names.bst new file mode 100644 index 0000000..d74becf --- /dev/null +++ b/model4-names.bst @@ -0,0 +1,1697 @@ +%% +%% This is file `model4-names.bst' (Version 2.0), +%% +%% Copyright 2009-2012 Elsevier Ltd +%% +%% This file is part of the 'Elsarticle Bundle'. +%% --------------------------------------------- +%% +%% It may be distributed under the conditions of the LaTeX Project Public +%% License, either version 1.2 of this license or (at your option) any +%% later version. The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.2 or later is part of all distributions of LaTeX +%% version 1999/12/01 or later. +%% +%% $Id: model4-names.bst 213 2012-10-22 07:33:47Z rishi $ +%% +%% $URL: http://lenova.river-valley.com/svn/elsbst/trunk/New-Model-4/model4-names.bst $ +%% +%% + + +ENTRY + { 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 := +} +STRINGS { s t} +FUNCTION {output.nonnull} +{ 's := + output.state mid.sentence = + { "; " * write$ } + { output.state after.block = + { add.period$ write$ + newline$ + "\newblock " write$ + } + { output.state before.all = + 'write$ + { add.period$ " " * write$ } + if$ + } + if$ + mid.sentence 'output.state := + } + if$ + s +} +FUNCTION {output} +{ duplicate$ empty$ + 'pop$ + 'output.nonnull + if$ +} +FUNCTION {output.check} +{ 't := + duplicate$ empty$ + { pop$ "empty " t * " in " * cite$ * warning$ } + 'output.nonnull + if$ +} +FUNCTION {fin.entry} +{ add.period$ + write$ + newline$ +} + +FUNCTION {new.block} +{ output.state before.all = + 'skip$ + { after.block 'output.state := } + if$ +} +FUNCTION {new.sentence} +{ output.state after.block = + 'skip$ + { output.state before.all = + 'skip$ + { after.sentence 'output.state := } + if$ + } + if$ +} +FUNCTION {add.blank} +{ " " * before.all 'output.state := +} + +FUNCTION {no.blank.or.punct} +{ "" * before.all 'output.state := +} + +FUNCTION {date.block} +{ + ";" * + no.blank.or.punct +} + +FUNCTION {not} +{ { #0 } + { #1 } + if$ +} +FUNCTION {and} +{ 'skip$ + { pop$ #0 } + if$ +} +FUNCTION {or} +{ { pop$ #1 } + 'skip$ + if$ +} +STRINGS {z} +FUNCTION {remove.dots} +{ 'z := + "" + { z empty$ not } + { z #1 #1 substring$ + z #2 global.max$ substring$ 'z := + duplicate$ "." = 'pop$ + { * } + if$ + } + while$ +} +FUNCTION {new.block.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.block + if$ +} +FUNCTION {field.or.null} +{ duplicate$ empty$ + { pop$ "" } + 'skip$ + if$ +} +FUNCTION {emphasize} +{ duplicate$ empty$ + { pop$ "" } + { "\textit{" swap$ * "}" * } + if$ +} +FUNCTION {tie.or.space.prefix} +{ duplicate$ text.length$ #3 < + { "~" } + { " " } + if$ + swap$ +} + +FUNCTION {capitalize} +{ "u" change.case$ "t" change.case$ } + +FUNCTION {space.word} +{ " " swap$ * " " * } + % Here are the language-specific definitions for explicit words. + % Each function has a name bbl.xxx where xxx is the English word. + % The language selected here is ENGLISH +FUNCTION {bbl.and} +{ "and"} + +FUNCTION {bbl.etal} +{ "et~al." } + +FUNCTION {bbl.editors} +{ "editors" } + +FUNCTION {bbl.editor} +{ "editor" } + +FUNCTION {bbl.edby} +{ "edited by" } + +FUNCTION {bbl.edition} +{ "ed." } + +FUNCTION {bbl.volume} +{ "volume" } + +FUNCTION {bbl.of} +{ "of" } + +FUNCTION {bbl.number} +{ "number" } + +FUNCTION {bbl.nr} +{ "no." } + +FUNCTION {bbl.in} +{ "in" } + +FUNCTION {bbl.pages} +{ "p." } + +FUNCTION {bbl.page} +{ "p." } + +FUNCTION {bbl.chapter} +{ "chapter" } + +FUNCTION {bbl.techrep} +{ "Technical Report" } + +FUNCTION {bbl.mthesis} +{ "Master's thesis" } + +FUNCTION {bbl.phdthesis} +{ "Ph.D. thesis" } + +FUNCTION {bbl.first} +{ "1st" } + +FUNCTION {bbl.second} +{ "2nd" } + +FUNCTION {bbl.third} +{ "3rd" } + +FUNCTION {bbl.fourth} +{ "4th" } + +FUNCTION {bbl.fifth} +{ "5th" } + +FUNCTION {bbl.st} +{ "st" } + +FUNCTION {bbl.nd} +{ "nd" } + +FUNCTION {bbl.rd} +{ "rd" } + +FUNCTION {bbl.th} +{ "th" } + +MACRO {jan} {"January"} + +MACRO {feb} {"February"} + +MACRO {mar} {"March"} + +MACRO {apr} {"April"} + +MACRO {may} {"May"} + +MACRO {jun} {"June"} + +MACRO {jul} {"July"} + +MACRO {aug} {"August"} + +MACRO {sep} {"September"} + +MACRO {oct} {"October"} + +MACRO {nov} {"November"} + +MACRO {dec} {"December"} + +FUNCTION {eng.ord} +{ duplicate$ "1" swap$ * + #-2 #1 substring$ "1" = + { bbl.th * } + { duplicate$ #-1 #1 substring$ + duplicate$ "1" = + { pop$ bbl.st * } + { duplicate$ "2" = + { pop$ bbl.nd * } + { "3" = + { bbl.rd * } + { bbl.th * } + if$ + } + if$ + } + if$ + } + if$ +} + +MACRO {acmcs} {"ACM Comput. Surv."} + +MACRO {acta} {"Acta Inf."} + +MACRO {cacm} {"Commun. ACM"} + +MACRO {ibmjrd} {"IBM J. Res. Dev."} + +MACRO {ibmsj} {"IBM Syst.~J."} + +MACRO {ieeese} {"IEEE Trans. Software Eng."} + +MACRO {ieeetc} {"IEEE Trans. Comput."} + +MACRO {ieeetcad} + {"IEEE Trans. Comput. Aid. Des."} + +MACRO {ipl} {"Inf. Process. Lett."} + +MACRO {jacm} {"J.~ACM"} + +MACRO {jcss} {"J.~Comput. Syst. Sci."} + +MACRO {scp} {"Sci. Comput. Program."} + +MACRO {sicomp} {"SIAM J. Comput."} + +MACRO {tocs} {"ACM Trans. Comput. Syst."} + +MACRO {tods} {"ACM Trans. Database Syst."} + +MACRO {tog} {"ACM Trans. Graphic."} + +MACRO {toms} {"ACM Trans. Math. Software"} + +MACRO {toois} {"ACM Trans. Office Inf. Syst."} + +MACRO {toplas} {"ACM Trans. Progr. Lang. Syst."} + +MACRO {tcs} {"Theor. Comput. Sci."} + +FUNCTION {bibinfo.check} +{ swap$ + duplicate$ missing$ + { + pop$ pop$ + "" + } + { duplicate$ empty$ + { + swap$ pop$ + } + { swap$ + "\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} +{ 'bibinfo := + duplicate$ empty$ 'skip$ { + 's := + "" 't := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{vv~}{ll}{ jj}\xfnm[{ f{.}.}]" + format.name$ +% remove.dots + bibinfo bibinfo.check + 't := + nameptr #1 > + { + namesleft #1 > + { ", " * t * } + { + "," * + s nameptr "{ll}" format.name$ duplicate$ "others" = + { 't := } + { pop$ } + if$ + t "others" = + { + " " * bbl.etal * + } + { " " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ + } if$ +} +FUNCTION {format.names.ed} +{ + format.names +} +FUNCTION {format.key} +{ empty$ + { key field.or.null } + { "" } + if$ +} + +FUNCTION {format.authors} +{ author "author" format.names + 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 + * + } + if$ +} +FUNCTION {format.note} +{ + note empty$ + { "" } + { note #1 #1 substring$ + duplicate$ "{" = + 'skip$ + { output.state mid.sentence = + { "l" } + { "u" } + if$ + change.case$ + } + if$ + note #2 global.max$ substring$ * "note" bibinfo.check + } + if$ +} + +FUNCTION {format.title} +{ title + duplicate$ empty$ 'skip$ + { "t" change.case$ } + if$ + "title" bibinfo.check +} +FUNCTION {format.full.names} +{'s := + "" 't := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{vv~}{ll}" format.name$ + 't := + nameptr #1 > + { + namesleft #1 > + { ", " * t * } + { + s nameptr "{ll}" format.name$ duplicate$ "others" = + { 't := } + { pop$ } + if$ + t "others" = + { + " " * bbl.etal * + } + { + bbl.and + space.word * t * + } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {author.editor.key.full} +{ author empty$ + { editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.full.names } + if$ + } + { author format.full.names } + if$ +} + +FUNCTION {author.key.full} +{ author empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { author format.full.names } + if$ +} + +FUNCTION {editor.key.full} +{ editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.full.names } + if$ +} + +FUNCTION {make.full.names} +{ type$ "book" = + type$ "inbook" = + or + 'author.editor.key.full + { type$ "proceedings" = + 'editor.key.full + 'author.key.full + if$ + } + if$ +} + +FUNCTION {output.bibitem} +{ newline$ + "\bibitem[{" write$ + label write$ + ")" make.full.names duplicate$ short.list = + { pop$ } + { * } + if$ + "}]{" * write$ + cite$ write$ + "}" write$ + newline$ + "" + before.all 'output.state := +} + +FUNCTION {n.dashify} +{ + 't := + "" + { t empty$ not } + { t #1 #1 substring$ "-" = + { t #1 #2 substring$ "--" = not + { "--" * + t #2 global.max$ substring$ 't := + } + { { t #1 #1 substring$ "-" = } + { "-" * + t #2 global.max$ substring$ 't := + } + while$ + } + if$ + } + { t #1 #1 substring$ * + t #2 global.max$ substring$ 't := + } + if$ + } + while$ +} + +FUNCTION {word.in} +{ bbl.in capitalize + ":" * + " " * } + +FUNCTION {format.date} +{ year "year" bibinfo.check duplicate$ empty$ + { + } + 'skip$ + if$ + extra.label * +} +FUNCTION {format.btitle} +{ title "title" bibinfo.check + duplicate$ empty$ 'skip$ + { + } + if$ +} +FUNCTION {either.or.check} +{ empty$ + 'pop$ + { "can't use both " swap$ * " fields in " * cite$ * warning$ } + if$ +} +FUNCTION {format.bvolume} +{ volume empty$ + { "" } + { bbl.volume volume tie.or.space.prefix + "volume" bibinfo.check * * + series "series" bibinfo.check + duplicate$ empty$ 'pop$ + { swap$ bbl.of space.word * swap$ + emphasize * } + if$ + "volume and number" number either.or.check + } + if$ +} +FUNCTION {format.number.series} +{ volume empty$ + { number empty$ + { series field.or.null } + { output.state mid.sentence = + { bbl.number } + { bbl.number capitalize } + if$ + number tie.or.space.prefix "number" bibinfo.check * * + series empty$ + { "there's a number but no series in " cite$ * warning$ } + { bbl.in space.word * + series "series" bibinfo.check * + } + if$ + } + if$ + } + { "" } + if$ +} +FUNCTION {is.num} +{ chr.to.int$ + duplicate$ "0" chr.to.int$ < not + swap$ "9" chr.to.int$ > not and +} + +FUNCTION {extract.num} +{ duplicate$ 't := + "" 's := + { t empty$ not } + { t #1 #1 substring$ + t #2 global.max$ substring$ 't := + duplicate$ is.num + { s swap$ * 's := } + { pop$ "" 't := } + if$ + } + while$ + s empty$ + 'skip$ + { pop$ s } + if$ +} + +FUNCTION {convert.edition} +{ extract.num "l" change.case$ 's := + s "first" = s "1" = or + { bbl.first 't := } + { s "second" = s "2" = or + { bbl.second 't := } + { s "third" = s "3" = or + { bbl.third 't := } + { s "fourth" = s "4" = or + { bbl.fourth 't := } + { s "fifth" = s "5" = or + { bbl.fifth 't := } + { s #1 #1 substring$ is.num + { s eng.ord 't := } + { edition 't := } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + t +} + +FUNCTION {format.edition} +{ edition duplicate$ empty$ 'skip$ + { + convert.edition + output.state mid.sentence = + { "l" } + { "t" } + if$ change.case$ + "edition" bibinfo.check + " " * bbl.edition * + } + if$ +} +INTEGERS { multiresult } +FUNCTION {multi.page.check} +{ 't := + #0 'multiresult := + { multiresult not + t empty$ not + and + } + { t #1 #1 substring$ + duplicate$ "-" = + swap$ duplicate$ "," = + swap$ "+" = + or or + { #1 'multiresult := } + { t #2 global.max$ substring$ 't := } + if$ + } + while$ + multiresult +} +FUNCTION {format.pages} +{ pages duplicate$ empty$ 'skip$ + { duplicate$ multi.page.check + { + bbl.pages swap$ + n.dashify + } + { + bbl.page swap$ + } + if$ + tie.or.space.prefix + "pages" bibinfo.check + * * + } + if$ +} +FUNCTION {format.journal.pages} +{ pages duplicate$ empty$ 'pop$ + { swap$ duplicate$ empty$ + { pop$ pop$ format.pages } + { + ":" * + swap$ + n.dashify + "pages" bibinfo.check + * + } + if$ + } + if$ +} +FUNCTION {format.vol.num.pages} +{ volume field.or.null + duplicate$ empty$ 'skip$ + { + "volume" bibinfo.check + } + if$ + number "number" bibinfo.check duplicate$ empty$ 'skip$ + { + swap$ duplicate$ empty$ + { "there's a number but no volume in " cite$ * warning$ } + 'skip$ + if$ + swap$ + "(" swap$ * ")" * + } + if$ * +} + +FUNCTION {format.chapter.pages} +{ chapter empty$ + { "" } + { type empty$ + { bbl.chapter } + { type "l" change.case$ + "type" bibinfo.check + } + if$ + chapter tie.or.space.prefix + "chapter" bibinfo.check + * * + } + if$ +} + +FUNCTION {format.booktitle} +{ + booktitle "booktitle" bibinfo.check +} +FUNCTION {format.in.ed.booktitle} +{ format.booktitle duplicate$ empty$ 'skip$ + { + editor "editor" format.names.ed duplicate$ empty$ 'pop$ + { + "," * + " " * + get.bbl.editor + ". " * + * swap$ + * } + if$ + word.in swap$ * + } + if$ +} +FUNCTION {format.thesis.type} +{ type duplicate$ empty$ + 'pop$ + { swap$ pop$ + "t" change.case$ "type" bibinfo.check + } + if$ +} +FUNCTION {format.tr.number} +{ number "number" bibinfo.check + type duplicate$ empty$ + { pop$ bbl.techrep } + 'skip$ + if$ + "type" bibinfo.check + swap$ duplicate$ empty$ + { pop$ "t" change.case$ } + { tie.or.space.prefix * * } + if$ +} +FUNCTION {format.article.crossref} +{ + word.in + " \cite{" * crossref * "}" * +} +FUNCTION {format.book.crossref} +{ volume duplicate$ empty$ + { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ + pop$ word.in + } + { bbl.volume + capitalize + swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word * + } + if$ + " \cite{" * crossref * "}" * +} +FUNCTION {format.incoll.inproc.crossref} +{ + word.in + " \cite{" * crossref * "}" * +} +FUNCTION {format.org.or.pub} +{ 't := + "" + address empty$ t empty$ and + 'skip$ + { + address "address" bibinfo.check * + t empty$ + 'skip$ + { address empty$ + 'skip$ + { ": " * } + if$ + t * + } + if$ + } + if$ +} +FUNCTION {format.publisher.address} +{ publisher "publisher" bibinfo.check format.org.or.pub +} + +FUNCTION {format.organization.address} +{ 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 {book.date.block} +{ + ", " * + no.blank.or.punct +} + +FUNCTION {inbook.date.block} +{ + ". " * + no.blank.or.punct +} + +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 + remove.dots + "journal" bibinfo.check + "journal" output.check + add.blank + format.date "year" output.check + date.block + format.vol.num.pages output + } + { format.article.crossref output.nonnull + } + if$ + format.journal.pages + new.block + 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$ + new.block + format.btitle "title" output.check + new.block + format.edition output + crossref missing$ + { format.bvolume output + new.block + format.number.series output + new.sentence + format.publisher.address output + } + { + new.block + format.book.crossref output.nonnull + } + if$ + new.block + book.date.block + format.date "year" output.check + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {booklet} +{ "%Type = Booklet" write$ + output.bibitem + format.authors output + author format.key output + new.block + format.title "title" output.check + new.block + howpublished "howpublished" bibinfo.check output + address "address" bibinfo.check output + format.date "year" output.check + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {inbook} +{ "%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$ + new.block + format.btitle "title" output.check + crossref missing$ + { + format.publisher.address output + format.bvolume output + new.block + format.number.series output + new.sentence + } + { + new.block + format.book.crossref output.nonnull + } + if$ + format.edition output + format.pages "pages" output.check + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {incollection} +{ "%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 + new.sentence + publisher empty$ + { format.organization.address output } + { organization "organization" bibinfo.check output + format.publisher.address output + } + if$ + format.bvolume output + format.number.series output + format.edition output + } + { format.incoll.inproc.crossref output.nonnull + } + if$ + format.date "year" output.check + inbook.date.block + format.pages "pages" output.check + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {inproceedings} +{ "%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 + new.sentence + publisher empty$ + { format.organization.address output } + { organization "organization" bibinfo.check output + format.publisher.address output + } + if$ + format.bvolume output + format.number.series output + } + { format.incoll.inproc.crossref output.nonnull + } + if$ + format.date "year" output.check + inbook.date.block + format.pages "pages" output.check + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {conference} { inproceedings } + +FUNCTION {manual} +{ "%Type = Manual" write$ + output.bibitem + format.authors output + author format.key output + new.block + format.btitle "title" output.check + organization address new.block.checkb + organization "organization" bibinfo.check output + address "address" bibinfo.check output + format.edition output + format.date "year" output.check + inbook.date.block + format.pages "pages" output.check + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {mastersthesis} +{ "%Type = Masterthesis" write$ + output.bibitem + format.authors "author" output.check + author format.key output + new.block + format.btitle + "title" output.check + new.block + bbl.mthesis format.thesis.type output.nonnull + school "school" bibinfo.warn output + address "address" bibinfo.check output + format.date "year" output.check + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {misc} +{ "%Type = Misc" write$ + output.bibitem + format.authors output + author format.key output + new.block + format.title output + new.block + howpublished "howpublished" bibinfo.check output + format.date "year" output.check + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {phdthesis} +{ "%Type = Phdthesis" write$ + output.bibitem + format.authors "author" output.check + author format.key output + new.block + format.btitle + "title" output.check + new.block + bbl.phdthesis format.thesis.type output.nonnull + school "school" bibinfo.warn output + address "address" bibinfo.check output + format.date "year" output.check + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {proceedings} +{ "%Type = Proceedings" write$ + output.bibitem + format.editors output + editor format.key output + new.block + format.btitle "title" output.check + format.bvolume output + format.number.series output + new.sentence + publisher empty$ + { format.organization.address output } + { organization "organization" bibinfo.check output + format.publisher.address output + } + if$ + format.date "year" output.check + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {techreport} +{ "%Type = Techreport" write$ + output.bibitem + format.authors "author" output.check + author format.key output + new.block + format.btitle + "title" output.check + new.block + format.tr.number output.nonnull + institution "institution" bibinfo.warn output + address "address" bibinfo.check output + format.date "year" output.check + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {unpublished} +{ "%Type = Unpublished" write$ + output.bibitem + format.authors "author" output.check + author format.key output + new.block + format.title "title" output.check + format.date "year" output.check + new.block + 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$ +} +INTEGERS { len } +FUNCTION {chop.word} +{ 's := + 'len := + s #1 len substring$ = + { s len #1 + global.max$ substring$ } + 's + if$ +} +FUNCTION {format.lab.names} +{ 's := + "" 't := + s #1 "{vv~}{ll}" format.name$ + s num.names$ duplicate$ + #2 > + { pop$ + " " * bbl.etal * + } + { #2 < + 'skip$ + { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = + { + " " * bbl.etal * + } + { bbl.and space.word * s #2 "{vv~}{ll}" format.name$ + * } + if$ + } + if$ + } + if$ +} + +FUNCTION {author.key.label} +{ author empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { author format.lab.names } + if$ +} + +FUNCTION {author.editor.key.label} +{ author empty$ + { editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.lab.names } + if$ + } + { author format.lab.names } + if$ +} + +FUNCTION {editor.key.label} +{ editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.lab.names } + if$ +} + +FUNCTION {calc.short.authors} +{ type$ "book" = + type$ "inbook" = + or + 'author.editor.key.label + { type$ "proceedings" = + 'editor.key.label + 'author.key.label + if$ + } + if$ + 'short.list := +} + +FUNCTION {calc.label} +{ calc.short.authors + short.list + "(" + * + year duplicate$ empty$ + short.list key field.or.null = or + { pop$ "" } + 'skip$ + if$ + * + 'label := +} + +FUNCTION {sort.format.names} +{ 's := + #1 'nameptr := + "" + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{ll{ }}{ f{ }}{ jj{ }}" + format.name$ 't := + nameptr #1 > + { + " " * + namesleft #1 = t "others" = and + { "zzzzz" * } + { t sortify * } + if$ + } + { t sortify * } + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {sort.format.title} +{ 't := + "A " #2 + "An " #3 + "The " #4 t chop.word + chop.word + chop.word + sortify + #1 global.max$ substring$ +} +FUNCTION {author.sort} +{ author empty$ + { key empty$ + { "to sort, need author or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { author sort.format.names } + if$ +} +FUNCTION {author.editor.sort} +{ author empty$ + { editor empty$ + { key empty$ + { "to sort, need author, editor, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { editor sort.format.names } + if$ + } + { author sort.format.names } + if$ +} +FUNCTION {editor.sort} +{ editor empty$ + { key empty$ + { "to sort, need editor or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { editor sort.format.names } + if$ +} +FUNCTION {presort} +{ calc.label + label sortify + " " + * + type$ "book" = + type$ "inbook" = + or + 'author.editor.sort + { type$ "proceedings" = + 'editor.sort + 'author.sort + if$ + } + if$ + #1 entry.max$ substring$ + 'sort.label := + sort.label + * + " " + * + title field.or.null + sort.format.title + * + #1 entry.max$ substring$ + 'sort.key$ := +} + +ITERATE {presort} +SORT +STRINGS { last.label next.extra } +INTEGERS { last.extra.num number.label } +FUNCTION {initialize.extra.label.stuff} +{ #0 int.to.chr$ 'last.label := + "" 'next.extra := + #0 'last.extra.num := + #0 'number.label := +} +FUNCTION {forward.pass} +{ last.label label = + { last.extra.num #1 + 'last.extra.num := + last.extra.num int.to.chr$ 'extra.label := + } + { "a" chr.to.int$ 'last.extra.num := + "" 'extra.label := + label 'last.label := + } + if$ + number.label #1 + 'number.label := +} +FUNCTION {reverse.pass} +{ next.extra "b" = + { "a" 'extra.label := } + 'skip$ + if$ + extra.label 'next.extra := + extra.label + duplicate$ empty$ + 'skip$ + { "{\natexlab{" swap$ * "}}" * } + if$ + 'extra.label := + label extra.label * 'label := +} +EXECUTE {initialize.extra.label.stuff} +ITERATE {forward.pass} +REVERSE {reverse.pass} +FUNCTION {bib.sort.order} +{ sort.label + " " + * + year field.or.null sortify + * + " " + * + title field.or.null + sort.format.title + * + #1 entry.max$ substring$ + 'sort.key$ := +} +ITERATE {bib.sort.order} +SORT +FUNCTION {begin.bib} +{ preamble$ empty$ + 'skip$ + { preamble$ write$ newline$ } + if$ + "\begin{thebibliography}{" number.label int.to.str$ * "}" * + write$ newline$ + "\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\undefined \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 +%% +%% +%% Change log: +%% ----------- +%% 22.04.2011 +%% +%% 10.08.2012 +%% a. doi, url, eprint, pmid added +%% b. Bibtype `webpage' defined +%% +%% 30.08.2012 +%% a. collaboration added. +%% +%% End of file `model4-names.bst'. + diff --git a/model5-names.bst b/model5-names.bst new file mode 100644 index 0000000..d377fda --- /dev/null +++ b/model5-names.bst @@ -0,0 +1,1723 @@ +%% +%% This is file `model5-names.bst' (Version 2.0), +%% +%% Copyright 2009-2012 Elsevier Ltd +%% +%% This file is part of the 'Elsarticle Bundle'. +%% --------------------------------------------- +%% +%% It may be distributed under the conditions of the LaTeX Project Public +%% License, either version 1.2 of this license or (at your option) any +%% later version. The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.2 or later is part of all distributions of LaTeX +%% version 1999/12/01 or later. +%% +%% $Id: model5-names.bst 214 2012-10-22 07:34:19Z rishi $ +%% +%% $URL: http://lenova.river-valley.com/svn/elsbst/trunk/New-Model-5/model5-names.bst $ +%% +%% + +ENTRY + { 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 := +} +STRINGS { s t} +FUNCTION {output.nonnull} +{ 's := + output.state mid.sentence = + { " " * write$ } + { output.state after.block = + { add.period$ write$ + newline$ + "\newblock " write$ + } + { output.state before.all = + 'write$ + { add.period$ " " * write$ } + if$ + } + if$ + mid.sentence 'output.state := + } + if$ + s +} +FUNCTION {output} +{ duplicate$ empty$ + 'pop$ + 'output.nonnull + if$ +} +FUNCTION {output.check} +{ 't := + duplicate$ empty$ + { pop$ "empty " t * " in " * cite$ * warning$ } + 'output.nonnull + if$ +} +FUNCTION {fin.entry} +{ add.period$ + write$ + newline$ +} + +FUNCTION {new.block} +{ output.state before.all = + 'skip$ + { after.block 'output.state := } + if$ +} +FUNCTION {new.sentence} +{ output.state after.block = + 'skip$ + { output.state before.all = + 'skip$ + { after.sentence 'output.state := } + if$ + } + if$ +} +FUNCTION {add.blank} +{ " " * before.all 'output.state := +} + +FUNCTION {date.block} +{ + new.block +} + +FUNCTION {not} +{ { #0 } + { #1 } + if$ +} +FUNCTION {and} +{ 'skip$ + { pop$ #0 } + if$ +} +FUNCTION {or} +{ { pop$ #1 } + 'skip$ + if$ +} +FUNCTION {new.block.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.block + if$ +} +FUNCTION {field.or.null} +{ duplicate$ empty$ + { pop$ "" } + 'skip$ + if$ +} +FUNCTION {emphasize} +{ duplicate$ empty$ + { pop$ "" } + { "{\it " swap$ * "\/}" * } + if$ +} +FUNCTION {tie.or.space.prefix} +{ duplicate$ text.length$ #3 < + { "~" } + { " " } + if$ + swap$ +} + +FUNCTION {capitalize} +{ "u" change.case$ "t" change.case$ } + +FUNCTION {space.word} +{ " " swap$ * " " * } + % Here are the language-specific definitions for explicit words. + % Each function has a name bbl.xxx where xxx is the English word. + % The language selected here is ENGLISH +FUNCTION {bbl.and} +{ "\&"} + +FUNCTION {bbl.etal} +{ "et~al." } + +FUNCTION {bbl.editors} +{ "eds." } + +FUNCTION {bbl.editor} +{ "ed." } + +FUNCTION {bbl.edby} +{ "edited by" } + +FUNCTION {bbl.edition} +{ "ed." } + +FUNCTION {bbl.volume} +{ "volume" } + +FUNCTION {bbl.of} +{ "of" } + +FUNCTION {bbl.number} +{ "number" } + +FUNCTION {bbl.nr} +{ "no." } + +FUNCTION {bbl.in} +{ "in" } + +FUNCTION {bbl.pages} +{ "pp." } + +FUNCTION {bbl.page} +{ "p." } + +FUNCTION {bbl.chapter} +{ "chapter" } + +FUNCTION {bbl.techrep} +{ "Technical Report" } + +FUNCTION {bbl.mthesis} +{ "Master's thesis" } + +FUNCTION {bbl.phdthesis} +{ "Ph.D. thesis" } + +FUNCTION {bbl.first} +{ "1st" } + +FUNCTION {bbl.second} +{ "2nd" } + +FUNCTION {bbl.third} +{ "3rd" } + +FUNCTION {bbl.fourth} +{ "4th" } + +FUNCTION {bbl.fifth} +{ "5th" } + +FUNCTION {bbl.st} +{ "st" } + +FUNCTION {bbl.nd} +{ "nd" } + +FUNCTION {bbl.rd} +{ "rd" } + +FUNCTION {bbl.th} +{ "th" } + +MACRO {jan} {"January"} + +MACRO {feb} {"February"} + +MACRO {mar} {"March"} + +MACRO {apr} {"April"} + +MACRO {may} {"May"} + +MACRO {jun} {"June"} + +MACRO {jul} {"July"} + +MACRO {aug} {"August"} + +MACRO {sep} {"September"} + +MACRO {oct} {"October"} + +MACRO {nov} {"November"} + +MACRO {dec} {"December"} + +FUNCTION {eng.ord} +{ duplicate$ "1" swap$ * + #-2 #1 substring$ "1" = + { bbl.th * } + { duplicate$ #-1 #1 substring$ + duplicate$ "1" = + { pop$ bbl.st * } + { duplicate$ "2" = + { pop$ bbl.nd * } + { "3" = + { bbl.rd * } + { bbl.th * } + if$ + } + if$ + } + if$ + } + if$ +} + +MACRO {acmcs} {"ACM Comput. Surv."} + +MACRO {acta} {"Acta Inf."} + +MACRO {cacm} {"Commun. ACM"} + +MACRO {ibmjrd} {"IBM J. Res. Dev."} + +MACRO {ibmsj} {"IBM Syst.~J."} + +MACRO {ieeese} {"IEEE Trans. Software Eng."} + +MACRO {ieeetc} {"IEEE Trans. Comput."} + +MACRO {ieeetcad} + {"IEEE Trans. Comput. Aid. Des."} + +MACRO {ipl} {"Inf. Process. Lett."} + +MACRO {jacm} {"J.~ACM"} + +MACRO {jcss} {"J.~Comput. Syst. Sci."} + +MACRO {scp} {"Sci. Comput. Program."} + +MACRO {sicomp} {"SIAM J. Comput."} + +MACRO {tocs} {"ACM Trans. Comput. Syst."} + +MACRO {tods} {"ACM Trans. Database Syst."} + +MACRO {tog} {"ACM Trans. Graphic."} + +MACRO {toms} {"ACM Trans. Math. Software"} + +MACRO {toois} {"ACM Trans. Office Inf. Syst."} + +MACRO {toplas} {"ACM Trans. Progr. Lang. Syst."} + +MACRO {tcs} {"Theor. Comput. Sci."} + +FUNCTION {bibinfo.check} +{ swap$ + duplicate$ missing$ + { + pop$ pop$ + "" + } + { duplicate$ empty$ + { + swap$ pop$ + } + { swap$ + "\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} +{ 'bibinfo := + duplicate$ empty$ 'skip$ { + 's := + "" 't := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{vv~}{ll}{, f.}{, jj}" + format.name$ + bibinfo bibinfo.check + 't := + nameptr #1 > + { + nameptr #9 + #90 + + #1 + = + numnames #9 + #90 + + > and + { "others" 't := + #1 'namesleft := } + 'skip$ + if$ + namesleft #1 > + { ", " * t * } + { + s nameptr "{ll}" format.name$ duplicate$ "others" = + { 't := } + { pop$ } + if$ + t "others" = + { + " " * bbl.etal * + } + {"," * + bbl.and + space.word * t * + } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ + } if$ +} +FUNCTION {format.names.ed} +{ + 'bibinfo := + duplicate$ empty$ 'skip$ { + 's := + "" 't := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{f.~}{vv~}{ll}{, jj}" + format.name$ + bibinfo bibinfo.check + 't := + nameptr #1 > + { + namesleft #1 > + { ", " * t * } + { + s nameptr "{ll}" format.name$ duplicate$ "others" = + { 't := } + { pop$ } + if$ + t "others" = + { + + " " * bbl.etal * + } + {"," * + bbl.and + space.word * t * + } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ + } if$ +} +FUNCTION {format.key} +{ empty$ + { key field.or.null } + { "" } + if$ +} + +FUNCTION {format.authors} +{ author "author" format.names + 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.note} +{ + note empty$ + { "" } + { note #1 #1 substring$ + duplicate$ "{" = + 'skip$ + { output.state mid.sentence = + { "l" } + { "u" } + if$ + change.case$ + } + if$ + note #2 global.max$ substring$ * "note" bibinfo.check + } + if$ +} + +FUNCTION {format.title} +{ title + duplicate$ empty$ 'skip$ + { "t" change.case$ } + if$ + "title" bibinfo.check +} +FUNCTION {format.full.names} +{'s := + "" 't := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{vv~}{ll}" format.name$ + 't := + nameptr #1 > + { + nameptr #9 + #90 + + #1 + = + numnames #9 + #90 + + > and + { "others" 't := + #1 'namesleft := } + 'skip$ + if$ + namesleft #1 > + { ", " * t * } + { + s nameptr "{ll}" format.name$ duplicate$ "others" = + { 't := } + { pop$ } + if$ + t "others" = + { + " " * bbl.etal * + } + { + bbl.and + space.word * t * + } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {author.editor.key.full} +{ author empty$ + { editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.full.names } + if$ + } + { author format.full.names } + if$ +} + +FUNCTION {author.key.full} +{ author empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { author format.full.names } + if$ +} + +FUNCTION {editor.key.full} +{ editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.full.names } + if$ +} + +FUNCTION {make.full.names} +{ type$ "book" = + type$ "inbook" = + or + 'author.editor.key.full + { type$ "proceedings" = + 'editor.key.full + 'author.key.full + if$ + } + if$ +} + +FUNCTION {output.bibitem} +{ newline$ + "\bibitem[{" write$ + label write$ + ")" make.full.names duplicate$ short.list = + { pop$ } + { * } + if$ + "}]{" * write$ + cite$ write$ + "}" write$ + newline$ + "" + before.all 'output.state := +} + +FUNCTION {n.dashify} +{ + 't := + "" + { t empty$ not } + { t #1 #1 substring$ "-" = + { t #1 #2 substring$ "--" = not + { "--" * + t #2 global.max$ substring$ 't := + } + { { t #1 #1 substring$ "-" = } + { "-" * + t #2 global.max$ substring$ 't := + } + while$ + } + if$ + } + { t #1 #1 substring$ * + t #2 global.max$ substring$ 't := + } + if$ + } + while$ +} + +FUNCTION {word.in} +{ bbl.in capitalize + "" * + " " * } + +FUNCTION {format.date} +{ year "year" bibinfo.check duplicate$ empty$ + { + } + 'skip$ + if$ + extra.label * + before.all 'output.state := + " (" swap$ * ")" * +} +FUNCTION {format.btitle} +{ title "title" bibinfo.check + duplicate$ empty$ 'skip$ + { + emphasize + } + if$ +} +FUNCTION {either.or.check} +{ empty$ + 'pop$ + { "can't use both " swap$ * " fields in " * cite$ * warning$ } + if$ +} +FUNCTION {format.bvolume} +{ volume empty$ + { "" } + { bbl.volume volume tie.or.space.prefix + "volume" bibinfo.check * * + series "series" bibinfo.check + duplicate$ empty$ 'pop$ + { swap$ bbl.of space.word * swap$ + emphasize * } + if$ + "volume and number" number either.or.check + } + if$ +} +FUNCTION {format.number.series} +{ volume empty$ + { number empty$ + { series field.or.null } + { series empty$ + { number "number" bibinfo.check } + { output.state mid.sentence = + { bbl.number } + { bbl.number capitalize } + if$ + number tie.or.space.prefix "number" bibinfo.check * * + bbl.in space.word * + series "series" bibinfo.check * + } + if$ + } + if$ + } + { "" } + if$ +} +FUNCTION {is.num} +{ chr.to.int$ + duplicate$ "0" chr.to.int$ < not + swap$ "9" chr.to.int$ > not and +} + +FUNCTION {extract.num} +{ duplicate$ 't := + "" 's := + { t empty$ not } + { t #1 #1 substring$ + t #2 global.max$ substring$ 't := + duplicate$ is.num + { s swap$ * 's := } + { pop$ "" 't := } + if$ + } + while$ + s empty$ + 'skip$ + { pop$ s } + if$ +} + +FUNCTION {convert.edition} +{ extract.num "l" change.case$ 's := + s "first" = s "1" = or + { bbl.first 't := } + { s "second" = s "2" = or + { bbl.second 't := } + { s "third" = s "3" = or + { bbl.third 't := } + { s "fourth" = s "4" = or + { bbl.fourth 't := } + { s "fifth" = s "5" = or + { bbl.fifth 't := } + { s #1 #1 substring$ is.num + { s eng.ord 't := } + { edition 't := } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + t +} + +FUNCTION {format.edition} +{ edition duplicate$ empty$ 'skip$ + { + convert.edition + output.state mid.sentence = + { "l" } + { "t" } + if$ change.case$ + "edition" bibinfo.check + " " * bbl.edition * + "(" swap$ * ")" * + } + if$ +} +INTEGERS { multiresult } +FUNCTION {multi.page.check} +{ 't := + #0 'multiresult := + { multiresult not + t empty$ not + and + } + { t #1 #1 substring$ + duplicate$ "-" = + swap$ duplicate$ "," = + swap$ "+" = + or or + { #1 'multiresult := } + { t #2 global.max$ substring$ 't := } + if$ + } + while$ + multiresult +} +FUNCTION {format.pages} +{ pages duplicate$ empty$ 'skip$ + { duplicate$ multi.page.check + { + bbl.pages swap$ + n.dashify + } + { + bbl.page swap$ + } + if$ + tie.or.space.prefix + "pages" bibinfo.check + * * + "(" swap$ * ")" * + } + if$ +} + +FUNCTION {format.journal.pages} +{ pages duplicate$ empty$ 'pop$ + { swap$ duplicate$ empty$ + { pop$ pop$ format.pages } + { + ", " * + swap$ + n.dashify + "pages" bibinfo.check + * + } + if$ + } + if$ +} +FUNCTION {format.vol.num.pages} +{ volume field.or.null + duplicate$ empty$ 'skip$ + { + "volume" bibinfo.check + } + if$ + emphasize + format.journal.pages +} + +FUNCTION {format.chapter.pages} +{ chapter empty$ + 'format.pages + { type empty$ + { bbl.chapter } + { type "l" change.case$ + "type" bibinfo.check + } + if$ + chapter tie.or.space.prefix + "chapter" bibinfo.check + * * + pages empty$ + 'skip$ + { ". " * format.pages * } + if$ + } + if$ +} + +FUNCTION {format.booktitle} +{ + booktitle "booktitle" bibinfo.check + emphasize +} +FUNCTION {format.in.ed.booktitle} +{ format.booktitle duplicate$ empty$ 'skip$ + { + editor "editor" format.names.ed duplicate$ empty$ 'pop$ + { + " " * + get.bbl.editor + capitalize + "(" swap$ * "), " * + * swap$ + * } + if$ + word.in swap$ * + } + if$ +} +FUNCTION {format.thesis.type} +{ type duplicate$ empty$ + 'pop$ + { swap$ pop$ + "t" change.case$ "type" bibinfo.check + } + if$ +} +FUNCTION {format.tr.number} +{ number "number" bibinfo.check + type duplicate$ empty$ + { pop$ bbl.techrep } + 'skip$ + if$ + "type" bibinfo.check + swap$ duplicate$ empty$ + { pop$ "t" change.case$ } + { tie.or.space.prefix * * } + if$ +} +FUNCTION {format.article.crossref} +{ + word.in + " \cite{" * crossref * "}" * +} +FUNCTION {format.book.crossref} +{ volume duplicate$ empty$ + { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ + pop$ word.in + } + { bbl.volume + capitalize + swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word * + } + if$ + " \cite{" * crossref * "}" * +} +FUNCTION {format.incoll.inproc.crossref} +{ + word.in + " \cite{" * crossref * "}" * +} +FUNCTION {format.org.or.pub} +{ 't := + "" + address empty$ t empty$ and + 'skip$ + { + address "address" bibinfo.check * + t empty$ + 'skip$ + { address empty$ + 'skip$ + { ": " * } + if$ + t * + } + if$ + } + if$ +} +FUNCTION {format.publisher.address} +{ publisher "publisher" bibinfo.check format.org.or.pub +} + +FUNCTION {format.organization.address} +{ 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$ + print.url output + fin.entry +} + +FUNCTION {article} +{ "%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.block + crossref missing$ + { + journal + "journal" bibinfo.check + emphasize + "journal" output.check + ", " * + format.vol.num.pages output + } + { format.article.crossref output.nonnull + format.pages output + } + if$ + print.url output + print.doi output + print.eprint output + print.pubmed output + new.block + 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.date "year" output.check + date.block + format.btitle "title" output.check + crossref missing$ + { format.bvolume output + new.block + new.sentence + format.number.series output + format.edition output + new.block + format.publisher.address output + } + { + 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 +} + +FUNCTION {booklet} +{ "%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.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 +} + +FUNCTION {inbook} +{ "%Type = Inbook" 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 + crossref missing$ + { format.in.ed.booktitle "booktitle" output.check + format.number.series output + format.chapter.pages output + new.block + format.publisher.address output + format.bvolume output + new.sentence + format.edition output + } + { format.incoll.inproc.crossref output.nonnull + } + if$ + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + + +FUNCTION {incollection} +{ "%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 + new.block + crossref missing$ + { format.in.ed.booktitle "booktitle" output.check + format.number.series output + format.chapter.pages output + new.block + format.publisher.address output + format.bvolume output + new.sentence + format.edition output + } + { format.incoll.inproc.crossref output.nonnull + } + if$ + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {inproceedings} +{ "%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 + new.block + crossref missing$ + { format.in.ed.booktitle "booktitle" output.check + format.number.series output + format.pages output + new.block + publisher empty$ + { format.organization.address output } + { organization "organization" bibinfo.check output + format.publisher.address output + } + if$ + format.bvolume output + } + { format.incoll.inproc.crossref output.nonnull + } + if$ + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {conference} { inproceedings } + +FUNCTION {manual} +{ "%Type = Manual" write$ + output.bibitem + format.authors output + author format.key output + format.date "year" output.check + date.block + format.btitle "title" output.check + organization address new.block.checkb + organization "organization" bibinfo.check output + address "address" bibinfo.check output + format.edition output + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {mastersthesis} +{ "%Type = Masterthesis" write$ + output.bibitem + format.authors "author" output.check + author format.key output + format.date "year" output.check + date.block + format.btitle + "title" output.check + new.block + bbl.mthesis format.thesis.type output.nonnull + school "school" bibinfo.warn output + address "address" bibinfo.check output + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {misc} +{ "%Type = Misc" write$ + output.bibitem + format.authors output + author format.key output + format.date "year" output.check + date.block + format.title output + new.block + howpublished "howpublished" bibinfo.check output + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {phdthesis} +{ "%Type = Phdthesis" write$ + output.bibitem + format.authors "author" output.check + author format.key output + format.date "year" output.check + date.block + format.btitle + "title" output.check + new.block + bbl.phdthesis format.thesis.type output.nonnull + school "school" bibinfo.warn output + address "address" bibinfo.check output + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {proceedings} +{ "%Type = Proceedings" write$ + output.bibitem + format.editors output + editor format.key output + format.date "year" output.check + date.block + format.btitle "title" output.check + format.bvolume output + new.sentence + format.number.series output + publisher empty$ + { format.organization.address output } + { organization "organization" bibinfo.check output + format.publisher.address output + } + if$ + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {techreport} +{ "%Type = Techreport" write$ + output.bibitem + format.authors "author" output.check + author format.key output + format.date "year" output.check + date.block + format.btitle + "title" output.check + new.block + format.tr.number output.nonnull + 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 +} + +FUNCTION {unpublished} +{ "%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 +} + +FUNCTION {default.type} { misc } +READ +FUNCTION {sortify} +{ purify$ + "l" change.case$ +} +INTEGERS { len } +FUNCTION {chop.word} +{ 's := + 'len := + s #1 len substring$ = + { s len #1 + global.max$ substring$ } + 's + if$ +} +FUNCTION {format.lab.names} +{ 's := + "" 't := + s #1 "{vv~}{ll}" format.name$ + s num.names$ duplicate$ + #2 > + { pop$ + " " * bbl.etal * + } + { #2 < + 'skip$ + { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = + { + " " * bbl.etal * + } + { bbl.and space.word * s #2 "{vv~}{ll}" format.name$ + * } + if$ + } + if$ + } + if$ +} + +FUNCTION {author.key.label} +{ author empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { author format.lab.names } + if$ +} + +FUNCTION {author.editor.key.label} +{ author empty$ + { editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.lab.names } + if$ + } + { author format.lab.names } + if$ +} + +FUNCTION {editor.key.label} +{ editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.lab.names } + if$ +} + +FUNCTION {calc.short.authors} +{ type$ "book" = + type$ "inbook" = + or + 'author.editor.key.label + { type$ "proceedings" = + 'editor.key.label + 'author.key.label + if$ + } + if$ + 'short.list := +} + +FUNCTION {calc.label} +{ calc.short.authors + short.list + "(" + * + year duplicate$ empty$ + short.list key field.or.null = or + { pop$ "" } + 'skip$ + if$ + * + 'label := +} + +FUNCTION {sort.format.names} +{ 's := + #1 'nameptr := + "" + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{ll{ }}{ f{ }}{ jj{ }}" + format.name$ 't := + nameptr #1 > + { + nameptr #9 + #90 + + #1 + = + numnames #9 + #90 + + > and + { "others" 't := + #1 'namesleft := } + 'skip$ + if$ + " " * + namesleft #1 = t "others" = and + { "zzzzz" * } + { t sortify * } + if$ + } + { t sortify * } + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {sort.format.title} +{ 't := + "A " #2 + "An " #3 + "The " #4 t chop.word + chop.word + chop.word + sortify + #1 global.max$ substring$ +} +FUNCTION {author.sort} +{ author empty$ + { key empty$ + { "to sort, need author or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { author sort.format.names } + if$ +} +FUNCTION {author.editor.sort} +{ author empty$ + { editor empty$ + { key empty$ + { "to sort, need author, editor, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { editor sort.format.names } + if$ + } + { author sort.format.names } + if$ +} +FUNCTION {editor.sort} +{ editor empty$ + { key empty$ + { "to sort, need editor or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { editor sort.format.names } + if$ +} +FUNCTION {presort} +{ calc.label + label sortify + " " + * + type$ "book" = + type$ "inbook" = + or + 'author.editor.sort + { type$ "proceedings" = + 'editor.sort + 'author.sort + if$ + } + if$ + #1 entry.max$ substring$ + 'sort.label := + sort.label + * + " " + * + title field.or.null + sort.format.title + * + #1 entry.max$ substring$ + 'sort.key$ := +} + +ITERATE {presort} +SORT +STRINGS { last.label next.extra } +INTEGERS { last.extra.num number.label } +FUNCTION {initialize.extra.label.stuff} +{ #0 int.to.chr$ 'last.label := + "" 'next.extra := + #0 'last.extra.num := + #0 'number.label := +} +FUNCTION {forward.pass} +{ last.label label = + { last.extra.num #1 + 'last.extra.num := + last.extra.num int.to.chr$ 'extra.label := + } + { "a" chr.to.int$ 'last.extra.num := + "" 'extra.label := + label 'last.label := + } + if$ + number.label #1 + 'number.label := +} +FUNCTION {reverse.pass} +{ next.extra "b" = + { "a" 'extra.label := } + 'skip$ + if$ + extra.label 'next.extra := + extra.label + duplicate$ empty$ + 'skip$ + { "{\natexlab{" swap$ * "}}" * } + if$ + 'extra.label := + label extra.label * 'label := +} +EXECUTE {initialize.extra.label.stuff} +ITERATE {forward.pass} +REVERSE {reverse.pass} +FUNCTION {bib.sort.order} +{ sort.label + " " + * + year field.or.null sortify + * + " " + * + title field.or.null + sort.format.title + * + #1 entry.max$ substring$ + 'sort.key$ := +} +ITERATE {bib.sort.order} +SORT +FUNCTION {begin.bib} +{ preamble$ empty$ + 'skip$ + { preamble$ write$ newline$ } + if$ + "\begin{thebibliography}{" number.label int.to.str$ * "}" * + write$ newline$ + "\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi" + write$ newline$ + "\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$ +} +EXECUTE {end.bib} +%% End of customized bst file +%% +%% End of file `model5-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/model6-num-names.bst b/model6-num-names.bst new file mode 100644 index 0000000..2fed96d --- /dev/null +++ b/model6-num-names.bst @@ -0,0 +1,1684 @@ +%% +%% This is file `model6-num-names.bst' (Version 2.0), +%% +%% Copyright 2009-2012 Elsevier Ltd +%% +%% This file is part of the 'Elsarticle Bundle'. +%% --------------------------------------------- +%% +%% It may be distributed under the conditions of the LaTeX Project Public +%% License, either version 1.2 of this license or (at your option) any +%% later version. The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.2 or later is part of all distributions of LaTeX +%% version 1999/12/01 or later. +%% +%% $Id: model6-num-names.bst 215 2012-10-22 07:34:58Z rishi $ +%% +%% $URL: http://lenova.river-valley.com/svn/elsbst/trunk/New-Model-6/model6-num-names.bst $ +%% +%% + +ENTRY + { address + archive + author + booktitle + chapter + collaboration + edition + editor + eid + howpublished + institution + isbn + journal + key + month + note + number + numpages + 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 := +} +STRINGS { s t} +FUNCTION {output.nonnull} +{ 's := + output.state mid.sentence = + { "; " * write$ } + { output.state after.block = + { add.period$ write$ + newline$ + "\newblock " write$ + } + { output.state before.all = + 'write$ + { add.period$ " " * write$ } + if$ + } + if$ + mid.sentence 'output.state := + } + if$ + s +} +FUNCTION {output} +{ duplicate$ empty$ + 'pop$ + 'output.nonnull + if$ +} +FUNCTION {output.check} +{ 't := + duplicate$ empty$ + { pop$ "empty " t * " in " * cite$ * warning$ } + 'output.nonnull + if$ +} +FUNCTION {fin.entry} +{ add.period$ + write$ + newline$ +} + +FUNCTION {new.block} +{ output.state before.all = + 'skip$ + { after.block 'output.state := } + if$ +} +FUNCTION {new.sentence} +{ output.state after.block = + 'skip$ + { output.state before.all = + 'skip$ + { after.sentence 'output.state := } + if$ + } + if$ +} +FUNCTION {add.blank} +{ " " * before.all 'output.state := +} + +FUNCTION {no.blank.or.punct} +{ "" * before.all 'output.state := +} + +FUNCTION {date.block} +{ + ";" * + no.blank.or.punct +} + +FUNCTION {book.date.block} +{ ":\unskip" * + no.blank.or.punct +} + +FUNCTION {not} +{ { #0 } + { #1 } + if$ +} +FUNCTION {and} +{ 'skip$ + { pop$ #0 } + if$ +} +FUNCTION {or} +{ { pop$ #1 } + 'skip$ + if$ +} +STRINGS {z} +FUNCTION {remove.dots} +{ 'z := + "" + { z empty$ not } + { z #1 #1 substring$ + z #2 global.max$ substring$ 'z := + duplicate$ "." = 'pop$ + { * } + if$ + } + while$ +} +FUNCTION {new.block.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.block + if$ +} +FUNCTION {field.or.null} +{ duplicate$ empty$ + { pop$ "" } + 'skip$ + if$ +} +FUNCTION {emphasize} +{ duplicate$ empty$ + { pop$ "" } + { "\emph{" swap$ * "}" * } + if$ +} +FUNCTION {tie.or.space.prefix} +{ duplicate$ text.length$ #3 < + { "~" } + { " " } + if$ + swap$ +} + +FUNCTION {capitalize} +{ "u" change.case$ "t" change.case$ } + +FUNCTION {space.word} +{ " " swap$ * " " * } + % Here are the language-specific definitions for explicit words. + % Each function has a name bbl.xxx where xxx is the English word. + % The language selected here is ENGLISH +FUNCTION {bbl.and} +{ "and"} + +FUNCTION {bbl.etal} +{ "et~al." } + +FUNCTION {bbl.editors} +{ "eds." } + +FUNCTION {bbl.editor} +{ "ed." } + +FUNCTION {bbl.edby} +{ "edited by" } + +FUNCTION {bbl.edition} +{ "ed." } + +FUNCTION {bbl.volume} +{ "vol." } + +FUNCTION {bbl.of} +{ "of" } + +FUNCTION {bbl.number} +{ "no." } + +FUNCTION {bbl.nr} +{ "no." } + +FUNCTION {bbl.in} +{ "in" } + +FUNCTION {bbl.pages} +{ "" } + +FUNCTION {bbl.page} +{ "" } + +FUNCTION {bbl.eidpp} +{ "pages" } + +FUNCTION {bbl.chapter} +{ "chap." } + +FUNCTION {bbl.techrep} +{ "Tech. Rep." } + +FUNCTION {bbl.mthesis} +{ "Master's thesis" } + +FUNCTION {bbl.phdthesis} +{ "Ph.D. thesis" } + +FUNCTION {close.brace} +{ "}{}" } + +MACRO {jan} {"Jan."} + +MACRO {feb} {"Feb."} + +MACRO {mar} {"Mar."} + +MACRO {apr} {"Apr."} + +MACRO {may} {"May"} + +MACRO {jun} {"Jun."} + +MACRO {jul} {"Jul."} + +MACRO {aug} {"Aug."} + +MACRO {sep} {"Sep."} + +MACRO {oct} {"Oct."} + +MACRO {nov} {"Nov."} + +MACRO {dec} {"Dec."} + +MACRO {acmcs} {"ACM Comput. Surv."} + +MACRO {acta} {"Acta Inf."} + +MACRO {cacm} {"Commun. ACM"} + +MACRO {ibmjrd} {"IBM J. Res. Dev."} + +MACRO {ibmsj} {"IBM Syst.~J."} + +MACRO {ieeese} {"IEEE Trans. Software Eng."} + +MACRO {ieeetc} {"IEEE Trans. Comput."} + +MACRO {ieeetcad} + {"IEEE Trans. Comput. Aid. Des."} + +MACRO {ipl} {"Inf. Process. Lett."} + +MACRO {jacm} {"J.~ACM"} + +MACRO {jcss} {"J.~Comput. Syst. Sci."} + +MACRO {scp} {"Sci. Comput. Program."} + +MACRO {sicomp} {"SIAM J. Comput."} + +MACRO {tocs} {"ACM Trans. Comput. Syst."} + +MACRO {tods} {"ACM Trans. Database Syst."} + +MACRO {tog} {"ACM Trans. Graphic."} + +MACRO {toms} {"ACM Trans. Math. Software"} + +MACRO {toois} {"ACM Trans. Office Inf. Syst."} + +MACRO {toplas} {"ACM Trans. Progr. Lang. Syst."} + +MACRO {tcs} {"Theor. Comput. Sci."} + +FUNCTION {bibinfo.check} +{ swap$ + duplicate$ missing$ + { + pop$ pop$ + "" + } + { duplicate$ empty$ + { + swap$ pop$ + } + { swap$ + "\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$ +} + +INTEGERS { nameptr namesleft numnames } + + +STRINGS { bibinfo} + +% FUNCTION {format.names} +% { 'bibinfo := +% duplicate$ empty$ 'skip$ { +% 's := +% "" 't := +% #1 'nameptr := +% s num.names$ 'numnames := +% numnames 'namesleft := +% { namesleft #0 > } +% { s nameptr +% "{vv~}{ll}{ jj}{ f{}}" +% format.name$ +% remove.dots +% bibinfo bibinfo.check +% 't := +% nameptr #1 > +% { +% 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} +{ 'bibinfo := + duplicate$ empty$ 'skip$ { + 's := + "" 't := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{vv~}{ll}{ jj}\xfnm[{ f{.}.}]" + format.name$ +% remove.dots + bibinfo bibinfo.check + 't := + nameptr #1 > + { + namesleft #1 > + { ", " * t * } + { + "," * + s nameptr "{ll}" format.name$ duplicate$ "others" = + { 't := } + { pop$ } + if$ + t "others" = + { + " " * bbl.etal * + } + { " " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ + } if$ +} + + +FUNCTION {format.names.ed} +{ + format.names +} +FUNCTION {format.key} +{ empty$ + { key field.or.null } + { "" } + if$ +} + +FUNCTION {format.authors} +{ author "author" format.names + 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 + * + } + if$ +} +FUNCTION {format.isbn} +{ isbn "isbn" bibinfo.check + duplicate$ empty$ 'skip$ + { + new.block + "ISBN " swap$ * + } + if$ +} + +FUNCTION {format.note} +{ + note empty$ + { "" } + { note #1 #1 substring$ + duplicate$ "{" = + 'skip$ + { output.state mid.sentence = + { "l" } + { "u" } + if$ + change.case$ + } + if$ + note #2 global.max$ substring$ * "note" bibinfo.check + } + if$ +} + +FUNCTION {format.title} +{ title + duplicate$ empty$ 'skip$ + { "t" change.case$ } + if$ + "title" bibinfo.check +} +FUNCTION {format.full.names} +{'s := + "" 't := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{vv~}{ll}" format.name$ + 't := + nameptr #1 > + { + namesleft #1 > + { ", " * t * } + { + s nameptr "{ll}" format.name$ duplicate$ "others" = + { 't := } + { pop$ } + if$ + t "others" = + { + " " * bbl.etal * + } + { + bbl.and + space.word * t * + } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {author.editor.key.full} +{ author empty$ + { editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.full.names } + if$ + } + { author format.full.names } + if$ +} + +FUNCTION {author.key.full} +{ author empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { author format.full.names } + if$ +} + +FUNCTION {editor.key.full} +{ editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.full.names } + if$ +} + +FUNCTION {make.full.names} +{ type$ "book" = + type$ "inbook" = + or + 'author.editor.key.full + { type$ "proceedings" = + 'editor.key.full + 'author.key.full + if$ + } + if$ +} + +FUNCTION {output.bibitem} +{ newline$ + "\bibitem[{" write$ + label write$ + ")" make.full.names duplicate$ short.list = + { pop$ } + { * } + if$ + "}]{" * write$ + cite$ write$ + "}" write$ + newline$ + "" + before.all 'output.state := +} + +FUNCTION {n.dashify} +{ + 't := + "" + { t empty$ not } + { t #1 #1 substring$ "-" = + { t #1 #2 substring$ "--" = not + { "--" * + t #2 global.max$ substring$ 't := + } + { { t #1 #1 substring$ "-" = } + { "-" * + t #2 global.max$ substring$ 't := + } + while$ + } + if$ + } + { t #1 #1 substring$ * + t #2 global.max$ substring$ 't := + } + if$ + } + while$ +} + +FUNCTION {word.in} +{ bbl.in capitalize + ":" * + " " * } + +FUNCTION {format.date} +{ year "year" bibinfo.check duplicate$ empty$ + { + "empty year in " cite$ * "; set to ????" * warning$ + pop$ "????" + } + 'skip$ + if$ + extra.label * +} +FUNCTION {format.btitle} +{ title "title" bibinfo.check + duplicate$ empty$ 'skip$ + { + } + if$ +} +FUNCTION {either.or.check} +{ empty$ + 'pop$ + { "can't use both " swap$ * " fields in " * cite$ * warning$ } + if$ +} +FUNCTION {format.bvolume} +{ volume empty$ + { "" } + { bbl.volume volume tie.or.space.prefix + "volume" bibinfo.check * * + series "series" bibinfo.check + duplicate$ empty$ 'pop$ + { swap$ bbl.of space.word * swap$ + emphasize * } + if$ + "volume and number" number either.or.check + } + if$ +} +FUNCTION {format.number.series} +{ volume empty$ + { number empty$ + { series field.or.null } + { series empty$ + { number "number" bibinfo.check } + { output.state mid.sentence = + { bbl.number } + { bbl.number capitalize } + if$ + number tie.or.space.prefix "number" bibinfo.check * * + bbl.in space.word * + series "series" bibinfo.check * + } + if$ + } + if$ + } + { "" } + if$ +} + +FUNCTION {format.edition} +{ edition duplicate$ empty$ 'skip$ + { + output.state mid.sentence = + { "l" } + { "t" } + if$ change.case$ + "edition" bibinfo.check + " " * bbl.edition * + } + if$ +} +INTEGERS { multiresult } +FUNCTION {multi.page.check} +{ 't := + #0 'multiresult := + { multiresult not + t empty$ not + and + } + { t #1 #1 substring$ + duplicate$ "-" = + swap$ duplicate$ "," = + swap$ "+" = + or or + { #1 'multiresult := } + { t #2 global.max$ substring$ 't := } + if$ + } + while$ + multiresult +} +FUNCTION {format.pages} +{ pages duplicate$ empty$ 'skip$ + { duplicate$ multi.page.check + { + bbl.pages swap$ + n.dashify + } + { + bbl.page swap$ + } + if$ + tie.or.space.prefix + "pages" bibinfo.check + * * + } + if$ +} +FUNCTION {format.journal.pages} +{ pages duplicate$ empty$ 'pop$ + { swap$ duplicate$ empty$ + { pop$ pop$ format.pages } + { + ":" * + swap$ + n.dashify + "pages" bibinfo.check + * + } + if$ + } + if$ +} +FUNCTION {format.journal.eid} +{ eid "eid" bibinfo.check + duplicate$ empty$ 'pop$ + { swap$ duplicate$ empty$ 'skip$ + { + ":" * + } + if$ + swap$ * + numpages empty$ 'skip$ + { bbl.eidpp numpages tie.or.space.prefix + "numpages" bibinfo.check * * + " (" swap$ * ")" * * + } + if$ + } + if$ +} +FUNCTION {format.vol.num.pages} +{ volume field.or.null + duplicate$ empty$ 'skip$ + { + "volume" bibinfo.check + } + if$ + number "number" bibinfo.check duplicate$ empty$ 'skip$ + { + swap$ duplicate$ empty$ + { "there's a number but no volume in " cite$ * warning$ } + 'skip$ + if$ + swap$ + "(" swap$ * ")" * + } + if$ * +} + +FUNCTION {format.chapter.pages} +{ chapter empty$ + { "" } + { type empty$ + { bbl.chapter } + { type "l" change.case$ + "type" bibinfo.check + } + if$ + chapter tie.or.space.prefix + "chapter" bibinfo.check + * * + } + if$ +} + +FUNCTION {format.booktitle} +{ + booktitle "booktitle" bibinfo.check + emphasize +} +FUNCTION {format.in.ed.booktitle} +{ format.booktitle duplicate$ empty$ 'skip$ + { + editor "editor" format.names.ed duplicate$ empty$ 'pop$ + { + "," * + " " * + get.bbl.editor + " " * + * swap$ + * } + if$ + word.in swap$ * + } + if$ +} +FUNCTION {format.thesis.type} +{ type duplicate$ empty$ + 'pop$ + { swap$ pop$ + "t" change.case$ "type" bibinfo.check + } + if$ +} +FUNCTION {format.tr.number} +{ number "number" bibinfo.check + type duplicate$ empty$ + { pop$ bbl.techrep } + 'skip$ + if$ + "type" bibinfo.check + swap$ duplicate$ empty$ + { pop$ "t" change.case$ } + { tie.or.space.prefix * * } + if$ +} +FUNCTION {format.article.crossref} +{ + word.in + " \cite{" * crossref * "}" * +} +FUNCTION {format.book.crossref} +{ volume duplicate$ empty$ + { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ + pop$ word.in + } + { bbl.volume + capitalize + swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word * + } + if$ + " \cite{" * crossref * "}" * +} +FUNCTION {format.incoll.inproc.crossref} +{ + word.in + " \cite{" * crossref * "}" * +} +FUNCTION {format.org.or.pub} +{ 't := + "" + address empty$ t empty$ and + 'skip$ + { + address "address" bibinfo.check * + t empty$ + 'skip$ + { address empty$ + 'skip$ + { ": " * } + if$ + t * + } + if$ + } + if$ +} +FUNCTION {format.publisher.address} +{ publisher "publisher" bibinfo.check format.org.or.pub +} + +FUNCTION {format.organization.address} +{ 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$ + 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 + remove.dots + "journal" bibinfo.check + emphasize + "journal" output.check + add.blank + format.date "year" output.check + date.block + format.vol.num.pages output + } + { format.article.crossref output.nonnull + } + if$ + eid empty$ + { format.journal.pages } + { format.journal.eid } + if$ + new.block + 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$ + new.block + format.btitle "title" output.check + crossref missing$ + { format.bvolume output + new.block + new.sentence + format.number.series output + format.edition output + format.publisher.address output + } + { + new.block + format.book.crossref output.nonnull + } + if$ + format.date "year" output.check + format.isbn output + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {booklet} +{ "%Type = Booklet" write$ + output.bibitem + format.authors output + author format.key output + new.block + format.title "title" output.check + new.block + howpublished "howpublished" bibinfo.check output + address "address" bibinfo.check output + format.date "year" output.check + format.isbn output + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {inbook} +{ "%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$ + new.block + format.btitle "title" output.check + crossref missing$ + { + format.bvolume output + format.chapter.pages "chapter and pages" output.check + new.block + new.sentence + format.number.series output + format.publisher.address output + } + { + format.chapter.pages "chapter and pages" output.check + new.block + format.book.crossref output.nonnull + } + if$ + format.edition output + crossref missing$ + { format.isbn output } + 'skip$ + if$ + format.date "year" output.check + book.date.block + format.pages "pages" output.check + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {incollection} +{ "%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.chapter.pages output + new.sentence + format.number.series output + format.publisher.address output + format.edition output + format.isbn output + } + { format.incoll.inproc.crossref output.nonnull + format.chapter.pages output + } + if$ + format.date "year" output.check + book.date.block + format.pages "pages" output.check + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {inproceedings} +{ "%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 + new.sentence + format.number.series output + publisher empty$ + { format.organization.address output } + { organization "organization" bibinfo.check output + format.publisher.address output + } + if$ + format.isbn output + } + { format.incoll.inproc.crossref output.nonnull + } + if$ + format.date "year" output.check + book.date.block + format.pages "pages" output.check + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {conference} { inproceedings } + +FUNCTION {manual} +{ "%Type = Manual" write$ + output.bibitem + format.authors output + author format.key output + new.block + format.btitle "title" output.check + organization address new.block.checkb + organization "organization" bibinfo.check output + address "address" bibinfo.check output + format.edition output + format.date "year" output.check + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {mastersthesis} +{ "%Type = Mastersthesis" write$ + output.bibitem + format.authors "author" output.check + author format.key output + new.block + format.title + "title" output.check + new.block + bbl.mthesis format.thesis.type output.nonnull + school "school" bibinfo.warn output + address "address" bibinfo.check output + format.date "year" output.check + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {misc} +{ "%Type = Misc" write$ + output.bibitem + format.authors output + author format.key output + new.block + format.title output + new.block + howpublished "howpublished" bibinfo.check output + format.date "year" output.check + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {phdthesis} +{ "%Type = Phdthesis" write$ + output.bibitem + format.authors "author" output.check + author format.key output + new.block + format.title + "title" output.check + new.block + bbl.phdthesis format.thesis.type output.nonnull + school "school" bibinfo.warn output + address "address" bibinfo.check output + format.date "year" output.check + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {proceedings} +{ "%Type = Proceedings" write$ + output.bibitem + format.editors output + editor format.key output + new.block + format.btitle "title" output.check + format.bvolume output + new.sentence + format.number.series output + publisher empty$ + { format.organization.address output } + { organization "organization" bibinfo.check output + format.publisher.address output + } + if$ + format.date "year" output.check + format.isbn output + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {techreport} +{ "%Type = Techreport" write$ + output.bibitem + format.authors "author" output.check + author format.key output + new.block + format.title + "title" output.check + new.block + format.tr.number output.nonnull + institution "institution" bibinfo.warn output + address "address" bibinfo.check output + format.date "year" output.check + new.block + print.url output + print.doi output + print.eprint output + print.pubmed output + format.note output + fin.entry +} + +FUNCTION {unpublished} +{ "%Type = Unpublished" write$ + output.bibitem + format.authors "author" output.check + author format.key output + new.block + format.title "title" output.check + format.date "year" output.check + new.block + 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$ +} +INTEGERS { len } +FUNCTION {chop.word} +{ 's := + 'len := + s #1 len substring$ = + { s len #1 + global.max$ substring$ } + 's + if$ +} +FUNCTION {format.lab.names} +{ 's := + "" 't := + s #1 "{vv~}{ll}" format.name$ + s num.names$ duplicate$ + #2 > + { pop$ + " " * bbl.etal * + } + { #2 < + 'skip$ + { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = + { + " " * bbl.etal * + } + { bbl.and space.word * s #2 "{vv~}{ll}" format.name$ + * } + if$ + } + if$ + } + if$ +} + +FUNCTION {author.key.label} +{ author empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { author format.lab.names } + if$ +} + +FUNCTION {author.editor.key.label} +{ author empty$ + { editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.lab.names } + if$ + } + { author format.lab.names } + if$ +} + +FUNCTION {editor.key.label} +{ editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.lab.names } + if$ +} + +FUNCTION {calc.short.authors} +{ type$ "book" = + type$ "inbook" = + or + 'author.editor.key.label + { type$ "proceedings" = + 'editor.key.label + 'author.key.label + if$ + } + if$ + 'short.list := +} + +FUNCTION {calc.label} +{ calc.short.authors + short.list + "(" + * + year duplicate$ empty$ + { pop$ "????" } + { 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{ }}" +% "{vv~}{ll~}{\rd[f.f.]}{jj~}" + format.name$ 't := + nameptr #1 > + { + " " * + namesleft #1 = t "others" = and + { "zzzzz" * } + { t sortify * } + if$ + } + { t sortify * } + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {sort.format.title} +{ 't := + "A " #2 + "An " #3 + "The " #4 t chop.word + chop.word + chop.word + sortify + #1 global.max$ substring$ +} +FUNCTION {author.sort} +{ author empty$ + { key empty$ + { "to sort, need author or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { author sort.format.names } + if$ +} +FUNCTION {author.editor.sort} +{ author empty$ + { editor empty$ + { key empty$ + { "to sort, need author, editor, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { editor sort.format.names } + if$ + } + { author sort.format.names } + if$ +} +FUNCTION {editor.sort} +{ editor empty$ + { key empty$ + { "to sort, need editor or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { editor sort.format.names } + if$ +} +INTEGERS { seq.num } +FUNCTION {init.seq} +{ #0 'seq.num :=} +EXECUTE {init.seq} +FUNCTION {int.to.fix} +{ "000000000" swap$ int.to.str$ * + #-1 #10 substring$ +} +FUNCTION {presort} +{ calc.label + label sortify + " " + * + seq.num #1 + 'seq.num := + seq.num int.to.fix + 'sort.label := + sort.label + * + " " + * + title field.or.null + sort.format.title + * + #1 entry.max$ substring$ + 'sort.key$ := +} + +ITERATE {presort} +SORT +STRINGS { last.label next.extra } +INTEGERS { last.extra.num number.label } +FUNCTION {initialize.extra.label.stuff} +{ #0 int.to.chr$ 'last.label := + "" 'next.extra := + #0 'last.extra.num := + #0 'number.label := +} +FUNCTION {forward.pass} +{ last.label label = + { last.extra.num #1 + 'last.extra.num := + last.extra.num int.to.chr$ 'extra.label := + } + { "a" chr.to.int$ 'last.extra.num := + "" 'extra.label := + label 'last.label := + } + if$ + number.label #1 + 'number.label := +} +FUNCTION {reverse.pass} +{ next.extra "b" = + { "a" 'extra.label := } + 'skip$ + if$ + extra.label 'next.extra := + extra.label + duplicate$ empty$ + 'skip$ + { "{\natexlab{" swap$ * "}}" * } + if$ + 'extra.label := + label extra.label * 'label := +} +EXECUTE {initialize.extra.label.stuff} +ITERATE {forward.pass} +REVERSE {reverse.pass} +FUNCTION {bib.sort.order} +{ sort.label + " " + * + year field.or.null sortify + * + " " + * + title field.or.null + sort.format.title + * + #1 entry.max$ substring$ + 'sort.key$ := +} +ITERATE {bib.sort.order} +SORT +FUNCTION {begin.bib} +{ preamble$ empty$ + 'skip$ + { preamble$ write$ newline$ } + if$ + "\begin{thebibliography}{" number.label int.to.str$ * "}" * + write$ newline$ + "\providecommand{\natexlab}[1]{#1}" + write$ newline$ + "\providecommand{\url}[1]{\texttt{#1}}" + write$ newline$ + "\providecommand{\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{\BIBand}{and}" + write$ newline$ + "\providecommand{\bibinfo}[2]{#2}" + write$ newline$ + "\ifx\xfnm\undefined \def\xfnm[#1]{\unskip,\space#1}\fi" + write$ newline$ + "\makeatletter\def\@biblabel#1{#1.}\makeatother" + 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 +%% +%% +%% Change log: +%% ----------- +%% 22.04.2011 +%% +%% 10.08.2012 +%% a. doi, url, eprint, pmid added +%% b. Bibtype `webpage' defined +%% +%% End of file `model6-num-names.bst'. + diff --git a/mybibfile.bib b/mybibfile.bib new file mode 100644 index 0000000..b87ff2b --- /dev/null +++ b/mybibfile.bib @@ -0,0 +1,408 @@ +@article{Dirac1953888, + title = "The lorentz transformation and absolute time", + journal = "Physica ", + volume = "19", + number = "1-–12", + pages = "888--896", + year = "1953", + doi = "10.1016/S0031-8914(53)80099-6", + author = "P.A.M. Dirac" +} + +@article{Feynman1963118, + title = "The theory of a general quantum system interacting with a linear dissipative system", + journal = "Annals of Physics ", + volume = "24", + pages = "118--173", + year = "1963", + doi = "10.1016/0003-4916(63)90068-X", + author = "R.P Feynman AND F.L {Vernon Jr.}" +} + +@Article{Aberth73, + title = "Iteration Methods for Finding all Zeros of a Polynomial Simultaneously", + journal = "Mathematics of Computation", + volume = "27", + number = "122", + pages = "339--344", + year = "1973", + doi = "10.1016/0003-4916(63)90068-X", + author = "O. Aberth", + +}x + + +@Article{Ilie50, + title = "On the approximations of Newton", + journal = "Annual Sofia Univ", + volume = "", + number = "46", + pages = "167--171", + year = "1950", + doi = "10.1016/0003-4916(63)90068-X", + author = "L. Ilieff", + +}x +@Article{Docev62, + title = "An alternative method of Newton for simultaneous calculation of all the roots of a given algebraic equation", + journal = "Phys. Math. J", + volume = "", + number = "5", + pages = "136-139", + year = "1962", + author = "K. Docev", +}x + +@Article{Durand60, + title = "Solution Numerique des Equations Algebriques, Vol. 1, Equations du Type F(x)=0, Racines d'une Polynome", + journal = "", + volume = "Vol.1", + number = "", + pages = "", + year = "1960", + author = "E. Durand", +}x + +@Article{Kerner66, + title = "Ein Gesamtschritteverfahren zur Berechnung der Nullstellen von Polynomen", + journal = " ", + volume = "", + number = "8", + pages = "290-294", + year = "1966", + author = "I. Kerner", +}x + +@Article{Borch-Supan63, + title = "A posteriori error for the zeros of polynomials", + journal = " ", + volume = "", + number = "5", + pages = "380-398", + year = "1963", + author = "W. Borch-Supan", +}x + +@Article{Ehrlich67, + title = "A modified Newton method for polynomials", + journal = " Comm. Ass. Comput. Mach.", + volume = "", + number = "10", + pages = "107-108", + year = "1967", + author = "L.W. Ehrlich", +}x + +@Article{Loizon83, + title = "Higher-order iteration functions for simultaneously approximating polynomial zeros", + journal = " Intern. J. Computer Math", + volume = "", + number = "14", + pages = "45-58", + year = "1983", + author = "G. Loizon", +}x + +@Article{Freeman89, + title = " Calculating polynomial zeros on a local memory parallel computer", + journal = " Parallel Computing", + volume = "", + number = "12", + pages = "351-358", + year = "1989", + author = "T.L. Freeman", +}x + +@Article{Freemanall90, + title = " Asynchronous polynomial zero-finding algorithms", + journal = " Parallel Computing", + volume = "", + number = "17", + pages = "673-681", + year = "1990", + author = "T.L. Freeman AND R.K. Brankin", +}x + +@Article{Raphaelall01, + title = " Extraction de racines dans des polynômes creux de degrées élevés.RSRCP (Réseaux et Systèmes Répartis, Calculateurs Parallèles)", + journal = " Algorithmes itératifs paralléles et distribués", + volume = "1", + number = "13", + pages = "67-81", + year = "1990", + author = "R. Couturier AND F. Spetiri", +}x + +@Article{Ostrowski41, + title = " On a Theorem by J.L. Walsh Concerning the Moduli of Roots of Algebraic Equations,Bull. A.M.S.", + journal = " Algorithmes itératifs paralléles et distribués", + volume = "1", + number = "47", + pages = "742-746", + year = "1941", + author = "A. Ostrowski", +}x + + +@Manual{CUDA10, +title = {Compute Unified Device Architecture Programming Guide Version 3.0}, +OPTkey = {NVIDIA CUDA}, +OPTauthor = {•}, +OPTorganization = {NVIDIA CUDA}, +OPTaddress = {•}, +OPTedition = {•}, +OPTmonth = {March}, +OPTyear = {2010}, +OPTnote = {http://www.nvidia.com/object/cuda_develop.html}, +OPTannote = {•} +} + +@Article{Kahinall14, + title = " parallel implementation of the Durand-Kerner algorithm for polynomial root-finding on GPU", + journal = " IEEE. Conf. on advanced Networking, Distributed Systems and Applications", + volume = "", + number = "", + pages = "53-57", + year = "2014", + author = "K. Ghidouche AND R. Couturie AND A. Sider", +}x + +@Article{Karimall98, + + title = " Perfectionnements de la méthode asynchrone de Durand-Kerner pour les polynômes complexes", + journal = " Calculateurs Parallèles", + volume = "10", + number = "4", + pages = "449-458", + year = "1998", + author = "K. Rhofir AND F. Spies AND Jean-Claude Miellou", +}x + +@Article{Bini96, + + title = " Numerical computation of polynomial zeros by means of Aberth s method", + journal = " Numerical Algorithms", + volume = "13", + number = "4", + pages = "179-200", + year = "1996", + author = "D. Bini", +}x + +@Article{Mirankar68, + title = " Parallel methods for approximating the roots of a function", + journal = " IBM Res Dev", + volume = "30", + number = "", + pages = "297-301", + year = "1968", + author = "WL. Mirankar", +}x + +@Article{Mirankar71, + title = " A survey of parallelism in numerical analysis", + journal = " SIAM Rev", + volume = "", + number = "", + pages = "524-547", + year = "1971", + author = "WL. Mirankar", +}x + +@Article{Schedler72, + title = " Parallel iteration methods in complexity of computer communications", + journal = " Commun ACM ", + volume = "", + number = "", + pages = "286-290", + year = "1967", + author = "GS. Schedler", +}x + +@Article{Winogard72, + title = " Parallel iteration methods in complexity of computer communications", + journal = " Plenum, New York", + volume = "", + number = "", + pages = "", + year = "1972", + author = "S. Winogard", +}x + +@Article{Benall68, + title = " A fast parallel algorithm for determining all roots of a polynomial with real roots", + journal = " Int: Proc of ACM", + volume = "", + number = "", + pages = "340-349", + year = "1968", + author = "M. Ben-Or AND E. Feig AND D. Kozzen AND P. Tiwary", +}x + +@Article{Riceall06, + title = " A highly parallel algorithm for root extraction", + journal = " IEEE Trans Comp", + volume = "38", + number = "3", + pages = "443-449", + year = "2006", + author = "TA. Rice AND LH. Jamieson", +}x + +@Article{Cosnard90, + title = " Finding the roots of a polynomial on an MIMD multicomputer", + journal = " Parallel Comput", + volume = "15", + number = "3", + pages = "75-85", + year = "1990", + author = "M. Cosnard AND P. Fraigniaud", +}x + +@Article{Janall99, + title = " Efficient parallel algorithms for finding polynomial zeroes", + journal = "Proc of the 6th int conference on advance computing, CDAC, Pune University Campus,India", + volume = "15", + number = "3", + pages = "189-196", + year = "1999", + author = "PK. Jana AND BP. Sinha AND R. Datta Gupta", +}x + +@Article{Jana06, + title = " Polynomial interpolation and polynomial root finding on OTIS-Mesh", + journal = " Parallel Comput", + volume = "32", + number = "3", + pages = "301-312", + year = "2006", + author = "PK. Jana", +}x +@Article{Kalantari08, + title = " Polynomial root finding and polynomiography.", + journal = " World Scientifict,New Jersey", + volume = "", + number = "", + pages = "", + year = "", + author = "B. Kalantari", +}x + +@Article{Gemignani07, + title = " Structured matrix methods for polynomial root finding.", + journal = " n: Proc of the 2007 Intl symposium on symbolic and algebraic computation", + volume = "", + number = "", + pages = "175-180", + year = "2007", + author = "L. Gemignani", +}x + + + +@Article{Skachek08, + title = " Structured matrix methods for polynomial root finding.", + journal = " n: Proc of the 2007 Intl symposium on symbolic and algebraic computation", + volume = "", + number = "", + pages = "175-180", + year = "2008", + author = "V. Skachek", +}x + +@BOOK{Skachek008, + AUTHOR = {V. Skachek}, + editor = {}, + TITLE = {Probabilistic algorithm for finding roots of linearized polynomials}, + PUBLISHER = {codes and cryptography. Kluwer}, + YEAR = {2008}, + volume = {}, + number = {}, + series = {}, + address = {}, + edition = {Design}, + month = {}, + note = {}, + abstract = {}, + isbn = {}, + price = {}, + keywords = {}, + source = {}, +}x + +@Article{Zhancall08, + title = " A constrained learning algorithm for finding multiple real roots of polynomial", + journal = " In: Proc of the 2008 intl symposium on computational intelligence and design", + volume = "", + number = "", + pages = "38-41", + year = "2008", + author = "X. Zhanc AND M. Wan,Z.Yi", +}x + + +@Article{Zhuall08, + title = " an adaptive algorithm finding multiple roots of polynomials", + journal = " Lect Notes Comput Sci ", + volume = "", + number = "5262", + pages = "674-681", + year = "2008", + author = "W. Zhu AND w. Zeng AND D. Lin", +}x +@Article{Azad07, + title = " The performance of synchronous parallel polynomial root extraction on a ring multicomputer", + journal = " Clust Comput ", + volume = "2", + number = "10", + pages = "167-174", + year = "2007", + author = "HS. Azad", +}x + + + + +@Article{Bini04, + title = " Inverse power and Durand Kerner iterations for univariate polynomial root finding", + journal = " Comput Math Appl ", + volume = "", + number = "47", + pages = "447-459", + year = "2004", + author = "DA. Bini AND L. Gemignani", +}x + +@Article{Jana99, + title = " Finding polynomial zeroes on a Multi-mesh of trees (MMT)", + journal = " In: Proc of the 2nd int conference on information technology", + volume = "", + number = "", + pages = "202-206", + year = "1999", + author = "PK. Jana", +}x + +@Article{Weierstrass03, + title = " Neuer Beweis des Satzes, dass jede ganze rationale function einer veranderlichen dagestellt werden kann als ein product aus linearen functionen derselben veranderlichen", + journal = " Ges. Werke", + volume = "3", + number = "", + pages = "251-269", + year = "1903", + author = "K. Weierstrass", +}x + + + +@BOOK{NVIDIA10, + AUTHOR = {NVIDIA}, + editor = {Design Guide}, + TITLE = {NVIDIA CUDA C Programming Guide}, + PUBLISHER = {PG}, + YEAR = {2015}, + volume = {7}, + number = {02829}, + series = {001}, + month = {march}, +}x diff --git a/numcompress.sty b/numcompress.sty new file mode 100644 index 0000000..b187eff --- /dev/null +++ b/numcompress.sty @@ -0,0 +1,189 @@ +%% +%% This is file 'numcompress'. +%% +%% Copyright (C) 2009-2012 River Valley Technologies +%% +%% +%% This package may be distributed under the terms of the LaTeX Project +%% Public License, as described in lppl.txt in the base LaTeX distribution. +%% Either version 1.0 or, at your option, any later version. +%% +%% $Id: numcompress.sty 187 2012-08-18 09:36:35Z rishi $ +%% $URL: http://lenova.river-valley.com/svn/elsbst/trunk/numcompress.sty $ +%% +\NeedsTeXFormat{LaTeX2e} +\def\Fileversion$#1: #2 ${\gdef\fileversion{#2}} +\def\Filedate$#1: #2-#3-#4 #5 #6 #7 ${\gdef\filedate{#2/#3/#4}} +\Fileversion$Rev: 187 $ +\Filedate$LastChangedDate: 2012-08-18 15:06:35 +0530 (Sat, 18 Aug 2012) $ +\ProvidesPackage{numcompress} + [\filedate\space\fileversion\space numcompress (CVR)] +\PackageWarningNoLine{numcompress} + {****************************************\MessageBreak + Package numcompress v,\fileversion\space loaded\MessageBreak + [Compress numbers (CVR)]\MessageBreak + ****************************************} +\newif\ifdots \dotsfalse +\newif\ifnumcompress \numcompresstrue + +\DeclareOption{dots}{\global\dotstrue} +\DeclareOption{nodots}{\global\dotsfalse} +\DeclareOption{compress}{\global\numcompresstrue} +\DeclareOption{nocompress}{\global\numcompressfalse} + +\ProcessOptions + +\def\removeDot#1{\def\tmp{#1}% + \ifx\tmp\@empty\else\@removeDot#1\@nil\fi} + +\def\@removeDot#1\@nil{\edef\fchar{\expandafter\@car#1\@nil}% + \edef\rchar{\expandafter\@cdr#1!\@nil}% + \def\@xmltempa{.}\def\@xmltempb{!}% + \ifx\fchar\@xmltempb\relax\else% + \ifx\fchar\@xmltempa\relax\else% + \fchar\ignorespaces\fi\removeDot{\rchar}\fi} + +\def\First[#1]{\csname First#1\endcsname} +\def\Second[#1]{\csname Second#1\endcsname} + +\def\parseFirstPage#1{\@tempcnta=0 + \@tfor\@digits:=#1\do{% + {\global\advance\@tempcnta by 1 + \expandafter\xdef\csname + First\the\@tempcnta\endcsname{\@digits}% + \xdef\flength{\the\@tempcnta}}}} + +\def\parseSecondPage#1{\@tempcnta=0 + \@tfor\@digits:=#1\do{% + {\global\advance\@tempcnta by 1 + \expandafter\xdef\csname + Second\the\@tempcnta\endcsname{\@digits}% + \xdef\llength{\the\@tempcnta}}}} + +\newif\ifdissimilar\dissimilarfalse +\def\checkequal#1#2{\edef\Farg{#1}\edef\Sarg{#2}% + \edef\One{A}% + \ifcat\One\Farg \relax\else% + \ifdissimilar\Sarg\else% + \ifnum\Farg=\Sarg\relax\else\Sarg\dissimilartrue\fi\fi\fi} +% +\let\@@fpage\@empty +\let\@@lpage\@empty +\def\fpage@compress#1{% + \gdef\@@fpage{#1}% + \edef\llength{0}% + \parseFirstPage{#1}% + \ifnum\flength=\llength% + \gdef\@fpage{\@@fpage}% + \gdef\@lpage{% + \@ifundefined{Second1}{}{\checkequal{\First[1]}{\Second[1]}}% + \@ifundefined{Second2}{}{\checkequal{\First[2]}{\Second[2]}}% + \@ifundefined{Second3}{}{\checkequal{\First[3]}{\Second[3]}}% + \@ifundefined{Second4}{}{\checkequal{\First[4]}{\Second[4]}}% + \@ifundefined{Second5}{}{\checkequal{\First[5]}{\Second[5]}}% + }% + \else% + \gdef\@fpage{\@@fpage}% + \gdef\@lpage{\@@lpage}% + \fi} + +\def\lpage@compress#1{% + \gdef\@@lpage{#1}% + \parseSecondPage{#1}% + \ifnum\flength=\llength% + \gdef\@fpage{\@@fpage}% + \gdef\@lpage{% + \edef\One{A}% + \edef\xFirst{\First[1]}% + \edef\xSecond{\Second[1]}% + \ifcat\One\xSecond\relax% + \ifx\xFirst\xSecond% + \@ifundefined{Second1}{}{\checkequal{\First[1]}{\Second[1]}}% + \@ifundefined{Second2}{}{\checkequal{\First[2]}{\Second[2]}}% + \@ifundefined{Second3}{}{\checkequal{\First[3]}{\Second[3]}}% + \@ifundefined{Second4}{}{\checkequal{\First[4]}{\Second[4]}}% + \@ifundefined{Second5}{}{\checkequal{\First[5]}{\Second[5]}}% + \else#1\fi% + \else% + \ifx\xFirst\xSecond% + \@ifundefined{Second1}{}{\checkequal{\First[1]}{\Second[1]}}% + \@ifundefined{Second2}{}{\checkequal{\First[2]}{\Second[2]}}% + \@ifundefined{Second3}{}{\checkequal{\First[3]}{\Second[3]}}% + \@ifundefined{Second4}{}{\checkequal{\First[4]}{\Second[4]}}% + \@ifundefined{Second5}{}{\checkequal{\First[5]}{\Second[5]}}% + \else#1\fi% + \fi% + }% + \else + \gdef\@fpage{\@@fpage}% + \gdef\@lpage{% + \edef\Targ{#1}% + \edef\One{A}% + \edef\xFirst{\First[1]}% + \edef\xSecond{\Second[1]}% + \ifx\xFirst\xSecond + \ifcat\One\xSecond\relax\else\@@lpage\fi% + \else#1\fi% + }% + \fi} + +%\newwrite\xx +%\immediate\openout\xx=tmpbib.tex +\gdef\@@lpage@compress#1--#2\@nil{\lpage@compress{#1}} +\gdef\@@@pages#1#2{\def\next{#2}% +% \immediate\write\xx{[\the\c@NAT@ctr.]\space [#1][#2]}% + \fpage@compress{#1}%\ifx\next\@empty\relax\else + \@@lpage@compress#2\@nil%\fi + {\@fpage\ifx\next\@empty\relax\else + --\@lpage\fi}\resetall} + +\gdef\@@@page#1{#1\resetall} + +\def\mk@empty#1{\@tempcnta=1 + \loop\ifnum\@tempcnta<6 + \expandafter\let\csname#1\the\@tempcnta\endcsname\relax + \advance\@tempcnta by 1 \repeat} +\def\resetall{\let\@lpage\@empty\let\@fpage\@empty + \def\flength{0}\def\llength{0}% + \let\@@fpage\@empty\let\@@lpage\@empty + \mk@empty{First}\mk@empty{Second}} + + +\ifdots + \gdef\xfnm[#1]{\unskip\space#1} + \def\bibinfo#1#2{\@ifnextchar.{\@@bibinfo{#1}{#2}}{\@@@bibinfo{#1}{#2}}} + \def\@@@bibinfo#1#2{\def\next{#1}% + \def\@@@pg{pages}\def\@@@au{author}% + \ifx\next\@@@pg\bibpages{#2}\else + \ifx\next\@@@au\bibauthor{#2}\else + #2\fi\fi} + \def\@@bibinfo#1#2.{\def\next{#1}% + \def\@@@pg{pages}\def\@@@au{author}% + \ifx\next\@@@pg\bibpages{#2}.\else + \ifx\next\@@@au\bibauthor{#2}\else + #2.\fi\fi} +\else + \gdef\xfnm[#1]{\unskip\space\removeDot{#1}} + \def\bibinfo#1#2{\def\next{#1}% + \def\@@@pg{pages}\def\@@@au{author}% + \ifx\next\@@@pg\bibpages{#2}\else + \ifx\next\@@@au\bibauthor{#2}\else + #2\fi\fi} +\fi + +\ifnumcompress + \def\bibpages#1{\@@bibpages#1--\\\@nil} + \def\@@bibpages#1--#2\@nil{% + \ifx\\#2\relax\@@@page{#1}\else + \@@@pages{#1}{#2}\fi} + \else + \def\bibpages#1{#1} +\fi + +\def\bibauthor#1{#1} + +\endinput + +%% +%% End of package 'numcompress.sty' +%%