texlive[74594] Master/texmf-dist: gbt7714 (12mar25)
commits+karl at tug.org
commits+karl at tug.org
Wed Mar 12 20:35:03 CET 2025
Revision: 74594
https://tug.org/svn/texlive?view=revision&revision=74594
Author: karl
Date: 2025-03-12 20:35:03 +0100 (Wed, 12 Mar 2025)
Log Message:
-----------
gbt7714 (12mar25)
Modified Paths:
--------------
trunk/Master/texmf-dist/bibtex/bst/gbt7714/gbt7714-2005-author-year.bst
trunk/Master/texmf-dist/bibtex/bst/gbt7714/gbt7714-2005-numerical.bst
trunk/Master/texmf-dist/bibtex/bst/gbt7714/gbt7714-author-year.bst
trunk/Master/texmf-dist/bibtex/bst/gbt7714/gbt7714-numerical.bst
trunk/Master/texmf-dist/doc/bibtex/gbt7714/CHANGELOG.md
trunk/Master/texmf-dist/doc/bibtex/gbt7714/README.md
trunk/Master/texmf-dist/doc/bibtex/gbt7714/gbt7714.pdf
trunk/Master/texmf-dist/source/bibtex/gbt7714/gbt7714.dtx
trunk/Master/texmf-dist/source/bibtex/gbt7714/gbt7714.ins
trunk/Master/texmf-dist/tex/latex/gbt7714/gbt7714.sty
Modified: trunk/Master/texmf-dist/bibtex/bst/gbt7714/gbt7714-2005-author-year.bst
===================================================================
--- trunk/Master/texmf-dist/bibtex/bst/gbt7714/gbt7714-2005-author-year.bst 2025-03-12 19:34:53 UTC (rev 74593)
+++ trunk/Master/texmf-dist/bibtex/bst/gbt7714/gbt7714-2005-author-year.bst 2025-03-12 19:35:03 UTC (rev 74594)
@@ -8,9 +8,9 @@
%% -------------------------------------------------------------------
%% GB/T 7714 BibTeX Style
%% https://github.com/zepinglee/gbt7714-bibtex-style
-%% Version: 2022/10/03 v2.1.5
+%% Version: 2025/03/11 v2.1.7
%% -------------------------------------------------------------------
-%% Copyright (C) 2016--2022 by Zeping Lee <zepinglee AT gmail.com>
+%% Copyright (C) 2016--2025 by Zeping Lee <zepinglee AT gmail.com>
%% -------------------------------------------------------------------
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
@@ -39,6 +39,7 @@
show.medium.type
short.journal
italic.journal
+ link.journal
bold.journal.volume
show.missing.address.publisher
space.before.pages
@@ -83,6 +84,7 @@
"slash" 'component.part.label :=
#0 'short.journal :=
#0 'italic.journal :=
+ #0 'link.journal :=
#0 'bold.journal.volume :=
#0 'show.missing.address.publisher :=
#1 'space.before.pages :=
@@ -141,7 +143,7 @@
year
}
{ entry.lang entry.is.electronic is.pure.electronic entry.numbered }
- { label extra.label sort.label short.label short.list entry.mark entry.url }
+ { label extra.label sort.label short.list entry.mark entry.url }
INTEGERS { output.state before.all mid.sentence after.sentence after.block after.slash }
@@ -745,7 +747,7 @@
FUNCTION {make.full.names}
{ type$ "book" =
- type$ "inbook" =
+ type$ "inbook" = booktitle empty$ not and
or
'author.editor.full
{ type$ "collection" =
@@ -1067,7 +1069,7 @@
}
FUNCTION {check.arxiv.preprint}
-{ #1 #5 substring$ "l" change.case$ "arxiv" =
+{ #1 #5 substring$ purify$ "l" change.case$ "arxiv" =
{ #1 }
{ #0 }
if$
@@ -1080,6 +1082,10 @@
'emphasize
'skip$
if$
+ link.journal
+ 'add.link
+ 'skip$
+ if$
}
'skip$
if$
@@ -1308,7 +1314,7 @@
FUNCTION {format.year}
{ year empty$ not
- { year extract.before.slash extra.label * }
+ { year extra.label * }
{ date empty$ not
{ date extract.before.dash extra.label * }
{ entry.is.electronic not
@@ -1488,7 +1494,7 @@
FUNCTION {check.url}
{ url empty$ not
- { "\url{" url * "}" * 'entry.url :=
+ { url 'entry.url :=
#1 'entry.is.electronic :=
}
{ howpublished empty$ not
@@ -1519,7 +1525,11 @@
{ show.url is.pure.electronic or
entry.url empty$ not and
{ new.block
- entry.url output
+ entry.url #1 #5 substring$ "\url{" =
+ { entry.url }
+ { "\url{" entry.url * "}" * }
+ if$
+ output
}
'skip$
if$
@@ -1539,8 +1549,8 @@
{ entry.url empty$
{ #0 }
{ s text.length$ 'len :=
- entry.url text.length$ 'charptr :=
- { entry.url charptr len substring$ s = not
+ entry.url "l" change.case$ text.length$ 'charptr :=
+ { entry.url "l" change.case$ charptr len substring$ s "l" change.case$ = not
charptr #0 >
and
}
@@ -1976,6 +1986,10 @@
format.urldate "" output.after
output.eprint
output.url
+ show.preprint not eprint empty$ or
+ 'output.doi
+ 'skip$
+ if$
new.block
format.note output
fin.entry
@@ -2040,7 +2054,12 @@
electronic
}
-FUNCTION {inbook} { book }
+FUNCTION {inbook} {
+ booktitle empty$
+ 'book
+ 'incollection
+ if$
+}
FUNCTION {inproceedings}
{ "C" set.entry.mark
@@ -2193,7 +2212,6 @@
FUNCTION {format.lab.names}
{ 's :=
- s #1 format.lab.name 'short.label :=
#1 'nameptr :=
s num.names$ 'numnames :=
""
@@ -2279,9 +2297,8 @@
}
FUNCTION {calc.short.authors}
-{ "" 'short.label :=
- type$ "book" =
- type$ "inbook" =
+{ type$ "book" =
+ type$ "inbook" = booktitle empty$ not and
or
'author.editor.key.label
{ type$ "collection" =
@@ -2297,10 +2314,6 @@
}
if$
'short.list :=
- short.label empty$
- { short.list 'short.label := }
- 'skip$
- if$
}
FUNCTION {calc.label}
@@ -2322,16 +2335,6 @@
if$
*
'label :=
- short.label
- "("
- *
- format.year duplicate$ empty$
- short.list key field.or.null = or
- { pop$ "" }
- 'skip$
- if$
- *
- 'short.label :=
}
FUNCTION {sort.language.label}
@@ -2483,7 +2486,7 @@
" "
*
type$ "book" =
- type$ "inbook" =
+ type$ "inbook" = booktitle empty$ not and
or
'author.editor.sort
{ type$ "collection" =
@@ -2525,7 +2528,7 @@
FUNCTION {forward.pass}
{
- last.label short.label =
+ last.label label =
{ "" 'extra.label :=
last.extra.label text.length$ 'charptr :=
{ last.extra.label charptr #1 substring$ "z" =
@@ -2547,7 +2550,7 @@
}
{ "a" 'last.extra.label :=
"" 'extra.label :=
- short.label 'last.label :=
+ label 'last.label :=
}
if$
number.label #1 + 'number.label :=
Modified: trunk/Master/texmf-dist/bibtex/bst/gbt7714/gbt7714-2005-numerical.bst
===================================================================
--- trunk/Master/texmf-dist/bibtex/bst/gbt7714/gbt7714-2005-numerical.bst 2025-03-12 19:34:53 UTC (rev 74593)
+++ trunk/Master/texmf-dist/bibtex/bst/gbt7714/gbt7714-2005-numerical.bst 2025-03-12 19:35:03 UTC (rev 74594)
@@ -8,9 +8,9 @@
%% -------------------------------------------------------------------
%% GB/T 7714 BibTeX Style
%% https://github.com/zepinglee/gbt7714-bibtex-style
-%% Version: 2022/10/03 v2.1.5
+%% Version: 2025/03/11 v2.1.7
%% -------------------------------------------------------------------
-%% Copyright (C) 2016--2022 by Zeping Lee <zepinglee AT gmail.com>
+%% Copyright (C) 2016--2025 by Zeping Lee <zepinglee AT gmail.com>
%% -------------------------------------------------------------------
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
@@ -39,6 +39,7 @@
show.medium.type
short.journal
italic.journal
+ link.journal
bold.journal.volume
show.missing.address.publisher
space.before.pages
@@ -78,6 +79,7 @@
"slash" 'component.part.label :=
#0 'short.journal :=
#0 'italic.journal :=
+ #0 'link.journal :=
#0 'bold.journal.volume :=
#0 'show.missing.address.publisher :=
#1 'space.before.pages :=
@@ -131,7 +133,7 @@
year
}
{ entry.lang entry.is.electronic is.pure.electronic entry.numbered }
- { label extra.label sort.label short.label short.list entry.mark entry.url }
+ { label extra.label sort.label short.list entry.mark entry.url }
INTEGERS { output.state before.all mid.sentence after.sentence after.block after.slash }
@@ -735,7 +737,7 @@
FUNCTION {make.full.names}
{ type$ "book" =
- type$ "inbook" =
+ type$ "inbook" = booktitle empty$ not and
or
'author.editor.full
{ type$ "collection" =
@@ -1057,7 +1059,7 @@
}
FUNCTION {check.arxiv.preprint}
-{ #1 #5 substring$ "l" change.case$ "arxiv" =
+{ #1 #5 substring$ purify$ "l" change.case$ "arxiv" =
{ #1 }
{ #0 }
if$
@@ -1070,6 +1072,10 @@
'emphasize
'skip$
if$
+ link.journal
+ 'add.link
+ 'skip$
+ if$
}
'skip$
if$
@@ -1298,7 +1304,7 @@
FUNCTION {format.year}
{ year empty$ not
- { year extract.before.slash extra.label * }
+ { year extra.label * }
{ date empty$ not
{ date extract.before.dash extra.label * }
{ entry.is.electronic not
@@ -1478,7 +1484,7 @@
FUNCTION {check.url}
{ url empty$ not
- { "\url{" url * "}" * 'entry.url :=
+ { url 'entry.url :=
#1 'entry.is.electronic :=
}
{ howpublished empty$ not
@@ -1509,7 +1515,11 @@
{ show.url is.pure.electronic or
entry.url empty$ not and
{ new.block
- entry.url output
+ entry.url #1 #5 substring$ "\url{" =
+ { entry.url }
+ { "\url{" entry.url * "}" * }
+ if$
+ output
}
'skip$
if$
@@ -1529,8 +1539,8 @@
{ entry.url empty$
{ #0 }
{ s text.length$ 'len :=
- entry.url text.length$ 'charptr :=
- { entry.url charptr len substring$ s = not
+ entry.url "l" change.case$ text.length$ 'charptr :=
+ { entry.url "l" change.case$ charptr len substring$ s "l" change.case$ = not
charptr #0 >
and
}
@@ -1966,6 +1976,10 @@
format.urldate "" output.after
output.eprint
output.url
+ show.preprint not eprint empty$ or
+ 'output.doi
+ 'skip$
+ if$
new.block
format.note output
fin.entry
@@ -2030,7 +2044,12 @@
electronic
}
-FUNCTION {inbook} { book }
+FUNCTION {inbook} {
+ booktitle empty$
+ 'book
+ 'incollection
+ if$
+}
FUNCTION {inproceedings}
{ "C" set.entry.mark
@@ -2183,7 +2202,6 @@
FUNCTION {format.lab.names}
{ 's :=
- s #1 format.lab.name 'short.label :=
#1 'nameptr :=
s num.names$ 'numnames :=
""
@@ -2269,9 +2287,8 @@
}
FUNCTION {calc.short.authors}
-{ "" 'short.label :=
- type$ "book" =
- type$ "inbook" =
+{ type$ "book" =
+ type$ "inbook" = booktitle empty$ not and
or
'author.editor.key.label
{ type$ "collection" =
@@ -2287,10 +2304,6 @@
}
if$
'short.list :=
- short.label empty$
- { short.list 'short.label := }
- 'skip$
- if$
}
FUNCTION {calc.label}
@@ -2312,16 +2325,6 @@
if$
*
'label :=
- short.label
- "("
- *
- format.year duplicate$ empty$
- short.list key field.or.null = or
- { pop$ "" }
- 'skip$
- if$
- *
- 'short.label :=
}
INTEGERS { seq.num }
Modified: trunk/Master/texmf-dist/bibtex/bst/gbt7714/gbt7714-author-year.bst
===================================================================
--- trunk/Master/texmf-dist/bibtex/bst/gbt7714/gbt7714-author-year.bst 2025-03-12 19:34:53 UTC (rev 74593)
+++ trunk/Master/texmf-dist/bibtex/bst/gbt7714/gbt7714-author-year.bst 2025-03-12 19:35:03 UTC (rev 74594)
@@ -8,9 +8,9 @@
%% -------------------------------------------------------------------
%% GB/T 7714 BibTeX Style
%% https://github.com/zepinglee/gbt7714-bibtex-style
-%% Version: 2022/10/03 v2.1.5
+%% Version: 2025/03/11 v2.1.7
%% -------------------------------------------------------------------
-%% Copyright (C) 2016--2022 by Zeping Lee <zepinglee AT gmail.com>
+%% Copyright (C) 2016--2025 by Zeping Lee <zepinglee AT gmail.com>
%% -------------------------------------------------------------------
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
@@ -39,6 +39,7 @@
show.medium.type
short.journal
italic.journal
+ link.journal
bold.journal.volume
show.missing.address.publisher
space.before.pages
@@ -83,6 +84,7 @@
"slash" 'component.part.label :=
#0 'short.journal :=
#0 'italic.journal :=
+ #0 'link.journal :=
#0 'bold.journal.volume :=
#0 'show.missing.address.publisher :=
#1 'space.before.pages :=
@@ -141,7 +143,7 @@
year
}
{ entry.lang entry.is.electronic is.pure.electronic entry.numbered }
- { label extra.label sort.label short.label short.list entry.mark entry.url }
+ { label extra.label sort.label short.list entry.mark entry.url }
INTEGERS { output.state before.all mid.sentence after.sentence after.block after.slash }
@@ -745,7 +747,7 @@
FUNCTION {make.full.names}
{ type$ "book" =
- type$ "inbook" =
+ type$ "inbook" = booktitle empty$ not and
or
'author.editor.full
{ type$ "collection" =
@@ -1067,7 +1069,7 @@
}
FUNCTION {check.arxiv.preprint}
-{ #1 #5 substring$ "l" change.case$ "arxiv" =
+{ #1 #5 substring$ purify$ "l" change.case$ "arxiv" =
{ #1 }
{ #0 }
if$
@@ -1080,6 +1082,10 @@
'emphasize
'skip$
if$
+ link.journal
+ 'add.link
+ 'skip$
+ if$
}
'skip$
if$
@@ -1308,7 +1314,7 @@
FUNCTION {format.year}
{ year empty$ not
- { year extract.before.slash extra.label * }
+ { year extra.label * }
{ date empty$ not
{ date extract.before.dash extra.label * }
{ entry.is.electronic not
@@ -1488,7 +1494,7 @@
FUNCTION {check.url}
{ url empty$ not
- { "\url{" url * "}" * 'entry.url :=
+ { url 'entry.url :=
#1 'entry.is.electronic :=
}
{ howpublished empty$ not
@@ -1519,7 +1525,11 @@
{ show.url is.pure.electronic or
entry.url empty$ not and
{ new.block
- entry.url output
+ entry.url #1 #5 substring$ "\url{" =
+ { entry.url }
+ { "\url{" entry.url * "}" * }
+ if$
+ output
}
'skip$
if$
@@ -1539,8 +1549,8 @@
{ entry.url empty$
{ #0 }
{ s text.length$ 'len :=
- entry.url text.length$ 'charptr :=
- { entry.url charptr len substring$ s = not
+ entry.url "l" change.case$ text.length$ 'charptr :=
+ { entry.url "l" change.case$ charptr len substring$ s "l" change.case$ = not
charptr #0 >
and
}
@@ -1976,6 +1986,10 @@
format.urldate "" output.after
output.eprint
output.url
+ show.preprint not eprint empty$ or
+ 'output.doi
+ 'skip$
+ if$
new.block
format.note output
fin.entry
@@ -2040,7 +2054,12 @@
electronic
}
-FUNCTION {inbook} { book }
+FUNCTION {inbook} {
+ booktitle empty$
+ 'book
+ 'incollection
+ if$
+}
FUNCTION {inproceedings}
{ "C" set.entry.mark
@@ -2193,7 +2212,6 @@
FUNCTION {format.lab.names}
{ 's :=
- s #1 format.lab.name 'short.label :=
#1 'nameptr :=
s num.names$ 'numnames :=
""
@@ -2279,9 +2297,8 @@
}
FUNCTION {calc.short.authors}
-{ "" 'short.label :=
- type$ "book" =
- type$ "inbook" =
+{ type$ "book" =
+ type$ "inbook" = booktitle empty$ not and
or
'author.editor.key.label
{ type$ "collection" =
@@ -2297,10 +2314,6 @@
}
if$
'short.list :=
- short.label empty$
- { short.list 'short.label := }
- 'skip$
- if$
}
FUNCTION {calc.label}
@@ -2322,16 +2335,6 @@
if$
*
'label :=
- short.label
- "("
- *
- format.year duplicate$ empty$
- short.list key field.or.null = or
- { pop$ "" }
- 'skip$
- if$
- *
- 'short.label :=
}
FUNCTION {sort.language.label}
@@ -2483,7 +2486,7 @@
" "
*
type$ "book" =
- type$ "inbook" =
+ type$ "inbook" = booktitle empty$ not and
or
'author.editor.sort
{ type$ "collection" =
@@ -2525,7 +2528,7 @@
FUNCTION {forward.pass}
{
- last.label short.label =
+ last.label label =
{ "" 'extra.label :=
last.extra.label text.length$ 'charptr :=
{ last.extra.label charptr #1 substring$ "z" =
@@ -2547,7 +2550,7 @@
}
{ "a" 'last.extra.label :=
"" 'extra.label :=
- short.label 'last.label :=
+ label 'last.label :=
}
if$
number.label #1 + 'number.label :=
Modified: trunk/Master/texmf-dist/bibtex/bst/gbt7714/gbt7714-numerical.bst
===================================================================
--- trunk/Master/texmf-dist/bibtex/bst/gbt7714/gbt7714-numerical.bst 2025-03-12 19:34:53 UTC (rev 74593)
+++ trunk/Master/texmf-dist/bibtex/bst/gbt7714/gbt7714-numerical.bst 2025-03-12 19:35:03 UTC (rev 74594)
@@ -8,9 +8,9 @@
%% -------------------------------------------------------------------
%% GB/T 7714 BibTeX Style
%% https://github.com/zepinglee/gbt7714-bibtex-style
-%% Version: 2022/10/03 v2.1.5
+%% Version: 2025/03/11 v2.1.7
%% -------------------------------------------------------------------
-%% Copyright (C) 2016--2022 by Zeping Lee <zepinglee AT gmail.com>
+%% Copyright (C) 2016--2025 by Zeping Lee <zepinglee AT gmail.com>
%% -------------------------------------------------------------------
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
@@ -39,6 +39,7 @@
show.medium.type
short.journal
italic.journal
+ link.journal
bold.journal.volume
show.missing.address.publisher
space.before.pages
@@ -78,6 +79,7 @@
"slash" 'component.part.label :=
#0 'short.journal :=
#0 'italic.journal :=
+ #0 'link.journal :=
#0 'bold.journal.volume :=
#0 'show.missing.address.publisher :=
#1 'space.before.pages :=
@@ -131,7 +133,7 @@
year
}
{ entry.lang entry.is.electronic is.pure.electronic entry.numbered }
- { label extra.label sort.label short.label short.list entry.mark entry.url }
+ { label extra.label sort.label short.list entry.mark entry.url }
INTEGERS { output.state before.all mid.sentence after.sentence after.block after.slash }
@@ -735,7 +737,7 @@
FUNCTION {make.full.names}
{ type$ "book" =
- type$ "inbook" =
+ type$ "inbook" = booktitle empty$ not and
or
'author.editor.full
{ type$ "collection" =
@@ -1057,7 +1059,7 @@
}
FUNCTION {check.arxiv.preprint}
-{ #1 #5 substring$ "l" change.case$ "arxiv" =
+{ #1 #5 substring$ purify$ "l" change.case$ "arxiv" =
{ #1 }
{ #0 }
if$
@@ -1070,6 +1072,10 @@
'emphasize
'skip$
if$
+ link.journal
+ 'add.link
+ 'skip$
+ if$
}
'skip$
if$
@@ -1298,7 +1304,7 @@
FUNCTION {format.year}
{ year empty$ not
- { year extract.before.slash extra.label * }
+ { year extra.label * }
{ date empty$ not
{ date extract.before.dash extra.label * }
{ entry.is.electronic not
@@ -1478,7 +1484,7 @@
FUNCTION {check.url}
{ url empty$ not
- { "\url{" url * "}" * 'entry.url :=
+ { url 'entry.url :=
#1 'entry.is.electronic :=
}
{ howpublished empty$ not
@@ -1509,7 +1515,11 @@
{ show.url is.pure.electronic or
entry.url empty$ not and
{ new.block
- entry.url output
+ entry.url #1 #5 substring$ "\url{" =
+ { entry.url }
+ { "\url{" entry.url * "}" * }
+ if$
+ output
}
'skip$
if$
@@ -1529,8 +1539,8 @@
{ entry.url empty$
{ #0 }
{ s text.length$ 'len :=
- entry.url text.length$ 'charptr :=
- { entry.url charptr len substring$ s = not
+ entry.url "l" change.case$ text.length$ 'charptr :=
+ { entry.url "l" change.case$ charptr len substring$ s "l" change.case$ = not
charptr #0 >
and
}
@@ -1966,6 +1976,10 @@
format.urldate "" output.after
output.eprint
output.url
+ show.preprint not eprint empty$ or
+ 'output.doi
+ 'skip$
+ if$
new.block
format.note output
fin.entry
@@ -2030,7 +2044,12 @@
electronic
}
-FUNCTION {inbook} { book }
+FUNCTION {inbook} {
+ booktitle empty$
+ 'book
+ 'incollection
+ if$
+}
FUNCTION {inproceedings}
{ "C" set.entry.mark
@@ -2183,7 +2202,6 @@
FUNCTION {format.lab.names}
{ 's :=
- s #1 format.lab.name 'short.label :=
#1 'nameptr :=
s num.names$ 'numnames :=
""
@@ -2269,9 +2287,8 @@
}
FUNCTION {calc.short.authors}
-{ "" 'short.label :=
- type$ "book" =
- type$ "inbook" =
+{ type$ "book" =
+ type$ "inbook" = booktitle empty$ not and
or
'author.editor.key.label
{ type$ "collection" =
@@ -2287,10 +2304,6 @@
}
if$
'short.list :=
- short.label empty$
- { short.list 'short.label := }
- 'skip$
- if$
}
FUNCTION {calc.label}
@@ -2312,16 +2325,6 @@
if$
*
'label :=
- short.label
- "("
- *
- format.year duplicate$ empty$
- short.list key field.or.null = or
- { pop$ "" }
- 'skip$
- if$
- *
- 'short.label :=
}
INTEGERS { seq.num }
Modified: trunk/Master/texmf-dist/doc/bibtex/gbt7714/CHANGELOG.md
===================================================================
--- trunk/Master/texmf-dist/doc/bibtex/gbt7714/CHANGELOG.md 2025-03-12 19:34:53 UTC (rev 74593)
+++ trunk/Master/texmf-dist/doc/bibtex/gbt7714/CHANGELOG.md 2025-03-12 19:35:03 UTC (rev 74594)
@@ -7,6 +7,30 @@
## [Unreleased]
+## [v2.1.7] - 2025-03-11
+
+### Added
+
+- 新增对 `\noopsort` 的支持,与 `xampl.bib` 兼容([CTeX-org/forum#315](https://github.com/CTeX-org/forum/issues/315))。
+
+### Fixed
+
+- 修正多余的年份后缀([#176](https://github.com/zepinglee/gbt7714-bibtex-style/issues/176))。
+
+## [v2.1.6] - 2024-03-08
+
+## Added
+
+新增选项 `link.journal` 允许在期刊题名添加超链接([#144](https://github.com/zepinglee/gbt7714-bibtex-style/issues/144))。
+
+### Changed
+
+`@inbook` 改为按照是否有 `booktitle` 选择“专著”或“专著的吸出文献”格式([tuna/thuthesis#930](https://github.com/tuna/thuthesis/issues/930))。
+
+## Fixed
+
+修复 `not brace-balanced` 的警告([#113](https://github.com/zepinglee/gbt7714-bibtex-style/issues/113))。
+
## [v2.1.5] - 2022-10-03
### Changed
@@ -233,7 +257,9 @@
- Initial release.。
-[Unreleased]: https://github.com/zepinglee/gbt7714-bibtex-style/compare/v2.1.5...HEAD
+[Unreleased]: https://github.com/zepinglee/gbt7714-bibtex-style/compare/v2.1.7...HEAD
+[v2.1.7]: https://github.com/zepinglee/gbt7714-bibtex-style/compare/v2.1.6...v2.1.7
+[v2.1.6]: https://github.com/zepinglee/gbt7714-bibtex-style/compare/v2.1.5...v2.1.6
[v2.1.5]: https://github.com/zepinglee/gbt7714-bibtex-style/compare/v2.1.4...v2.1.5
[v2.1.4]: https://github.com/zepinglee/gbt7714-bibtex-style/compare/v2.1.3...v2.1.4
[v2.1.3]: https://github.com/zepinglee/gbt7714-bibtex-style/compare/v2.1.2...v2.1.3
Modified: trunk/Master/texmf-dist/doc/bibtex/gbt7714/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/bibtex/gbt7714/README.md 2025-03-12 19:34:53 UTC (rev 74593)
+++ trunk/Master/texmf-dist/doc/bibtex/gbt7714/README.md 2025-03-12 19:35:03 UTC (rev 74594)
@@ -1,12 +1,10 @@
# GB/T 7714—2015 BibTeX Style
-
[](https://ctan.org/pkg/gbt7714)
[](https://github.com/zepinglee/gbt7714-bibtex-style/releases/latest)
[](https://github.com/zepinglee/gbt7714-bibtex-style/commits/master)
[](https://github.com/zepinglee/gbt7714-bibtex-style/actions)
-
## Introduction
The `gbt7714` package provides a BibTeX implementation for the China's
@@ -21,58 +19,46 @@
- Email: zepinglee AT gmail DOT com
- License: LaTeX Project Public License 1.3c or later
-
## 简介
-GB/T 7714—2015 《信息与文献 参考文献著录规则》是中国的参考文献推荐标准。 国内的绝大部分学术期刊、学位论文都使用了基于该标准的格式。
-本宏包是国标的 BibTeX 实现,主要有以下特性:
+GB/T 7714—2015《信息与文献 参考文献著录规则》是中国的参考文献推荐标准。国内的绝大部分学术期刊、学位论文都使用了基于该标准的格式。本宏包是国标的 BibTeX 实现,主要有以下特性:
+
- 兼容 `natbib` 宏包。
-- 支持“顺序编码制”和“著者-出版年制”两种风格。
+- 支持 “顺序编码制” 和 “著者-出版年制” 两种风格。
- 自动识别语言并进行相应处理。
- 提供了简单的接口供用户修改样式。
- 同时提供了 2005 版的 `.bst` 文件。
-
## 版本 v2.0 的重要修改
-从 v2.0 版本开始(2020-03-04),用户必须在文档中使用 `\bibliographystyle` 命令选择参考文献样式,
-如 `gbt7714-numerical` 或 `gbt7714-author-year`。
-在早期的版本中,选择文献样式的方法是将 `numbers` 或 `super` 等参数传递给 `gbt7714`,
-而不能使用 `\bibliographystyle`。
-这跟标准的 LaTeX 接口不一致,所以将被弃用。
+从 v2.0 版本开始(2020-03-04),用户必须在文档中使用 `\bibliographystyle` 命令选择参考文献样式,如 `gbt7714-numerical` 或 `gbt7714-author-year`。在早期的版本中,选择文献样式的方法是将 `numbers` 或 `super` 等参数传递给 `gbt7714`,而不能使用 `\bibliographystyle`。这跟标准的 LaTeX 接口不一致,所以将被弃用。
-
## 使用方法
以下是 `gbt7714` 宏包的一个简单示例。
+
```latex
-\begin{latex}
- \documentclass{ctexart}
- \usepackage{gbt7714}
- \bibliographystyle{gbt7714-numerical}
- \begin{document}
- \cite{...}
- ...
- \bibliography{bibfile}
- \end{document}
-\end{latex}
+\documentclass{ctexart}
+\usepackage{gbt7714}
+\bibliographystyle{gbt7714-numerical}
+\begin{document}
+ \cite{...}
+ ...
+ \bibliography{bibfile}
+\end{document}
```
1. 在导言区调用宏包 `gbt7714`;
-
2. 使用 `\bibliographystyle` 选择参考文献的样式;
-
3. 在正文中 `\cite` 文献;
-
4. 使用 `\bibliography` 命令生成参考文献表。
-
## 注意事项
1. `bib` 数据库应使用 UTF-8 编码。
-2. 使用著者-出版年制参考文献表时,中文的文献**必须**在 `key` 域填写
-著者姓名的拼音,才能按照拼音排序,比如:
-```
+2. 使用著者-出版年制参考文献表时,中文的文献**必须**在 `key` 域填写著者姓名的拼音,才能按照拼音排序,比如:
+
+```bib
@book{capital,
author = {马克思 and 恩格斯},
key = {ma3 ke4 si1 & en1 ge2 si1},
@@ -80,17 +66,15 @@
}
```
-同一处引用多篇文献时,应将各篇文献的 key 一同写在 `\cite` 命令中,
-如 `\cite{knuth84,lamport94,mittelbach04}`。
-如遇连续编号,可以自动转为起讫序号并用短横线连接。
+同一处引用多篇文献时,应将各篇文献的 key 一同写在 `\cite` 命令中,如 `\cite{knuth84,lamport94,mittelbach04}`。如遇连续编号,可以自动转为起讫序号并用短横线连接。
若需要标出引文的页码,可以标在 `\cite` 的可选参数中,如 `\cite[42]{knuth84}`。
更多的引用标注方法可以参考 `natbib` 宏包的使用说明。
-本宏包默认情况下可以自动识别文献语言,并自动处理文献类型和载体类型标识,
-但是在少数情况下需要用户手动指定,如:
-```
+本宏包默认情况下可以自动识别文献语言,并自动处理文献类型和载体类型标识,但是在少数情况下需要用户手动指定,如:
+
+```bib
@misc{citekey,
langid = {japanese},
mark = {Z},
@@ -98,9 +82,9 @@
...
}
```
+
可选的语言有 `english`, `chinese`, `japanese`, `russian`。
-
## 文献类型
文献类型 | 标识代码 | Entry Type
@@ -125,9 +109,9 @@
其他 | Z | `@misc`
注:
+
- 带 “\*” 的类型不是 BibTeX 的标准文献类型。
-
## 著录项目
著录项目(域) | Entry Field
@@ -159,9 +143,9 @@
拼音(用于排序) | `key`
注:
+
- 其中带星号的不是 BibTeX/natbib 的标准著录项目。
-- 不支持的 BibTeX 标准著录项目有 `annote`, `chapter`, `crossref`, `month`,
-`type`。
+- 不支持的 BibTeX 标准著录项目有 `annote`, `chapter`, `crossref`, `month`, `type`。
## 参考文献著录标准
@@ -168,6 +152,7 @@
- [GB/T 7714—2015 信息与文献 参考文献著录规则](http://www.cessp.org.cn/uploads/1/file/public/201607/20160708142456_8mqgu0dpgk.pdf)
## 相关讨论
+
- 陈浩元(标准起草人):[GB/T 7714 新标准对旧标准的主要修改及实施要点提示](http://bjxb.cessp.org.cn/ch/reader/view_abstract.aspx?file_no=20150411&flag=1)
- 陈浩元(标准起草人):[GB/T 7714一2015 的新点、实施要点及其他](http://www.cessp.org.cn/uploads/1/file/public/201607/20160705202202_0airiqt165.pdf)(Slides)
- 梁海:[知乎回答「GB/T 7714—2005 一些有关空格和标点符号的细节问题?」](https://www.zhihu.com/question/23371611/answer/24696880)
Modified: trunk/Master/texmf-dist/doc/bibtex/gbt7714/gbt7714.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/bibtex/gbt7714/gbt7714.dtx
===================================================================
--- trunk/Master/texmf-dist/source/bibtex/gbt7714/gbt7714.dtx 2025-03-12 19:34:53 UTC (rev 74593)
+++ trunk/Master/texmf-dist/source/bibtex/gbt7714/gbt7714.dtx 2025-03-12 19:35:03 UTC (rev 74594)
@@ -2,7 +2,7 @@
% GB/T 7714 BibTeX Style
% https://github.com/zepinglee/gbt7714-bibtex-style
%
-% Copyright (C) 2016--2022 by Zeping Lee <zepinglee AT gmail.com>
+% Copyright (c) 2016-2025 by Zeping Lee <zepinglee AT gmail.com>
%
% This file may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
@@ -17,7 +17,7 @@
% \iffalse
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{gbt7714}
-%<package> [2022/10/03 v2.1.5 GB/T 7714 BibTeX Style]
+%<package> [2025/03/11 v2.1.7 GB/T 7714 BibTeX Style]
%
%<*driver>
\documentclass[a4paper]{l3doc}
@@ -170,7 +170,7 @@
% 著者-出版年制通常不需要修改引用样式。
% \end{function}
%
-% \DescribeEnv{sort\&compress}
+% \DescribeOption{sort\&compress}
% 同一处引用多篇文献时,应当将各篇文献的 key 一同写在 \cs{cite} 命令中。
% 如遇连续编号,默认会自动转为起讫序号并用短横线连接
% (见\pkg{natbib} 的 \opt{compress} 选项)。
@@ -334,6 +334,7 @@
% show.medium.type & |#1| & 显示载体类型标识 \\
% component.part.label & |"slash"| & 表示析出文献的符号,可选:|"in"|, |"none"| \\
% italic.journal & |#0| & 西文期刊名使用斜体 \\
+% link.journal & |#0| & 在期刊题名上添加 url 的超链接 \\
% show.missing.address.publisher & |#0| & 出版项缺失时显示“出版者不详” \\
% space.before.pages & |#1| & 页码与前面的冒号之间有空格 \\
% only.start.page & |#0| & 只显示起始页码 \\
@@ -809,6 +810,15 @@
% \end{macrocode}
% \end{environment}
%
+% Patch \pkg{natbib} 内部命令,以支持 \cs{noopsort}。
+% 参考 \url{https://tex.stackexchange.com/a/39718/82731}。
+% \begin{macrocode}
+\let\NAT at bare@aux\NAT at bare
+\def\NAT at bare#1(#2){%
+ \begingroup\edef\x{\endgroup
+ \unexpanded{\NAT at bare@aux#1}(\@firstofone#2)}\x}
+% \end{macrocode}
+%
% \begin{macro}{\url}
% 使用 \pkg{xurl} 宏包的方法,增加 URL 可断行的位置。
% \begin{macrocode}
@@ -891,6 +901,7 @@
show.medium.type
short.journal
italic.journal
+ link.journal
bold.journal.volume
show.missing.address.publisher
space.before.pages
@@ -1098,6 +1109,16 @@
%</italic-journal>
% \end{macrocode}
%
+% 在期刊题名添加超链接:
+% \begin{macrocode}
+%<*!link-journal>
+ #0 'link.journal :=
+%</!link-journal>
+%<*link-journal>
+ #1 'link.journal :=
+%</link-journal>
+% \end{macrocode}
+%
% 期刊的卷使用粗体:
% \begin{macrocode}
#0 'bold.journal.volume :=
@@ -1274,7 +1295,7 @@
% These string entry variables are used to form the citation label.
% In a storage pinch, sort.label can be easily computed on the fly.
% \begin{macrocode}
- { label extra.label sort.label short.label short.list entry.mark entry.url }
+ { label extra.label sort.label short.list entry.mark entry.url }
% \end{macrocode}
%
@@ -2220,7 +2241,7 @@
FUNCTION {make.full.names}
{ type$ "book" =
- type$ "inbook" =
+ type$ "inbook" = booktitle empty$ not and
or
'author.editor.full
{ type$ "collection" =
@@ -2604,7 +2625,7 @@
}
FUNCTION {check.arxiv.preprint}
-{ #1 #5 substring$ "l" change.case$ "arxiv" =
+{ #1 #5 substring$ purify$ "l" change.case$ "arxiv" =
{ #1 }
{ #0 }
if$
@@ -2617,6 +2638,10 @@
'emphasize
'skip$
if$
+ link.journal
+ 'add.link
+ 'skip$
+ if$
}
'skip$
if$
@@ -2879,7 +2904,7 @@
% \begin{macrocode}
FUNCTION {format.year}
{ year empty$ not
- { year extract.before.slash extra.label * }
+ { year extra.label * }
{ date empty$ not
{ date extract.before.dash extra.label * }
{ entry.is.electronic not
@@ -3141,7 +3166,7 @@
% \begin{macrocode}
FUNCTION {check.url}
{ url empty$ not
- { "\url{" url * "}" * 'entry.url :=
+ { url 'entry.url :=
#1 'entry.is.electronic :=
}
{ howpublished empty$ not
@@ -3172,7 +3197,11 @@
{ show.url is.pure.electronic or
entry.url empty$ not and
{ new.block
- entry.url output
+ entry.url #1 #5 substring$ "\url{" =
+ { entry.url }
+ { "\url{" entry.url * "}" * }
+ if$
+ output
}
'skip$
if$
@@ -3196,8 +3225,8 @@
{ entry.url empty$
{ #0 }
{ s text.length$ 'len :=
- entry.url text.length$ 'charptr :=
- { entry.url charptr len substring$ s = not
+ entry.url "l" change.case$ text.length$ 'charptr :=
+ { entry.url "l" change.case$ charptr len substring$ s "l" change.case$ = not
charptr #0 >
and
}
@@ -3716,6 +3745,10 @@
format.urldate "" output.after
output.eprint
output.url
+ show.preprint not eprint empty$ or
+ 'output.doi
+ 'skip$
+ if$
new.block
format.note output
fin.entry
@@ -3824,10 +3857,16 @@
%
% Optional: volume or number, series, type, address, edition, month, note
%
-% inbook 类是不含 booktitle 域的,所以不应该适用于“专著中的析出文献”,而应该是专
-% 著,即 book 类。
+% 原生 BibTeX 的数据模型中 \texttt{@inbook} 不含 \texttt{booktitle} ,
+% 按照“专著”处理。而 biblatex 的 \texttt{@inbook} 跟 \texttt{incollection} 一样。
+% 按照“专著的析出文献”处理。
% \begin{macrocode}
-FUNCTION {inbook} { book }
+FUNCTION {inbook} {
+ booktitle empty$
+ 'book
+ 'incollection
+ if$
+}
% \end{macrocode}
%
@@ -4183,13 +4222,9 @@
% \end{macrocode}
%
-% 第一作者姓名相同、年份相同但作者数量不同时,也需要年份标签区分。
-% 比如“王临惠\ 等, 2010a”和“王临惠, 2010b”,
-% 所以使用 |short.label| 存储不带“et al”的版本。
% \begin{macrocode}
FUNCTION {format.lab.names}
{ 's :=
- s #1 format.lab.name 'short.label :=
#1 'nameptr :=
s num.names$ 'numnames :=
""
@@ -4275,9 +4310,8 @@
}
FUNCTION {calc.short.authors}
-{ "" 'short.label :=
- type$ "book" =
- type$ "inbook" =
+{ type$ "book" =
+ type$ "inbook" = booktitle empty$ not and
or
'author.editor.key.label
{ type$ "collection" =
@@ -4293,10 +4327,6 @@
}
if$
'short.list :=
- short.label empty$
- { short.list 'short.label := }
- 'skip$
- if$
}
% \end{macrocode}
@@ -4324,16 +4354,6 @@
if$
*
'label :=
- short.label
- "("
- *
- format.year duplicate$ empty$
- short.list key field.or.null = or
- { pop$ "" }
- 'skip$
- if$
- *
- 'short.label :=
}
% \end{macrocode}
@@ -4551,7 +4571,7 @@
" "
*
type$ "book" =
- type$ "inbook" =
+ type$ "inbook" = booktitle empty$ not and
or
'author.editor.sort
{ type$ "collection" =
@@ -4648,7 +4668,7 @@
FUNCTION {forward.pass}
{
%<*author-year>
- last.label short.label =
+ last.label label =
{ "" 'extra.label :=
last.extra.label text.length$ 'charptr :=
{ last.extra.label charptr #1 substring$ "z" =
@@ -4670,7 +4690,7 @@
}
{ "a" 'last.extra.label :=
"" 'extra.label :=
- short.label 'last.label :=
+ label 'last.label :=
}
if$
%</author-year>
Modified: trunk/Master/texmf-dist/source/bibtex/gbt7714/gbt7714.ins
===================================================================
--- trunk/Master/texmf-dist/source/bibtex/gbt7714/gbt7714.ins 2025-03-12 19:34:53 UTC (rev 74593)
+++ trunk/Master/texmf-dist/source/bibtex/gbt7714/gbt7714.ins 2025-03-12 19:35:03 UTC (rev 74594)
@@ -7,7 +7,7 @@
-------------------------------------------------------------------
GB/T 7714 BibTeX Style
https://github.com/zepinglee/gbt7714-bibtex-style
-Version: 2022/10/03 v2.1.5
+Version: 2025/03/11 v2.1.7
-------------------------------------------------------------------
Copyright (C) 2016--\the\year by Zeping Lee <zepinglee AT gmail.com>
-------------------------------------------------------------------
Modified: trunk/Master/texmf-dist/tex/latex/gbt7714/gbt7714.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/gbt7714/gbt7714.sty 2025-03-12 19:34:53 UTC (rev 74593)
+++ trunk/Master/texmf-dist/tex/latex/gbt7714/gbt7714.sty 2025-03-12 19:35:03 UTC (rev 74594)
@@ -8,9 +8,9 @@
%% -------------------------------------------------------------------
%% GB/T 7714 BibTeX Style
%% https://github.com/zepinglee/gbt7714-bibtex-style
-%% Version: 2022/10/03 v2.1.5
+%% Version: 2025/03/11 v2.1.7
%% -------------------------------------------------------------------
-%% Copyright (C) 2016--2022 by Zeping Lee <zepinglee AT gmail.com>
+%% Copyright (C) 2016--2025 by Zeping Lee <zepinglee AT gmail.com>
%% -------------------------------------------------------------------
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
@@ -22,7 +22,7 @@
%% -------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{gbt7714}
- [2022/10/03 v2.1.5 GB/T 7714 BibTeX Style]
+ [2025/03/11 v2.1.7 GB/T 7714 BibTeX Style]
\newif\ifgbt at legacy@interface
\newif\ifgbt at mmxv
\newif\ifgbt at numerical
@@ -293,6 +293,10 @@
\if*#2*\else\textsuperscript{#2}\fi
\fi}{#1}{#2}}
\renewcommand\@biblabel[1]{[#1]\hfill}
+\let\NAT at bare@aux\NAT at bare
+\def\NAT at bare#1(#2){%
+ \begingroup\edef\x{\endgroup
+ \unexpanded{\NAT at bare@aux#1}(\@firstofone#2)}\x}
\g at addto@macro\UrlBreaks{%
\do0\do1\do2\do3\do4\do5\do6\do7\do8\do9%
\do\A\do\B\do\C\do\D\do\E\do\F\do\G\do\H\do\I\do\J\do\K\do\L\do\M
More information about the tex-live-commits
mailing list.