@@ -47,7 +47,6 @@ INTEGERS {
4747 show.urldate
4848 show.url
4949 show.doi
50- show.preprint
5150 show.note
5251 show.english.translation
5352 end.with.period
@@ -94,7 +93,6 @@ FUNCTION {load.config}
9493 #1 'show.urldate :=
9594 #0 'show.url :=
9695 #0 'show.doi :=
97- #1 'show.preprint :=
9896 #0 'show.note :=
9997 #0 'show.english.translation :=
10098 #1 'end.with.period :=
@@ -1692,7 +1690,40 @@ FUNCTION {get.journal.title}
16921690}
16931691
16941692FUNCTION {check.arxiv.preprint }
1695- { #1 #5 substring$ purify$ "l" change.case$ "arxiv" =
1693+ { "l" change.case$
1694+ duplicate$
1695+ "arxiv:" 'y :=
1696+ 'x :=
1697+ y text.length$ 'len :=
1698+ x text.length$ len - #1 + 'charptr :=
1699+ { charptr #0 >
1700+ x charptr len substring$ y = not
1701+ and
1702+ }
1703+ { charptr #1 - 'charptr := }
1704+ while$
1705+ charptr #0 >
1706+ { x charptr #6 + global.max$ substring$ 'x :=
1707+ x text.length$ #1 + 'len :=
1708+ #1 'charptr :=
1709+ { charptr len <
1710+ x charptr #1 substring$ " " = not and
1711+ x charptr #1 substring$ "[" = not and
1712+ }
1713+ { charptr #1 + 'charptr := }
1714+ while$
1715+ x #1 charptr substring$
1716+ duplicate$ empty$
1717+ { pop$ }
1718+ { "https://arxiv.org/abs/" swap$ * 'entry.url :=
1719+ #1 'entry.is.electronic :=
1720+ #1 'is.pure.electronic :=
1721+ }
1722+ if$
1723+ }
1724+ 'skip$
1725+ if$
1726+ purify$ #1 #5 substring$ "arxiv" =
16961727 { #1 }
16971728 { #0 }
16981729 if$
@@ -2245,35 +2276,18 @@ FUNCTION {check.electronic}
22452276 if$
22462277}
22472278
2248- FUNCTION {format.eprint }
2279+ FUNCTION {format.eprinttype }
22492280{ archivePrefix empty$ not
22502281 { archivePrefix }
22512282 { eprinttype empty$ not
2252- { archivePrefix }
2253- { "" }
2254- if$
2255- }
2256- if$
2257- 's :=
2258- s empty$ not
2259- { s ": \eprint{" *
2260- url empty$ not
2261- { url }
2262- { "https://" s "l" change.case$ * ".org/abs/" * eprint * }
2283+ { eprinttype }
2284+ { type$ "article" = get.journal.title check.arxiv.preprint and
2285+ { "arXiv" }
2286+ { "" }
2287+ if$
2288+ }
22632289 if$
2264- * "}{" *
2265- eprint * "}" *
22662290 }
2267- { eprint }
2268- if$
2269- }
2270-
2271- FUNCTION {output.eprint }
2272- { show.preprint eprint empty$ not and
2273- { new.block
2274- format.eprint output
2275- }
2276- 'skip$
22772291 if$
22782292}
22792293
@@ -2587,27 +2601,21 @@ FUNCTION {preprint}
25872601 }
25882602 'skip$
25892603 if$
2590- format.translators output
2591- new.sentence
25922604 format.edition output
25932605 new.block
2594- year.after.author not
2595- { date empty$
2596- { format.date output }
2597- 'skip$
2606+ format.eprinttype output
2607+ date empty$ not
2608+ { "(" date * ")" * }
2609+ { year empty$ not
2610+ { "(" year * ")" * }
2611+ { "" }
25982612 if$
25992613 }
2600- 'skip$
26012614 if$
2602- format.pages bbl.pages.colon output.after
2603- format.editdate "" output.after
2615+ " " output.after
26042616 format.urldate "" output.after
2605- output.eprint
26062617 output.url
2607- show.preprint not eprint empty$ or
2608- 'output.doi
2609- 'skip$
2610- if$
2618+ output.doi
26112619 new.block
26122620 format.note output
26132621 fin.entry
@@ -2712,6 +2720,8 @@ FUNCTION {online}
27122720
27132721FUNCTION {phdthesis } { mastersthesis }
27142722
2723+ FUNCTION {thesis } { mastersthesis }
2724+
27152725FUNCTION {proceedings }
27162726{ "C" set.entry.mark
27172727 monograph
0 commit comments