From 0224d61fd55e2ceab02210fc8d671a3b186293b1 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 2 Jul 2019 20:58:10 +0000 Subject: urlbst (2jul19) git-svn-id: svn://tug.org/texlive/trunk@51530 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/bibtex/bst/urlbst/abbrvurl.bst | 39 +- Master/texmf-dist/bibtex/bst/urlbst/alphaurl.bst | 481 ++++++++++++----------- Master/texmf-dist/bibtex/bst/urlbst/plainurl.bst | 385 +++++++++--------- Master/texmf-dist/bibtex/bst/urlbst/unsrturl.bst | 309 ++++++++------- 4 files changed, 629 insertions(+), 585 deletions(-) (limited to 'Master/texmf-dist/bibtex') diff --git a/Master/texmf-dist/bibtex/bst/urlbst/abbrvurl.bst b/Master/texmf-dist/bibtex/bst/urlbst/abbrvurl.bst index 87a301d1d76..c37f6fd0632 100644 --- a/Master/texmf-dist/bibtex/bst/urlbst/abbrvurl.bst +++ b/Master/texmf-dist/bibtex/bst/urlbst/abbrvurl.bst @@ -1,6 +1,9 @@ -%%% Modification of BibTeX style file /usr/local/texlive/2009/texmf-dist/bibtex/bst/base/abbrv.bst -%%% ... by urlbst, version 0.7 (marked with "% urlbst") +%%% Modification of BibTeX style file /usr/local/texlive/2019/texmf-dist/bibtex/bst/base/abbrv.bst +%%% ... by urlbst, version 0.8 (marked with "% urlbst") %%% See +%%% 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 `abbrv' - % 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:" @@ -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$ diff --git a/Master/texmf-dist/bibtex/bst/urlbst/alphaurl.bst b/Master/texmf-dist/bibtex/bst/urlbst/alphaurl.bst index c7138c392d9..d8907b97082 100644 --- a/Master/texmf-dist/bibtex/bst/urlbst/alphaurl.bst +++ b/Master/texmf-dist/bibtex/bst/urlbst/alphaurl.bst @@ -1,6 +1,9 @@ -%%% Modification of BibTeX style file /usr/local/texlive/2009/texmf-dist/bibtex/bst/base/alpha.bst -%%% ... by urlbst, version 0.7 (marked with "% urlbst") +%%% Modification of BibTeX style file /usr/local/texlive/2019/texmf-dist/bibtex/bst/base/alpha.bst +%%% ... by urlbst, version 0.8 (marked with "% urlbst") %%% See +%%% 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 `alpha' - % 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 := } @@ -278,8 +281,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$ @@ -359,20 +362,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 := @@ -392,8 +395,8 @@ FUNCTION {format.editors} { "" } { editor format.names editor num.names$ #1 > - { ", editors" * } - { ", editor" * } + { ", editors" * } + { ", editor" * } if$ } if$ @@ -411,21 +414,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$ @@ -434,15 +437,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$ @@ -472,8 +475,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 } @@ -483,17 +486,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$ } { "" } @@ -504,8 +507,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$ @@ -525,8 +528,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$ @@ -537,8 +540,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$ @@ -550,16 +553,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$ @@ -569,13 +572,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$ @@ -585,8 +588,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$ @@ -625,11 +628,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 * } @@ -643,12 +646,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$ @@ -667,15 +670,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 * } @@ -688,15 +691,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 * } @@ -749,7 +752,6 @@ FUNCTION {format.url} } if$ } - FUNCTION {format.eprint} { eprint empty$ { "" } @@ -791,8 +793,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$ @@ -906,8 +917,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$ @@ -954,8 +965,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$ @@ -1023,17 +1034,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 @@ -1051,10 +1062,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 } @@ -1064,10 +1075,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 @@ -1142,10 +1153,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 @@ -1154,8 +1165,8 @@ FUNCTION {proceedings} format.date "year" output.check new.sentence editor empty$ - 'skip$ - { organization output } + 'skip$ + { organization output } if$ publisher output } @@ -1291,37 +1302,37 @@ FUNCTION {format.lab.names} s num.names$ 'numnames := numnames #1 > { numnames #4 > - { #3 'namesleft := } - { numnames 'namesleft := } + { #3 'namesleft := } + { numnames 'namesleft := } if$ #1 'nameptr := "" - { namesleft #0 > } - { nameptr numnames = - { s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" = - { "{\etalchar{+}}" * - #1 'et.al.char.used := - } - { s nameptr "{v{}}{l{}}" format.name$ * } - if$ - } - { s nameptr "{v{}}{l{}}" format.name$ * } - if$ - nameptr #1 + 'nameptr := - namesleft #1 - 'namesleft := - } + { namesleft #0 > } + { nameptr numnames = + { s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" = + { "{\etalchar{+}}" * + #1 'et.al.char.used := + } + { s nameptr "{v{}}{l{}}" format.name$ * } + if$ + } + { s nameptr "{v{}}{l{}}" format.name$ * } + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } while$ numnames #4 > - { "{\etalchar{+}}" * - #1 'et.al.char.used := - } - 'skip$ + { "{\etalchar{+}}" * + #1 'et.al.char.used := + } + 'skip$ if$ } { s #1 "{v{}}{l{}}" format.name$ duplicate$ text.length$ #2 < - { pop$ s #1 "{ll}" format.name$ #3 text.prefix$ } - 'skip$ + { pop$ s #1 "{ll}" format.name$ #3 text.prefix$ } + 'skip$ if$ } if$ @@ -1330,8 +1341,8 @@ FUNCTION {format.lab.names} FUNCTION {author.key.label} { author empty$ { key empty$ - { cite$ #1 #3 substring$ } - { key #3 text.prefix$ } + { cite$ #1 #3 substring$ } + { key #3 text.prefix$ } if$ } { author format.lab.names } @@ -1341,12 +1352,12 @@ FUNCTION {author.key.label} FUNCTION {author.editor.key.label} { author empty$ { editor empty$ - { key empty$ - { cite$ #1 #3 substring$ } - { key #3 text.prefix$ } - if$ - } - { editor format.lab.names } + { key empty$ + { cite$ #1 #3 substring$ } + { key #3 text.prefix$ } + if$ + } + { editor format.lab.names } if$ } { author format.lab.names } @@ -1356,12 +1367,12 @@ FUNCTION {author.editor.key.label} FUNCTION {author.key.organization.label} { author empty$ { key empty$ - { organization empty$ - { cite$ #1 #3 substring$ } - { "The " #4 organization chop.word #3 text.prefix$ } - if$ - } - { key #3 text.prefix$ } + { organization empty$ + { cite$ #1 #3 substring$ } + { "The " #4 organization chop.word #3 text.prefix$ } + if$ + } + { key #3 text.prefix$ } if$ } { author format.lab.names } @@ -1371,12 +1382,12 @@ FUNCTION {author.key.organization.label} FUNCTION {editor.key.organization.label} { editor empty$ { key empty$ - { organization empty$ - { cite$ #1 #3 substring$ } - { "The " #4 organization chop.word #3 text.prefix$ } - if$ - } - { key #3 text.prefix$ } + { organization empty$ + { cite$ #1 #3 substring$ } + { "The " #4 organization chop.word #3 text.prefix$ } + if$ + } + { key #3 text.prefix$ } if$ } { editor format.lab.names } @@ -1389,12 +1400,12 @@ FUNCTION {calc.label} or 'author.editor.key.label { type$ "proceedings" = - 'editor.key.organization.label - { type$ "manual" = - 'author.key.organization.label - 'author.key.label - if$ - } + 'editor.key.organization.label + { type$ "manual" = + 'author.key.organization.label + 'author.key.label + if$ + } if$ } if$ @@ -1415,13 +1426,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 := @@ -1443,10 +1454,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 } @@ -1456,14 +1467,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 } @@ -1473,14 +1484,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 } @@ -1490,14 +1501,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 } @@ -1514,12 +1525,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$ 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 +%%% 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$ diff --git a/Master/texmf-dist/bibtex/bst/urlbst/unsrturl.bst b/Master/texmf-dist/bibtex/bst/urlbst/unsrturl.bst index 43826b8e622..cc067e6c870 100644 --- a/Master/texmf-dist/bibtex/bst/urlbst/unsrturl.bst +++ b/Master/texmf-dist/bibtex/bst/urlbst/unsrturl.bst @@ -1,6 +1,9 @@ -%%% Modification of BibTeX style file /usr/local/texlive/2009/texmf-dist/bibtex/bst/base/unsrt.bst -%%% ... by urlbst, version 0.7 (marked with "% urlbst") +%%% Modification of BibTeX style file /usr/local/texlive/2019/texmf-dist/bibtex/bst/base/unsrt.bst +%%% ... by urlbst, version 0.8 (marked with "% urlbst") %%% See +%%% 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 `unsrt' - % 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$ @@ -622,11 +625,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 * } @@ -640,12 +643,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$ @@ -664,15 +667,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 * } @@ -685,15 +688,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 * } @@ -746,7 +749,6 @@ FUNCTION {format.url} } if$ } - FUNCTION {format.eprint} { eprint empty$ { "" } @@ -788,8 +790,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$ @@ -903,8 +914,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$ @@ -951,8 +962,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$ @@ -1020,17 +1031,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 @@ -1048,10 +1059,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 } @@ -1061,10 +1072,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 @@ -1139,10 +1150,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 @@ -1151,8 +1162,8 @@ FUNCTION {proceedings} format.date "year" output.check new.sentence editor empty$ - 'skip$ - { organization output } + 'skip$ + { organization output } if$ publisher output } -- cgit v1.2.3