summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/biblatex-gb7714-2015
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2024-03-27 20:49:08 +0000
committerKarl Berry <karl@freefriends.org>2024-03-27 20:49:08 +0000
commit39c3eafd843809961683c31bbaef4dce10e12909 (patch)
tree3e7fd68706509e1213b8465b80ab087ce120a880 /Master/texmf-dist/tex/latex/biblatex-gb7714-2015
parentfd5e9c3fd2ef4114ff660dd720d047317bd0eb2a (diff)
biblatex-gb7714-2015 (27mar24)
git-svn-id: svn://tug.org/texlive/trunk@70787 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-gb7714-2015')
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015.bbx82
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ay.bbx81
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ay.cbx12
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ms.bbx83
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ms.cbx2
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015mx.bbx81
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015mx.cbx2
7 files changed, 260 insertions, 83 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015.bbx b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015.bbx
index bc09f63c6eb..6042720bc30 100644
--- a/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015.bbx
+++ b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015.bbx
@@ -11,7 +11,7 @@
%
% 版本和时间信息
%
-\def\versionofgbtstyle{2024/02/10 v1.1p}
+\def\versionofgbtstyle{2024/03/27 v1.1q}
\def\versionofbiblatex{\abx@version}
\ProvidesFile{gb7714-2015.bbx}[\versionofgbtstyle biblatex bibliography style]
%\RequireBiber[3]%显式指定用biber后端,当用bibtex时会报错,但其实不会影响编译,只是采用bibtex后无法达成格式需求
@@ -236,6 +236,14 @@
% 设置宏包选项
%=====================================================================
%
+ % 增加一个控制是否输出and others信息的选项
+ % 20240315,v1.1p,hzz
+ \newtoggle{bbx:gbnoothers}
+ \DeclareBibliographyOption{gbnoothers}[false]{%biblatex低版本
+ \settoggle{bbx:gbnoothers}{#1}}
+ \ExecuteBibliographyOptions{gbnoothers}
+
+ %
% 增加一个控制是否调整日期输出位置的选项mergedate
% 为兼容性考虑,但实际不产生作用了,因为如果要使用ay样式可以直接从bibstyle进入
% 因为使用string所以只适用于biblatex3.3以上版本
@@ -960,6 +968,7 @@
bibliography = {\str@bibliography},
references = {\str@references},
bytranslatorcn = {\str@bytranslator},%\addperiod,%将trans. by 改成 译\addcomma\
+ byeditor={\iffieldequalstr{userd}{chinese}{\str@editorcn}{ed\adddotspace by}},
and = {\addcomma},%将第2和3人名间的and符号改成逗号,用\finalnamedelim命令也可以定义,参见3.9.1节
andcn = {\addcomma},%and本地化字符串的中文对应词
andincitecn = {\str@andcn},%将标注中的分开,便于与文献表中的区分
@@ -1848,37 +1857,31 @@
}
%用于人工的为条目或条目集添加域
\newcommand{\addEntryField}[3]{%
- \edef\entrykeya{#1}
- \edef\entrykeyb{#2}
- \edef\entrykeyc{#3}
+ \edef\entrykeya{#1}%
+ \edef\entrykeyb{#2}%
+ \edef\entrykeyc{#3}%
\DeclareStyleSourcemap{
\maps[datatype=bibtex]{
\map[foreach={#1}]{
\step[fieldsource=entrykey, match=\regexp{$MAPLOOP}, final]
\step[fieldset=\entrykeyb, fieldvalue=\entrykeyc]
}
- \map{%处理在bib文件中直接给出文献的姓名格式为lowercase的情况
- \step[fieldsource=nameformat,match=lowercase,final]
- \step[fieldset=namefmtid,fieldvalue={1}]
- }
- \map{%处理在bib文件中直接给出文献的姓名格式为givenahead的情况
- \step[fieldsource=nameformat,match=givenahead,final]
- \step[fieldset=namefmtid,fieldvalue={2}]
- }
- \map{%处理在bib文件中直接给出文献的姓名格式为familyahead的情况
- \step[fieldsource=nameformat,match=familyahead,final]
- \step[fieldset=namefmtid,fieldvalue={3}]
- }
- \map{%处理在bib文件中直接给出文献的姓名格式为pinyin的情况
- \step[fieldsource=nameformat,match=pinyin,final]
- \step[fieldset=namefmtid,fieldvalue={4}]
- }
- \map{%处理在bib文件中直接给出文献的姓名格式为全拼的情况
- \step[fieldsource=nameformat,match=quanpin,final]
- \step[fieldset=namefmtid,fieldvalue={6}]
- }
}
- }
+ }%
+ }
+
+%用于人工的为条目或条目集删除域
+\newcommand{\delEntryField}[2]{%
+ \edef\entrykeya{#1}%
+ \edef\entrykeyb{#2}%
+ \DeclareStyleSourcemap{
+ \maps[datatype=bibtex,overwrite]{
+ \map[foreach={#1}]{
+ \step[fieldsource=entrykey, match=\regexp{$MAPLOOP}, final]
+ \step[fieldset=\entrykeyb, fieldvalue={}]
+ }
+ }
+ }%
}
%
@@ -2355,7 +2358,7 @@ test {\iftoggle{iftlseven}}%biblatex<=3.7
\DeclareFieldFormat{gbtypeflag}{%
\iftoggle{bbx:gbmedium}%
{\iftoggle{bbx:url}%
- {\iffieldundef{url}%当存在url时,增加一个OL标识符
+ {\ifboolexpr{ test {\iffieldundef{url}} and test {\iffieldundef{doi}} and test {\iffieldundef{eprint}} }%\iffieldundef{url}%当存在url时,增加一个OL标识符->改为当存在doi或eprint或url时增加OL标识符
{\printdelim{titletypedelim}\printtext{\gbleftbracket}\nobreak#1\nobreak\printtext{\iffieldundef{medium}{}{{\SlashFont/}\thefield{medium}}\gbrightbracket}}%
{\printdelim{titletypedelim}\printtext{\gbleftbracket}\nobreak#1\nobreak\printtext{{\SlashFont/}OL\gbrightbracket}}%
}%
@@ -2476,6 +2479,18 @@ test {\iftoggle{iftlseven}}%biblatex<=3.7
\patchcmd{\abx@macro@title}{\newunitpunct}{}{}{}}}{}
}
+%
+\newbibmacro*{byeditor+others}{%
+ \ifnameundef{editor}
+ {}
+ {\iffieldequalstr{userd}{chinese}{}{\usebibmacro{byeditor+othersstrg}%
+ \setunit{\addspace}}%
+ \printnames[byeditor]{editor}%
+ \iffieldequalstr{userd}{chinese}{\usebibmacro{byeditor+othersstrg}}{}%
+ \clearname{editor}%
+ \newunit}%
+ \usebibmacro{byeditorx}%
+ \usebibmacro{bytranslator+others}}
%
% 修改译者位置格式
@@ -2485,8 +2500,7 @@ test {\iftoggle{iftlseven}}%biblatex<=3.7
\renewbibmacro*{bytranslator+others}{\bibauthorfont%
\ifnameundef{translator}
{}
- {\iffieldequalstr{usere}{chinese}{}{\usebibmacro{bytranslator+othersstrg}}%
- %\setunit{\addspace}%
+ {\iffieldequalstr{usere}{chinese}{}{\usebibmacro{bytranslator+othersstrg}\setunit{\addspace}}%
\printnames[bytranslator]{translator}%
\clearname{translator}%
%从macro*{bytranslator+othersstrg}%中可以看到当地化字符串格式的引用前的代码处理
@@ -2792,7 +2806,9 @@ test {\iftoggle{iftlseven}}%biblatex<=3.7
{\namepartprefix}
{\namepartsuffix}%
\fi
- \usebibmacro{name:andothers}}
+\iftoggle{bbx:gbnoothers}{}%
+ {\usebibmacro{name:andothers}}%
+}
\DeclareNameAlias{default}{namefmtselected}%姓名的默认格式采用可选的模式
\DeclareNameAlias{sortname}{default}% Used in the bibliography %family-given/given-family
@@ -3092,8 +3108,10 @@ test {\iftoggle{iftlseven}}%biblatex<=3.7
{\usebibmacro{name:first-last}{#1}{#3}{#5}{#7}}}%
\or
\usebibmacro{name:gbquanpin}{#1}{#3}{#5}{#7}%
- \fi
- \usebibmacro{name:andothers}}
+ \fi%
+\iftoggle{bbx:gbnoothers}{}%
+ {\usebibmacro{name:andothers}}%
+ }%
}
%
@@ -4218,7 +4236,7 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{
\usebibmacro{institution+location+date}%
%\newunit\newblock
\usebibmacro{chapter+pages}%
- \iffieldundef{url}{}{a%当没有网址时也不输出修改或更新日期
+ \iffieldundef{url}{}{%当没有网址时也不输出修改或更新日期
\usebibmacro{modifydate}}%修改或更新日期为带括号的时间
\usebibmacro{doi+eprint+url}%
\newunit
diff --git a/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ay.bbx b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ay.bbx
index 73316ea3cb4..01a0f05a6bf 100644
--- a/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ay.bbx
+++ b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ay.bbx
@@ -10,7 +10,7 @@
%
% 版本和时间信息
%
-\def\versionofgbtstyle{2024/02/10 v1.1p}
+\def\versionofgbtstyle{2024/03/27 v1.1q}
\def\versionofbiblatex{\abx@version}
\ProvidesFile{gb7714-2015ay.bbx}[\versionofgbtstyle biblatex bibliography style]
%\RequireBiber[3]%显式指定用biber后端,当用bibtex时会报错,但其实不会影响编译,只是采用bibtex后无法达成格式需求
@@ -233,6 +233,14 @@
% 设置宏包选项
%=====================================================================
%
+ % 增加一个控制是否输出and others信息的选项
+ % 20240315,v1.1p,hzz
+ \newtoggle{bbx:gbnoothers}
+ \DeclareBibliographyOption{gbnoothers}[false]{%biblatex低版本
+ \settoggle{bbx:gbnoothers}{#1}}
+ \ExecuteBibliographyOptions{gbnoothers}
+
+ %
% 增加一个控制是否输出文献载体的选项
% 20191125,v1,0s,hzz
\newtoggle{bbx:gbmedium}
@@ -913,6 +921,7 @@
bibliography = {\str@bibliography},
references = {\str@references},
bytranslatorcn= {\str@bytranslator\adddot}, %将trans. by 改成 译
+ byeditor={\iffieldequalstr{userd}{chinese}{\str@editorcn}{ed\adddotspace by}},
and = {\addcomma},%将第2和3人名见的and符号改成 逗号,用\finalnamedelim命令也可以定义,参见3.9.1节
andcn = {\addcomma},%\str@andcn\ and本地化字符串的中文对应词
andincitecn = {\str@andcn},%将标注中的分开,便于与文献表中的区分
@@ -1675,37 +1684,31 @@
}
%用于人工的为条目或条目集添加域
\newcommand{\addEntryField}[3]{%
- \edef\entrykeya{#1}
- \edef\entrykeyb{#2}
- \edef\entrykeyc{#3}
+ \edef\entrykeya{#1}%
+ \edef\entrykeyb{#2}%
+ \edef\entrykeyc{#3}%
\DeclareStyleSourcemap{
\maps[datatype=bibtex]{
\map[foreach={#1}]{
\step[fieldsource=entrykey, match=\regexp{$MAPLOOP}, final]
\step[fieldset=\entrykeyb, fieldvalue=\entrykeyc]
}
- \map{%处理在bib文件中直接给出文献的姓名格式为lowercase的情况
- \step[fieldsource=nameformat,match=lowercase,final]
- \step[fieldset=namefmtid,fieldvalue={1}]
- }
- \map{%处理在bib文件中直接给出文献的姓名格式为givenahead的情况
- \step[fieldsource=nameformat,match=givenahead,final]
- \step[fieldset=namefmtid,fieldvalue={2}]
- }
- \map{%处理在bib文件中直接给出文献的姓名格式为familyahead的情况
- \step[fieldsource=nameformat,match=familyahead,final]
- \step[fieldset=namefmtid,fieldvalue={3}]
- }
- \map{%处理在bib文件中直接给出文献的姓名格式为pinyin的情况
- \step[fieldsource=nameformat,match=pinyin,final]
- \step[fieldset=namefmtid,fieldvalue={4}]
- }
- \map{%处理在bib文件中直接给出文献的姓名格式为全拼的情况
- \step[fieldsource=nameformat,match=quanpin,final]
- \step[fieldset=namefmtid,fieldvalue={6}]
- }
}
- }
+ }%
+ }
+
+%用于人工的为条目或条目集删除域
+\newcommand{\delEntryField}[2]{%
+ \edef\entrykeya{#1}%
+ \edef\entrykeyb{#2}%
+ \DeclareStyleSourcemap{
+ \maps[datatype=bibtex,overwrite]{
+ \map[foreach={#1}]{
+ \step[fieldsource=entrykey, match=\regexp{$MAPLOOP}, final]
+ \step[fieldset=\entrykeyb, fieldvalue={}]
+ }
+ }
+ }%
}
%
@@ -2213,7 +2216,7 @@ test {\iftoggle{iftlseven}}%biblatex<=3.7
\DeclareFieldFormat{gbtypeflag}{%
\iftoggle{bbx:gbmedium}%
{\iftoggle{bbx:url}%
- {\iffieldundef{url}%当存在url时,增加一个OL标识符
+ {\ifboolexpr{ test {\iffieldundef{url}} and test {\iffieldundef{doi}} and test {\iffieldundef{eprint}} }%\iffieldundef{url}%当存在url时,增加一个OL标识符->改为当存在doi或eprint或url时增加OL标识符
{\printdelim{titletypedelim}\printtext{\gbleftbracket}\nobreak#1\nobreak\printtext{\iffieldundef{medium}{}{{\SlashFont/}\thefield{medium}}\gbrightbracket}}%
{\printdelim{titletypedelim}\printtext{\gbleftbracket}\nobreak#1\nobreak\printtext{{\SlashFont/}OL\gbrightbracket}}%
}%
@@ -2334,6 +2337,19 @@ test {\iftoggle{iftlseven}}%biblatex<=3.7
}
+\renewbibmacro*{byeditor+others}{%
+ \ifnameundef{editor}
+ {}
+ {\iffieldequalstr{userd}{chinese}{}{\usebibmacro{byeditor+othersstrg}%
+ \setunit{\addspace}}%
+ \printnames[byeditor]{editor}%
+ \iffieldequalstr{userd}{chinese}{\usebibmacro{byeditor+othersstrg}}{}%
+ \clearname{editor}%
+ \newunit}%
+ \usebibmacro{byeditorx}%
+ \usebibmacro{bytranslator+others}}
+
+
%
% 修改译者位置格式
% v1.0w,20210401,hzz,增加对英文等其它语言译者的处理
@@ -2342,8 +2358,7 @@ test {\iftoggle{iftlseven}}%biblatex<=3.7
\renewbibmacro*{bytranslator+others}{\bibauthorfont%
\ifnameundef{translator}
{}
- {\iffieldequalstr{usere}{chinese}{}{\usebibmacro{bytranslator+othersstrg}}%
- %\setunit{\addspace}%
+ {\iffieldequalstr{usere}{chinese}{}{\usebibmacro{bytranslator+othersstrg}\setunit{\addspace}}%
\printnames[bytranslator]{translator}%
\clearname{translator}%
%从macro*{bytranslator+othersstrg}%中可以看到当地化字符串格式的引用前的代码处理
@@ -2648,7 +2663,9 @@ test {\iftoggle{iftlseven}}%biblatex<=3.7
{\namepartprefix}
{\namepartsuffix}%
\fi
- \usebibmacro{name:andothers}}
+\iftoggle{bbx:gbnoothers}{}%
+ {\usebibmacro{name:andothers}}%
+}
\DeclareNameAlias{default}{namefmtselected}%姓名的默认格式采用可选的模式
\DeclareNameAlias{sortname}{default}% Used in the bibliography %family-given/given-family
@@ -2948,8 +2965,10 @@ test {\iftoggle{iftlseven}}%biblatex<=3.7
{\usebibmacro{name:first-last}{#1}{#3}{#5}{#7}}}%
\or
\usebibmacro{name:gbquanpin}{#1}{#3}{#5}{#7}%
- \fi
- \usebibmacro{name:andothers}}
+ \fi%
+\iftoggle{bbx:gbnoothers}{}%
+ {\usebibmacro{name:andothers}}%
+ }%
}
%
diff --git a/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ay.cbx b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ay.cbx
index 739528dc1b2..8a1a03d1d2f 100644
--- a/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ay.cbx
+++ b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ay.cbx
@@ -7,7 +7,7 @@
%% Released under the LaTeX Project Public License v1.3c or later
%% ---------------------------------------------------------------
%%
-\ProvidesFile{gb7714-2015.cbx}[a biblatex citation style for GB/T 7714-2015]
+\ProvidesFile{gb7714-2015ay.cbx}[a biblatex citation style for GB/T 7714-2015]
%
% 加载标准样式
@@ -322,16 +322,20 @@ test {\iftoggle{iftlseven}}%3.7=biblatex
\newrobustcmd*{\upcite}{%
\cite}
+\newrobustcmd{\mkbiboutparens}[1]{%
+ \unspace\allowhyphens%
+\begingroup\mkbibleftborder#1\mkbibrightborder\endgroup}%
+
%
% 重定义parencite命令
%
-\DeclareCiteCommand{\parencite}%[\mkbibparens]
+\DeclareCiteCommand{\parencite}[\mkbiboutparens]%
{\usebibmacro{cite:init}%
- \mkbibleftborder\usebibmacro{prenote}}%
+ \usebibmacro{prenote}}%
{\usebibmacro{citeindex}%
\usebibmacro{cite}}
{}
- {\usebibmacro{postnote}\mkbibrightborder}
+ {\usebibmacro{postnote}}
%
% 重定义footcite需要使用的命令
diff --git a/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ms.bbx b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ms.bbx
index a4668eb0ff0..3ff6cc21b67 100644
--- a/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ms.bbx
+++ b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ms.bbx
@@ -11,7 +11,7 @@
%
% 版本和时间信息
%
-\def\versionofgbtstyle{2024/02/10 v1.1p}
+\def\versionofgbtstyle{2024/03/27 v1.1q}
\def\versionofbiblatex{\abx@version}
\ProvidesFile{gb7714-2015ms.bbx}[\versionofgbtstyle biblatex bibliography style]
%\RequireBiber[3]%显式指定用biber后端,当用bibtex时会报错,但其实不会影响编译,只是采用bibtex后无法达成格式需求
@@ -120,6 +120,14 @@
% 设置宏包选项
%=====================================================================
%
+ % 增加一个控制是否输出and others信息的选项
+ % 20240315,v1.1p,hzz
+ \newtoggle{bbx:gbnoothers}
+ \DeclareBibliographyOption{gbnoothers}[false]{%biblatex低版本
+ \settoggle{bbx:gbnoothers}{#1}}
+ \ExecuteBibliographyOptions{gbnoothers}
+
+ %
% 增加一个控制是否输出文献载体的选项
% 20191125,v1,0s,hzz
\newtoggle{bbx:gbmedium}
@@ -384,6 +392,13 @@
\def\str@mathesiscn{硕士学位论文}
\def\str@phdthesiscn{博士学位论文}
\def\str@editorcn{主编}
+ \def\str@editorscn{主编}
+ \def\str@compilerscn{整理}
+ \def\str@compilercn{整理}
+ \def\str@revisercn{编}
+ \def\str@reviserscn{编}
+ \def\str@foundercn{编著}
+ \def\str@founderscn{编著}
\AtEndOfPackage{%
\iftoggle{bbx:codegbk}{%
@@ -636,6 +651,12 @@
\NewBibliographyString{editorcn}
\NewBibliographyString{editorscn}
\NewBibliographyString{bytranslatorcn}
+ \NewBibliographyString{compilercn}
+ \NewBibliographyString{compilerscn}
+ \NewBibliographyString{revisercn}
+ \NewBibliographyString{reviserscn}
+ \NewBibliographyString{foundercn}
+ \NewBibliographyString{founderscn}
%
@@ -648,6 +669,7 @@
bibliography = {\str@bibliography},
references = {\str@references},
bytranslatorcn = {\str@bytranslator},%\addperiod,%将trans. by 改成 译
+ byeditor={\iffieldequalstr{userd}{chinese}{\str@editorcn}{ed\adddotspace by}},
and = {\addcomma},%将第2和3人名间的and符号改成逗号,用\finalnamedelim命令也可以定义,参见3.9.1节
andcn = {\addcomma},%and本地化字符串的中文对应词
andincitecn = {\addcomma},%将标注中的分开,便于与文献表中的区分
@@ -671,6 +693,12 @@
phdthesiscn={\str@phdthesiscn},
editorscn={\str@editorcn},
editorcn={\str@editorcn},
+ compilerscn={\str@compilerscn},
+ compilercn={\str@compilercn},
+ reviserscn={\str@reviserscn},
+ revisercn={\str@revisercn},
+ founderscn={\str@founderscn},
+ foundercn={\str@foundercn},
}
%
@@ -1263,6 +1291,35 @@
}
}
+%用于人工的为条目或条目集添加域
+\newcommand{\addEntryField}[3]{%
+ \edef\entrykeya{#1}%
+ \edef\entrykeyb{#2}%
+ \edef\entrykeyc{#3}%
+ \DeclareStyleSourcemap{
+ \maps[datatype=bibtex]{
+ \map[foreach={#1}]{
+ \step[fieldsource=entrykey, match=\regexp{$MAPLOOP}, final]
+ \step[fieldset=\entrykeyb, fieldvalue=\entrykeyc]
+ }
+ }
+ }%
+ }
+
+%用于人工的为条目或条目集删除域
+\newcommand{\delEntryField}[2]{%
+ \edef\entrykeya{#1}%
+ \edef\entrykeyb{#2}%
+ \DeclareStyleSourcemap{
+ \maps[datatype=bibtex,overwrite]{
+ \map[foreach={#1}]{
+ \step[fieldsource=entrykey, match=\regexp{$MAPLOOP}, final]
+ \step[fieldset=\entrykeyb, fieldvalue={}]
+ }
+ }
+ }%
+ }
+
%
%驱动别名等价于驱动层映射
%
@@ -1445,7 +1502,7 @@
\DeclareFieldFormat{gbtypeflag}{%
\iftoggle{bbx:gbmedium}%
{\iftoggle{bbx:url}%
- {\iffieldundef{url}%当存在url时,增加一个OL标识符
+ {\ifboolexpr{test {\iffieldundef{url}} and test {\iffieldundef{doi}} and test {\iffieldundef{eprint}}}%\iffieldundef{url}%当存在url时,增加一个OL标识符->改为当存在doi或eprint或url时增加OL标识符
{\allowbreak\printtext{\gbleftbracket}\nobreak#1\nobreak\printtext{\iffieldundef{medium}{}{{\SlashFont/}\thefield{medium}}\gbrightbracket}}%
{\allowbreak\printtext{\gbleftbracket}\nobreak#1\nobreak\printtext{{\SlashFont/}OL\gbrightbracket}}%
}%
@@ -1590,8 +1647,10 @@
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}%
-\fi
- \usebibmacro{name:andothers}}
+\fi%
+\iftoggle{bbx:gbnoothers}{}%
+ {\usebibmacro{name:andothers}}%
+}
\DeclareNameAlias{default}{namefmtselected}%姓名的默认格式采用可选的模式
\DeclareNameAlias{sortname}{default}% Used in the bibliography %family-given/given-family
@@ -1935,6 +1994,17 @@ togl{bbx:gbstyle} or test {\iffieldequalstr{userd}{chinese}}%
\href{\thefield{url}}{##1}}}{##1}}%重设标题格式,将其修改为首字母大写
\DeclareFieldFormat{pages}{##1}%去掉前面引导页码的pp.等字符,\mkpageprefix[bookpagination]{##1}
}%
+\renewbibmacro*{byeditor+others}{%
+ \ifnameundef{editor}%
+ {}%
+ {\iffieldequalstr{userd}{chinese}{}{\usebibmacro{byeditor+othersstrg}%
+ \setunit{\addspace}}%
+ \printnames[byeditor]{editor}%
+ \iffieldequalstr{userd}{chinese}{\usebibmacro{byeditor+othersstrg}}{}%
+ \clearname{editor}%
+ \newunit}%
+ \usebibmacro{byeditorx}%
+ \usebibmacro{bytranslator+others}}%
%
% 修改译者位置格式
% v1.0w,20210401,hzz,增加对英文等其它语言译者的处理
@@ -1943,8 +2013,7 @@ togl{bbx:gbstyle} or test {\iffieldequalstr{userd}{chinese}}%
\renewbibmacro*{bytranslator+others}{\bibauthorfont%
\ifnameundef{translator}
{}
- {\iffieldequalstr{usere}{chinese}{}{\usebibmacro{bytranslator+othersstrg}}%
- %\setunit{\addspace}%
+ {\iffieldequalstr{usere}{chinese}{}{\usebibmacro{bytranslator+othersstrg}\setunit{\addspace}}%
\printnames[bytranslator]{translator}%
\clearname{translator}%
%从macro*{bytranslator+othersstrg}%中可以看到当地化字符串格式的引用前的代码处理
@@ -2092,7 +2161,7 @@ togl{bbx:gbstyle} or test {\iffieldequalstr{userd}{chinese}}%
\iffieldundef{titleaddon}{}{\setunit{\subtitlepunct}\printfield{titleaddon}}%判断一下titleaddon
\ifboolexpr{test{\ifentrytype{book}} and (not test{\iffieldundef{volume}})}%判断一下book类有没有volume
{\setunit{\subtitlepunct}\printfield{volume}}{}%
- \ifboolexpr{(test{\ifentrytype{archive}} or test{\ifentrytype{online}}) and (not test{\iffieldundef{number}})}%判断一下archive类有没有number
+ \ifboolexpr{(test{\ifentrytype{archive}} or test{\ifentrytype{online}}) and (not test{\iffieldundef{number}})}%判断一下archive类有没有number
{\setunit{\subtitlepunct}\printfield{number}}{}%
\iftoggle{bbx:gbtype}%
{\iffieldundef{entrysubtype}{\printfield[gbtypeflag]{usera}}%在标题后直接给出文献标识字母,判断一下,是否是报纸和标准
diff --git a/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ms.cbx b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ms.cbx
index fce42d508bf..333b873eec8 100644
--- a/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ms.cbx
+++ b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ms.cbx
@@ -7,7 +7,7 @@
%% Released under the LaTeX Project Public License v1.3c or later
%% ---------------------------------------------------------------
%%
-\ProvidesFile{gb7714-2015.cbx}[a biblatex citation style for GB/T 7714-2015]
+\ProvidesFile{gb7714-2015ms.cbx}[a biblatex citation style for GB/T 7714-2015]
%
% 加载样式
diff --git a/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015mx.bbx b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015mx.bbx
index 8351664a2a0..27b316d648d 100644
--- a/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015mx.bbx
+++ b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015mx.bbx
@@ -11,7 +11,7 @@
%
% 版本和时间信息
%
-\def\versionofgbtstyle{2024/02/10 v1.1p}
+\def\versionofgbtstyle{2024/03/27 v1.1q}
\def\versionofbiblatex{\abx@version}
\ProvidesFile{gb7714-2015mx.bbx}[\versionofgbtstyle biblatex bibliography style]
%\RequireBiber[3]%显式指定用biber后端,当用bibtex时会报错,但其实不会影响编译,只是采用bibtex后无法达成格式需求
@@ -147,6 +147,15 @@
% 设置宏包选项
%=====================================================================
%
+ % 增加一个控制是否输出and others信息的选项
+ % 20240315,v1.1p,hzz
+ \newtoggle{bbx:gbnoothers}
+ \DeclareBibliographyOption{gbnoothers}[false]{%biblatex低版本
+ \settoggle{bbx:gbnoothers}{#1}}
+ \ExecuteBibliographyOptions{gbnoothers}
+
+
+ %
% 增加一个控制是否输出type域的选项
% 20190212,v1,0q,hzz
\newtoggle{bbx:gbfieldtype}
@@ -383,6 +392,13 @@
\def\str@mathesiscn{硕士学位论文}
\def\str@phdthesiscn{博士学位论文}
\def\str@editorcn{主编}
+ \def\str@editorscn{主编}
+ \def\str@compilerscn{整理}
+ \def\str@compilercn{整理}
+ \def\str@revisercn{编}
+ \def\str@reviserscn{编}
+ \def\str@foundercn{编著}
+ \def\str@founderscn{编著}
\AtEndOfPackage{%
\iftoggle{bbx:codegbk}{%
@@ -680,6 +696,12 @@
\NewBibliographyString{editorcn}
\NewBibliographyString{editorscn}
\NewBibliographyString{bytranslatorcn}
+ \NewBibliographyString{compilercn}
+ \NewBibliographyString{compilerscn}
+ \NewBibliographyString{revisercn}
+ \NewBibliographyString{reviserscn}
+ \NewBibliographyString{foundercn}
+ \NewBibliographyString{founderscn}
@@ -694,6 +716,7 @@
bibliography = {\str@bibliography},
references = {\str@references},
bytranslatorcn = {\str@bytranslator},%\addperiod,%将trans. by 改成 译\addcomma\
+ byeditor={\iffieldequalstr{userd}{chinese}{\str@editorcn}{ed\adddotspace by}},
and = {\addcomma},%将第2和3人名间的and符号改成逗号,用\finalnamedelim命令也可以定义,参见3.9.1节
andcn = {\addcomma},%and本地化字符串的中文对应词
andincitecn = {\addcomma},%将标注中的分开,便于与文献表中的区分
@@ -717,6 +740,12 @@
phdthesiscn={\str@phdthesiscn},
editorscn={\str@editorcn},
editorcn={\str@editorcn},
+ compilerscn={\str@compilerscn},
+ compilercn={\str@compilercn},
+ reviserscn={\str@reviserscn},
+ revisercn={\str@revisercn},
+ founderscn={\str@founderscn},
+ foundercn={\str@foundercn},
}
%
@@ -1407,7 +1436,34 @@
}
}
+%用于人工的为条目或条目集添加域
+\newcommand{\addEntryField}[3]{%
+ \edef\entrykeya{#1}%
+ \edef\entrykeyb{#2}%
+ \edef\entrykeyc{#3}%
+ \DeclareStyleSourcemap{
+ \maps[datatype=bibtex]{
+ \map[foreach={#1}]{
+ \step[fieldsource=entrykey, match=\regexp{$MAPLOOP}, final]
+ \step[fieldset=\entrykeyb, fieldvalue=\entrykeyc]
+ }
+ }
+ }%
+ }
+%用于人工的为条目或条目集删除域
+\newcommand{\delEntryField}[2]{%
+ \edef\entrykeya{#1}%
+ \edef\entrykeyb{#2}%
+ \DeclareStyleSourcemap{
+ \maps[datatype=bibtex,overwrite]{
+ \map[foreach={#1}]{
+ \step[fieldsource=entrykey, match=\regexp{$MAPLOOP}, final]
+ \step[fieldset=\entrykeyb, fieldvalue={}]
+ }
+ }
+ }%
+ }
%
@@ -1751,7 +1807,7 @@
\DeclareFieldFormat{gbtypeflag}{%
\iftoggle{bbx:gbmedium}%
{\iftoggle{bbx:url}%
- {\iffieldundef{url}%当存在url时,增加一个OL标识符
+ {\ifboolexpr{ test {\iffieldundef{url}} and test {\iffieldundef{doi}} and test {\iffieldundef{eprint}} }%\iffieldundef{url}%当存在url时,增加一个OL标识符->改为当存在doi或eprint或url时增加OL标识符
{\allowbreak\printtext{\gbleftbracket}\nobreak#1\nobreak\printtext{\iffieldundef{medium}{}{{\SlashFont/}\thefield{medium}}\gbrightbracket}}%
{\allowbreak\printtext{\gbleftbracket}\nobreak#1\nobreak\printtext{{\SlashFont/}OL\gbrightbracket}}%
}%
@@ -1867,7 +1923,17 @@
\patchcmd{\abx@macro@title}{\newunitpunct}{}{}{}}}{}
}
-
+\newbibmacro*{byeditor+others}{%
+ \ifnameundef{editor}
+ {}
+ {\iffieldequalstr{userd}{chinese}{}{\usebibmacro{byeditor+othersstrg}%
+ \setunit{\addspace}}%
+ \printnames[byeditor]{editor}%
+ \iffieldequalstr{userd}{chinese}{\usebibmacro{byeditor+othersstrg}}{}%
+ \clearname{editor}%
+ \newunit}%
+ \usebibmacro{byeditorx}%
+ \usebibmacro{bytranslator+others}}
%
% 修改译者位置格式
% v1.0w,20210401,hzz,增加对英文等其它语言译者的处理
@@ -1876,8 +1942,7 @@
\renewbibmacro*{bytranslator+others}{\bibauthorfont%
\ifnameundef{translator}
{}
- {\iffieldequalstr{usere}{chinese}{}{\usebibmacro{bytranslator+othersstrg}}%
- %\setunit{\addspace}%
+ {\iffieldequalstr{usere}{chinese}{}{\usebibmacro{bytranslator+othersstrg}\setunit{\addspace}}%
\printnames[bytranslator]{translator}%
\clearname{translator}%
%从macro*{bytranslator+othersstrg}%中可以看到当地化字符串格式的引用前的代码处理
@@ -2172,8 +2237,10 @@
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}%
-\fi
- \usebibmacro{name:andothers}}
+\fi%
+\iftoggle{bbx:gbnoothers}{}%
+ {\usebibmacro{name:andothers}}%
+}
\DeclareNameAlias{default}{namefmtselected}%姓名的默认格式采用可选的模式
\DeclareNameAlias{sortname}{default}% Used in the bibliography %family-given/given-family
diff --git a/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015mx.cbx b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015mx.cbx
index 1beb8d05ca6..e7d16c09b4f 100644
--- a/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015mx.cbx
+++ b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015mx.cbx
@@ -7,7 +7,7 @@
%% Released under the LaTeX Project Public License v1.3c or later
%% ---------------------------------------------------------------
%%
-\ProvidesFile{gb7714-2015.cbx}[a biblatex citation style for GB/T 7714-2015]
+\ProvidesFile{gb7714-2015mx.cbx}[a biblatex citation style for GB/T 7714-2015]
%
% 加载标准样式