diff options
Diffstat (limited to 'Master/texmf-dist/bibtex/bst/urlbst/plainurl.bst')
-rw-r--r-- | Master/texmf-dist/bibtex/bst/urlbst/plainurl.bst | 385 |
1 files changed, 198 insertions, 187 deletions
diff --git a/Master/texmf-dist/bibtex/bst/urlbst/plainurl.bst b/Master/texmf-dist/bibtex/bst/urlbst/plainurl.bst index 719f48b9af4..3f75fb29335 100644 --- a/Master/texmf-dist/bibtex/bst/urlbst/plainurl.bst +++ b/Master/texmf-dist/bibtex/bst/urlbst/plainurl.bst @@ -1,6 +1,9 @@ -%%% Modification of BibTeX style file /usr/local/texlive/2009/texmf-dist/bibtex/bst/base/plain.bst -%%% ... by urlbst, version 0.7 (marked with "% urlbst") +%%% Modification of BibTeX style file /usr/local/texlive/2019/texmf-dist/bibtex/bst/base/plain.bst +%%% ... by urlbst, version 0.8 (marked with "% urlbst") %%% See <http://purl.org/nxg/dist/urlbst> +%%% Modifications Copyright 2002-03, 2005-12, 2014, 2019, Norman Gray, +%%% and distributed under the terms of the LPPL; see README for discussion. +%%% %%% Added webpage entry type, and url and lastchecked fields. %%% Added eprint support. %%% Added DOI support. @@ -9,14 +12,14 @@ %%% Original headers follow... % BibTeX standard bibliography style `plain' - % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09. - % Copyright (C) 1985, all rights reserved. - % Copying of this file is authorized only if either - % (1) you make absolutely no changes to your copy, including name, or - % (2) if you do make changes, you name it something other than - % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst. - % This restriction helps ensure that all standard styles are identical. - % The file btxbst.doc has the documentation for this style. + % Version 0.99b (8-Dec-10 release) for BibTeX versions 0.99a or later. + % Copyright (C) 1984, 1985, 1988, 2010 Howard Trickey and Oren Patashnik. + % Unlimited copying and redistribution of this file are permitted as long as + % it is unmodified. Modifications (and redistribution of modified versions) + % are also permitted, but only if the resulting file is renamed to something + % besides btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst. + % This restriction helps ensure that all standard styles are identical. + % The file btxbst.doc has the documentation for this style. ENTRY { address @@ -78,7 +81,7 @@ FUNCTION {init.urlbst.variables} "[link]" 'linktextstring := % dummy link text; typically "[link]" "http://arxiv.org/abs/" 'eprinturl := % prefix to make URL from eprint ref "arXiv:" 'eprintprefix := % text prefix printed before eprint ref; typically "arXiv:" - "http://dx.doi.org/" 'doiurl := % prefix to make URL from DOI + "https://doi.org/" 'doiurl := % prefix to make URL from DOI "doi:" 'doiprefix := % text prefix printed before DOI ref; typically "doi:" "http://www.ncbi.nlm.nih.gov/pubmed/" 'pubmedurl := % prefix to make URL from PUBMED "PMID:" 'pubmedprefix := % text prefix printed before PUBMED ref; typically "PMID:" @@ -117,15 +120,15 @@ FUNCTION {output.nonnull.original} output.state mid.sentence = { ", " * write$ } { output.state after.block = - { add.period$ write$ - newline$ - "\newblock " write$ - } - { output.state before.all = - 'write$ - { add.period$ " " * write$ } - if$ - } + { add.period$ write$ + newline$ + "\newblock " write$ + } + { output.state before.all = + 'write$ + { add.period$ " " * write$ } + if$ + } if$ mid.sentence 'output.state := } @@ -276,8 +279,8 @@ FUNCTION {new.sentence} { output.state after.block = 'skip$ { output.state before.all = - 'skip$ - { after.sentence 'output.state := } + 'skip$ + { after.sentence 'output.state := } if$ } if$ @@ -357,20 +360,20 @@ FUNCTION {format.names} { namesleft #0 > } { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't := nameptr #1 > - { namesleft #1 > - { ", " * t * } - { numnames #2 > - { "," * } - 'skip$ - if$ - t "others" = - { " et~al." * } - { " and " * t * } - if$ - } - if$ - } - 't + { namesleft #1 > + { ", " * t * } + { numnames #2 > + { "," * } + 'skip$ + if$ + t "others" = + { " et~al." * } + { " and " * t * } + if$ + } + if$ + } + 't if$ nameptr #1 + 'nameptr := namesleft #1 - 'namesleft := @@ -390,8 +393,8 @@ FUNCTION {format.editors} { "" } { editor format.names editor num.names$ #1 > - { ", editors" * } - { ", editor" * } + { ", editors" * } + { ", editor" * } if$ } if$ @@ -409,21 +412,21 @@ FUNCTION {n.dashify} "" { 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 := - } + { 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$ @@ -432,15 +435,15 @@ FUNCTION {n.dashify} FUNCTION {format.date} { year empty$ { month empty$ - { "" } - { "there's a month but no year in " cite$ * warning$ - month - } + { "" } + { "there's a month but no year in " cite$ * warning$ + month + } if$ } { month empty$ - 'year - { month " " * year * } + 'year + { month " " * year * } if$ } if$ @@ -470,8 +473,8 @@ FUNCTION {format.bvolume} { "" } { "volume" volume tie.or.space.connect series empty$ - 'skip$ - { " of " * series emphasize * } + 'skip$ + { " of " * series emphasize * } if$ "volume and number" number either.or.check } @@ -481,17 +484,17 @@ FUNCTION {format.bvolume} FUNCTION {format.number.series} { volume empty$ { number empty$ - { series field.or.null } - { output.state mid.sentence = - { "number" } - { "Number" } - if$ - number tie.or.space.connect - series empty$ - { "there's a number but no series in " cite$ * warning$ } - { " in " * series * } - if$ - } + { series field.or.null } + { output.state mid.sentence = + { "number" } + { "Number" } + if$ + number tie.or.space.connect + series empty$ + { "there's a number but no series in " cite$ * warning$ } + { " in " * series * } + if$ + } if$ } { "" } @@ -502,8 +505,8 @@ FUNCTION {format.edition} { edition empty$ { "" } { output.state mid.sentence = - { edition "l" change.case$ " edition" * } - { edition "t" change.case$ " edition" * } + { edition "l" change.case$ " edition" * } + { edition "t" change.case$ " edition" * } if$ } if$ @@ -523,8 +526,8 @@ FUNCTION {multi.page.check} swap$ duplicate$ "," = swap$ "+" = or or - { #1 'multiresult := } - { t #2 global.max$ substring$ 't := } + { #1 'multiresult := } + { t #2 global.max$ substring$ 't := } if$ } while$ @@ -535,8 +538,8 @@ FUNCTION {format.pages} { pages empty$ { "" } { pages multi.page.check - { "pages" pages n.dashify tie.or.space.connect } - { "page" pages tie.or.space.connect } + { "pages" pages n.dashify tie.or.space.connect } + { "page" pages tie.or.space.connect } if$ } if$ @@ -548,16 +551,16 @@ FUNCTION {format.vol.num.pages} 'skip$ { "(" number * ")" * * volume empty$ - { "there's a number but no volume in " cite$ * warning$ } - 'skip$ + { "there's a number but no volume in " cite$ * warning$ } + 'skip$ if$ } if$ pages empty$ 'skip$ { duplicate$ empty$ - { pop$ format.pages } - { ":" * pages n.dashify * } + { pop$ format.pages } + { ":" * pages n.dashify * } if$ } if$ @@ -567,13 +570,13 @@ FUNCTION {format.chapter.pages} { chapter empty$ 'format.pages { type empty$ - { "chapter" } - { type "l" change.case$ } + { "chapter" } + { type "l" change.case$ } if$ chapter tie.or.space.connect pages empty$ - 'skip$ - { ", " * format.pages * } + 'skip$ + { ", " * format.pages * } if$ } if$ @@ -583,8 +586,8 @@ FUNCTION {format.in.ed.booktitle} { booktitle empty$ { "" } { editor empty$ - { "In " booktitle emphasize * } - { "In " format.editors * ", " * booktitle emphasize * } + { "In " booktitle emphasize * } + { "In " format.editors * ", " * booktitle emphasize * } if$ } if$ @@ -623,11 +626,11 @@ FUNCTION {format.tr.number} FUNCTION {format.article.crossref} { key empty$ { journal empty$ - { "need key or journal for " cite$ * " to crossref " * crossref * - warning$ - "" - } - { "In {\em " journal * "\/}" * } + { "need key or journal for " cite$ * " to crossref " * crossref * + warning$ + "" + } + { "In {\em " journal * "\/}" * } if$ } { "In " key * } @@ -641,12 +644,12 @@ FUNCTION {format.crossref.editor} #2 > { pop$ " et~al." * } { #2 < - 'skip$ - { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = - { " et~al." * } - { " and " * editor #2 "{vv~}{ll}" format.name$ * } - if$ - } + 'skip$ + { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = + { " et~al." * } + { " and " * editor #2 "{vv~}{ll}" format.name$ * } + if$ + } if$ } if$ @@ -665,15 +668,15 @@ FUNCTION {format.book.crossref} editor field.or.null author field.or.null = or { key empty$ - { series empty$ - { "need editor, key, or series for " cite$ * " to crossref " * - crossref * warning$ - "" * - } - { "{\em " * series * "\/}" * } - if$ - } - { key * } + { series empty$ + { "need editor, key, or series for " cite$ * " to crossref " * + crossref * warning$ + "" * + } + { "{\em " * series * "\/}" * } + if$ + } + { key * } if$ } { format.crossref.editor * } @@ -686,15 +689,15 @@ FUNCTION {format.incoll.inproc.crossref} editor field.or.null author field.or.null = or { key empty$ - { booktitle empty$ - { "need editor, key, or booktitle for " cite$ * " to crossref " * - crossref * warning$ - "" - } - { "In {\em " booktitle * "\/}" * } - if$ - } - { "In " key * } + { booktitle empty$ + { "need editor, key, or booktitle for " cite$ * " to crossref " * + crossref * warning$ + "" + } + { "In {\em " booktitle * "\/}" * } + if$ + } + { "In " key * } if$ } { "In " format.crossref.editor * } @@ -747,7 +750,6 @@ FUNCTION {format.url} } if$ } - FUNCTION {format.eprint} { eprint empty$ { "" } @@ -789,8 +791,17 @@ FUNCTION {output.web.refs} new.block inlinelinks 'skip$ % links were inline -- don't repeat them - { - output.url + { % If the generated DOI will be the same as the URL, + % then don't print the URL (thanks to Joseph Wright for this code, + % at http://tex.stackexchange.com/questions/5660) + adddoiresolver + doiurl doi empty$ { "X" } { doi } if$ * % DOI URL to be generated + url empty$ { "Y" } { url } if$ % the URL, or "Y" if empty + = % are the strings equal? + and + 'skip$ + { output.url } + if$ addeprints eprint empty$ not and { format.eprint output.nonnull } 'skip$ @@ -904,8 +915,8 @@ FUNCTION {book} { format.editors "author and editor" output.check } { format.authors output.nonnull crossref missing$ - { "author and editor" editor either.or.check } - 'skip$ + { "author and editor" editor either.or.check } + 'skip$ if$ } if$ @@ -952,8 +963,8 @@ FUNCTION {inbook} { format.editors "author and editor" output.check } { format.authors output.nonnull crossref missing$ - { "author and editor" editor either.or.check } - 'skip$ + { "author and editor" editor either.or.check } + 'skip$ if$ } if$ @@ -1021,17 +1032,17 @@ FUNCTION {inproceedings} format.number.series output format.pages output address empty$ - { organization publisher new.sentence.checkb - organization output - publisher output - format.date "year" output.check - } - { address output.nonnull - format.date "year" output.check - new.sentence - organization output - publisher output - } + { organization publisher new.sentence.checkb + organization output + publisher output + format.date "year" output.check + } + { address output.nonnull + format.date "year" output.check + new.sentence + organization output + publisher output + } if$ } { format.incoll.inproc.crossref output.nonnull @@ -1049,10 +1060,10 @@ FUNCTION {manual} { output.bibitem author empty$ { organization empty$ - 'skip$ - { organization output.nonnull - address output - } + 'skip$ + { organization output.nonnull + address output + } if$ } { format.authors output.nonnull } @@ -1062,10 +1073,10 @@ FUNCTION {manual} format.btitle "title" output.check author empty$ { organization empty$ - { address new.block.checka - address output - } - 'skip$ + { address new.block.checka + address output + } + 'skip$ if$ } { organization address new.block.checkb @@ -1140,10 +1151,10 @@ FUNCTION {proceedings} format.number.series output address empty$ { editor empty$ - { publisher new.sentence.checka } - { organization publisher new.sentence.checkb - organization output - } + { publisher new.sentence.checka } + { organization publisher new.sentence.checkb + organization output + } if$ publisher output format.date "year" output.check @@ -1152,8 +1163,8 @@ FUNCTION {proceedings} format.date "year" output.check new.sentence editor empty$ - 'skip$ - { organization output } + 'skip$ + { organization output } if$ publisher output } @@ -1284,13 +1295,13 @@ FUNCTION {sort.format.names} numnames 'namesleft := { namesleft #0 > } { nameptr #1 > - { " " * } - 'skip$ + { " " * } + 'skip$ if$ s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't := nameptr numnames = t "others" = and - { "et al" * } - { t sortify * } + { "et al" * } + { t sortify * } if$ nameptr #1 + 'nameptr := namesleft #1 - 'namesleft := @@ -1312,10 +1323,10 @@ FUNCTION {sort.format.title} FUNCTION {author.sort} { author empty$ { key empty$ - { "to sort, need author or key in " cite$ * warning$ - "" - } - { key sortify } + { "to sort, need author or key in " cite$ * warning$ + "" + } + { key sortify } if$ } { author sort.format.names } @@ -1325,14 +1336,14 @@ FUNCTION {author.sort} 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 } + { key empty$ + { "to sort, need author, editor, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { editor sort.format.names } if$ } { author sort.format.names } @@ -1342,14 +1353,14 @@ FUNCTION {author.editor.sort} FUNCTION {author.organization.sort} { author empty$ { organization empty$ - { key empty$ - { "to sort, need author, organization, or key in " cite$ * warning$ - "" - } - { key sortify } - if$ - } - { "The " #4 organization chop.word sortify } + { key empty$ + { "to sort, need author, organization, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { "The " #4 organization chop.word sortify } if$ } { author sort.format.names } @@ -1359,14 +1370,14 @@ FUNCTION {author.organization.sort} FUNCTION {editor.organization.sort} { editor empty$ { organization empty$ - { key empty$ - { "to sort, need editor, organization, or key in " cite$ * warning$ - "" - } - { key sortify } - if$ - } - { "The " #4 organization chop.word sortify } + { key empty$ + { "to sort, need editor, organization, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { "The " #4 organization chop.word sortify } if$ } { editor sort.format.names } @@ -1379,12 +1390,12 @@ FUNCTION {presort} or 'author.editor.sort { type$ "proceedings" = - 'editor.organization.sort - { type$ "manual" = - 'author.organization.sort - 'author.sort - if$ - } + 'editor.organization.sort + { type$ "manual" = + 'author.organization.sort + 'author.sort + if$ + } if$ } if$ |