Skip to content

Commit

Permalink
ACM-Reference-Format.bst, ACM-Reference-Format-abbrv.bst: Update to 1…
Browse files Browse the repository at this point in the history
….89a
  • Loading branch information
MLopez-Ibanez committed Nov 22, 2024
1 parent 579b764 commit 4ae6a42
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 18 deletions.
37 changes: 27 additions & 10 deletions bibstyles/ACM-Reference-Format-abbrv.bst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
%%% @BibTeX-style-file{
%%% author = "Nelson H. F. Beebe, Boris Veytsman and Gerald Murray",
%%% version = "2.1",
%%% acmart-version = "1.79",
%%% date = "14 June 2017",
%%% acmart-version = "1.89a",
%%% date = "Mar 26 2023",
%%% filename = "ACM-Reference-Format.bst",
%%% email = "borisv@lk.net, boris@varphi.com",
%%% codetable = "ISO/ASCII",
Expand Down Expand Up @@ -64,6 +64,7 @@ ENTRY
isbn-13 % UTAH
issn % UTAH
lccn % UTAH
distinctURL % whether to print url if doi is present
}
{}
{ label.year extra.label sort.year sort.label basic.label.year}
Expand Down Expand Up @@ -150,6 +151,16 @@ FUNCTION { empty.or.unknown }
if$
}
FUNCTION { empty.or.zero }
{
%% Examine the top entry and push 1 if it is empty, or is zero
duplicate$ empty$
{ pop$ #1 }
{ "0" = }
if$
}
FUNCTION { writeln }
{
%% In BibTeX style files, the sequences
Expand Down Expand Up @@ -737,10 +748,14 @@ FUNCTION { output.eprint } %
% Changes by BV 2011/04/15. Do not output
% url if doi is defined
%
%
% Changes by BV 2021/11/26. Output url even if doi is defined
% if distinctURL is not zero.
%
FUNCTION { output.url } % UTAH
{ % return with stack untouched
% output URL and associated lastaccessed fields
doi empty.or.unknown
doi empty.or.unknown distinctURL empty.or.zero not or
{
url empty.or.unknown
{ }
Expand Down Expand Up @@ -1037,8 +1052,8 @@ FUNCTION { format.names }
{ nameptr #1 =
%NO: BAD ORDER: {"{" s nameptr "{ff~}{ll}{, jj}{, vv}" format.name$ * "}" * 't := }
%NO: BAD ORDER: {"{" s nameptr "{ff~}{ll}{, jj}{, vv}" format.name$ * "}" * 't := }
{"\bibinfo{person}{" s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ * "}" * 't := }
{"\bibinfo{person}{" s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ * "}" * 't := }
{"\bibinfo{person}{" s nameptr "{f.~}{vv }{ll}{, jj}" format.name$ * "}" * 't := }
{"\bibinfo{person}{" s nameptr "{f.~}{vv }{ll}{, jj}" format.name$ * "}" * 't := }
if$
nameptr #1 >
{
Expand Down Expand Up @@ -2014,7 +2029,7 @@ FUNCTION { calc.basic.label }
if$
duplicate$
year empty.or.unknown
{ "[n.\,d.]" }
{ "{[n.\,d.]}" }
{ year field.or.null purify$ #-1 #4 substring$}
if$
*
Expand Down Expand Up @@ -2062,7 +2077,7 @@ FUNCTION { calc.label }
% save the year for sort processing afterwards (adding a, b, c, etc.)
%
year empty.or.unknown
{ "[n.\,d.]" }
{ "{[n.\,d.]}" }
{ year field.or.null purify$ #-1 #4 substring$}
if$
'label.year :=
Expand All @@ -2072,10 +2087,12 @@ FUNCTION { calc.label }
FUNCTION { output.bibitem }
{
newline$
"\bibitem[\protect\citeauthoryear{" write$
calc.label write$
"\bibitem[" write$
calc.basic.label write$
"(" write$
sort.year write$
"}]%" writeln
")" write$
"]%" writeln
" {" write$
cite$ write$
"}" writeln
Expand Down
33 changes: 25 additions & 8 deletions bibstyles/ACM-Reference-Format.bst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
%%% @BibTeX-style-file{
%%% author = "Nelson H. F. Beebe, Boris Veytsman and Gerald Murray",
%%% version = "2.1",
%%% acmart-version = "1.79",
%%% date = "14 June 2017",
%%% acmart-version = "1.89a",
%%% date = "Mar 26 2023",
%%% filename = "ACM-Reference-Format.bst",
%%% email = "borisv@lk.net, boris@varphi.com",
%%% codetable = "ISO/ASCII",
Expand Down Expand Up @@ -64,6 +64,7 @@ ENTRY
isbn-13 % UTAH
issn % UTAH
lccn % UTAH
distinctURL % whether to print url if doi is present
}
{}
{ label.year extra.label sort.year sort.label basic.label.year}
Expand Down Expand Up @@ -150,6 +151,16 @@ FUNCTION { empty.or.unknown }
if$
}
FUNCTION { empty.or.zero }
{
%% Examine the top entry and push 1 if it is empty, or is zero
duplicate$ empty$
{ pop$ #1 }
{ "0" = }
if$
}
FUNCTION { writeln }
{
%% In BibTeX style files, the sequences
Expand Down Expand Up @@ -737,10 +748,14 @@ FUNCTION { output.eprint } %
% Changes by BV 2011/04/15. Do not output
% url if doi is defined
%
%
% Changes by BV 2021/11/26. Output url even if doi is defined
% if distinctURL is not zero.
%
FUNCTION { output.url } % UTAH
{ % return with stack untouched
% output URL and associated lastaccessed fields
doi empty.or.unknown
doi empty.or.unknown distinctURL empty.or.zero not or
{
url empty.or.unknown
{ }
Expand Down Expand Up @@ -1990,7 +2005,7 @@ FUNCTION { calc.basic.label }
if$
duplicate$
year empty.or.unknown
{ "[n.\,d.]" }
{ "{[n.\,d.]}" }
{ year field.or.null purify$ #-1 #4 substring$}
if$
*
Expand Down Expand Up @@ -2038,7 +2053,7 @@ FUNCTION { calc.label }
% save the year for sort processing afterwards (adding a, b, c, etc.)
%
year empty.or.unknown
{ "[n.\,d.]" }
{ "{[n.\,d.]}" }
{ year field.or.null purify$ #-1 #4 substring$}
if$
'label.year :=
Expand All @@ -2048,10 +2063,12 @@ FUNCTION { calc.label }
FUNCTION { output.bibitem }
{
newline$
"\bibitem[\protect\citeauthoryear{" write$
calc.label write$
"\bibitem[" write$
calc.basic.label write$
"(" write$
sort.year write$
"}]%" writeln
")" write$
"]%" writeln
" {" write$
cite$ write$
"}" writeln
Expand Down

0 comments on commit 4ae6a42

Please sign in to comment.