From: Arnaud Giersch Date: Mon, 18 Mar 2013 09:19:56 +0000 (+0100) Subject: Reformat with elsarticle.cls for a future submission to Parallel Computing. X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba-papers.git/commitdiff_plain/e8a50f36912db421cea4c11f504ea9d253a9430f Reformat with elsarticle.cls for a future submission to Parallel Computing. --- diff --git a/loba-besteffort/.gitignore b/loba-besteffort/.gitignore index 303d782..22bc378 100644 --- a/loba-besteffort/.gitignore +++ b/loba-besteffort/.gitignore @@ -1,5 +1,6 @@ loba-besteffort.pdf loba-besteffort.ps +loba-besteffort.spl data/results.done data/results2.done diff --git a/loba-besteffort/elsarticle-num.bst b/loba-besteffort/elsarticle-num.bst new file mode 100644 index 0000000..24654f1 --- /dev/null +++ b/loba-besteffort/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/loba-besteffort/elsarticle.cls b/loba-besteffort/elsarticle.cls new file mode 100644 index 0000000..4da7b5c --- /dev/null +++ b/loba-besteffort/elsarticle.cls @@ -0,0 +1,809 @@ +%% +%% This is file `elsarticle.cls', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% elsarticle.dtx (with options: `class') +%% +%% 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.dtx 19 2009-12-17 07:07:52Z rishi $ +%% + \def\RCSfile{elsarticle}% + \def\RCSversion{1.20b}% + \def\RCSdate{2009/09/17}% + \def\@shortjnl{\relax} + \def\@journal{Elsevier Ltd} \def\@company{Elsevier Ltd} + \def\@issn{000-0000} + \def\@shortjid{elsarticle} +\NeedsTeXFormat{LaTeX2e}[1995/12/01] +\ProvidesClass{\@shortjid}[\RCSdate, \RCSversion: \@journal] +\def\ABD{\AtBeginDocument} +\newif\ifpreprint \preprintfalse +\newif\iflongmktitle \longmktitlefalse + +\def\@blstr{1} +\newdimen\@bls +\@bls=\baselineskip + +\def\@finalWarning{% + *****************************************************\MessageBreak + This document is typeset in the CRC style which\MessageBreak + is not suitable for submission.\MessageBreak + \MessageBreak + Please typeset again using 'preprint' option\MessageBreak + for creating PDF suitable for submission.\MessageBreak + ******************************************************\MessageBreak +} + +\DeclareOption{preprint}{\global\preprinttrue + \gdef\@blstr{1}\xdef\jtype{0}% + \AtBeginDocument{\@twosidefalse\@mparswitchfalse}} +\DeclareOption{final}{\gdef\@blstr{1}\global\preprintfalse} +\DeclareOption{review}{\global\preprinttrue\gdef\@blstr{1.5}} +\DeclareOption{authoryear}{\xdef\@biboptions{round,authoryear}} +\DeclareOption{number}{\xdef\@biboptions{numbers}} +\DeclareOption{numbers}{\xdef\@biboptions{numbers}} +\DeclareOption{longtitle}{\global\longmktitletrue} +\DeclareOption{5p}{\xdef\jtype{5}\global\preprintfalse + \ExecuteOptions{twocolumn}} + \def\jtype{0} +\DeclareOption{3p}{\xdef\jtype{3}\global\preprintfalse} +\DeclareOption{1p}{\xdef\jtype{1}\global\preprintfalse + \AtBeginDocument{\@twocolumnfalse}} +\DeclareOption{times}{\IfFileExists{txfonts.sty}% + {\AtEndOfClass{\RequirePackage{txfonts}% + \gdef\ttdefault{cmtt}% + \let\iint\relax + \let\iiint\relax + \let\iiiint\relax + \let\idotsint\relax + \let\openbox\relax}}{\RequirePackage{times}}} +\ExecuteOptions{a4paper,10pt,oneside,onecolumn,number,preprint} +\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}} +\ProcessOptions +\LoadClass{article} +\RequirePackage{graphicx} +\let\comma\@empty +\let\tnotesep\@empty +\def\title#1{\gdef\@title{#1}} +\let\@title\@empty + +\def\elsLabel#1{\@bsphack\protected@write\@auxout{}% + {\string\Newlabel{#1}{\@currentlabel}}\@esphack} +\def\Newlabel#1#2{\expandafter\xdef\csname X@#1\endcsname{#2}} + +\def\elsRef#1{\@ifundefined{X@#1}{0}{\csname X@#1\endcsname}% +} + +\def\tnotemark[#1]{\textsuperscript{\@for\@@tmark:=#1\do{% + \edef\tnotenum{\@ifundefined{X@\@@tmark}{1}{\elsRef{\@@tmark}}}% + \ifcase\tnotenum\or\ding{73}\or,\ding{73}\ding{73}\fi}}% +} +\let\@tnotemark\@empty + +\let\@tnotes\@empty +\RequirePackage{pifont} +\newcounter{tnote} +\def\tnotetext[#1]#2{\g@addto@macro\@tnotes{% + \refstepcounter{tnote}\elsLabel{#1}% + \def\thefootnote{\ifcase\c@tnote\or\ding{73}\or\ding{73}\ding{73}\fi}% + \footnotetext{#2}}} + +\let\@nonumnotes\@empty +\def\nonumnote#1{\g@addto@macro\@nonumnotes{% + \let\thefootnote\relax\footnotetext{#1}}} + +\newcounter{fnote} +\def\fnmark[#1]{\let\comma\@empty + \def\@fnmark{\@for\@@fnmark:=#1\do{% + \edef\fnotenum{\@ifundefined{X@\@@fnmark}{1}{\elsRef{\@@fnmark}}}% + \unskip\comma\fnotenum\let\comma,}}% +} + +\let\@fnotes\@empty\let\@fnmark\@empty +\def\fntext[#1]#2{\g@addto@macro\@fnotes{% + \refstepcounter{fnote}\elsLabel{#1}% + \def\thefootnote{\thefnote}% + \global\setcounter{footnote}{\thefnote}% + \footnotetext{#2}}} + +\def\cormark[#1]{\edef\cnotenum{\elsRef{#1}}% + \unskip\textsuperscript{\sep\ifcase\cnotenum\or + $\ast$\or$\ast\ast$\fi\hspace{-1pt}}\let\sep=,} + +\let\@cormark\@empty +\let\@cornotes\@empty +\newcounter{cnote} +\def\cortext[#1]#2{\g@addto@macro\@cornotes{% + \refstepcounter{cnote}\elsLabel{#1}% + \def\thefootnote{\ifcase\thecnote\or$\ast$\or + $\ast\ast$\fi}% + \footnotetext{#2}}} + +\let\@corref\@empty +\def\corref#1{\edef\cnotenum{\elsRef{#1}}% + \edef\@corref{\ifcase\cnotenum\or + $\ast$\or$\ast\ast$\fi\hskip-1pt}} + +\def\fnref#1{\fnmark[#1]} +\def\tnoteref#1{\tnotemark[#1]} + +\def\resetTitleCounters{\c@cnote=0 + \c@fnote=0 \c@tnote=0 \c@footnote=0} + +\let\eadsep\@empty +\let\@elseads\@empty +\let\@elsuads\@empty +\let\@cormark\@empty +\def\hashchar{\expandafter\@gobble\string\~} +\def\underscorechar{\expandafter\@gobble\string\_} +\def\lbracechar{\expandafter\@gobble\string\{} +\def\rbracechar{\expandafter\@gobble\string\}} + +\def\ead{\@ifnextchar[{\@uad}{\@ead}} +\gdef\@ead#1{\bgroup\def\_{\string\underscorechar\space}% + \def\{{\string\lbracechar\space}% + \def~{\hashchar\space}% + \def\}{\string\rbracechar\space}% + \edef\tmp{\the\@eadauthor} + \immediate\write\@auxout{\string\emailauthor + {#1}{\expandafter\strip@prefix\meaning\tmp}}% + \egroup +} +\newcounter{ead} +\gdef\emailauthor#1#2{\stepcounter{ead}% + \g@addto@macro\@elseads{\raggedright% + \let\corref\@gobble + \eadsep\texttt{#1} (#2)\def\eadsep{\unskip,\space}}% +} +\gdef\@uad[#1]#2{\bgroup + \def~{\string\hashchar\space}% + \def\_{\string\underscorechar\space}% + \edef\tmp{\the\@eadauthor} + \immediate\write\@auxout{\string\urlauthor + {#2}{\expandafter\strip@prefix\meaning\tmp}}% + \egroup +} +\def\urlauthor#1#2{\g@addto@macro\@elsuads{\let\corref\@gobble% + \raggedright\eadsep\texttt{#1}\space(#2)% + \def\eadsep{\unskip,\space}}% +} + +\def\elsauthors{} +\def\pprinttitle{} +\let\authorsep\@empty +\let\sep\@empty +\newcounter{author} +\def\author{\@ifnextchar[{\@@author}{\@author}} + +\newtoks\@eadauthor +\def\@@author[#1]#2{\g@addto@macro\elsauthors{% + \def\baselinestretch{1}% + \authorsep#2\unskip\textsuperscript{%#1% + \@for\@@affmark:=#1\do{% + \edef\affnum{\@ifundefined{X@\@@affmark}{1}{\elsRef{\@@affmark}}}% + \unskip\sep\affnum\let\sep=,}% + \ifx\@fnmark\@empty\else\unskip\sep\@fnmark\let\sep=,\fi + \ifx\@corref\@empty\else\unskip\sep\@corref\let\sep=,\fi + }% + \def\authorsep{\unskip,\space}% + \global\let\sep\@empty\global\let\@corref\@empty + \global\let\@fnmark\@empty}% + \@eadauthor={#2} +} + +\def\@author#1{\g@addto@macro\elsauthors{\normalsize% + \def\baselinestretch{1}% + \upshape\authorsep#1\unskip\textsuperscript{% + \ifx\@fnmark\@empty\else\unskip\sep\@fnmark\let\sep=,\fi + \ifx\@corref\@empty\else\unskip\sep\@corref\let\sep=,\fi + }% + \def\authorsep{\unskip,\space}% + \global\let\@fnmark\@empty + \global\let\@corref\@empty + \global\let\sep\@empty}% + \@eadauthor={#1} +} + +\def\elsaddress{} +\def\addsep{\par\vskip6pt} +\def\address{\@ifnextchar[{\@@address}{\@address}} + +\def\@alph#1{% + \ifcase#1\or a\or b\or c\or d\or e\or f\or g\or h\or i\or j\or k\or + l\or m\or n\or o\or p\or q\or r\or s\or t\or u\or v\or w\or x\or + y\or z% + \or aa\or ab\or ac\or ad\or ae\or af\or ag\or ah\or ai\or aj\or + ak\or al\or am\or an\or ao\or ap\or aq\or ar\or as\or at\or au\or + av\or aw\or ax\or ay\or az% + \or ba\or bb\or bc\or bd\or be\or bf\or bg\or bh\or bi\or bj\or + bk\or bl\or bm\or bn\or bo\or bp\or bq\or br\or bs\or bt\or bu\or + bv\or bw\or bx\or by\or bz% + \or ca\or cb\or cc\or cd\or ce\or cf\or cg\or ch\or ci\or cj\or + ck\or cl\or cm\or cn\or co\or cp\or cq\or cr\or cs\or ct\or cu\or + cv\or cw\or cx\or cy\or cz% + \or da\or db\or dc\or dd\or de\or df\or dg\or dh\or di\or dj\or + dk\or dl\or dm\or dn\or do\or dp\or dq\or dr\or ds\or dt\or du\or + dv\or dw\or dx\or dy\or dz% + \or ea\or eb\or ec\or ed\or ee\or ef\or eg\or eh\or ei\or ej\or + ek\or el\or em\or en\or eo\or ep\or eq\or er\or es\or et\or eu\or + ev\or ew\or ex\or ey\or ez% + \or fa\or fb\or fc\or fd\or fe\or ff\or fg\or fh\or fi\or fj\or + fk\or fl\or fm\or fn\or fo\or fp\or fq\or fr\or fs\or ft\or fu\or + fv\or fw\or fx\or fy\or fz% + \or ga\or gb\or gc\or gd\or ge\or gf\or gg\or gh\or gi\or gj\or + gk\or gl\or gm\or gn\or go\or gp\or gq\or gr\or gs\or gt\or gu\or + gv\or gw\or gx\or gy\or gz% + \else\@ctrerr\fi} + +\newcounter{affn} +\renewcommand\theaffn{\alph{affn}} + +\long\def\@@address[#1]#2{\g@addto@macro\elsaddress{% + \def\baselinestretch{1}% + \refstepcounter{affn} + \xdef\@currentlabel{\theaffn} + \elsLabel{#1}% + \textsuperscript{\theaffn}#2\par}} + +\long\def\@address#1{\g@addto@macro\elsauthors{% + \def\baselinestretch{1}% + \addsep\footnotesize\itshape#1\def\addsep{\par\vskip6pt}% + \def\authorsep{\par\vskip8pt}}} + +\newbox\absbox +\renewenvironment{abstract}{\global\setbox\absbox=\vbox\bgroup + \hsize=\textwidth\def\baselinestretch{1}% + \noindent\unskip\textbf{Abstract} + \par\medskip\noindent\unskip\ignorespaces} + {\egroup} + +\newbox\keybox +\def\keyword{% + \def\sep{\unskip, }% + \def\MSC{\@ifnextchar[{\@MSC}{\@MSC[2000]}} + \def\@MSC[##1]{\par\leavevmode\hbox {\it ##1~MSC:\space}}% + \def\PACS{\par\leavevmode\hbox {\it PACS:\space}}% + \def\JEL{\par\leavevmode\hbox {\it JEL:\space}}% + \global\setbox\keybox=\vbox\bgroup\hsize=\textwidth + \normalsize\normalfont\def\baselinestretch{1} + \parskip\z@ + \noindent\textit{Keywords: } + \raggedright % Keywords are not justified. + \ignorespaces} +\def\endkeyword{\par \egroup} + +\newdimen\Columnwidth +\Columnwidth=\columnwidth + +\def\printFirstPageNotes{% + \iflongmktitle + \let\columnwidth=\textwidth\fi + \ifx\@tnotes\@empty\else\@tnotes\fi + \ifx\@nonumnotes\@empty\else\@nonumnotes\fi + \ifx\@cornotes\@empty\else\@cornotes\fi + \ifx\@elseads\@empty\relax\else + \let\thefootnote\relax + \footnotetext{\ifnum\theead=1\relax + \textit{Email address:\space}\else + \textit{Email addresses:\space}\fi + \@elseads}\fi + \ifx\@elsuads\@empty\relax\else + \let\thefootnote\relax + \footnotetext{\textit{URL:\space}% + \@elsuads}\fi + \ifx\@fnotes\@empty\else\@fnotes\fi + \iflongmktitle\if@twocolumn + \let\columnwidth=\Columnwidth\fi\fi +} + +\long\def\pprintMaketitle{\clearpage + \iflongmktitle\if@twocolumn\let\columnwidth=\textwidth\fi\fi + \resetTitleCounters + \def\baselinestretch{1}% + \printFirstPageNotes + \begin{center}% + \thispagestyle{pprintTitle}% + \def\baselinestretch{1}% + \Large\@title\par\vskip18pt + \normalsize\elsauthors\par\vskip10pt + \footnotesize\itshape\elsaddress\par\vskip36pt + \hrule\vskip12pt + \ifvoid\absbox\else\unvbox\absbox\par\vskip10pt\fi + \ifvoid\keybox\else\unvbox\keybox\par\vskip10pt\fi + \hrule\vskip12pt + \end{center}% + \gdef\thefootnote{\arabic{footnote}}% + } + +\def\printWarning{% + \mbox{}\par\vfill\par\bgroup + \fboxsep12pt\fboxrule1pt + \hspace*{.18\textwidth} + \fcolorbox{gray50}{gray10}{\box\warnbox} + \egroup\par\vfill\thispagestyle{empty} + \setcounter{page}{0} + \clearpage} + +\long\def\finalMaketitle{% + \resetTitleCounters + \def\baselinestretch{1}% + \MaketitleBox + \thispagestyle{pprintTitle}% + \gdef\thefootnote{\arabic{footnote}}% + } + +\long\def\MaketitleBox{% + \resetTitleCounters + \def\baselinestretch{1}% + \begin{center}% + \def\baselinestretch{1}% + \Large\@title\par\vskip18pt + \normalsize\elsauthors\par\vskip10pt + \footnotesize\itshape\elsaddress\par\vskip36pt + \hrule\vskip12pt + \ifvoid\absbox\else\unvbox\absbox\par\vskip10pt\fi + \ifvoid\keybox\else\unvbox\keybox\par\vskip10pt\fi + \hrule\vskip12pt + \end{center}% + } + +\def\FNtext#1{\par\bgroup\footnotesize#1\egroup} +\newdimen\space@left +\def\alarm#1{\typeout{******************************}% + \typeout{#1}% + \typeout{******************************}% +} +\long\def\getSpaceLeft{%\global\@twocolumnfalse% + \global\setbox0=\vbox{\hsize=\textwidth\MaketitleBox}% + \global\setbox1=\vbox{\hsize=\textwidth + \let\footnotetext\FNtext + \printFirstPageNotes}% + \xdef\noteheight{\the\ht1}% + \xdef\titleheight{\the\ht0}% + \@tempdima=\vsize + \advance\@tempdima-\noteheight + \advance\@tempdima-1\baselineskip +} + + \skip\footins=24pt + +\newbox\els@boxa +\newbox\els@boxb + +\ifpreprint + \def\maketitle{\pprintMaketitle} + \else + \ifnum\jtype=1 + \def\maketitle{% + \iflongmktitle\getSpaceLeft + \global\setbox\els@boxa=\vsplit0 to \@tempdima + \box\els@boxa\par\resetTitleCounters + \thispagestyle{pprintTitle}% + \printFirstPageNotes + \box0% + \else + \finalMaketitle\printFirstPageNotes + \fi + \gdef\thefootnote{\arabic{footnote}}}% + \else + \ifnum\jtype=5 + \def\maketitle{% + \iflongmktitle\getSpaceLeft + \global\setbox\els@boxa=\vsplit0 to \@tempdima + \box\els@boxa\par\resetTitleCounters + \thispagestyle{pprintTitle}% + \printFirstPageNotes + \twocolumn[\box0]%\printFirstPageNotes + \else + \twocolumn[\finalMaketitle]\printFirstPageNotes + \fi + \gdef\thefootnote{\arabic{footnote}}} + \else + \if@twocolumn + \def\maketitle{% + \iflongmktitle\getSpaceLeft + \global\setbox\els@boxa=\vsplit0 to \@tempdima + \box\els@boxa\par\resetTitleCounters + \thispagestyle{pprintTitle}% + \printFirstPageNotes + \twocolumn[\box0]% + \else + \twocolumn[\finalMaketitle]\printFirstPageNotes + \fi + \gdef\thefootnote{\arabic{footnote}}}% + \else + \def\maketitle{% + \iflongmktitle\getSpaceLeft + \global\setbox\els@boxa=\vsplit0 to \@tempdima + \box\els@boxa\par\resetTitleCounters + \thispagestyle{pprintTitle}% + \printFirstPageNotes + \box0% + \else + \finalMaketitle\printFirstPageNotes + \fi + \gdef\thefootnote{\arabic{footnote}}}% + \fi + \fi + \fi +\fi +\def\ps@pprintTitle{% + \let\@oddhead\@empty + \let\@evenhead\@empty + \def\@oddfoot{\footnotesize\itshape + Preprint submitted to \ifx\@journal\@empty Elsevier + \else\@journal\fi\hfill\today}% + \let\@evenfoot\@oddfoot} +\def\@seccntDot{.} +\def\@seccntformat#1{\csname the#1\endcsname\@seccntDot\hskip 0.5em} + +\renewcommand\section{\@startsection {section}{1}{\z@}% + {18\p@ \@plus 6\p@ \@minus 3\p@}% + {9\p@ \@plus 6\p@ \@minus 3\p@}% + {\normalsize\bfseries\boldmath}} +\renewcommand\subsection{\@startsection{subsection}{2}{\z@}% + {12\p@ \@plus 6\p@ \@minus 3\p@}% + {3\p@ \@plus 6\p@ \@minus 3\p@}% + {\normalfont\normalsize\itshape}} +\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}% + {12\p@ \@plus 6\p@ \@minus 3\p@}% + {\p@}% + {\normalfont\normalsize\itshape}} + +\def\paragraph{\secdef{\els@aparagraph}{\els@bparagraph}} +\def\els@aparagraph[#1]#2{\elsparagraph[#1]{#2.}} +\def\els@bparagraph#1{\elsparagraph*{#1.}} + +\newcommand\elsparagraph{\@startsection{paragraph}{4}{0\z@}% + {10\p@ \@plus 6\p@ \@minus 3\p@}% + {-6\p@}% + {\normalfont\itshape}} +\newdimen\leftMargin +\leftMargin=2em +\newtoks\@enLab %\newtoks\@enfont +\def\@enQmark{?} +\def\@enLabel#1#2{% + \edef\@enThe{\noexpand#1{\@enumctr}}% + \@enLab\expandafter{\the\@enLab\csname the\@enumctr\endcsname}% + \@enloop} +\def\@enSpace{\afterassignment\@enSp@ce\let\@tempa= } +\def\@enSp@ce{\@enLab\expandafter{\the\@enLab\space}\@enloop} +\def\@enGroup#1{\@enLab\expandafter{\the\@enLab{#1}}\@enloop} +\def\@enOther#1{\@enLab\expandafter{\the\@enLab#1}\@enloop} +\def\@enloop{\futurelet\@entemp\@enloop@} +\def\@enloop@{% + \ifx A\@entemp \def\@tempa{\@enLabel\Alph }\else + \ifx a\@entemp \def\@tempa{\@enLabel\alph }\else + \ifx i\@entemp \def\@tempa{\@enLabel\roman }\else + \ifx I\@entemp \def\@tempa{\@enLabel\Roman }\else + \ifx 1\@entemp \def\@tempa{\@enLabel\arabic}\else + \ifx \@sptoken\@entemp \let\@tempa\@enSpace \else + \ifx \bgroup\@entemp \let\@tempa\@enGroup \else + \ifx \@enum@\@entemp \let\@tempa\@gobble \else + \let\@tempa\@enOther + \fi\fi\fi\fi\fi\fi\fi\fi + \@tempa} +\newlength{\@sep} \newlength{\@@sep} +\setlength{\@sep}{.5\baselineskip plus.2\baselineskip + minus.2\baselineskip} +\setlength{\@@sep}{.1\baselineskip plus.01\baselineskip + minus.05\baselineskip} +\providecommand{\sfbc}{\rmfamily\upshape} +\providecommand{\sfn}{\rmfamily\upshape} +\def\@enfont{\ifnum \@enumdepth >1\let\@nxt\sfn \else\let\@nxt\sfbc \fi\@nxt} +\def\enumerate{% + \ifnum \@enumdepth >3 \@toodeep\else + \advance\@enumdepth \@ne + \edef\@enumctr{enum\romannumeral\the\@enumdepth}\fi + \@ifnextchar[{\@@enum@}{\@enum@}} +\def\@@enum@[#1]{% + \@enLab{}\let\@enThe\@enQmark + \@enloop#1\@enum@ + \ifx\@enThe\@enQmark\@warning{The counter will not be printed.% + ^^J\space\@spaces\@spaces\@spaces The label is: \the\@enLab}\fi + \expandafter\edef\csname label\@enumctr\endcsname{\the\@enLab}% + \expandafter\let\csname the\@enumctr\endcsname\@enThe + \csname c@\@enumctr\endcsname7 + \expandafter\settowidth + \csname leftmargin\romannumeral\@enumdepth\endcsname + {\the\@enLab\hskip\labelsep}% + \@enum@} +\def\@enum@{\list{{\@enfont\csname label\@enumctr\endcsname}}% + {\usecounter{\@enumctr}\def\makelabel##1{\hss\llap{##1}}% + \ifnum \@enumdepth>1\setlength{\topsep}{\@@sep}\else + \setlength{\topsep}{\@sep}\fi + \ifnum \@enumdepth>1\setlength{\itemsep}{0pt plus1pt minus1pt}% + \else \setlength{\itemsep}{\@@sep}\fi + %\setlength\leftmargin{\leftMargin}%%%{1.8em} + \setlength{\parsep}{0pt plus1pt minus1pt}% + \setlength{\parskip}{0pt plus1pt minus1pt} + }} + +\def\endenumerate{\par\ifnum \@enumdepth >1\addvspace{\@@sep}\else + \addvspace{\@sep}\fi \endlist} + +\def\sitem{\@noitemargtrue\@item[\@itemlabel *]} + +\def\itemize{\@ifnextchar[{\@Itemize}{\@Itemize[]}} + +\def\@Itemize[#1]{\def\next{#1}% + \ifnum \@itemdepth >\thr@@\@toodeep\else + \advance\@itemdepth\@ne + \ifx\next\@empty\else\expandafter\def\csname + labelitem\romannumeral\the\@itemdepth\endcsname{#1}\fi% + \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}% + \expandafter\list\csname\@itemitem\endcsname + {\def\makelabel##1{\hss\llap{##1}}}% + \fi} +\def\newdefinition#1{% + \@ifnextchar[{\@odfn{#1}}{\@ndfn{#1}}}%] +\def\@ndfn#1#2{% + \@ifnextchar[{\@xndfn{#1}{#2}}{\@yndfn{#1}{#2}}} +\def\@xndfn#1#2[#3]{% + \expandafter\@ifdefinable\csname #1\endcsname + {\@definecounter{#1}\@newctr{#1}[#3]% + \expandafter\xdef\csname the#1\endcsname{% + \expandafter\noexpand\csname the#3\endcsname \@dfncountersep + \@dfncounter{#1}}% + \global\@namedef{#1}{\@dfn{#1}{#2}}% + \global\@namedef{end#1}{\@enddefinition}}} +\def\@yndfn#1#2{% + \expandafter\@ifdefinable\csname #1\endcsname + {\@definecounter{#1}% + \expandafter\xdef\csname the#1\endcsname{\@dfncounter{#1}}% + \global\@namedef{#1}{\@dfn{#1}{#2}}% + \global\@namedef{end#1}{\@enddefinition}}} +\def\@odfn#1[#2]#3{% + \@ifundefined{c@#2}{\@nocounterr{#2}}% + {\expandafter\@ifdefinable\csname #1\endcsname + {\global\@namedef{the#1}{\@nameuse{the#2}} + \global\@namedef{#1}{\@dfn{#2}{#3}}% + \global\@namedef{end#1}{\@enddefinition}}}} +\def\@dfn#1#2{% + \refstepcounter{#1}% + \@ifnextchar[{\@ydfn{#1}{#2}}{\@xdfn{#1}{#2}}} +\def\@xdfn#1#2{% + \@begindefinition{#2}{\csname the#1\endcsname}\ignorespaces} +\def\@ydfn#1#2[#3]{% + \@opargbegindefinition{#2}{\csname the#1\endcsname}{#3}\ignorespaces} +\def\@dfncounter#1{\noexpand\arabic{#1}} +\def\@dfncountersep{.} +\def\@begindefinition#1#2{\trivlist + \item[\hskip\labelsep{\bfseries #1\ #2.}]\upshape} +\def\@opargbegindefinition#1#2#3{\trivlist + \item[\hskip\labelsep{\bfseries #1\ #2\ (#3).}]\upshape} +\def\@enddefinition{\endtrivlist} + +\def\@begintheorem#1#2{\trivlist + \let\baselinestretch\@blstr + \item[\hskip \labelsep{\bfseries #1\ #2.}]\itshape} +\def\@opargbegintheorem#1#2#3{\trivlist + \let\baselinestretch\@blstr + \item[\hskip \labelsep{\bfseries #1\ #2\ (#3).}]\itshape} + +\def\newproof#1{% + \@ifnextchar[{\@oprf{#1}}{\@nprf{#1}}} +\def\@nprf#1#2{% + \@ifnextchar[{\@xnprf{#1}{#2}}{\@ynprf{#1}{#2}}} +\def\@xnprf#1#2[#3]{% + \expandafter\@ifdefinable\csname #1\endcsname + {\@definecounter{#1}\@newctr{#1}[#3]% + \expandafter\xdef\csname the#1\endcsname{% + \expandafter\noexpand\csname the#3\endcsname \@prfcountersep + \@prfcounter{#1}}% + \global\@namedef{#1}{\@prf{#1}{#2}}% + \global\@namedef{end#1}{\@endproof}}} +\def\@ynprf#1#2{% + \expandafter\@ifdefinable\csname #1\endcsname + {\@definecounter{#1}% + \expandafter\xdef\csname the#1\endcsname{\@prfcounter{#1}}% + \global\@namedef{#1}{\@prf{#1}{#2}}% + \global\@namedef{end#1}{\@endproof}}} +\def\@oprf#1[#2]#3{% + \@ifundefined{c@#2}{\@nocounterr{#2}}% + {\expandafter\@ifdefinable\csname #1\endcsname + {\global\@namedef{the#1}{\@nameuse{the#2}}% + \global\@namedef{#1}{\@prf{#2}{#3}}% + \global\@namedef{end#1}{\@endproof}}}} +\def\@prf#1#2{% + \refstepcounter{#1}% + \@ifnextchar[{\@yprf{#1}{#2}}{\@xprf{#1}{#2}}} +\def\@xprf#1#2{% + \@beginproof{#2}{\csname the#1\endcsname}\ignorespaces} +\def\@yprf#1#2[#3]{% + \@opargbeginproof{#2}{\csname the#1\endcsname}{#3}\ignorespaces} +\def\@prfcounter#1{\noexpand\arabic{#1}} +\def\@prfcountersep{.} +\def\@beginproof#1#2{\trivlist\let\baselinestretch\@blstr + \item[\hskip \labelsep{\scshape #1.}]\rmfamily} +\def\@opargbeginproof#1#2#3{\trivlist\let\baselinestretch\@blstr + \item[\hskip \labelsep{\scshape #1\ (#3).}]\rmfamily} +\def\@endproof{\endtrivlist} +\newcommand*{\qed}{\hbox{}\hfill$\Box$} + +\@ifundefined{@biboptions}{\xdef\@biboptions{numbers}}{} +\InputIfFileExists{\jobname.spl}{}{} +\RequirePackage[\@biboptions]{natbib} + +\newwrite\splwrite +\immediate\openout\splwrite=\jobname.spl +\def\biboptions#1{\def\next{#1}\immediate\write\splwrite{% + \string\g@addto@macro\string\@biboptions{% + ,\expandafter\strip@prefix\meaning\next}}} + +\let\baselinestretch=\@blstr + +\ifnum\jtype=1 + \RequirePackage{geometry} + \geometry{twoside, + paperwidth=210mm, + paperheight=297mm, + textheight=562pt, + textwidth=384pt, + centering, + headheight=50pt, + headsep=12pt, + footskip=12pt, + footnotesep=24pt plus 2pt minus 12pt, + } + \global\let\bibfont=\footnotesize + \global\bibsep=0pt + \if@twocolumn\global\@twocolumnfalse\fi +\else\ifnum\jtype=3 + \RequirePackage{geometry} + \geometry{twoside, + paperwidth=210mm, + paperheight=297mm, + textheight=622pt, + textwidth=468pt, + centering, + headheight=50pt, + headsep=12pt, + footskip=18pt, + footnotesep=24pt plus 2pt minus 12pt, + columnsep=2pc + } + \global\let\bibfont=\footnotesize + \global\bibsep=0pt + \if@twocolumn\input{fleqn.clo}\fi +\else\ifnum\jtype=5 + \RequirePackage{geometry} + \geometry{twoside, + paperwidth=210mm, + paperheight=297mm, + textheight=682pt, + textwidth=522pt, + centering, + headheight=50pt, + headsep=12pt, + footskip=18pt, + footnotesep=24pt plus 2pt minus 12pt, + columnsep=18pt + }% + \global\let\bibfont=\footnotesize + \global\bibsep=0pt + \input{fleqn.clo} + \global\@twocolumntrue +%% +%% End of option '5p' +%% +\fi\fi\fi +\def\journal#1{\gdef\@journal{#1}} + \let\@journal\@empty +\newenvironment{frontmatter}{}{\maketitle} + +\long\def\@makecaption#1#2{% + \vskip\abovecaptionskip\footnotesize + \sbox\@tempboxa{#1: #2}% + \ifdim \wd\@tempboxa >\hsize + #1: #2\par + \else + \global \@minipagefalse + \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \vskip\belowcaptionskip} + +\AtBeginDocument{\@ifpackageloaded{hyperref} + {\def\@linkcolor{blue} + \def\@anchorcolor{blue} + \def\@citecolor{blue} + \def\@filecolor{blue} + \def\@urlcolor{blue} + \def\@menucolor{blue} + \def\@pagecolor{blue} +\begingroup + \@makeother\`% + \@makeother\=% + \edef\x{% + \edef\noexpand\x{% + \endgroup + \noexpand\toks@{% + \catcode 96=\noexpand\the\catcode`\noexpand\`\relax + \catcode 61=\noexpand\the\catcode`\noexpand\=\relax + }% + }% + \noexpand\x + }% +\x +\@makeother\` +\@makeother\= +}{}} +%% +\def\appendixname{Appendix } +\renewcommand\appendix{\par + \setcounter{section}{0}% + \setcounter{subsection}{0}% + \setcounter{equation}{0} + \gdef\thefigure{\@Alph\c@section.\arabic{figure}}% + \gdef\thetable{\@Alph\c@section.\arabic{table}}% + \gdef\thesection{\appendixname~\@Alph\c@section}% + \@addtoreset{equation}{section}% + \gdef\theequation{\@Alph\c@section.\arabic{equation}}% + \addtocontents{toc}{\string\let\string\numberline\string\tmptocnumberline}{}{} +} + +%%%% \numberline width calculation for appendix. +\newdimen\appnamewidth +\def\tmptocnumberline#1{% + \setbox0=\hbox{\appendixname} + \appnamewidth=\wd0 + \addtolength\appnamewidth{2.5pc} + \hb@xt@\appnamewidth{#1\hfill} +} + +%% Added for work with amsrefs.sty + +\@ifpackageloaded{amsrefs}% + {} + {%\let\bibsection\relax% + \AtBeginDocument{\def\cites@b#1#2,#3{% + \begingroup[% + \toks@{\InnerCite{#2}#1}% + \ifx\@empty#3\@xp\@gobble\fi + \cites@c#3% +}}} +%% +%% Added for avoiding clash with cleveref.sty + +\@ifpackageloaded{cleveref}% + {} + {\def\tnotetext[#1]#2{\g@addto@macro\@tnotes{% + \refstepcounter{tnote}% + \immediate\write\@auxout{\string\Newlabel{#1}{\thetnote}} + \def\thefootnote{\ifcase\c@tnote\or\ding{73}\or\ding{73}\ding{73}\fi}% + \footnotetext{#2}}} +%%% + \def\fntext[#1]#2{\g@addto@macro\@fnotes{% + \refstepcounter{fnote}% + \immediate\write\@auxout{\string\Newlabel{#1}{\thefnote}} + \def\thefootnote{\thefnote}% + \global\setcounter{footnote}{\thefnote}% + \footnotetext{#2}}} +%%% + \def\cortext[#1]#2{\g@addto@macro\@cornotes{% + \refstepcounter{cnote}% + \immediate\write\@auxout{\string\Newlabel{#1}{\thecnote}} + \def\thefootnote{\ifcase\thecnote\or$\ast$\or + $\ast\ast$\fi}% + \footnotetext{#2}}} +} +\endinput +%% +%% End of file `elsarticle.cls'. diff --git a/loba-besteffort/loba-besteffort.tex b/loba-besteffort/loba-besteffort.tex index fd62857..b53ffec 100644 --- a/loba-besteffort/loba-besteffort.tex +++ b/loba-besteffort/loba-besteffort.tex @@ -1,72 +1,82 @@ -\documentclass[smallextended]{svjour3} +\documentclass[preprint]{elsarticle} + \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} -\usepackage{mathptmx} + +\usepackage{newtxtext} +\usepackage[cmintegrals]{newtxmath} +%\usepackage{mathptmx,helvet,courier} + \usepackage{amsmath} -\usepackage{courier} \usepackage{graphicx} \usepackage{url} \usepackage[ruled,lined]{algorithm2e} -\newcommand{\abs}[1]{\lvert#1\rvert} % \abs{x} -> |x| - -\newenvironment{algodata}{% - \begin{tabular}[t]{@{}l@{:~}l@{}}}{% - \end{tabular}} - +%%% Remove this before submission \newcommand{\FIXMEmargin}[1]{% \marginpar{\textbf{[FIXME]} {\footnotesize #1}}} \newcommand{\FIXME}[2][]{% \ifx #2\relax\relax \FIXMEmargin{#1}% \else \textbf{$\triangleright$\FIXMEmargin{#1}~#2}\fi} +\newcommand{\abs}[1]{\lvert#1\rvert} % \abs{x} -> |x| + +\newenvironment{algodata}{% + \begin{tabular}[t]{@{}l@{:~}l@{}}}{% + \end{tabular}} + \newcommand{\VAR}[1]{\textit{#1}} \begin{document} -\title{Best effort strategy and virtual load - for asynchronous iterative load balancing} +\begin{frontmatter} -\author{Raphaël Couturier \and - Arnaud Giersch -} +\journal{Parallel Computing} -\institute{R. Couturier \and A. Giersch \at - FEMTO-ST, University of Franche-Comté, Belfort, France \\ - % Tel.: +123-45-678910\\ - % Fax: +123-45-678910\\ - \email{% - raphael.couturier@femto-st.fr, - arnaud.giersch@femto-st.fr} -} +\title{Best effort strategy and virtual load for\\ + asynchronous iterative load balancing} -\maketitle +\author{Raphaël Couturier} +\ead{raphael.couturier@femto-st.fr} +\author{Arnaud Giersch\corref{cor}} +\ead{arnaud.giersch@femto-st.fr} -\begin{abstract} - -Most of the time, asynchronous load balancing algorithms have extensively been -studied in a theoretical point of view. The Bertsekas and Tsitsiklis' -algorithm~\cite[section~7.4]{bertsekas+tsitsiklis.1997.parallel} -is certainly the most well known algorithm for which the convergence proof is -given. From a practical point of view, when a node wants to balance a part of -its load to some of its neighbors, the strategy is not described. In this -paper, we propose a strategy called \emph{best effort} which tries to balance -the load of a node to all its less loaded neighbors while ensuring that all the -nodes concerned by the load balancing phase have the same amount of load. -Moreover, asynchronous iterative algorithms in which an asynchronous load -balancing algorithm is implemented most of the time can dissociate messages -concerning load transfers and message concerning load information. In order to -increase the converge of a load balancing algorithm, we propose a simple -heuristic called \emph{virtual load} which allows a node that receives a load -information message to integrate the load that it will receive later in its -load (virtually) and consequently sends a (real) part of its load to some of its -neighbors. In order to validate our approaches, we have defined a simulator -based on SimGrid which allowed us to conduct many experiments. +\address{FEMTO-ST, University of Franche-Comté\\ + 19 avenue de Maréchal Juin, BP 527, 90016 Belfort cedex , France\\ + % Tel.: +123-45-678910\\ + % Fax: +123-45-678910\\ +} +\cortext[cor]{Corresponding author.} +\begin{abstract} + Most of the time, asynchronous load balancing algorithms have extensively been + studied in a theoretical point of view. The Bertsekas and Tsitsiklis' + algorithm~\cite[section~7.4]{bertsekas+tsitsiklis.1997.parallel} is certainly + the most well known algorithm for which the convergence proof is given. From a + practical point of view, when a node wants to balance a part of its load to + some of its neighbors, the strategy is not described. In this paper, we + propose a strategy called \emph{best effort} which tries to balance the load + of a node to all its less loaded neighbors while ensuring that all the nodes + concerned by the load balancing phase have the same amount of load. Moreover, + asynchronous iterative algorithms in which an asynchronous load balancing + algorithm is implemented most of the time can dissociate messages concerning + load transfers and message concerning load information. In order to increase + the converge of a load balancing algorithm, we propose a simple heuristic + called \emph{virtual load} which allows a node that receives a load + information message to integrate the load that it will receive later in its + load (virtually) and consequently sends a (real) part of its load to some of + its neighbors. In order to validate our approaches, we have defined a + simulator based on SimGrid which allowed us to conduct many experiments. \end{abstract} +% \begin{keywords} +% %% keywords here, in the form: keyword \sep keyword +% \end{keywords} + +\end{frontmatter} + \section{Introduction} Load balancing algorithms are extensively used in parallel and distributed @@ -299,7 +309,7 @@ neighbor. \section{Virtual load} \label{Virtual load} -In this section, we present the concept of \texttt{virtual load}. In order to +In this section, we present the concept of \emph{virtual load}. In order to use this concept, load balancing messages must be sent using two different kinds of messages: load information messages and load balancing messages. More precisely, a node wanting to send a part of its load to one of its neighbors, @@ -309,7 +319,7 @@ Load information message are really short, consequently they will be received very quickly. In opposition, load balancing messages are often bigger and thus require more time to be transferred. -The concept of \texttt{virtual load} allows a node that received a load +The concept of \emph{virtual load} allows a node that received a load information message to integrate the load that it will receive later in its load (virtually) and consequently send a (real) part of its load to some of its neighbors. In fact, a node that receives a load information message knows that @@ -785,14 +795,14 @@ On constate quoi (vérifier avec les chiffres)? \FIXME{conclude!} -\begin{acknowledgements} - Computations have been performed on the supercomputer facilities of - the Mésocentre de calcul de Franche-Comté. -\end{acknowledgements} +\section*{Acknowledgements} -\FIXME{find and add more references} -\bibliographystyle{spmpsci} +Computations have been performed on the supercomputer facilities of the +Mésocentre de calcul de Franche-Comté. + +\bibliographystyle{elsarticle-num} \bibliography{biblio} +\FIXME{find and add more references} \end{document}