summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/bibtex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-10-29 20:14:35 +0000
committerKarl Berry <karl@freefriends.org>2023-10-29 20:14:35 +0000
commitbef70b5dd24c17e6df95e9c1fc5c1fc408f1fbe3 (patch)
tree455c65d57031242eda08d86b8b637ef582fa88b7 /Master/texmf-dist/bibtex
parent07f9bc8e4e0c5be75287499f4f1f08025ca54d0c (diff)
tugboat (29oct23)
git-svn-id: svn://tug.org/texlive/trunk@68694 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/bibtex')
-rw-r--r--Master/texmf-dist/bibtex/bst/tugboat/tugboat.bst160
1 files changed, 121 insertions, 39 deletions
diff --git a/Master/texmf-dist/bibtex/bst/tugboat/tugboat.bst b/Master/texmf-dist/bibtex/bst/tugboat/tugboat.bst
index 403256d1a41..0c507119b7d 100644
--- a/Master/texmf-dist/bibtex/bst/tugboat/tugboat.bst
+++ b/Master/texmf-dist/bibtex/bst/tugboat/tugboat.bst
@@ -1,34 +1,38 @@
-%%% $Id: tugboat.bst 487 2023-06-22 22:39:59Z karl $
+%%% $Id: tugboat.bst 529 2023-10-27 16:32:42Z karl $
%%% TUGboat changes are public domain.
%%%
%%% Modified for TUGboat from abbrvurl.bst:
%%% New entry types: @ctan (see ctanbib);
%%% @online and @software (aliases for @misc).
%%% For @misc, the editor field is accepted along with author.
+%%% For @misc, the organization field is output.
%%% New field bookauthor for @incollection and @inproceedings.
%%% Abbreviate "page(s)" to "p(p).",
%%% "volume" to "vol.",
%%% "editor(s)" to "ed(s).",
%%% "edition" to "ed.".
%%% Output "Ph.D." rather than "PhD".
-%%% Output "No." and "no." for number field.
-%%% Omit spaces between author initials, like "A.B. Smith".
+%%% In number field, output "No." and "no.".
+%%% In month field, output numbers 01..12 as our preferred abbreviations.
+%%% Omit spaces between author initials, as in "A.B. Smith".
%%% Set urlintro="" and onlinestring="" to omit labels from output.
%%% Use \url instead of \href, so we don't require hyperref.
%%% Always use https://doi.org/ for the doi url; omit "doi:" from output.
%%% If doi or howpublished is present, omit url, since in practice
%%% they are usually all the same thing. Should check if
-%%% howpublished is in fact a url, though.
+%%% howpublished is in fact a url, but we currently don't.
%%% Truncate long author lists in format.names (max.names, trunc.num);
%%% omit "and" from author lists, per Oren P.
%%% Use \emph instead of \em so we get automatic italic corrections.
%%% New fields for editors:
%%% "journaltie" - ~ instead of space after journal name.
-%%% "newpage" - force page break after entry;
+%%% "monthtie" - ~ instead of space after month name.
+%%% "newpage" - force page break after entry.
%%% "nowarning" - if set, omit empty field warnings from output.check.
+%%% "pagesnodashify" - if set, don't convert - to -- in pages field.
%%% "prebibitem" - material output before \bibitem, with newline appended
%%% (for example, section headings).
-%%% "urlnewline" - force line break before url or doi value;
+%%% "urlnewline" - force line break before url or doi value.
%%% --karl, originally created 24jul18.
%%%
%%% Modification of BibTeX style file /usr/local/texlive/2009/texmf-dist/bibtex/bst/base/abbrv.bst
@@ -84,12 +88,13 @@ ENTRY
urldate % ctan
version % ctan
%
- journaltie % tub
- monthtie % tub
- newpage % tub
- nowarning % tub
- prebibitem % tub
- urlnewline % tub
+ journaltie % tub
+ monthtie % tub
+ newpage % tub
+ nowarning % tub
+ pagesnodashify % tub
+ prebibitem % tub
+ urlnewline % tub
}
{}
{ label }
@@ -109,22 +114,22 @@ 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 'addeprints := % 0=no eprints; 1=include eprints
+ #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
% String constants, which you _might_ want to tweak.
- "" 'urlintro := % prefix before URL; typically "Available from:" or "URL":
+ "" 'urlintro := % prefix before URL; typically "Available from:" or "URL":
"" '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:"
+ "cited " 'citedstring := % indicator of citation date; typically "cited "
+ "[links]" 'linktextstring := % dummy link text; typically "[link]"
+ "https://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
- "" 'doiprefix := % text prefix printed before DOI ref; typically "doi:"
- "http://www.ncbi.nlm.nih.gov/pubmed/" 'pubmedurl := % prefix to make URL from PUBMED
+ "" 'doiprefix := % text prefix printed before DOI ref; typically "doi:"
+ "https://www.ncbi.nlm.nih.gov/pubmed/" 'pubmedurl := % prefix to make URL from PUBMED
"PMID:" 'pubmedprefix := % text prefix printed before PUBMED ref; typically "PMID:"
% The following are internal state variables, not configuration constants,
@@ -178,8 +183,9 @@ STRINGS { s t last.output.check }
% urlbst
% arg on stack is what needs to be written.
%
-% If a journal, we want to omit the following comma, as in
-% "TUGboat 39(1)" instead of the default "TUGboat, 39(1)".
+% If journal is "TUGboat" or "\TUB", we want to omit the following
+% comma, as in "TUGboat 39(1)" instead of the default "TUGboat, 39(1)".
+% But for all other journals, we want the comma.
%
% Furthermore, if field journaltie is non-empty, output a tie after the
% journal name instad of a space.
@@ -188,10 +194,14 @@ FUNCTION {output.nonnull.original}
{ 's :=
output.state mid.sentence =
{ last.output.check "journal" = not
- { ", " * }
- { journaltie empty$ not
- { "~" }
+ { ", " * } % not a journal, normal comma+space separator
+ { journal "TUGboat" = journal "\TUB" = or
+ { skip$ } % TUGboat, no comma
+ { "," * } % not TUGboat, want comma
+ if$
+ journaltie empty$
{ " " }
+ { "~" }
if$
*
}
@@ -574,29 +584,100 @@ FUNCTION {format.title}
if$
}
+% Return argument with - replaced by -- (unless already --),
+% unless pagesnodashify is set, in which case do nothing.
+%
+% We use pagesnodashify when an article has a reference to another article
+% in the same issue, in which case we use (from tb137kopp-microtemplates):
+% pages = "{\thisissuepageref{beeton-basic}}",
+% and that - clearly should not become --. Although we can work around
+% it by using a macro instead of a literal -, that's ugly.
+%
FUNCTION {n.dashify}
{ 't :=
- ""
- { t empty$ not }
- { t #1 #1 substring$ "-" =
- { t #1 #2 substring$ "--" = not
- { "--" *
- t #2 global.max$ substring$ 't :=
- }
- { { t #1 #1 substring$ "-" = }
- { "-" *
+ pagesnodashify empty$
+ {
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
t #2 global.max$ substring$ 't :=
}
- while$
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
}
if$
}
- { t #1 #1 substring$ *
- t #2 global.max$ substring$ 't :=
+ while$
+ }
+ {
+ t
+ }
+ if$
+}
+
+% tub: assume month is nonempty. If numeric (biblatex), output
+% our preferred month abbreviation; else output as-is.
+% There is no way to reuse the macro definitions previously made here,
+% so just write them out again.
+FUNCTION {format.month}
+{ month "01" = month "1" = or
+ { "Jan." }
+ { month "02" = month "2" = or
+ { "Feb." }
+ { month "03" = month "3" = or
+ { "Mar." }
+ { month "03" = month "4" = or
+ { "Apr." }
+ { month "05" = month "5" = or
+ { "May" }
+ { month "06" = month "6" = or
+ { "June" }
+ { month "07" = month "7" = or
+ { "July" }
+ { month "08" = month "8" = or
+ { "Aug." }
+ { month "09" = month "9" = or
+ { "Sept." }
+ { month "10" =
+ { "Oct." }
+ { month "11" =
+ { "Nov." }
+ { month "12" =
+ { "Dec." }
+ { month }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
}
if$
}
- while$
+ if$
}
FUNCTION {format.date}
@@ -610,7 +691,7 @@ FUNCTION {format.date}
}
{ month empty$
'year
- { month
+ { format.month
monthtie empty$ not
{ "~" }
{ " " }
@@ -1398,6 +1479,7 @@ FUNCTION {misc}
howpublished output
format.date output
new.block
+ organization output
note output
fin.entry
empty.misc.check