summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/bibtex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-02-09 22:06:29 +0000
committerKarl Berry <karl@freefriends.org>2020-02-09 22:06:29 +0000
commit9f330a618669009499851c3f36f444df2e210821 (patch)
treef5d9e1e728b9f48585ed622c6448051edf497a0d /Master/texmf-dist/bibtex
parentc2d1d0a46a7c770a1dbae52c6cea8c7108510649 (diff)
acmart (9feb20)
git-svn-id: svn://tug.org/texlive/trunk@53734 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/bibtex')
-rw-r--r--Master/texmf-dist/bibtex/bst/acmart/ACM-Reference-Format.bst42
1 files changed, 40 insertions, 2 deletions
diff --git a/Master/texmf-dist/bibtex/bst/acmart/ACM-Reference-Format.bst b/Master/texmf-dist/bibtex/bst/acmart/ACM-Reference-Format.bst
index fa5273282a1..8b97b188124 100644
--- a/Master/texmf-dist/bibtex/bst/acmart/ACM-Reference-Format.bst
+++ b/Master/texmf-dist/bibtex/bst/acmart/ACM-Reference-Format.bst
@@ -426,6 +426,44 @@ FUNCTION { output.coden } % UTAH
if$
}
+%
+% Sometimes articleno starts with the word 'Article' or 'Paper.
+% (this is a bug of acmdl, sigh)
+% We strip them. We assume eid or articleno is already on stack
+%
+
+FUNCTION { strip.articleno.or.eid }
+{
+ 't :=
+ t #1 #7 substring$ "Article" =
+ {t #8 t text.length$ substring$ 't :=}
+ { }
+ if$
+ t #1 #7 substring$ "article" =
+ {t #8 t text.length$ substring$ 't :=}
+ { }
+ if$
+ t #1 #5 substring$ "Paper" =
+ {t #6 t text.length$ substring$ 't :=}
+ { }
+ if$
+ t #1 #5 substring$ "paper" =
+ {t #6 t text.length$ substring$ 't :=}
+ { }
+ if$
+ % Strip any left trailing space or ~
+ t #1 #1 substring$ " " =
+ {t #2 t text.length$ substring$ 't :=}
+ { }
+ if$
+ t #1 #1 substring$ "~" =
+ {t #2 t text.length$ substring$ 't :=}
+ { }
+ if$
+ t
+}
+
+
FUNCTION { format.articleno }
{
articleno empty.or.unknown not eid empty.or.unknown not and
@@ -441,8 +479,8 @@ FUNCTION { format.articleno }
{ }
if$
eid empty.or.unknown
- { "Article \bibinfo{articleno}{" articleno * "}" * }
- { "Article \bibinfo{articleno}{" eid * "}" * }
+ { "Article \bibinfo{articleno}{" articleno strip.articleno.or.eid * "}" * }
+ { "Article \bibinfo{articleno}{" eid strip.articleno.or.eid * "}" * }
if$
}
if$