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):

    + + + + + + + + + +
    keyworddefaultmeaning
    citedcitedindicator of citation, or "last checked", date
    doiprefixdoi:text printed before DOI
    eprintprefixarXiv:text printed before eprint +ref
    linktext[link]fallback link text
    pubmedprefixPMID:text printed before PUBMED reference
    onlineonlineindication that resource is online
    urlintroURL: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 and installation

    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.

    Version history

    +
    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.
    Norman Gray
    -2011 March 8 +2011 July 20
    diff --git a/Master/texmf-dist/doc/bibtex/urlbst/urlbst.html.in b/Master/texmf-dist/doc/bibtex/urlbst/urlbst.html.in index 8a3de2e4387..68a725cc017 100644 --- a/Master/texmf-dist/doc/bibtex/urlbst/urlbst.html.in +++ b/Master/texmf-dist/doc/bibtex/urlbst/urlbst.html.in @@ -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):

      + + + + + + + + + +
      keyworddefaultmeaning
      citedcitedindicator of citation, or "last checked", date
      doiprefixdoi:text printed before DOI
      eprintprefixarXiv:text printed before eprint +ref
      linktext[link]fallback link text
      pubmedprefixPMID:text printed before PUBMED reference
      onlineonlineindication that resource is online
      urlintroURL: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 @@ -284,6 +314,13 @@ General Public Licence.

      Version history

      +
      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)
      diff --git a/Master/texmf-dist/doc/bibtex/urlbst/urlbst.in b/Master/texmf-dist/doc/bibtex/urlbst/urlbst.in index f212601f96b..460649331ae 100755 --- a/Master/texmf-dist/doc/bibtex/urlbst/urlbst.in +++ b/Master/texmf-dist/doc/bibtex/urlbst/urlbst.in @@ -21,24 +21,28 @@ $infile = '-'; $outfile = '-'; $addeprints = @WITHEPRINTS@; # 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 = '@EPRINTURL@'; $adddoiresolver = @WITHDOIRESOLVER@; -$doiprefix = 'doi:'; +$literals{doiprefix} = 'doi:'; $doiurl = '@DOIURL@'; $addpubmedresolver = @WITHPUBMEDRESOLVER@; -$pubmedprefix = 'PMID:'; +$literals{pubmedprefix} = 'PMID:'; $pubmedurl = '@PUBMEDURL@'; $makehref = @WITHHREF@; -$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 <}} -\date{Version 0.6-5, 2011 March 8} +\date{Version 0.7, 2011 July 20} %\usepackage{times} \usepackage{url} @@ -228,12 +228,16 @@ not appear to materially disagree. ISO-690~\cite{url:iso690} is a formal standard for this stuff. Walker and Taylor's \emph{Columbia Guide to Online Style}~\cite{walker06} provides extensive coverage (but is only available on dead trees). -Emory University's -\emph{Citation Formats}~\cite{emory95} is a compendium of links rather -than a guide itself. The APA has a couple of style guides, a proposed -one~\cite{url:weapas} and a style included in the published APA style -guide~\cite{apastyle} (I'm not sure of the relationship between these -last two). +There are two style guides associated with the APA, namely +the published APA style +guide~\cite{apastyle} (a paper-only publication, so should be +ignored by all, if there's any justice in the world), and what appears +to be the 1998 web-citation proposal for that~\cite{url:weapas}, which +also includes some useful links. +The TeX FAQ~\cite{texfaq} has both practical advice and pointers to other sources.% +\footnote{Emory University's Goizueta Business Library once had a collection of +useful links on this topic, but they've whimsically changed the URL at least twice +since I first distributed \ub, and I've got fed up fixing their broken link.} \section{Hints} diff --git a/Master/texmf-dist/doc/bibtex/urlbst/urlbst.tex.in b/Master/texmf-dist/doc/bibtex/urlbst/urlbst.tex.in index a194ce8a6ce..9ed281023cc 100644 --- a/Master/texmf-dist/doc/bibtex/urlbst/urlbst.tex.in +++ b/Master/texmf-dist/doc/bibtex/urlbst/urlbst.tex.in @@ -228,12 +228,16 @@ not appear to materially disagree. ISO-690~\cite{url:iso690} is a formal standard for this stuff. Walker and Taylor's \emph{Columbia Guide to Online Style}~\cite{walker06} provides extensive coverage (but is only available on dead trees). -Emory University's -\emph{Citation Formats}~\cite{emory95} is a compendium of links rather -than a guide itself. The APA has a couple of style guides, a proposed -one~\cite{url:weapas} and a style included in the published APA style -guide~\cite{apastyle} (I'm not sure of the relationship between these -last two). +There are two style guides associated with the APA, namely +the published APA style +guide~\cite{apastyle} (a paper-only publication, so should be +ignored by all, if there's any justice in the world), and what appears +to be the 1998 web-citation proposal for that~\cite{url:weapas}, which +also includes some useful links. +The TeX FAQ~\cite{texfaq} has both practical advice and pointers to other sources.% +\footnote{Emory University's Goizueta Business Library once had a collection of +useful links on this topic, but they've whimsically changed the URL at least twice +since I first distributed \ub, and I've got fed up fixing their broken link.} \section{Hints} diff --git a/Master/texmf-dist/source/bibtex/urlbst/configure b/Master/texmf-dist/source/bibtex/urlbst/configure index 50363b82685..36a74878231 100755 --- a/Master/texmf-dist/source/bibtex/urlbst/configure +++ b/Master/texmf-dist/source/bibtex/urlbst/configure @@ -1,7 +1,7 @@ #! /bin/sh # From configure.ac Revision. # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for urlbst 0.6-5. +# Generated by GNU Autoconf 2.61 for urlbst 0.7. # # Report bugs to . # @@ -575,8 +575,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='urlbst' PACKAGE_TARNAME='urlbst' -PACKAGE_VERSION='0.6-5' -PACKAGE_STRING='urlbst 0.6-5' +PACKAGE_VERSION='0.7' +PACKAGE_STRING='urlbst 0.7' PACKAGE_BUGREPORT='norman@astro.gla.ac.uk' ac_unique_file="urlbst.in" @@ -1134,7 +1134,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.6-5 to adapt to many kinds of systems. +\`configure' configures urlbst 0.7 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1195,7 +1195,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of urlbst 0.6-5:";; + short | recursive ) echo "Configuration of urlbst 0.7:";; esac cat <<\_ACEOF @@ -1268,7 +1268,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -urlbst configure 0.6-5 +urlbst configure 0.7 generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1282,7 +1282,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.6-5, which was +It was created by urlbst $as_me 0.7, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ @@ -1635,7 +1635,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -RELEASEDATE="2011 March 8" +RELEASEDATE="2011 July 20" @@ -2190,7 +2190,7 @@ exec 6>&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.6-5, which was +This file was extended by urlbst $as_me 0.7, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -2233,7 +2233,7 @@ Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -urlbst config.status 0.6-5 +urlbst config.status 0.7 configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff --git a/Master/texmf-dist/source/bibtex/urlbst/configure.ac b/Master/texmf-dist/source/bibtex/urlbst/configure.ac index 8981ad569cc..acf33c74214 100644 --- a/Master/texmf-dist/source/bibtex/urlbst/configure.ac +++ b/Master/texmf-dist/source/bibtex/urlbst/configure.ac @@ -1,8 +1,8 @@ dnl Process this file with autoconf to produce a configure script AC_REVISION($Revision$) -AC_INIT(urlbst, 0.6-5, norman@astro.gla.ac.uk) -RELEASEDATE="2011 March 8" +AC_INIT(urlbst, 0.7, norman@astro.gla.ac.uk) +RELEASEDATE="2011 July 20" AC_SUBST(RELEASEDATE) AC_PREREQ(2.50) -- cgit v1.2.3