summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-12-17 22:10:23 +0000
committerKarl Berry <karl@freefriends.org>2020-12-17 22:10:23 +0000
commit2b1bdfc1977f8221d10f4a2557821edd99369861 (patch)
tree7eab670f968e139a6139cbd9dc5c0516bd46229f
parenta84a9cc5fff6a4c026e565163a77f0f746bc000b (diff)
gbt7714 (17dec20)
git-svn-id: svn://tug.org/texlive/trunk@57157 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/bibtex/bst/gbt7714/gbt7714-author-year.bst543
-rw-r--r--Master/texmf-dist/bibtex/bst/gbt7714/gbt7714-numerical.bst529
-rw-r--r--Master/texmf-dist/doc/bibtex/gbt7714/CHANGELOG.md25
-rw-r--r--Master/texmf-dist/doc/bibtex/gbt7714/README.md35
-rw-r--r--Master/texmf-dist/doc/bibtex/gbt7714/gbt7714.pdfbin342504 -> 351819 bytes
-rw-r--r--Master/texmf-dist/source/bibtex/gbt7714/gbt7714.dtx844
-rw-r--r--Master/texmf-dist/source/bibtex/gbt7714/gbt7714.ins4
-rw-r--r--Master/texmf-dist/tex/latex/gbt7714/gbt7714.sty29
8 files changed, 1488 insertions, 521 deletions
diff --git a/Master/texmf-dist/bibtex/bst/gbt7714/gbt7714-author-year.bst b/Master/texmf-dist/bibtex/bst/gbt7714/gbt7714-author-year.bst
index de890a107a8..ed3fc4b811b 100644
--- a/Master/texmf-dist/bibtex/bst/gbt7714/gbt7714-author-year.bst
+++ b/Master/texmf-dist/bibtex/bst/gbt7714/gbt7714-author-year.bst
@@ -6,9 +6,9 @@
%%
%% gbt7714.dtx (with options: `2015,authoryear')
%% -------------------------------------------------------------------
-%% GB/T 7714-2015 BibTeX Style
+%% GB/T 7714—2015 BibTeX Style
%% https://github.com/CTeX-org/gbt7714-bibtex-style
-%% Version: 2020/06/08 v2.0.2
+%% Version: 2020/12/17 v2.1
%% -------------------------------------------------------------------
%% Copyright (C) 2016-2020 by Zeping Lee <zepinglee AT gmail.com>
%% -------------------------------------------------------------------
@@ -21,9 +21,14 @@
%% version 2005/12/01 or later.
%% -------------------------------------------------------------------
INTEGERS {
+ citation.et.al.min
+ citation.et.al.use.first
+ bibliography.et.al.min
+ bibliography.et.al.use.first
uppercase.name
- max.num.authors
- period.between.author.year
+ terms.in.macro
+ year.after.author
+ period.after.author
sentence.case.title
link.title
title.in.journal
@@ -31,11 +36,13 @@ INTEGERS {
show.medium.type
slash.for.extraction
in.booktitle
- abbreviate.journal
+ short.journal
italic.journal
bold.journal.volume
show.missing.address.publisher
+ space.before.pages
only.start.page
+ show.urldate
show.url
show.doi
show.preprint
@@ -50,9 +57,14 @@ INTEGERS {
FUNCTION {load.config}
{
+ #2 'citation.et.al.min :=
+ #1 'citation.et.al.use.first :=
+ #4 'bibliography.et.al.min :=
+ #3 'bibliography.et.al.use.first :=
#1 'uppercase.name :=
- #3 'max.num.authors :=
- #0 'period.between.author.year :=
+ #0 'terms.in.macro :=
+ #1 'year.after.author :=
+ #0 'period.after.author :=
#1 'sentence.case.title :=
#0 'link.title :=
#1 'title.in.journal :=
@@ -60,11 +72,13 @@ FUNCTION {load.config}
#1 'show.medium.type :=
#1 'slash.for.extraction :=
#0 'in.booktitle :=
- #0 'abbreviate.journal :=
+ #0 'short.journal :=
#0 'italic.journal :=
#0 'bold.journal.volume :=
#1 'show.missing.address.publisher :=
+ #1 'space.before.pages :=
#0 'only.start.page :=
+ #1 'show.urldate :=
#1 'show.url :=
#1 'show.doi :=
#0 'show.preprint :=
@@ -87,11 +101,15 @@ ENTRY
edition
editor
eprint
+ eprinttype
howpublished
institution
journal
+ journaltitle
key
+ langid
language
+ location
mark
medium
note
@@ -101,6 +119,7 @@ ENTRY
publisher
school
series
+ shortjournal
title
translation
translator
@@ -109,8 +128,8 @@ ENTRY
volume
year
}
- { entry.lang entry.is.electronic entry.numbered }
- { label extra.label sort.label short.list entry.mark entry.url }
+ { entry.lang entry.is.electronic is.pure.electronic entry.numbered }
+ { label extra.label sort.label short.label short.list entry.mark entry.url }
INTEGERS { output.state before.all mid.sentence after.sentence after.block after.slash }
@@ -145,6 +164,9 @@ FUNCTION {bbl.space}
if$
}
+FUNCTION {bbl.and}
+{ "" }
+
FUNCTION {bbl.et.al}
{ entry.lang lang.zh =
{ "等" }
@@ -160,11 +182,29 @@ FUNCTION {bbl.et.al}
if$
}
+FUNCTION {citation.and}
+{ terms.in.macro
+ { "{\biband}" }
+ 'bbl.and
+ if$
+}
+
FUNCTION {citation.et.al}
-{ bbl.et.al }
+{ terms.in.macro
+ { "{\bibetal}" }
+ 'bbl.et.al
+ if$
+}
FUNCTION {bbl.colon} { ": " }
+FUNCTION {bbl.pages.colon}
+{ space.before.pages
+ { ": " }
+ { ":\allowbreak " }
+ if$
+}
+
FUNCTION {bbl.wide.space} { "\quad " }
FUNCTION {bbl.slash} { "//\allowbreak " }
@@ -456,16 +496,27 @@ FUNCTION {check.entry.lang}
get.str.lang
}
+STRINGS { entry.langid }
+
FUNCTION {set.entry.lang}
-{ language empty$
+{ "" 'entry.langid :=
+ language empty$ not
+ { language 'entry.langid := }
+ 'skip$
+ if$
+ langid empty$ not
+ { langid 'entry.langid := }
+ 'skip$
+ if$
+ entry.langid empty$
{ check.entry.lang }
- { language "english" = language "american" = or language "british" = or
+ { entry.langid "english" = entry.langid "american" = or entry.langid "british" = or
{ lang.en }
- { language "chinese" =
+ { entry.langid "chinese" =
{ lang.zh }
- { language "japanese" =
+ { entry.langid "japanese" =
{ lang.ja }
- { language "russian" =
+ { entry.langid "russian" =
{ lang.ru }
{ check.entry.lang }
if$
@@ -491,6 +542,25 @@ FUNCTION {set.entry.numbered}
INTEGERS { nameptr namesleft numnames name.lang }
+FUNCTION {format.name}
+{ "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
+ t "others" =
+ { bbl.et.al }
+ { t get.str.lang 'name.lang :=
+ name.lang lang.en =
+ { t #1 "{vv~}{ll}{~f{~}}" format.name$
+ uppercase.name
+ { "u" change.case$ }
+ 'skip$
+ if$
+ t #1 "{, jj}" format.name$ *
+ }
+ { t #1 "{ll}{ff}" format.name$ }
+ if$
+ }
+ if$
+}
+
FUNCTION {format.names}
{ 's :=
#1 'nameptr :=
@@ -498,31 +568,21 @@ FUNCTION {format.names}
""
numnames 'namesleft :=
{ namesleft #0 > }
- { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
- nameptr #1 >
- { ", " * }
- 'skip$
- if$
- nameptr max.num.authors >
- { bbl.et.al *
+ { s nameptr format.name bbl.et.al =
+ numnames bibliography.et.al.min #1 - > nameptr bibliography.et.al.use.first > and or
+ { ", " *
+ bbl.et.al *
#1 'namesleft :=
}
- { t "others" =
- { bbl.et.al * }
- { t get.str.lang 'name.lang :=
- name.lang lang.en =
- { t #1 "{vv~}{ll}{~f{~}}" format.name$
- uppercase.name
- { "u" change.case$ }
- 'skip$
- if$
- t #1 "{, jj}" format.name$ *
- }
- { t #1 "{ll}{ff}" format.name$ }
+ { nameptr #1 >
+ { namesleft #1 = bbl.and "" = not and
+ { bbl.and * }
+ { ", " * }
if$
- *
}
+ 'skip$
if$
+ s nameptr format.name *
}
if$
nameptr #1 + 'nameptr :=
@@ -916,18 +976,38 @@ FUNCTION {abbreviate}
}
FUNCTION {format.journal}
-{ journal empty$ not
- { journal
- abbreviate.journal
- 'abbreviate
- 'skip$
+{ ""
+ short.journal
+ { shortjournal empty$ not
+ { shortjournal * }
+ { journal empty$ not
+ { journal * abbreviate }
+ { journaltitle empty$ not
+ { journaltitle * abbreviate }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ { journal empty$ not
+ { journal * }
+ { journaltitle empty$ not
+ { journaltitle * }
+ 'skip$
+ if$
+ }
if$
- italic.journal entry.lang lang.en = and
+ }
+ if$
+ duplicate$ empty$ not
+ { italic.journal entry.lang lang.en = and
'italicize
'skip$
if$
}
- { "" }
+ 'skip$
if$
}
@@ -958,7 +1038,7 @@ FUNCTION {format.mark}
'skip$
if$
'entry.mark :=
- "\allowbreak[" entry.mark * "]" *
+ "[" entry.mark * "]" *
}
{ "" }
if$
@@ -1026,8 +1106,15 @@ FUNCTION {format.publisher}
FUNCTION {format.address.publisher}
{ address empty$ not
- { address
- format.publisher empty$ not
+ { address }
+ { location empty$ not
+ { location }
+ { "" }
+ if$
+ }
+ if$
+ duplicate$ empty$ not
+ { format.publisher empty$ not
{ bbl.colon * format.publisher * }
{ entry.is.electronic not show.missing.address.publisher and
{ bbl.colon * bbl.sine.nomine * }
@@ -1036,7 +1123,8 @@ FUNCTION {format.address.publisher}
}
if$
}
- { entry.is.electronic not show.missing.address.publisher and
+ { pop$
+ entry.is.electronic not show.missing.address.publisher and
{ format.publisher empty$ not
{ bbl.sine.loco bbl.colon * format.publisher * }
{ bbl.sine.loco.sine.nomine }
@@ -1107,9 +1195,93 @@ FUNCTION {contains.dash}
if$
}
+FUNCTION {extract.before.slash}
+{ duplicate$ empty$
+ { pop$ "" }
+ { 's :=
+ #1 'charptr :=
+ s text.length$ #1 + 'len :=
+ { charptr len <
+ s charptr #1 substring$ "/" = not
+ and
+ }
+ { charptr #1 + 'charptr := }
+ while$
+ s #1 charptr #1 - substring$
+ }
+ if$
+}
+
+FUNCTION {extract.after.slash}
+{ duplicate$ empty$
+ { pop$ "" }
+ { 's :=
+ #1 'charptr :=
+ s text.length$ #1 + 'len :=
+ { charptr len <
+ s charptr #1 substring$ "-" = not
+ and
+ s charptr #1 substring$ "/" = not
+ and
+ }
+ { charptr #1 + 'charptr := }
+ while$
+ { charptr len <
+ s charptr #1 substring$ "-" =
+ s charptr #1 substring$ "/" =
+ or
+ and
+ }
+ { charptr #1 + 'charptr := }
+ while$
+ s charptr global.max$ substring$
+ }
+ if$
+}
+
+FUNCTION {contains.slash}
+{ duplicate$ empty$
+ { pop$ #0 }
+ { 's :=
+ { s empty$ not
+ s #1 #1 substring$ "-" = not
+ and
+ s #1 #1 substring$ "/" = not
+ and
+ }
+ { s #2 global.max$ substring$ 's := }
+ while$
+ s empty$ not
+ }
+ if$
+}
+
FUNCTION {format.year}
{ year empty$ not
- { year extract.before.dash }
+ { year extract.before.slash extra.label * }
+ { date empty$ not
+ { date extract.before.dash extra.label * }
+ { "empty year in " cite$ * warning$
+ urldate empty$ not
+ { "[" urldate extract.before.dash * extra.label * "]" * }
+ { "" }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.periodical.year}
+{ year empty$ not
+ { year extract.before.slash
+ "--" *
+ year extract.after.slash
+ duplicate$ empty$
+ 'pop$
+ { * }
+ if$
+ }
{ date empty$ not
{ date extract.before.dash }
{ "empty year in " cite$ * warning$
@@ -1121,14 +1293,15 @@ FUNCTION {format.year}
if$
}
if$
- extra.label *
}
FUNCTION {format.date}
{ type$ "patent" = type$ "newspaper" = or
date empty$ not and
{ date }
- { year }
+ { year field.or.null
+ extra.label *
+ }
if$
}
@@ -1140,7 +1313,9 @@ FUNCTION {format.editdate}
}
FUNCTION {format.urldate}
-{ urldate empty$ not entry.is.electronic and
+{ urldate empty$ not
+ show.urldate show.url and is.pure.electronic or and
+ url empty$ not and
{ "\allowbreak[" urldate * "]" * }
{ "" }
if$
@@ -1196,7 +1371,7 @@ FUNCTION {format.journal.volume}
FUNCTION {format.journal.number}
{ number empty$ not
- { "\penalty0 (" number * ")" * }
+ { "\allowbreak (" number * ")" * }
{ "" }
if$
}
@@ -1204,15 +1379,13 @@ FUNCTION {format.journal.number}
FUNCTION {format.journal.pages}
{ pages empty$
{ "" }
- { ": "
- format.extracted.pages *
- }
+ { format.extracted.pages }
if$
}
FUNCTION {format.periodical.year.volume.number}
{ year empty$ not
- { year extract.before.dash }
+ { year extract.before.slash }
{ "empty year in periodical " cite$ * warning$ }
if$
volume empty$ not
@@ -1220,27 +1393,23 @@ FUNCTION {format.periodical.year.volume.number}
'skip$
if$
number empty$ not
- { "\penalty0 (" * number extract.before.dash * ")" * }
+ { "\allowbreak (" * number extract.before.dash * ")" * }
'skip$
if$
- year contains.dash
- { "--" *
- year extract.after.dash empty$
- volume extract.after.dash empty$ and
- number extract.after.dash empty$ and not
- { year extract.after.dash empty$ not
- { year extract.after.dash * }
- { year extract.before.dash * }
- if$
- volume empty$ not
- { ", " * volume extract.after.dash * }
- 'skip$
- if$
- number empty$ not
- { "\penalty0 (" * number extract.after.dash * ")" * }
- 'skip$
- if$
- }
+ "--" *
+ year extract.after.slash empty$
+ volume extract.after.dash empty$ and
+ number extract.after.dash empty$ and not
+ { year extract.after.slash empty$ not
+ { year extract.after.slash * }
+ { year extract.before.slash * }
+ if$
+ volume empty$ not
+ { ", " * volume extract.after.dash * }
+ 'skip$
+ if$
+ number empty$ not
+ { "\allowbreak (" * number extract.after.dash * ")" * }
'skip$
if$
}
@@ -1383,11 +1552,22 @@ FUNCTION {check.electronic}
}
FUNCTION {format.eprint}
-{ ""
- archivePrefix empty$ not
- { archivePrefix * ": " *
- "\eprint{https://" *
- archivePrefix "l" change.case$ * ".org/abs/" * eprint * "}{" *
+{ eprinttype empty$ not
+ { eprinttype }
+ { archivePrefix empty$ not
+ { archivePrefix }
+ { "" }
+ if$
+ }
+ if$
+ 's :=
+ s empty$ not
+ { s ": \eprint{" *
+ url empty$ not
+ { url }
+ { "https://" s "l" change.case$ * ".org/abs/" * eprint * }
+ if$
+ * "}{" *
eprint * "}" *
}
{ eprint }
@@ -1458,11 +1638,15 @@ FUNCTION {monograph}
}
if$
output
- period.between.author.year
- 'new.sentence
+ year.after.author
+ { period.after.author
+ 'new.sentence
+ 'skip$
+ if$
+ format.year "year" output.check
+ }
'skip$
if$
- format.year "year" output.check
new.block
format.series.vol.num.title "title" output.check
"M" set.entry.mark
@@ -1473,7 +1657,11 @@ FUNCTION {monograph}
format.edition output
new.block
format.address.publisher output
- format.pages bbl.colon output.after
+ year.after.author not
+ { format.year "year" output.check }
+ 'skip$
+ if$
+ format.pages bbl.pages.colon output.after
format.urldate "" output.after
output.url
output.doi
@@ -1487,11 +1675,15 @@ FUNCTION {incollection}
output.translation
format.authors output
author format.key output
- period.between.author.year
- 'new.sentence
+ year.after.author
+ { period.after.author
+ 'new.sentence
+ 'skip$
+ if$
+ format.year "year" output.check
+ }
'skip$
if$
- format.year "year" output.check
new.block
format.title "title" output.check
"M" set.entry.mark
@@ -1506,7 +1698,11 @@ FUNCTION {incollection}
format.edition output
new.block
format.address.publisher output
- format.extracted.pages bbl.colon output.after
+ year.after.author not
+ { format.year "year" output.check }
+ 'skip$
+ if$
+ format.extracted.pages bbl.pages.colon output.after
format.urldate "" output.after
output.url
output.doi
@@ -1520,11 +1716,15 @@ FUNCTION {periodical}
output.translation
format.authors output
author format.key output
- period.between.author.year
- 'new.sentence
+ year.after.author
+ { period.after.author
+ 'new.sentence
+ 'skip$
+ if$
+ format.year "year" output.check
+ }
'skip$
if$
- format.year "year" output.check
new.block
format.title "title" output.check
"J" set.entry.mark
@@ -1533,6 +1733,10 @@ FUNCTION {periodical}
format.periodical.year.volume.number output
new.block
format.address.publisher output
+ year.after.author not
+ { format.periodical.year "year" output.check }
+ 'skip$
+ if$
format.urldate "" output.after
output.url
output.doi
@@ -1546,11 +1750,15 @@ FUNCTION {article}
output.translation
format.authors output
author format.key output
- period.between.author.year
- 'new.sentence
+ year.after.author
+ { period.after.author
+ 'new.sentence
+ 'skip$
+ if$
+ format.year "year" output.check
+ }
'skip$
if$
- format.year "year" output.check
new.block
title.in.journal
{ format.title "title" output.check
@@ -1561,9 +1769,13 @@ FUNCTION {article}
'skip$
if$
format.journal "journal" output.check
+ year.after.author not
+ { format.date "year" output.check }
+ 'skip$
+ if$
format.journal.volume output
format.journal.number "" output.after
- format.journal.pages "" output.after
+ format.journal.pages bbl.pages.colon output.after
format.urldate "" output.after
output.url
output.doi
@@ -1577,11 +1789,15 @@ FUNCTION {patent}
output.translation
format.authors output
author format.key output
- period.between.author.year
- 'new.sentence
+ year.after.author
+ { period.after.author
+ 'new.sentence
+ 'skip$
+ if$
+ format.year "year" output.check
+ }
'skip$
if$
- format.year "year" output.check
new.block
format.title "title" output.check
"P" set.entry.mark
@@ -1599,22 +1815,35 @@ FUNCTION {patent}
FUNCTION {electronic}
{ #1 #1 check.electronic
#1 'entry.is.electronic :=
+ #1 'is.pure.electronic :=
output.bibitem
output.translation
format.authors output
author format.key output
- period.between.author.year
- 'new.sentence
+ year.after.author
+ { period.after.author
+ 'new.sentence
+ 'skip$
+ if$
+ format.year "year" output.check
+ }
'skip$
if$
- format.year "year" output.check
new.block
format.series.vol.num.title "title" output.check
"EB" set.entry.mark
format.mark "" output.after
new.block
format.address.publisher output
- format.pages bbl.colon output.after
+ year.after.author not
+ { date empty$
+ { format.date output }
+ 'skip$
+ if$
+ }
+ 'skip$
+ if$
+ format.pages bbl.pages.colon output.after
format.editdate "" output.after
format.urldate "" output.after
output.url
@@ -1638,11 +1867,15 @@ FUNCTION {preprint}
}
if$
output
- period.between.author.year
- 'new.sentence
+ year.after.author
+ { period.after.author
+ 'new.sentence
+ 'skip$
+ if$
+ format.year "year" output.check
+ }
'skip$
if$
- format.year "year" output.check
new.block
title.in.journal
{ format.series.vol.num.title "title" output.check
@@ -1657,7 +1890,11 @@ FUNCTION {preprint}
format.edition output
new.block
output.eprint
- format.pages bbl.colon output.after
+ year.after.author not
+ { format.year "year" output.check }
+ 'skip$
+ if$
+ format.pages bbl.pages.colon output.after
format.urldate "" output.after
output.url
new.block
@@ -1676,7 +1913,8 @@ FUNCTION {misc}
'preprint
{ entry.is.electronic
'electronic
- { "Z" set.entry.mark
+ {
+ "Z" set.entry.mark
monograph
}
if$
@@ -1851,18 +2089,48 @@ FUNCTION {chop.word}
if$
}
+FUNCTION {format.lab.name}
+{ "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
+ t "others" =
+ { citation.et.al }
+ { t get.str.lang 'name.lang :=
+ name.lang lang.zh = name.lang lang.ja = or
+ { t #1 "{ll}{ff}" format.name$ }
+ { t #1 "{vv~}{ll}" format.name$ }
+ if$
+ }
+ if$
+}
+
FUNCTION {format.lab.names}
{ 's :=
- s #1 "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
- t get.str.lang 'name.lang :=
- name.lang lang.en =
- { t #1 "{vv~}{ll}" format.name$}
- { t #1 "{ll}{ff}" format.name$}
- if$
- s num.names$ #1 >
- { bbl.space * citation.et.al * }
- 'skip$
- if$
+ s #1 format.lab.name 'short.label :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ ""
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr format.lab.name citation.et.al =
+ numnames citation.et.al.min #1 - > nameptr citation.et.al.use.first > and or
+ { bbl.space *
+ citation.et.al *
+ #1 'namesleft :=
+ }
+ { nameptr #1 >
+ { namesleft #1 = citation.and "" = not and
+ { citation.and * }
+ { ", " * }
+ if$
+ }
+ 'skip$
+ if$
+ s nameptr format.lab.name *
+ }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
}
FUNCTION {author.key.label}
@@ -1922,7 +2190,8 @@ FUNCTION {editor.key.organization.label}
}
FUNCTION {calc.short.authors}
-{ type$ "book" =
+{ "" 'short.label :=
+ type$ "book" =
type$ "inbook" =
or
'author.editor.key.label
@@ -1939,6 +2208,10 @@ FUNCTION {calc.short.authors}
}
if$
'short.list :=
+ short.label empty$
+ { short.list 'short.label := }
+ 'skip$
+ if$
}
FUNCTION {calc.label}
@@ -1953,6 +2226,16 @@ FUNCTION {calc.label}
if$
*
'label :=
+ short.label
+ "("
+ *
+ format.year duplicate$ empty$
+ short.list key field.or.null = or
+ { pop$ "" }
+ 'skip$
+ if$
+ *
+ 'short.label :=
}
FUNCTION {sort.language.label}
@@ -1972,6 +2255,7 @@ FUNCTION {sort.language.label}
if$
}
if$
+ #64 +
int.to.chr$
}
@@ -2038,7 +2322,7 @@ FUNCTION {author.sort}
{ author sort.format.names }
if$
}
- { key sortify }
+ { key }
if$
}
@@ -2054,7 +2338,7 @@ FUNCTION {author.editor.sort}
{ author sort.format.names }
if$
}
- { key sortify }
+ { key }
if$
}
@@ -2070,7 +2354,7 @@ FUNCTION {author.organization.sort}
{ author sort.format.names }
if$
}
- { key sortify }
+ { key }
if$
}
@@ -2086,7 +2370,7 @@ FUNCTION {editor.organization.sort}
{ editor sort.format.names }
if$
}
- { key sortify }
+ { key }
if$
}
@@ -2094,11 +2378,14 @@ FUNCTION {presort}
{ set.entry.lang
set.entry.numbered
show.url show.doi check.electronic
+ #0 'is.pure.electronic :=
calc.label
label sortify
" "
*
sort.language.label
+ " "
+ *
type$ "book" =
type$ "inbook" =
or
@@ -2141,13 +2428,13 @@ FUNCTION {initialize.longest.label}
}
FUNCTION {forward.pass}
-{ last.label label =
+{ last.label short.label =
{ last.extra.num #1 + 'last.extra.num :=
last.extra.num int.to.chr$ 'extra.label :=
}
{ "a" chr.to.int$ 'last.extra.num :=
"" 'extra.label :=
- label 'last.label :=
+ short.label 'last.label :=
}
if$
number.label #1 + 'number.label :=
@@ -2179,6 +2466,14 @@ FUNCTION {begin.bib}
if$
"\begin{thebibliography}{" number.label int.to.str$ * "}" *
write$ newline$
+ terms.in.macro
+ { "\providecommand{\biband}{和}"
+ write$ newline$
+ "\providecommand{\bibetal}{等}"
+ write$ newline$
+ }
+ 'skip$
+ if$
"\providecommand{\natexlab}[1]{#1}"
write$ newline$
"\providecommand{\url}[1]{#1}"
diff --git a/Master/texmf-dist/bibtex/bst/gbt7714/gbt7714-numerical.bst b/Master/texmf-dist/bibtex/bst/gbt7714/gbt7714-numerical.bst
index c2064c60019..5b487f5ba15 100644
--- a/Master/texmf-dist/bibtex/bst/gbt7714/gbt7714-numerical.bst
+++ b/Master/texmf-dist/bibtex/bst/gbt7714/gbt7714-numerical.bst
@@ -6,9 +6,9 @@
%%
%% gbt7714.dtx (with options: `2015,numerical')
%% -------------------------------------------------------------------
-%% GB/T 7714-2015 BibTeX Style
+%% GB/T 7714—2015 BibTeX Style
%% https://github.com/CTeX-org/gbt7714-bibtex-style
-%% Version: 2020/06/08 v2.0.2
+%% Version: 2020/12/17 v2.1
%% -------------------------------------------------------------------
%% Copyright (C) 2016-2020 by Zeping Lee <zepinglee AT gmail.com>
%% -------------------------------------------------------------------
@@ -21,9 +21,14 @@
%% version 2005/12/01 or later.
%% -------------------------------------------------------------------
INTEGERS {
+ citation.et.al.min
+ citation.et.al.use.first
+ bibliography.et.al.min
+ bibliography.et.al.use.first
uppercase.name
- max.num.authors
- period.between.author.year
+ terms.in.macro
+ year.after.author
+ period.after.author
sentence.case.title
link.title
title.in.journal
@@ -31,11 +36,13 @@ INTEGERS {
show.medium.type
slash.for.extraction
in.booktitle
- abbreviate.journal
+ short.journal
italic.journal
bold.journal.volume
show.missing.address.publisher
+ space.before.pages
only.start.page
+ show.urldate
show.url
show.doi
show.preprint
@@ -45,8 +52,14 @@ INTEGERS {
FUNCTION {load.config}
{
+ #2 'citation.et.al.min :=
+ #1 'citation.et.al.use.first :=
+ #4 'bibliography.et.al.min :=
+ #3 'bibliography.et.al.use.first :=
#1 'uppercase.name :=
- #3 'max.num.authors :=
+ #0 'terms.in.macro :=
+ #0 'year.after.author :=
+ #1 'period.after.author :=
#1 'sentence.case.title :=
#0 'link.title :=
#1 'title.in.journal :=
@@ -54,11 +67,13 @@ FUNCTION {load.config}
#1 'show.medium.type :=
#1 'slash.for.extraction :=
#0 'in.booktitle :=
- #0 'abbreviate.journal :=
+ #0 'short.journal :=
#0 'italic.journal :=
#0 'bold.journal.volume :=
#1 'show.missing.address.publisher :=
+ #1 'space.before.pages :=
#0 'only.start.page :=
+ #1 'show.urldate :=
#1 'show.url :=
#1 'show.doi :=
#0 'show.preprint :=
@@ -76,11 +91,15 @@ ENTRY
edition
editor
eprint
+ eprinttype
howpublished
institution
journal
+ journaltitle
key
+ langid
language
+ location
mark
medium
note
@@ -90,6 +109,7 @@ ENTRY
publisher
school
series
+ shortjournal
title
translation
translator
@@ -98,8 +118,8 @@ ENTRY
volume
year
}
- { entry.lang entry.is.electronic entry.numbered }
- { label extra.label sort.label short.list entry.mark entry.url }
+ { entry.lang entry.is.electronic is.pure.electronic entry.numbered }
+ { label extra.label sort.label short.label short.list entry.mark entry.url }
INTEGERS { output.state before.all mid.sentence after.sentence after.block after.slash }
@@ -134,6 +154,9 @@ FUNCTION {bbl.space}
if$
}
+FUNCTION {bbl.and}
+{ "" }
+
FUNCTION {bbl.et.al}
{ entry.lang lang.zh =
{ "等" }
@@ -149,11 +172,29 @@ FUNCTION {bbl.et.al}
if$
}
+FUNCTION {citation.and}
+{ terms.in.macro
+ { "{\biband}" }
+ 'bbl.and
+ if$
+}
+
FUNCTION {citation.et.al}
-{ bbl.et.al }
+{ terms.in.macro
+ { "{\bibetal}" }
+ 'bbl.et.al
+ if$
+}
FUNCTION {bbl.colon} { ": " }
+FUNCTION {bbl.pages.colon}
+{ space.before.pages
+ { ": " }
+ { ":\allowbreak " }
+ if$
+}
+
FUNCTION {bbl.wide.space} { "\quad " }
FUNCTION {bbl.slash} { "//\allowbreak " }
@@ -445,16 +486,27 @@ FUNCTION {check.entry.lang}
get.str.lang
}
+STRINGS { entry.langid }
+
FUNCTION {set.entry.lang}
-{ language empty$
+{ "" 'entry.langid :=
+ language empty$ not
+ { language 'entry.langid := }
+ 'skip$
+ if$
+ langid empty$ not
+ { langid 'entry.langid := }
+ 'skip$
+ if$
+ entry.langid empty$
{ check.entry.lang }
- { language "english" = language "american" = or language "british" = or
+ { entry.langid "english" = entry.langid "american" = or entry.langid "british" = or
{ lang.en }
- { language "chinese" =
+ { entry.langid "chinese" =
{ lang.zh }
- { language "japanese" =
+ { entry.langid "japanese" =
{ lang.ja }
- { language "russian" =
+ { entry.langid "russian" =
{ lang.ru }
{ check.entry.lang }
if$
@@ -480,6 +532,25 @@ FUNCTION {set.entry.numbered}
INTEGERS { nameptr namesleft numnames name.lang }
+FUNCTION {format.name}
+{ "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
+ t "others" =
+ { bbl.et.al }
+ { t get.str.lang 'name.lang :=
+ name.lang lang.en =
+ { t #1 "{vv~}{ll}{~f{~}}" format.name$
+ uppercase.name
+ { "u" change.case$ }
+ 'skip$
+ if$
+ t #1 "{, jj}" format.name$ *
+ }
+ { t #1 "{ll}{ff}" format.name$ }
+ if$
+ }
+ if$
+}
+
FUNCTION {format.names}
{ 's :=
#1 'nameptr :=
@@ -487,31 +558,21 @@ FUNCTION {format.names}
""
numnames 'namesleft :=
{ namesleft #0 > }
- { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
- nameptr #1 >
- { ", " * }
- 'skip$
- if$
- nameptr max.num.authors >
- { bbl.et.al *
+ { s nameptr format.name bbl.et.al =
+ numnames bibliography.et.al.min #1 - > nameptr bibliography.et.al.use.first > and or
+ { ", " *
+ bbl.et.al *
#1 'namesleft :=
}
- { t "others" =
- { bbl.et.al * }
- { t get.str.lang 'name.lang :=
- name.lang lang.en =
- { t #1 "{vv~}{ll}{~f{~}}" format.name$
- uppercase.name
- { "u" change.case$ }
- 'skip$
- if$
- t #1 "{, jj}" format.name$ *
- }
- { t #1 "{ll}{ff}" format.name$ }
+ { nameptr #1 >
+ { namesleft #1 = bbl.and "" = not and
+ { bbl.and * }
+ { ", " * }
if$
- *
}
+ 'skip$
if$
+ s nameptr format.name *
}
if$
nameptr #1 + 'nameptr :=
@@ -905,18 +966,38 @@ FUNCTION {abbreviate}
}
FUNCTION {format.journal}
-{ journal empty$ not
- { journal
- abbreviate.journal
- 'abbreviate
- 'skip$
+{ ""
+ short.journal
+ { shortjournal empty$ not
+ { shortjournal * }
+ { journal empty$ not
+ { journal * abbreviate }
+ { journaltitle empty$ not
+ { journaltitle * abbreviate }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ { journal empty$ not
+ { journal * }
+ { journaltitle empty$ not
+ { journaltitle * }
+ 'skip$
+ if$
+ }
if$
- italic.journal entry.lang lang.en = and
+ }
+ if$
+ duplicate$ empty$ not
+ { italic.journal entry.lang lang.en = and
'italicize
'skip$
if$
}
- { "" }
+ 'skip$
if$
}
@@ -947,7 +1028,7 @@ FUNCTION {format.mark}
'skip$
if$
'entry.mark :=
- "\allowbreak[" entry.mark * "]" *
+ "[" entry.mark * "]" *
}
{ "" }
if$
@@ -1015,8 +1096,15 @@ FUNCTION {format.publisher}
FUNCTION {format.address.publisher}
{ address empty$ not
- { address
- format.publisher empty$ not
+ { address }
+ { location empty$ not
+ { location }
+ { "" }
+ if$
+ }
+ if$
+ duplicate$ empty$ not
+ { format.publisher empty$ not
{ bbl.colon * format.publisher * }
{ entry.is.electronic not show.missing.address.publisher and
{ bbl.colon * bbl.sine.nomine * }
@@ -1025,7 +1113,8 @@ FUNCTION {format.address.publisher}
}
if$
}
- { entry.is.electronic not show.missing.address.publisher and
+ { pop$
+ entry.is.electronic not show.missing.address.publisher and
{ format.publisher empty$ not
{ bbl.sine.loco bbl.colon * format.publisher * }
{ bbl.sine.loco.sine.nomine }
@@ -1096,9 +1185,93 @@ FUNCTION {contains.dash}
if$
}
+FUNCTION {extract.before.slash}
+{ duplicate$ empty$
+ { pop$ "" }
+ { 's :=
+ #1 'charptr :=
+ s text.length$ #1 + 'len :=
+ { charptr len <
+ s charptr #1 substring$ "/" = not
+ and
+ }
+ { charptr #1 + 'charptr := }
+ while$
+ s #1 charptr #1 - substring$
+ }
+ if$
+}
+
+FUNCTION {extract.after.slash}
+{ duplicate$ empty$
+ { pop$ "" }
+ { 's :=
+ #1 'charptr :=
+ s text.length$ #1 + 'len :=
+ { charptr len <
+ s charptr #1 substring$ "-" = not
+ and
+ s charptr #1 substring$ "/" = not
+ and
+ }
+ { charptr #1 + 'charptr := }
+ while$
+ { charptr len <
+ s charptr #1 substring$ "-" =
+ s charptr #1 substring$ "/" =
+ or
+ and
+ }
+ { charptr #1 + 'charptr := }
+ while$
+ s charptr global.max$ substring$
+ }
+ if$
+}
+
+FUNCTION {contains.slash}
+{ duplicate$ empty$
+ { pop$ #0 }
+ { 's :=
+ { s empty$ not
+ s #1 #1 substring$ "-" = not
+ and
+ s #1 #1 substring$ "/" = not
+ and
+ }
+ { s #2 global.max$ substring$ 's := }
+ while$
+ s empty$ not
+ }
+ if$
+}
+
FUNCTION {format.year}
{ year empty$ not
- { year extract.before.dash }
+ { year extract.before.slash extra.label * }
+ { date empty$ not
+ { date extract.before.dash extra.label * }
+ { "empty year in " cite$ * warning$
+ urldate empty$ not
+ { "[" urldate extract.before.dash * extra.label * "]" * }
+ { "" }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.periodical.year}
+{ year empty$ not
+ { year extract.before.slash
+ "--" *
+ year extract.after.slash
+ duplicate$ empty$
+ 'pop$
+ { * }
+ if$
+ }
{ date empty$ not
{ date extract.before.dash }
{ "empty year in " cite$ * warning$
@@ -1110,14 +1283,15 @@ FUNCTION {format.year}
if$
}
if$
- extra.label *
}
FUNCTION {format.date}
{ type$ "patent" = type$ "newspaper" = or
date empty$ not and
{ date }
- { year }
+ { year field.or.null
+ extra.label *
+ }
if$
}
@@ -1129,7 +1303,9 @@ FUNCTION {format.editdate}
}
FUNCTION {format.urldate}
-{ urldate empty$ not entry.is.electronic and
+{ urldate empty$ not
+ show.urldate show.url and is.pure.electronic or and
+ url empty$ not and
{ "\allowbreak[" urldate * "]" * }
{ "" }
if$
@@ -1185,7 +1361,7 @@ FUNCTION {format.journal.volume}
FUNCTION {format.journal.number}
{ number empty$ not
- { "\penalty0 (" number * ")" * }
+ { "\allowbreak (" number * ")" * }
{ "" }
if$
}
@@ -1193,15 +1369,13 @@ FUNCTION {format.journal.number}
FUNCTION {format.journal.pages}
{ pages empty$
{ "" }
- { ": "
- format.extracted.pages *
- }
+ { format.extracted.pages }
if$
}
FUNCTION {format.periodical.year.volume.number}
{ year empty$ not
- { year extract.before.dash }
+ { year extract.before.slash }
{ "empty year in periodical " cite$ * warning$ }
if$
volume empty$ not
@@ -1209,27 +1383,23 @@ FUNCTION {format.periodical.year.volume.number}
'skip$
if$
number empty$ not
- { "\penalty0 (" * number extract.before.dash * ")" * }
+ { "\allowbreak (" * number extract.before.dash * ")" * }
'skip$
if$
- year contains.dash
- { "--" *
- year extract.after.dash empty$
- volume extract.after.dash empty$ and
- number extract.after.dash empty$ and not
- { year extract.after.dash empty$ not
- { year extract.after.dash * }
- { year extract.before.dash * }
- if$
- volume empty$ not
- { ", " * volume extract.after.dash * }
- 'skip$
- if$
- number empty$ not
- { "\penalty0 (" * number extract.after.dash * ")" * }
- 'skip$
- if$
- }
+ "--" *
+ year extract.after.slash empty$
+ volume extract.after.dash empty$ and
+ number extract.after.dash empty$ and not
+ { year extract.after.slash empty$ not
+ { year extract.after.slash * }
+ { year extract.before.slash * }
+ if$
+ volume empty$ not
+ { ", " * volume extract.after.dash * }
+ 'skip$
+ if$
+ number empty$ not
+ { "\allowbreak (" * number extract.after.dash * ")" * }
'skip$
if$
}
@@ -1372,11 +1542,22 @@ FUNCTION {check.electronic}
}
FUNCTION {format.eprint}
-{ ""
- archivePrefix empty$ not
- { archivePrefix * ": " *
- "\eprint{https://" *
- archivePrefix "l" change.case$ * ".org/abs/" * eprint * "}{" *
+{ eprinttype empty$ not
+ { eprinttype }
+ { archivePrefix empty$ not
+ { archivePrefix }
+ { "" }
+ if$
+ }
+ if$
+ 's :=
+ s empty$ not
+ { s ": \eprint{" *
+ url empty$ not
+ { url }
+ { "https://" s "l" change.case$ * ".org/abs/" * eprint * }
+ if$
+ * "}{" *
eprint * "}" *
}
{ eprint }
@@ -1447,6 +1628,15 @@ FUNCTION {monograph}
}
if$
output
+ year.after.author
+ { period.after.author
+ 'new.sentence
+ 'skip$
+ if$
+ format.year "year" output.check
+ }
+ 'skip$
+ if$
new.block
format.series.vol.num.title "title" output.check
"M" set.entry.mark
@@ -1457,8 +1647,11 @@ FUNCTION {monograph}
format.edition output
new.block
format.address.publisher output
- format.year "year" output.check
- format.pages bbl.colon output.after
+ year.after.author not
+ { format.year "year" output.check }
+ 'skip$
+ if$
+ format.pages bbl.pages.colon output.after
format.urldate "" output.after
output.url
output.doi
@@ -1472,6 +1665,15 @@ FUNCTION {incollection}
output.translation
format.authors output
author format.key output
+ year.after.author
+ { period.after.author
+ 'new.sentence
+ 'skip$
+ if$
+ format.year "year" output.check
+ }
+ 'skip$
+ if$
new.block
format.title "title" output.check
"M" set.entry.mark
@@ -1486,8 +1688,11 @@ FUNCTION {incollection}
format.edition output
new.block
format.address.publisher output
- format.year "year" output.check
- format.extracted.pages bbl.colon output.after
+ year.after.author not
+ { format.year "year" output.check }
+ 'skip$
+ if$
+ format.extracted.pages bbl.pages.colon output.after
format.urldate "" output.after
output.url
output.doi
@@ -1501,6 +1706,15 @@ FUNCTION {periodical}
output.translation
format.authors output
author format.key output
+ year.after.author
+ { period.after.author
+ 'new.sentence
+ 'skip$
+ if$
+ format.year "year" output.check
+ }
+ 'skip$
+ if$
new.block
format.title "title" output.check
"J" set.entry.mark
@@ -1509,7 +1723,10 @@ FUNCTION {periodical}
format.periodical.year.volume.number output
new.block
format.address.publisher output
- format.date "year" output.check
+ year.after.author not
+ { format.periodical.year "year" output.check }
+ 'skip$
+ if$
format.urldate "" output.after
output.url
output.doi
@@ -1523,6 +1740,15 @@ FUNCTION {article}
output.translation
format.authors output
author format.key output
+ year.after.author
+ { period.after.author
+ 'new.sentence
+ 'skip$
+ if$
+ format.year "year" output.check
+ }
+ 'skip$
+ if$
new.block
title.in.journal
{ format.title "title" output.check
@@ -1533,10 +1759,13 @@ FUNCTION {article}
'skip$
if$
format.journal "journal" output.check
- format.date "year" output.check
+ year.after.author not
+ { format.date "year" output.check }
+ 'skip$
+ if$
format.journal.volume output
format.journal.number "" output.after
- format.journal.pages "" output.after
+ format.journal.pages bbl.pages.colon output.after
format.urldate "" output.after
output.url
output.doi
@@ -1550,6 +1779,15 @@ FUNCTION {patent}
output.translation
format.authors output
author format.key output
+ year.after.author
+ { period.after.author
+ 'new.sentence
+ 'skip$
+ if$
+ format.year "year" output.check
+ }
+ 'skip$
+ if$
new.block
format.title "title" output.check
"P" set.entry.mark
@@ -1567,21 +1805,35 @@ FUNCTION {patent}
FUNCTION {electronic}
{ #1 #1 check.electronic
#1 'entry.is.electronic :=
+ #1 'is.pure.electronic :=
output.bibitem
output.translation
format.authors output
author format.key output
+ year.after.author
+ { period.after.author
+ 'new.sentence
+ 'skip$
+ if$
+ format.year "year" output.check
+ }
+ 'skip$
+ if$
new.block
format.series.vol.num.title "title" output.check
"EB" set.entry.mark
format.mark "" output.after
new.block
format.address.publisher output
- date empty$
- { format.date output }
+ year.after.author not
+ { date empty$
+ { format.date output }
+ 'skip$
+ if$
+ }
'skip$
if$
- format.pages bbl.colon output.after
+ format.pages bbl.pages.colon output.after
format.editdate "" output.after
format.urldate "" output.after
output.url
@@ -1605,6 +1857,15 @@ FUNCTION {preprint}
}
if$
output
+ year.after.author
+ { period.after.author
+ 'new.sentence
+ 'skip$
+ if$
+ format.year "year" output.check
+ }
+ 'skip$
+ if$
new.block
title.in.journal
{ format.series.vol.num.title "title" output.check
@@ -1619,8 +1880,11 @@ FUNCTION {preprint}
format.edition output
new.block
output.eprint
- format.year "year" output.check
- format.pages bbl.colon output.after
+ year.after.author not
+ { format.year "year" output.check }
+ 'skip$
+ if$
+ format.pages bbl.pages.colon output.after
format.urldate "" output.after
output.url
new.block
@@ -1639,7 +1903,8 @@ FUNCTION {misc}
'preprint
{ entry.is.electronic
'electronic
- { "Z" set.entry.mark
+ {
+ "Z" set.entry.mark
monograph
}
if$
@@ -1814,18 +2079,48 @@ FUNCTION {chop.word}
if$
}
+FUNCTION {format.lab.name}
+{ "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
+ t "others" =
+ { citation.et.al }
+ { t get.str.lang 'name.lang :=
+ name.lang lang.zh = name.lang lang.ja = or
+ { t #1 "{ll}{ff}" format.name$ }
+ { t #1 "{vv~}{ll}" format.name$ }
+ if$
+ }
+ if$
+}
+
FUNCTION {format.lab.names}
{ 's :=
- s #1 "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
- t get.str.lang 'name.lang :=
- name.lang lang.en =
- { t #1 "{vv~}{ll}" format.name$}
- { t #1 "{ll}{ff}" format.name$}
- if$
- s num.names$ #1 >
- { bbl.space * citation.et.al * }
- 'skip$
- if$
+ s #1 format.lab.name 'short.label :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ ""
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr format.lab.name citation.et.al =
+ numnames citation.et.al.min #1 - > nameptr citation.et.al.use.first > and or
+ { bbl.space *
+ citation.et.al *
+ #1 'namesleft :=
+ }
+ { nameptr #1 >
+ { namesleft #1 = citation.and "" = not and
+ { citation.and * }
+ { ", " * }
+ if$
+ }
+ 'skip$
+ if$
+ s nameptr format.lab.name *
+ }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
}
FUNCTION {author.key.label}
@@ -1885,7 +2180,8 @@ FUNCTION {editor.key.organization.label}
}
FUNCTION {calc.short.authors}
-{ type$ "book" =
+{ "" 'short.label :=
+ type$ "book" =
type$ "inbook" =
or
'author.editor.key.label
@@ -1902,6 +2198,10 @@ FUNCTION {calc.short.authors}
}
if$
'short.list :=
+ short.label empty$
+ { short.list 'short.label := }
+ 'skip$
+ if$
}
FUNCTION {calc.label}
@@ -1916,6 +2216,16 @@ FUNCTION {calc.label}
if$
*
'label :=
+ short.label
+ "("
+ *
+ format.year duplicate$ empty$
+ short.list key field.or.null = or
+ { pop$ "" }
+ 'skip$
+ if$
+ *
+ 'short.label :=
}
INTEGERS { seq.num }
@@ -1932,6 +2242,7 @@ FUNCTION {presort}
{ set.entry.lang
set.entry.numbered
show.url show.doi check.electronic
+ #0 'is.pure.electronic :=
calc.label
label sortify
" "
@@ -1958,13 +2269,13 @@ FUNCTION {initialize.longest.label}
}
FUNCTION {forward.pass}
-{ last.label label =
+{ last.label short.label =
{ last.extra.num #1 + 'last.extra.num :=
last.extra.num int.to.chr$ 'extra.label :=
}
{ "a" chr.to.int$ 'last.extra.num :=
"" 'extra.label :=
- label 'last.label :=
+ short.label 'last.label :=
}
if$
number.label #1 + 'number.label :=
@@ -1996,6 +2307,14 @@ FUNCTION {begin.bib}
if$
"\begin{thebibliography}{" number.label int.to.str$ * "}" *
write$ newline$
+ terms.in.macro
+ { "\providecommand{\biband}{和}"
+ write$ newline$
+ "\providecommand{\bibetal}{等}"
+ write$ newline$
+ }
+ 'skip$
+ if$
"\providecommand{\natexlab}[1]{#1}"
write$ newline$
"\providecommand{\url}[1]{#1}"
diff --git a/Master/texmf-dist/doc/bibtex/gbt7714/CHANGELOG.md b/Master/texmf-dist/doc/bibtex/gbt7714/CHANGELOG.md
index 8267a433477..312b41259ec 100644
--- a/Master/texmf-dist/doc/bibtex/gbt7714/CHANGELOG.md
+++ b/Master/texmf-dist/doc/bibtex/gbt7714/CHANGELOG.md
@@ -5,6 +5,28 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [Unreleased]
+## [v2.1] - 2020-12-17
+### Changed
+- 著者-出版年制的 `key` 域如果含有多个姓名的拼音,改为使用 ` & ` 分隔(#68)
+- 选项 `abbreviate.journal` 改为 `short.journal`
+- 选项 `max.num.authors` 改为 `et.al.min` 和 `et.al.use.first` 控制输出作者姓名的数量
+- 期刊的起止年份分隔符由 `--` 改为 `/`(hushidong/biblatex-gb7714-2015/pull/79)
+- 统一空格的处理
+- 添加选项 `space.before.pages` 控制页码与前面的冒号之间有无空格
+
+## Fixed
+- 修正第一作者姓名相同、年份相同但作者数量不同时的年份标签
+- 修正 `number` 样式 `\citep` 命令引用的页码位置
+
+### Added
+- 新增选项 `show.urldate` 选择是否显示非电子文献的引用日期
+- 兼容 biblatex 的 `langid` 域
+- 兼容 biblatex 的 `journaltitle` 和 `shortjournal` 域
+- 兼容 biblatex 的 `location` 域
+- 兼容 biblatex 的 `eprinttype` 域
+- 新增选项 `year.after.author` 选择将年份置于著者后
+- 新增选项 `terms.in.macro` 选择以 TeX 宏输出“和”、“等”
+
## [v2.0.2] - 2020-06-08
### Changed
- 期刊的页码前默认有空格(#62)
@@ -99,7 +121,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Changed
- Initial release.
-[Unreleased]: https://github.com/CTeX-org/gbt7714-bibtex-style/compare/v2.0.2...HEAD
+[Unreleased]: https://github.com/CTeX-org/gbt7714-bibtex-style/compare/v2.1...HEAD
+[v2.1]: https://github.com/CTeX-org/gbt7714-bibtex-style/compare/v2.0.2...v2.1
[v2.0.2]: https://github.com/CTeX-org/gbt7714-bibtex-style/compare/v2.0.1...v2.0.2
[v2.0.1]: https://github.com/CTeX-org/gbt7714-bibtex-style/compare/v2.0...v2.0.1
[v2.0]: https://github.com/CTeX-org/gbt7714-bibtex-style/compare/v1.1.2...v2.0
diff --git a/Master/texmf-dist/doc/bibtex/gbt7714/README.md b/Master/texmf-dist/doc/bibtex/gbt7714/README.md
index c582de03578..bb56f7408c0 100644
--- a/Master/texmf-dist/doc/bibtex/gbt7714/README.md
+++ b/Master/texmf-dist/doc/bibtex/gbt7714/README.md
@@ -1,4 +1,4 @@
-# GB/T 7714-2015 BibTeX Style
+# GB/T 7714—2015 BibTeX Style
[![CTAN](https://img.shields.io/ctan/v/gbt7714.svg)](https://ctan.org/pkg/gbt7714)
@@ -10,7 +10,7 @@
## Introduction
The `gbt7714` package provides a BibTeX implementation for the China's
-bibliography style standard GB/T 7714-2015.
+bibliography style standard GB/T 7714—2015.
It consists of two `bst` files for numerical and authoryear styles as well as a
LaTeX package which provides the citation style defined in the standard.
It is compatible with `natbib` and supports language detection (Chinese
@@ -21,14 +21,26 @@ and English) for each biblilography entry.
- Email: zepinglee AT gmail DOT com
- License: LaTeX Project Public License 1.3c or later
-## 新特性
+## 简介
+
+GB/T 7714—2015 《信息与文献\quad 参考文献著录规则》是中国的参考文献推荐标准。
+本宏包是国标的 BibTeX 实现,主要有以下特性:
- 兼容 `natbib`
- 支持“顺序编码制”和“著者-出版年制”两种风格
- 自动识别语言并进行相应处理
- 提供了简单的接口供用户修改样式
+## 版本 v2.0 的重要修改
+
+从 v2.0 版本开始(2020-03-04),用户必须在文档中使用 `\biblilographystyle` 命令选择参考文献样式,
+如 `gbt7714-numerical` 或 `gbt7714-author-year`。
+在早期的版本中,选择文献样式的方法是将 `numbers` 或 `super` 等参数传递给 `gbt7714`,
+而不能使用 `\bibliographystyle`。
+这跟标准的 LaTeX 接口不一致,所以将被弃用。
+
+
## 使用方法
1. 在导言区调用宏包 `gbt7714`;
@@ -48,7 +60,7 @@ and English) for each biblilography entry.
```
@book{capital,
author = {马克思 and 恩格斯},
- key = {ma3 ke4 si1 en1 ge2 si1},
+ key = {ma3 ke4 si1 & en1 ge2 si1},
...
}
```
@@ -65,9 +77,9 @@ and English) for each biblilography entry.
但是在少数情况下需要用户手动指定,如:
```
@misc{citekey,
- language = {japanese},
- mark = {Z},
- medium = {DK},
+ langid = {japanese},
+ mark = {Z},
+ medium = {DK},
...
}
```
@@ -128,7 +140,7 @@ and English) for each biblilography entry.
引用日期 | `urldate`\*
获取和访问路径 | `url`
数字对象唯一标识符 | `doi`
-语言 | `language`\*
+语言 | `langid`\*
拼音(用于排序) | `key`
注:
@@ -138,9 +150,12 @@ and English) for each biblilography entry.
## 参考文献著录标准
-- [GB/T 7714-2015 信息与文献 参考文献著录规则.pdf](https://github.com/Haixing-Hu/GBT7714-2005-BibTeX-Style/files/153951/GBT.7714-2015.pdf)
-- [GB/T 7714-2005 文后参考文献著录规则.pdf](https://github.com/Haixing-Hu/typesetting-standard/raw/master/%E5%9B%BE%E4%B9%A6%E3%80%81%E6%9C%9F%E5%88%8A%E3%80%81%E8%AE%BA%E6%96%87%E7%9A%84%E7%BC%96%E6%8E%92/%E3%80%90GB:T%207714-2005%E3%80%91%E6%96%87%E5%90%8E%E5%8F%82%E8%80%83%E6%96%87%E7%8C%AE%E8%91%97%E5%BD%95%E8%A7%84%E5%88%99.pdf)
+- [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)
## 相关项目
diff --git a/Master/texmf-dist/doc/bibtex/gbt7714/gbt7714.pdf b/Master/texmf-dist/doc/bibtex/gbt7714/gbt7714.pdf
index f8259fe5c84..a90b794bc3d 100644
--- a/Master/texmf-dist/doc/bibtex/gbt7714/gbt7714.pdf
+++ b/Master/texmf-dist/doc/bibtex/gbt7714/gbt7714.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/bibtex/gbt7714/gbt7714.dtx b/Master/texmf-dist/source/bibtex/gbt7714/gbt7714.dtx
index d5a77945386..357fd14495f 100644
--- a/Master/texmf-dist/source/bibtex/gbt7714/gbt7714.dtx
+++ b/Master/texmf-dist/source/bibtex/gbt7714/gbt7714.dtx
@@ -1,5 +1,5 @@
% \iffalse meta-comment
-% GB/T 7714-2015 BibTeX Style
+% GB/T 7714—2015 BibTeX Style
% https://github.com/CTeX-org/gbt7714-bibtex-style
%
% Copyright (C) 2016-2020 by Zeping Lee <zepinglee AT gmail.com>
@@ -17,7 +17,7 @@
% \iffalse
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{gbt7714}
-%<package> [2020/06/08 v2.0.2 GB/T 7714-2015 BibTeX Style]
+%<package> [2020/12/17 v2.1 GB/T 7714—2015 BibTeX Style]
%
%<*driver>
\documentclass[a4paper]{ltxdoc}
@@ -78,7 +78,7 @@
%
% \GetFileInfo{gbt7714.sty}
%
-% \title{GB/T 7714-2015 \BibTeX{} style}
+% \title{GB/T 7714—2015 \BibTeX{} style}
% \author{Zeping Lee\thanks{zepinglee AT gmail.com}}
% \date{\filedate\qquad\fileversion}
% \maketitle
@@ -87,7 +87,7 @@
%
% \begin{abstract}
% The \pkg{gbt7714} package provides a \BibTeX{} implementation for the China's
-% bibliography style standard GB/T 7714-2015.
+% bibliography style standard GB/T 7714—2015.
% It consists of two bst files for numerical and authoryear styles as well as a
% \LaTeX{} package which provides the citation style defined in the standard.
% It is compatible with \pkg{natbib} and supports language detection (Chinese
@@ -96,7 +96,7 @@
%
% \section{简介}
%
-% GB/T 7714-2015 《信息与文献\quad 参考文献著录规则》\cite{gbt77142015}
+% GB/T 7714—2015 《信息与文献\quad 参考文献著录规则》\cite{gbt77142015}
% (以下简称“国标”)是中国的参考文献推荐标准。
% 本宏包是国标的 \BibTeX{}\cite{bibtex} 实现,具有以下特性:
% \begin{itemize}
@@ -108,6 +108,16 @@
% 本宏包的主页:\url{https://github.com/CTeX-org/gbt7714-bibtex-style}。
%
%
+% \section{版本 v2.0 的重要修改}
+%
+% 从 v2.0 版本开始(2020-03-04),用户必须在文档中使用 \cs{biblilographystyle} 命令选择参考文献样式,
+% 如 \opt{gbt7714-numerical} 或 \opt{gbt7714-author-year}。
+% 在早期的版本中,选择文献样式的方法是将 \opt{numbers} 或 \opt{super} 等参数传递给
+% \pkg{gbt7714},
+% 而不能使用 \cs{bibliographystyle}。
+% 这跟标准的 LaTeX 接口不一致,所以将被弃用。
+%
+%
% \section{使用方法}
%
% 按照国标的规定,参考文献的标注体系分为“顺序编码制”和
@@ -224,7 +234,7 @@
% \item[urldate*] 引用日期
% \item[url] 获取和访问路径
% \item[doi] 数字对象唯一标识符
-% \item[language*] 语言
+% \item[langid*] 语言
% \item[key] 拼音(用于排序)
% \end{description}
% 不支持的 \BibTeX{} 标准著录项目有 annote, chapter, crossref, month, type。
@@ -233,9 +243,9 @@
% 但是在少数情况下需要用户手动指定,如:
% \begin{latex}
% @misc{citekey,
-% language = {japanese},
-% mark = {Z},
-% medium = {DK},
+% langid = {japanese},
+% mark = {Z},
+% medium = {DK},
% ...
% }
% \end{latex}
@@ -253,12 +263,10 @@
% \begin{latex}
% @book{capital,
% author = {马克思 and 恩格斯},
-% key = {ma3 ke4 si1 en1 ge2 si1},
+% key = {ma3 ke4 si1 & en1 ge2 si1},
% ...
% }
% \end{latex}
-% 注意名字之间需要额外的空格,比如“张三, 李四”要排在
-% “张三丰”前面。
%
%
% \section{自定义样式}
@@ -282,7 +290,8 @@
% \midrule
% uppercase.name & |#1| & 将著者姓名转为大写 \\
% max.num.authors & |#3| & 输出著者的最多数量 \\
-% period.between.author.year & |#0| & 著者和年份之间使用句点连接 \\
+% year.after.author & |#0| & 年份置于著者之后 \\
+% period.after.author & |#0| & 著者和年份之间使用句点连接 \\
% sentence.case.title & |#1| & 将西文的题名转为 sentence case \\
% link.title & |#0| & 在题名上添加 url 的超链接 \\
% title.in.journal & |#1| & 期刊是否显示标题 \\
@@ -290,10 +299,12 @@
% show.medium.type & |#1| & 显示载体类型标识 \\
% italic.journal & |#0| & 西文期刊名使用斜体 \\
% show.missing.address.publisher & |#1| & 出版项缺失时显示“出版者不详” \\
+% space.before.pages & |#1| & 页码与前面的冒号之间有空格 \\
% only.start.page & |#0| & 只显示起始页码 \\
+% show.urldate & |#1| & 显示引用日期 urldate \\
% show.url & |#1| & 显示 url \\
-% show.doi & |#1| & 显示 doi \\
-% show.preprint & |#0| & 显示预印本 \\
+% show.doi & |#1| & 显示 DOI \\
+% show.preprint & |#0| & 显示预印本信息 \\
% show.note & |#0| & 显示 note 域的信息 \\
% \bottomrule
% \end{tabular}
@@ -306,14 +317,14 @@
% \section{相关工作}
%
% TeX 社区也有其他关于 GB/T 7714 系列参考文献标准的工作。
-% 2005 年吴凯\cite{wk2006}发布了基于 GB/T 7714-2005 的 \BibTeX{} 样式,
+% 2005 年吴凯\cite{wk2006}发布了基于 GB/T 7714—2005 的 \BibTeX{} 样式,
% 支持顺序编码制和著者出版年制两种风格。
-% 李志奇\cite{lqz2013}发布了严格遵循 GB/T 7714-2005 的 BibLaTeX 的样式。
+% 李志奇\cite{lqz2013}发布了严格遵循 GB/T 7714—2005 的 BibLaTeX 的样式。
% 胡海星\cite{hhx2013}提供了另一个 \BibTeX{} 实现,
% 还给每行 bst 代码写了 java 语言注释。
% 沈周\cite{sz2016}基于 \pkg{biblatex-caspervector}\cite{vector2012} 进行修改,
% 以符合国标的格式。
-% 胡振震发布了符合 GB/T 7714-2015 标准的 BibLaTeX 参考文献样式\cite{hzz2016},
+% 胡振震发布了符合 GB/T 7714—2015 标准的 BibLaTeX 参考文献样式\cite{hzz2016},
% 并进行了比较完善的持续维护。
%
%
@@ -328,78 +339,78 @@
% \bibitem[{中国国家标准化委员会}(2015)]{gbt77142015}
% {中国国家标准化委员会}.
% \newblock 信息与文献\quad 参考文献著录规则: GB/T
-% 7714--2015\allowbreak[S].
+% 7714—2015[S].
% \newblock 北京: 中国标准出版社, 2015.
%
% \bibitem[Patashnik(1988{\natexlab{a}})]{bibtex}
% PATASHNIK~O.
-% \newblock {\BibTeX}ing\allowbreak[M/OL].
+% \newblock {\BibTeX}ing[M/OL].
% \newblock 1988{\natexlab{a}}.
% \newblock \url{http://mirrors.ctan.org/biblio/bibtex/base/btxdoc.pdf}.
%
% \bibitem[Daly(1999)]{natbib}
% DALY~P~W.
-% \newblock Natural sciences citations and references\allowbreak[M/OL].
+% \newblock Natural sciences citations and references[M/OL].
% \newblock 1999.
% \newblock \url{http://mirrors.ctan.org/macros/latex/contrib/natbib/natbib.pdf}.
%
% \bibitem[Patashnik(1988{\natexlab{b}})]{btxhak}
% PATASHNIK~O.
-% \newblock Designing {\BibTeX} styles\allowbreak[M/OL].
+% \newblock Designing {\BibTeX} styles[M/OL].
% \newblock 1988{\natexlab{b}}.
% \newblock \url{http://mirrors.ctan.org/biblio/bibtex/base/btxhak.pdf}.
%
% \bibitem[Markey(2003)]{ttb}
% MARKEY~N.
-% \newblock Tame the beast\allowbreak[M/OL].
+% \newblock Tame the beast[M/OL].
% \newblock 2003.
% \newblock \url{http://mirrors.ctan.org/info/bibtex/tamethebeast/ttb_en.pdf}.
%
-% \bibitem[Mittelbach\ et~al.(2004)Mittelbach, Goossens, Braams, Carlisle, and
+% \bibitem[Mittelbach et~al.(2004)Mittelbach, Goossens, Braams, Carlisle, and
% Rowley]{tlc2}
% MITTELBACH~F, GOOSSENS~M, BRAAMS~J, et~al.
-% \newblock The {\LaTeX} companion\allowbreak[M].
+% \newblock The {\LaTeX} companion[M].
% \newblock 2nd ed.
% \newblock Reading, MA, USA: Addison-Wesley, 2004.
%
% \bibitem[吴凯(2006)]{wk2006}
% 吴凯.
-% \newblock 发布GBT7714-2005.bst version1 Beta版\allowbreak[EB/OL].
+% \newblock 发布GBT7714-2005.bst version1 Beta版[EB/OL].
% \newblock 2006.
% \newblock CTeX 论坛(已关闭).
%
% \bibitem[李志奇(2013)]{lqz2013}
% 李志奇.
% \newblock
-% 基于biblatex的符合GBT7714-2005的中文文献生成工具\allowbreak[EB/OL].
+% 基于biblatex的符合GBT7714—2005的中文文献生成工具[EB/OL].
% \newblock 2013.
% \newblock CTeX 论坛(已关闭).
%
% \bibitem[胡海星(2013)]{hhx2013}
% 胡海星.
-% \newblock A GB/T 7714-2005 national standard compliant BibTeX
-% style\allowbreak[EB/OL].
+% \newblock A GB/T 7714—2005 national standard compliant BibTeX
+% style[EB/OL].
% \newblock 2013.
% \newblock \url{https://github.com/Haixing-Hu/GBT7714-2005-BibTeX-Style}.
%
% \bibitem[沈周(2016)]{sz2016}
% 沈周.
% \newblock 基于caspervector改写的符合GB/T
-% 7714-2005标准的参考文献格式\allowbreak[EB/OL].
+% 7714—2005标准的参考文献格式[EB/OL].
% \newblock 2016.
% \newblock \url{https://github.com/szsdk/biblatex-gbt77142005}.
%
% \bibitem[Vector(2012)]{vector2012}
% VECTOR~C~T.
-% \newblock biblatex 参考文献和引用样式: caspervector\allowbreak[M/OL].
+% \newblock biblatex 参考文献和引用样式: caspervector[M/OL].
% \newblock 2012.
% \newblock
% \url{http://mirrors.ctan.org/macros/latex/contrib/biblatex-contrib/biblatex-caspervector/doc/caspervector.pdf}.
%
% \bibitem[胡振震(2016)]{hzz2016}
% 胡振震.
-% \newblock 符合 GB/T 7714-2015 标准的 biblatex
-% 参考文献样式\allowbreak[M/OL].
+% \newblock 符合 GB/T 7714—2015 标准的 biblatex
+% 参考文献样式[M/OL].
% \newblock 2016.
% \newblock
% \url{http://mirrors.ctan.org/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/biblatex-gb7714-2015.pdf}.
@@ -456,13 +467,14 @@
%
% 将选项传递给 \pkg{natbib}
% \begin{macrocode}
+\PassOptionsToPackage{compress}{natbib}
\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{natbib}}
\ProcessOptions\relax
% \end{macrocode}
%
% 调用宏包,注意只需要 \opt{compress} 不需要 \opt{sort}。
% \begin{macrocode}
-\RequirePackage[compress]{natbib}
+\RequirePackage{natbib}
\RequirePackage{url}
% \end{macrocode}
%
@@ -487,9 +499,27 @@
% \end{macrocode}
%
% \begin{macro}{\cite}
-% 下面修改 \pkg{natbib} 的引用格式,将页码写在上标位置。
+% 下面修改 \pkg{natbib} 的引用格式。
% 为了减少依赖的宏包,这里直接重定义命令不使用 \cs{patchcmd}。
%
+% Super 样式的 \cs{citep} 的页码也为上标。
+% \begin{macrocode}
+\renewcommand\NAT@citesuper[3]{\ifNAT@swa
+ \if*#2*\else#2\NAT@spacechar\fi
+ % \unskip\kern\p@\textsuperscript{\NAT@@open#1\NAT@@close}%
+ % \if*#3*\else\NAT@spacechar#3\fi\else #1\fi\endgroup}
+ \unskip\kern\p@\textsuperscript{\NAT@@open#1\NAT@@close\if*#3*\else#3\fi}%
+ \else #1\fi\endgroup}
+% \end{macrocode}
+%
+% 将 numbers 样式的 \cs{citep} 的页码置于括号外。
+% \begin{macrocode}
+\renewcommand\NAT@citenum%
+ [3]{\ifNAT@swa\NAT@@open\if*#2*\else#2\NAT@spacechar\fi
+ % #1\if*#3*\else\NAT@cmt#3\fi\NAT@@close\else#1\fi\endgroup}
+ #1\NAT@@close\textsuperscript{\if*#3*\else#3\fi}\else#1\fi\endgroup}
+% \end{macrocode}
+%
% Numerical 模式的 \cs{citet} 的页码:
% \begin{macrocode}
\def\NAT@citexnum[#1][#2]#3{%
@@ -588,13 +618,13 @@
}%
% \end{macrocode}
%
-% Numerical 模式的 \cs{citep} 的页码:
+% Author-year 模式的 \cs{citep} 的页码:
% \begin{macrocode}
-\renewcommand\NAT@citesuper[3]{\ifNAT@swa
- \if*#2*\else#2\NAT@spacechar\fi
-\unskip\kern\p@\textsuperscript{\NAT@@open#1\NAT@@close\if*#3*\else#3\fi}%
- \else #1\fi\endgroup}
+\renewcommand\NAT@cite%
+ [3]{\ifNAT@swa\NAT@@open\if*#2*\else#2\NAT@spacechar\fi
+ #1\NAT@@close\if*#3*\else\textsuperscript{#3}\fi\else#1\fi\endgroup}
% \end{macrocode}
+% \end{macro}
%
% Author-year 模式的 \cs{citet} 的页码:
% \begin{macrocode}
@@ -696,14 +726,6 @@
\fi}{#1}{#2}}
% \end{macrocode}
%
-% Author-year 模式的 \cs{citep} 的页码:
-% \begin{macrocode}
-\renewcommand\NAT@cite%
- [3]{\ifNAT@swa\NAT@@open\if*#2*\else#2\NAT@spacechar\fi
- #1\NAT@@close\if*#3*\else\textsuperscript{#3}\fi\else#1\fi\endgroup}
-% \end{macrocode}
-% \end{macro}
-%
% \begin{environment}{thebibliography}
% 参考文献列表的标签左对齐
% \begin{macrocode}
@@ -775,9 +797,14 @@
% \begin{macrocode}
%<*authoryear|numerical>
INTEGERS {
+ citation.et.al.min
+ citation.et.al.use.first
+ bibliography.et.al.min
+ bibliography.et.al.use.first
uppercase.name
- max.num.authors
- period.between.author.year
+ terms.in.macro
+ year.after.author
+ period.after.author
sentence.case.title
link.title
title.in.journal
@@ -785,11 +812,13 @@ INTEGERS {
show.medium.type
slash.for.extraction
in.booktitle
- abbreviate.journal
+ short.journal
italic.journal
bold.journal.volume
show.missing.address.publisher
+ space.before.pages
only.start.page
+ show.urldate
show.url
show.doi
show.preprint
@@ -813,30 +842,63 @@ FUNCTION {load.config}
{
% \end{macrocode}
%
+% 如果姓名的数量大于等于 |et.al.min|,只著录前 |et.al.use.first| 个,
+% 其后加“et al.”或“等”。
+% \begin{macrocode}
+%<*!ucas>
+ #2 'citation.et.al.min :=
+ #1 'citation.et.al.use.first :=
+%</!ucas>
+%<*ucas>
+ #3 'citation.et.al.min :=
+ #1 'citation.et.al.use.first :=
+%</ucas>
+ #4 'bibliography.et.al.min :=
+ #3 'bibliography.et.al.use.first :=
+% \end{macrocode}
+%
% 英文姓名转为全大写:
% \begin{macrocode}
-%<*!nouppercase&!thu>
+%<*!(nouppercase|thu)>
#1 'uppercase.name :=
-%</!nouppercase&!thu>
+%</!(nouppercase|thu)>
%<*nouppercase|thu>
#0 'uppercase.name :=
%</nouppercase|thu>
% \end{macrocode}
%
-% 最多显示的作者数量:
+% 使用 TeX 宏输出“和”、“等”
+% \begin{macrocode}
+%<*!(macro|ucas)>
+ #0 'terms.in.macro :=
+%</!(macro|ucas)>
+%<*macro|ucas>
+ #1 'terms.in.macro :=
+%</macro|ucas>
+% \end{macrocode}
+%
+% 将年份置于著者后面(著者-出版年制默认)
% \begin{macrocode}
- #3 'max.num.authors :=
+%<*numerical|ucas>
+ #0 'year.after.author :=
+%</numerical|ucas>
+%<*authoryear&!ucas>
+ #1 'year.after.author :=
+%</authoryear&!ucas>
% \end{macrocode}
%
% 采用著者-出版年制时,作者姓名与年份之间使用句点连接:
% \begin{macrocode}
+%<*numerical>
+ #1 'period.after.author :=
+%</numerical>
%<*authoryear>
-%<*!period&!2005&!ustc>
- #0 'period.between.author.year :=
-%</!period&!2005&!ustc>
-%<*period|2005|ustc>
- #1 'period.between.author.year :=
-%</period|2005|ustc>
+%<*2015&!(period|thu|ustc)>
+ #0 'period.after.author :=
+%</2015&!(period|thu|ustc)>
+%<*period|2005|thu|ustc>
+ #1 'period.after.author :=
+%</period|2005|thu|ustc>
%</authoryear>
% \end{macrocode}
%
@@ -862,9 +924,9 @@ FUNCTION {load.config}
%
% 期刊是否含标题:
% \begin{macrocode}
-%<*!title-in-journal&!npr>
+%<*!(title-in-journal|npr)>
#1 'title.in.journal :=
-%</!title-in-journal&!npr>
+%</!(title-in-journal|npr)>
%<*title-in-journal|npr>
#0 'title.in.journal :=
%</title-in-journal|npr>
@@ -907,12 +969,12 @@ FUNCTION {load.config}
%
% 期刊名使用缩写:
% \begin{macrocode}
-%<*!abbreviate-journal&!npr>
- #0 'abbreviate.journal :=
-%</!abbreviate-journal&!npr>
-%<*abbreviate-journal|npr>
- #1 'abbreviate.journal :=
-%</abbreviate-journal|npr>
+%<*!(short-journal|npr)>
+ #0 'short.journal :=
+%</!(short-journal|npr)>
+%<*short-journal|npr>
+ #1 'short.journal :=
+%</short-journal|npr>
% \end{macrocode}
%
% 期刊名使用斜体:
@@ -932,24 +994,44 @@ FUNCTION {load.config}
%
% 无出版地或出版者时,著录“出版地不详”,“出版者不详”,“S.l.” 或 “s.n.”:
% \begin{macrocode}
-%<*!noslsn&!thu&!ustc&!npr>
+%<*!(noslsn|thu|ustc|ucas|npr)>
#1 'show.missing.address.publisher :=
-%</!noslsn&!thu&!ustc&!npr>
-%<*noslsn|thu|ustc|npr>
+%</!(noslsn|thu|ustc|ucas|npr)>
+%<*noslsn|thu|ustc|ucas|npr>
#0 'show.missing.address.publisher :=
-%</noslsn|thu|ustc|npr>
+%</noslsn|thu|ustc|ucas|npr>
% \end{macrocode}
%
% 页码是否只含起始页:
% \begin{macrocode}
-%<*!only-start-page&!npr>
+%<*!(no-space-before-pages|thu)>
+ #1 'space.before.pages :=
+%</!(no-space-before-pages|thu)>
+%<*no-space-before-pages|thu>
+ #0 'space.before.pages :=
+%</no-space-before-pages|thu>
+% \end{macrocode}
+%
+% 页码是否只含起始页:
+% \begin{macrocode}
+%<*!(only-start-page|npr)>
#0 'only.start.page :=
-%</!only-start-page&!npr>
+%</!(only-start-page|npr)>
%<*only-start-page|npr>
#1 'only.start.page :=
%</only-start-page|npr>
% \end{macrocode}
%
+% 是否著录非电子文献的引用日期:
+% \begin{macrocode}
+%<*!no-urldate>
+ #1 'show.urldate :=
+%</!no-urldate>
+%<*no-urldate>
+ #0 'show.urldate :=
+%</no-urldate>
+% \end{macrocode}
+%
% 是否著录 URL:
% \begin{macrocode}
%<*!nourl>
@@ -962,9 +1044,9 @@ FUNCTION {load.config}
%
% 是否著录 DOI:
% \begin{macrocode}
-%<*!nodoi&!2005>
+%<*!nodoi&2015>
#1 'show.doi :=
-%</!nodoi&!2005>
+%</!nodoi&2015>
%<*nodoi|2005>
#0 'show.doi :=
%</nodoi|2005>
@@ -972,9 +1054,9 @@ FUNCTION {load.config}
%
% 是否著录 e-print:
% \begin{macrocode}
-%<*!preprint&!npr>
+%<*!(preprint|npr)>
#0 'show.preprint :=
-%</!preprint&!npr>
+%</!(preprint|npr)>
%<*preprint|npr>
#1 'show.preprint :=
%</preprint|npr>
@@ -987,9 +1069,9 @@ FUNCTION {load.config}
%
% 中文文献是否显示英文翻译
% \begin{macrocode}
-%<*!show-english-translation&!npr>
+%<*!(show-english-translation|npr)>
#0 'show.english.translation :=
-%</!show-english-translation&!npr>
+%</!(show-english-translation|npr)>
%<*show-english-translation|npr>
#1 'show.english.translation :=
%</show-english-translation|npr>
@@ -1027,11 +1109,15 @@ ENTRY
edition
editor
eprint
+ eprinttype
howpublished
institution
journal
+ journaltitle
key
+ langid
language
+ location
mark
medium
note
@@ -1041,6 +1127,7 @@ ENTRY
publisher
school
series
+ shortjournal
title
translation
translator
@@ -1049,13 +1136,13 @@ ENTRY
volume
year
}
- { entry.lang entry.is.electronic entry.numbered }
+ { entry.lang entry.is.electronic is.pure.electronic entry.numbered }
% \end{macrocode}
%
% 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.list entry.mark entry.url }
+ { label extra.label sort.label short.label short.list entry.mark entry.url }
% \end{macrocode}
%
@@ -1254,6 +1341,9 @@ FUNCTION {bbl.space}
if$
}
+FUNCTION {bbl.and}
+{ "" }
+
FUNCTION {bbl.et.al}
{ entry.lang lang.zh =
{ "等" }
@@ -1269,11 +1359,29 @@ FUNCTION {bbl.et.al}
if$
}
+FUNCTION {citation.and}
+{ terms.in.macro
+ { "{\biband}" }
+ 'bbl.and
+ if$
+}
+
FUNCTION {citation.et.al}
-{ bbl.et.al }
+{ terms.in.macro
+ { "{\bibetal}" }
+ 'bbl.et.al
+ if$
+}
FUNCTION {bbl.colon} { ": " }
+FUNCTION {bbl.pages.colon}
+{ space.before.pages
+ { ": " }
+ { ":\allowbreak " }
+ if$
+}
+
%<*2015>
FUNCTION {bbl.wide.space} { "\quad " }
%</2015>
@@ -1281,12 +1389,7 @@ FUNCTION {bbl.wide.space} { "\quad " }
FUNCTION {bbl.wide.space} { "\ " }
%</2005>
-%<*!thu>
FUNCTION {bbl.slash} { "//\allowbreak " }
-%</!thu>
-%<*thu>
-FUNCTION {bbl.slash} { " // " }
-%</thu>
FUNCTION {bbl.sine.loco}
{ entry.lang lang.zh =
@@ -1667,16 +1770,27 @@ FUNCTION {check.entry.lang}
get.str.lang
}
+STRINGS { entry.langid }
+
FUNCTION {set.entry.lang}
-{ language empty$
+{ "" 'entry.langid :=
+ language empty$ not
+ { language 'entry.langid := }
+ 'skip$
+ if$
+ langid empty$ not
+ { langid 'entry.langid := }
+ 'skip$
+ if$
+ entry.langid empty$
{ check.entry.lang }
- { language "english" = language "american" = or language "british" = or
+ { entry.langid "english" = entry.langid "american" = or entry.langid "british" = or
{ lang.en }
- { language "chinese" =
+ { entry.langid "chinese" =
{ lang.zh }
- { language "japanese" =
+ { entry.langid "japanese" =
{ lang.ja }
- { language "russian" =
+ { entry.langid "russian" =
{ lang.ru }
{ check.entry.lang }
if$
@@ -1778,6 +1892,25 @@ FUNCTION {set.entry.numbered}
% \begin{macrocode}
INTEGERS { nameptr namesleft numnames name.lang }
+FUNCTION {format.name}
+{ "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
+ t "others" =
+ { bbl.et.al }
+ { t get.str.lang 'name.lang :=
+ name.lang lang.en =
+ { t #1 "{vv~}{ll}{~f{~}}" format.name$
+ uppercase.name
+ { "u" change.case$ }
+ 'skip$
+ if$
+ t #1 "{, jj}" format.name$ *
+ }
+ { t #1 "{ll}{ff}" format.name$ }
+ if$
+ }
+ if$
+}
+
FUNCTION {format.names}
{ 's :=
#1 'nameptr :=
@@ -1785,31 +1918,21 @@ FUNCTION {format.names}
""
numnames 'namesleft :=
{ namesleft #0 > }
- { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
- nameptr #1 >
- { ", " * }
- 'skip$
- if$
- nameptr max.num.authors >
- { bbl.et.al *
+ { s nameptr format.name bbl.et.al =
+ numnames bibliography.et.al.min #1 - > nameptr bibliography.et.al.use.first > and or
+ { ", " *
+ bbl.et.al *
#1 'namesleft :=
}
- { t "others" =
- { bbl.et.al * }
- { t get.str.lang 'name.lang :=
- name.lang lang.en =
- { t #1 "{vv~}{ll}{~f{~}}" format.name$
- uppercase.name
- { "u" change.case$ }
- 'skip$
- if$
- t #1 "{, jj}" format.name$ *
- }
- { t #1 "{ll}{ff}" format.name$ }
+ { nameptr #1 >
+ { namesleft #1 = bbl.and "" = not and
+ { bbl.and * }
+ { ", " * }
if$
- *
}
+ 'skip$
if$
+ s nameptr format.name *
}
if$
nameptr #1 + 'nameptr :=
@@ -2312,18 +2435,38 @@ FUNCTION {abbreviate}
}
FUNCTION {format.journal}
-{ journal empty$ not
- { journal
- abbreviate.journal
- 'abbreviate
- 'skip$
+{ ""
+ short.journal
+ { shortjournal empty$ not
+ { shortjournal * }
+ { journal empty$ not
+ { journal * abbreviate }
+ { journaltitle empty$ not
+ { journaltitle * abbreviate }
+ 'skip$
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ { journal empty$ not
+ { journal * }
+ { journaltitle empty$ not
+ { journaltitle * }
+ 'skip$
+ if$
+ }
if$
- italic.journal entry.lang lang.en = and
+ }
+ if$
+ duplicate$ empty$ not
+ { italic.journal entry.lang lang.en = and
'italicize
'skip$
if$
}
- { "" }
+ 'skip$
if$
}
@@ -2345,11 +2488,6 @@ FUNCTION {set.entry.mark}
FUNCTION {format.mark}
{ show.mark
-%<*thu>
- type$ "phdthesis" = type$ "mastersthesis" = or type$ "patent" = or
- medium empty$ not or entry.is.electronic or
- and
-%</thu>
{ entry.mark
show.medium.type
{ medium empty$ not
@@ -2364,12 +2502,7 @@ FUNCTION {format.mark}
'skip$
if$
'entry.mark :=
-%<*!thu>
- "\allowbreak[" entry.mark * "]" *
-%</!thu>
-%<*thu>
- " [" entry.mark * "]" *
-%</thu>
+ "[" entry.mark * "]" *
}
{ "" }
if$
@@ -2451,8 +2584,15 @@ FUNCTION {format.publisher}
FUNCTION {format.address.publisher}
{ address empty$ not
- { address
- format.publisher empty$ not
+ { address }
+ { location empty$ not
+ { location }
+ { "" }
+ if$
+ }
+ if$
+ duplicate$ empty$ not
+ { format.publisher empty$ not
{ bbl.colon * format.publisher * }
{ entry.is.electronic not show.missing.address.publisher and
{ bbl.colon * bbl.sine.nomine * }
@@ -2461,7 +2601,8 @@ FUNCTION {format.address.publisher}
}
if$
}
- { entry.is.electronic not show.missing.address.publisher and
+ { pop$
+ entry.is.electronic not show.missing.address.publisher and
{ format.publisher empty$ not
{ bbl.sine.loco bbl.colon * format.publisher * }
{ bbl.sine.loco.sine.nomine }
@@ -2485,8 +2626,8 @@ FUNCTION {format.address.publisher}
% there's an empty year but the month is there, and we return the empty string
% if they're both empty.
%
-% Newspaer 和 paptent 要显示完整的日期,同时不再显示修改日期。
-% 但是在 author-year 模式下,需要单独设置 format.year。
+% 期刊需要著录起止范围,其中年份使用“/”分隔,卷和期使用“--”分隔。
+% 版本 v2.0.2 前的年份也使用“--”分隔,仅提供兼容性,不再推荐。
% \begin{macrocode}
FUNCTION {extract.before.dash}
{ duplicate$ empty$
@@ -2543,13 +2684,97 @@ FUNCTION {contains.dash}
if$
}
+FUNCTION {extract.before.slash}
+{ duplicate$ empty$
+ { pop$ "" }
+ { 's :=
+ #1 'charptr :=
+ s text.length$ #1 + 'len :=
+ { charptr len <
+ s charptr #1 substring$ "/" = not
+ and
+ }
+ { charptr #1 + 'charptr := }
+ while$
+ s #1 charptr #1 - substring$
+ }
+ if$
+}
+
+FUNCTION {extract.after.slash}
+{ duplicate$ empty$
+ { pop$ "" }
+ { 's :=
+ #1 'charptr :=
+ s text.length$ #1 + 'len :=
+ { charptr len <
+ s charptr #1 substring$ "-" = not
+ and
+ s charptr #1 substring$ "/" = not
+ and
+ }
+ { charptr #1 + 'charptr := }
+ while$
+ { charptr len <
+ s charptr #1 substring$ "-" =
+ s charptr #1 substring$ "/" =
+ or
+ and
+ }
+ { charptr #1 + 'charptr := }
+ while$
+ s charptr global.max$ substring$
+ }
+ if$
+}
+
+FUNCTION {contains.slash}
+{ duplicate$ empty$
+ { pop$ #0 }
+ { 's :=
+ { s empty$ not
+ s #1 #1 substring$ "-" = not
+ and
+ s #1 #1 substring$ "/" = not
+ and
+ }
+ { s #2 global.max$ substring$ 's := }
+ while$
+ s empty$ not
+ }
+ if$
+}
+
% \end{macrocode}
%
% 著者-出版年制必须提取出年份
% \begin{macrocode}
FUNCTION {format.year}
{ year empty$ not
- { year extract.before.dash }
+ { year extract.before.slash extra.label * }
+ { date empty$ not
+ { date extract.before.dash extra.label * }
+ { "empty year in " cite$ * warning$
+ urldate empty$ not
+ { "[" urldate extract.before.dash * extra.label * "]" * }
+ { "" }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.periodical.year}
+{ year empty$ not
+ { year extract.before.slash
+ "--" *
+ year extract.after.slash
+ duplicate$ empty$
+ 'pop$
+ { * }
+ if$
+ }
{ date empty$ not
{ date extract.before.dash }
{ "empty year in " cite$ * warning$
@@ -2561,7 +2786,6 @@ FUNCTION {format.year}
if$
}
if$
- extra.label *
}
% \end{macrocode}
@@ -2572,7 +2796,9 @@ FUNCTION {format.date}
{ type$ "patent" = type$ "newspaper" = or
date empty$ not and
{ date }
- { year }
+ { year field.or.null
+ extra.label *
+ }
if$
}
@@ -2593,7 +2819,9 @@ FUNCTION {format.editdate}
% 不是 \BibTeX{} 标准的域,但是实际中很常见。
% \begin{macrocode}
FUNCTION {format.urldate}
-{ urldate empty$ not entry.is.electronic and
+{ urldate empty$ not
+ show.urldate show.url and is.pure.electronic or and
+ url empty$ not and
{ "\allowbreak[" urldate * "]" * }
{ "" }
if$
@@ -2708,7 +2936,7 @@ FUNCTION {format.journal.volume}
FUNCTION {format.journal.number}
{ number empty$ not
- { "\penalty0 (" number * ")" * }
+ { "\allowbreak (" number * ")" * }
{ "" }
if$
}
@@ -2716,9 +2944,7 @@ FUNCTION {format.journal.number}
FUNCTION {format.journal.pages}
{ pages empty$
{ "" }
- { ": "
- format.extracted.pages *
- }
+ { format.extracted.pages }
if$
}
@@ -2728,7 +2954,7 @@ FUNCTION {format.journal.pages}
% \begin{macrocode}
FUNCTION {format.periodical.year.volume.number}
{ year empty$ not
- { year extract.before.dash }
+ { year extract.before.slash }
{ "empty year in periodical " cite$ * warning$ }
if$
volume empty$ not
@@ -2736,27 +2962,23 @@ FUNCTION {format.periodical.year.volume.number}
'skip$
if$
number empty$ not
- { "\penalty0 (" * number extract.before.dash * ")" * }
+ { "\allowbreak (" * number extract.before.dash * ")" * }
'skip$
if$
- year contains.dash
- { "--" *
- year extract.after.dash empty$
- volume extract.after.dash empty$ and
- number extract.after.dash empty$ and not
- { year extract.after.dash empty$ not
- { year extract.after.dash * }
- { year extract.before.dash * }
- if$
- volume empty$ not
- { ", " * volume extract.after.dash * }
- 'skip$
- if$
- number empty$ not
- { "\penalty0 (" * number extract.after.dash * ")" * }
- 'skip$
- if$
- }
+ "--" *
+ year extract.after.slash empty$
+ volume extract.after.dash empty$ and
+ number extract.after.dash empty$ and not
+ { year extract.after.slash empty$ not
+ { year extract.after.slash * }
+ { year extract.before.slash * }
+ if$
+ volume empty$ not
+ { ", " * volume extract.after.dash * }
+ 'skip$
+ if$
+ number empty$ not
+ { "\allowbreak (" * number extract.after.dash * ")" * }
'skip$
if$
}
@@ -2909,11 +3131,22 @@ FUNCTION {check.electronic}
}
FUNCTION {format.eprint}
-{ ""
- archivePrefix empty$ not
- { archivePrefix * ": " *
- "\eprint{https://" *
- archivePrefix "l" change.case$ * ".org/abs/" * eprint * "}{" *
+{ eprinttype empty$ not
+ { eprinttype }
+ { archivePrefix empty$ not
+ { archivePrefix }
+ { "" }
+ if$
+ }
+ if$
+ 's :=
+ s empty$ not
+ { s ": \eprint{" *
+ url empty$ not
+ { url }
+ { "https://" s "l" change.case$ * ".org/abs/" * eprint * }
+ if$
+ * "}{" *
eprint * "}" *
}
{ eprint }
@@ -3010,13 +3243,15 @@ FUNCTION {monograph}
}
if$
output
-%<*authoryear>
- period.between.author.year
- 'new.sentence
+ year.after.author
+ { period.after.author
+ 'new.sentence
+ 'skip$
+ if$
+ format.year "year" output.check
+ }
'skip$
if$
- format.year "year" output.check
-%</authoryear>
new.block
format.series.vol.num.title "title" output.check
"M" set.entry.mark
@@ -3027,10 +3262,11 @@ FUNCTION {monograph}
format.edition output
new.block
format.address.publisher output
-%<*numerical>
- format.year "year" output.check
-%</numerical>
- format.pages bbl.colon output.after
+ year.after.author not
+ { format.year "year" output.check }
+ 'skip$
+ if$
+ format.pages bbl.pages.colon output.after
format.urldate "" output.after
output.url
output.doi
@@ -3057,13 +3293,15 @@ FUNCTION {incollection}
output.translation
format.authors output
author format.key output
-%<*authoryear>
- period.between.author.year
- 'new.sentence
+ year.after.author
+ { period.after.author
+ 'new.sentence
+ 'skip$
+ if$
+ format.year "year" output.check
+ }
'skip$
if$
- format.year "year" output.check
-%</authoryear>
new.block
format.title "title" output.check
"M" set.entry.mark
@@ -3078,10 +3316,11 @@ FUNCTION {incollection}
format.edition output
new.block
format.address.publisher output
-%<*numerical>
- format.year "year" output.check
-%</numerical>
- format.extracted.pages bbl.colon output.after
+ year.after.author not
+ { format.year "year" output.check }
+ 'skip$
+ if$
+ format.extracted.pages bbl.pages.colon output.after
format.urldate "" output.after
output.url
output.doi
@@ -3100,13 +3339,15 @@ FUNCTION {periodical}
output.translation
format.authors output
author format.key output
-%<*authoryear>
- period.between.author.year
- 'new.sentence
+ year.after.author
+ { period.after.author
+ 'new.sentence
+ 'skip$
+ if$
+ format.year "year" output.check
+ }
'skip$
if$
- format.year "year" output.check
-%</authoryear>
new.block
format.title "title" output.check
"J" set.entry.mark
@@ -3115,9 +3356,10 @@ FUNCTION {periodical}
format.periodical.year.volume.number output
new.block
format.address.publisher output
-%<*numerical>
- format.date "year" output.check
-%</numerical>
+ year.after.author not
+ { format.periodical.year "year" output.check }
+ 'skip$
+ if$
format.urldate "" output.after
output.url
output.doi
@@ -3145,13 +3387,15 @@ FUNCTION {article}
output.translation
format.authors output
author format.key output
-%<*authoryear>
- period.between.author.year
- 'new.sentence
+ year.after.author
+ { period.after.author
+ 'new.sentence
+ 'skip$
+ if$
+ format.year "year" output.check
+ }
'skip$
if$
- format.year "year" output.check
-%</authoryear>
new.block
title.in.journal
{ format.title "title" output.check
@@ -3162,12 +3406,13 @@ FUNCTION {article}
'skip$
if$
format.journal "journal" output.check
-%<*numerical>
- format.date "year" output.check
-%</numerical>
+ year.after.author not
+ { format.date "year" output.check }
+ 'skip$
+ if$
format.journal.volume output
format.journal.number "" output.after
- format.journal.pages "" output.after
+ format.journal.pages bbl.pages.colon output.after
format.urldate "" output.after
output.url
output.doi
@@ -3187,13 +3432,15 @@ FUNCTION {patent}
output.translation
format.authors output
author format.key output
-%<*authoryear>
- period.between.author.year
- 'new.sentence
+ year.after.author
+ { period.after.author
+ 'new.sentence
+ 'skip$
+ if$
+ format.year "year" output.check
+ }
'skip$
if$
- format.year "year" output.check
-%</authoryear>
new.block
format.title "title" output.check
"P" set.entry.mark
@@ -3215,30 +3462,35 @@ FUNCTION {patent}
FUNCTION {electronic}
{ #1 #1 check.electronic
#1 'entry.is.electronic :=
+ #1 'is.pure.electronic :=
output.bibitem
output.translation
format.authors output
author format.key output
-%<*authoryear>
- period.between.author.year
- 'new.sentence
+ year.after.author
+ { period.after.author
+ 'new.sentence
+ 'skip$
+ if$
+ format.year "year" output.check
+ }
'skip$
if$
- format.year "year" output.check
-%</authoryear>
new.block
format.series.vol.num.title "title" output.check
"EB" set.entry.mark
format.mark "" output.after
new.block
format.address.publisher output
-%<*numerical>
- date empty$
- { format.date output }
+ year.after.author not
+ { date empty$
+ { format.date output }
+ 'skip$
+ if$
+ }
'skip$
if$
-%</numerical>
- format.pages bbl.colon output.after
+ format.pages bbl.pages.colon output.after
format.editdate "" output.after
format.urldate "" output.after
output.url
@@ -3272,17 +3524,24 @@ FUNCTION {preprint}
}
if$
output
-%<*authoryear>
- period.between.author.year
- 'new.sentence
+ year.after.author
+ { period.after.author
+ 'new.sentence
+ 'skip$
+ if$
+ format.year "year" output.check
+ }
'skip$
if$
- format.year "year" output.check
-%</authoryear>
new.block
title.in.journal
{ format.series.vol.num.title "title" output.check
+%<*2015>
"Z" set.entry.mark
+%</2015>
+%<*2005>
+ "M" set.entry.mark
+%</2005>
format.mark "" output.after
new.block
}
@@ -3293,10 +3552,11 @@ FUNCTION {preprint}
format.edition output
new.block
output.eprint
-%<*numerical>
- format.year "year" output.check
-%</numerical>
- format.pages bbl.colon output.after
+ year.after.author not
+ { format.year "year" output.check }
+ 'skip$
+ if$
+ format.pages bbl.pages.colon output.after
format.urldate "" output.after
output.url
new.block
@@ -3327,7 +3587,13 @@ FUNCTION {misc}
'preprint
{ entry.is.electronic
'electronic
- { "Z" set.entry.mark
+ {
+%<*2015>
+ "Z" set.entry.mark
+%</2015>
+%<*2005>
+ "M" set.entry.mark
+%</2005>
monograph
}
if$
@@ -3444,16 +3710,7 @@ FUNCTION {manual} { monograph }
% Optional: type, address, month, note
% \begin{macrocode}
FUNCTION {mastersthesis}
-%<*!thu>
{ "D" set.entry.mark
-%</!thu>
-%<*thu>
-{ lang.zh entry.lang =
- { "硕士学位论文" }
- { "D" }
- if$
- set.entry.mark
-%</thu>
monograph
}
@@ -3475,19 +3732,7 @@ FUNCTION {online}
%
% Optional: type, address, month, note
% \begin{macrocode}
-%<*!thu>
FUNCTION {phdthesis} { mastersthesis }
-%</!thu>
-%<*thu>
-FUNCTION {phdthesis}
-{ lang.zh entry.lang =
- { "博士学位论文" }
- { "D" }
- if$
- set.entry.mark
- monograph
-}
-%</thu>
% \end{macrocode}
%
@@ -3755,18 +4000,54 @@ FUNCTION {chop.word}
% END
% \end{pseudocode}
% \begin{macrocode}
+FUNCTION {format.lab.name}
+{ "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
+ t "others" =
+ { citation.et.al }
+ { t get.str.lang 'name.lang :=
+ name.lang lang.zh = name.lang lang.ja = or
+ { t #1 "{ll}{ff}" format.name$ }
+ { t #1 "{vv~}{ll}" format.name$ }
+ if$
+ }
+ if$
+}
+
+% \end{macrocode}
+%
+% 第一作者姓名相同、年份相同但作者数量不同时,也需要年份标签区分。
+% 比如“王临惠\ 等, 2010a”和“王临惠, 2010b”,
+% 所以使用 |short.label| 存储不带“et al”的版本。
+% \begin{macrocode}
FUNCTION {format.lab.names}
{ 's :=
- s #1 "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
- t get.str.lang 'name.lang :=
- name.lang lang.en =
- { t #1 "{vv~}{ll}" format.name$}
- { t #1 "{ll}{ff}" format.name$}
- if$
- s num.names$ #1 >
- { bbl.space * citation.et.al * }
- 'skip$
- if$
+ s #1 format.lab.name 'short.label :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ ""
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr format.lab.name citation.et.al =
+ numnames citation.et.al.min #1 - > nameptr citation.et.al.use.first > and or
+ { bbl.space *
+ citation.et.al *
+ #1 'namesleft :=
+ }
+ { nameptr #1 >
+ { namesleft #1 = citation.and "" = not and
+ { citation.and * }
+ { ", " * }
+ if$
+ }
+ 'skip$
+ if$
+ s nameptr format.lab.name *
+ }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
}
FUNCTION {author.key.label}
@@ -3826,7 +4107,8 @@ FUNCTION {editor.key.organization.label}
}
FUNCTION {calc.short.authors}
-{ type$ "book" =
+{ "" 'short.label :=
+ type$ "book" =
type$ "inbook" =
or
'author.editor.key.label
@@ -3843,6 +4125,10 @@ FUNCTION {calc.short.authors}
}
if$
'short.list :=
+ short.label empty$
+ { short.list 'short.label := }
+ 'skip$
+ if$
}
FUNCTION {calc.label}
@@ -3857,6 +4143,16 @@ FUNCTION {calc.label}
if$
*
'label :=
+ short.label
+ "("
+ *
+ format.year duplicate$ empty$
+ short.list key field.or.null = or
+ { pop$ "" }
+ 'skip$
+ if$
+ *
+ 'short.label :=
}
% \end{macrocode}
@@ -3904,6 +4200,7 @@ FUNCTION {sort.language.label}
if$
}
if$
+ #64 +
int.to.chr$
}
@@ -3983,7 +4280,7 @@ FUNCTION {author.sort}
{ author sort.format.names }
if$
}
- { key sortify }
+ { key }
if$
}
@@ -3999,7 +4296,7 @@ FUNCTION {author.editor.sort}
{ author sort.format.names }
if$
}
- { key sortify }
+ { key }
if$
}
@@ -4015,7 +4312,7 @@ FUNCTION {author.organization.sort}
{ author sort.format.names }
if$
}
- { key sortify }
+ { key }
if$
}
@@ -4031,7 +4328,7 @@ FUNCTION {editor.organization.sort}
{ editor sort.format.names }
if$
}
- { key sortify }
+ { key }
if$
}
@@ -4063,12 +4360,15 @@ FUNCTION {presort}
{ set.entry.lang
set.entry.numbered
show.url show.doi check.electronic
+ #0 'is.pure.electronic :=
calc.label
label sortify
" "
*
%<*authoryear>
sort.language.label
+ " "
+ *
type$ "book" =
type$ "inbook" =
or
@@ -4165,13 +4465,13 @@ FUNCTION {initialize.longest.label}
}
FUNCTION {forward.pass}
-{ last.label label =
+{ last.label short.label =
{ last.extra.num #1 + 'last.extra.num :=
last.extra.num int.to.chr$ 'extra.label :=
}
{ "a" chr.to.int$ 'last.extra.num :=
"" 'extra.label :=
- label 'last.label :=
+ short.label 'last.label :=
}
if$
number.label #1 + 'number.label :=
@@ -4217,6 +4517,14 @@ FUNCTION {begin.bib}
if$
"\begin{thebibliography}{" number.label int.to.str$ * "}" *
write$ newline$
+ terms.in.macro
+ { "\providecommand{\biband}{和}"
+ write$ newline$
+ "\providecommand{\bibetal}{等}"
+ write$ newline$
+ }
+ 'skip$
+ if$
"\providecommand{\natexlab}[1]{#1}"
write$ newline$
"\providecommand{\url}[1]{#1}"
diff --git a/Master/texmf-dist/source/bibtex/gbt7714/gbt7714.ins b/Master/texmf-dist/source/bibtex/gbt7714/gbt7714.ins
index 96bd21230b0..130b0456382 100644
--- a/Master/texmf-dist/source/bibtex/gbt7714/gbt7714.ins
+++ b/Master/texmf-dist/source/bibtex/gbt7714/gbt7714.ins
@@ -5,9 +5,9 @@
\askforoverwritefalse
\preamble
-------------------------------------------------------------------
-GB/T 7714-2015 BibTeX Style
+GB/T 7714—2015 BibTeX Style
https://github.com/CTeX-org/gbt7714-bibtex-style
-Version: 2020/06/08 v2.0.2
+Version: 2020/12/17 v2.1
-------------------------------------------------------------------
Copyright (C) 2016-\the\year by Zeping Lee <zepinglee AT gmail.com>
-------------------------------------------------------------------
diff --git a/Master/texmf-dist/tex/latex/gbt7714/gbt7714.sty b/Master/texmf-dist/tex/latex/gbt7714/gbt7714.sty
index 08673d591f9..7cb80db925a 100644
--- a/Master/texmf-dist/tex/latex/gbt7714/gbt7714.sty
+++ b/Master/texmf-dist/tex/latex/gbt7714/gbt7714.sty
@@ -6,9 +6,9 @@
%%
%% gbt7714.dtx (with options: `package')
%% -------------------------------------------------------------------
-%% GB/T 7714-2015 BibTeX Style
+%% GB/T 7714—2015 BibTeX Style
%% https://github.com/CTeX-org/gbt7714-bibtex-style
-%% Version: 2020/06/08 v2.0.2
+%% Version: 2020/12/17 v2.1
%% -------------------------------------------------------------------
%% Copyright (C) 2016-2020 by Zeping Lee <zepinglee AT gmail.com>
%% -------------------------------------------------------------------
@@ -22,7 +22,7 @@
%% -------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{gbt7714}
- [2020/06/08 v2.0.2 GB/T 7714-2015 BibTeX Style]
+ [2020/12/17 v2.1 GB/T 7714—2015 BibTeX Style]
\newif\ifgbt@legacy@interface
\newif\ifgbt@mmxv
\newif\ifgbt@numerical
@@ -57,9 +57,10 @@
\gbt@legacy@interfacetrue
\gbt@numericalfalse
}
+\PassOptionsToPackage{compress}{natbib}
\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{natbib}}
\ProcessOptions\relax
-\RequirePackage[compress]{natbib}
+\RequirePackage{natbib}
\RequirePackage{url}
\renewcommand\newblock{\space}
\newcommand\bibstyle@super{\bibpunct{[}{]}{,}{s}{,}{\textsuperscript{,}}}
@@ -70,6 +71,16 @@
\@namedef{bibstyle@gbt7714-author-year}{\bibstyle@authoryear}
\@namedef{bibstyle@gbt7714-2005-numerical}{\bibstyle@super}
\@namedef{bibstyle@gbt7714-2005-author-year}{\bibstyle@authoryear}
+\renewcommand\NAT@citesuper[3]{\ifNAT@swa
+ \if*#2*\else#2\NAT@spacechar\fi
+ % \unskip\kern\p@\textsuperscript{\NAT@@open#1\NAT@@close}%
+ % \if*#3*\else\NAT@spacechar#3\fi\else #1\fi\endgroup}
+ \unskip\kern\p@\textsuperscript{\NAT@@open#1\NAT@@close\if*#3*\else#3\fi}%
+ \else #1\fi\endgroup}
+\renewcommand\NAT@citenum%
+ [3]{\ifNAT@swa\NAT@@open\if*#2*\else#2\NAT@spacechar\fi
+ % #1\if*#3*\else\NAT@cmt#3\fi\NAT@@close\else#1\fi\endgroup}
+ #1\NAT@@close\textsuperscript{\if*#3*\else#3\fi}\else#1\fi\endgroup}
\def\NAT@citexnum[#1][#2]#3{%
\NAT@reset@parser
\NAT@sort@cites{#3}%
@@ -155,10 +166,9 @@
\fi
}{#1}{#2}%
}%
-\renewcommand\NAT@citesuper[3]{\ifNAT@swa
- \if*#2*\else#2\NAT@spacechar\fi
-\unskip\kern\p@\textsuperscript{\NAT@@open#1\NAT@@close\if*#3*\else#3\fi}%
- \else #1\fi\endgroup}
+\renewcommand\NAT@cite%
+ [3]{\ifNAT@swa\NAT@@open\if*#2*\else#2\NAT@spacechar\fi
+ #1\NAT@@close\if*#3*\else\textsuperscript{#3}\fi\else#1\fi\endgroup}
\def\NAT@citex%
[#1][#2]#3{%
\NAT@reset@parser
@@ -251,9 +261,6 @@
\if\relax\NAT@date\relax\else\NAT@@close\fi
\if*#2*\else\textsuperscript{#2}\fi
\fi}{#1}{#2}}
-\renewcommand\NAT@cite%
- [3]{\ifNAT@swa\NAT@@open\if*#2*\else#2\NAT@spacechar\fi
- #1\NAT@@close\if*#3*\else\textsuperscript{#3}\fi\else#1\fi\endgroup}
\renewcommand\@biblabel[1]{[#1]\hfill}
\g@addto@macro\UrlBreaks{%
\do0\do1\do2\do3\do4\do5\do6\do7\do8\do9%