summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ms.bbx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ms.bbx')
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ms.bbx1029
1 files changed, 520 insertions, 509 deletions
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 f6b319644de..6a83013c810 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,17 +11,16 @@
%
% 版本和时间信息
%
-\ProvidesFile{gb7714-2015ms.bbx}[2018/11/04 v1.0n biblatex bibliography style]
-\def\versionofgbtstyle{2018/11/04 v1.0n}
+\def\versionofgbtstyle{2019/01/19 v1.0p}
\def\versionofbiblatex{\abx@version}
+\ProvidesFile{gb7714-2015ms.bbx}[\versionofgbtstyle biblatex bibliography style]
\RequireBiber[3]%显式指定用biber后端
%=====================================================================
% 加载标准样式
%=====================================================================
\RequireBibliographyStyle{numeric-comp}
-\RequireBibliographyStyle{standard}
-
+\RequirePackage{xstring}%解决texlive2015的biblatex3.0不加载xstring包的问题
%=====================================================================
% 功能函数
@@ -51,7 +50,7 @@
\providetoggle{ifCJKforgbt}
\def\testCJKfirst#1{%
\iffieldundef{#1}{\togglefalse{ifCJKforgbt}}{%
- \iffieldequalstr{#1}{cn}{\toggletrue{ifCJKforgbt}}{\togglefalse{ifCJKforgbt}}}}
+ \iffieldequalstr{#1}{chinese}{\toggletrue{ifCJKforgbt}}{\togglefalse{ifCJKforgbt}}}}
%
% 2个卷的解析函数,用于连续出版物
@@ -80,6 +79,7 @@
%定义类型和载体标识,从gb内容看载体基本属于介质。
%为与lee zeping的bst的样式统一,使用mark和medium这两域名
%为单个条目的姓名格式控制增加nameformat和namefmtid两个域
+ %为缩略信息文献表增加了shortbooktitle域
\DeclareDatamodelFields[type=field,datatype=literal]{mark,medium,nameformat}
\DeclareDatamodelFields[type=field,datatype=integer]{namefmtid}
\DeclareDatamodelFields[type=field,datatype=literal]{shortbooktitle}
@@ -134,6 +134,9 @@
\def\str@noaddress{出版地不详}
\def\str@nopublisher{出版者不详}
\def\str@edition{版}
+ \def\str@volumecn{卷}
+ \def\str@numbercn{册}
+ \def\str@serialcn{第}
\AtEndOfPackage{%
\iftoggle{bbx:codegbk}{%
@@ -239,12 +242,9 @@
\iffieldundef{#2#3day}{}{\hyphen\blx@imc@forcezerosmdt{\thefield{#2#3day}}}}
%为姓名格式选择增加的计数器
- \newcounter{namefmtcase}
- \def\thenamefmtcase{\the\c@namefmtcase}
-
+ \newcounter{gbnamefmtcase}
+ \def\thegbnamefmtcase{\the\c@gbnamefmtcase}
%为数字标签格式选择增加的计数器/命令
- %\newcounter{bibnumlabel}
- %\def\thebibnumlabel{\the\c@bibnumlabel}
\newcommand{\mkgbnumlabel}[1]{\mkbibbrackets{#1}}
\def\gbbiblabelopt@bracket{\renewcommand{\mkgbnumlabel}[1]{\mkbibbrackets{##1}}}
\def\gbbiblabelopt@parens{\renewcommand{\mkgbnumlabel}[1]{\mkbibparens{##1}}}
@@ -252,8 +252,38 @@
\def\gbbiblabelopt@plain{\renewcommand{\mkgbnumlabel}[1]{##1}}
\def\gbbiblabelopt@box{\renewcommand{\mkgbnumlabel}[1]{\framebox{##1}}}
\def\gbbiblabelopt@circle{\renewcommand{\mkgbnumlabel}[1]{\textcircled{##1}}}
- \newcounter{alignlabel}
- \def\thealignlabel{\the\c@alignlabel}
+ %为文献表中数字标签对齐方式选择增加的计数器/命令
+ \newcounter{gbalignlabel}
+ \def\thegbalignlabel{\the\c@gbalignlabel}
+ %为引用标签标注/文献表中本地化字符串中英文选择增加的计数器/命令
+ \newcounter{gbcitelocalcase}
+ \newcounter{gbbiblocalcase}
+ \def\thegbcitelocalcase{\the\c@gbcitelocalcase}
+ \def\thegbbiblocalcase{\the\c@gbbiblocalcase}
+
+ %
+ % 增加本地化字符串的中英文切换选项
+ % gbcitelocal指标注中的本地化字符串
+ % gbbiblocal 指文献表中的本地化字符串
+ % gblocal 指设置文献表和标注中的本地化字符串
+ % v1.0o,20190103,hzz
+ %
+ \DeclareBibliographyOption[string]{gbcitelocal}[gb7714-2015]{%
+ \ifstrequal{#1}{gb7714-2015}{\setcounter{gbcitelocalcase}{0}}{}%
+ \ifstrequal{#1}{chinese}{\setcounter{gbcitelocalcase}{1}}{}%
+ \ifstrequal{#1}{english}{\setcounter{gbcitelocalcase}{2}}{}%
+ }
+
+ \DeclareBibliographyOption[string]{gbbiblocal}[gb7714-2015]{%
+ \ifstrequal{#1}{gb7714-2015}{\setcounter{gbbiblocalcase}{0}}{}%
+ \ifstrequal{#1}{chinese}{\setcounter{gbbiblocalcase}{1}}{}%
+ \ifstrequal{#1}{english}{\setcounter{gbbiblocalcase}{2}}{}%
+ }
+
+ \DeclareBibliographyOption[string]{gblocal}[gb7714-2015]{%
+ \ExecuteBibliographyOptions{gbbiblocal=#1}%
+ \ExecuteBibliographyOptions{gbcitelocal=#1}%
+ }
%
% 增加序号标签格式处理选项
@@ -267,11 +297,11 @@
% 增加姓名大小写格式处理选项
%
\DeclareBibliographyOption[string]{gbnamefmt}[uppercase]{%
- \ifstrequal{#1}{uppercase}{\setcounter{namefmtcase}{0}}{}%
- \ifstrequal{#1}{lowercase}{\setcounter{namefmtcase}{1}}{}%
- \ifstrequal{#1}{givenahead}{\setcounter{namefmtcase}{2}}{}%given-family
- \ifstrequal{#1}{familyahead}{\setcounter{namefmtcase}{3}}{}
- \ifstrequal{#1}{pinyin}{\setcounter{namefmtcase}{4}}{}%family-given
+ \ifstrequal{#1}{uppercase}{\setcounter{gbnamefmtcase}{0}}{}%
+ \ifstrequal{#1}{lowercase}{\setcounter{gbnamefmtcase}{1}}{}%
+ \ifstrequal{#1}{givenahead}{\setcounter{gbnamefmtcase}{2}}{}%given-family
+ \ifstrequal{#1}{familyahead}{\setcounter{gbnamefmtcase}{3}}{}
+ \ifstrequal{#1}{pinyin}{\setcounter{gbnamefmtcase}{4}}{}%family-given
}
@@ -280,9 +310,9 @@
%
% right是默认的右对齐,left是左对齐,gb7714-2015是项对齐方式
\DeclareBibliographyOption[string]{gbalign}[right]{%
- \ifstrequal{#1}{right}{\setcounter{alignlabel}{0}}{}
- \ifstrequal{#1}{left}{\setcounter{alignlabel}{1}}{}
- \ifstrequal{#1}{center}{\setcounter{alignlabel}{2}}{}
+ \ifstrequal{#1}{right}{\setcounter{gbalignlabel}{0}}{}
+ \ifstrequal{#1}{left}{\setcounter{gbalignlabel}{1}}{}
+ \ifstrequal{#1}{center}{\setcounter{gbalignlabel}{2}}{}
\ifstrequal{#1}{gb7714-2015}{\setaligngbstyle}{}
}
@@ -298,6 +328,8 @@
date = year, %日期仅写到年
maxbibnames = 3,%设置名字最大数量
minbibnames = 3, %设置缩减后的名字最小数量
+ maxitems = 1,%设置列表最大数量
+ minitems = 1, %设置缩减后的列表最小数量
isbn=false,
gbstyle=true,
gbtype=true,
@@ -315,6 +347,7 @@
%eventdate =edtf,%针对3.7<=biblatex<=3.9版本的选项设置,比如texlive2017中的3.7版
urldate =gb7714-2015, %iso,针对3.10<=biblatex版本的选项设置,比如texlive2018中的3.11版
eventdate =gb7714-2015,
+ gblocal=gb7714-2015,
}
@@ -322,9 +355,21 @@
% 设置本地化字符串
%=====================================================================
%
- % 新建当地化字符串,用来记录“等”字符
+ % 新建当地化字符串,用来记录“等”字符、“和”字符
%
\NewBibliographyString{andotherscn}
+ \NewBibliographyString{andothersincitecn}
+ \NewBibliographyString{andothersincite}
+ \NewBibliographyString{andcn}
+ \NewBibliographyString{andothersjp}
+ \NewBibliographyString{andotherskr}
+ \NewBibliographyString{andjp}
+ \NewBibliographyString{andkr}
+ \NewBibliographyString{andincitecn}
+ \NewBibliographyString{andincite}
+ \NewBibliographyString{volumecn}
+ \NewBibliographyString{numbercn}
+ \NewBibliographyString{serialcn}
%
% 修改一些当地化字符串
@@ -335,112 +380,197 @@
\DefineBibliographyStrings{english}{
bibliography = {\str@bibliography},
references = {\str@references},
- %bytranslator= {\addcomma\ 译\adddot}, %将trans. by 改成 译
- bytranslator= {\addcomma\ \str@bytranslator},%\addperiod
- and = {\addcomma},%将第2和3人名见的and符号改成 逗号,用\finalnamedelim命令也可以定义,参见3.9.1节
+ bytranslator= {\addcomma\ \str@bytranslator},%\addperiod,%将trans. by 改成 译
+ and = {\addcomma},%将第2和3人名间的and符号改成逗号,用\finalnamedelim命令也可以定义,参见3.9.1节
+ andcn = {\addcomma},%and本地化字符串的中文对应词
+ andincitecn = {\addcomma},%将标注中的分开,便于与文献表中的区分
+ andincite = {\addcomma},
%andothers = {et al.}, %将超过3个人名的省略,et al.改成为 等
andotherscn = {\str@andotherscn}, %将超过3个人名的省略,et al.改成为 等
+ andothersincitecn={\str@andotherscn},%将标注中的分开,便于与文献表中的区分
+ andothersincite={et al.},
backrefpage = {\str@backrefpage:},
backrefpages = {\str@backrefpages:},
in={in\intitlepunct},
- }
-
+ volumecn={\str@volumecn},
+ numbercn={\str@numbercn},
+ serialcn={\str@serialcn},
+ andothersjp={他},
+ andotherskr={외},
+ andjp={和},
+ andkr={和},
+}
%=====================================================================
-% 动态数据修改,修改输入的源文件数据,用于中文判断等
+% 动态数据修改
%=====================================================================
- %
- % 修改输入的参考文献数据,源文件层的操作
- %
- % 原理方法:增加文献标识符如[M],[J]等
- % 把作者和译者信息准确的记录到userf,usere中,用于后面判断是否是cjk字符。
- % 注意:这里用userf,usere而不是namee,namef,是因为只有把name列表转成域,才能有效读取姓名中的字符,
- % 如果用namee,namef,name信息会自动解析,所以就不能为cjk判断提供需要的信息
- % 注意\DeclareSourcemap命令对于biblatex3.11以下版本只能出现一次,3.11版开始支持多个
- \DeclareSourcemap{
- \maps[datatype=bibtex]{%
+%
+% 各层次的数据映射和动态修改
+%
+% 原理方法:
+% 1. 进行语言包括中英文判断,并设置和记录,比如记录到userf,usere中
+% 2. 增加文献标识符如[M],[J]等,对一些容易混淆的域进行设置以增强兼容性
+% 3. \DeclareSourcemap命令对于biblatex3.11以下版本只能出现一次,3.11版开始支持多个
+% 4. \DeclarestyleSourcemap在biblatex v3.7版开始可以支持出现多次
+% 5. 把作者和译者信息准确的记录到userf,usere中,用于后面判断是否是cjk字符。
+% 注意:这里用userf,usere而不是namee,namef,是因为只有把name列表转成域,才能有效读取姓名中的字符,
+% 如果用namee,namef,name信息会自动解析,所以就不能为cjk判断提供需要的信息
+%
+% 不同的文献类型使用相同的驱动输出可以有5种方法:
+% 1. 是数据源层的映射,将其它类型转换为某一要使用驱动的类型
+% 2. 是样式层映射,也是将其它类型转换为某一要使用驱动的类型
+% 3. 是驱动层映射,也是将其它类型转换为某一要使用驱动的类型
+% 4. 定义驱动类型别名DeclareBibliographyAlias,将其它类型定义为某一要使用驱动的类型的别名
+% 驱动别名定义本质上是做了驱动层映射
+% 5. 直接定义不同的类型的驱动,但驱动内容相同。
+%
+% 关于数据映射和驱动使用的考虑如下:
+% 1. 为避免利用biber输出bib文件时的数据变动,尽量不在数据源层映射做类型转换
+% 2. 为减少代码量,尽量少做内容相同的不同类型驱动
+% 3. 因此类型相关的处理主要在样式层映射、驱动层映射、驱动别名
+% 4. 由于biblatex默认做的驱动别名处理可能增加一些信息比如masterthesis转thesis时增加的type
+% 可以在样式层映射做某些需要避免这种默认处置的转换
+% 5. 当没有避免默认行为的需求时,全部采用驱动别名的方式处理,等价于驱动层的映射
+%
+% 文献类型和驱动考虑如下:
+% 1. 连续出版物及析出文献有其特殊性,因此考虑两类periodical和article
+% newpaper映射为article,并以note域做区分特殊处理
+% 2. 专著和专著中的析出文献是主要的类型,因此考虑book和inbook
+% standard映射为book或inbook,并以note域做区分特殊处理
+% collection和proceedings基本与book类似,因此做book驱动别名处理
+% incollection和inproceedings基本与inbook类似,因此做inbook驱动别名处理
+% 3. 专利类型有其特殊性,考虑patent类型
+% 4. 电子资源类型有其特殊性,考虑online类型
+% 5. 报告类型与book有点类似,出版项处理与book一样,但有时又要有修改和更细日期
+% 因此考虑用一种类型来输出,使用report类型
+% 6. 手册/学位论文等类型与book有点类似,但对于出版项处理时,有缺省时,直接省略,
+% 同时有version和edition的区别,因此考虑用一种类型来输出,使用manual类型
+% 7. 包括报告,学位论文在内的其它所有的类型,都做一个判断,当没有出版项时,
+% 且存在网址信息时,将其转换为online类型输出,否则都做为manual类型输出。
+
+\DeclareSourcemap{
+\maps[datatype=bibtex]{%
+ \map{
+ \pernottype{inbook}
+ \pernottype{inproceedings}
+ \pernottype{incollection}
+ \step[notfield=author]%当author不存在,将editor复制给author
+ \step[fieldsource=editor,fieldtarget=author]%并删除editor
+ }
+ \map{
+ \pernottype{inbook}
+ \pernottype{inproceedings}
+ \pernottype{incollection}
+ \step[notfield=author]%当author不存在,将translator复制给author
+ \step[fieldsource=translator,fieldtarget=author]%并删除translator
+ }
+ \map{
+ \step[notfield=address]%当address和location同步
+ \step[fieldsource=location,final]
+ \step[fieldset=address,origfieldval]
+ }
+ \map{
+ \step[notfield=location]%当address和location同步
+ \step[fieldsource=address,final]
+ \step[fieldset=location,origfieldval]
+ }
\map[overwrite]{%用于处理zotero从cnki导出中文文献姓名中存在逗号的情况
\step[fieldsource={author}, match=\regexp{([\x{2FF0}-\x{9FA5}])\,\s*}, replace=\regexp{$1}]
- }
- \map{%
+ }%\perdatasource{examples.bib}
+ \map{%处理在bib文件用mark标记文献类型标识符的情况
\step[fieldsource=mark,final]
\step[fieldset=usera, origfieldval]
}
- \map{%
+ \map{%处理在bib文件中直接给出文献的姓名格式为lowercase的情况
\step[fieldsource=nameformat,match=lowercase,final]
\step[fieldset=namefmtid,fieldvalue={1}]
}
- \map{%
+ \map{%处理在bib文件中直接给出文献的姓名格式为givenahead的情况
\step[fieldsource=nameformat,match=givenahead,final]
\step[fieldset=namefmtid,fieldvalue={2}]
}
- \map{%
+ \map{%处理在bib文件中直接给出文献的姓名格式为familyahead的情况
\step[fieldsource=nameformat,match=familyahead,final]
\step[fieldset=namefmtid,fieldvalue={3}]
}
- \map{%
+ \map{%处理在bib文件中直接给出文献的姓名格式为pinyin的情况
\step[fieldsource=nameformat,match=pinyin,final]
\step[fieldset=namefmtid,fieldvalue={4}]
}
- \map{%
- %\perdatasource{examples.bib}
+ \map{%根据article确定文献类型标识符
\pertype{article}
\step[fieldset=usera, fieldvalue={J}]
}
- \map{
+ \map{%根据periodical确定文献类型标识符
\pertype{periodical}
\step[fieldset=usera, fieldvalue={J}]
- \step[fieldsource=author] %有时会把author和editor混淆,处理后避免该问题
+ \step[fieldsource=author] %有时会把author和editor混淆,处理后使用editor
\step[fieldset=editor, origfieldval]
- \step[fieldsource=publisher] %有时会把publisher和institution混淆,处理后避免该问题
+ \step[fieldsource=publisher] %有时会把publisher和institution混淆,处理后使用institution
\step[fieldset=institution, origfieldval]
}
- \map{
- \pertype{newspaper}%增加一个新闻报纸的类型newspaper
- \step[fieldset=usera, fieldvalue={N}]%因为没有专门的驱动,这句的目的是定义一个usera域,方便映射为article后判断
- \step[fieldset=note, fieldvalue=news]
+ \map{%根据增加一个新闻报纸的类型newspaper确定文献类型标识符
+ \pertype{newspaper}
+ \step[fieldset=usera, fieldvalue={N}]
+ \step[fieldset=note, fieldvalue=news]%因为没有专门的驱动,记录note方便映射为article后判断
}
- \map{
- \pertype{database}%对应增加的一个数据库类型database
- \step[fieldset=usera, fieldvalue={DB}]%没有专门的驱动,定义一个usera域,方便映射后使用
+ \map{%对应增加的一个数据库类型database确定文献类型标识符
+ \pertype{database}
+ \step[fieldset=usera, fieldvalue={DB}]
+ \step[fieldsource=publisher] %有时会把publisher和institution混淆,处理后使用institution
+ \step[fieldset=institution, origfieldval]
}
- \map{
- \pertype{dataset}%对应增加的一个数据集类型dataset
- \step[fieldset=usera, fieldvalue={DS}]%没有专门的驱动,定义一个usera域,方便映射后使用
+ \map{%对应增加的一个数据集类型dataset确定文献类型标识符
+ \pertype{dataset}
+ \step[fieldset=usera, fieldvalue={DS}]%
+ \step[fieldsource=publisher] %有时会把publisher和institution混淆,处理后使用institution
+ \step[fieldset=institution, origfieldval]
}
- \map{
- \pertype{software}%对应增加的一个软件类型software
- \step[fieldset=usera, fieldvalue={CP}]%没有专门的驱动,定义一个usera域,方便映射后使用
+ \map{%对应增加的一个软件类型software确定文献类型标识符
+ \pertype{software}
+ \step[fieldset=usera, fieldvalue={CP}]
+ \step[fieldsource=publisher] %有时会把publisher和institution混淆,处理后使用institution
+ \step[fieldset=institution, origfieldval]
}
- \map{
- \pertype{map}%对应增加的一个舆图类型map
- \step[fieldset=usera, fieldvalue={CM}]%没有专门的驱动,定义一个usera域,方便映射后使用
+ \map{%对应增加的一个舆图类型map确定文献类型标识符
+ \pertype{map}
+ \step[fieldset=usera, fieldvalue={CM}]%
+ \step[fieldsource=publisher] %有时会把publisher和institution混淆,处理后使用institution
+ \step[fieldset=institution, origfieldval]
}
- \map{
- \pertype{archive}%对应增加的一个档案类型archive
- \step[fieldset=usera, fieldvalue={A}]%没有专门的驱动,定义一个usera域,方便映射后使用
+ \map{%对应增加的一个档案类型archive确定文献类型标识符
+ \pertype{archive}
+ \step[fieldset=usera, fieldvalue={A}]
+ \step[fieldsource=publisher] %有时会把publisher和institution混淆,处理后使用institution
+ \step[fieldset=institution, origfieldval]
}
- \map{
- \pertype{misc}%当misc类型带有网址时,将其转换为online类型
+ \map{%因为misc类型本身就是没有类型,而不像其它文献有明确的类型,所以
+ %当misc类型带有网址时,直接将其转换为online类型
+ \pertype{misc}
\step[fieldsource=url,final]
\step[typesource=misc,typetarget=online]
}
- \map{
- \pertype{misc}%对应增加的一个备选类型misc
- \step[fieldset=usera, fieldvalue={Z}]%没有专门的驱动,定义一个usera域,方便映射后使用
+ \map{%对应增加的一个备选类型misc确定文献类型标识符
+ \pertype{misc}
+ \step[fieldset=usera, fieldvalue={Z}]%
}
\map{
\pertype{book}
\pertype{inbook}
\step[fieldset=usera, fieldvalue={M}]
- \step[fieldsource=version] %有时会把version和edition混淆,处理后避免该问题,可以直接用version
+ \step[fieldsource=version] %有时会把version和edition混淆,处理后直接用edition
\step[fieldset=edition, origfieldval]
}
\map{
- \pertype{standard}%兼容老的standard类型
- \step[fieldset=usera, fieldvalue={S}]%因为没有专门的驱动,这句的目的是定义一个usera域,方便映射为book和inbook后判断
- \step[fieldset=note, fieldvalue=standard]
+ \pertype{inbook}
+ \step[fieldsource=editor]%有时会把editor和bookauthor混淆,处理后使用bookauthor
+ \step[fieldset=bookauthor, origfieldval]
+ }
+ \map{%兼容老的standard类型,确定文献类型标识符
+ \pertype{standard}
+ \step[fieldset=usera, fieldvalue={S}]
+ \step[fieldset=note, fieldvalue=standard]%因为没有专门的驱动,记录note方便映射为book和inbook后判断
}
\map{
\pertype{patent}
@@ -450,67 +580,81 @@
\pertype{inproceedings}
\pertype{conference}%兼容老的conference类型
\step[fieldset=usera, fieldvalue={C}]
- \step[fieldsource=institution] %有时会把publisher和institution混淆,处理后避免该问题
+ \step[fieldsource=institution]%有时会把publisher和institution混淆,处理后使用institution
\step[fieldset=publisher, origfieldval]
- \step[fieldsource=editor] %
+ \step[fieldsource=editor]%%有时会把editor和bookauthor混淆,处理后使用bookauthor
\step[fieldset=bookauthor, origfieldval]
}
\map{
\pertype{proceedings}
\step[fieldset=usera, fieldvalue={C}]
- \step[fieldsource=institution] %有时会把publisher和institution混淆,这里处理后就没有这个问题
+ \step[fieldsource=institution]%有时会把publisher和institution混淆,处理后使用publisher
+ \step[fieldset=publisher, origfieldval]
+ }
+ \map{
+ \pertype{incollection}
+ \step[fieldset=usera, fieldvalue={G}]
+ \step[fieldsource=institution]%有时会把publisher和institution混淆,处理后使用institution
+ \step[fieldset=publisher, origfieldval]
+ \step[fieldsource=editor]%%有时会把editor和bookauthor混淆,处理后使用bookauthor
+ \step[fieldset=bookauthor, origfieldval]
+ }
+ \map{
+ \pertype{collection}
+ \step[fieldset=usera, fieldvalue={G}]
+ \step[fieldsource=institution]%有时会把publisher和institution混淆,处理后使用publisher
\step[fieldset=publisher, origfieldval]
- \step[fieldsource=editor] %有的时候可能只填写了编者,没有author,把它复制一下
- \step[fieldset=author, origfieldval]
}
\map{
\pertype{report}
\pertype{techreport}%兼容老的techreport类型
\step[fieldset=usera, fieldvalue={R}]
- \step[fieldsource=publisher] %有时会把publisher和institution混淆,处理后避免该问题
- \step[fieldset=institution, origfieldval]
+ \step[fieldsource=institution]%有时会把publisher和institution混淆,处理后使用publisher
+ \step[fieldset=publisher, origfieldval]
}
\map{
\pertype{thesis}
\pertype{mastersthesis}%兼容老的mastersthesis和phdthesis类型
\pertype{phdthesis}
\step[fieldset=usera, fieldvalue={D}]
+ \step[fieldsource=publisher]%有时会把publisher和institution混淆,处理后使用institution
+ \step[fieldset=institution, origfieldval]
}
\map{
\pertype{online}
\pertype{electronic}%兼容老的electronic类型
\pertype{www}%兼容老的www类型
\step[fieldset=usera, fieldvalue={EB}]
+ \step[fieldsource=publisher]%有时会把publisher和institution混淆,处理后使用institution
+ \step[fieldset=institution, origfieldval]%因为online的出版项处理类似手册
+ \step[fieldsource=organization]%有时会把organization和institution混淆,处理后使用institution,以增强兼容性
+ \step[fieldset=institution, origfieldval]
}
\map{
\pertype{manual}
\step[fieldset=usera, fieldvalue={A}]
- \step[fieldsource=edition] %有时会把version和edition混淆,处理后避免该问题,可以直接用version
+ \step[fieldsource=edition]%有时会把version和edition混淆,处理后使用version
\step[fieldset=version, origfieldval]
- \step[fieldsource=organization]%因为用的report的驱动,所以需要institution域,把organization转成它以增强兼容性
+ \step[fieldsource=publisher]%有时会把publisher和institution混淆,处理后使用institution
+ \step[fieldset=institution, origfieldval]
+ \step[fieldsource=organization]%有时会把organization和institution混淆,处理后使用institution,以增强兼容性
\step[fieldset=institution, origfieldval]
- }
- \map{
- \pertype{incollection}
- \step[fieldset=usera, fieldvalue={G}]
- }
- \map{
- \pertype{collection}
- \step[fieldset=usera, fieldvalue={G}]
- \step[fieldsource=editor] %%有的时候可能只填写了编者,没有author,把它复制一下
- \step[fieldset=author, origfieldval]
}
\map{
\pertype{unpublished}
\step[fieldset=usera, fieldvalue={Z}]
}
- \map{
+ \map{%作者的中文判断
\step[fieldsource=author, match=\regexp{[\x{2FF0}-\x{9FA5}]},final]
- \step[fieldset=userf, fieldvalue={cn}]
+ \step[fieldset=userf, fieldvalue={chinese}]
}
- \map{
+ \map{%译者的中文判断
\step[fieldsource=translator, match=\regexp{[\x{2FF0}-\x{9FA5}]},final]
- \step[fieldset=usere, fieldvalue={cn}]
+ \step[fieldset=usere, fieldvalue={chinese}]
+ }
+ \map{%编者的中文判断
+ \step[fieldsource=editor, match=\regexp{[\x{2FF0}-\x{9FA5}]},final]
+ \step[fieldset=userc, fieldvalue={chinese}]
}
\map{%处理一些用year表示date的情况
%这样处理将会设置date域,并使得labeldatesource变为空,因为date的前缀为空(如果是urldate,那么labeldatesource就是url)。
@@ -518,20 +662,15 @@
\step[fieldsource=year]
\step[fieldset=date, origfieldval]
}
- \map{%将title信息保存到userd中避免因为标签生成原因导致title域被清除
- \step[fieldsource=title, match=\regexp{[\x{2FF0}-\x{9FA5}]},final]%}
- \step[fieldset=userd, fieldvalue={cn}]
+ \map{%文献题名的中文判断,将信息保存到userd中,避免因为标签生成原因导致title域被清除而产生问题
+ \step[fieldsource=title, match=\regexp{[\x{2FF0}-\x{9FA5}]},final]%
+ \step[fieldset=userd, fieldvalue={chinese}]
}
- \map{%将entrykey放入keywords中用于后期的使用
+ \map{%将entrykey放入keywords中用于后期使用
\step[fieldsource=entrykey]
\step[fieldset=keywords, origfieldval]
}
- \map[overwrite]{%这里还必须有overwrite,注意不同版本存在差异,比如texlive2015变16后biber有变化(20161207修改正确)
- \step[fieldsource=note, final]%将note域信息复制给keywords,用于输出时容易区分标准和报纸
- \step[fieldset=keywords, fieldvalue={,}, append]
- \step[fieldset=keywords, origfieldval, append]
- }
- \map{%
+ \map{%当文献给出language域时,设置文献要使用的本地化字符串的语言
\step[fieldsource=language,match=english,final]
\step[fieldset=langid,fieldvalue={english}]
}
@@ -555,7 +694,8 @@
\step[fieldsource=language,match=korean,final]
\step[fieldset=langid,fieldvalue={english}]
}
- \map{%把语言信息设置language域内,而不再用userb域(20180525)
+ \map{%当没有language域信息给出时,根据title域来自动判断语言并设置本地化字符串语言
+ %把语言信息设置language域内,而不再用userb域(20180525)
%接着根据信息域字符的unicode码判断
\step[fieldsource=title,match=\regexp{[\x{0100}-\x{017F}]},final]%\x80-\xFF
\step[fieldset=language,fieldvalue={french}]%法语,0080开始到00ff的字符没法匹配有点奇怪
@@ -592,6 +732,9 @@
\step[fieldset=language,fieldvalue={english}]
\step[fieldset=langid,fieldvalue={english}]
}
+ \map{%将非中文的语言放入userd中,以便进行多语言处理
+ \step[fieldsource=language,fieldtarget=userd,final]
+ }
}
}
@@ -602,11 +745,9 @@
% 原理方法:biblatex3.4以上版本map可使用foreach选项来处理特殊字符
\DeclareStyleSourcemap{
\maps[datatype=bibtex]{
- % \map{%尝试未定义数据模型的newspaper类型映射为article,newspaper完全是针对gb7714的新类型,在biblatex中完全没有定义
- % %但从实践看,并没有什么影响,映射过来就可以了。
- % \step[typesource=newspaper, typetarget=article, final]
- % }
- \map{%尝试未定义数据模型的standard类型映射为book,standard类型在blx-dm中有出现,但仅定义了类型,域和约束等都没有定义
+ \map{%尝试未定义数据模型的standard类型映射为其他类型book或inbook,
+ %standard类型在blx-dm中有出现,但仅定义了类型,域和约束等都没有定义
+ %因为可能要映射两种类型,所以不能在驱动层处理,因为要做判断
\step[fieldsource=booktitle,final]%当存在booktitle域是映射为inbook
\step[typesource=standard, typetarget=inbook, final]
}
@@ -625,6 +766,66 @@
\step[typesource=techreport, typetarget=report, final]
%\step[fieldset=type, fieldvalue=techreport]
}
+ \map{%
+ \pertype{report}
+ \step[notfield=address,final]%当address不存在则继续
+ \step[fieldsource=url,final]%地址不存在且存在url那么转变为online
+ \step[typesource=report,typetarget=online]
+ \step[fieldset=note,fieldvalue={report}]
+ }
+ \map{%
+ \pertype{thesis}
+ \step[notfield=address,final]%当address不存在则继续
+ \step[fieldsource=url,final]%地址不存在且存在url那么转变为online
+ \step[typesource=thesis,typetarget=online]
+ }
+ \map{%
+ \pertype{manual}
+ \step[notfield=address,final]%当address不存在则继续
+ \step[fieldsource=url,final]%地址不存在且存在url那么转变为online
+ \step[typesource=manual,typetarget=online]
+ }
+ \map{%
+ \pertype{unpublished}
+ \step[notfield=address,final]%当address不存在则继续
+ \step[fieldsource=url,final]%地址不存在且存在url那么转变为online
+ \step[typesource=unpublished,typetarget=online]
+ }
+ \map{%
+ \pertype{database}
+ \step[notfield=address,final]%当address不存在则继续
+ \step[fieldsource=url,final]%地址不存在且存在url那么转变为online
+ \step[typesource=databasetypetarget=online]
+ }
+ \map{%
+ \pertype{dataset}
+ \step[notfield=address,final]%当address不存在则继续
+ \step[fieldsource=url,final]%地址不存在且存在url那么转变为online
+ \step[typesource=dataset,typetarget=online]
+ }
+ \map{%
+ \pertype{software}
+ \step[notfield=address,final]%当address不存在则继续
+ \step[fieldsource=url,final]%地址不存在且存在url那么转变为online
+ \step[typesource=software,typetarget=online]
+ }
+ \map{%
+ \pertype{map}
+ \step[notfield=address,final]%当address不存在则继续
+ \step[fieldsource=url,final]%地址不存在且存在url那么转变为online
+ \step[typesource=map,typetarget=online]
+ }
+ \map{%
+ \pertype{archive}
+ \step[notfield=address,final]%当address不存在则继续
+ \step[fieldsource=url,final]%地址不存在且存在url那么转变为online
+ \step[typesource=archive,typetarget=online]
+ }
+ \map[overwrite]{%这里还必须有overwrite,注意不同版本存在差异,比如texlive2015变16后biber有变化(20161207修改正确)
+ \step[fieldsource=note, final]%将note域信息复制给keywords,用于输出时容易区分标准和报纸
+ \step[fieldset=keywords, fieldvalue={,}, append]
+ \step[fieldset=keywords, origfieldval, append]
+ }
\map[overwrite, foreach={title,booktitle,journaltitle,journal,publisher,address,location,institution,organization}]{
\step[fieldsource=\regexp{$MAPLOOP}, match=\regexp{([^\\])\#}, replace=\regexp{$1\\\#}]
}
@@ -638,8 +839,17 @@
}
}
-\DeclareBibliographyAlias{newspaper}{article}%定义驱动别名,尝试以替代驱动层映射,实践表明是可行的。
-\DeclareBibliographyAlias{unpublished}{manual}
+%
+%驱动别名等价于驱动层映射
+%
+\DeclareBibliographyAlias{newspaper}{article}%
+\DeclareBibliographyAlias{inproceedings}{inbook}%会议论文文献类型驱动
+\DeclareBibliographyAlias{conference}{inbook}%会议论文文献类型驱动
+\DeclareBibliographyAlias{incollection}{inbook}%文集中析出文献类型驱动
+\DeclareBibliographyAlias{collection}{book}%%文集类型驱动
+\DeclareBibliographyAlias{proceedings}{book}%会议论文集文献类型驱动
+\DeclareBibliographyAlias{thesis}{manual}%学位论文驱动
+\DeclareBibliographyAlias{unpublished}{manual}%其它类型驱动
\DeclareBibliographyAlias{database}{manual}
\DeclareBibliographyAlias{dataset}{manual}
\DeclareBibliographyAlias{software}{manual}
@@ -655,9 +865,10 @@
%
% 增加一个\bibitemindent尺寸用于控制list环境的itemindent
% v1.0l,20180615,hzz
+\setlength{\bibhang}{\biblabelsep}%
\newlength{\bibitemindent}
\setlength{\bibitemindent}{0pt}
-\setlength{\bibhang}{\biblabelsep}%
+
\defbibenvironment{bibliography}
{\list
@@ -688,7 +899,7 @@
% \DeclareFieldFormat{shorthandwidth}{\mkbibbrackets{#1}} %源来自numeric.BBX
% \DeclareFieldFormat{labelnumberwidth}{\ttfamily\mkbibbrackets{#1}\hfill}
\DeclareFieldFormat{labelnumberwidth}{%
-\ifcase\value{alignlabel}%右对齐,整个标签为右对齐
+\ifcase\value{gbalignlabel}%右对齐,整个标签为右对齐
\mkgbnumlabel{#1}%
\or%左对齐,整个标签为左对齐
\mkgbnumlabel{#1}\hfill%
@@ -752,7 +963,7 @@
% 设置单元或块等的标点
%=====================================================================
\renewrobustcmd*{\bibinithyphendelim}{\addhighpenspace}%用于处理姓名中名部分存在-的情况,比如ZHANG Yu-xin
-\renewcommand*{\subtitlepunct}{\addcolon\space} %修改标题和其它标题信息间的标点,来源biblatex.def,
+\renewcommand*{\subtitlepunct}{\addcolon\addspace} %修改标题和其它标题信息间的标点,来源biblatex.def,
%
% 利用set实现的多语言文献不同语言间的分隔符
% 20170411,双语之间用newline替换par,避免采用gb7714-2015的项对齐方式第二语言间分段导致没有缩进
@@ -761,13 +972,16 @@
% 这里调整一下两种语言参考文献的间隔,源来自biblatex.def
\renewcommand*{\entrysetpunct}{\adddot\newline\nobreak}
\renewcommand*{\bibpagespunct}{\addcolon\addthinspace}%%页码引用格式的修改,修改为用冒号
-
+%\renewcommand{\relateddelim}{}%\par
%=====================================================================
% 修改域的格式,重定义域的输出宏
%=====================================================================
%
% 新增文献类型标识符的格式
+% []前的nobreak,从GB4.1节的例子看不应该加,所以去掉
+% 但因为考虑到cjk字符和[]之间可能添加空格,所以仍然加上
+% 而[]中间的内容,从4.6.2节的例子看也是可以分割的,因此内部的nobreak也可以去掉
%
\DeclareFieldFormat{gbtypeflag}{%
\iftoggle{bbx:url}{\iffieldundef{url}%当存在url时,增加一个OL标识符
@@ -808,8 +1022,8 @@
% 20180603,v1.0l,增加使用nameformat域来选择姓名格式
\DeclareNameFormat{namefmtselected}{%
\iffieldundef{namefmtid}{}%
-{\defcounter{namefmtcase}{\thefield{namefmtid}}}%
-\ifcase\value{namefmtcase}%
+{\defcounter{gbnamefmtcase}{\thefield{namefmtid}}}%
+\ifcase\value{gbnamefmtcase}%
\ifgiveninits
{\usebibmacro{name:gbuppercase}
{\namepartfamily}
@@ -965,6 +1179,11 @@
\setcounter{biburlnumpenalty}{100} %让url可以在数字后断行
\setcounter{biburlucpenalty}{100} %让url可以在大写字母后断行
\setcounter{biburllcpenalty}{100} %让url可以在小写字母后断行
+\DeclareFieldFormat{doi}{%
+ \rmfamily{DOI}\addcolon\space
+ \ifhyperref
+ {\href{https://doi.org/#1}{\nolinkurl{#1}}}
+ {\nolinkurl{#1}}}
\DefineBibliographyExtras{english}{\renewcommand*{\bibrangedash}{-}}%将页码间隔符替换会英文的短横线
@@ -1086,7 +1305,7 @@
\AtEveryBibitem{%
\ifboolexpr{
-togl{bbx:gbstyle} or test {\iffieldequalstr{userd}{cn}}
+togl{bbx:gbstyle} or test {\iffieldequalstr{userd}{chinese}}
}
{
@@ -1133,23 +1352,75 @@ togl{bbx:gbstyle} or test {\iffieldequalstr{userd}{cn}}
%
% 修改作者数量超过限定值,做省略时的处理格式
+% v1.0,20160701,hzz
+% v1.0O,20190103,hzz,修改利用新定义的一个分隔符strandothersdelim
%
-% 原理方法:判断作者或译者是否中文,若中文用字符等,否则用etcl。
+% 原理方法:判断作者或译者是否中文,若中文用字符等,否则用et al. 。
\renewbibmacro*{name:andothers}{%
\ifboolexpr{
test {\ifnumequal{\value{listcount}}{\value{liststop}}}
and
test \ifmorenames
- }{%这里做一个判断是在处理author还是translator用于两者是不同语言的情况
- \ifcurrentname{translator}{\testCJKfirst{usere}}{\testCJKfirst{userf}}%
- %这句判断如果放到\andothersdelim后面会在等或etc.前增加一个空格,所以放前面
- \ifnumgreater{\value{liststop}}{1}
+ }{\ifnumgreater{\value{liststop}}{1}
{\finalandcomma}%
{}%biblatex作者要区别单作者加等的情况,这里为符合gbt7714-2015第7.2节的要求加上了逗号。
-\printdelim{andothersdelim}\iftoggle{ifCJKforgbt}{\bibstring{andotherscn}}{\bibstring{andothers}}%
-%\andothersdelim\bibstring{andotherscn}
+\printdelim{andothersdelim}\printdelim{strandothersdelim}%
}{}}
+%
+% 修改省略作者后的本地化字符串,比如et al.
+% v1.0o,20190103,hzz
+%
+% 原理方法:默认情况下判断作者或译者是否中文,若中文用字符andotherscn=“等”,否则用andothers=“et al.”。
+% 非默认情况,根据选项信息,选择选择强制中文或英文
+% 首先设置全局的,然后设置文献表中的,这一等价于将所有的cite命令环境都设置过了
+% 而不用对每一个引用命令单独设置,比如cite,parancite,textcite都设置
+\DeclareDelimFormat{strandothersdelim}{%
+ \ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}%
+ \addspace%
+ \ifcurrentname{translator}{\testCJKfirst{usere}}{\testCJKfirst{userf}}%
+ \ifcurrentname{editor}{\testCJKfirst{userc}}{\testCJKfirst{userf}}%
+ \ifcase\value{gbbiblocalcase}%
+ \iftoggle{ifCJKforgbt}{\bibstring{andotherscn}}{%
+\iffieldequalstr{userd}{korean}{\bibstring{andotherskr}}{}%
+\iffieldequalstr{userd}{japnese}{\bibstring{andothersjp}}{}%
+\iffieldequalstr{userd}{english}{\bibstring{andothers}}{}%
+\iffieldequalstr{userd}{french}{\bibstring{andothers}}{}%
+\iffieldequalstr{userd}{russian}{\bibstring{andothers}}{}%
+ }\space%
+ \or%
+ \bibstring{andotherscn}\space%
+ \or%
+ \bibstring{andothers}\space%
+ \fi}
+
+%
+% 修改最后一个作者前的字符串,比如 and
+% v1.0o,20190103,hzz
+%
+% 原理方法:默认情况下判断作者或译者是否中文,若中文用字符andcn=“和”,否则用and=“and”。
+% 非默认情况,根据选项信息,选择选择强制中文或英文
+% 首先设置全局的,然后设置文献表中的,这一等价于将所有的cite命令环境都设置过了
+% 而不用对每一个引用命令单独设置,比如cite,parancite,textcite都设置
+\DeclareDelimFormat{finalnamedelim}{%
+ \ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}%
+ \addspace%
+ \ifcurrentname{translator}{\testCJKfirst{usere}}{\testCJKfirst{userf}}%
+ \ifcurrentname{editor}{\testCJKfirst{userc}}{\testCJKfirst{userf}}%
+ \ifcase\value{gbbiblocalcase}%
+ \iftoggle{ifCJKforgbt}{\bibstring{andcn}}{%
+\iffieldequalstr{userd}{korean}{\bibstring{andkr}}{}%
+\iffieldequalstr{userd}{japnese}{\bibstring{andjp}}{}%
+\iffieldequalstr{userd}{english}{\bibstring{and}}{}%
+\iffieldequalstr{userd}{french}{\bibstring{and}}{}%
+\iffieldequalstr{userd}{russian}{\bibstring{and}}{}%
+ }\space%
+ \or%
+ \bibstring{andcn}\space%
+ \or%
+ \bibstring{and}\space%
+ \fi}
+
%
% url和url日期格式
%
@@ -1234,12 +1505,19 @@ togl{bbx:gbstyle} or test {\iffieldequalstr{userd}{cn}}
}
%
-% 出版社和地址的处理
+% 当location等出版项超过maxitem缩减后不再输出etal
+%
+\DeclareListFormat{location}{%
+ \usebibmacro{list:delim}{#1}%
+ #1\isdot}
+\DeclareListAlias{institution}{location}
+\DeclareListAlias{publisher}{location}
+
+% 新增一个样式用于输出连续出版物的地址,单位,时间,
+% 用于periodical连续出版物的出版社和地址的处理
%
% v1.0k,20180425,为出版信息增加字体控制命令,hzz
-% 原理方法:当没有出版社地址时,直接判断title的信息是否是中文,若为中文,则写出版地不详,否则用英文的字符表示。
-% 事实上title对于每个文献来说是必须的,所以用它判断是最快的,而且一般标题和出版社的语言是一样的。
-% 新增一个样式用于输出连续出版物的地址,单位,时间,%类似\newbibmacro*{publisher+location+date}
+% %类似\newbibmacro*{publisher+location+date}
\newbibmacro*{location+institution+date}{\bibpubfont%
\iftoggle{bbx:gbpub}%
{\testCJKfirst{userd}%
@@ -1270,30 +1548,27 @@ test {\iflistundef{location}} and test {\iflistundef{institution}}%
\newunit}%
}
%
+% 通用的出版社和地址的处理
%
+% 原理方法:当没有出版社地址时,直接判断title的信息是否是中文,若为中文,则写出版地不详,否则用英文的字符表示。
+% 事实上title对于每个文献来说是必须的,所以用它判断是最快的,而且一般标题和出版社的语言是一样的。
+% 注意标准standard类型,因为当没有出版项时直接省略,所以做特殊处理
\renewbibmacro*{publisher+location+date}{\bibpubfont%
\iftoggle{bbx:gbpub}%
{\testCJKfirst{userd}%
-\ifboolexpr{%
-test {\iflistundef{location}} and test {\iflistundef{publisher}}%
-}{\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%
-\iflistundef{publisher}{%
-\iffieldequalstr{note}{standard}{}{%
-\iftoggle{ifCJKforgbt}{\printtext{[\str@nopublisher]}\setunit{\adddot\addspace}\setunit*{\addcomma\addspace}}%
-{\printtext{\mkbibbrackets{s.n.}}\setunit{\adddot\addspace}\setunit*{\addcomma\addspace}}%
-}}%
-{\printlist{publisher}}}%
+ \ifboolexpr{ test {\iflistundef{location}} and test {\iflistundef{publisher}} }%
+ {\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%
+ \iflistundef{publisher}{%
+ \iffieldequalstr{note}{standard}{}%
+ {\iftoggle{ifCJKforgbt}{\printtext{[\str@nopublisher]}\setunit{\adddot\addspace}\setunit*{\addcomma\addspace}}%
+ {\printtext{\mkbibbrackets{s.n.}}\setunit{\adddot\addspace}\setunit*{\addcomma\addspace}}}}%
+ {\printlist{publisher}}}%
\setunit*{\addcomma\addspace}%\addcomma\addspace%
-\usebibmacro{date}%
-%\newunit %去掉这个标点
+\usebibmacro{date}%%\newunit %去掉这个标点
}%
{\printlist{location}%
\iflistundef{publisher}
@@ -1301,11 +1576,53 @@ test {\iflistundef{location}} and test {\iflistundef{publisher}}%
{\setunit*{\addcolon\space}}%
\printlist{publisher}%
\setunit*{\addcomma\space}%
- \usebibmacro{date}%
- %\newunit
+ \usebibmacro{date}%%\newunit
}%
}
+
+
+%
+% 修改了一个institution+location+date用于manual、report、thesis等类型
+%
+% 20180425,v1.0k,增加了字体控制命令,hzz
+% 20190105,v1.0o,加了一个编组避免\usebibmacro{date}把month和day信息去掉
+\renewbibmacro*{institution+location+date}{\bibpubfont%当没有institution时不处理。
+{\printlist{location}%%加了一个编组避免\usebibmacro{date}把month和day信息去掉
+ \iflistundef{institution}
+ {\setunit*{\addcomma\space}}
+ {\setunit*{\addcolon\space}}%
+ \printlist{institution}%
+ \setunit*{\addcomma\space}%
+ \usebibmacro{date}%
+ %\newunit
+ }}
+
+%
+% 对volume卷信息格式做出修改
+% v1.0o,20190105,hzz
+%
+\DeclareFieldFormat{volume}{%
+\testCJKfirst{userd}%
+\iftoggle{ifCJKforgbt}%
+{\bibstring{serialcn}#1\bibstring{volumecn}}%
+{\bibstring{volume}~#1}%
+}% volume of a book
+\DeclareFieldFormat[article,periodical]{volume}{#1}% volume of a journal
+
+%
+% 对number册信息格式做出修改
+% v1.0o,20190105,hzz
+%
+\DeclareFieldFormat{number}{#1}%
+\DeclareFieldFormat[book,collection,inbook,%
+incollection,proceedings,inproceedings]{number}{%
+\testCJKfirst{userd}%
+\iftoggle{ifCJKforgbt}%
+{\bibstring{serialcn}#1\bibstring{numbercn}}%
+{#1}%
+}%
+
%
% 对edition版本信息格式做出修改
%
@@ -1400,8 +1717,8 @@ test {\iflistundef{location}} and test {\iflistundef{publisher}}%
{\iffieldequalstr{note}{news}{\usebibmacro{newsdate}}%判断是否为报纸
{\usebibmacro{date}}%
}}%
- {\printfield{issue}%
- \setunit*{\addspace}%
+ {\iftoggle{bbx:gbstrict}{}{\printfield{issue}%
+ \setunit*{\addspace}}%
%\usebibmacro{date}
\iffieldundef{note}{\usebibmacro{date}}%判断一下,是否是报纸
{\iffieldequalstr{note}{news}{\usebibmacro{newsdate}}%判断是否为报纸
@@ -1445,8 +1762,8 @@ test {\iflistundef{location}} and test {\iflistundef{publisher}}%
\renewbibmacro*{editorstrg}{%源来自biblatex.DEF
\printtext[editortype]{%
\iffieldundef{editortype}
- {
-% \ifboolexpr{ %这一段去掉
+ {%
+% \ifboolexpr{ %这一段去掉,未定义编者类型情况下不处理
% test {\ifnumgreater{\value{editor}}{1}}
% or
% test {\ifandothers{editor}}
@@ -1454,7 +1771,7 @@ test {\iflistundef{location}} and test {\iflistundef{publisher}}%
% {\bibstring{editors}}
% {\bibstring{editor}}
}
- {\ifbibxstring{\thefield{editortype}}
+ {\ifbibxstring{\thefield{editortype}} %定义编者类型情况下处理,以后根据需要修改
{\ifboolexpr{
test {\ifnumgreater{\value{editor}}{1}}
or
@@ -1462,7 +1779,8 @@ test {\iflistundef{location}} and test {\iflistundef{publisher}}%
}
{\bibstring{\thefield{editortype}s}}
{\bibstring{\thefield{editortype}}}}
- {\thefield{editortype}}}}}
+ {\thefield{editortype}}}%
+ }}
%
% 修改期刊的标题
@@ -1476,11 +1794,11 @@ test {\iflistundef{location}} and test {\iflistundef{publisher}}%
\ifboolexpr{test {\iffieldundef{subtitle}}}%这里增加了对子标题的判断,解决不判断多一个点的问题
{}{\setunit{\subtitlepunct}
\printfield[titlecase]{subtitle}}%
- %
- %\iffieldundef{usera}{}{}%在标题后直接给出文献标识字母
- \iftoggle{bbx:gbtype}{\printfield[gbtypeflag]{usera}}{}%
- }%把编组结束移到这里
- }%
+ %}%把编组结束移到后面去
+ \iftoggle{bbx:gbtype}{%
+ \iffieldundef{usera}{}{%在标题后直接给出文献标识字母
+ \printfield[gbtypeflag]{usera}}}{}
+ }}
}
%
@@ -1524,21 +1842,6 @@ test {\iflistundef{location}} and test {\iflistundef{publisher}}%
\usebibmacro{issue}%
\newunit}
-%
-% 修改了一个institution+location+date用于report等类型
-%
-% 20180425,v1.0k,增加了字体控制命令,hzz
-\renewbibmacro*{institution+location+date}{\bibpubfont%当没有institution时不处理。
- \printlist{location}%
- \iflistundef{institution}
- {\setunit*{\addcomma\space}}
- {\setunit*{\addcolon\space}}%
- \printlist{institution}%
- \setunit*{\addcomma\space}%
- \usebibmacro{date}%
- %\usebibmacro{modifydate}%
- %\newunit
- }
%
% 修改in:用于inbook、incollection、inproceedings等类型
@@ -1546,7 +1849,7 @@ test {\iflistundef{location}} and test {\iflistundef{publisher}}%
%
% 原理方法:使用bibmacro{in:}改变了以前在driver中直接输出//的方式,同时也简化了标点控制。
\renewbibmacro*{in:}{%
- \iftoggle{bbx:gbpunctin}{\printtext{\texttt{//}\addthinspace}}%
+ \iftoggle{bbx:gbpunctin}{\printtext{\texttt{//}\allowbreak}}%\addthinspace
{\setunit{\adddot\addspace}\printtext{\bibstring{in}}}}%\newunit\newblock\intitlepunct
%
@@ -1556,12 +1859,7 @@ test {\iflistundef{location}} and test {\iflistundef{publisher}}%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author/editor+others/translator+others}%
-\ifnameundef{author}{%这一段用于去除作者不存在时多出的标点
-\ifnameundef{editor}{%
-\ifnameundef{translator}{\relax}%
-{\setunit{\labelnamepunct}\newblock}}%
-{\setunit{\labelnamepunct}\newblock}}%
-{\setunit{\labelnamepunct}\newblock}%这个注释去除标题前空格
+\ifnameundef{author}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点
\usebibmacro{maintitle+title}%
\iftoggle{bbx:gbstrict}{}{%
\newunit
@@ -1570,14 +1868,14 @@ test {\iflistundef{location}} and test {\iflistundef{publisher}}%
\usebibmacro{byauthor}%
\newunit\newblock}%
\usebibmacro{byeditor+others}%
-\newunit\newblock%
+\newunit
\printfield{edition}%
-\newunit%
+\newunit\newblock%%
+\iftoggle{bbx:gbstrict}{}{%
\iffieldundef{maintitle}%
{\printfield{volume}%
\printfield{part}}%
{}%
-\iftoggle{bbx:gbstrict}{}{%
\newunit%
\printfield{volumes}%
\newunit\newblock%
@@ -1590,7 +1888,6 @@ test {\iflistundef{location}} and test {\iflistundef{publisher}}%
\usebibmacro{chapter+pages}%
\usebibmacro{doi+eprint+url}%从下面移动到上面来,因为gbt2015的url需直接放在页码后面。
\newunit\newblock%
- %\newunit
\printfield{pagetotal}%
\newunit\newblock%
\iftoggle{bbx:isbn}
@@ -1609,69 +1906,6 @@ test {\iflistundef{location}} and test {\iflistundef{publisher}}%
{}%
\usebibmacro{finentry}}
-%
-% 文集中析出文献类型驱动
-%
-
-
-% 直接利用inbook做incollection
-\csdef{blx@bbx@incollection}{%
- \usebibmacro{bibindex}%
- \usebibmacro{begentry}%
- \usebibmacro{author/translator+others}%
-\ifnameundef{author}{%这一段用于去除作者不存在时多出的标点
-\ifnameundef{editor}{%
-\ifnameundef{translator}{\relax}%
-{\setunit{\labelnamepunct}\newblock}}%
-{\setunit{\labelnamepunct}\newblock}}%
-{\setunit{\labelnamepunct}\newblock}%
-%\setunit{\labelnamepunct}\newblock
-\usebibmacro{title}%
-\usebibmacro{in:}%
-%\printtext{\texttt{//}\addthinspace}%
-\usebibmacro{bybookauthor}%
-\ifnameundef{bookauthor}{}{\newunit}%替换下一句
- %\newunit\newblock
- \usebibmacro{maintitle+booktitle}%
- \newunit\newblock
-% \usebibmacro{byeditor+others}%
-% \newunit\newblock
- \printfield{edition}%
- \newunit
- \iffieldundef{maintitle}
- {\printfield{volume}%
- \printfield{part}}
- {}%
- \newunit
- \printfield{volumes}%
- \newunit\newblock
- \usebibmacro{series+number}%
- \newunit\newblock
- %\printfield{note}%
- %\newunit\newblock
- \usebibmacro{publisher+location+date}%
- %\newunit\newblock
- \usebibmacro{chapter+pages}%
- %\newunit\newblock
- \usebibmacro{doi+eprint+url}%
- \newunit\newblock
- \iftoggle{bbx:isbn}
- {\printfield{isbn}}
- {}%
- \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}}
-
-
%
% 期刊文章,连续出版物中的析出文献的格式
@@ -1680,7 +1914,7 @@ test {\iflistundef{location}} and test {\iflistundef{publisher}}%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author/translator+others}%
- \setunit{\labelnamepunct}\newblock
+\ifnameundef{author}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点
\usebibmacro{title}%
\iftoggle{bbx:gbstrict}{}{%
\newunit%
@@ -1698,6 +1932,7 @@ test {\iflistundef{location}} and test {\iflistundef{publisher}}%
% \usebibmacro{byeditor+others}%
% \newunit
\usebibmacro{note+pages}%
+ \iffieldequalstr{note}{news}{}{\usebibmacro{modifydate}}%带括号的修改或更新日期,当是新闻时不输出
\usebibmacro{doi+eprint+url}%从后面移上来,调整url和页码之间的位置
\newunit\newblock
\iftoggle{bbx:isbn}
@@ -1761,7 +1996,7 @@ test {\iflistundef{location}} and test {\iflistundef{publisher}}%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author}%
- \setunit{\labelnamepunct}\newblock
+\ifnameundef{author}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点
%\usebibmacro{title}%
\usebibmacro{patenttitle}%给出专利专用的标题输出
\iftoggle{bbx:gbstrict}{}{%
@@ -1805,13 +2040,7 @@ test {\iflistundef{location}} and test {\iflistundef{publisher}}%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author/editor+others/translator+others}%
- \ifnameundef{author}{%这一段用于去除作者不存在时多出的标点
-\ifnameundef{editor}{%
-\ifnameundef{translator}{\relax}%
-{\setunit{\labelnamepunct}\newblock}}%
-{\setunit{\labelnamepunct}\newblock}}%
-{\setunit{\labelnamepunct}\newblock}%
- %\setunit{\labelnamepunct}\newblock
+\ifnameundef{author}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点
\usebibmacro{title}%
\iftoggle{bbx:gbstrict}{}{%
\newunit%
@@ -1819,16 +2048,17 @@ test {\iflistundef{location}} and test {\iflistundef{publisher}}%
\newunit\newblock
\usebibmacro{byauthor}%
\newunit\newblock
- \usebibmacro{byeditor+others}}%
+ \usebibmacro{byeditor+others}%
\newunit\newblock
- \printfield{version}%
+ \printfield{note}}%
\newunit
- \printfield{note}%
+ \printfield{version}%
\newunit\newblock
- \printlist{organization}%
+%\printlist{organization}%
+ \printlist{institution}%
\newunit\newblock
%\usebibmacro{date}%
- \usebibmacro{modifydate}%修改为带括号的时间
+ \usebibmacro{modifydate}%修改或更新日期,为带括号的时间
\usebibmacro{url+urldate}%从下面移上来
\newunit\newblock
\iftoggle{bbx:eprint}
@@ -1850,48 +2080,6 @@ test {\iflistundef{location}} and test {\iflistundef{publisher}}%
%
-% 学位论文修改
-%
-\csdef{blx@bbx@thesis}{%源来自standard.BBX
- \usebibmacro{bibindex}%
- \usebibmacro{begentry}%
- \usebibmacro{author}%
- \setunit{\labelnamepunct}\newblock
- \usebibmacro{title}%
- \iftoggle{bbx:gbstrict}{}{%
- \newunit%
- \printlist{language}%
- \newunit\newblock
- \usebibmacro{byauthor}%
- \newunit\newblock
- \printfield{note}%
- \newunit\newblock
- \printfield{type}}%
- \newunit\newblock
- \usebibmacro{institution+location+date}%
- %\newunit\newblock
- \usebibmacro{chapter+pages}%
- \usebibmacro{doi+eprint+url}%
- \newunit
- \printfield{pagetotal}%
- \newunit\newblock
- \iftoggle{bbx:isbn}
- {\printfield{isbn}}
- {}%
- \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}}
-
-%
% 报告类型驱动
% 2016-11-11,增加了译者信息
%
@@ -1899,7 +2087,7 @@ test {\iflistundef{location}} and test {\iflistundef{publisher}}%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author}%
- \setunit{\labelnamepunct}\newblock
+\ifnameundef{author}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点
\usebibmacro{title}%
\iftoggle{bbx:gbstrict}{}{%
\newunit%
@@ -1917,7 +2105,7 @@ test {\iflistundef{location}} and test {\iflistundef{publisher}}%
\newunit
\printfield{note}%
\newunit\newblock
- \usebibmacro{institution+location+date}%
+ \usebibmacro{publisher+location+date}%
%\newunit\newblock
\usebibmacro{chapter+pages}%
\usebibmacro{doi+eprint+url}%
@@ -1944,12 +2132,12 @@ test {\iflistundef{location}} and test {\iflistundef{publisher}}%
% 手册类型驱动
% 2016-11-11,增加了译者信息
%
-% 直接利用report做manual
+%
\csdef{blx@bbx@manual}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author}%
- \setunit{\labelnamepunct}\newblock
+\ifnameundef{author}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点
\usebibmacro{title}%
\iftoggle{bbx:gbstrict}{}{%
\newunit%
@@ -1970,6 +2158,7 @@ test {\iflistundef{location}} and test {\iflistundef{publisher}}%
\usebibmacro{institution+location+date}%
%\newunit\newblock
\usebibmacro{chapter+pages}%
+ \usebibmacro{modifydate}%修改或更新日期,为带括号的时间
\usebibmacro{doi+eprint+url}%
\newunit
\printfield{pagetotal}%
@@ -1998,7 +2187,7 @@ test {\iflistundef{location}} and test {\iflistundef{publisher}}%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author/editor+others/translator+others}%
- \setunit{\printdelim{nametitledelim}}\newblock
+\ifnameundef{author}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点
\usebibmacro{title}%
\iftoggle{bbx:gbstrict}{}{%
\newunit
@@ -2033,152 +2222,32 @@ test {\iflistundef{location}} and test {\iflistundef{publisher}}%
%
-% 会议论文文献类型驱动
-%
-\csdef{blx@bbx@inproceedings}{%源来自standard.BBX
- \usebibmacro{bibindex}%
- \usebibmacro{begentry}%
- \usebibmacro{author/translator+others}%
- \setunit{\labelnamepunct}\newblock
- \usebibmacro{title}%
-% \newunit
-% \printlist{language}%
-% \newunit\newblock
-% \usebibmacro{byauthor}%
-% \newunit\newblock
-\usebibmacro{in:}%
-%\printtext{\texttt{//}\addthinspace}%
- \usebibmacro{bybookauthor}%用类似inbook的方式处理
- \ifnameundef{bookauthor}{}{\newunit}%替换下一句
- %\newunit\newblock
- \usebibmacro{maintitle+booktitle}%
- \newunit\newblock
- \usebibmacro{event+venue+date}%
- \newunit\newblock
-% \usebibmacro{byeditor+others}%
-% \newunit\newblock
- \iffieldundef{maintitle}
- {\printfield{volume}%
- \printfield{part}}
- {}%
- \newunit
- \printfield{volumes}%
- \newunit\newblock
- \iftoggle{bbx:gbstrict}{}{%
- \usebibmacro{series+number}%
- \newunit\newblock
- \printfield{note}%
- \newunit\newblock
- \printlist{organization}%
- \newunit}
- \usebibmacro{publisher+location+date}%
- %\newunit\newblock
- \usebibmacro{chapter+pages}%
- \newunit\newblock
- \iftoggle{bbx:isbn}
- {\printfield{isbn}}
- {}%
- \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}}
-
-%
-% 会议论文集文献类型驱动
-%
-\csdef{blx@bbx@proceedings}{%源来自standard.BBX
- \usebibmacro{bibindex}%
- \usebibmacro{begentry}%
- %\usebibmacro{editor+others}%
- \usebibmacro{author/translator+others}%
- \setunit{\labelnamepunct}\newblock
- \usebibmacro{maintitle+title}%
- \iftoggle{bbx:gbstrict}{}{%
- \newunit%
- \printlist{language}}%
- \newunit\newblock
- \usebibmacro{event+venue+date}%
- \newunit\newblock
-% \usebibmacro{byeditor+others}%
-% \newunit\newblock
- \iffieldundef{maintitle}
- {\printfield{volume}%
- \printfield{part}}
- {}%
- \newunit
- \printfield{volumes}%
- \newunit\newblock
- \iftoggle{bbx:gbstrict}{}{%
- \usebibmacro{series+number}%
- \newunit\newblock
- \printfield{note}%
- \newunit\newblock
- \printlist{organization}%
- \newunit}
- \usebibmacro{publisher+location+date}%
- %\newunit\newblock
- \usebibmacro{chapter+pages}%
- \usebibmacro{doi+eprint+url}%从下面移上来
- \newunit
- \printfield{pagetotal}%
- \newunit\newblock
- \iftoggle{bbx:isbn}
- {\printfield{isbn}}
- {}%
- \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}}
-
-
-%
% 专著中的析出文献的格式修改
%
\csdef{blx@bbx@inbook}{%源来自standard.bbx
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author/translator+others}%
-\ifnameundef{author}{%这一段用于去除作者不存在时多出的标点
-\ifnameundef{editor}{%
-\ifnameundef{translator}{\relax}%
-{\setunit{\labelnamepunct}\newblock}}%
-{\setunit{\labelnamepunct}\newblock}}%
-{\setunit{\labelnamepunct}\newblock}%
-%\setunit{\labelnamepunct}\newblock
+\ifnameundef{author}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点
\usebibmacro{title}%
\usebibmacro{in:}%
-%\printtext{\texttt{//}\addthinspace}%%\texttt{//}\addnbthinspace
-\usebibmacro{bybookauthor}%
-\ifnameundef{bookauthor}{}{\newunit}%替换下一句\newblock
-%\newunit\newblock
-\usebibmacro{maintitle+booktitle}%}%
- \newunit\newblock
+%\printtext{\texttt{//}\addthinspace}%
+ \usebibmacro{bybookauthor}%
+ \ifnameundef{bookauthor}{}{\newunit}%替换下一句
+ %\newunit\newblock
+ \usebibmacro{maintitle+booktitle}%
+ \setunit{\addcolon}\printfield{volume}\printfield{number}%增加卷和册信息
+ \newunit\newblock%
% \usebibmacro{byeditor+others}%
% \newunit\newblock
\printfield{edition}%
\newunit
- \iffieldundef{maintitle}
- {\printfield{volume}%
- \printfield{part}}
- {}%
\iftoggle{bbx:gbstrict}{}{%
- \newunit
+% \iffieldundef{maintitle}
+% {\printfield{volume}%
+% \printfield{part}}
+% {}%
+% \newunit
\printfield{volumes}%
\newunit\newblock
\usebibmacro{series+number}}%
@@ -2208,65 +2277,7 @@ test {\iflistundef{location}} and test {\iflistundef{publisher}}%
\usebibmacro{finentry}}
-%
-%
-% 文集类型驱动
-%
-% 直接利用book做collection
-\csdef{blx@bbx@collection}{%
- \usebibmacro{bibindex}%
- \usebibmacro{begentry}%
-\usebibmacro{author/editor+others/translator+others}
-\ifnameundef{author}{%这一段用于去除作者不存在时多出的标点
- \ifnameundef{editor}{%
- \ifnameundef{translator}{\relax}%
- {\setunit{\labelnamepunct}\newblock}}%
- {\setunit{\labelnamepunct}\newblock}}%
- {\setunit{\labelnamepunct}\newblock}%
- \usebibmacro{maintitle+title}
- \iftoggle{bbx:gbstrict}{}{%
- \newunit%
- \printlist{language}%
- \newunit\newblock
- \usebibmacro{byauthor}}%
- \newunit\newblock
- \usebibmacro{byeditor+others}%
- \newunit\newblock
- \printfield{edition}%
- \newunit
- \iffieldundef{maintitle}
- {\printfield{volume}%
- \printfield{part}}
- {}%
- \newunit
- \printfield{volumes}%
- \newunit\newblock
- \usebibmacro{series+number}%
- \newunit\newblock
- %\printfield{note}%
- %\newunit\newblock
- \usebibmacro{publisher+location+date}%
- %\newunit\newblock %这里标点去掉
- \usebibmacro{chapter+pages}%
- \usebibmacro{doi+eprint+url}%从下面移动到上面来,因为gbt2015的url需直接放在页码后面。
- \newunit\newblock
- \printfield{pagetotal}%
- \newunit\newblock
- \iftoggle{bbx:isbn}
- {\printfield{isbn}}
- {}%
- \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}}
+
}{}
}