From 478adaf203776806f691f866da35e243690198a0 Mon Sep 17 00:00:00 2001
From: Karl Berry
Date: Thu, 21 Jul 2011 23:39:10 +0000
Subject: urlbst 0.7 (21jul11)
git-svn-id: svn://tug.org/texlive/trunk@23198 c570f23f-e606-0410-a88d-b1316a301751
---
Master/texmf-dist/bibtex/bst/urlbst/abbrvurl.bst | 20 +++--
Master/texmf-dist/bibtex/bst/urlbst/alphaurl.bst | 20 +++--
Master/texmf-dist/bibtex/bst/urlbst/plainurl.bst | 20 +++--
Master/texmf-dist/bibtex/bst/urlbst/unsrturl.bst | 20 +++--
Master/texmf-dist/doc/bibtex/urlbst/README | 53 ++++++++++---
Master/texmf-dist/doc/bibtex/urlbst/VERSION | 2 +-
Master/texmf-dist/doc/bibtex/urlbst/urlbst | 87 +++++++++++++++------
Master/texmf-dist/doc/bibtex/urlbst/urlbst.bib | 21 ++---
Master/texmf-dist/doc/bibtex/urlbst/urlbst.html | 57 +++++++++++---
Master/texmf-dist/doc/bibtex/urlbst/urlbst.html.in | 49 ++++++++++--
Master/texmf-dist/doc/bibtex/urlbst/urlbst.in | 85 ++++++++++++++------
Master/texmf-dist/doc/bibtex/urlbst/urlbst.pdf | Bin 184859 -> 210289 bytes
Master/texmf-dist/doc/bibtex/urlbst/urlbst.tex | 18 +++--
Master/texmf-dist/doc/bibtex/urlbst/urlbst.tex.in | 16 ++--
Master/texmf-dist/source/bibtex/urlbst/configure | 20 ++---
.../texmf-dist/source/bibtex/urlbst/configure.ac | 4 +-
16 files changed, 352 insertions(+), 140 deletions(-)
(limited to 'Master')
diff --git a/Master/texmf-dist/bibtex/bst/urlbst/abbrvurl.bst b/Master/texmf-dist/bibtex/bst/urlbst/abbrvurl.bst
index 636613f34d4..87a301d1d76 100644
--- a/Master/texmf-dist/bibtex/bst/urlbst/abbrvurl.bst
+++ b/Master/texmf-dist/bibtex/bst/urlbst/abbrvurl.bst
@@ -1,5 +1,5 @@
%%% Modification of BibTeX style file /usr/local/texlive/2009/texmf-dist/bibtex/bst/base/abbrv.bst
-%%% ... by urlbst, version 0.6-5 (marked with "% urlbst")
+%%% ... by urlbst, version 0.7 (marked with "% urlbst")
%%% See
%%% Added webpage entry type, and url and lastchecked fields.
%%% Added eprint support.
@@ -56,6 +56,7 @@ INTEGERS { output.state before.all mid.sentence after.sentence after.block }
% urlbst constants and state variables
STRINGS { urlintro
eprinturl eprintprefix doiprefix doiurl pubmedprefix pubmedurl
+ citedstring onlinestring linktextstring
openinlinelink closeinlinelink }
INTEGERS { hrefform inlinelinks makeinlinelink
addeprints adddoiresolver addpubmedresolver }
@@ -71,13 +72,16 @@ FUNCTION {init.urlbst.variables}
#0 'inlinelinks := % 0=URLs explicit; 1=URLs attached to titles
% String constants, which you _might_ want to tweak.
- "Available from: " 'urlintro := % prefix before URL
+ "URL: " 'urlintro := % prefix before URL; typically "Available from:" or "URL":
+ "online" 'onlinestring := % indication that resource is online; typically "online"
+ "cited " 'citedstring := % indicator of citation date; typically "cited "
+ "[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
+ "arXiv:" 'eprintprefix := % text prefix printed before eprint ref; typically "arXiv:"
"http://dx.doi.org/" 'doiurl := % prefix to make URL from DOI
- "doi:" 'doiprefix := % text prefix printed before DOI ref
+ "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
+ "PMID:" 'pubmedprefix := % text prefix printed before PUBMED ref; typically "PMID:"
% The following are internal state variables, not configuration constants,
% so they shouldn't be fiddled with.
@@ -225,7 +229,7 @@ FUNCTION {inbrackets}
FUNCTION {format.lastchecked}
{ lastchecked empty$
{ "" }
- { inbrackets "cited " lastchecked * }
+ { inbrackets citedstring lastchecked * }
if$
}
% ...urlbst to here
@@ -820,7 +824,7 @@ FUNCTION {fin.entry}
{ output.web.refs % urlbst
makeinlinelink % ooops, it appears we didn't have a title for inlinelink
{ possibly.setup.inlinelink % add some artificial link text here, as a fallback
- "[link]" output.nonnull }
+ linktextstring output.nonnull }
'skip$
if$
bracket.state close.brackets = % urlbst
@@ -856,7 +860,7 @@ FUNCTION {webpage}
new.block
title empty$ 'skip$ 'possibly.setup.inlinelink if$
format.title "title" output.check
- inbrackets "online" output
+ inbrackets onlinestring output
new.block
year empty$
'skip$
diff --git a/Master/texmf-dist/bibtex/bst/urlbst/alphaurl.bst b/Master/texmf-dist/bibtex/bst/urlbst/alphaurl.bst
index 687aeeccede..c7138c392d9 100644
--- a/Master/texmf-dist/bibtex/bst/urlbst/alphaurl.bst
+++ b/Master/texmf-dist/bibtex/bst/urlbst/alphaurl.bst
@@ -1,5 +1,5 @@
%%% Modification of BibTeX style file /usr/local/texlive/2009/texmf-dist/bibtex/bst/base/alpha.bst
-%%% ... by urlbst, version 0.6-5 (marked with "% urlbst")
+%%% ... by urlbst, version 0.7 (marked with "% urlbst")
%%% See
%%% Added webpage entry type, and url and lastchecked fields.
%%% Added eprint support.
@@ -56,6 +56,7 @@ INTEGERS { output.state before.all mid.sentence after.sentence after.block }
% urlbst constants and state variables
STRINGS { urlintro
eprinturl eprintprefix doiprefix doiurl pubmedprefix pubmedurl
+ citedstring onlinestring linktextstring
openinlinelink closeinlinelink }
INTEGERS { hrefform inlinelinks makeinlinelink
addeprints adddoiresolver addpubmedresolver }
@@ -71,13 +72,16 @@ FUNCTION {init.urlbst.variables}
#0 'inlinelinks := % 0=URLs explicit; 1=URLs attached to titles
% String constants, which you _might_ want to tweak.
- "Available from: " 'urlintro := % prefix before URL
+ "URL: " 'urlintro := % prefix before URL; typically "Available from:" or "URL":
+ "online" 'onlinestring := % indication that resource is online; typically "online"
+ "cited " 'citedstring := % indicator of citation date; typically "cited "
+ "[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
+ "arXiv:" 'eprintprefix := % text prefix printed before eprint ref; typically "arXiv:"
"http://dx.doi.org/" 'doiurl := % prefix to make URL from DOI
- "doi:" 'doiprefix := % text prefix printed before DOI ref
+ "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
+ "PMID:" 'pubmedprefix := % text prefix printed before PUBMED ref; typically "PMID:"
% The following are internal state variables, not configuration constants,
% so they shouldn't be fiddled with.
@@ -225,7 +229,7 @@ FUNCTION {inbrackets}
FUNCTION {format.lastchecked}
{ lastchecked empty$
{ "" }
- { inbrackets "cited " lastchecked * }
+ { inbrackets citedstring lastchecked * }
if$
}
% ...urlbst to here
@@ -822,7 +826,7 @@ FUNCTION {fin.entry}
{ output.web.refs % urlbst
makeinlinelink % ooops, it appears we didn't have a title for inlinelink
{ possibly.setup.inlinelink % add some artificial link text here, as a fallback
- "[link]" output.nonnull }
+ linktextstring output.nonnull }
'skip$
if$
bracket.state close.brackets = % urlbst
@@ -858,7 +862,7 @@ FUNCTION {webpage}
new.block
title empty$ 'skip$ 'possibly.setup.inlinelink if$
format.title "title" output.check
- inbrackets "online" output
+ inbrackets onlinestring output
new.block
year empty$
'skip$
diff --git a/Master/texmf-dist/bibtex/bst/urlbst/plainurl.bst b/Master/texmf-dist/bibtex/bst/urlbst/plainurl.bst
index 79f9623857d..719f48b9af4 100644
--- a/Master/texmf-dist/bibtex/bst/urlbst/plainurl.bst
+++ b/Master/texmf-dist/bibtex/bst/urlbst/plainurl.bst
@@ -1,5 +1,5 @@
%%% Modification of BibTeX style file /usr/local/texlive/2009/texmf-dist/bibtex/bst/base/plain.bst
-%%% ... by urlbst, version 0.6-5 (marked with "% urlbst")
+%%% ... by urlbst, version 0.7 (marked with "% urlbst")
%%% See
%%% Added webpage entry type, and url and lastchecked fields.
%%% Added eprint support.
@@ -56,6 +56,7 @@ INTEGERS { output.state before.all mid.sentence after.sentence after.block }
% urlbst constants and state variables
STRINGS { urlintro
eprinturl eprintprefix doiprefix doiurl pubmedprefix pubmedurl
+ citedstring onlinestring linktextstring
openinlinelink closeinlinelink }
INTEGERS { hrefform inlinelinks makeinlinelink
addeprints adddoiresolver addpubmedresolver }
@@ -71,13 +72,16 @@ FUNCTION {init.urlbst.variables}
#0 'inlinelinks := % 0=URLs explicit; 1=URLs attached to titles
% String constants, which you _might_ want to tweak.
- "Available from: " 'urlintro := % prefix before URL
+ "URL: " 'urlintro := % prefix before URL; typically "Available from:" or "URL":
+ "online" 'onlinestring := % indication that resource is online; typically "online"
+ "cited " 'citedstring := % indicator of citation date; typically "cited "
+ "[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
+ "arXiv:" 'eprintprefix := % text prefix printed before eprint ref; typically "arXiv:"
"http://dx.doi.org/" 'doiurl := % prefix to make URL from DOI
- "doi:" 'doiprefix := % text prefix printed before DOI ref
+ "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
+ "PMID:" 'pubmedprefix := % text prefix printed before PUBMED ref; typically "PMID:"
% The following are internal state variables, not configuration constants,
% so they shouldn't be fiddled with.
@@ -225,7 +229,7 @@ FUNCTION {inbrackets}
FUNCTION {format.lastchecked}
{ lastchecked empty$
{ "" }
- { inbrackets "cited " lastchecked * }
+ { inbrackets citedstring lastchecked * }
if$
}
% ...urlbst to here
@@ -820,7 +824,7 @@ FUNCTION {fin.entry}
{ output.web.refs % urlbst
makeinlinelink % ooops, it appears we didn't have a title for inlinelink
{ possibly.setup.inlinelink % add some artificial link text here, as a fallback
- "[link]" output.nonnull }
+ linktextstring output.nonnull }
'skip$
if$
bracket.state close.brackets = % urlbst
@@ -856,7 +860,7 @@ FUNCTION {webpage}
new.block
title empty$ 'skip$ 'possibly.setup.inlinelink if$
format.title "title" output.check
- inbrackets "online" output
+ inbrackets onlinestring output
new.block
year empty$
'skip$
diff --git a/Master/texmf-dist/bibtex/bst/urlbst/unsrturl.bst b/Master/texmf-dist/bibtex/bst/urlbst/unsrturl.bst
index 0ccd294c018..43826b8e622 100644
--- a/Master/texmf-dist/bibtex/bst/urlbst/unsrturl.bst
+++ b/Master/texmf-dist/bibtex/bst/urlbst/unsrturl.bst
@@ -1,5 +1,5 @@
%%% Modification of BibTeX style file /usr/local/texlive/2009/texmf-dist/bibtex/bst/base/unsrt.bst
-%%% ... by urlbst, version 0.6-5 (marked with "% urlbst")
+%%% ... by urlbst, version 0.7 (marked with "% urlbst")
%%% See
%%% Added webpage entry type, and url and lastchecked fields.
%%% Added eprint support.
@@ -56,6 +56,7 @@ INTEGERS { output.state before.all mid.sentence after.sentence after.block }
% urlbst constants and state variables
STRINGS { urlintro
eprinturl eprintprefix doiprefix doiurl pubmedprefix pubmedurl
+ citedstring onlinestring linktextstring
openinlinelink closeinlinelink }
INTEGERS { hrefform inlinelinks makeinlinelink
addeprints adddoiresolver addpubmedresolver }
@@ -71,13 +72,16 @@ FUNCTION {init.urlbst.variables}
#0 'inlinelinks := % 0=URLs explicit; 1=URLs attached to titles
% String constants, which you _might_ want to tweak.
- "Available from: " 'urlintro := % prefix before URL
+ "URL: " 'urlintro := % prefix before URL; typically "Available from:" or "URL":
+ "online" 'onlinestring := % indication that resource is online; typically "online"
+ "cited " 'citedstring := % indicator of citation date; typically "cited "
+ "[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
+ "arXiv:" 'eprintprefix := % text prefix printed before eprint ref; typically "arXiv:"
"http://dx.doi.org/" 'doiurl := % prefix to make URL from DOI
- "doi:" 'doiprefix := % text prefix printed before DOI ref
+ "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
+ "PMID:" 'pubmedprefix := % text prefix printed before PUBMED ref; typically "PMID:"
% The following are internal state variables, not configuration constants,
% so they shouldn't be fiddled with.
@@ -225,7 +229,7 @@ FUNCTION {inbrackets}
FUNCTION {format.lastchecked}
{ lastchecked empty$
{ "" }
- { inbrackets "cited " lastchecked * }
+ { inbrackets citedstring lastchecked * }
if$
}
% ...urlbst to here
@@ -819,7 +823,7 @@ FUNCTION {fin.entry}
{ output.web.refs % urlbst
makeinlinelink % ooops, it appears we didn't have a title for inlinelink
{ possibly.setup.inlinelink % add some artificial link text here, as a fallback
- "[link]" output.nonnull }
+ linktextstring output.nonnull }
'skip$
if$
bracket.state close.brackets = % urlbst
@@ -855,7 +859,7 @@ FUNCTION {webpage}
new.block
title empty$ 'skip$ 'possibly.setup.inlinelink if$
format.title "title" output.check
- inbrackets "online" output
+ inbrackets onlinestring output
new.block
year empty$
'skip$
diff --git a/Master/texmf-dist/doc/bibtex/urlbst/README b/Master/texmf-dist/doc/bibtex/urlbst/README
index a34caec73fe..38dfabd93d0 100644
--- a/Master/texmf-dist/doc/bibtex/urlbst/README
+++ b/Master/texmf-dist/doc/bibtex/urlbst/README
@@ -22,7 +22,7 @@
The Persistent URL for this page is
hhttttpp::////ppuurrll..oorrgg//nnxxgg//ddiisstt//uurrllbbsstt &.
- Version 0.6‐5, 2011 March 8.
+ Version 0.7, 2011 July 20.
Contents
@@ -59,13 +59,16 @@ and eprint fields. Fuller details are in the manual.
11.. UUssaaggee
- uurrllbbsstt [[‐‐‐‐eepprriinntt]] [[‐‐‐‐ddooii]] [[‐‐‐‐ppuubbmmeedd]] [[‐‐‐‐iinnlliinneelliinnkkss]]
- [[‐‐‐‐nnoohhyyppeerrlliinnkkss]] [[‐‐‐‐hhyyppeerrtteexx]] [[‐‐‐‐hhyyppeerrrreeff]] [[iinnppuutt‐‐ffiillee
- [[oouuttppuutt‐‐ffiillee]]]]
+ uurrllbbsstt [[‐‐‐‐[[nnoo]]eepprriinntt]] [[‐‐‐‐[[nnoo]]ddooii]] [[‐‐‐‐[[nnoo]]ppuubbmmeedd]]
+ [[‐‐‐‐iinnlliinneelliinnkkss]] [[‐‐‐‐nnoohhyyppeerrlliinnkkss]] [[‐‐‐‐hhyyppeerrtteexx]] [[‐‐‐‐hhyyppeerr‐‐
+ rreeff]] [[‐‐‐‐lliitteerraall kkeeyy==vvaalluuee]] [[iinnppuutt‐‐ffiillee [[oouuttppuutt‐‐ffiillee]]]]
- if either the input‐file or the output‐file is omitted,
+ If either the input‐file or the output‐file is omitted,
they default to stdin and stdout respectively. If the input
file already has a URL entry type, then the script objects.
+By default (in the current version), the output includes
+support for eprint, doi and pubmed, but these can be dis‐
+abled by ‐‐‐‐nnooeepprriinntt , ‐‐‐‐nnooddooii and ‐‐‐‐nnooppuubbmmeedd , respectively.
The added fields are:
@@ -101,6 +104,21 @@ used with ‐‐‐‐hhyyppeerrrreeff or ‐‐‐‐hhyyppeer
text which would be produced as a result of the appropriate
option will still appear in this mode.
+ You may adjust various literal strings, either for the
+purposes of internationalisation, or simply because you pre‐
+fer different text. To do this, give the ‐‐‐‐lliitteerraall option,
+followed by a kkeeyy==vvaalluuee pair, for example ‐‐‐‐lliitteerraall
+oonnlliinnee==""oonn tthh’’iinntteerrtt0000bbss"" , to replace the default UURRLL::
+text. The possible values, and their defaults, are below
+(say ‐‐‐‐lliitteerraall hheellpp to get this list printed out): keyword‐
+defaultmeaning citedcitedindicator of citation, or "last
+checked", date doiprefixdoi:text printed before DOI eprint‐
+prefixarXiv:text printed before eprint ref link‐
+text[link]fallback link text pubmedprefixPMID:text printed
+before PUBMED reference onlineonlineindication that resource
+is online urlintroURL:location of online resource (an alter‐
+native is "Available from:")
+
The distribution includes preconverted versions of the
four standard BibTeX .bst style files.
@@ -113,10 +131,10 @@ ieeetr.bst, siam.bst, mla.bst
Style files which are known to fail:
-* Currently (v0.5), there exists a style aacchhiiccaaggoo..bbsstt
- which seems to fox uurrllbbsstt ; it turns out that there’s a
- simpler but almost equivalent style cchhiiccaaggoo..bbsstt which
- works.
+* Currently (as of at least v0.5), there exists a style
+ aacchhiiccaaggoo..bbsstt which seems to fox uurrllbbsstt ; it turns out
+ that there’s a simpler but almost equivalent style
+ cchhiiccaaggoo..bbsstt which works.
* Some APA‐like styles, including at least aappaaggeerr..bbsstt ,
seem to be sufficiently different from the most common
@@ -129,7 +147,13 @@ ieeetr.bst, siam.bst, mla.bst
This might be a good time for me to revisit the rather
convoluted logic within the script, to make it a little more
robust in the face of variants like these, but don’t hold
-your breath...
+your breath. The logic within the script is pretty hideous
+(it essentially works by spotting patterns in the input
+style file, and replacing or extending bits of BibTeX style‐
+file code. This is a fragile technique, and is probably at
+the limits of its usefulness, therefore I’d take some per‐
+suading to add significant extra functionality to the
+script.
The natbib and revtex style files already have URL
fields. If you have a BibTeX style file which you think
@@ -273,6 +297,13 @@ terms of the GNU General Public Licence.
55.. VVeerrssiioonn hhiissttoorryy
+ _0_._7_, Add ‐‐nodoi, ‐‐noeprints and ‐‐nopubmed options
+ (which defaulted on, and couldn’t otherwise be turned
+ off)
+
+ 00..77bb11,, 22001111 MMaarrcchh 1177 Allow parameterisation of literal
+ strings, with option ‐‐‐‐lliitteerraall &.
+
00..66‐‐55,, 22001111 MMaarrcchh 88 Adjust support for inline links
(should now work for arXiv, DOI and Pubmed)
@@ -348,5 +379,5 @@ Thanks to Jason Eisner for the suggestion, and much testing.
_0_._1_, _2_0_0_2 _A_p_r_i_l Initial version
- Norman Gray 2011 March 8
+ Norman Gray 2011 July 20
diff --git a/Master/texmf-dist/doc/bibtex/urlbst/VERSION b/Master/texmf-dist/doc/bibtex/urlbst/VERSION
index 3a3f6d04e37..a404769b324 100644
--- a/Master/texmf-dist/doc/bibtex/urlbst/VERSION
+++ b/Master/texmf-dist/doc/bibtex/urlbst/VERSION
@@ -1 +1 @@
-urlbst-0.6-5b1
+urlbst-0.7
diff --git a/Master/texmf-dist/doc/bibtex/urlbst/urlbst b/Master/texmf-dist/doc/bibtex/urlbst/urlbst
index 4cdae07ce5e..9c3516a5df1 100755
--- a/Master/texmf-dist/doc/bibtex/urlbst/urlbst
+++ b/Master/texmf-dist/doc/bibtex/urlbst/urlbst
@@ -10,7 +10,7 @@
#
# $Id$
-$version = '0.6-5';
+$version = '0.7';
($progname = $0) =~ s/.*\///;
$mymarker = "% $progname";
$mymarkerend = "% ...$progname to here";
@@ -21,24 +21,28 @@ $infile = '-';
$outfile = '-';
$addeprints = 1; # if true (nonzero) we add support for eprints
-$eprintprefix = 'arXiv:'; # make these settable with --eprint? syntax?
+$literals{eprintprefix} = 'arXiv:'; # make these settable with --eprint? syntax?
$eprinturl = 'http://arxiv.org/abs/';
$adddoiresolver = 1;
-$doiprefix = 'doi:';
+$literals{doiprefix} = 'doi:';
$doiurl = 'http://dx.doi.org/';
$addpubmedresolver = 1;
-$pubmedprefix = 'PMID:';
+$literals{pubmedprefix} = 'PMID:';
$pubmedurl = 'http://www.ncbi.nlm.nih.gov/pubmed/';
$makehref = 0;
-$availablestring = "Available from: ";
+$literals{urlintro} = "URL: ";
$inlinelinks = 0;
+$literals{online} = "online";
+$literals{cited} = "cited ";
+$literals{linktext} = "[link]";
+
$automatic_output_filename = 0;
-$Usage = "$progname [--eprint] [--doi] [--pubmed]\n [--nohyperlinks] [--[no]inlinelinks] [--hypertex] [--hyperref]\n [--help] [input-file [output-file]]";
+$Usage = "$progname [--eprint] [--doi] [--pubmed]\n [--nohyperlinks] [--[no]inlinelinks] [--hypertex] [--hyperref]\n [--literal key=value]\n [--help] [input-file [output-file]]";
# Magic environment variable: if this is set, then we're being called from a Platypus wrapper
# See http://www.sveinbjorn.org/platypus
@@ -49,10 +53,16 @@ if ($ENV{"CALLED_FROM_PLATYPUS"}) {
while ($#ARGV >= 0) {
if ($ARGV[0] eq '--eprint') {
$addeprints = 1;
+ } elsif ($ARGV[0] eq '--noeprint') {
+ $addeprints = 0;
} elsif ($ARGV[0] eq '--doi') {
$adddoiresolver = 1;
+ } elsif ($ARGV[0] eq '--nodoi') {
+ $adddoiresolver = 0;
} elsif ($ARGV[0] eq '--pubmed') {
$addpubmedresolver = 1;
+ } elsif ($ARGV[0] eq '--nopubmed') {
+ $addpubmedresolver = 0;
} elsif ($ARGV[0] eq '--nohyperlinks') {
$makehref = 0;
} elsif ($ARGV[0] eq '--hypertex') {
@@ -65,21 +75,48 @@ while ($#ARGV >= 0) {
$inlinelinks = 0;
} elsif ($ARGV[0] eq '--automatic-output') {
$automatic_output_filename = 1;
+ } elsif ($ARGV[0] eq '--literal') {
+ shift;
+ my $showstrings = 0;
+ if ((($k, $v) = ($ARGV[0] =~ /^(\w+)=(.*)/)) && exists $literals{$k}) {
+ $literals{$k} = $v;
+ } elsif ($ARGV[0] eq 'help') {
+ $showstrings = 1;
+ } else {
+ print "No literal found in $ARGV[0]; ignoring that\n";
+ $showstrings = 1;
+ }
+ if ($showstrings) {
+ print " Possible literal strings (and defaults) are...\n";
+ while (($k, $v) = each (%literals)) {
+ print " $k ($v)\n";
+ }
+ exit(0);
+ }
} elsif ($ARGV[0] eq '--help') {
print <
The Persistent URL for this page is
http://purl.org/nxg/dist/urlbst
.
-Version 0.6-5, 2011 March 8.
+Version 0.7, 2011 July 20.
Contents
@@ -52,13 +52,18 @@ eprint fields. Fuller details are in the Usage
-urlbst [--eprint] [--doi] [--pubmed]
+urlbst [--[no]eprint] [--[no]doi] [--[no]pubmed]
[--inlinelinks] [--nohyperlinks] [--hypertex] [--hyperref]
+ [--literal key=value]
[input-file [output-file]]
-if either the input-file or the output-file is omitted, they default
-to stdin and stdout respectively. If the input file already has a URL
-entry type, then the script objects.
+If either the input-file or the output-file is omitted, they
+default to stdin and stdout respectively. If the input file already
+has a URL entry type, then the script objects.
+By default (in the current version), the output
+includes support for eprint, doi and pubmed, but these can be disabled
+by --noeprint
, --nodoi
and
+--nopubmed
, respectively.
The added fields are:
@@ -93,6 +98,26 @@ hyperlink may be useful to anyone who reads your document online
produced as a result of the appropriate option will still appear in
this mode.
+You may adjust various literal strings, either for the purposes of
+internationalisation, or simply because you prefer different text. To
+do this, give the --literal
option, followed by a
+key=value
pair, for example --literal online="on
+th'intert00bs"
, to replace the default URL:
text.
+The possible values, and their defaults, are below (say
+--literal help
to get this list printed out):
+
+keyword | default | meaning |
+cited | cited | indicator of citation, or "last checked", date |
+doiprefix | doi: | text printed before DOI |
+eprintprefix | arXiv: | text printed before eprint
+ref |
+linktext | [link] | fallback link text |
+pubmedprefix | PMID: | text printed before PUBMED reference |
+online | online | indication that resource is online |
+urlintro | URL: | location of online resource (an
+alternative is "Available from:") |
+
+
The distribution includes preconverted versions of the four
standard BibTeX .bst style files.
@@ -107,7 +132,7 @@ siam.bst, mla.bst
Style files which are known to fail:
-- Currently (v0.5), there exists a style
achicago.bst
+ - Currently (as of at least v0.5), there exists a style
achicago.bst
which seems to fox urlbst
; it turns out that there's a
simpler but almost equivalent style chicago.bst
which
works.
@@ -122,7 +147,12 @@ not designed to produce conventional .bbl
files, and
This might be a good time for me to revisit the rather
convoluted logic within the script, to make it a little more robust in
-the face of variants like these, but don't hold your breath...
+the face of variants like these, but don't hold your breath. The
+logic within the script is pretty hideous (it essentially works by
+spotting patterns in the input style file, and replacing or extending
+bits of BibTeX style-file code. This is a fragile technique, and is
+probably at the limits of its usefulness, therefore I'd take some
+persuading to add significant extra functionality to the script.
The natbib and revtex style files already have URL fields. If you have a
BibTeX style file which you think ought to work, but with which the
@@ -156,9 +186,9 @@ FAQ.
Download the file as a
-tarball
+tarball
or
-zip file
+zip file
and unpack it. Or you can clone the source repository at
bitbucket.org.
@@ -284,6 +314,13 @@ General Public Licence.
+- 0.7,
+- Add --nodoi, --noeprints and --nopubmed options (which defaulted
+on, and couldn't otherwise be turned off)
+
+- 0.7b1, 2011 March 17
+- Allow parameterisation of literal strings, with option
--literal
.
+
- 0.6-5, 2011 March 8
- Adjust support for inline links (should now work for arXiv, DOI and Pubmed)
@@ -367,7 +404,7 @@ documentation added.