summaryrefslogtreecommitdiff
path: root/biblio/bibtex/contrib
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-01-31 03:01:43 +0000
committerNorbert Preining <norbert@preining.info>2023-01-31 03:01:43 +0000
commit7c33483242d8e20f8f809e76ec9a3406db2dbfab (patch)
treea6b1f262cb5d0ec3041fddac57b41ed134c1e9ed /biblio/bibtex/contrib
parent326add29024271cbd541ac55448e616e833ae5fa (diff)
CTAN sync 202301310301
Diffstat (limited to 'biblio/bibtex/contrib')
-rw-r--r--biblio/bibtex/contrib/urlbst/README4
-rw-r--r--biblio/bibtex/contrib/urlbst/VERSION2
-rw-r--r--biblio/bibtex/contrib/urlbst/abbrvurl.bst57
-rw-r--r--biblio/bibtex/contrib/urlbst/alphaurl.bst53
-rwxr-xr-xbiblio/bibtex/contrib/urlbst/configure22
-rw-r--r--biblio/bibtex/contrib/urlbst/configure.ac8
-rw-r--r--biblio/bibtex/contrib/urlbst/plainurl.bst55
-rw-r--r--biblio/bibtex/contrib/urlbst/unsrturl.bst53
-rwxr-xr-xbiblio/bibtex/contrib/urlbst/urlbst43
-rw-r--r--biblio/bibtex/contrib/urlbst/urlbst.bib18
-rw-r--r--biblio/bibtex/contrib/urlbst/urlbst.html20
-rwxr-xr-xbiblio/bibtex/contrib/urlbst/urlbst.in33
-rw-r--r--biblio/bibtex/contrib/urlbst/urlbst.pdfbin222858 -> 223396 bytes
-rw-r--r--biblio/bibtex/contrib/urlbst/urlbst.tex26
14 files changed, 272 insertions, 122 deletions
diff --git a/biblio/bibtex/contrib/urlbst/README b/biblio/bibtex/contrib/urlbst/README
index 15daf75935..8b80f1ec47 100644
--- a/biblio/bibtex/contrib/urlbst/README
+++ b/biblio/bibtex/contrib/urlbst/README
@@ -1,7 +1,7 @@
urlbst -- add @webpage entry and url/doi/eprint/pubmed fields to BibTeX
=======================================================================
-Version 0.9, 2022 December 1.
+Version 0.9.1, 2023 January 30.
The urlbst package consists of a Perl script which edits BibTeX style
files (.bst) to add a `@webpage` entry type, and which adds a few new
@@ -30,7 +30,7 @@ Licences
The copyright and licence position for the modified `.bst` files seems
slightly muddy to me. On the grounds that any licence is better than
no licence, I therefore assert that the _modifications_ which the
-`urlbst` program makes to these files are copyright 2002-03, 2005-12, 2014, 2019, 2022,
+`urlbst` program makes to these files are copyright 2002–23,
Norman Gray, and that these modifications are available for
distribution under the terms of the LaTeX Project Public Licence.
diff --git a/biblio/bibtex/contrib/urlbst/VERSION b/biblio/bibtex/contrib/urlbst/VERSION
index 69b5bc8a8f..0bcbc60c10 100644
--- a/biblio/bibtex/contrib/urlbst/VERSION
+++ b/biblio/bibtex/contrib/urlbst/VERSION
@@ -1 +1 @@
-urlbst-0.9
+urlbst-0.9.1
diff --git a/biblio/bibtex/contrib/urlbst/abbrvurl.bst b/biblio/bibtex/contrib/urlbst/abbrvurl.bst
index 6f94685378..3fe9520b54 100644
--- a/biblio/bibtex/contrib/urlbst/abbrvurl.bst
+++ b/biblio/bibtex/contrib/urlbst/abbrvurl.bst
@@ -1,7 +1,7 @@
%%% Modification of BibTeX style file /usr/local/texlive/2022/texmf-dist/bibtex/bst/base/abbrv.bst
-%%% ... by urlbst, version 0.9 (marked with "% urlbst")
+%%% ... by urlbst, version 0.9.1 (marked with "% urlbst")
%%% See <https://purl.org/nxg/dist/urlbst> and repository <https://heptapod.host/nxg/urlbst>
-%%% Modifications Copyright 2002-03, 2005-12, 2014, 2019, 2022, Norman Gray,
+%%% Modifications Copyright 2002–23, Norman Gray,
%%% and distributed under the terms of the LPPL; see README for discussion.
%%%
%%% Added webpage entry type, and url and lastchecked fields.
@@ -68,24 +68,24 @@ FUNCTION {init.urlbst.variables}
% The following constants may be adjusted by hand, if desired
% The first set allow you to enable or disable certain functionality.
- #1 'addeprints := % 0=no eprints; 1=include eprints
- #1 'adddoi := % 0=no DOI resolver; 1=include it
#2 'hrefform := % 0=no crossrefs; 1=hypertex hrefs; 2=hyperref hrefs
- #0 'doiform := % 0=with href; 1=with \doi{}
+ #1 'adddoi := % 0=no DOI resolver; 1=include it
+ #1 'addeprints := % 0=no eprints; 1=include eprints
#1 'addpubmed := % 0=no PUBMED resolver; 1=include it
#0 'inlinelinks := % 0=URLs explicit; 1=URLs attached to titles
+ #0 'doiform := % 0=with href; 1=with \doi{}
% String constants, which you _might_ want to tweak.
- "[link]" 'linktextstring := % anonymous link text
- "cited " 'citedstring := % label in "lastchecked" remark
- "online" 'onlinestring := % label that a resource is online
- "doi:" 'doiprefix := % printed text to introduce DOI
- "arXiv:" 'eprintprefix := % text prefix printed before eprint ref
- "http://www.ncbi.nlm.nih.gov/pubmed/" 'pubmedurl := % prefix to make URL from PUBMED
"PMID:" 'pubmedprefix := % text prefix printed before PUBMED ref
- "https://arxiv.org/abs/" 'eprinturl := % prefix to make URL from eprint ref
+ "cited " 'citedstring := % label in "lastchecked" remark
"https://doi.org/" 'doiurl := % prefix to make URL from DOI
"URL: " 'urlintro := % text prefix before URL
+ "[link]" 'linktextstring := % anonymous link text
+ "http://www.ncbi.nlm.nih.gov/pubmed/" 'pubmedurl := % prefix to make URL from PUBMED
+ "arXiv:" 'eprintprefix := % text prefix printed before eprint ref
+ "doi:" 'doiprefix := % printed text to introduce DOI
+ "online" 'onlinestring := % label that a resource is online
+ "https://arxiv.org/abs/" 'eprinturl := % prefix to make URL from eprint ref
% The following are internal state variables, not configuration constants,
% so they shouldn't be fiddled with.
@@ -138,6 +138,19 @@ FUNCTION {output.nonnull.original}
}
% urlbst...
+% Minimal DOI parsing.
+% Given a DOI on the stack, check whether it starts with 'doiurl' or not.
+% In either case, leave on the stack first a DOI with, and then a DOI without, the URL prefix.
+FUNCTION {parse.doi}
+{
+ #1 doiurl text.length$ substring$
+ doiurl =
+ { doi
+ doi doiurl text.length$ #1 + #999 substring$ }
+ { doiurl doi *
+ doi }
+ if$
+}
% The following three functions are for handling inlinelink. They wrap
% a block of text which is potentially output with write$ by multiple
% other functions, so we don't know the content a priori.
@@ -164,7 +177,12 @@ FUNCTION {possibly.setup.inlinelink}
if$ }
{ pubmedurl pubmed * }
if$ }
- { doiurl doi * }
+% { doiurl doi * }
+ { doi empty$
+ { "XXX" }
+ { doi parse.doi pop$ }
+ if$
+ }
if$
% an appropriately-formatted URL is now on the stack
hrefform #1 = % hypertex
@@ -761,9 +779,11 @@ FUNCTION {format.eprint}
FUNCTION {format.doi}
{ doi empty$
{ "" }
- { doiform #1 =
- { "\doi{" doi * "}" * }
- { doiprefix doi * doiurl doi * make.href }
+ { doi parse.doi % leaves "https://doi.org/DOI" DOI on the stack
+ 's := 't :=
+ doiform #1 =
+ { "\doi{" s * "}" * }
+ { doiprefix s * t make.href }
if$
}
if$
@@ -797,10 +817,11 @@ FUNCTION {output.web.refs}
inlinelinks
'skip$ % links were inline -- don't repeat them
{ % If the generated DOI will be the same as the URL,
- % then don't print the URL (thanks to Joseph Wright for this code,
+ % then don't print the URL (thanks to Joseph Wright
+ % for (the original version of) this code,
% at http://tex.stackexchange.com/questions/5660)
adddoi
- doiurl doi empty$ { "X" } { doi } if$ * % DOI URL to be generated
+ doi empty$ { "X" } { doi parse.doi pop$ } if$ % DOI URL to be generated
url empty$ { "Y" } { url } if$ % the URL, or "Y" if empty
= % are the strings equal?
and
diff --git a/biblio/bibtex/contrib/urlbst/alphaurl.bst b/biblio/bibtex/contrib/urlbst/alphaurl.bst
index e4fc0af4eb..c72e293d4f 100644
--- a/biblio/bibtex/contrib/urlbst/alphaurl.bst
+++ b/biblio/bibtex/contrib/urlbst/alphaurl.bst
@@ -1,7 +1,7 @@
%%% Modification of BibTeX style file /usr/local/texlive/2022/texmf-dist/bibtex/bst/base/alpha.bst
-%%% ... by urlbst, version 0.9 (marked with "% urlbst")
+%%% ... by urlbst, version 0.9.1 (marked with "% urlbst")
%%% See <https://purl.org/nxg/dist/urlbst> and repository <https://heptapod.host/nxg/urlbst>
-%%% Modifications Copyright 2002-03, 2005-12, 2014, 2019, 2022, Norman Gray,
+%%% Modifications Copyright 2002–23, Norman Gray,
%%% and distributed under the terms of the LPPL; see README for discussion.
%%%
%%% Added webpage entry type, and url and lastchecked fields.
@@ -69,23 +69,23 @@ FUNCTION {init.urlbst.variables}
% The first set allow you to enable or disable certain functionality.
#1 'addeprints := % 0=no eprints; 1=include eprints
- #2 'hrefform := % 0=no crossrefs; 1=hypertex hrefs; 2=hyperref hrefs
#0 'inlinelinks := % 0=URLs explicit; 1=URLs attached to titles
+ #1 'addpubmed := % 0=no PUBMED resolver; 1=include it
#1 'adddoi := % 0=no DOI resolver; 1=include it
+ #2 'hrefform := % 0=no crossrefs; 1=hypertex hrefs; 2=hyperref hrefs
#0 'doiform := % 0=with href; 1=with \doi{}
- #1 'addpubmed := % 0=no PUBMED resolver; 1=include it
% String constants, which you _might_ want to tweak.
- "cited " 'citedstring := % label in "lastchecked" remark
- "URL: " 'urlintro := % text prefix before URL
- "[link]" 'linktextstring := % anonymous link text
+ "doi:" 'doiprefix := % printed text to introduce DOI
"arXiv:" 'eprintprefix := % text prefix printed before eprint ref
- "http://www.ncbi.nlm.nih.gov/pubmed/" 'pubmedurl := % prefix to make URL from PUBMED
"PMID:" 'pubmedprefix := % text prefix printed before PUBMED ref
- "online" 'onlinestring := % label that a resource is online
+ "[link]" 'linktextstring := % anonymous link text
+ "cited " 'citedstring := % label in "lastchecked" remark
+ "http://www.ncbi.nlm.nih.gov/pubmed/" 'pubmedurl := % prefix to make URL from PUBMED
"https://arxiv.org/abs/" 'eprinturl := % prefix to make URL from eprint ref
- "doi:" 'doiprefix := % printed text to introduce DOI
+ "online" 'onlinestring := % label that a resource is online
"https://doi.org/" 'doiurl := % prefix to make URL from DOI
+ "URL: " 'urlintro := % text prefix before URL
% The following are internal state variables, not configuration constants,
% so they shouldn't be fiddled with.
@@ -138,6 +138,19 @@ FUNCTION {output.nonnull.original}
}
% urlbst...
+% Minimal DOI parsing.
+% Given a DOI on the stack, check whether it starts with 'doiurl' or not.
+% In either case, leave on the stack first a DOI with, and then a DOI without, the URL prefix.
+FUNCTION {parse.doi}
+{
+ #1 doiurl text.length$ substring$
+ doiurl =
+ { doi
+ doi doiurl text.length$ #1 + #999 substring$ }
+ { doiurl doi *
+ doi }
+ if$
+}
% The following three functions are for handling inlinelink. They wrap
% a block of text which is potentially output with write$ by multiple
% other functions, so we don't know the content a priori.
@@ -164,7 +177,12 @@ FUNCTION {possibly.setup.inlinelink}
if$ }
{ pubmedurl pubmed * }
if$ }
- { doiurl doi * }
+% { doiurl doi * }
+ { doi empty$
+ { "XXX" }
+ { doi parse.doi pop$ }
+ if$
+ }
if$
% an appropriately-formatted URL is now on the stack
hrefform #1 = % hypertex
@@ -763,9 +781,11 @@ FUNCTION {format.eprint}
FUNCTION {format.doi}
{ doi empty$
{ "" }
- { doiform #1 =
- { "\doi{" doi * "}" * }
- { doiprefix doi * doiurl doi * make.href }
+ { doi parse.doi % leaves "https://doi.org/DOI" DOI on the stack
+ 's := 't :=
+ doiform #1 =
+ { "\doi{" s * "}" * }
+ { doiprefix s * t make.href }
if$
}
if$
@@ -799,10 +819,11 @@ FUNCTION {output.web.refs}
inlinelinks
'skip$ % links were inline -- don't repeat them
{ % If the generated DOI will be the same as the URL,
- % then don't print the URL (thanks to Joseph Wright for this code,
+ % then don't print the URL (thanks to Joseph Wright
+ % for (the original version of) this code,
% at http://tex.stackexchange.com/questions/5660)
adddoi
- doiurl doi empty$ { "X" } { doi } if$ * % DOI URL to be generated
+ doi empty$ { "X" } { doi parse.doi pop$ } if$ % DOI URL to be generated
url empty$ { "Y" } { url } if$ % the URL, or "Y" if empty
= % are the strings equal?
and
diff --git a/biblio/bibtex/contrib/urlbst/configure b/biblio/bibtex/contrib/urlbst/configure
index 6817ec0028..dcdda31145 100755
--- a/biblio/bibtex/contrib/urlbst/configure
+++ b/biblio/bibtex/contrib/urlbst/configure
@@ -1,7 +1,7 @@
#! /bin/sh
# From configure.ac @PACKAGE_VERSION@.
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.71 for urlbst 0.9.
+# Generated by GNU Autoconf 2.71 for urlbst 0.9.1.
#
# Report bugs to <gray@nxg.name>.
#
@@ -611,8 +611,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='urlbst'
PACKAGE_TARNAME='urlbst'
-PACKAGE_VERSION='0.9'
-PACKAGE_STRING='urlbst 0.9'
+PACKAGE_VERSION='0.9.1'
+PACKAGE_STRING='urlbst 0.9.1'
PACKAGE_BUGREPORT='gray@nxg.name'
PACKAGE_URL=''
@@ -1229,7 +1229,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures urlbst 0.9 to adapt to many kinds of systems.
+\`configure' configures urlbst 0.9.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1291,7 +1291,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of urlbst 0.9:";;
+ short | recursive ) echo "Configuration of urlbst 0.9.1:";;
esac
cat <<\_ACEOF
@@ -1367,7 +1367,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-urlbst configure 0.9
+urlbst configure 0.9.1
generated by GNU Autoconf 2.71
Copyright (C) 2021 Free Software Foundation, Inc.
@@ -1404,7 +1404,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by urlbst $as_me 0.9, which was
+It was created by urlbst $as_me 0.9.1, which was
generated by GNU Autoconf 2.71. Invocation command line was
$ $0$ac_configure_args_raw
@@ -1744,7 +1744,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-RELEASEDATE="2022 December 1"
+RELEASEDATE="2023 January 30"
REPOURL=https://heptapod.host/nxg/urlbst
@@ -1754,7 +1754,7 @@ CTANURL=https://ctan.org/pkg/urlbst
-COPYRIGHTYEARS="2002-03, 2005-12, 2014, 2019, 2022"
+COPYRIGHTYEARS="2002–23"
@@ -2427,7 +2427,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by urlbst $as_me 0.9, which was
+This file was extended by urlbst $as_me 0.9.1, which was
generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -2482,7 +2482,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
-urlbst config.status 0.9
+urlbst config.status 0.9.1
configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"
diff --git a/biblio/bibtex/contrib/urlbst/configure.ac b/biblio/bibtex/contrib/urlbst/configure.ac
index d8f5227044..dc1d706b02 100644
--- a/biblio/bibtex/contrib/urlbst/configure.ac
+++ b/biblio/bibtex/contrib/urlbst/configure.ac
@@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script
-AC_INIT(urlbst, 0.9, gray@nxg.name)
-RELEASEDATE="2022 December 1"
+AC_INIT(urlbst, 0.9.1, gray@nxg.name)
+RELEASEDATE="2023 January 30"
AC_SUBST(RELEASEDATE)
AC_SUBST(REPOURL, [https://heptapod.host/nxg/urlbst])
@@ -8,7 +8,9 @@ AC_SUBST(CTANURL, [https://ctan.org/pkg/urlbst])
AC_REVISION(@PACKAGE_VERSION@)
-COPYRIGHTYEARS="2002-03, 2005-12, 2014, 2019, 2022"
+dnl COPYRIGHTYEARS="2002-03, 2005-12, 2014, 2019, 2022, 2023"
+dnl simpler...
+COPYRIGHTYEARS="2002–23"
AC_SUBST(COPYRIGHTYEARS)
AC_PREREQ(2.50)
diff --git a/biblio/bibtex/contrib/urlbst/plainurl.bst b/biblio/bibtex/contrib/urlbst/plainurl.bst
index 34084b5476..e2df8eb613 100644
--- a/biblio/bibtex/contrib/urlbst/plainurl.bst
+++ b/biblio/bibtex/contrib/urlbst/plainurl.bst
@@ -1,7 +1,7 @@
%%% Modification of BibTeX style file /usr/local/texlive/2022/texmf-dist/bibtex/bst/base/plain.bst
-%%% ... by urlbst, version 0.9 (marked with "% urlbst")
+%%% ... by urlbst, version 0.9.1 (marked with "% urlbst")
%%% See <https://purl.org/nxg/dist/urlbst> and repository <https://heptapod.host/nxg/urlbst>
-%%% Modifications Copyright 2002-03, 2005-12, 2014, 2019, 2022, Norman Gray,
+%%% Modifications Copyright 2002–23, Norman Gray,
%%% and distributed under the terms of the LPPL; see README for discussion.
%%%
%%% Added webpage entry type, and url and lastchecked fields.
@@ -68,24 +68,24 @@ FUNCTION {init.urlbst.variables}
% The following constants may be adjusted by hand, if desired
% The first set allow you to enable or disable certain functionality.
- #1 'addpubmed := % 0=no PUBMED resolver; 1=include it
- #1 'addeprints := % 0=no eprints; 1=include eprints
- #0 'inlinelinks := % 0=URLs explicit; 1=URLs attached to titles
#1 'adddoi := % 0=no DOI resolver; 1=include it
+ #0 'inlinelinks := % 0=URLs explicit; 1=URLs attached to titles
#2 'hrefform := % 0=no crossrefs; 1=hypertex hrefs; 2=hyperref hrefs
+ #1 'addeprints := % 0=no eprints; 1=include eprints
#0 'doiform := % 0=with href; 1=with \doi{}
+ #1 'addpubmed := % 0=no PUBMED resolver; 1=include it
% String constants, which you _might_ want to tweak.
- "cited " 'citedstring := % label in "lastchecked" remark
- "[link]" 'linktextstring := % anonymous link text
- "https://arxiv.org/abs/" 'eprinturl := % prefix to make URL from eprint ref
+ "https://doi.org/" 'doiurl := % prefix to make URL from DOI
+ "arXiv:" 'eprintprefix := % text prefix printed before eprint ref
"online" 'onlinestring := % label that a resource is online
+ "URL: " 'urlintro := % text prefix before URL
"doi:" 'doiprefix := % printed text to introduce DOI
- "https://doi.org/" 'doiurl := % prefix to make URL from DOI
"http://www.ncbi.nlm.nih.gov/pubmed/" 'pubmedurl := % prefix to make URL from PUBMED
- "URL: " 'urlintro := % text prefix before URL
+ "[link]" 'linktextstring := % anonymous link text
+ "https://arxiv.org/abs/" 'eprinturl := % prefix to make URL from eprint ref
"PMID:" 'pubmedprefix := % text prefix printed before PUBMED ref
- "arXiv:" 'eprintprefix := % text prefix printed before eprint ref
+ "cited " 'citedstring := % label in "lastchecked" remark
% The following are internal state variables, not configuration constants,
% so they shouldn't be fiddled with.
@@ -138,6 +138,19 @@ FUNCTION {output.nonnull.original}
}
% urlbst...
+% Minimal DOI parsing.
+% Given a DOI on the stack, check whether it starts with 'doiurl' or not.
+% In either case, leave on the stack first a DOI with, and then a DOI without, the URL prefix.
+FUNCTION {parse.doi}
+{
+ #1 doiurl text.length$ substring$
+ doiurl =
+ { doi
+ doi doiurl text.length$ #1 + #999 substring$ }
+ { doiurl doi *
+ doi }
+ if$
+}
% The following three functions are for handling inlinelink. They wrap
% a block of text which is potentially output with write$ by multiple
% other functions, so we don't know the content a priori.
@@ -164,7 +177,12 @@ FUNCTION {possibly.setup.inlinelink}
if$ }
{ pubmedurl pubmed * }
if$ }
- { doiurl doi * }
+% { doiurl doi * }
+ { doi empty$
+ { "XXX" }
+ { doi parse.doi pop$ }
+ if$
+ }
if$
% an appropriately-formatted URL is now on the stack
hrefform #1 = % hypertex
@@ -761,9 +779,11 @@ FUNCTION {format.eprint}
FUNCTION {format.doi}
{ doi empty$
{ "" }
- { doiform #1 =
- { "\doi{" doi * "}" * }
- { doiprefix doi * doiurl doi * make.href }
+ { doi parse.doi % leaves "https://doi.org/DOI" DOI on the stack
+ 's := 't :=
+ doiform #1 =
+ { "\doi{" s * "}" * }
+ { doiprefix s * t make.href }
if$
}
if$
@@ -797,10 +817,11 @@ FUNCTION {output.web.refs}
inlinelinks
'skip$ % links were inline -- don't repeat them
{ % If the generated DOI will be the same as the URL,
- % then don't print the URL (thanks to Joseph Wright for this code,
+ % then don't print the URL (thanks to Joseph Wright
+ % for (the original version of) this code,
% at http://tex.stackexchange.com/questions/5660)
adddoi
- doiurl doi empty$ { "X" } { doi } if$ * % DOI URL to be generated
+ doi empty$ { "X" } { doi parse.doi pop$ } if$ % DOI URL to be generated
url empty$ { "Y" } { url } if$ % the URL, or "Y" if empty
= % are the strings equal?
and
diff --git a/biblio/bibtex/contrib/urlbst/unsrturl.bst b/biblio/bibtex/contrib/urlbst/unsrturl.bst
index 185483c1b6..80cd43e8c9 100644
--- a/biblio/bibtex/contrib/urlbst/unsrturl.bst
+++ b/biblio/bibtex/contrib/urlbst/unsrturl.bst
@@ -1,7 +1,7 @@
%%% Modification of BibTeX style file /usr/local/texlive/2022/texmf-dist/bibtex/bst/base/unsrt.bst
-%%% ... by urlbst, version 0.9 (marked with "% urlbst")
+%%% ... by urlbst, version 0.9.1 (marked with "% urlbst")
%%% See <https://purl.org/nxg/dist/urlbst> and repository <https://heptapod.host/nxg/urlbst>
-%%% Modifications Copyright 2002-03, 2005-12, 2014, 2019, 2022, Norman Gray,
+%%% Modifications Copyright 2002–23, Norman Gray,
%%% and distributed under the terms of the LPPL; see README for discussion.
%%%
%%% Added webpage entry type, and url and lastchecked fields.
@@ -68,24 +68,24 @@ FUNCTION {init.urlbst.variables}
% The following constants may be adjusted by hand, if desired
% The first set allow you to enable or disable certain functionality.
- #0 'inlinelinks := % 0=URLs explicit; 1=URLs attached to titles
- #1 'adddoi := % 0=no DOI resolver; 1=include it
+ #1 'addpubmed := % 0=no PUBMED resolver; 1=include it
#0 'doiform := % 0=with href; 1=with \doi{}
+ #1 'adddoi := % 0=no DOI resolver; 1=include it
#1 'addeprints := % 0=no eprints; 1=include eprints
- #1 'addpubmed := % 0=no PUBMED resolver; 1=include it
+ #0 'inlinelinks := % 0=URLs explicit; 1=URLs attached to titles
#2 'hrefform := % 0=no crossrefs; 1=hypertex hrefs; 2=hyperref hrefs
% String constants, which you _might_ want to tweak.
+ "https://arxiv.org/abs/" 'eprinturl := % prefix to make URL from eprint ref
"http://www.ncbi.nlm.nih.gov/pubmed/" 'pubmedurl := % prefix to make URL from PUBMED
- "PMID:" 'pubmedprefix := % text prefix printed before PUBMED ref
"[link]" 'linktextstring := % anonymous link text
- "online" 'onlinestring := % label that a resource is online
- "https://doi.org/" 'doiurl := % prefix to make URL from DOI
- "doi:" 'doiprefix := % printed text to introduce DOI
"URL: " 'urlintro := % text prefix before URL
- "https://arxiv.org/abs/" 'eprinturl := % prefix to make URL from eprint ref
+ "https://doi.org/" 'doiurl := % prefix to make URL from DOI
"cited " 'citedstring := % label in "lastchecked" remark
+ "doi:" 'doiprefix := % printed text to introduce DOI
"arXiv:" 'eprintprefix := % text prefix printed before eprint ref
+ "PMID:" 'pubmedprefix := % text prefix printed before PUBMED ref
+ "online" 'onlinestring := % label that a resource is online
% The following are internal state variables, not configuration constants,
% so they shouldn't be fiddled with.
@@ -138,6 +138,19 @@ FUNCTION {output.nonnull.original}
}
% urlbst...
+% Minimal DOI parsing.
+% Given a DOI on the stack, check whether it starts with 'doiurl' or not.
+% In either case, leave on the stack first a DOI with, and then a DOI without, the URL prefix.
+FUNCTION {parse.doi}
+{
+ #1 doiurl text.length$ substring$
+ doiurl =
+ { doi
+ doi doiurl text.length$ #1 + #999 substring$ }
+ { doiurl doi *
+ doi }
+ if$
+}
% The following three functions are for handling inlinelink. They wrap
% a block of text which is potentially output with write$ by multiple
% other functions, so we don't know the content a priori.
@@ -164,7 +177,12 @@ FUNCTION {possibly.setup.inlinelink}
if$ }
{ pubmedurl pubmed * }
if$ }
- { doiurl doi * }
+% { doiurl doi * }
+ { doi empty$
+ { "XXX" }
+ { doi parse.doi pop$ }
+ if$
+ }
if$
% an appropriately-formatted URL is now on the stack
hrefform #1 = % hypertex
@@ -760,9 +778,11 @@ FUNCTION {format.eprint}
FUNCTION {format.doi}
{ doi empty$
{ "" }
- { doiform #1 =
- { "\doi{" doi * "}" * }
- { doiprefix doi * doiurl doi * make.href }
+ { doi parse.doi % leaves "https://doi.org/DOI" DOI on the stack
+ 's := 't :=
+ doiform #1 =
+ { "\doi{" s * "}" * }
+ { doiprefix s * t make.href }
if$
}
if$
@@ -796,10 +816,11 @@ FUNCTION {output.web.refs}
inlinelinks
'skip$ % links were inline -- don't repeat them
{ % If the generated DOI will be the same as the URL,
- % then don't print the URL (thanks to Joseph Wright for this code,
+ % then don't print the URL (thanks to Joseph Wright
+ % for (the original version of) this code,
% at http://tex.stackexchange.com/questions/5660)
adddoi
- doiurl doi empty$ { "X" } { doi } if$ * % DOI URL to be generated
+ doi empty$ { "X" } { doi parse.doi pop$ } if$ % DOI URL to be generated
url empty$ { "Y" } { url } if$ % the URL, or "Y" if empty
= % are the strings equal?
and
diff --git a/biblio/bibtex/contrib/urlbst/urlbst b/biblio/bibtex/contrib/urlbst/urlbst
index 1a7625ee88..cfe72a52b0 100755
--- a/biblio/bibtex/contrib/urlbst/urlbst
+++ b/biblio/bibtex/contrib/urlbst/urlbst
@@ -8,16 +8,16 @@
#
# See https://purl.org/nxg/dist/urlbst for documentation
#
-# Copyright 2002-03, 2005-12, 2014, 2019, 2022, Norman Gray <https://nxg.me.uk>
+# Copyright 2002–23, Norman Gray <https://nxg.me.uk>
#
# This program is distributed under the terms of the
# GNU General Public Licence, v2.0.
-# The modifications to the input .bst files are asserted as Copyright 2002-03, 2005-12, 2014, 2019, 2022, Norman Gray,
+# The modifications to the input .bst files are asserted as Copyright 2002–23, Norman Gray,
# and distributed under the terms of the LaTeX Project Public Licence.
# See the package README for further dicussion of licences.
-$version = '0.9';
-$releasedate = '2022 December 1';
+$version = '0.9.1';
+$releasedate = '2023 January 30';
($progname = $0) =~ s/.*\///;
$mymarker = "% $progname";
$mymarkerend = "% ...$progname to here";
@@ -253,7 +253,7 @@ open (OUT, ">$outfile") || die "Can't open $outfile to write";
print OUT "%%% Modification of BibTeX style file ", ($infile eq '-' ? '<stdin>' : $infile), "\n";
print OUT "%%% ... by $progname, version $version (marked with \"$mymarker\")\n%%% See <$homepageurl> and repository <$repourl>\n";
-print OUT "%%% Modifications Copyright 2002-03, 2005-12, 2014, 2019, 2022, Norman Gray,\n";
+print OUT "%%% Modifications Copyright 2002–23, Norman Gray,\n";
print OUT "%%% and distributed under the terms of the LPPL; see README for discussion.\n";
print OUT "%%%\n";
print OUT "%%% Added webpage entry type, and url and lastchecked fields.\n";
@@ -501,6 +501,19 @@ sub print_output_functions {
print OUT "$mymarker...\n";
print OUT <<'EOD';
+% Minimal DOI parsing.
+% Given a DOI on the stack, check whether it starts with 'doiurl' or not.
+% In either case, leave on the stack first a DOI with, and then a DOI without, the URL prefix.
+FUNCTION {parse.doi}
+{
+ #1 doiurl text.length$ substring$
+ doiurl =
+ { doi
+ doi doiurl text.length$ #1 + #999 substring$ }
+ { doiurl doi *
+ doi }
+ if$
+}
% The following three functions are for handling inlinelink. They wrap
% a block of text which is potentially output with write$ by multiple
% other functions, so we don't know the content a priori.
@@ -527,7 +540,12 @@ FUNCTION {possibly.setup.inlinelink}
if$ }
{ pubmedurl pubmed * }
if$ }
- { doiurl doi * }
+% { doiurl doi * }
+ { doi empty$
+ { "XXX" }
+ { doi parse.doi pop$ }
+ if$
+ }
if$
% an appropriately-formatted URL is now on the stack
hrefform #1 = % hypertex
@@ -683,9 +701,11 @@ EOD
FUNCTION {format.doi}
{ doi empty$
{ "" }
- { doiform #1 =
- { "\doi{" doi * "}" * }
- { doiprefix doi * doiurl doi * make.href }
+ { doi parse.doi % leaves "https://doi.org/DOI" DOI on the stack
+ 's := 't :=
+ doiform #1 =
+ { "\doi{" s * "}" * }
+ { doiprefix s * t make.href }
if$
}
if$
@@ -731,10 +751,11 @@ FUNCTION {output.web.refs}
inlinelinks
'skip$ % links were inline -- don't repeat them
{ % If the generated DOI will be the same as the URL,
- % then don't print the URL (thanks to Joseph Wright for this code,
+ % then don't print the URL (thanks to Joseph Wright
+ % for (the original version of) this code,
% at http://tex.stackexchange.com/questions/5660)
adddoi
- doiurl doi empty$ { "X" } { doi } if$ * % DOI URL to be generated
+ doi empty$ { "X" } { doi parse.doi pop$ } if$ % DOI URL to be generated
url empty$ { "Y" } { url } if$ % the URL, or "Y" if empty
= % are the strings equal?
and
diff --git a/biblio/bibtex/contrib/urlbst/urlbst.bib b/biblio/bibtex/contrib/urlbst/urlbst.bib
index 2b76ae7178..0c8043f5b6 100644
--- a/biblio/bibtex/contrib/urlbst/urlbst.bib
+++ b/biblio/bibtex/contrib/urlbst/urlbst.bib
@@ -162,7 +162,7 @@ Webpage{emory95,
year = 2002,
doi = {10.1090/S0025-5718-01-01333-3}
}
-
+
% Article with a DOI and a URL which refers to the same resource as the DOI
% (we shouldn't get both in the output)
@Article{test:doi2,
@@ -170,8 +170,19 @@ Webpage{emory95,
title = {Fun with {DOIs}},
journal = {Journal of Indirection},
year = 1999,
- doi = {10.1234/5678},
- url = {https://doi.org/10.1234/5678}
+ doi = {10.1234/5678-without},
+ url = {https://doi.org/10.1234/5678-without}
+}
+
+% An article which includes a DOI which includes the doi.org prefix.
+% We shouldn't add a second one.
+@Article{test:doi3,
+ author = {A N Other},
+ title = {More Fun with {DOIs}},
+ journal = {Journal of Indirection (over there)},
+ year = 2000,
+ doi = {https://doi.org/10.1234/5678-with},
+ url = {https://doi.org/10.1234/5678-with}
}
% Article with a PUBMED reference
@@ -218,4 +229,3 @@ Webpage{emory95,
year = 2007,
url = {http://cs.jhu.edu/~jason/papers/#icassp07}
}
-
diff --git a/biblio/bibtex/contrib/urlbst/urlbst.html b/biblio/bibtex/contrib/urlbst/urlbst.html
index 6ee2137710..4ba263e3f4 100644
--- a/biblio/bibtex/contrib/urlbst/urlbst.html
+++ b/biblio/bibtex/contrib/urlbst/urlbst.html
@@ -24,7 +24,7 @@ It is on CTAN at
The code (and bugparade) is
<a href='https://heptapod.host/nxg/urlbst'>online</a>.</p>
-<p>Version 0.9, 2022 December 1.</p>
+<p>Version 0.9.1, 2023 January 30.</p>
</div>
<p>Contents</p>
@@ -206,9 +206,9 @@ href="https://texfaq.org/FAQ-citeURL" >TeX FAQ</a>.</p>
<h2><a name='download'>Download and installation</a></h2>
<p>Download the file as a
-<a href="urlbst-0.9.tar.gz" >tarball</a>
+<a href="urlbst-0.9.1.tar.gz" >tarball</a>
or
-<a href="urlbst-0.9.zip" >zip file</a>
+<a href="urlbst-0.9.1.zip" >zip file</a>
and unpack it. Or you can clone the source repository
<a href='https://heptapod.host/nxg/urlbst'>online</a>.</p>
@@ -315,7 +315,7 @@ is distributed as a PDF file, but if you want to regenerate it, use</p>
<p>The copyright and licence position for the modified <code>.bst</code> files seems
slightly muddy to me. On the grounds that any licence is better than
no licence, I therefore assert that the <em>modifications</em> which the
-<code>urlbst</code> program makes to these files are copyright 2002-03, 2005-12, 2014, 2019, 2022,
+<code>urlbst</code> program makes to these files are copyright 2002–23,
Norman Gray, and that these modifications are available for
distribution under the terms of the LaTeX Project Public Licence.</p>
@@ -365,6 +365,12 @@ to Katrin Leinweber for the pull request which fixed the format of DOI
references.</p>
<dl>
+<dt><strong>0.9.1, 2023 January 30</strong></dt>
+<dd>
+ Added code to spot and wrangle the <code>https://doi.org/</code> URL
+ prefix – the code now behaves correctly whether this is present or not.
+</dd>
+
<dt><strong>0.9, 2022 December 1</strong></dt>
<dd><ul>
<li>Changed repository location to <a href='https://heptapod.host/nxg/urlbst'>heptapod</a>
@@ -379,7 +385,7 @@ references.</p>
</ul>
</dd>
-<dt><strong>0.8, 2019 July 1</strong></dt>
+<dt>0.8, 2019 July 1</dt>
<dd><ul>
<li>The presence of a preexisting <code>format.doi</code>,
<code>format.eprint</code> or <code>format.pubmed</code> function is
@@ -481,13 +487,13 @@ documentation added.</dd>
</dl>
</div>
-<p>Copyright 2002-03, 2005-12, 2014, 2019, 2022, Norman Gray. Released under the terms of the GNU
+<p>Copyright 2002–23, Norman Gray. Released under the terms of the GNU
General Public Licence.</p>
<div class="signature">
<a href="https://nxg.me.uk"
>Norman Gray</a><br/>
-2022 December 1
+2023 January 30
</div>
</body>
diff --git a/biblio/bibtex/contrib/urlbst/urlbst.in b/biblio/bibtex/contrib/urlbst/urlbst.in
index 569bb7c4fb..3cd06089f5 100755
--- a/biblio/bibtex/contrib/urlbst/urlbst.in
+++ b/biblio/bibtex/contrib/urlbst/urlbst.in
@@ -501,6 +501,19 @@ sub print_output_functions {
print OUT "$mymarker...\n";
print OUT <<'EOD';
+% Minimal DOI parsing.
+% Given a DOI on the stack, check whether it starts with 'doiurl' or not.
+% In either case, leave on the stack first a DOI with, and then a DOI without, the URL prefix.
+FUNCTION {parse.doi}
+{
+ #1 doiurl text.length$ substring$
+ doiurl =
+ { doi
+ doi doiurl text.length$ #1 + #999 substring$ }
+ { doiurl doi *
+ doi }
+ if$
+}
% The following three functions are for handling inlinelink. They wrap
% a block of text which is potentially output with write$ by multiple
% other functions, so we don't know the content a priori.
@@ -527,7 +540,12 @@ FUNCTION {possibly.setup.inlinelink}
if$ }
{ pubmedurl pubmed * }
if$ }
- { doiurl doi * }
+% { doiurl doi * }
+ { doi empty$
+ { "XXX" }
+ { doi parse.doi pop$ }
+ if$
+ }
if$
% an appropriately-formatted URL is now on the stack
hrefform #1 = % hypertex
@@ -683,9 +701,11 @@ EOD
FUNCTION {format.doi}
{ doi empty$
{ "" }
- { doiform #1 =
- { "\doi{" doi * "}" * }
- { doiprefix doi * doiurl doi * make.href }
+ { doi parse.doi % leaves "https://doi.org/DOI" DOI on the stack
+ 's := 't :=
+ doiform #1 =
+ { "\doi{" s * "}" * }
+ { doiprefix s * t make.href }
if$
}
if$
@@ -731,10 +751,11 @@ FUNCTION {output.web.refs}
inlinelinks
'skip$ % links were inline -- don't repeat them
{ % If the generated DOI will be the same as the URL,
- % then don't print the URL (thanks to Joseph Wright for this code,
+ % then don't print the URL (thanks to Joseph Wright
+ % for (the original version of) this code,
% at http://tex.stackexchange.com/questions/5660)
adddoi
- doiurl doi empty$ { "X" } { doi } if$ * % DOI URL to be generated
+ doi empty$ { "X" } { doi parse.doi pop$ } if$ % DOI URL to be generated
url empty$ { "Y" } { url } if$ % the URL, or "Y" if empty
= % are the strings equal?
and
diff --git a/biblio/bibtex/contrib/urlbst/urlbst.pdf b/biblio/bibtex/contrib/urlbst/urlbst.pdf
index 7b2a34c124..f0960f4677 100644
--- a/biblio/bibtex/contrib/urlbst/urlbst.pdf
+++ b/biblio/bibtex/contrib/urlbst/urlbst.pdf
Binary files differ
diff --git a/biblio/bibtex/contrib/urlbst/urlbst.tex b/biblio/bibtex/contrib/urlbst/urlbst.tex
index a8d828e38f..8f16c6260f 100644
--- a/biblio/bibtex/contrib/urlbst/urlbst.tex
+++ b/biblio/bibtex/contrib/urlbst/urlbst.tex
@@ -2,7 +2,7 @@
\title{The \texttt{urlbst} package}
\author{Norman Gray\\\texttt{<https://nxg.me.uk>}}
-\date{Version 0.9, 2022 December 1}
+\date{Version 0.9.1, 2023 January 30}
%\usepackage{times}
\usepackage{url}
@@ -210,6 +210,14 @@ approach is to apply the setting \texttt{doiform=1}, which will
generate DOIs wrapped in the macro |\doi{...}|. This allows you to
supply a generic |\doi| macro to format them as you desire.
+The \btfield{doi} field may include the \texttt{https://doi.org/}, or
+it may omit it; the stylefile adds or removes the prefix as
+appropriate. Note that this parsing is rudimentary: it won't detect
+any of the variants of this prefix, meaning \texttt{http:} or
+\texttt{dx.doi.org}, both of which are now deprecated.
+% Note that this string is configured in configure.ac, but changing it
+% there wouldn't change it here (I could, but... Makefile)
+
The \ub\ script works by spotting patterns and characteristic function
names in the input |.bst| file. It works as-is in the case of the
four standard \BibTeX\ style files |plain.bst|, |unsrt.bst|,
@@ -333,14 +341,6 @@ generated bibliographies.
See also the URL entry in the UK \TeX\ FAQ~\cite{texfaq}, and
references therein.
-%% \textbf{Acknowledgements:} Thanks
-%% to Jason Eisner for suggesting the |--inlinelinks| option;
-%% to `ijvm' for code contributions in the |urlbst| script;
-%% to Pawe\l{} Widera for the suggestion to use |\path| when formatting DOIs;
-%% to Michael Giffin for the suggestion to include PubMed URLs;
-%% to Katrin Leinweber for the pull request which fixed the format of DOI
-%% references.
-
\section{Acknowledgements, and release notes}
%%% include:release-notes.tex
@@ -355,6 +355,12 @@ to Katrin Leinweber for the pull request which fixed the format of DOI
references.
\begin{description}
+\item[\textbf{0.9.1, 2023 January 30}]\relax
+
+ Added code to spot and wrangle the |https://doi.org/| URL
+ prefix – the code now behaves correctly whether this is present or not.
+
+
\item[\textbf{0.9, 2022 December 1}]\relax
\begin{itemize}
\item Changed repository location to heptapod\footnote{\url{https://heptapod.host/nxg/urlbst}}
@@ -369,7 +375,7 @@ references.
\end{itemize}
-\item[\textbf{0.8, 2019 July 1}]\relax
+\item[0.8, 2019 July 1]\relax
\begin{itemize}
\item The presence of a preexisting |format.doi|,
|format.eprint| or |format.pubmed| function is