summaryrefslogtreecommitdiff
path: root/biblio/bibtex/contrib/urlbst/alphaurl.bst
diff options
context:
space:
mode:
Diffstat (limited to 'biblio/bibtex/contrib/urlbst/alphaurl.bst')
-rw-r--r--biblio/bibtex/contrib/urlbst/alphaurl.bst79
1 files changed, 42 insertions, 37 deletions
diff --git a/biblio/bibtex/contrib/urlbst/alphaurl.bst b/biblio/bibtex/contrib/urlbst/alphaurl.bst
index d8907b9708..e4fc0af4eb 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/2019/texmf-dist/bibtex/bst/base/alpha.bst
-%%% ... by urlbst, version 0.8 (marked with "% urlbst")
-%%% See <http://purl.org/nxg/dist/urlbst>
-%%% Modifications Copyright 2002-03, 2005-12, 2014, 2019, Norman Gray,
+%%% Modification of BibTeX style file /usr/local/texlive/2022/texmf-dist/bibtex/bst/base/alpha.bst
+%%% ... by urlbst, version 0.9 (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,
%%% and distributed under the terms of the LPPL; see README for discussion.
%%%
%%% Added webpage entry type, and url and lastchecked fields.
@@ -61,30 +61,31 @@ STRINGS { urlintro
eprinturl eprintprefix doiprefix doiurl pubmedprefix pubmedurl
citedstring onlinestring linktextstring
openinlinelink closeinlinelink }
-INTEGERS { hrefform inlinelinks makeinlinelink
- addeprints adddoiresolver addpubmedresolver }
+INTEGERS { hrefform doiform inlinelinks makeinlinelink
+ addeprints adddoi addpubmed }
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 'adddoiresolver := % 0=no DOI resolver; 1=include it
- #1 'addpubmedresolver := % 0=no PUBMED resolver; 1=include it
- #2 'hrefform := % 0=no crossrefs; 1=hypertex xrefs; 2=hyperref refs
- #0 'inlinelinks := % 0=URLs explicit; 1=URLs attached to titles
+ #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 'adddoi := % 0=no DOI resolver; 1=include it
+ #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.
- "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; typically "arXiv:"
- "https://doi.org/" 'doiurl := % prefix to make URL from DOI
- "doi:" 'doiprefix := % text prefix printed before DOI ref; typically "doi:"
- "http://www.ncbi.nlm.nih.gov/pubmed/" 'pubmedurl := % prefix to make URL from PUBMED
- "PMID:" 'pubmedprefix := % text prefix printed before PUBMED ref; typically "PMID:"
+ "cited " 'citedstring := % label in "lastchecked" remark
+ "URL: " 'urlintro := % text prefix before URL
+ "[link]" 'linktextstring := % anonymous link text
+ "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
+ "https://arxiv.org/abs/" 'eprinturl := % prefix to make URL from eprint ref
+ "doi:" 'doiprefix := % printed text to introduce DOI
+ "https://doi.org/" 'doiurl := % prefix to make URL from DOI
% The following are internal state variables, not configuration constants,
% so they shouldn't be fiddled with.
@@ -92,7 +93,7 @@ FUNCTION {init.urlbst.variables}
"" 'openinlinelink := % ditto
"" 'closeinlinelink := % ditto
}
-INTEGERS {
+INTEGERS {
bracket.state
outside.brackets
open.brackets
@@ -152,8 +153,8 @@ FUNCTION {uand}
{ 'skip$ { pop$ #0 } if$ } % 'and' (which isn't defined at this point in the file)
FUNCTION {possibly.setup.inlinelink}
{ makeinlinelink hrefform #0 > uand
- { doi empty$ adddoiresolver uand
- { pubmed empty$ addpubmedresolver uand
+ { doi empty$ adddoi uand
+ { pubmed empty$ addpubmed uand
{ eprint empty$ addeprints uand
{ url empty$
{ "" }
@@ -213,14 +214,14 @@ FUNCTION {output.nonnull}
bracket.state open.brackets =
{ " [" * }
{ ", " * } % bracket.state will be within.brackets
- if$
- s *
+ if$
+ s *
close.brackets 'bracket.state :=
}
if$
}
-% Call this function just before adding something which should be presented in
+% Call this function just before adding something which should be presented in
% brackets. bracket.state is handled specially within output.nonnull.
FUNCTION {inbrackets}
{ bracket.state close.brackets =
@@ -718,14 +719,14 @@ FUNCTION {make.href.null}
}
% make hypertex specials
FUNCTION {make.href.hypertex}
-{
+{
"\special {html:<a href=" quote$ *
swap$ * quote$ * "> }" * swap$ *
"\special {html:</a>}" *
}
% make hyperref specials
FUNCTION {make.href.hyperref}
-{
+{
"\href {" swap$ * "} {\path{" * swap$ * "}}" *
}
FUNCTION {make.href}
@@ -762,7 +763,11 @@ FUNCTION {format.eprint}
FUNCTION {format.doi}
{ doi empty$
{ "" }
- { doiprefix doi * doiurl doi * make.href }
+ { doiform #1 =
+ { "\doi{" doi * "}" * }
+ { doiprefix doi * doiurl doi * make.href }
+ if$
+ }
if$
}
@@ -780,10 +785,10 @@ FUNCTION {format.pubmed}
% the URL and the lastchecked in brackets.
FUNCTION {output.url}
{ url empty$
- 'skip$
- { new.block
+ 'skip$
+ { new.block
format.url output
- format.lastchecked output
+ format.lastchecked output
}
if$
}
@@ -796,7 +801,7 @@ FUNCTION {output.web.refs}
{ % If the generated DOI will be the same as the URL,
% then don't print the URL (thanks to Joseph Wright for this code,
% at http://tex.stackexchange.com/questions/5660)
- adddoiresolver
+ adddoi
doiurl doi empty$ { "X" } { doi } if$ * % DOI URL to be generated
url empty$ { "Y" } { url } if$ % the URL, or "Y" if empty
= % are the strings equal?
@@ -808,11 +813,11 @@ FUNCTION {output.web.refs}
{ format.eprint output.nonnull }
'skip$
if$
- adddoiresolver doi empty$ not and
+ adddoi doi empty$ not and
{ format.doi output.nonnull }
'skip$
if$
- addpubmedresolver pubmed empty$ not and
+ addpubmed pubmed empty$ not and
{ format.pubmed output.nonnull }
'skip$
if$
@@ -850,7 +855,7 @@ FUNCTION {fin.entry}
% Webpage entry type.
% Title and url fields required;
% author, note, year, month, and lastchecked fields optional
-% See references
+% See references
% ISO 690-2 http://www.nlc-bnc.ca/iso/tc46sc9/standard/690-2e.htm
% http://www.classroom.net/classroom/CitingNetResources.html
% http://neal.ctstateu.edu/history/cite.html