From c992f5f9d108bdb4ce16487066ccc07b5ed0abdc Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 20 Aug 2021 22:51:31 +0000 Subject: biblatex-gb7714-2015 (21aug21) git-svn-id: svn://tug.org/texlive/trunk@60286 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/biblatex-gb7714-2015/gb7714-1987.bbx | 206 +++++++++++++++++++++ .../tex/latex/biblatex-gb7714-2015/gb7714-1987.cbx | 13 ++ .../latex/biblatex-gb7714-2015/gb7714-1987ay.bbx | 202 ++++++++++++++++++++ .../latex/biblatex-gb7714-2015/gb7714-1987ay.cbx | 21 +++ .../tex/latex/biblatex-gb7714-2015/gb7714-2005.bbx | 54 ++++++ .../tex/latex/biblatex-gb7714-2015/gb7714-2005.cbx | 15 ++ .../latex/biblatex-gb7714-2015/gb7714-2005ay.bbx | 52 ++++++ .../latex/biblatex-gb7714-2015/gb7714-2005ay.cbx | 13 ++ .../tex/latex/biblatex-gb7714-2015/gb7714-2015.bbx | 98 ++++++---- .../tex/latex/biblatex-gb7714-2015/gb7714-2015.cbx | 8 +- .../latex/biblatex-gb7714-2015/gb7714-2015ay.bbx | 95 +++++++--- .../latex/biblatex-gb7714-2015/gb7714-2015ay.cbx | 4 +- .../latex/biblatex-gb7714-2015/gb7714-2015ms.bbx | 165 +++++++++++++---- .../latex/biblatex-gb7714-2015/gb7714-2015ms.cbx | 190 +------------------ .../latex/biblatex-gb7714-2015/gb7714-2015mx.bbx | 206 +++++++++++++++++---- .../latex/biblatex-gb7714-2015/gb7714-2015mx.cbx | 2 +- 16 files changed, 1019 insertions(+), 325 deletions(-) create mode 100644 Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-1987.bbx create mode 100644 Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-1987.cbx create mode 100644 Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-1987ay.bbx create mode 100644 Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-1987ay.cbx create mode 100644 Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2005.bbx create mode 100644 Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2005.cbx create mode 100644 Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2005ay.bbx create mode 100644 Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2005ay.cbx (limited to 'Master/texmf-dist/tex/latex/biblatex-gb7714-2015') diff --git a/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-1987.bbx b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-1987.bbx new file mode 100644 index 00000000000..708655f76fd --- /dev/null +++ b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-1987.bbx @@ -0,0 +1,206 @@ +%% +%% --------------------------------------------------------------- +%% Maintained by huzhenzhen +%% E-mail: hzzmail@163.com +%% Released under the LaTeX Project Public License v1.3c or later +%% --------------------------------------------------------------- +%%注意因为使用了stylemap所以只兼容了biblatex3.7以后的版本 +\ProvidesFile{gb7714-1987.bbx}[2021/05/16 v1.0 a biblatex bibliography style for GB/T 7714-1987] + + +%================================================== +%加载gb样式 +%================================================== +\RequireBibliographyStyle{gb7714-2015} + +%================================================== +% 2005与2015的主要差异: +%1.无doi +%2.文献类型标志(电子文献必备,其他文献任选),引用日期(联机文献必备,其他电子文献任选),这条差异无需处理 +%3.用汉语拼音书写的中国著者姓名不得缩写。标准说是这么说的,但没有任何示例。需要的话可以在bib条目中设置nameformat=quanpin +%4.无关于页码、获取和访问路径的说明。这条差异无需处理 +%5.没有A/CM/DS/Z等新的类型 +%================================================== +% 1987与2005的主要差异: +%1. 没有电子文献。主要考虑将高版本的电子文献转换为misc +%2. 各类文献没有引用日期,获取和访问路径。考虑去掉url和urldate +%3. 没有文献标志类型。考虑去掉文献类型标志和文献载体标志。 +%4. 专著存在文献数量、丛编项、附注项、文献标准编号。这一条不考虑。 +%5. 析出文献:中文用见:,英文用In: +%6. 页码之间的连接符用~ +%7. 英文作者的姓只是首字母大写 +%8. 作者年份制中;文献表中,最后一个作者与年份之间的标点用.加空格。但引用的标注标签上是空格 +%9. 学位论文:用学位论文和dissertation表示。 +%10. 编者会加上编者角色信息。 +%11. 专利输出国别和类型。可以全部放到number中处理。专利的日期也有特点。特殊处理。 +%================================================== + + +%================================================== +%选项设置 +%================================================== +\ExecuteBibliographyOptions{ + gbtype=false, + gbnamefmt=lowercase, + gbfieldtype=true, + gbpunctin=false, + doi=false, + url=false, + } + +%================================================== +%标点设置 +%================================================== +\DefineBibliographyExtras{english}{\renewcommand*{\bibrangedash}{$\sim$}} +\DeclareFieldFormat%将期刊等文献的标题中原来带的引号去掉 + [thesis] + {title}{#1}%\mkbibquote{#1\isdot} + +%================================================== +%字符串设置 +%================================================== +\DefineBibliographyStrings{english}{ + %andincitecn = {和}, + %andincite = {and}, + mathesiscn={学位论文}, + phdthesiscn={学位论文}, + mathesis={[dissertation]}, + phdthesis={[dissertation]}, + in={In:\addspace}, + incn={见:\addspace}, + editorscn={编}, + editorcn={编}, +} + + +%================================================== +%类型转换回来 +%================================================== + \DeclareStyleSourcemap{ + \maps[datatype=bibtex]{ + \map{ + \step[typesource=online, typetarget=misc, final] + } + \map{ + \step[typesource=electronic, typetarget=misc, final] + } + \map{ + \step[typesource=www, typetarget=misc, final] + } + } + } + +%================================================== +%域格式设置 +%================================================== +%专著如果责任者是editor,也输入相关类型 +\renewbibmacro*{editor+others}{% + \ifboolexpr{ + test \ifuseeditor + and + not test {\ifnameundef{editor}} + } + {\usebibmacro{editor}% + \clearname{editor}} + {}} + +%要注意要使用translator那么需要开启usetranslator选项的。 +\renewbibmacro*{translator+others}{% + \ifboolexpr{ + test \ifusetranslator + and + not test {\ifnameundef{translator}} + } + {\renewcommand{\aftertransdelim}{\adddot\addspace}\printnames{translator}% + \clearname{translator}} + {}} + + +%专利的日期 +\renewbibmacro*{newsdate}{%%新增加一个公告日期,公开日期或新闻日期 + \iffieldundef{year}{}{\printfield{year}% + \iffieldundef{month}{}{\adddot\printtext{\thefield{month}}% + \iffieldundef{day}{}{\adddot\printfield{day}}}}% + } + +% +% 重设专利title的输出,将文献类型标识符输出出去 +% +\newbibmacro*{patenttitle}{%原输出来自biblatex.def文件 + \ifboolexpr{% + test{\iffieldundef{title}}% + and% + test{\iffieldundef{subtitle}}% + }% + {}% + {\printtext[title]{\bibtitlefont% + \printfield[titlecase]{title}% + \ifboolexpr{test {\iffieldundef{subtitle}}}%这里增加了对子标题的判断,解决不判断多一个点的问题 + {}{\setunit{\subtitlepunct}% + \printfield[titlecase]{subtitle}}% + \iffieldundef{titleaddon}{}%判断一下titleaddon,否则直接加可能多一个空格 + {\setunit{\subtitlepunct}\printfield{titleaddon}}% + \newunit\printfield{number}%写专利号 + \iftoggle{bbx:gbtype}{\printfield[gbtypeflag]{usera}}{}% + %\iffieldundef{booktitle}{\newunit}{}%当title是析出时,不要标点 + %\newunit + }% +}% +} + + +%================================================== +%条目的输出驱动 +%================================================== +% +% 论文类型单独处理:增加论文类型信息 +% +% +\DeclareBibliographyDriver{thesis}{% + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{author/translator+others}% +\ifnameundef{namea}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 + \usebibmacro{title}% + \iftoggle{bbx:gbstrict}{}{% + \newunit% + \printlist{language}% + \newunit\newblock + \usebibmacro{byauthor}}% + \newunit\newblock + \usebibmacro{byeditor+others}%增加的译者信息 + \newunit\newblock + \iftoggle{bbx:gbfieldtype}{% + \setunit{\addcolon\addspace}% + \printfield{type}% + \setunit*{\addspace}}{}% + \printfield{number}% + \newunit\newblock + \printfield{version}% + \newunit + \printfield{note}% + \newunit\newblock + \usebibmacro{institution+location+date}% + %\newunit\newblock + \usebibmacro{chapter+pages}% + \iffieldundef{url}{}{%当没有网址时也不输出修改或更新日期 + \usebibmacro{modifydate}}%修改或更新日期为带括号的时间 + \usebibmacro{doi+eprint+url}% + \newunit + \printfield{pagetotal}% + \newunit\newblock + \iftoggle{bbx:isbn} + {\printfield{isrn}} + {}% + \newunit\newblock +% \usebibmacro{doi+eprint+url}% +% \newunit\newblock + \usebibmacro{addendum+pubstate}% + \setunit{\bibpagerefpunct}\newblock + \usebibmacro{pageref}% + \newunit\newblock + \iftoggle{bbx:related} + {\usebibmacro{related:init}% + \usebibmacro{related}} + {}% + \usebibmacro{finentry}\usebibmacro{annotation}} diff --git a/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-1987.cbx b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-1987.cbx new file mode 100644 index 00000000000..6f92454b872 --- /dev/null +++ b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-1987.cbx @@ -0,0 +1,13 @@ +%% +%% --------------------------------------------------------------- +%% Maintained by huzhenzhen +%% E-mail: hzzmail@163.com +%% Released under the LaTeX Project Public License v1.3c or later +%% --------------------------------------------------------------- +%% +\ProvidesFile{gb7714-1987.cbx}[2021/05/16 v1.0 a biblatex bibliography style for GB/T 7714-1987] + +%================================================== +%加载gb样式 +%================================================== +\RequireCitationStyle{gb7714-2015} % diff --git a/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-1987ay.bbx b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-1987ay.bbx new file mode 100644 index 00000000000..c9004dd7ec9 --- /dev/null +++ b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-1987ay.bbx @@ -0,0 +1,202 @@ +%% +%% --------------------------------------------------------------- +%% Maintained by huzhenzhen +%% E-mail: hzzmail@163.com +%% Released under the LaTeX Project Public License v1.3c or later +%% --------------------------------------------------------------- +%%注意因为使用了stylemap所以只兼容了biblatex3.7以后的版本 +\ProvidesFile{gb7714-1987ay.bbx}[2021/05/16 v1.0 a biblatex bibliography style for GB/T 7714-1987] + + +%================================================== +%加载gb样式 +%================================================== +\RequireBibliographyStyle{gb7714-2015ay} + +%================================================== +% 2005与2015的主要差异: +%1.无doi +%2.文献类型标志(电子文献必备,其他文献任选),引用日期(联机文献必备,其他电子文献任选),这条差异无需处理 +%3.用汉语拼音书写的中国著者姓名不得缩写。标准说是这么说的,但没有任何示例。需要的话可以在bib条目中设置nameformat=quanpin +%4.无关于页码、获取和访问路径的说明。这条差异无需处理 +%5.没有A/CM/DS/Z等新的类型 +%================================================== +% 1987与2005的主要差异: +%1. 没有电子文献。主要考虑将高版本的电子文献转换为misc +%2. 各类文献没有引用日期,获取和访问路径。考虑去掉url和urldate +%3. 没有文献标志类型。考虑去掉文献类型标志和文献载体标志。 +%4. 专著存在文献数量、丛编项、附注项、文献标准编号。这一条不考虑。 +%5. 析出文献:中文用见:,英文用In: +%6. 页码之间的连接符用~ +%7. 英文作者的姓只是首字母大写 +%8. 作者年份制中;文献表中,最后一个作者与年份之间的标点用.加空格。但引用的标注标签上是空格 +%9. 学位论文:用学位论文和dissertation表示。 +%10. 编者会加上编者角色信息。 +%11. 专利输出国别和类型。可以全部放到number中处理。专利的日期也有特点。特殊处理。 +%================================================== + + +%================================================== +%选项设置 +%================================================== +\ExecuteBibliographyOptions{ + gbtype=false, + gbnamefmt=lowercase, + gbfieldtype=true, + gbpunctin=false, + doi=false, + url=false, + } + +%================================================== +%标点设置 +%================================================== +\DefineBibliographyExtras{english}{\renewcommand*{\bibrangedash}{$\sim$}} +\DeclareFieldFormat%将期刊等文献的标题中原来带的引号去掉 + [thesis] + {title}{#1}%\mkbibquote{#1\isdot} +\DeclareDelimFormat[bib,biblist]{nameyeardelim}{\adddot\space} + +%================================================== +%字符串设置 +%================================================== +\DefineBibliographyStrings{english}{ + %andincitecn = {和}, + %andincite = {and}, + mathesiscn={学位论文}, + phdthesiscn={学位论文}, + mathesis={[dissertation]}, + phdthesis={[dissertation]}, + in={In:\addspace}, + incn={见:\addspace}, + editorscn={编}, + editorcn={编}, +} + + +%================================================== +%类型转换回来 +%================================================== + \DeclareStyleSourcemap{ + \maps[datatype=bibtex]{ + \map{ + \step[typesource=online, typetarget=misc, final] + } + \map{ + \step[typesource=electronic, typetarget=misc, final] + } + \map{ + \step[typesource=www, typetarget=misc, final] + } + } + } + +%================================================== +%域格式设置 +%================================================== +%专著如果责任者是editor,也输入相关类型 +\renewbibmacro*{editor+others}{% + \ifboolexpr{ + test \ifuseeditor + and + not test {\ifnameundef{editor}} + } + {\usebibmacro{bbx:dashcheck} + {\bibnamedash} + {\usebibmacro{editor}% + \usebibmacro{bbx:savehash}}% + \clearname{editor}% + \setunit{\printdelim{nameyeardelim}}}% + {\global\undef\bbx@lasthash + \usebibmacro{labeltitle}% + \setunit*{\printdelim{nonameyeardelim}}}% + \usebibmacro{date+extradate}} + +%专利的日期 +\renewbibmacro*{newsdate}{%%新增加一个公告日期,公开日期或新闻日期 + \iffieldundef{year}{}{\printfield{year}% + \iffieldundef{month}{}{\adddot\printtext{\thefield{month}}% + \iffieldundef{day}{}{\adddot\printfield{day}}}}% + } + +% +% 重设专利title的输出,将文献类型标识符输出出去 +% +\newbibmacro*{patenttitle}{%原输出来自biblatex.def文件 + \ifboolexpr{% + test{\iffieldundef{title}}% + and% + test{\iffieldundef{subtitle}}% + }% + {}% + {\printtext[title]{\bibtitlefont% + \printfield[titlecase]{title}% + \ifboolexpr{test {\iffieldundef{subtitle}}}%这里增加了对子标题的判断,解决不判断多一个点的问题 + {}{\setunit{\subtitlepunct}% + \printfield[titlecase]{subtitle}}% + \iffieldundef{titleaddon}{}%判断一下titleaddon,否则直接加可能多一个空格 + {\setunit{\subtitlepunct}\printfield{titleaddon}}% + \newunit\printfield{number}%写专利号 + \iftoggle{bbx:gbtype}{\printfield[gbtypeflag]{usera}}{}% + %\iffieldundef{booktitle}{\newunit}{}%当title是析出时,不要标点 + %\newunit + }% +}% +} + + +%================================================== +%条目的输出驱动 +%================================================== +% +% 论文类型单独处理:增加论文类型信息 +% +% +\DeclareBibliographyDriver{thesis}{% + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{author/translator+others}% +\ifnameundef{namea}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 + \usebibmacro{title}% + \iftoggle{bbx:gbstrict}{}{% + \newunit% + \printlist{language}% + \newunit\newblock + \usebibmacro{byauthor}}% + \newunit\newblock + \usebibmacro{byeditor+others}%增加的译者信息 + \newunit\newblock + \iftoggle{bbx:gbfieldtype}{% + \setunit{\addcolon\addspace}% + \printfield{type}% + \setunit*{\addspace}}{}% + \printfield{number}% + \newunit\newblock + \printfield{version}% + \newunit + \printfield{note}% + \newunit\newblock + \usebibmacro{institution+location+date}% + %\newunit\newblock + \usebibmacro{chapter+pages}% + \iffieldundef{url}{}{%当没有网址时也不输出修改或更新日期 + \usebibmacro{modifydate}}%修改或更新日期为带括号的时间 + \usebibmacro{doi+eprint+url}% + \newunit + \printfield{pagetotal}% + \newunit\newblock + \iftoggle{bbx:isbn} + {\printfield{isrn}} + {}% + \newunit\newblock +% \usebibmacro{doi+eprint+url}% +% \newunit\newblock + \usebibmacro{addendum+pubstate}% + \setunit{\bibpagerefpunct}\newblock + \usebibmacro{pageref}% + \newunit\newblock + \iftoggle{bbx:related} + {\usebibmacro{related:init}% + \usebibmacro{related}} + {}% + \usebibmacro{finentry}\usebibmacro{annotation}} diff --git a/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-1987ay.cbx b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-1987ay.cbx new file mode 100644 index 00000000000..c32bde0d93f --- /dev/null +++ b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-1987ay.cbx @@ -0,0 +1,21 @@ +%% +%% --------------------------------------------------------------- +%% Maintained by huzhenzhen +%% E-mail: hzzmail@163.com +%% Released under the LaTeX Project Public License v1.3c or later +%% --------------------------------------------------------------- +%% +\ProvidesFile{gb7714-1987ay.cbx}[2021/05/16 v1.0 a biblatex bibliography style for GB/T 7714-1987] + +%================================================== +%加载gb样式 +%================================================== +\RequireCitationStyle{gb7714-2015ay} % + +\ExecuteBibliographyOptions{ + uniquename=false,%不处理姓名歧义 + uniquelist=false +} + +\DeclareDelimFormat[cite,parencite,pagescite]{nameyeardelim}{\space}%\addcomma\space +\DeclareDelimFormat[citet,citep,textcite]{nameyeardelim}{\space}%\addcomma\space diff --git a/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2005.bbx b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2005.bbx new file mode 100644 index 00000000000..12271aa8a82 --- /dev/null +++ b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2005.bbx @@ -0,0 +1,54 @@ +%% +%% --------------------------------------------------------------- +%% erj.bbx --- A bibliography style of Economic Research Journal in china +%% modified from gb7714-2015ay at the request of ddswhu +%% Maintained by huzhenzhen +%% E-mail: hzzmail@163.com +%% Released under the LaTeX Project Public License v1.3c or later +%% --------------------------------------------------------------- +%%注意因为使用了stylemap所以只兼容了biblatex3.7以后的版本 +\ProvidesFile{gb7714-2005.bbx}[2021/05/16 v1.0 a biblatex bibliography style for GB/T 7714-2005] + + +%================================================== +%加载gb样式 +%================================================== +\RequireBibliographyStyle{gb7714-2015} + +%================================================== +%与2015的主要差异: +%1.无doi +%2.文献类型标志(电子文献必备,其他文献任选),引用日期(联机文献必备,其他电子文献任选),这条差异无需处理 +%3.用汉语拼音书写的中国著者姓名不得缩写。标准说是这么说的,但没有任何示例。需要的话可以在bib条目中设置nameformat=quanpin +%4.无关于页码、获取和访问路径的说明。这条差异无需处理 +%5.没有A/CM/DS/Z等新的类型 +%================================================== + + +%================================================== +%选项设置 +%================================================== + \ExecuteBibliographyOptions{ + doi=false, + url=false, + } + +%================================================== +%类型转换回来 +%================================================== + \DeclareStyleSourcemap{ + \maps[datatype=bibtex]{ + \map[overwrite]{% + \pertype{dataset} + \step[fieldset=usera, fieldvalue={Z}]% + } + \map[overwrite]{% + \pertype{archive} + \step[fieldset=usera, fieldvalue={Z}]% + } + \map[overwrite]{% + \pertype{map} + \step[fieldset=usera, fieldvalue={Z}]% + } + } + } diff --git a/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2005.cbx b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2005.cbx new file mode 100644 index 00000000000..fc9f2d14370 --- /dev/null +++ b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2005.cbx @@ -0,0 +1,15 @@ +%% +%% --------------------------------------------------------------- +%% erj.cbx --- A citation style of Economic Research Journal in china +%% modified from gb7714-2015ay for the request by ddswhu +%% Maintained by huzhenzhen +%% E-mail: hzzmail@163.com +%% Released under the LaTeX Project Public License v1.3c or later +%% --------------------------------------------------------------- +%% +\ProvidesFile{gb7714-2005.cbx}[2021/05/16 v1.0 a biblatex bibliography style for GB/T 7714-2005] + +%================================================== +%加载gb样式 +%================================================== +\RequireCitationStyle{gb7714-2015} % diff --git a/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2005ay.bbx b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2005ay.bbx new file mode 100644 index 00000000000..44d089fdddd --- /dev/null +++ b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2005ay.bbx @@ -0,0 +1,52 @@ +%% +%% --------------------------------------------------------------- +%% Maintained by huzhenzhen +%% E-mail: hzzmail@163.com +%% Released under the LaTeX Project Public License v1.3c or later +%% --------------------------------------------------------------- +%%注意因为使用了stylemap所以只兼容了biblatex3.7以后的版本 +\ProvidesFile{gb7714-2005ay.bbx}[2021/05/16 v1.0 a biblatex bibliography style for GB/T 7714-2005] + + +%================================================== +%加载gb样式 +%================================================== +\RequireBibliographyStyle{gb7714-2015ay} + +%================================================== +%与2015的主要差异: +%1.无doi +%2.文献类型标志(电子文献必备,其他文献任选),引用日期(联机文献必备,其他电子文献任选),这条差异无需处理 +%3.用汉语拼音书写的中国著者姓名不得缩写。标准说是这么说的,但没有任何示例。需要的话可以在bib条目中设置nameformat=quanpin +%4.无关于页码、获取和访问路径的说明。这条差异无需处理 +%5.没有A/CM/DS/Z等新的类型 +%================================================== + + +%================================================== +%选项设置 +%================================================== + \ExecuteBibliographyOptions{ + doi=false, + url=false, + } + +%================================================== +%类型转换回来 +%================================================== + \DeclareStyleSourcemap{ + \maps[datatype=bibtex]{ + \map[overwrite]{% + \pertype{dataset} + \step[fieldset=usera, fieldvalue={Z}]% + } + \map[overwrite]{% + \pertype{archive} + \step[fieldset=usera, fieldvalue={Z}]% + } + \map[overwrite]{% + \pertype{map} + \step[fieldset=usera, fieldvalue={Z}]% + } + } + } diff --git a/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2005ay.cbx b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2005ay.cbx new file mode 100644 index 00000000000..5c2ba2a92aa --- /dev/null +++ b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2005ay.cbx @@ -0,0 +1,13 @@ +%% +%% --------------------------------------------------------------- +%% Maintained by huzhenzhen +%% E-mail: hzzmail@163.com +%% Released under the LaTeX Project Public License v1.3c or later +%% --------------------------------------------------------------- +%% +\ProvidesFile{gb7714-2005ay.cbx}[2021/05/16 v1.0 a biblatex bibliography style for GB/T 7714-2005] + +%================================================== +%加载gb样式 +%================================================== +\RequireCitationStyle{gb7714-2015ay} % 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 2ebf228c61e..d4beba03b69 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{2021/05/06 v1.0y} +\def\versionofgbtstyle{2021/08/19 v1.0z} \def\versionofbiblatex{\abx@version} \ProvidesFile{gb7714-2015.bbx}[\versionofgbtstyle biblatex bibliography style] %\RequireBiber[3]%显式指定用biber后端,当用bibtex时会报错,但其实不会影响编译,只是采用bibtex后无法达成格式需求 @@ -753,7 +753,7 @@ \ifstrequal{#1}{familyahead}{\setcounter{gbnamefmtcase}{3}}{} \ifstrequal{#1}{pinyin}{\setcounter{gbnamefmtcase}{4}}{}%family-given \ifstrequal{#1}{reverseorder}{\setcounter{gbnamefmtcase}{5}}{}%family-given/given-family - \ifstrequal{#1}{quanpin}{\setcounter{gbnamefmtcase}{6}}{}%family-given + \ifstrequal{#1}{quanpin}{\setcounter{gbnamefmtcase}{6}}{}%全拼 } \ExecuteBibliographyOptions{gbnamefmt} @@ -1002,21 +1002,17 @@ \DeclareSourcemap{ \maps[datatype=bibtex]{% - \map{%当没有作者时将editor转成author - \pernottype{inbook}%因为in系列中editor可能用来表示bookauthor,所以排除 - \pernottype{inproceedings} - \pernottype{incollection} - \pernottype{periodical}%因为peridical直接使用editor,所以排除 - %注意notfield在低版本biblatex中没有 - %\step[notfield=author,final]%当author不存在,将editor复制给author - \step[fieldsource=editor,fieldtarget=author]%并删除editor + \map{%如果author或者editor或者translator存在,那么设置namea便于后面判断。 + \step[fieldsource=author,final] + \step[fieldset=namea,origfieldval] } - \map{%当没有作者时将translator转成author - \pernottype{inbook} - \pernottype{inproceedings} - \pernottype{incollection} - %\step[notfield=author,final]%当author不存在,将translator复制给author - \step[fieldsource=translator,fieldtarget=author]%并删除translator + \map{% + \step[fieldsource=editor,final] + \step[fieldset=namea,origfieldval] + } + \map{% + \step[fieldsource=translator,final] + \step[fieldset=namea,origfieldval] } \map{%让address和location同步,biblatex中address是location的别名 %因此输出的时候只有location信息,但处理过程中是可以存在address的。 @@ -1049,7 +1045,7 @@ \step[fieldsource=nameformat,match=pinyin,final] \step[fieldset=namefmtid,fieldvalue={4}] } - \map{%处理在bib文件中直接给出文献的姓名格式为pinyin的情况 + \map{%处理在bib文件中直接给出文献的姓名格式为全拼的情况 \step[fieldsource=nameformat,match=quanpin,final] \step[fieldset=namefmtid,fieldvalue={6}] } @@ -2178,6 +2174,8 @@ test {\iftoggle{iftlseven}}%biblatex<=3.7 % 这里调整一下两种语言参考文献的间隔,源来自biblatex.def \renewcommand*{\entrysetpunct}{\adddot\newline\nobreak} \renewcommand*{\bibpagespunct}{\addcolon\addthinspace}%%页码引用格式的修改,修改为用冒号 +% 2021.08.19,增加出版地和出版社之间的标点,hzz +\newcommand{\publocpunct}{\addcolon\addspace}%出版项中:出版社地址后面的标点 %\renewcommand{\relateddelim}{}%\par %===================================================================== @@ -2362,6 +2360,7 @@ test {\iftoggle{iftlseven}}%biblatex<=3.7 % v1.0w,20210401,hzz,针对其它语言的译者后的标点与中文不同做处理 % 原理方法:判断作者或译者是否中文,若中文用字符等,否则用et al. 。 % \printnames由start-stop控制项数,默认是1和maxnames/minnames +\newcommand{\aftertransdelim}{\addcomma\addthinspace} \renewbibmacro*{name:andothers}{\bibauthorfont% \ifboolexpr{ test {\ifnumequal{\value{listcount}}{\value{liststop}}} @@ -2375,7 +2374,7 @@ test {\iftoggle{iftlseven}}%biblatex<=3.7 %袁训来, 陈哲, 肖书海, 等. %胡泳, 范海燕, 译. %潘惠霞, 魏婧, 杨艳, 等译. -\ifcurrentname{translator}{\iffieldequalstr{usere}{chinese}{\addcomma\addthinspace}{}}{}%为了实现上述第二个示例情况做的处理 +\ifcurrentname{translator}{\iffieldequalstr{usere}{chinese}{\aftertransdelim}{}}{}%为了实现上述第二个示例情况做的处理 }} @@ -3185,7 +3184,7 @@ test {\iflistundef{location}} and test {\iflistundef{institution}}% }{% \iflistundef{location}{\iftoggle{ifCJKforgbt}{\printtext{[\str@noaddress]}}{\printtext{[S.l.\adddot]}}}% {\printlist{location}}% -\addcolon\addspace% +\publocpunct% \iflistundef{institution}{% \iftoggle{ifCJKforgbt}{\printtext{[\str@nopublisher]}}{\printtext{\mkbibbrackets{s.n.}}}}% {\printlist{institution}}}% @@ -3198,7 +3197,7 @@ test {\iflistundef{location}} and test {\iflistundef{institution}}% {\printlist{location}% \iflistundef{institution}% {\setunit*{\addcomma\space}} - {\setunit*{\addcolon\space}}% + {\setunit*{\publocpunct}}% \printlist{institution}% \setunit*{\addcomma\space}% \usebibmacro{date}% @@ -3217,8 +3216,8 @@ test {\iflistundef{location}} and test {\iflistundef{institution}}% {\iffieldequalstr{note}{standard}{}{\iftoggle{ifCJKforgbt}{\printtext{[\str@noaddress}\space :\space\str@nopublisher]}{\printtext{[S.l.\space :\space s.n.\adddot]}}}}% {\iflistundef{location}{%\adddot \iffieldequalstr{note}{standard}{}%%从gbt7714-2015标准第19页看到,标准存在出版项时输出,没有时完全省略。 - {\iftoggle{ifCJKforgbt}{\printtext{[\str@noaddress]}\addcolon\addspace}{\printtext{[S.l.\adddot]}\addcolon\addspace}}}% \bibstring{noaddress} - {\printlist{location}\addcolon\addspace}%%\addcolon\addspace% + {\iftoggle{ifCJKforgbt}{\printtext{[\str@noaddress]}\addcolon\addspace}{\printtext{[S.l.\adddot]}\publocpunct}}}% \bibstring{noaddress} + {\printlist{location}\publocpunct}%%\addcolon\addspace% \iflistundef{publisher}{% \iffieldequalstr{note}{standard}{}% {\iftoggle{ifCJKforgbt}{\printtext{[\str@nopublisher]}\setunit{\adddot\addspace}\setunit*{\addcomma\addspace}}% @@ -3230,7 +3229,7 @@ test {\iflistundef{location}} and test {\iflistundef{institution}}% {\printlist{location}% \iflistundef{publisher} {\setunit*{\addcomma\space}} - {\setunit*{\addcolon\space}}% + {\setunit*{\publocpunct}}% \printlist{publisher}% \setunit*{\addcomma\space}% \usebibmacro{date}%%\newunit @@ -3246,7 +3245,7 @@ test {\iflistundef{location}} and test {\iflistundef{institution}}% {\printlist{location}%%加了一个编组避免\usebibmacro{date}把month和day信息去掉 \iflistundef{institution} {\setunit*{\addcomma\space}} - {\setunit*{\addcolon\space}}% + {\setunit*{\publocpunct}}% \printlist{institution}% \setunit*{\addcomma\space}% \usebibmacro{date}% @@ -3504,6 +3503,31 @@ incollection,proceedings,inproceedings]{number}{% }% } +% 责任者如果没有author用editor或translator替代 +% 20210521 v1.0y hzz +%专著如果责任者是editor那么不用输出类型信息 +\renewbibmacro*{editor+others}{% + \ifboolexpr{ + test \ifuseeditor + and + not test {\ifnameundef{editor}} + } + {\printnames{editor}% + \clearname{editor}} + {}} +%要注意要使用translator那么需要开启usetranslator选项的。 +%注意其中的标点处理。 +\renewbibmacro*{translator+others}{% + \ifboolexpr{ + test \ifusetranslator + and + not test {\ifnameundef{translator}} + } + {\renewcommand{\aftertransdelim}{\adddot\addspace}{\adddot\addspace}\printnames{translator}% + \clearname{translator}} + {}} + + % % 修改期刊的标题 % @@ -3647,11 +3671,11 @@ incollection,proceedings,inproceedings]{number}{% % % book条目类的驱动 % - \DeclareBibliographyDriver{book}{%源来自standard.bbx文件 - \usebibmacro{bibindex}% - \usebibmacro{begentry}% +\DeclareBibliographyDriver{book}{%源来自standard.bbx文件 +\usebibmacro{bibindex}% +\usebibmacro{begentry}% \usebibmacro{author/editor+others/translator+others}% -\ifnameundef{author}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 +\ifnameundef{namea}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 \usebibmacro{maintitle+title}% \iftoggle{bbx:gbstrict}{}{% \newunit @@ -3837,7 +3861,7 @@ incollection,proceedings,inproceedings]{number}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author/editor+others/translator+others}% -\ifnameundef{author}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 +\ifnameundef{namea}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 \usebibmacro{title}% \iftoggle{bbx:gbstrict}{}{% \newunit% @@ -3884,8 +3908,8 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{ \DeclareBibliographyDriver{report}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% - \usebibmacro{author}% -\ifnameundef{author}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 + \usebibmacro{author/editor+others/translator+others}% +\ifnameundef{namea}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 \usebibmacro{title}% \iftoggle{bbx:gbstrict}{}{% \newunit% @@ -3933,8 +3957,8 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{ \DeclareBibliographyDriver{manual}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% - \usebibmacro{author}% -\ifnameundef{author}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 + \usebibmacro{author/editor+others/translator+others}% +\ifnameundef{namea}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 \usebibmacro{title}% \iftoggle{bbx:gbstrict}{}{% \newunit% @@ -3986,7 +4010,7 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{ \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author/editor+others/translator+others}% -\ifnameundef{author}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 +\ifnameundef{namea}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 \usebibmacro{title}% \iftoggle{bbx:gbstrict}{}{% \newunit @@ -4060,7 +4084,11 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{ \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author/translator+others}% -\ifnameundef{author}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 + \ifboolexpr{ + test {\ifnameundef{author}} + and + test {\ifnameundef{translator}} + }{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 \usebibmacro{title}% \usebibmacro{in:}% %\printtext{\texttt{//}\addthinspace}% diff --git a/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015.cbx b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015.cbx index a407be98e05..b95d7cd3d80 100644 --- a/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015.cbx +++ b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015.cbx @@ -7,7 +7,7 @@ %% Released under the LaTeX Project Public License v1.3c or later %% --------------------------------------------------------------- %% -\def\versionofgbtstyle{2021/05/06 v1.0y} +\def\versionofgbtstyle{2021/08/19 v1.0z} \ProvidesFile{gb7714-2015.cbx}[\versionofgbtstyle biblatex citation style] % @@ -65,8 +65,14 @@ } +% +%设置标注中各篇文献之间的标点 +%20210530,v1.0y,hzz %textcite标注命令中的标点设置 %\DeclareDelimFormat[textcite]{andothersdelim}{\addspace}% +\renewcommand*{\compcitedelim}{\addcomma}%\addcomma\addthinspace +\renewcommand*{\supercitedelim}{\addcomma} +\renewcommand*{\multicitedelim}{\addcomma} % %将连续3篇文献压缩改为连续2篇文献压缩 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 2ecd604b010..fb67497c2f2 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{2021/05/06 v1.0y} +\def\versionofgbtstyle{2021/08/19 v1.0z} \def\versionofbiblatex{\abx@version} \ProvidesFile{gb7714-2015ay.bbx}[\versionofgbtstyle biblatex bibliography style] %\RequireBiber[3]%显式指定用biber后端,当用bibtex时会报错,但其实不会影响编译,只是采用bibtex后无法达成格式需求 @@ -951,21 +951,17 @@ \DeclareSourcemap{ \maps[datatype=bibtex]{% - \map{%当没有作者时将editor转成author - \pernottype{inbook}%因为in系列中editor可能用来表示bookauthor,所以排除 - \pernottype{inproceedings} - \pernottype{incollection} - \pernottype{periodical}%因为peridical直接使用editor,所以排除 - %注意notfield在低版本biblatex中没有 - %\step[notfield=author,final]%当author不存在,将editor复制给author - \step[fieldsource=editor,fieldtarget=author]%并删除editor + \map{%如果author或者editor或者translator存在,那么设置namea便于后面判断。 + \step[fieldsource=author,final] + \step[fieldset=namea,origfieldval] } - \map{%当没有作者时将translator转成author - \pernottype{inbook} - \pernottype{inproceedings} - \pernottype{incollection} - %\step[notfield=author,final]%当author不存在,将translator复制给author - \step[fieldsource=translator,fieldtarget=author]%并删除translator + \map{% + \step[fieldsource=editor,final] + \step[fieldset=namea,origfieldval] + } + \map{% + \step[fieldsource=translator,final] + \step[fieldset=namea,origfieldval] } \map{%让address和location同步,biblatex中address是location的别名 %因此输出的时候只有location信息,但处理过程中是可以存在address的。 @@ -2033,6 +2029,8 @@ test {\iftoggle{iftlseven}}%biblatex<=3.7 % 这里调整一下两种语言参考文献的间隔,源来自biblatex.def \renewcommand*{\entrysetpunct}{\adddot\par\nobreak}%ay样式用par也可以,因为没有悬挂对齐问题 \renewcommand*{\bibpagespunct}{\addcolon\addthinspace}%%页码引用格式的修改,修改为用冒号 +% 2021.08.19,增加出版地和出版社之间的标点,hzz +\newcommand{\publocpunct}{\addcolon\addspace}%出版项中:出版社地址后面的标点 %\renewcommand{\relateddelim}{}%\par %===================================================================== @@ -2215,6 +2213,7 @@ test {\iftoggle{iftlseven}}%biblatex<=3.7 % v1.0w,20210401,hzz,针对其它语言的译者后的标点与中文不同做处理 % 原理方法:判断作者或译者是否中文,若中文用字符等,否则用et al. 。 % \printnames由start-stop控制项数,默认是1和maxnames/minnames +\newcommand{\aftertransdelim}{\addcomma\addthinspace} \renewbibmacro*{name:andothers}{\bibauthorfont% \ifboolexpr{ test {\ifnumequal{\value{listcount}}{\value{liststop}}} @@ -2228,7 +2227,7 @@ test {\iftoggle{iftlseven}}%biblatex<=3.7 %袁训来, 陈哲, 肖书海, 等. %胡泳, 范海燕, 译. %潘惠霞, 魏婧, 杨艳, 等译. -\ifcurrentname{translator}{\iffieldequalstr{usere}{chinese}{\addcomma\addthinspace}{}}{}%为了实现上述第二个示例情况做的处理 +\ifcurrentname{translator}{\iffieldequalstr{usere}{chinese}{\aftertransdelim}{}}{}%为了实现上述第二个示例情况做的处理 }} % 修改省略作者后的本地化字符串,比如et al. @@ -3008,7 +3007,7 @@ test {\iflistundef{location}} and test {\iflistundef{institution}}% }{% \iflistundef{location}{\iftoggle{ifCJKforgbt}{\printtext{[\str@noaddress]}}{\printtext{[S.l.\adddot]}}}% {\printlist{location}}% -\addcolon\addspace% +\publocpunct% \iflistundef{institution}{% \iftoggle{ifCJKforgbt}{\printtext{[\str@nopublisher]}}{\printtext{\mkbibbrackets{s.n.}}}}% \bibstring{nopublisher}%[s.n.\adddot] {\printlist{institution}}}% @@ -3021,7 +3020,7 @@ test {\iflistundef{location}} and test {\iflistundef{institution}}% { \printlist{location}% \iflistundef{institution}% {\setunit*{\addcomma\space}} - {\setunit*{\addcolon\space}}% + {\setunit*{\publocpunct}}% \printlist{institution}% \setunit*{\addcomma\space}% \usebibmacro{date}% @@ -3040,8 +3039,8 @@ test {\iflistundef{location}} and test {\iflistundef{institution}}% {\iffieldequalstr{note}{standard}{}{\iftoggle{ifCJKforgbt}{\printtext{[\str@noaddress}\space :\space\str@nopublisher]}{\printtext{[S.l.\space :\space s.n.\adddot]}}}}% {\iflistundef{location}{%\adddot \iffieldequalstr{note}{standard}{}%%从gbt7714-2015标准第19页看到,标准存在出版项时输出,没有时完全省略。 - {\iftoggle{ifCJKforgbt}{\printtext{[\str@noaddress]}\addcolon\addspace}{\printtext{[S.l.\adddot]}\addcolon\addspace}}}% \bibstring{noaddress} - {\printlist{location}\addcolon\addspace}%%\addcolon\addspace% + {\iftoggle{ifCJKforgbt}{\printtext{[\str@noaddress]}\addcolon\addspace}{\printtext{[S.l.\adddot]}\publocpunct}}}% \bibstring{noaddress} + {\printlist{location}\publocpunct}%%\addcolon\addspace% \iflistundef{publisher}{% \iffieldequalstr{note}{standard}{}% {\iftoggle{ifCJKforgbt}{\printtext{[\str@nopublisher]}\setunit{\adddot\addspace}\setunit*{\addcomma\addspace}}% @@ -3053,7 +3052,7 @@ test {\iflistundef{location}} and test {\iflistundef{institution}}% {\printlist{location}% \iflistundef{publisher} {\setunit*{\addcomma\space}} - {\setunit*{\addcolon\space}}% + {\setunit*{\publocpunct}}% \printlist{publisher}% \setunit*{\addcomma\space}% \usebibmacro{date}%%\newunit @@ -3069,7 +3068,7 @@ test {\iflistundef{location}} and test {\iflistundef{institution}}% {\printlist{location}%%加了一个编组避免\usebibmacro{date}把month和day信息去掉 \iflistundef{institution} {\setunit*{\addcomma\space}} - {\setunit*{\addcolon\space}}% + {\setunit*{\publocpunct}}% \printlist{institution}% \setunit*{\addcomma\space}% \usebibmacro{date}% @@ -3507,6 +3506,44 @@ test {\ifentrytype{conference}} }% } +% 责任者如果没有author用editor或translator替代 +% 20210521 v1.0y hzz +%专著如果责任者是editor那么不用输出类型信息 +\renewbibmacro*{editor+others}{% + \ifboolexpr{ + test \ifuseeditor + and + not test {\ifnameundef{editor}} + } + {\usebibmacro{bbx:dashcheck} + {\bibnamedash} + {\printnames{editor}% + \usebibmacro{bbx:savehash}}% + \clearname{editor}% + \setunit{\printdelim{nameyeardelim}}}% + {\global\undef\bbx@lasthash + \usebibmacro{labeltitle}% + \setunit*{\printdelim{nonameyeardelim}}}% + \usebibmacro{date+extradate}} +%要注意要使用translator那么需要开启usetranslator选项的。 +%注意其中的标点处理。 +\renewbibmacro*{translator+others}{% + \ifboolexpr{ + test \ifusetranslator + and + not test {\ifnameundef{translator}} + } +{\usebibmacro{bbx:dashcheck} + {\bibnamedash} + {\renewcommand{\aftertransdelim}{\adddot\addspace}\printnames{translator}% + \usebibmacro{bbx:savehash}}% + \clearname{translator}% + \setunit{\printdelim{nameyeardelim}}}% + {\global\undef\bbx@lasthash + \usebibmacro{labeltitle}% + \setunit*{\printdelim{nonameyeardelim}}}% + \usebibmacro{date+extradate}} + % % 修改期刊的标题 % @@ -3655,7 +3692,7 @@ test {\ifentrytype{conference}} \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author/editor+others/translator+others}% -\ifnameundef{author}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 +\ifnameundef{namea}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 \usebibmacro{maintitle+title}% \iftoggle{bbx:gbstrict}{}{% \newunit @@ -3842,7 +3879,7 @@ test {\ifentrytype{conference}} \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author/editor+others/translator+others}% -\ifnameundef{author}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 +\ifnameundef{namea}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 \usebibmacro{title}% \iftoggle{bbx:gbstrict}{}{% \newunit% @@ -3891,8 +3928,8 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{ \DeclareBibliographyDriver{report}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% - \usebibmacro{author}% -\ifnameundef{author}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 + \usebibmacro{author/editor+others/translator+others}% +\ifnameundef{namea}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 \usebibmacro{title}% \iftoggle{bbx:gbstrict}{}{% \newunit% @@ -3940,8 +3977,8 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{ \DeclareBibliographyDriver{manual}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% - \usebibmacro{author}% -\ifnameundef{author}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 + \usebibmacro{author/editor+others/translator+others}% +\ifnameundef{namea}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 \usebibmacro{title}% \iftoggle{bbx:gbstrict}{}{% \newunit% @@ -3994,7 +4031,7 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{ \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author/editor+others/translator+others}% -\ifnameundef{author}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 +\ifnameundef{namea}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 \usebibmacro{title}% \iftoggle{bbx:gbstrict}{}{% \newunit 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 e965dc84f8c..6149ee149f9 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 %% --------------------------------------------------------------- %% -\def\versionofgbtstyle{2021/05/06 v1.0y} +\def\versionofgbtstyle{2021/08/19 v1.0z} \ProvidesFile{gb7714-2015ay.cbx}[\versionofgbtstyle biblatex citation style] % @@ -97,7 +97,7 @@ test {\iftoggle{iftlseven}}%3.7=biblatex {\iffieldequals{namehash}{\cbx@lasthash} {\ifthenelse{\iffieldequals{labelyear}{\cbx@lastyear}\AND \(\value{multicitecount}=0\OR\iffieldundef{postnote}\)} - {\setunit{\addcomma}% + {\setunit{\addcomma\addthinspace}%同一作者的年份之间的标点,示例见thesis-nwafu-ay \usebibmacro{cite:extradate}} {\setunit{\compcitedelim}% \usebibmacro{cite:labeldate+extradate}% 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 f3258300196..2ae26b511eb 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{2021/05/06 v1.0y} +\def\versionofgbtstyle{2021/08/19 v1.0z} \def\versionofbiblatex{\abx@version} \ProvidesFile{gb7714-2015ms.bbx}[\versionofgbtstyle biblatex bibliography style] %\RequireBiber[3]%显式指定用biber后端,当用bibtex时会报错,但其实不会影响编译,只是采用bibtex后无法达成格式需求 @@ -31,10 +31,13 @@ % 20180629,v1.0k,hzz % % 原理方法:适用于3.10以上版本的biblatex,否则给出警告 - \@ifpackagelater{biblatex}{2017/12/28}{}{ + \providetoggle{iftlatest} + \@ifpackagelater{biblatex}{2017/12/28}{% + \toggletrue{iftlatest} %假设是最新版biblatex + }{% \blx@warning@noline{% biblatex version is too old for this style\MessageBreak - if errors raised,Please update biblatex to the latest version.} + if errors raised,Please update biblatex to the latest version.}% } @@ -525,6 +528,7 @@ \ifstrequal{#1}{familyahead}{\setcounter{gbnamefmtcase}{3}}{} \ifstrequal{#1}{pinyin}{\setcounter{gbnamefmtcase}{4}}{}%family-given \ifstrequal{#1}{reverseorder}{\setcounter{gbnamefmtcase}{5}}{}%family-given/given-family + \ifstrequal{#1}{quanpin}{\setcounter{gbnamefmtcase}{6}}{}%全拼 } @@ -537,6 +541,7 @@ \ifstrequal{#1}{left}{\setcounter{gbalignlabel}{1}}{} \ifstrequal{#1}{center}{\setcounter{gbalignlabel}{2}}{} \ifstrequal{#1}{gb7714-2015}{\setaligngbstyle}{} + \ifstrequal{#1}{gb7714-2015ay}{\setaligngbstyleay}{} } @@ -708,21 +713,17 @@ \DeclareSourcemap{%\perdatasource{examples.bib} \maps[datatype=bibtex]{% - \map{%当没有作者时将editor转成author - \pernottype{inbook}%因为in系列中editor可能用来表示bookauthor,所以排除 - \pernottype{inproceedings} - \pernottype{incollection} - \pernottype{periodical}%因为peridical直接使用editor,所以排除 - %注意notfield在低版本biblatex中没有 - %\step[notfield=author,final]%当author不存在,将editor复制给author - \step[fieldsource=editor,fieldtarget=author]%并删除editor + \map{%如果author或者editor或者translator存在,那么设置namea便于后面判断。 + \step[fieldsource=author,final] + \step[fieldset=namea,origfieldval] } - \map{%当没有作者时将translator转成author - \pernottype{inbook} - \pernottype{inproceedings} - \pernottype{incollection} - %\step[notfield=author,final]%当author不存在,将translator复制给author - \step[fieldsource=translator,fieldtarget=author]%并删除translator + \map{% + \step[fieldsource=editor,final] + \step[fieldset=namea,origfieldval] + } + \map{% + \step[fieldsource=translator,final] + \step[fieldset=namea,origfieldval] } \map{%让address和location同步,biblatex中address是location的别名 %因此输出的时候只有location信息,但处理过程中是可以存在address的。 @@ -755,6 +756,10 @@ \step[fieldsource=nameformat,match=pinyin,final] \step[fieldset=namefmtid,fieldvalue={4}] } + \map{%处理在bib文件中直接给出文献的姓名格式为pinyin的情况 + \step[fieldsource=nameformat,match=quanpin,final] + \step[fieldset=namefmtid,fieldvalue={6}] + } \map{%根据article确定文献类型标识符 \pertype{article} \step[fieldset=usera, fieldvalue={J}] @@ -1281,13 +1286,13 @@ \newlength{\lengthid} \newlength{\lengthlw} \newcommand{\itemcmd}{% -\settowidth{\lengthid}{\mkgbnumlabel{\printfield{labelnumber}}} -\addtolength{\lengthid}{\biblabelsep} -\setlength{\lengthlw}{\textwidth} -\addtolength{\lengthlw}{-\lengthid} +\settowidth{\lengthid}{\mkgbnumlabel{\printfield{labelnumber}}}% +\addtolength{\lengthid}{\biblabelsep}% +\setlength{\lengthlw}{\textwidth}% +\addtolength{\lengthlw}{-\lengthid}% \addvspace{\bibitemsep}%恢复\bibitemsep的作用 %\parshape 2 0em \textwidth \lengthid \lengthlw -\hangindent\lengthid +\hangindent\lengthid% \mkgbnumlabel{\printfield{labelnumber}}% \hspace{\biblabelsep}} % @@ -1298,6 +1303,25 @@ {\itemcmd}} +% +% 增加一个作者年制文献表格式的文献表输出环境。 +% 20210411,hzz,v1.0x +\def\setaligngbstyleay{% +\setlength{\bibhang}{1em} +\setlength{\bibitemindent}{-\bibhang} +\setlength{\bibitemsep}{4.5pt} +\defbibenvironment{bibliography} + {\list + {} + {\setlength{\leftmargin}{\bibhang}% + \setlength{\itemindent}{\bibitemindent}% + \setlength{\itemsep}{\bibitemsep}% + \setlength{\parsep}{\bibparsep}}} + {\endlist} + {\item} +} + + %===================================================================== % 设置单元或块等的标点 %===================================================================== @@ -1311,6 +1335,8 @@ % 这里调整一下两种语言参考文献的间隔,源来自biblatex.def \renewcommand*{\entrysetpunct}{\adddot\newline\nobreak} \renewcommand*{\bibpagespunct}{\addcolon\addthinspace}%%页码引用格式的修改,修改为用冒号 +% 2021.08.19,增加出版地和出版社之间的标点,hzz +\newcommand{\publocpunct}{\addcolon\addspace}%出版项中:出版社地址后面的标点 %\renewcommand{\relateddelim}{}%\par %===================================================================== @@ -1464,6 +1490,12 @@ {\namepartgiven} {\namepartprefix} {\namepartsuffix}}}% +\or +\usebibmacro{name:gbquanpin} + {\namepartfamily} + {\namepartgiven} + {\namepartprefix} + {\namepartsuffix}% \fi \usebibmacro{name:andothers}} @@ -1560,6 +1592,36 @@ \ifdefvoid{#4}{}{\bibnamedelimd\mkbibnamesuffix{#4}\isdot}}% } +%中文常见风格,汉语拼音全拼模式 +\newbibmacro*{name:gbquanpin}[4]{\bibauthorfont% +\renewrobustcmd*{\bibinitperiod}{}%将名字简写后的点去掉,%来源biblatex2.STY +\renewcommand*{\revsdnamepunct}{}%%来源biblatex.def +\renewrobustcmd*{\bibnamedelima}{}% + \ifuseprefix + {\usebibmacro{name:delim}{#3#1}% + \usebibmacro{name:hook}{#3#1}% + \ifdefvoid{#3}{}{% + \ifcapital + {\mkbibnameprefix{\MakeCapital{#3}}\isdot} + {\mkbibnameprefix{#3}\isdot}% + \ifprefchar{}{\bibnamedelimc}}% + \ifdefvoid{#2}{\mkbibnamefamily{\MakeCapital{#1}}}{\mkbibnamefamily{\MakeCapital{#1}}}\isdot% + \ifdefvoid{#2}{}{\revsdnamepunct\bibnamedelimd\MakeSentenceCase{\mkbibnamegiven{#2}}\isdot}%\MakeCapital + \ifdefvoid{#4}{}{\bibnamedelimd\mkbibnamesuffix{#4}\isdot}} + {\usebibmacro{name:delim}{#1}% + \usebibmacro{name:hook}{#1}% + \ifdefvoid{#2}{\mkbibnamefamily{\MakeCapital{#1}}}{\mkbibnamefamily{\MakeCapital{#1}}}\isdot% + \ifboolexpe{% + test {\ifdefvoid{#2}} + and + test {\ifdefvoid{#3}}} + {} + {\revsdnamepunct}% + \ifdefvoid{#2}{}{\bibnamedelimd\mkbibnamegiven{\MakeCapital{#2}}\isdot}%\MakeCapital + \ifdefvoid{#3}{}{\bibnamedelimd\mkbibnameprefix{#3}\isdot} + \ifdefvoid{#4}{}{\bibnamedelimd\mkbibnamesuffix{#4}\isdot}}% +} + \def\UrlFont{\rmfamily}%设置url字体为roman字体%\ttfamily %\urlstyle{rm} %使用这句也一样 @@ -1744,6 +1806,8 @@ %===================================================================== %设置驱动格式 %===================================================================== +%定义译者后面的标点,便于在不同环境下修改。 +\newcommand{\aftertransdelim}{\addcomma\addthinspace}% %中文环境的局部化代码 \def\localsetchinesecode{% @@ -1792,7 +1856,7 @@ togl{bbx:gbstyle} or test {\iffieldequalstr{userd}{chinese}}% \iffieldequalstr{usere}{chinese}{\usebibmacro{bytranslator+othersstrg}}{}%“译”的位置换到下面来,即放到译者后面。 %\setunit{\addspace}% \newunit}% - \usebibmacro{withothers}} + \usebibmacro{withothers}}% % \renewbibmacro*{bytranslator+othersstrg}{% \def\abx@tempa{bytranslator}% @@ -1814,7 +1878,7 @@ togl{bbx:gbstyle} or test {\iffieldequalstr{userd}{chinese}}% \clearname{afterword}} {}}}% \iffieldequalstr{usere}{chinese}{\bibstring{bytranslatorcn}} - {\bibstring{\abx@tempa}}} + {\bibstring{\abx@tempa}}}% % % 修改作者数量超过限定值,做省略时的处理格式 % v1.0,20160701,hzz @@ -1835,8 +1899,8 @@ togl{bbx:gbstyle} or test {\iffieldequalstr{userd}{chinese}}% %袁训来, 陈哲, 肖书海, 等. %胡泳, 范海燕, 译. %潘惠霞, 魏婧, 杨艳, 等译. -\ifcurrentname{translator}{\iffieldequalstr{usere}{chinese}{\addcomma\addthinspace}{}}{}%为了实现上述第二个示例情况做的处理 -}} +\ifcurrentname{translator}{\iffieldequalstr{usere}{chinese}{\aftertransdelim}{}}{}%为了实现上述第二个示例情况做的处理 +}}% % % 修改省略作者后的本地化字符串,比如et al. % v1.0o,20190103,hzz @@ -1993,7 +2057,7 @@ test {\iflistundef{location}} and test {\iflistundef{institution}}% }{% \iflistundef{location}{\iftoggle{ifCJKforgbt}{\printtext{[\str@noaddress]}}{\printtext{[S.l.\adddot]}}}% {\printlist{location}}% -\addcolon\addspace% +\publocpunct% \iflistundef{institution}{% \iftoggle{ifCJKforgbt}{\printtext{[\str@nopublisher]}}{\printtext{\mkbibbrackets{s.n.}}}}% \bibstring{nopublisher}%[s.n.\adddot] {\printlist{institution}}}% @@ -2006,7 +2070,7 @@ test {\iflistundef{location}} and test {\iflistundef{institution}}% {\printlist{location}% \iflistundef{institution}% {\setunit*{\addcomma\space}} - {\setunit*{\addcolon\space}}% + {\setunit*{\publocpunct}}% \printlist{institution}% \setunit*{\addcomma\space}% \usebibmacro{date}% @@ -2025,8 +2089,8 @@ test {\iflistundef{location}} and test {\iflistundef{institution}}% {\iffieldequalstr{note}{standard}{}{\iftoggle{ifCJKforgbt}{\printtext{[\str@noaddress}\space :\space\str@nopublisher]}{\printtext{[S.l.\space :\space s.n.\adddot]}}}}% {\iflistundef{location}{%\adddot \iffieldequalstr{note}{standard}{}%%从gbt7714-2015标准第19页看到,标准存在出版项时输出,没有时完全省略。 - {\iftoggle{ifCJKforgbt}{\printtext{[\str@noaddress]}\addcolon\addspace}{\printtext{[S.l.\adddot]}\addcolon\addspace}}}% \bibstring{noaddress} - {\printlist{location}\addcolon\addspace}%%\addcolon\addspace% + {\iftoggle{ifCJKforgbt}{\printtext{[\str@noaddress]}\addcolon\addspace}{\printtext{[S.l.\adddot]}\publocpunct}}}% \bibstring{noaddress} + {\printlist{location}\publocpunct}%%\addcolon\addspace% \iflistundef{publisher}{% \iffieldequalstr{note}{standard}{}% {\iftoggle{ifCJKforgbt}{\printtext{[\str@nopublisher]}\setunit{\adddot\addspace}\setunit*{\addcomma\addspace}}% @@ -2038,7 +2102,7 @@ test {\iflistundef{location}} and test {\iflistundef{institution}}% {\printlist{location}% \iflistundef{publisher} {\setunit*{\addcomma\space}} - {\setunit*{\addcolon\space}}% + {\setunit*{\publocpunct}}% \printlist{publisher}% \setunit*{\addcomma\space}% \usebibmacro{date}%%\newunit @@ -2053,7 +2117,7 @@ test {\iflistundef{location}} and test {\iflistundef{institution}}% {\printlist{location}%%加了一个编组避免\usebibmacro{date}把month和day信息去掉 \iflistundef{institution} {\setunit*{\addcomma\space}} - {\setunit*{\addcolon\space}}% + {\setunit*{\publocpunct}}% \printlist{institution}% \setunit*{\addcomma\space}% \usebibmacro{date}% @@ -2252,6 +2316,29 @@ incollection,proceedings,inproceedings]{number}{% {}{\printnames{bookauthor}}% }% }% +% 责任者如果没有author用editor或translator替代 +% 20210521 v1.0y hzz +%专著如果责任者是editor那么不用输出类型信息 +\renewbibmacro*{editor+others}{% + \ifboolexpr{% + test \ifuseeditor + and + not test {\ifnameundef{editor}}% + }% + {\printnames{editor}% + \clearname{editor}}% + {}}% +%要注意要使用translator那么需要开启usetranslator选项的。 +%注意其中的标点处理。 +\renewbibmacro*{translator+others}{% + \ifboolexpr{% + test \ifusetranslator + and + not test {\ifnameundef{translator}}% + }% + {\renewcommand{\aftertransdelim}{\adddot\addspace}\printnames{translator}% + \clearname{translator}}% + {}}% % % 修改期刊的标题 % @@ -2339,7 +2426,7 @@ incollection,proceedings,inproceedings]{number}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author/editor+others/translator+others}% -\ifnameundef{author}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 +\ifnameundef{namea}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 \usebibmacro{maintitle+title}% \iftoggle{bbx:gbstrict}{}{% \newunit @@ -2517,7 +2604,7 @@ incollection,proceedings,inproceedings]{number}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author/editor+others/translator+others}% -\ifnameundef{author}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 +\ifnameundef{namea}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 \usebibmacro{title}% \iftoggle{bbx:gbstrict}{}{% \newunit% @@ -2562,8 +2649,8 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{ \csdef{blx@bbx@report}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% - \usebibmacro{author}% -\ifnameundef{author}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 + \usebibmacro{author/editor+others/translator+others}% +\ifnameundef{namea}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 \usebibmacro{title}% \iftoggle{bbx:gbstrict}{}{% \newunit% @@ -2611,8 +2698,8 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{ \csdef{blx@bbx@manual}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% - \usebibmacro{author}% -\ifnameundef{author}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 + \usebibmacro{author/editor+others/translator+others}% +\ifnameundef{namea}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 \usebibmacro{title}% \iftoggle{bbx:gbstrict}{}{% \newunit% @@ -2663,7 +2750,7 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{ \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author/editor+others/translator+others}% -\ifnameundef{author}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 +\ifnameundef{namea}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 \usebibmacro{title}% \iftoggle{bbx:gbstrict}{}{% \newunit 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 b718fde0500..5160edfcfce 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,194 +7,10 @@ %% Released under the LaTeX Project Public License v1.3c or later %% --------------------------------------------------------------- %% -\def\versionofgbtstyle{2021/05/06 v1.0y} +\def\versionofgbtstyle{2021/08/19 v1.0z} \ProvidesFile{gb7714-2015ms.cbx}[\versionofgbtstyle biblatex citation style] % -% 加载标准样式 +% 加载样式 % -\RequireCitationStyle{numeric-comp} %numeric - - -% -% 选项设置 -% -\ExecuteBibliographyOptions{ - autocite = superscript , - autopunct = true , - %sorting = none , - maxcitenames=1, - mincitenames=1, -} - -%textcite标注命令中的标点设置 -%\DeclareDelimFormat[textcite]{andothersdelim}{\addspace}% - -%修改\mkbibsuperscript宏在最后加上一个空白使得xeCJK不会自动在引用标签后面加上中英文之间的空白 -%hzz,v1.0w,2021-0401 -\renewrobustcmd{\mkbibsuperscript}[1]{% - \unspace\allowhyphens\textsuperscript{% - \begingroup - \protected\long\def\mkbibsuperscript##1{% - \blx@warning{Nested superscript}% - \mkbibbrackets{##1}}% - #1\endgroup}\kern\z@} - -% -% 定义一个上标方括号wrapper -% -\newcommand*\mkbibsuperbracket[1]{% - \mkbibsuperscript{\mkbibbrackets{#1}}% -} - -% 修改postnote的输出格式 -\DeclareFieldFormat{postnote}{#1} - -% -% 重定义cite命令 -% -% 方法:\DeclareCiteCommand{\cite}[\mkbibparens]{precode}{loopcode}{sepcode}{postcode} -% v1.0p版后将cite的处理方式修改为类似pagescite,而不再使用biblatex的标准方式 -\DeclareCiteCommand{\cite}[\mkbibsuperscript]%利用mkbibsuperbracket添加方括号 - {[\usebibmacro{cite:init}% - \usebibmacro{prenote}} - {\usebibmacro{citeindex}% - \usebibmacro{cite:comp}} - {} - {\usebibmacro{cite:dump}]% - \printfield{postnote}} -% v1.0p 以前用的方式 -%\DeclareCiteCommand{\cite}[\mkbibsuperbracket]%利用mkbibsuperbracket添加方括号 -% {\usebibmacro{cite:init}% -% \usebibmacro{prenote}} -% {\usebibmacro{citeindex}% -% \usebibmacro{cite:comp}} -% {} -% {\usebibmacro{cite:dump}% -% \usebibmacro{postnote}} - -% -% 定义upcite命令 -% 20180604,v1.0l,hzz -% 20190409,v1.0r,hzz -% 方法:对supercite增加[] -\newrobustcmd*{\upcite}{% - \cite} - -% -% 重定义parencite命令,以满足标签带页码的国标要求 -% -\DeclareCiteCommand{\parencite}%[\mkbibbrackets] - {[\usebibmacro{cite:init}%] - \usebibmacro{prenote}}% - {\usebibmacro{citeindex}% - \usebibmacro{cite:comp}} - {} - {%[ - \usebibmacro{cite:dump}]% - \mkbibsuperscript{\printfield{postnote}}} - -% -% 新定义pagescite命令,以满足标签带页码的国标要求 -% -% 原理方法: -% 1.新增页码输出宏 -\newbibmacro*{postpages}{% - \iffieldundef{postnote} - {\printfield[postnote]{pages}} - {\printfield{postnote}}} -% 2.新增\pagescite引用命令 -\DeclareCiteCommand{\pagescite}[\mkbibsuperscript]%\mkbibbrackets,仍然用上标 - {[\usebibmacro{cite:init}%]直接添加方括号 - \usebibmacro{prenote}% - } - {\usebibmacro{citeindex}% - \usebibmacro{cite:comp}} - {} - {\usebibmacro{cite:dump}]% - \usebibmacro{postpages}} - -% -% 定义yearpagescite,为与ay样式兼容,等同于\pagescite -% -\DeclareCiteCommand{\yearpagescite}[\mkbibsuperscript]%\mkbibbrackets,仍然用上标 - {[\usebibmacro{cite:init}%]直接添加方括号 - \usebibmacro{prenote}% - } - {\usebibmacro{citeindex}% - \usebibmacro{cite:comp}} - {} - {\usebibmacro{cite:dump}]% - \usebibmacro{postpages}} - - - -% -% 定义\yearcite命令,为与ay样式兼容,且提供不输出页码的标签格式, -% -% 原理方法:等同于\pagescite,但不要页码 -\DeclareCiteCommand{\yearcite}[\mkbibsuperscript]%\mkbibbrackets,仍然用上标 - {[\usebibmacro{cite:init}%]直接添加方括号 - \usebibmacro{prenote}% - } - {\usebibmacro{citeindex}% - \usebibmacro{cite:comp}} - {} - {\usebibmacro{cite:dump}]} - -% -% 定义\authornumcite命令,输出作者信息,然后在后面带上顺序编码 -% 20180427,v1.0k,增加,hzz -% gb7714样式新定义的命令都把cite放到最后,比如前面的pagescite,yearcite,这里的\authornumcite -% 区别于biblatex定义的命令都把cite放到前面,比如citeauthor等。 -%见numeric.CBX -\newbibmacro*{cite}{% - \printtext[bibhyperref]{% - \printfield{labelprefix}% - \printfield{labelnumber}% - \ifbool{bbx:subentry} - {\printfield{entrysetcount}} - {}}} -%见numeric.CBX,\DeclareCiteCommand{\cite}, -\DeclareCiteCommand{\authornumcite}%[\mkbibsuperscript] - {\usebibmacro{prenote}} - {\iffieldequalstr{userf}{cn}{\renewcommand*{\andothersdelim}{\addthinspace}}%\addthinspace - {\renewcommand*{\andothersdelim}{\addspace}}% - \printnames{labelname}\mkbibsuperscript{\mkbibbrackets{\usebibmacro{citeindex}% - \usebibmacro{cite}}}} - {\multicitedelim} - {\mkbibsuperscript{\printfield{postnote}}} - - -% -% 增加如下多个命令 -% 20190409,v1.0r,hzz -% 方法:利用newcommand或newrobustcmd命令进行定义 -% 注意\citet和\citep命令之所以不用newrobustcmd,是为避免加载natbib模块后产生冲突 -\DeclareCiteCommand{\citet}% - {\usebibmacro{prenote}} - {\iffieldequalstr{userf}{cn}{\renewcommand*{\andothersdelim}{\addthinspace}}%\addthinspace - {\renewcommand*{\andothersdelim}{\addspace}}% - \printnames{labelname}\mkbibsuperscript{\mkbibbrackets{\usebibmacro{citeindex}% - \usebibmacro{cite}}}} - {\multicitedelim} - {\mkbibsuperscript{\printfield{postnote}}} - - -\DeclareCiteCommand{\citep}[\mkbibsuperscript]%利用mkbibsuperbracket添加方括号 - {[\usebibmacro{cite:init}% - \usebibmacro{prenote}} - {\usebibmacro{citeindex}% - \usebibmacro{cite:comp}} - {} - {\usebibmacro{cite:dump}]% - \printfield{postnote}} - -\newrobustcmd*{\citetns}% - {\textcite} - -\newrobustcmd*{\citepns}% - {\parencite} - -\newrobustcmd*{\inlinecite}% - {\parencite} +\RequireCitationStyle{gb7714-2015} %numeric 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 49a4f328c65..475f9bee604 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{2021/05/06 v1.0y} +\def\versionofgbtstyle{2021/08/19 v1.0z} \def\versionofbiblatex{\abx@version} \ProvidesFile{gb7714-2015mx.bbx}[\versionofgbtstyle biblatex bibliography style] %\RequireBiber[3]%显式指定用biber后端,当用bibtex时会报错,但其实不会影响编译,只是采用bibtex后无法达成格式需求 @@ -591,6 +591,7 @@ \ifstrequal{#1}{familyahead}{\setcounter{gbnamefmtcase}{3}}{} \ifstrequal{#1}{pinyin}{\setcounter{gbnamefmtcase}{4}}{}%family-given \ifstrequal{#1}{reverseorder}{\setcounter{gbnamefmtcase}{5}}{}%family-given/given-family + \ifstrequal{#1}{quanpin}{\setcounter{gbnamefmtcase}{6}}{}%全拼 } \ExecuteBibliographyOptions{gbnamefmt} @@ -603,6 +604,7 @@ \ifstrequal{#1}{left}{\setcounter{gbalignlabel}{1}}{} \ifstrequal{#1}{center}{\setcounter{gbalignlabel}{2}}{} \ifstrequal{#1}{gb7714-2015}{\setaligngbstyle}{} + \ifstrequal{#1}{gb7714-2015ay}{\setaligngbstyleay}{} } \ExecuteBibliographyOptions{ @@ -759,21 +761,17 @@ \DeclareSourcemap{ \maps[datatype=bibtex]{% - \map{%当没有作者时将editor转成author - \pernottype{inbook}%因为in系列中editor可能用来表示bookauthor,所以排除 - \pernottype{inproceedings} - \pernottype{incollection} - \pernottype{periodical}%因为peridical直接使用editor,所以排除 - %注意notfield在低版本biblatex中没有 - %\step[notfield=author,final]%当author不存在,将editor复制给author - \step[fieldsource=editor,fieldtarget=author]%并删除editor + \map{%如果author或者editor或者translator存在,那么设置namea便于后面判断。 + \step[fieldsource=author,final] + \step[fieldset=namea,origfieldval] } - \map{%当没有作者时将translator转成author - \pernottype{inbook} - \pernottype{inproceedings} - \pernottype{incollection} - %\step[notfield=author,final]%当author不存在,将translator复制给author - \step[fieldsource=translator,fieldtarget=author]%并删除translator + \map{% + \step[fieldsource=editor,final] + \step[fieldset=namea,origfieldval] + } + \map{% + \step[fieldsource=translator,final] + \step[fieldset=namea,origfieldval] } \map{%让address和location同步,biblatex中address是location的别名 %因此输出的时候只有location信息,但处理过程中是可以存在address的。 @@ -806,6 +804,10 @@ \step[fieldsource=nameformat,match=pinyin,final] \step[fieldset=namefmtid,fieldvalue={4}] } + \map{%处理在bib文件中直接给出文献的姓名格式为全拼的情况 + \step[fieldsource=nameformat,match=quanpin,final] + \step[fieldset=namefmtid,fieldvalue={6}] + } \map{%根据article确定文献类型标识符 \pertype{article} \step[fieldset=usera, fieldvalue={J}] @@ -1589,6 +1591,44 @@ {\endgroup} {\itemcmd}} +% +% 增加一个作者年制文献表格式的文献表输出环境。 +% 20210411,hzz,v1.0x +\def\setaligngbstyleay{% +\setlength{\bibhang}{1em} +\setlength{\bibitemindent}{-\bibhang} +\setlength{\bibitemsep}{4.5pt} +\defbibenvironment{bibliography} + {\list + {} + {\setlength{\leftmargin}{\bibhang}% + \setlength{\itemindent}{\bibitemindent}% + \setlength{\itemsep}{\bibitemsep}% + \setlength{\parsep}{\bibparsep}}} + {\endlist} + {\item} +} + +\defbibenvironment{numerical}%作者年制中数字标签的文献表环境 + {\setlength{\bibhang}{\biblabelsep}% + \setlength{\labelnumberwidth}{2em}% + \setlength{\bibitemindent}{0pt}% + \setlength{\biblabelextend}{0pt}% + \setlength{\biblabelextend}{0pt}% + \list + {\printtext[labelnumberwidth]{\arabic{refnumeric}}} + {\usecounter{refnumeric}% + \addtolength{\labelnumberwidth}{\biblabelextend}% + \setlength{\labelwidth}{\labelnumberwidth}% + \setlength{\labelsep}{\biblabelsep}% + \setlength{\leftmargin}{\bibhang}% + \addtolength{\leftmargin}{\labelnumberwidth}% + \setlength{\itemindent}{\bibitemindent}% + \setlength{\itemsep}{\bibitemsep}% + \setlength{\parsep}{\bibparsep}}% + \renewcommand*{\makelabel}[1]{\hss##1}} + {\endlist} + {\item} %===================================================================== % 设置单元或块等的标点 @@ -1603,6 +1643,8 @@ % 这里调整一下两种语言参考文献的间隔,源来自biblatex.def \renewcommand*{\entrysetpunct}{\adddot\newline\nobreak} \renewcommand*{\bibpagespunct}{\addcolon\addthinspace}%%页码引用格式的修改,修改为用冒号 +% 2021.08.19,增加出版地和出版社之间的标点,hzz +\newcommand{\publocpunct}{\addcolon\addspace}%出版项中:出版社地址后面的标点 %\renewcommand{\relateddelim}{}%\par %===================================================================== @@ -1781,6 +1823,7 @@ % v1.0w,20210401,hzz,针对其它语言的译者后的标点与中文不同做处理 % 原理方法:判断作者或译者是否中文,若中文用字符等,否则用et al. 。 % \printnames由start-stop控制项数,默认是1和maxnames/minnames +\newcommand{\aftertransdelim}{\addcomma\addthinspace} \renewbibmacro*{name:andothers}{\bibauthorfont% \ifboolexpr{ test {\ifnumequal{\value{listcount}}{\value{liststop}}} @@ -1794,10 +1837,11 @@ %袁训来, 陈哲, 肖书海, 等. %胡泳, 范海燕, 译. %潘惠霞, 魏婧, 杨艳, 等译. -\ifcurrentname{translator}{\iffieldequalstr{usere}{chinese}{\addcomma\addthinspace}{}}{}%为了实现上述第二个示例情况做的处理 +\ifcurrentname{translator}{\iffieldequalstr{usere}{chinese}{\aftertransdelim}{}}{}%为了实现上述第二个示例情况做的处理 }} + % % 修改省略作者后的本地化字符串,比如et al. % v1.0o,20190103,hzz @@ -2021,6 +2065,12 @@ {\namepartgiven} {\namepartprefix} {\namepartsuffix}}}% +\or +\usebibmacro{name:gbquanpin} + {\namepartfamily} + {\namepartgiven} + {\namepartprefix} + {\namepartsuffix}% \fi \usebibmacro{name:andothers}} @@ -2117,6 +2167,37 @@ \ifdefvoid{#4}{}{\bibnamedelimd\mkbibnamesuffix{#4}\isdot}}% } +%中文常见风格,汉语拼音全拼模式 +\newbibmacro*{name:gbquanpin}[4]{\bibauthorfont% +\renewrobustcmd*{\bibinitperiod}{}%将名字简写后的点去掉,%来源biblatex2.STY +\renewcommand*{\revsdnamepunct}{}%%来源biblatex.def +\renewrobustcmd*{\bibnamedelima}{}% + \ifuseprefix + {\usebibmacro{name:delim}{#3#1}% + \usebibmacro{name:hook}{#3#1}% + \ifdefvoid{#3}{}{% + \ifcapital + {\mkbibnameprefix{\MakeCapital{#3}}\isdot} + {\mkbibnameprefix{#3}\isdot}% + \ifprefchar{}{\bibnamedelimc}}% + \ifdefvoid{#2}{\mkbibnamefamily{\MakeCapital{#1}}}{\mkbibnamefamily{\MakeCapital{#1}}}\isdot% + \ifdefvoid{#2}{}{\revsdnamepunct\bibnamedelimd\MakeSentenceCase{\mkbibnamegiven{#2}}\isdot}%\MakeCapital + \ifdefvoid{#4}{}{\bibnamedelimd\mkbibnamesuffix{#4}\isdot}} + {\usebibmacro{name:delim}{#1}% + \usebibmacro{name:hook}{#1}% + \ifdefvoid{#2}{\mkbibnamefamily{\MakeCapital{#1}}}{\mkbibnamefamily{\MakeCapital{#1}}}\isdot% + \ifboolexpe{% + test {\ifdefvoid{#2}} + and + test {\ifdefvoid{#3}}} + {} + {\revsdnamepunct}% + \ifdefvoid{#2}{}{\bibnamedelimd\mkbibnamegiven{\MakeCapital{#2}}\isdot}%\MakeCapital + \ifdefvoid{#3}{}{\bibnamedelimd\mkbibnameprefix{#3}\isdot} + \ifdefvoid{#4}{}{\bibnamedelimd\mkbibnamesuffix{#4}\isdot}}% +} + + % % url和url日期格式 @@ -2254,7 +2335,7 @@ test {\iflistundef{location}} and test {\iflistundef{institution}}% }{% \iflistundef{location}{\iftoggle{ifCJKforgbt}{\printtext{[\str@noaddress]}}{\printtext{[S.l.\adddot]}}}% {\printlist{location}}% -\addcolon\addspace% +\publocpunct% \iflistundef{institution}{% \iftoggle{ifCJKforgbt}{\printtext{[\str@nopublisher]}}{\printtext{\mkbibbrackets{s.n.}}}}% {\printlist{institution}}}% @@ -2267,7 +2348,7 @@ test {\iflistundef{location}} and test {\iflistundef{institution}}% {\printlist{location}% \iflistundef{institution}% {\setunit*{\addcomma\space}} - {\setunit*{\addcolon\space}}% + {\setunit*{\publocpunct}}% \printlist{institution}% \setunit*{\addcomma\space}% \usebibmacro{date}% @@ -2286,8 +2367,8 @@ test {\iflistundef{location}} and test {\iflistundef{institution}}% {\iffieldequalstr{note}{standard}{}{\iftoggle{ifCJKforgbt}{\printtext{[\str@noaddress}\space :\space\str@nopublisher]}{\printtext{[S.l.\space :\space s.n.\adddot]}}}}% {\iflistundef{location}{%\adddot \iffieldequalstr{note}{standard}{}%%从gbt7714-2015标准第19页看到,标准存在出版项时输出,没有时完全省略。 - {\iftoggle{ifCJKforgbt}{\printtext{[\str@noaddress]}\addcolon\addspace}{\printtext{[S.l.\adddot]}\addcolon\addspace}}}% \bibstring{noaddress} - {\printlist{location}\addcolon\addspace}%%\addcolon\addspace% + {\iftoggle{ifCJKforgbt}{\printtext{[\str@noaddress]}\addcolon\addspace}{\printtext{[S.l.\adddot]}\publocpunct}}}% \bibstring{noaddress} + {\printlist{location}\publocpunct}%%\addcolon\addspace% \iflistundef{publisher}{% \iffieldequalstr{note}{standard}{}% {\iftoggle{ifCJKforgbt}{\printtext{[\str@nopublisher]}\setunit{\adddot\addspace}\setunit*{\addcomma\addspace}}% @@ -2299,7 +2380,7 @@ test {\iflistundef{location}} and test {\iflistundef{institution}}% {\printlist{location}% \iflistundef{publisher} {\setunit*{\addcomma\space}} - {\setunit*{\addcolon\space}}% + {\setunit*{\publocpunct}}% \printlist{publisher}% \setunit*{\addcomma\space}% \usebibmacro{date}%%\newunit @@ -2315,7 +2396,7 @@ test {\iflistundef{location}} and test {\iflistundef{institution}}% {\printlist{location}%%加了一个编组避免\usebibmacro{date}把month和day信息去掉 \iflistundef{institution} {\setunit*{\addcomma\space}} - {\setunit*{\addcolon\space}}% + {\setunit*{\publocpunct}}% \printlist{institution}% \setunit*{\addcomma\space}% \usebibmacro{date}% @@ -2573,6 +2654,31 @@ incollection,proceedings,inproceedings]{number}{% }% } +% 责任者如果没有author用editor或translator替代 +% 20210521 v1.0y hzz +%专著如果责任者是editor那么不用输出类型信息 +\renewbibmacro*{editor+others}{% + \ifboolexpr{ + test \ifuseeditor + and + not test {\ifnameundef{editor}} + } + {\printnames{editor}% + \clearname{editor}} + {}} +%要注意要使用translator那么需要开启usetranslator选项的。 +%注意其中的标点处理。 +\renewbibmacro*{translator+others}{% + \ifboolexpr{ + test \ifusetranslator + and + not test {\ifnameundef{translator}} + } + {\renewcommand{\aftertransdelim}{\adddot\addspace}\printnames{translator}% + \clearname{translator}} + {}} + + % % 修改期刊的标题 % @@ -2722,7 +2828,7 @@ incollection,proceedings,inproceedings]{number}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author/editor+others/translator+others}% -\ifnameundef{author}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 +\ifnameundef{namea}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 \usebibmacro{maintitle+title}% \iftoggle{bbx:gbstrict}{}{% \newunit @@ -2907,8 +3013,8 @@ incollection,proceedings,inproceedings]{number}{% \DeclareBibliographyDriver{online}{%源来自standard.BBX \usebibmacro{bibindex}% \usebibmacro{begentry}% - \usebibmacro{author/editor+others/translator+others}% -\ifnameundef{author}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 +\usebibmacro{author/editor+others/translator+others}% +\ifnameundef{namea}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 \usebibmacro{title}% \iftoggle{bbx:gbstrict}{}{% \newunit% @@ -2955,8 +3061,8 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{ \DeclareBibliographyDriver{report}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% - \usebibmacro{author}% -\ifnameundef{author}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 +\usebibmacro{author/editor+others/translator+others}% +\ifnameundef{namea}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 \usebibmacro{title}% \iftoggle{bbx:gbstrict}{}{% \newunit% @@ -3004,8 +3110,8 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{ \DeclareBibliographyDriver{manual}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% - \usebibmacro{author}% -\ifnameundef{author}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 +\usebibmacro{author/editor+others/translator+others}% +\ifnameundef{namea}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 \usebibmacro{title}% \iftoggle{bbx:gbstrict}{}{% \newunit% @@ -3056,8 +3162,8 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{ \DeclareBibliographyDriver{misc}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% - \usebibmacro{author/editor+others/translator+others}% -\ifnameundef{author}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 +\usebibmacro{author/editor+others/translator+others}% +\ifnameundef{namea}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点 \usebibmacro{title}% \iftoggle{bbx:gbstrict}{}{% \newunit @@ -3345,6 +3451,44 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{ {}% {\usebibmacro{date+extradate}}} +% 责任者如果没有author用editor或translator替代 +% 20210521 v1.0y hzz +%专著如果责任者是editor那么不用输出类型信息 +\renewbibmacro*{editor+others}{% + \ifboolexpr{ + test \ifuseeditor + and + not test {\ifnameundef{editor}} + } + {\usebibmacro{bbx:dashcheck} + {\bibnamedash} + {\printnames{editor}% + \usebibmacro{bbx:savehash}}% + \clearname{editor}% + \setunit{\printdelim{nameyeardelim}}}% + {\global\undef\bbx@lasthash + \usebibmacro{labeltitle}% + \setunit*{\printdelim{nonameyeardelim}}}% + \usebibmacro{date+extradate}} +%要注意要使用translator那么需要开启usetranslator选项的。 +%注意其中的标点处理。 +\renewbibmacro*{translator+others}{% + \ifboolexpr{ + test \ifusetranslator + and + not test {\ifnameundef{translator}} + } +{\usebibmacro{bbx:dashcheck} + {\bibnamedash} + {\renewcommand{\aftertransdelim}{\adddot\addspace}\printnames{translator}% + \usebibmacro{bbx:savehash}}% + \clearname{translator}% + \setunit{\printdelim{nameyeardelim}}}% + {\global\undef\bbx@lasthash + \usebibmacro{labeltitle}% + \setunit*{\printdelim{nonameyeardelim}}}% + \usebibmacro{date+extradate}} + }{} 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 4ab0cd54278..6b64e85baee 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 %% --------------------------------------------------------------- %% -\def\versionofgbtstyle{2021/05/06 v1.0y} +\def\versionofgbtstyle{2021/08/19 v1.0z} \ProvidesFile{gb7714-2015mx.cbx}[\versionofgbtstyle biblatex citation style] % -- cgit v1.2.3