diff options
Diffstat (limited to 'Master/texmf-dist/bibtex/bst/minitoc/frplain1.bst')
-rw-r--r-- | Master/texmf-dist/bibtex/bst/minitoc/frplain1.bst | 286 |
1 files changed, 272 insertions, 14 deletions
diff --git a/Master/texmf-dist/bibtex/bst/minitoc/frplain1.bst b/Master/texmf-dist/bibtex/bst/minitoc/frplain1.bst index 8b98fd409b4..c6aeafa89f4 100644 --- a/Master/texmf-dist/bibtex/bst/minitoc/frplain1.bst +++ b/Master/texmf-dist/bibtex/bst/minitoc/frplain1.bst @@ -1,17 +1,29 @@ +%%% Modification of BibTeX style file frplain1.bst +%%% ... by urlbst, version 0.5 (marked with "% urlbst") +%%% See <http://www.astro.gla.ac.uk/users/norman/distrib/urlbst/> +%%% Added webpage entry type, and url and lastchecked fields. +%%% Added eprint support. +%%% Added DOI support. +%%% Added hyperref support. +%%% Original headers follow... + +% % J'ai modifie' le style pour qu'il soit plus international. -% En plus les titres sont laisse's tels quels, avec majuscules/minuscules. +% En plus les titres sont laisse's tels quels, avec majuscules/minuscules. % -% Ronan Keryell@cri.ensmp.fr. +% Ronan Keryell@cri.ensmp.fr. % -% 01/02/1995 : utilisation des macros de frbib.sty pour avoir des noms -% francise's pour les << editeur >>, << et >>, etc. +% 01/02/1995 : utilisation des macros de frbib.sty pour avoir des noms +% francise's pour les << editeur >>, << et >>, etc. % -% 26/04/1994 : les noms passent en petites capitales. -% modification de la cle' dans format.lab.names -% et rajout des fonctions output.guillemet et -% output.check.guillemet. +% 26/04/1994 : les noms passent en petites capitales. +% modification de la cle' dans format.lab.names +% et rajout des fonctions output.guillemet et +% output.check.guillemet. % ??/02/2005 : (Jean-Pierre F. Drucbert) suppression d'une % virgule avant « et » dans une liste. +% 0202/2006 : (Jean-Pierre F. Drucbert) l'année en +% chiffres anciens. % BibTeX standard bibliography style `plain' % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09. @@ -46,14 +58,45 @@ ENTRY 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 } % urlbst... +INTEGERS { hrefform addeprints adddoiresolver } +% Following constants may be adjusted by hand, if desired +FUNCTION {init.config.constants} +{ + "Disponible depuis: " '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 +} +INTEGERS { + bracket.state + outside.brackets + open.brackets + within.brackets + close.brackets +} +% ...urlbst to here FUNCTION {init.state.consts} -{ #0 'before.all := +{ #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 := @@ -61,7 +104,8 @@ FUNCTION {init.state.consts} STRINGS { s t } -FUNCTION {output.nonnull} +% urlbst +FUNCTION {output.nonnull.original} { 's := output.state mid.sentence = { ", " * write$ } @@ -82,6 +126,57 @@ FUNCTION {output.nonnull} s } +% urlbst... +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 + output.nonnull.original + } + { % 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$ +} + +% Call this function just before adding something which should be presented in +% brackets. bracket.state is handled specially within output.nonnull. +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 "cit\'e " lastchecked * } + if$ +} +% ...urlbst to here + FUNCTION {output} { duplicate$ empty$ 'pop$ @@ -113,7 +208,8 @@ FUNCTION {output.check.guillemet} } FUNCTION {output.bibitem} -{ newline$ +{ outside.brackets 'bracket.state := % urlbst + newline$ "\bibitem{" write$ cite$ write$ "}" write$ @@ -123,7 +219,12 @@ FUNCTION {output.bibitem} } FUNCTION {fin.entry} -{ add.period$ +{ + bracket.state close.brackets = % urlbst + { "]" * } + 'skip$ + if$ + add.period$ write$ newline$ } @@ -228,7 +329,7 @@ FUNCTION {format.names} 'skip$ if$ t "others" = - { " et~al." * } + { " \upshape et~al." * } { " \andname{} " * t * } if$ } @@ -305,7 +406,7 @@ FUNCTION {format.date} } { month empty$ 'year - { month " " * year * } + { month " " * "\oldstylenums{" * year * "}" * } if$ } if$ @@ -567,6 +668,149 @@ FUNCTION {format.incoll.inproc.crossref} " \cite{" * crossref * "}" * } +% urlbst... +% Functions for making hypertext links. +% In all cases, the stack has (link-text href-url) +% +% make 'null' specials +FUNCTION {make.href.null} +{ + pop$ +} +% make hypertex specials +FUNCTION {make.href.hypertex} +{ + "\special {html:<a href=" quote$ * + swap$ * quote$ * "> }" * swap$ * + "\special {html:</a>}" * +} +% make hyperref specials +FUNCTION {make.href.hyperref} +{ + "\href {" swap$ * "} {" * 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} +{ url empty$ + { "" } + { hrefform #1 = + { % special case -- add HyperTeX specials + urlintro "{\froff\url{" url * "}}" * url make.href.hypertex * } + { urlintro "{\froff\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$ +} + +% Output a URL. We can't use the more normal idiom (something like +% `format.url output'), because the `inbrackets' within +% format.lastchecked applies to everything between calls to `output', +% so that `format.url format.lastchecked * output' ends up with both +% the URL and the lastchecked in brackets. +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$ +% addeprints +% { eprint empty$ +% 'skip$ +% { format.eprint output.nonnull } +% if$ +% } +% 'skip$ +% if$ +} + +% Webpage entry type. +% Title and url fields required; +% author, note, year, month, and lastchecked fields optional +% See references +% ISO 690-2 http://www.nlc-bnc.ca/iso/tc46sc9/standard/690-2e.htm +% http://www.classroom.net/classroom/CitingNetResources.html +% http://neal.ctstateu.edu/history/cite.html +% http://www.cas.usf.edu/english/walker/mla.html +% for citation formats for web pages. +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$ +% author empty$ +% 'skip$ +% { format.authors output.nonnull } +% if$ + new.block + format.title "title" output.check + inbrackets "en ligne" output + new.block + year empty$ + 'skip$ + { format.date "year" output.check } + if$ + lastchecked empty$ + 'skip$ + { format.lastchecked output } + if$ + new.block + format.url "url" output.check + new.block + note output + fin.entry +} +% ...urlbst to here + + FUNCTION {article} { output.bibitem format.authors "author" output.check @@ -584,6 +828,7 @@ FUNCTION {article} if$ new.block note output + output.web.refs % urlbst fin.entry } @@ -616,6 +861,7 @@ FUNCTION {book} format.date "year" output.check new.block note output + output.web.refs % urlbst fin.entry } @@ -630,6 +876,7 @@ FUNCTION {booklet} format.date output new.block note output + output.web.refs % urlbst fin.entry } @@ -664,6 +911,7 @@ FUNCTION {inbook} format.date "year" output.check new.block note output + output.web.refs % urlbst fin.entry } @@ -690,6 +938,7 @@ FUNCTION {incollection} if$ new.block note output + output.web.refs % urlbst fin.entry } @@ -724,6 +973,7 @@ FUNCTION {inproceedings} if$ new.block note output + output.web.refs % urlbst fin.entry } @@ -760,6 +1010,7 @@ FUNCTION {manual} format.date output new.block note output + output.web.refs % urlbst fin.entry } @@ -775,6 +1026,7 @@ FUNCTION {mastersthesis} format.date "year" output.check new.block note output + output.web.refs % urlbst fin.entry } @@ -788,6 +1040,7 @@ FUNCTION {misc} format.date output new.block note output + output.web.refs % urlbst fin.entry empty.misc.check } @@ -804,6 +1057,7 @@ FUNCTION {phdthesis} format.date "year" output.check new.block note output + output.web.refs % urlbst fin.entry } @@ -839,6 +1093,7 @@ FUNCTION {proceedings} if$ new.block note output + output.web.refs % urlbst fin.entry } @@ -854,6 +1109,7 @@ FUNCTION {techreport} format.date "year" output.check new.block note output + output.web.refs % urlbst fin.entry } @@ -865,6 +1121,7 @@ FUNCTION {unpublished} new.block note "note" output.check format.date output + output.web.refs % urlbst fin.entry } @@ -1117,6 +1374,7 @@ FUNCTION {begin.bib} EXECUTE {begin.bib} +EXECUTE {init.config.constants} EXECUTE {init.state.consts} ITERATE {call.type$} |