8
8
%% -------------------------------------------------------------------
9
9
%% GB/T 7714 BibTeX Style
10
10
%% https://github.com/zepinglee/gbt7714-bibtex-style
11
- %% Version: 2022 /03/21 v2.1.4
11
+ %% Version: 2024 /03/08 v2.1.6
12
12
%% -------------------------------------------------------------------
13
- %% Copyright (C) 2016--2022 by Zeping Lee <zepinglee AT gmail.com>
13
+ %% Copyright (C) 2016--2024 by Zeping Lee <zepinglee AT gmail.com>
14
14
%% -------------------------------------------------------------------
15
15
%% This file may be distributed and/or modified under the
16
16
%% conditions of the LaTeX Project Public License, either version 1.3c
@@ -39,6 +39,7 @@ INTEGERS {
39
39
show.medium.type
40
40
short.journal
41
41
italic.journal
42
+ link.journal
42
43
bold.journal.volume
43
44
show.missing.address.publisher
44
45
space.before.pages
@@ -83,6 +84,7 @@ FUNCTION {load.config}
83
84
"slash" 'component.part.label :=
84
85
#0 'short.journal :=
85
86
#0 'italic.journal :=
87
+ #0 'link.journal :=
86
88
#0 'bold.journal.volume :=
87
89
#0 'show.missing.address.publisher :=
88
90
#1 'space.before.pages :=
@@ -745,7 +747,7 @@ FUNCTION {editor.full}
745
747
746
748
FUNCTION {make.full.names }
747
749
{ type$ "book" =
748
- type$ "inbook" =
750
+ type$ "inbook" = booktitle empty$ not and
749
751
or
750
752
'author.editor.full
751
753
{ type$ "collection" =
@@ -887,7 +889,7 @@ FUNCTION {format.volume}
887
889
{ volume is.number
888
890
{ entry.lang lang.zh =
889
891
{ "第 " volume * " 卷" * }
890
- { "volume " volume tie.or.space.connect }
892
+ { "Vol. " volume tie.or.space.connect }
891
893
if$
892
894
}
893
895
{ volume }
@@ -902,7 +904,7 @@ FUNCTION {format.number}
902
904
{ number is.number
903
905
{ entry.lang lang.zh =
904
906
{ "第 " number * " 册" * }
905
- { "number " number tie.or.space.connect }
907
+ { "No. " number tie.or.space.connect }
906
908
if$
907
909
}
908
910
{ number }
@@ -1067,7 +1069,7 @@ FUNCTION {get.journal.title}
1067
1069
}
1068
1070
1069
1071
FUNCTION {check.arxiv.preprint }
1070
- { #1 #5 substring$ "l" change.case$ "arxiv" =
1072
+ { #1 #5 substring$ purify$ "l" change.case$ "arxiv" =
1071
1073
{ #1 }
1072
1074
{ #0 }
1073
1075
if$
@@ -1080,6 +1082,10 @@ FUNCTION {format.journal}
1080
1082
'emphasize
1081
1083
'skip$
1082
1084
if$
1085
+ link.journal
1086
+ 'add.link
1087
+ 'skip$
1088
+ if$
1083
1089
}
1084
1090
'skip$
1085
1091
if$
@@ -1308,7 +1314,7 @@ FUNCTION {extract.after.slash}
1308
1314
1309
1315
FUNCTION {format.year }
1310
1316
{ year empty$ not
1311
- { year extract.before.slash extra.label * }
1317
+ { year extra.label * }
1312
1318
{ date empty$ not
1313
1319
{ date extract.before.dash extra.label * }
1314
1320
{ entry.is.electronic not
@@ -1488,7 +1494,7 @@ FUNCTION {format.periodical.year.volume.number}
1488
1494
1489
1495
FUNCTION {check.url }
1490
1496
{ url empty$ not
1491
- { "\ url{" url * "}" * 'entry.url :=
1497
+ { url 'entry.url :=
1492
1498
#1 'entry.is.electronic :=
1493
1499
}
1494
1500
{ howpublished empty$ not
@@ -1519,7 +1525,11 @@ FUNCTION {output.url}
1519
1525
{ show.url is.pure.electronic or
1520
1526
entry.url empty$ not and
1521
1527
{ new.block
1522
- entry.url output
1528
+ entry.url #1 #5 substring$ "\url{" =
1529
+ { entry.url }
1530
+ { "\url{" entry.url * "}" * }
1531
+ if$
1532
+ output
1523
1533
}
1524
1534
'skip$
1525
1535
if$
@@ -1539,8 +1549,8 @@ FUNCTION {is.in.url}
1539
1549
{ entry.url empty$
1540
1550
{ #0 }
1541
1551
{ s text.length$ 'len :=
1542
- entry.url text.length$ 'charptr :=
1543
- { entry.url charptr len substring$ s = not
1552
+ entry.url "l" change.case$ text.length$ 'charptr :=
1553
+ { entry.url "l" change.case$ charptr len substring$ s "l" change.case$ = not
1544
1554
charptr #0 >
1545
1555
and
1546
1556
}
@@ -1976,6 +1986,10 @@ FUNCTION {preprint}
1976
1986
format.urldate "" output.after
1977
1987
output.eprint
1978
1988
output.url
1989
+ show.preprint not eprint empty$ or
1990
+ 'output.doi
1991
+ 'skip$
1992
+ if$
1979
1993
new.block
1980
1994
format.note output
1981
1995
fin.entry
@@ -2040,7 +2054,12 @@ FUNCTION {dataset}
2040
2054
electronic
2041
2055
}
2042
2056
2043
- FUNCTION {inbook } { book }
2057
+ FUNCTION {inbook } {
2058
+ booktitle empty$
2059
+ 'book
2060
+ 'incollection
2061
+ if$
2062
+ }
2044
2063
2045
2064
FUNCTION {inproceedings }
2046
2065
{ "C" set.entry.mark
@@ -2281,7 +2300,7 @@ FUNCTION {editor.key.organization.label}
2281
2300
FUNCTION {calc.short.authors }
2282
2301
{ "" 'short.label :=
2283
2302
type$ "book" =
2284
- type$ "inbook" =
2303
+ type$ "inbook" = booktitle empty$ not and
2285
2304
or
2286
2305
'author.editor.key.label
2287
2306
{ type$ "collection" =
@@ -2483,7 +2502,7 @@ FUNCTION {presort}
2483
2502
" "
2484
2503
*
2485
2504
type$ "book" =
2486
- type$ "inbook" =
2505
+ type$ "inbook" = booktitle empty$ not and
2487
2506
or
2488
2507
'author.editor.sort
2489
2508
{ type$ "collection" =
0 commit comments