summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/biblatex-gb7714-2015
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-10-22 21:45:55 +0000
committerKarl Berry <karl@freefriends.org>2016-10-22 21:45:55 +0000
commit927ae43703393d70deb572550c8cbc80372df2d6 (patch)
tree8075230c9d0fdc72cd50fc062816d6df3d5d7208 /Master/texmf-dist/tex/latex/biblatex-gb7714-2015
parent95cd6de0e94471021043c7ca56406ea14e866aa4 (diff)
biblatex-gb7714-2015 (22oct16)
git-svn-id: svn://tug.org/texlive/trunk@42325 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-gb7714-2015')
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015.bbx1610
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015.cbx48
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ay.bbx1551
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ay.cbx41
4 files changed, 3250 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015.bbx b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015.bbx
new file mode 100644
index 00000000000..b9183b8d968
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015.bbx
@@ -0,0 +1,1610 @@
+%bbx for gbt 7714-2015 by huzhenzhen 20160530 email:hzzmail@163.com
+\ProvidesFile{gb7714-2015.bbx}[2016/05/20 v1.0 biblatex bibliography style]
+
+% Load the standard style to avoid copy-pasting unnecessary material
+\RequireBibliographyStyle{numeric-comp} %加载标准样式
+\RequireBibliographyStyle{standard}
+
+\providetoggle{iftexlivesix}
+%\def\versionstr{3.4}
+%\def\versionstra{3.6}
+%\ifx\abx@version\versionstr
+%\toggletrue{iftexlivesix}
+%\else
+%\ifx\abx@version\versionstra
+%\toggletrue{iftexlivesix}
+%\else
+%\togglefalse{iftexlivesix}
+%\fi
+%\fi
+%改变版本判断机制,根据biblatex更新历史可知,版本3.3开始使用新的姓名机制
+%所以当版本大于3.2开始,就用设置\toggletrue{iftexlivesix}
+\def\numparserta#1.#2\relax{#1}%注意relax的重要性
+\def\numparsertb#1.#2\relax{#2}
+\def\numinteger{\expandafter\numparserta\abx@version\relax}
+\def\numdigital{\expandafter\numparsertb\abx@version\relax}
+\ifnumcomp{\numdigital}{>}{2}{\toggletrue{iftexlivesix}}{\togglefalse{iftexlivesix}}
+
+\iftoggle{iftexlivesix}{
+%设置一些全局选项
+% Alter settings that carry through from biblatex
+\ExecuteBibliographyOptions{
+ sorting=none,
+ useprefix=true, %名字的信息包括前缀
+ %firstinits=true, %名字有缩写,参考3.1.2.3 Internal
+ giveninits=true,
+ date = year, %日期仅写到年
+ maxnames = 3 , %设置名字最大数量
+ minnames = 3 %设置缩减后的名字最小数量
+ %uniquename = init
+}
+
+\newbibmacro*{name:given-family}[4]{%利用family-given定义given-family
+ \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{\MakeUppercase{#1}}}\isdot
+ \ifdefvoid{#2}{}{\revsdnamepunct\bibnamedelimd\mkbibnamegiven{\MakeCapital{#2}}\isdot}
+ \ifdefvoid{#4}{}{\bibnamedelimd\mkbibnamesuffix{#4}\isdot}}
+ {\usebibmacro{name:delim}{#1}%
+ \usebibmacro{name:hook}{#1}%
+ \ifdefvoid{#2}{\mkbibnamefamily{\MakeCapital{#1}}}{\mkbibnamefamily{\MakeUppercase{#1}}}\isdot
+ %
+ \ifboolexpe{%
+ test {\ifdefvoid{#2}}
+ and
+ test {\ifdefvoid{#3}}}
+ {}
+ {\revsdnamepunct}%
+ \ifdefvoid{#2}{}{\bibnamedelimd\mkbibnamegiven{\MakeCapital{#2}}\isdot}%
+ \ifdefvoid{#3}{}{\bibnamedelimd\mkbibnameprefix{#3}\isdot}
+ \ifdefvoid{#4}{}{\bibnamedelimd\mkbibnamesuffix{#4}\isdot}}}
+
+}
+{
+%设置一些全局选项
+% Alter settings that carry through from biblatex
+\ExecuteBibliographyOptions{
+ sorting=none,
+ useprefix=true, %名字的信息包括前缀
+ firstinits=true, %名字有缩写,参考3.1.2.3 Internal
+ %giveninits=true,
+ date = year, %日期仅写到年
+ maxnames = 3 , %设置名字最大数量
+ minnames = 3 %设置缩减后的名字最小数量
+ %uniquename = init
+}
+\DeclareNameFormat{first-last}{%修改作者的姓和名的顺序,源来自于biblatex.def文件
+ \iffirstinits%
+ {\usebibmacro{name:last-first}{#1}{#4}{#5}{#7}}
+ {\usebibmacro{name:last-first}{#1}{#3}{#5}{#7}}%
+ \usebibmacro{name:andothers}}
+
+\newbibmacro*{name:last-first}[4]{%
+ \ifuseprefix
+ {\usebibmacro{name:delim}{#3#1}%
+ \usebibmacro{name:hook}{#3#1}%
+ \ifblank{#3}{}{%
+ \ifcapital
+ {\mkbibnameprefix{\MakeCapital{#3}}\isdot}
+ {\mkbibnameprefix{#3}\isdot}%
+ \ifpunctmark{'}{}{\bibnamedelimc}}%
+ %\mkbibnamelast{#1}\isdot
+ \ifblank{#2}{\MakeCapital#1}{\mkbibnamelast{\MakeUppercase{#1}}}\isdot%\MakeUppercase %\mkbibnamelast{\MakeUppercase{#1}} %\MakeSentenceCase
+ %注意上一句\MakeCapital后面如果再跟一个{}包含#1,则没有效果,可能是包在里面少了一层展开
+ %因为机构名通常包括在{}内,所以要多展开一次才行,所以这里去掉#1外面的{}
+ %\mkbibnamelast{\MakeUppercase{#1}}\isdot
+ %\ifblank{#4}{}{\bibnamedelimd\mkbibnameaffix{#4}\isdot}%这句放到后面
+ \ifblank{#2}{}{\revsdnamepunct\bibnamedelimd\mkbibnamefirst{\MakeUppercase{#2}}\isdot}%
+ \ifblank{#4}{}{\addcomma\addspace\bibnamedelimd\mkbibnameaffix{#4}\isdot}}
+ {\usebibmacro{name:delim}{#1}%
+ \usebibmacro{name:hook}{#1}%
+ %\mkbibnamelast{#1}\isdot %3.9.1 Generic Commands and Hooks,对姓重新处理,如下句: %\mkbibnamelast{\MakeUppercase{#1}}
+ \ifblank{#2}{\MakeCapital#1}{\mkbibnamelast{\MakeUppercase{#1}}}\isdot %大写,参考4.6.4 Miscellaneous Commands,\MakeUppercase %\MakeSentenceCase
+ %\mkbibnamelast{\MakeUppercase{#1}}\isdot
+ %\ifblank{#4}{}{\bibnamedelimd\mkbibnameaffix{#4}\isdot}%这句放到后面
+ \ifblank{#2#3}{}{\revsdnamepunct}%
+ \ifblank{#2}{}{\bibnamedelimd\mkbibnamefirst{\MakeUppercase{#2}}\isdot}%
+ \ifblank{#3}{}{\bibnamedelimd\mkbibnameprefix{#3}\isdot}%
+ \addcomma\addspace%
+ \ifblank{#4}{}{\addcomma\addspace\bibnamedelimd\mkbibnameaffix{#4}\isdot}%
+ }}
+}
+
+%定义判断中文字符的函数,用于判断作者等信息是否由中文字符构成
+\providetoggle{ifCJKforgbt}
+\def\testCJKfirstchar#1#2&{%
+\ifnumgreater{`#1}{"2E7F}{\toggletrue{ifCJKforgbt}}{\togglefalse{ifCJKforgbt}}}
+\def\testCJKfirst#1{%
+\edef\tempa{#1}
+\expandafter\testCJKfirstchar\tempa&}
+
+%判断是否存在作者的判断标志
+%\providetoggle{ifexistauthors}
+%\def\testexistauthors{\ifboolexpr{%这里做一个判断,如果没有任何作者,那么就为空,用于处理序号制,没有作者的情况
+%test{\ifnameundef{author}}%
+%and%
+%test{\ifnameundef{editor}}%
+%and%
+%test{\ifnameundef{translator}}%
+%}{\toggletrue{ifCJKforgbt}}{\togglefalse{ifCJKforgbt}}}
+
+%判断是否是标准
+\providetoggle{ifnoteeqstandard}
+\def\testifnoteeqstd{%
+\iffieldundef{note}{\togglefalse{ifnoteeqstandard}}%判断一下,是否是报纸和标准
+ {\def\comparetmp{standard}\edef\comparetmpb{\thefield{note}}%
+ \ifx\comparetmp\comparetmpb%
+ \toggletrue{ifnoteeqstandard}%
+ \else%
+ \togglefalse{ifnoteeqstandard}%
+ \fi}}
+
+%修改序号标签格式为左对齐,注意各参考文献内容还是对齐的,
+%这样就会使得序号标签与参考文献内容的间隔增大,这个问题是没有办法解决的
+%因为采用list做具有一定宽度的序号标签,\labelwidth只能设置一个,且是最宽的标签的宽度
+%但总的来说参考文献内容对齐是合理和漂亮的,
+%而标签则只能对齐一个方向,要么左对齐要么右对齐,看个人选择了。
+%\DeclareFieldFormat{shorthandwidth}{\mkbibbrackets{#1}} %源来自numeric.BBX
+%\DeclareFieldFormat{labelnumberwidth}{\ttfamily\mkbibbrackets{#1}\hfill}
+\DeclareFieldFormat{labelnumberwidth}{\mkbibbrackets{#1}\hfill}
+
+%默认的参考文献列表格式,放这里作为参考
+%\defbibenvironment{bibliography}
+% {\list
+% {\printtext[labelnumberwidth]{%
+% \printfield{prefixnumber}%
+% \printfield{labelnumber}}}
+% {\setlength{\labelwidth}{\labelnumberwidth}%
+% \setlength{\leftmargin}{\labelwidth}%
+% \setlength{\labelsep}{\biblabelsep}%
+% \addtolength{\leftmargin}{\labelsep}%
+% \setlength{\itemsep}{\bibitemsep}%
+% \setlength{\parsep}{\bibparsep}}%
+% \renewcommand*{\makelabel}[1]{\hss##1}}
+% {\endlist}
+% {\item}
+
+%将名字简写后的点去掉
+%\renewrobustcmd*{\bibinitperiod}{\adddot} %来源biblatex2.STY
+\renewrobustcmd*{\bibinitperiod}{}
+%\newcommand*{\revsdnamepunct}{\addcomma} %来源biblatex.def
+\renewcommand*{\revsdnamepunct}{}
+%\newcommand*{\subtitlepunct}{\newunitpunct} %修改标题和其它标题信息间的标点
+\renewcommand*{\subtitlepunct}{\addcolon\space} %来源biblatex.def
+
+%新建一个当地化字符串,用来记录“等”字符
+\NewBibliographyString{andotherscn}
+\NewBibliographyString{noaddress}
+\NewBibliographyString{nopublisher}
+
+%直接利用当地化格式english进行修改一些中文的格式,
+%具体可以修改哪些需要的参考english.lbx文件
+%当然也可以增加比如上面定义的andotherscn
+\DefineBibliographyStrings{english}{
+bytranslator= {\addcomma\ 译\adddot}, %将trans. by 改成 译
+and = {\addcomma},%将第2和3人名见的and符号改成 逗号,用\finalnamedelim命令也可以定义,参见3.9.1节
+%andothers = {et al.}, %将超过3个人名的省略,et al.改成为 等
+andotherscn = {等}, %将超过3个人名的省略,et al.改成为 等
+noaddress = {[S.l.]},
+nopublisher = {[s.n.]}
+}
+
+%关于双语言或多语言的参考文献,可以参考3.11.5 Entry Sets,4.11.1 Entry Sets
+%这里调整一下两种语言参考文献的间隔
+%\renewcommand*{\entrysetpunct}{\addsemicolon\space}%源来自biblatex.def
+\renewcommand*{\entrysetpunct}{\adddot\par\nobreak}
+
+
+%用于解析连续出版物,2个卷期的情况
+\def\multivolumeparsetoparts#1/#2{\def\multivolumefirst{#1}\def\multivolumesecond{#2}}
+%\def\multinumberparsetoparts#1/#2{\def\multinumberfirst{#1}\def\multinumbersecond{#2}}
+
+%这里利用李志奇的范围数据解析函数,修改后用来处理卷volume的范围。
+%他的这个函数是通用的,只能在使用数据前使用,如果多次使用前一次得到的数据就会被冲掉
+%这里的范围起止判断符号还是用-,而不是与date相同的/,因为有合期期刊的问题,需要用到/符号
+\def\gbt@parse@range#1{%
+ \edef\gbt@tmpa{#1}%
+ \expandafter\gbt@parse@rangei\gbt@tmpa-\@empty}
+\def\gbt@parse@rangei#1-#2\@empty{%
+ \global\def\gbt@range@first{#1}%
+ \def\gbt@tmpa{#2}%
+ \ifx\gbt@tmpa\@empty%
+ \global\def\gbt@range@second{}%
+ \else%
+ \gbt@parse@rangeii#2\@empty%
+ \fi}
+\def\gbt@parse@rangeii#1-#2\@empty{%
+ \def\gbt@tmpa{#2}%
+ \ifx\gbt@tmpa\@empty%
+ \global\def\gbt@range@second{#1}%
+ \else%
+ \gbt@parse@rangeii#2\@empty%
+ \fi}
+
+%这里写的number的解析函数,与上面的是类似的。
+\def\multinumberparser#1{%
+ \edef\gbnumbertmp{#1}%
+ \expandafter\multinumberparsetoparts\gbnumbertmp-\@empty}
+\def\multinumberparsetoparts#1-#2\@empty{%
+ \def\multinumberfirst{#1}%
+ \def\gbnumbertmp{#2}%
+ \ifx\gbnumbertmp\@empty%
+ \def\multinumbersecond{}%
+ \else%
+ \multinumberparsetopartsb#2\@empty%
+ \fi}
+\def\multinumberparsetopartsb#1-#2\@empty{%
+ \def\gbnumbertmp{#2}%
+ \ifx\gbnumbertmp\@empty%
+ \def\multinumbersecond{#1}%
+ \else%
+ \multinumberparsetopartsb#2\@empty%
+ \fi}
+
+
+%修改译者位置格式,bytranslator+others原格式来自biblatex.def文件
+\newbibmacro*{bytranslator+others}{%
+ \ifnameundef{translator}
+ {}
+ {%\usebibmacro{bytranslator+othersstrg}
+ %\setunit{\addspace}%
+ \printnames[bytranslator]{translator}%
+ \clearname{translator}%
+ \usebibmacro{bytranslator+othersstrg}%“译”的位置换到下面来,即放到译者后面。
+ \setunit{\addspace}%
+ \newunit}%
+ \usebibmacro{withothers}}
+%下面一段没有作用,但从中可以看到当地化字符串格式的引用前的代码处理
+%比如生成cotranslator等用于调用cotranslator所代表的当地化字符串
+\newbibmacro*{translator+othersstrg}{%
+ \ifboolexpr{
+ test {\ifnumgreater{\value{translator}}{1}}
+ or
+ test {\ifandothers{translator}}
+ }
+ {\def\abx@tempa{translators}}
+ {\def\abx@tempa{translator}}%给\abx@tempa赋值用于表示输出字符串的关键词
+ \ifnamesequal{translator}{commentator}
+ {\appto\abx@tempa{co}%
+ \clearname{commentator}}
+ {\ifnamesequal{translator}{annotator}
+ {\appto\abx@tempa{an}%
+ \clearname{annotator}}
+ {}}%
+ \ifnamesequal{translator}{introduction}
+ {\appto\abx@tempa{in}%
+ \clearname{introduction}}
+ {\ifnamesequal{translator}{foreword}
+ {\appto\abx@tempa{fo}%
+ \clearname{foreword}}
+ {\ifnamesequal{translator}{afterword}
+ {\appto\abx@tempa{af}%
+ \clearname{afterword}}
+ {}}}%
+ \bibstring{\abx@tempa}}
+
+%作者修改判断,是否中文,若中文输入等字符,而不是etcl
+%这里利用指定的域language来判断是否是中文,但其实是有缺陷的。
+%比如作者是英文,译者是中文,那么定位成中文可能会出错,
+%所以采用下面的另一种判断方法
+%\def\languageflag{{chinese}}
+%\newbibmacro*{name:andothers}{%
+% \ifboolexpr{
+% test {\ifnumequal{\value{listcount}}{\value{liststop}}}
+% and
+% test \ifmorenames
+% }
+% {\ifnumgreater{\value{liststop}}{1}
+% {\finalandcomma}
+% {}%
+% \andothersdelim
+% %\bibstring{andothers} %这里做出修改
+% \ifboolexpr{ test {\iflistequals{language}{\languageflag}}}
+% {\bibstring{andotherscn}}{\bibstring{andothers}}
+% }
+% {}}
+
+%作者修改判断,是否中文,若中文输入等字符,而不是etcl
+%首先把作者和译者信息准确的记录到userf,usere中,用于判断是否是cjk字符。
+%注意\DeclareSourcemap命令只能出现一次
+\DeclareSourcemap{
+\maps[datatype=bibtex]{
+\map{ %增加文献标识符如[M],[J]等,下面首先生成这一信息
+%使用下面biber动态修改bbl文件的方法是正确的
+ %\perdatasource{examples.bib}
+ \pertype{article}
+ \pertype{periodical}
+ \step[fieldset=usera, fieldvalue={J}]
+ }
+ \map{
+ \pertype{book}
+ \pertype{inbook}
+ \step[fieldset=usera, fieldvalue={M}]
+ }
+ \map{
+ \pertype{patent}
+ \step[fieldset=usera, fieldvalue={P}]
+ }
+ \map{
+ \pertype{inproceedings}
+ \pertype{conference}
+ \step[fieldset=usera, fieldvalue={C}]
+ \step[fieldsource=institution] %有时会把version和edition混淆,这里处理后就没有这个问题,可以直接用version
+ \step[fieldset=publisher, origfieldval]
+ \step[fieldsource=editor] %
+ \step[fieldset=bookauthor, origfieldval]
+ }
+ \map{
+ \pertype{proceedings}
+ \step[fieldset=usera, fieldvalue={C}]
+ \step[fieldsource=institution] %有时会把version和edition混淆,这里处理后就没有这个问题,可以直接用version
+ \step[fieldset=publisher, origfieldval]
+ \step[fieldsource=editor] %有的时候可能只填写了编者,没有author,把它复制一下
+ \step[fieldset=author, origfieldval]
+ }
+ \map{
+ \pertype{report}
+ \step[fieldset=usera, fieldvalue={R}]
+ }
+ \map{
+ \pertype{thesis}
+ \step[fieldset=usera, fieldvalue={D}]
+ }
+ \map{
+ \pertype{online}
+ \step[fieldset=usera, fieldvalue={EB}]
+ }
+ \map{
+ \pertype{manual}
+ \step[fieldset=usera, fieldvalue={A}]
+ \step[fieldsource=edition] %有时会把version和edition混淆,这里处理后就没有这个问题,可以直接用version
+ \step[fieldset=version, origfieldval]
+ \step[fieldsource=organization]%因为用的report的驱动,所以需要institution域,也把organization转成它,这样增大兼容性
+ \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{
+ \step[fieldsource=author]
+ \step[fieldset=userf, origfieldval]
+ \step[fieldsource=translator]
+ \step[fieldset=usere, origfieldval]
+ \step[fieldsource=year]
+ \step[fieldset=date, origfieldval]
+ }
+}
+}
+
+%判断作者或译者是否中文,若中文用字符等,否则用etcl。
+\newbibmacro*{name:andothers}{%
+ \ifboolexpr{
+ test {\ifnumequal{\value{listcount}}{\value{liststop}}}
+ and
+ test \ifmorenames
+ }
+ {%这里做一个判断是在处理author还是translator用于两者是不同语言的情况
+ \ifcurrentname{translator}{\testCJKfirst{\thefield{usere}}}{\testCJKfirst{\thefield{userf}}}
+ %这句判断如果放到\andothersdelim后面会在等或etc.前增加一个空格,所以放前面
+ \ifnumgreater{\value{liststop}}{1}
+ {\finalandcomma}
+ {}%
+\andothersdelim\iftoggle{ifCJKforgbt}{\bibstring{andotherscn}}{\bibstring{andothers}}
+%\andothersdelim\bibstring{andotherscn}
+}
+{}}
+
+%新增文献类型标识符的格式
+%\DeclareFieldFormat{gbtypeflag}{\nobreak\mkbibbrackets{\nobreak#1}\nobreak}
+\DeclareFieldFormat{gbtypeflag}{%
+\iffieldundef{url}%当存在url时,增加一个OL标识符
+{\nobreak\printtext{[}\nobreak#1\printtext{]}\nobreak}%
+{\nobreak\printtext{[}\nobreak#1\printtext{\texttt{/}OL]}\nobreak}%
+}
+\DeclareFieldFormat{gbtypeflagn}{%用于报纸newspaper
+\iffieldundef{url}%当存在url时,增加一个OL标识符
+{\nobreak\printtext{[}\nobreak N\printtext{]}\nobreak}%
+{\nobreak\printtext{[}\nobreak N\printtext{\texttt{/}OL]}\nobreak}%
+}
+\DeclareFieldFormat{gbtypeflags}{%用于报纸newspaper
+\iffieldundef{url}%当存在url时,增加一个OL标识符
+{\nobreak\printtext{[}\nobreak S\printtext{]}\nobreak}%
+{\nobreak\printtext{[}\nobreak S\printtext{\texttt{/}OL]}\nobreak}%
+}
+
+%重设title的输出格式,不加emph,原格式来自biblatex.def文件
+%\DeclareFieldFormat{journaltitle}{\mkbibemph{#1}}
+%\DeclareFieldFormat{issuetitle}{\mkbibemph{#1}}
+%\DeclareFieldFormat{maintitle}{\mkbibemph{#1}}
+%\DeclareFieldFormat{title}{\mkbibemph{#1}}
+%\DeclareFieldFormat{booktitle}{\mkbibemph{#1}}
+\DeclareFieldFormat{title}{#1}
+\DeclareFieldFormat{journaltitle}{#1}
+\DeclareFieldFormat{issuetitle}{#1}
+\DeclareFieldFormat{maintitle}{#1}
+\DeclareFieldFormat{booktitle}{#1}
+%\DeclareFieldFormat[article,inbook,incollection,inproceedings,patent,thesis,unpublished]
+% {title}{\mkbibquote{#1\isdot}}
+\DeclareFieldFormat%将期刊等文献的标题中原来带的引号去掉
+ [article,inbook,incollection,inproceedings,patent,thesis,unpublished]
+ {title}{#1}
+
+%重设标题格式,将其修改为首字母大写
+%\DeclareFieldFormat{titlecase}{#1}
+\DeclareFieldFormat{titlecase}{\MakeCapital#1}
+
+%重设title的输出,将文献类型标识符输出出去,原输出来自biblatex.def文件
+\newbibmacro*{title}{%
+ \ifboolexpr{%
+ test{\iffieldundef{title}}%
+ and%
+ test{\iffieldundef{subtitle}}%
+ }%
+ {}%
+ {\printtext[title]{%
+ \printfield[titlecase]{title}%
+ \ifboolexpr{test {\iffieldundef{subtitle}}}%这里增加了对子标题的判断,解决不判断多一个点的问题
+ {}{\setunit{\subtitlepunct}%
+ \printfield[titlecase]{subtitle}}}%
+ \iffieldundef{titleaddon}{}%判断一下titleaddon,否则直接加可能多一个空格
+ {\setunit{\subtitlepunct}\printfield{titleaddon}}%
+ \iffieldundef{note}{\printfield[gbtypeflag]{usera}}%在标题后直接给出文献标识字母,判断一下,是否是报纸和标准
+ {\def\comparetmp{news}\def\comparetmpa{standard}\edef\comparetmpb{\thefield{note}}%
+ \ifx\comparetmp\comparetmpb%判断是否为报纸
+ \printfield[gbtypeflagn]{usera}%
+ \else%
+ \ifx\comparetmpa\comparetmpb%判断是否为标准
+ \printfield[gbtypeflags]{usera}%
+ \else%
+ \printfield[gbtypeflag]{usera}%
+ \fi
+ \fi%
+ }%
+ \iffieldundef{booktitle}{\newunit}{}%当title是析出时,不要标点
+ %\newunit
+}%
+}
+
+%url相关输出,源来自biblatex.def
+%\DeclareFieldFormat{url}{\mkbibacro{URL}\addcolon\space\url{#1}}
+\DeclareFieldFormat{url}{\url{#1}} %url域修改如本行
+%\DeclareFieldFormat{urldate}{\mkbibparens{\bibstring{urlseen}\space#1}}
+
+\newbibmacro*{url+urldate}{%
+ %\usebibmacro{url}%%更换url的位置,放到下面
+ \iffieldundef{urlyear}%
+ {}{%\setunit*{\addspace}%
+ \usebibmacro{urldate}}%
+ \setunit{\addperiod\addspace}%
+ \usebibmacro{url}}
+
+\newbibmacro*{url}{\printfield{url}}
+%\newbibmacro*{urldate}{\printurldate} %引用时间修改如下一行
+\newbibmacro*{urldate}{\addspace\printtext{[}\printfield{urlyear}\bibrangedash\printfield{urlmonth}\bibrangedash\printfield{urlday}\printtext{]}}
+\newbibmacro*{newsdate}{%%新增加一个新闻日期
+\iffieldundef{year}{}{\printfield{year}%
+\iffieldundef{month}{}{\bibrangedash\printtext{\thefield{month}}%
+\iffieldundef{day}{}{\bibrangedash\printfield{day}}}}%
+}
+\newbibmacro*{modifydate}{%新增加一个带括号的日期
+\printtext{%
+\iffieldundef{year}{}{\mkbibparens{\printtext{\printfield{year}}%
+\iffieldundef{month}{}{\bibrangedash\thefield{month}}%
+\iffieldundef{day}{}{\bibrangedash\printfield{day}}}}%
+}}%
+
+
+%页码引用格式的修改
+%\newcommand*{\bibpagespunct}{\addcomma\space}
+\renewcommand*{\bibpagespunct}{\addcolon\space}%修改为用冒号
+%\DeclareFieldFormat{pages}{\mkpageprefix[bookpagination]{#1}}
+\DeclareFieldFormat{pages}{#1}%去掉前面引导页码的pp.等字符
+
+%调整doi+eprint+url格式,源来自standard.bbx
+%因为页码后面直接跟引用日期,没有标点所以去掉其中的标点。
+\newbibmacro*{doi+eprint+url}{%
+% \iftoggle{bbx:doi}%把doi的位置放到url后面
+% {\printfield{doi}}
+% {}%
+ %\newunit\newblock
+ \iftoggle{bbx:eprint}
+ {\usebibmacro{eprint}}
+ {}%
+ %\newunit\newblock
+ \iftoggle{bbx:url}
+ {\usebibmacro{url+urldate}}
+ {}
+ \newunit\newblock
+ \iftoggle{bbx:doi}
+ {\printfield{doi}}
+ {}}
+
+\newbibmacro*{chapter+pages}{%
+ \printfield{chapter}%
+ \iffieldundef{pages}{}{%这里增加一个判断,当没有页码时就不输出
+ \setunit{\bibpagespunct}%
+ \printfield{pages}}%
+ %\newunit %这里的标点去掉
+ }
+
+%作者名字的处理,参考文档4.2.3节,3.12.4 Name Parts and Name Spacing
+%\DeclareNameFormat{author}{%
+%\ifthenelse{\value{listcount}=1}
+%{#1%
+%\ifblank{#3}{}{\addcomma\space #3}}
+%{\ifblank{#3}{}{#3\space}%
+%#1}%
+%\ifthenelse{\value{listcount}<\value{liststop}}
+%{\addcomma\space}
+%{}}
+
+%这里可以参考4.4.2节了解姓名的输入变量
+%\DeclareNameFormat{first-last}{%修改作者的姓和名的顺序,源来自于biblatex.def文件
+% \iffirstinits
+% {\iftoggle{iftexlive2016}{\usebibmacro{name:last-first}{\namepartfamily}{\namepartgiveni}{\namepartprefix}{\namepartsuffix}}{\usebibmacro{name:last-first}{#1}{#4}{#5}{#7}}}
+% {\iftoggle{iftexlive2016}{\usebibmacro{name:last-first}{\namepartfamily}{\namepartgiven}{\namepartprefix}{\namepartsuffix}}{\usebibmacro{name:last-first}{#1}{#3}{#5}{#7}}}%
+% \usebibmacro{name:andothers}}
+%for biblatex version 3.0
+%#1 The last names.
+%#2 The last names, given as initials.
+%#3 The first names.
+%#4 The first names, given as initials.
+%#5 The name prefixes,
+%#6 The name prefixes, given as initials.
+%#7 The name affixes,
+%#8 The name affixes, given as initials.
+%for biblatex version 3.4
+%\namepartfamily
+%\namepartfamilyi
+%\namepartgiven
+%\namepartgiveni
+%\namepartprefix
+%\namepartprefixi
+%\namepartsuffix
+%\namepartsuffixi
+
+%这里很奇怪还不能放在一起做一次判断,既然不行那么就用两个判断吧
+%又可以了,很奇怪?
+%这里可以参考4.4.2节了解姓名的输入变量
+%\DeclareNameFormat{first-last}{%修改作者的姓和名的顺序,源来自于biblatex.def文件
+% %\iffirstinits%
+% \ifgiveninits%
+% %{\usebibmacro{name:last-first}{#1}{#4}{#5}{#7}}
+% %{\usebibmacro{name:last-first}{#1}{#3}{#5}{#7}}%
+% {\usebibmacro{name:last-first}{\namepartfamily}{\namepartgiveni}{\namepartprefix}{\namepartsuffix}}
+% {\usebibmacro{name:last-first}{\namepartfamily}{\namepartgiven}{\namepartprefix}{\namepartsuffix}}%
+% \usebibmacro{name:andothers}}
+
+
+
+
+%\newbibmacro*{name:last-first}[4]{%
+% \ifuseprefix
+% {\usebibmacro{name:delim}{#3#1}%
+% \usebibmacro{name:hook}{#3#1}%
+% \ifblank{#3}{}{%
+% \ifcapital
+% {\mkbibnameprefix{\MakeCapital{#3}}\isdot}
+% {\mkbibnameprefix{#3}\isdot}%
+% \ifpunctmark{'}{}{\bibnamedelimc}}%
+% %\mkbibnamelast{#1}\isdot
+% \ifblank{#2}{\MakeCapital#1}{\mkbibnamelast{\MakeUppercase{#1}}}\isdot%\MakeUppercase %\mkbibnamelast{\MakeUppercase{#1}} %\MakeSentenceCase
+% %注意上一句\MakeCapital后面如果再跟一个{}包含#1,则没有效果,可能是包在里面少了一层展开
+% %因为机构名通常包括在{}内,所以要多展开一次才行,所以这里去掉#1外面的{}
+% %\mkbibnamelast{\MakeUppercase{#1}}\isdot
+% %\ifblank{#4}{}{\bibnamedelimd\mkbibnameaffix{#4}\isdot}%这句放到后面
+% \ifblank{#2}{}{\revsdnamepunct\bibnamedelimd\mkbibnamefirst{\MakeUppercase{#2}}\isdot}%
+% \ifblank{#4}{}{\addcomma\addspace\bibnamedelimd\mkbibnameaffix{#4}\isdot}}
+% {\usebibmacro{name:delim}{#1}%
+% \usebibmacro{name:hook}{#1}%
+% %\mkbibnamelast{#1}\isdot %3.9.1 Generic Commands and Hooks,对姓重新处理,如下句: %\mkbibnamelast{\MakeUppercase{#1}}
+% \ifblank{#2}{\MakeCapital#1}{\mkbibnamelast{\MakeUppercase{#1}}}\isdot %大写,参考4.6.4 Miscellaneous Commands,\MakeUppercase %\MakeSentenceCase
+% %\mkbibnamelast{\MakeUppercase{#1}}\isdot
+% %\ifblank{#4}{}{\bibnamedelimd\mkbibnameaffix{#4}\isdot}%这句放到后面
+% \ifblank{#2#3}{}{\revsdnamepunct}%
+% \ifblank{#2}{}{\bibnamedelimd\mkbibnamefirst{\MakeUppercase{#2}}\isdot}%
+% \ifblank{#3}{}{\bibnamedelimd\mkbibnameprefix{#3}\isdot}%
+% \addcomma\addspace%
+% \ifblank{#4}{}{\addcomma\addspace\bibnamedelimd\mkbibnameaffix{#4}\isdot}%
+% }}
+
+%出版社和地址的处理,当没有出版社地址时
+%直接判断title的信息是否是中文,若为中文,则写出版地不详,否则用英文的字符表示。
+%事实上title对于每个文献来说是必须的,所以用它判断是最快的,而且一般标题和出版社的语言是一样的。
+\newbibmacro*{publisher+location+date}{%
+\testCJKfirst{\thefield{title}}%
+\testifnoteeqstd%
+\iflistundef{location}{%\adddot
+\iftoggle{ifnoteeqstandard}{}{%
+\iftoggle{ifCJKforgbt}{\printtext{[出版地不详]}\addcolon\addspace}{\printtext{[S.l.\adddot]}\addcolon\addspace}}}% \bibstring{noaddress}
+{\printlist{location}\addcolon\addspace}%
+%\addcolon\addspace%
+\iflistundef{publisher}{%
+\iftoggle{ifnoteeqstandard}{}{%
+\iftoggle{ifCJKforgbt}{\printtext{[出版者不详]}\addcomma\addspace}{\printtext{[s.n.\adddot]}\addcomma\addspace}}}% \bibstring{nopublisher}
+{\printlist{publisher}\addcomma\addspace}%
+%\addcomma\addspace%
+\usebibmacro{date}%
+ %\newunit %去掉这个标点
+}
+
+
+%对版本信息做出修改,源来自biblatex.DEF
+\DeclareFieldFormat{edition}{%
+\testCJKfirst{\thefield{title}}%
+ \ifinteger{#1}%
+ {\iftoggle{ifCJKforgbt}{\printtext{#1版}}%
+ {\mkbibordedition{#1}~\bibstring{edition}}}%
+ {#1\isdot}}
+
+%book条目类的驱动,源来自standard.bbx文件
+ \DeclareBibliographyDriver{book}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+%
+%\ifboolexpr{%这里做一个判断,如果没有任何作者,那么就为空,用于处理序号制,没有作者的情况,但多出一个空格
+%test{\ifnameundef{author}}%
+%and%
+%test{\ifnameundef{editor}}%
+%and%
+%test{\ifnameundef{translator}}%
+%}{\usebibmacro{author/editor+others/translator+others}}%
+%{\usebibmacro{author/editor+others/translator+others}%
+%\setunit{\labelnamepunct}\newblock}
+%
+%\ifthenelse{\( %ifthenelse语句还用不了
+%\ifnameundef{author}
+%\and
+%\iflistundef{editor}
+%\)
+%\and
+%\iffieldundef{translator}
+%}
+%{}{\usebibmacro{author/editor+others/translator+others}%
+% \setunit{\labelnamepunct}\newblock}
+%注意驱动中不能留空行的否则就会多出一个空行来
+%
+%\usebibmacro{author/editor+others/translator+others}%源语句
+%\setunit{\labelnamepunct}\newblock
+%
+%\testexistauthors\iftoggle{ifexistauthors}{}{\usebibmacro{author/editor+others/translator+others}%这种方式还是多出一个空格
+% \setunit{\labelnamepunct}\newblock}
+%
+\usebibmacro{author/editor+others/translator+others}%这样仍然多出一个空格%草,这种方式又可以了,真的不知道原因所在了,以后再测试一下。
+\ifnameundef{author}{%这一段用于去除作者不存在时多出的标点
+\ifnameundef{editor}{%
+\ifnameundef{translator}{\relax}%
+{\setunit{\labelnamepunct}\newblock}}%
+{\setunit{\labelnamepunct}\newblock}}%
+{\setunit{\labelnamepunct}\newblock}%
+%
+%\testexistauthors%
+%\iftoggle{ifexistauthors}%
+%{\usebibmacro{author/editor+others/translator+others}}%
+%{%
+%\usebibmacro{author/editor+others/translator+others}%
+%\setunit{\labelnamepunct}\newblock%
+%}%%搞清楚了,是因为判断跟空格时,会转变为一个不能吃掉的空格
+%%而当下一句前没有空格时,就没有问题了。
+ \usebibmacro{maintitle+title}%这句要顶格,否则会多出一个空格,因为前面有判断语句%草,也没有影响呢,真奇怪了,以后再来测试一下。
+ \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
+ %\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}}
+
+%调整期刊名的格式,源来自standard.bbx
+\newbibmacro*{journal+issuetitle}{%
+ \usebibmacro{journal}%
+ %\setunit*{\addspace}%
+ \setunit*{\addcomma\addspace}%修改为增加一个逗号
+ \iffieldundef{series}
+ {}
+ {\newunit
+ \printfield{series}%
+ \setunit{\addspace}}%
+ %\usebibmacro{volume+number+eid}%
+ %\setunit{\addspace}%
+ \usebibmacro{issue+date}%
+ %\setunit{\addcolon\space}%
+ \iffieldundef{volume}{}{\setunit{\addcomma\space}}%
+ %换成逗号和空格
+ \usebibmacro{issue}%
+ \usebibmacro{volume+number+eid}%把卷期放到年份后面
+ %\newunit
+ }
+
+%调整期刊年份的格式,去掉括号
+\newbibmacro*{issue+date}{%
+ \printtext{%去掉了[parens]
+ \iffieldundef{issue}
+ {%\usebibmacro{date}
+ \iffieldundef{note}{\usebibmacro{date}}%判断一下,是否是报纸和标准
+ {\def\comparetmp{news}\edef\comparetmpb{\thefield{note}}%
+ \ifx\comparetmp\comparetmpb%
+ \usebibmacro{newsdate}%
+ \else%
+ \usebibmacro{date}%
+ \fi}%
+ }
+ {\printfield{issue}%
+ \setunit*{\addspace}%
+ %\usebibmacro{date}
+ \iffieldundef{note}{\usebibmacro{date}}%判断一下,是否是报纸和标准
+ {\def\comparetmp{news}\edef\comparetmpb{\thefield{note}}%
+ \ifx\comparetmp\comparetmpb%
+ \usebibmacro{newsdate}%
+ \else%
+ \usebibmacro{date}%
+ \fi}%
+ }%
+ }%
+ %\newunit
+ }
+
+%调整期刊卷和期的格式,源来自standard.bbx
+\newbibmacro*{volume+number+eid}{%
+ \printfield{volume}%
+ %\setunit*{\adddot}%去掉点号
+ %\printfield{number}%
+ \iffieldundef{number}{}{\printtext{\mkbibparens{\printfield{number}}}}%增加一个圆括号
+ \iffieldundef{eid}{}{%
+ \setunit{\addcomma\space}%
+ \printfield{eid}}}
+
+%调整页码前的标点和去掉期刊文章等页码后面的标点,源来自standard.bbx
+\newbibmacro*{note+pages}{%
+ %\printfield{note}%不要note,note用来判断是否是报纸newspaper
+ \iffieldundef{pages}{}{
+ \setunit{\bibpagespunct}%
+ \printfield{pages}}%
+ %\newunit
+ }
+
+
+%期刊文章,连续出版物中的析出文献的格式
+ \DeclareBibliographyDriver{article}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author/translator+others}%
+ \setunit{\labelnamepunct}\newblock
+ \usebibmacro{title}%
+ \newunit
+ \printlist{language}%
+ \newunit\newblock
+ \usebibmacro{byauthor}%
+ \newunit\newblock
+ \usebibmacro{bytranslator+others}%
+ \newunit\newblock
+ \printfield{version}%
+ \newunit\newblock
+ %\usebibmacro{in:}% 不使用in来表示期刊等连续出版物
+ \usebibmacro{journal+issuetitle}%
+ %\newunit
+% \usebibmacro{byeditor+others}%
+% \newunit
+ \usebibmacro{note+pages}%
+ \usebibmacro{doi+eprint+url}%从后面移上来,调整url和页码之间的位置
+ \newunit\newblock
+ \iftoggle{bbx:isbn}
+ {\printfield{issn}}
+ {}%
+ \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}}
+
+%修改析出文献的文集的标题与附加标题间的符号
+\newbibmacro*{booktitle}{%
+ \ifboolexpr{
+ test {\iffieldundef{booktitle}}
+ and
+ test {\iffieldundef{booksubtitle}}
+ }
+ {}
+ {\printtext[booktitle]{%
+ \printfield[titlecase]{booktitle}%
+ \setunit{\subtitlepunct}%
+ \printfield[titlecase]{booksubtitle}}%
+ \newunit%标点换成下一句
+ \setunit{\subtitlepunct}}%
+ \printfield{booktitleaddon}}
+
+
+%专著中的析出文献的格式修改,源来自standard.bbx
+\DeclareBibliographyDriver{inbook}{%
+ \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}%
+% \newunit
+% \printlist{language}%
+% \newunit\newblock
+% \usebibmacro{byauthor}%
+% \newunit\newblock
+% \usebibmacro{in:}%
+% \printtext{\nobreak\small{//}\nobreak}
+\printtext{\texttt{//}}%似乎顶格加百分号可以避免一些不必要的空格加入,特别是这种直接处理的语句前后
+% \texttt{//}
+\usebibmacro{bybookauthor}%
+\ifnameundef{bookauthor}{\newblock}{\newunit\newblock}%替换下一句
+ %\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}%
+ \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}}
+
+%编者的符号修改一下,源来自biblatex.DEF
+\newbibmacro*{editor}{%
+ \ifboolexpr{
+ test \ifuseeditor
+ and
+ not test {\ifnameundef{editor}}
+ }
+ {\printnames{editor}%
+ \iffieldundef{editortype}%增加一个类型判断,用于存在editortype的情况
+ {\setunit\addspace}%当没有editortype时,直接用句点
+ {\setunit{\addcomma\space}%
+ \usebibmacro{editorstrg}}%
+ \clearname{editor}}
+ {}}
+
+%编者类型做一修改,源来自biblatex.DEF
+\newbibmacro*{editorstrg}{%
+ \printtext[editortype]{%
+ \iffieldundef{editortype}
+ {
+% \ifboolexpr{ %这一段去掉
+% test {\ifnumgreater{\value{editor}}{1}}
+% or
+% test {\ifandothers{editor}}
+% }
+% {\bibstring{editors}}
+% {\bibstring{editor}}
+ }
+ {\ifbibxstring{\thefield{editortype}}
+ {\ifboolexpr{
+ test {\ifnumgreater{\value{editor}}{1}}
+ or
+ test {\ifandothers{editor}}
+ }
+ {\bibstring{\thefield{editortype}s}}
+ {\bibstring{\thefield{editortype}}}}
+ {\thefield{editortype}}}}}
+
+%修改期刊的标题,源来自biblatex.DEF
+\newbibmacro*{periodical}{%
+ \iffieldundef{title}
+ {}
+ {\printtext[title]{%
+ \printfield[titlecase]{title}%
+ %\setunit{\subtitlepunct}%
+ \ifboolexpr{test {\iffieldundef{subtitle}}}%这里增加了对子标题的判断,解决不判断多一个点的问题
+ {}{\setunit{\subtitlepunct}
+ \printfield[titlecase]{subtitle}}%
+ }%
+ \iffieldundef{usera}{}{%在标题后直接给出文献标识字母
+ \printfield[gbtypeflag]{usera}}
+ }
+ }
+
+%期刊的标题做修改,源来自standard.BBX
+\newbibmacro*{title+issuetitle}{%
+ \usebibmacro{periodical}%
+ %\setunit*{\addspace}%
+ \setunit*{\adddot\addspace}%标点修改为句点
+ \iffieldundef{series}
+ {}
+ {\newunit
+ \printfield{series}%
+ \setunit{\addspace}}%
+ \usebibmacro{periodical+issue}%将issue调整到上面来,并修改
+\iffieldundef{number}{}{%%进一步处理有范围的数字
+ \multinumberparser{\thefield{number}}}%
+ \iffieldundef{volume}%
+ {\printfield{year}%
+ \printtext{\mkbibparens{\multinumberfirst}}%
+ \bibrangedash%
+ \iffieldundef{endyear}{}{\printfield{endyear}\printtext{\mkbibparens{\multinumbersecond}}}%
+ }%
+ {\gbt@parse@range{\thefield{volume}}%
+ \printfield{year}%
+ \setunit{\addcomma\space}%将冒号修改为逗号
+ \printtext{\gbt@range@first}%
+ \printtext{\mkbibparens{\multinumberfirst}}%
+ \bibrangedash%
+ \iffieldundef{endyear}{}{%
+ \printfield{endyear}%
+ \setunit{\addcomma\space}%将冒号修改为逗号
+ \printtext{\gbt@range@second}%
+ \printtext{\mkbibparens{\multinumbersecond}}}%
+ }%
+ \setunit{\addcomma\space}%
+ \printfield{eid}%
+ \setunit{\addspace}%
+ %\usebibmacro{issue+date}%
+ %\setunit{\addcolon\space}%
+ \usebibmacro{issue}%
+ \newunit}
+
+%新增一个样式用于调整期刊年份的格式,只打印年份
+\newbibmacro*{periodical+issue}{%
+ \printtext{%去掉了[parens]
+ \iffieldundef{issue}
+ {%\usebibmacro{date}%修改为下一句
+ }%
+ {\printfield{issue}%
+ \setunit*{\addspace}%
+ %\usebibmacro{date}%修改为下一句
+ }%
+ }%
+ %\newunit
+}
+
+%新增一个样式用于输出连续出版物的地址,单位,时间
+%类似与上面的\newbibmacro*{publisher+location+date}
+\newbibmacro*{location+institution+date}{%
+\iflistundef{location}{
+\testCJKfirst{\thefield{title}}
+\iftoggle{ifCJKforgbt}{\printtext{[出版地不详]}}{\printtext{[S.l.\adddot]}}
+}%
+ {\printlist{location}}%
+% \iflistundef{institution}
+% {\setunit*{\addcomma\space}}
+% {\setunit*{\addcolon\space}}%
+% \printlist{institution}%
+% \setunit*{\addcomma\space}%
+\addcolon\addspace%
+\iflistundef{institution}{%
+\iftoggle{ifCJKforgbt}{\printtext{[出版者不详]}}{\printtext{[s.n.\adddot]}}}% \bibstring{nopublisher}
+{\printlist{institution}}%
+\setunit{\addcomma\addspace}%
+ %\usebibmacro{date}%
+ \printfield{year}%
+ \bibrangedash%
+ \iffieldundef{endyear}{}{\printfield{endyear}}%
+ \newunit}
+
+%修改连续出版物的驱动,源来自standard.BBX
+ \DeclareBibliographyDriver{periodical}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{editor}%
+ %\setunit{\labelnamepunct}\newblock
+ \newunit\newblock %删除上面一行,添加这一行
+ \usebibmacro{title+issuetitle}%
+ \newunit
+ \usebibmacro{location+institution+date}%添加这一行用于输出地址,单位和时间
+ \newunit\newblock%添加这一行
+ \printlist{language}%
+ \newunit\newblock
+ \usebibmacro{byeditor}%
+ \newunit\newblock
+ \printfield{note}%
+ \newunit\newblock
+ \iftoggle{bbx:isbn}
+ {\printfield{issn}}
+ {}%
+ \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}}
+
+
+%重设专利title的输出,将文献类型标识符输出出去,原输出来自biblatex.def文件
+\newbibmacro*{patenttitle}{%
+ \ifboolexpr{%
+ test{\iffieldundef{title}}%
+ and%
+ test{\iffieldundef{subtitle}}%
+ }%
+ {}%
+ {\printtext[title]{%
+ \printfield[titlecase]{title}%
+ \ifboolexpr{test {\iffieldundef{subtitle}}}%这里增加了对子标题的判断,解决不判断多一个点的问题
+ {}{\setunit{\subtitlepunct}%
+ \printfield[titlecase]{subtitle}}}%
+ \iffieldundef{titleaddon}{}%判断一下titleaddon,否则直接加可能多一个空格
+ {\setunit{\subtitlepunct}\printfield{titleaddon}}%
+ \setunit{\subtitlepunct}\printfield{number}%写专利号
+ \printfield[gbtypeflag]{usera}%
+ \iffieldundef{booktitle}{\newunit}{}%当title是析出时,不要标点
+ %\newunit
+}%
+}
+
+
+%处理专利文献,源来自standard.BBX
+ \DeclareBibliographyDriver{patent}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author}%
+ \setunit{\labelnamepunct}\newblock
+ %\usebibmacro{title}%
+ \usebibmacro{patenttitle}%给出专利专用的标题输出
+ \newunit
+ \printlist{language}%
+ \newunit\newblock
+ \usebibmacro{byauthor}%
+ \newunit\newblock
+ \printfield{type}%
+ \setunit*{\addspace}%
+ %\printfield{number}%
+ \iflistundef{location}
+ {}
+ {\setunit*{\addspace}%
+ \printtext[parens]{%
+ \printlist[][-\value{listtotal}]{location}}}%
+ \newunit\newblock
+ \usebibmacro{byholder}%
+ \newunit\newblock
+ \printfield{note}%
+ \newunit\newblock
+ \usebibmacro{newsdate}%
+ %\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}}
+
+%处理在线文献,源来自standard.BBX
+\DeclareBibliographyDriver{online}{%
+ \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
+ \usebibmacro{title}%
+ \newunit
+ \printlist{language}%
+ \newunit\newblock
+ \usebibmacro{byauthor}%
+ \newunit\newblock
+ \usebibmacro{byeditor+others}%
+ \newunit\newblock
+ \printfield{version}%
+ \newunit
+ \printfield{note}%
+ \newunit\newblock
+ \printlist{organization}%
+ \newunit\newblock
+ %\usebibmacro{date}%
+ \usebibmacro{modifydate}%修改为带括号的时间
+ \usebibmacro{url+urldate}%从下面移上来
+ \newunit\newblock
+ \iftoggle{bbx:eprint}
+ {\usebibmacro{eprint}}
+ {}%
+ \newunit\newblock
+ %\usebibmacro{url+urldate}%
+ %\newunit\newblock
+ \usebibmacro{addendum+pubstate}%
+ \setunit{\bibpagerefpunct}\newblock
+ \usebibmacro{pageref}%
+ \newunit\newblock
+ \iftoggle{bbx:related}
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}
+ {}%
+ \usebibmacro{finentry}}
+
+%学位论文修改,源来自standard.BBX
+ \DeclareBibliographyDriver{thesis}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author}%
+ \setunit{\labelnamepunct}\newblock
+ \usebibmacro{title}%
+ \newunit
+ \printlist{language}%
+ \newunit\newblock
+ \usebibmacro{byauthor}%
+ \newunit\newblock
+ \printfield{note}%
+ \newunit\newblock
+ \printfield{type}%
+ \newunit
+ \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}}
+
+\newbibmacro*{institution+location+date}{%
+ \printlist{location}%
+ \iflistundef{institution}
+ {\setunit*{\addcomma\space}}
+ {\setunit*{\addcolon\space}}%
+ \printlist{institution}%
+ \setunit*{\addcomma\space}%
+ \usebibmacro{date}%
+ %\usebibmacro{modifydate}%
+ %\newunit
+ }
+
+\DeclareBibliographyDriver{report}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author}%
+ \setunit{\labelnamepunct}\newblock
+ \usebibmacro{title}%
+ \newunit
+ \printlist{language}%
+ \newunit\newblock
+ \usebibmacro{byauthor}%
+ \newunit\newblock
+ \printfield{type}%
+ \setunit*{\addspace}%
+ \printfield{number}%
+ \newunit\newblock
+ \printfield{version}%
+ \newunit
+ \printfield{note}%
+ \newunit\newblock
+ \usebibmacro{institution+location+date}%
+ %\newunit\newblock
+ \usebibmacro{chapter+pages}%
+ \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}}
+
+%直接利用report做manual
+%\DeclareBibliographyDriver{report}{%
+\DeclareBibliographyDriver{manual}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author}%
+ \setunit{\labelnamepunct}\newblock
+ \usebibmacro{title}%
+ \newunit
+ \printlist{language}%
+ \newunit\newblock
+ \usebibmacro{byauthor}%
+ \newunit\newblock
+ \printfield{type}%
+ \setunit*{\addspace}%
+ \printfield{number}%
+ \newunit\newblock
+ \printfield{version}%
+ \newunit
+ \printfield{note}%
+ \newunit\newblock
+ \usebibmacro{institution+location+date}%
+ %\newunit\newblock
+ \usebibmacro{chapter+pages}%
+ \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}}
+
+%直接利用report做unpublished
+%\DeclareBibliographyDriver{report}{%
+\DeclareBibliographyDriver{unpublished}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author}%
+ \setunit{\labelnamepunct}\newblock
+ \usebibmacro{title}%
+ \newunit
+ \printlist{language}%
+ \newunit\newblock
+ \usebibmacro{byauthor}%
+ \newunit\newblock
+ \printfield{type}%
+ \setunit*{\addspace}%
+ \printfield{number}%
+ \newunit\newblock
+ \printfield{version}%
+ \newunit
+ \printfield{note}%
+ \newunit\newblock
+ \usebibmacro{institution+location+date}%
+ %\newunit\newblock
+ \usebibmacro{chapter+pages}%
+ \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}}
+
+%直接利用book做collection
+ \DeclareBibliographyDriver{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}%这句要顶格,否则会多出一个空格,因为前面有判断语句%草,也没有影响呢,真奇怪了,以后再来测试一下。
+ \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
+ %\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}}
+
+%直接利用inbook做incollection
+\DeclareBibliographyDriver{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}%
+\printtext{\texttt{//}}%似乎顶格加百分号可以避免一些不必要的空格加入,特别是这种直接处理的语句前后
+\usebibmacro{bybookauthor}%
+\ifnameundef{bookauthor}{\newblock}{\newunit\newblock}%替换下一句
+ %\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
+ \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}}
+
+%会议论文格式修改,源来自standard.BBX
+ \DeclareBibliographyDriver{inproceedings}{%
+ \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{//}}%似乎顶格加百分号可以避免一些不必要的空格加入,特别是这种直接处理的语句前后
+ \usebibmacro{bybookauthor}%用类似inbook的方式处理
+ \ifnameundef{bookauthor}{\newblock}{\newunit\newblock}%替换下一句
+ %\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
+ \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}}
+
+%会议论文集格式修改,源来自standard.BBX
+\DeclareBibliographyDriver{proceedings}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ %\usebibmacro{editor+others}%
+ \usebibmacro{author/translator+others}%
+ \setunit{\labelnamepunct}\newblock
+ \usebibmacro{maintitle+title}%
+ \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
+ \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}}
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
new file mode 100644
index 00000000000..3253e09c88f
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015.cbx
@@ -0,0 +1,48 @@
+\ProvidesFile{gb7714-2015.cbx}[2016/05/20 v1.0 biblatex citation style]
+
+\RequireCitationStyle{numeric-comp}
+%\RequireCitationStyle{numeric}
+
+\ExecuteBibliographyOptions{
+ autocite = superscript ,
+ autopunct = true ,
+ sorting = none ,
+}
+
+%\DeclareCiteCommand{\cite}[\mkbibparens]{⟨precode⟩}{⟨loopcode⟩}{⟨sepcode⟩}{⟨postcode⟩}
+%
+\DeclareCiteCommand{\cite}[\mkbibsuperscript]
+ {[\usebibmacro{cite:init}%直接添加方括号
+ \usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite:comp}}
+ {}
+ {\usebibmacro{cite:dump}%
+ \usebibmacro{postnote}]}
+
+\DeclareCiteCommand{\parencite}[\mkbibsuperscript]%\mkbibbrackets,仍然用上标
+ {[\usebibmacro{cite:init}%
+ \usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite:comp}}
+ {}
+ {\usebibmacro{cite:dump}%
+ \usebibmacro{postnote}]}
+
+\newbibmacro*{postpages}{%
+ \iffieldundef{postnote}
+ {\printfield{pages}}
+ {\printfield{postnote}}}
+
+%修改括号外带页码的引用格式
+\DeclareFieldFormat{postnote}{#1}
+
+\DeclareCiteCommand{\pagescite}[\mkbibsuperscript]%\mkbibbrackets,仍然用上标
+ {[\usebibmacro{cite:init}%
+ \usebibmacro{prenote}%
+ }
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite:comp}}
+ {}
+ {\usebibmacro{cite:dump}]%
+ \usebibmacro{postpages}}
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
new file mode 100644
index 00000000000..f84738f3dcc
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ay.bbx
@@ -0,0 +1,1551 @@
+%bbx for gbt 7714-2015 by huzhenzhen 20160530 email:hzzmail@163.com
+\ProvidesFile{gb7714-2015ay.bbx}[2016/05/20 v1.0 biblatex bibliography style]
+
+%to be done
+%著者年制,没有作者,用佚名,英文怎么办?
+%没有年怎么办?
+
+% Load the standard style to avoid copy-pasting unnecessary material
+\RequireBibliographyStyle{authoryear} %加载标准样式
+%\RequireBibliographyStyle{standard}
+
+\providetoggle{iftexlivesix}
+%\def\versionstr{3.4}
+%\ifx\abx@version\versionstr
+%\toggletrue{iftexlivesix}
+%\else
+%\togglefalse{iftexlivesix}
+%\fi
+
+%\providetoggle{iftexlivesix}
+%\def\versionstr{3.4}
+%\def\versionstra{3.6}
+%\ifx\abx@version\versionstr
+%\toggletrue{iftexlivesix}
+%\else
+%\ifx\abx@version\versionstra
+%\toggletrue{iftexlivesix}
+%\else
+%\togglefalse{iftexlivesix}
+%\fi
+%\fi
+%改变版本判断机制,根据biblatex更新历史可知,版本3.3开始使用新的姓名机制
+%所以当版本大于3.2开始,就用设置\toggletrue{iftexlivesix}
+\def\numparserta#1.#2\relax{#1}%注意relax的重要性
+\def\numparsertb#1.#2\relax{#2}
+\def\numinteger{\expandafter\numparserta\abx@version\relax}
+\def\numdigital{\expandafter\numparsertb\abx@version\relax}
+\ifnumcomp{\numdigital}{>}{2}{\toggletrue{iftexlivesix}}{\togglefalse{iftexlivesix}}
+
+\iftoggle{iftexlivesix}{
+%设置一些全局选项
+% Alter settings that carry through from biblatex
+\ExecuteBibliographyOptions{
+ useprefix = true, %名字的信息包括前缀
+ %firstinits = true, %名字有缩写,参考3.1.2.3 Internal
+ giveninits = true,
+ date = year, %日期仅写到年
+ maxnames = 1 , %设置名字最大数量
+ minnames = 1 %设置缩减后的名字最小数量
+ %uniquename = init
+}
+
+\newbibmacro*{name:given-family}[4]{%利用family-given定义given-family
+ \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{\MakeUppercase{#1}}}\isdot
+ \ifdefvoid{#2}{}{\revsdnamepunct\bibnamedelimd\mkbibnamegiven{\MakeCapital{#2}}\isdot}
+ \ifdefvoid{#4}{}{\bibnamedelimd\mkbibnamesuffix{#4}\isdot}}
+ {\usebibmacro{name:delim}{#1}%
+ \usebibmacro{name:hook}{#1}%
+ \ifdefvoid{#2}{\mkbibnamefamily{\MakeCapital{#1}}}{\mkbibnamefamily{\MakeUppercase{#1}}}\isdot
+ %
+ \ifboolexpe{%
+ test {\ifdefvoid{#2}}
+ and
+ test {\ifdefvoid{#3}}}
+ {}
+ {\revsdnamepunct}%
+ \ifdefvoid{#2}{}{\bibnamedelimd\mkbibnamegiven{\MakeCapital{#2}}\isdot}%
+ \ifdefvoid{#3}{}{\bibnamedelimd\mkbibnameprefix{#3}\isdot}
+ \ifdefvoid{#4}{}{\bibnamedelimd\mkbibnamesuffix{#4}\isdot}}}
+
+\newbibmacro*{name:family-given}[4]{%利用family-given定义given-family
+ \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{\MakeUppercase{#1}}}\isdot
+ \ifdefvoid{#2}{}{\revsdnamepunct\bibnamedelimd\mkbibnamegiven{\MakeCapital{#2}}\isdot}
+ \ifdefvoid{#4}{}{\bibnamedelimd\mkbibnamesuffix{#4}\isdot}}
+ {\usebibmacro{name:delim}{#1}%
+ \usebibmacro{name:hook}{#1}%
+ \ifdefvoid{#2}{\mkbibnamefamily{\MakeCapital{#1}}}{\mkbibnamefamily{\MakeUppercase{#1}}}\isdot
+ %
+ \ifboolexpe{%
+ test {\ifdefvoid{#2}}
+ and
+ test {\ifdefvoid{#3}}}
+ {}
+ {\revsdnamepunct}%
+ \ifdefvoid{#2}{}{\bibnamedelimd\mkbibnamegiven{\MakeCapital{#2}}\isdot}%
+ \ifdefvoid{#3}{}{\bibnamedelimd\mkbibnameprefix{#3}\isdot}
+ \ifdefvoid{#4}{}{\bibnamedelimd\mkbibnamesuffix{#4}\isdot}}}
+
+}
+{
+%设置一些全局选项
+% Alter settings that carry through from biblatex
+\ExecuteBibliographyOptions{
+ useprefix = true, %名字的信息包括前缀
+ firstinits = true, %名字有缩写,参考3.1.2.3 Internal
+ date = year, %日期仅写到年
+ maxnames = 1 , %设置名字最大数量
+ minnames = 1 %设置缩减后的名字最小数量
+ %uniquename = init
+}
+\DeclareNameFormat{first-last}{%修改作者的姓和名的顺序,源来自于biblatex.def文件
+ \iffirstinits%
+ {\usebibmacro{name:last-first}{#1}{#4}{#5}{#7}}
+ {\usebibmacro{name:last-first}{#1}{#3}{#5}{#7}}%
+ \usebibmacro{name:andothers}}
+
+\newbibmacro*{name:last-first}[4]{%
+ \ifuseprefix
+ {\usebibmacro{name:delim}{#3#1}%
+ \usebibmacro{name:hook}{#3#1}%
+ \ifblank{#3}{}{%
+ \ifcapital
+ {\mkbibnameprefix{\MakeCapital{#3}}\isdot}
+ {\mkbibnameprefix{#3}\isdot}%
+ \ifpunctmark{'}{}{\bibnamedelimc}}%
+ %\mkbibnamelast{#1}\isdot
+ \ifblank{#2}{\MakeCapital#1}{\mkbibnamelast{\MakeUppercase{#1}}}\isdot%\MakeUppercase %\mkbibnamelast{\MakeUppercase{#1}} %\MakeSentenceCase
+ %注意上一句\MakeCapital后面如果再跟一个{}包含#1,则没有效果,可能是包在里面少了一层展开
+ %因为机构名通常包括在{}内,所以要多展开一次才行,所以这里去掉#1外面的{}
+ %\mkbibnamelast{\MakeUppercase{#1}}\isdot
+ %\ifblank{#4}{}{\bibnamedelimd\mkbibnameaffix{#4}\isdot}%这句放到后面
+ \ifblank{#2}{}{\revsdnamepunct\bibnamedelimd\mkbibnamefirst{\MakeUppercase{#2}}\isdot}%
+ \ifblank{#4}{}{\addcomma\addspace\bibnamedelimd\mkbibnameaffix{#4}\isdot}}
+ {\usebibmacro{name:delim}{#1}%
+ \usebibmacro{name:hook}{#1}%
+ %\mkbibnamelast{#1}\isdot %3.9.1 Generic Commands and Hooks,对姓重新处理,如下句: %\mkbibnamelast{\MakeUppercase{#1}}
+ \ifblank{#2}{\MakeCapital#1}{\mkbibnamelast{\MakeUppercase{#1}}}\isdot %大写,参考4.6.4 Miscellaneous Commands,\MakeUppercase %\MakeSentenceCase
+ %\mkbibnamelast{\MakeUppercase{#1}}\isdot
+ %\ifblank{#4}{}{\bibnamedelimd\mkbibnameaffix{#4}\isdot}%这句放到后面
+ \ifblank{#2#3}{}{\revsdnamepunct}%
+ \ifblank{#2}{}{\bibnamedelimd\mkbibnamefirst{\MakeUppercase{#2}}\isdot}%
+ \ifblank{#3}{}{\bibnamedelimd\mkbibnameprefix{#3}\isdot}%
+ \addcomma\addspace%
+ \ifblank{#4}{}{\addcomma\addspace\bibnamedelimd\mkbibnameaffix{#4}\isdot}%
+ }}
+}
+
+%定义判断中文字符的函数,用于判断作者等信息是否由中文字符构成
+\providetoggle{ifCJKforgbt}
+\def\testCJKfirstchar#1#2&{%
+\ifnumgreater{`#1}{"2E7F}{\toggletrue{ifCJKforgbt}}{\togglefalse{ifCJKforgbt}}}
+\def\testCJKfirst#1{%
+\edef\tempa{#1}
+\expandafter\testCJKfirstchar\tempa&}
+
+%判断是否是标准
+\providetoggle{ifnoteeqstandard}
+\def\testifnoteeqstd{%
+\iffieldundef{note}{\togglefalse{ifnoteeqstandard}}%判断一下,是否是报纸和标准
+ {\def\comparetmp{standard}\edef\comparetmpb{\thefield{note}}%
+ \ifx\comparetmp\comparetmpb%
+ \toggletrue{ifnoteeqstandard}%
+ \else%
+ \togglefalse{ifnoteeqstandard}%
+ \fi}}
+
+%将名字简写后的点去掉
+%\renewrobustcmd*{\bibinitperiod}{\adddot} %来源biblatex2.STY
+\renewrobustcmd*{\bibinitperiod}{}
+%\newcommand*{\revsdnamepunct}{\addcomma} %来源biblatex.def
+\renewcommand*{\revsdnamepunct}{}
+%\newcommand*{\subtitlepunct}{\newunitpunct} %修改标题和其它标题信息间的标点
+\renewcommand*{\subtitlepunct}{\addcolon\space} %来源biblatex.def
+
+%新建一个当地化字符串,用来记录“等”字符
+\NewBibliographyString{andotherscn}
+\NewBibliographyString{noaddress}
+\NewBibliographyString{nopublisher}
+
+%直接利用当地化格式english进行修改一些中文的格式,
+%具体可以修改哪些需要的参考english.lbx文件
+%当然也可以增加比如上面定义的andotherscn
+\DefineBibliographyStrings{english}{
+bytranslator= {\addcomma\ 译\adddot}, %将trans. by 改成 译
+and = {\addcomma},%将第2和3人名见的and符号改成 逗号,用\finalnamedelim命令也可以定义,参见3.9.1节
+%andothers = {et al.}, %将超过3个人名的省略,et al.改成为 等
+andotherscn = {等}, %将超过3个人名的省略,et al.改成为 等
+noaddress = {[S.l.]},
+nopublisher = {[s.n.]}
+}
+
+%关于双语言或多语言的参考文献,可以参考3.11.5 Entry Sets,4.11.1 Entry Sets
+%这里调整一下两种语言参考文献的间隔
+%\renewcommand*{\entrysetpunct}{\addsemicolon\space}%源来自biblatex.def
+\renewcommand*{\entrysetpunct}{\adddot\par\nobreak}
+
+
+%用于解析连续出版物,2个卷期的情况
+\def\multivolumeparsetoparts#1/#2{\def\multivolumefirst{#1}\def\multivolumesecond{#2}}
+%\def\multinumberparsetoparts#1/#2{\def\multinumberfirst{#1}\def\multinumbersecond{#2}}
+
+%这里利用李志奇的范围数据解析函数,修改后用来处理卷volume的范围。
+%他的这个函数是通用的,只能在使用数据前使用,如果多次使用前一次得到的数据就会被冲掉
+%这里的范围起止判断符号还是用-,而不是与date相同的/,因为有合期期刊的问题,需要用到/符号
+\def\gbt@parse@range#1{%
+ \edef\gbt@tmpa{#1}%
+ \expandafter\gbt@parse@rangei\gbt@tmpa-\@empty}
+\def\gbt@parse@rangei#1-#2\@empty{%
+ \global\def\gbt@range@first{#1}%
+ \def\gbt@tmpa{#2}%
+ \ifx\gbt@tmpa\@empty%
+ \global\def\gbt@range@second{}%
+ \else%
+ \gbt@parse@rangeii#2\@empty%
+ \fi}
+\def\gbt@parse@rangeii#1-#2\@empty{%
+ \def\gbt@tmpa{#2}%
+ \ifx\gbt@tmpa\@empty%
+ \global\def\gbt@range@second{#1}%
+ \else%
+ \gbt@parse@rangeii#2\@empty%
+ \fi}
+
+%这里写的number的解析函数,与上面的是类似的。
+\def\multinumberparser#1{%
+ \edef\gbnumbertmp{#1}%
+ \expandafter\multinumberparsetoparts\gbnumbertmp-\@empty}
+\def\multinumberparsetoparts#1-#2\@empty{%
+ \def\multinumberfirst{#1}%
+ \def\gbnumbertmp{#2}%
+ \ifx\gbnumbertmp\@empty%
+ \def\multinumbersecond{}%
+ \else%
+ \multinumberparsetopartsb#2\@empty%
+ \fi}
+\def\multinumberparsetopartsb#1-#2\@empty{%
+ \def\gbnumbertmp{#2}%
+ \ifx\gbnumbertmp\@empty%
+ \def\multinumbersecond{#1}%
+ \else%
+ \multinumberparsetopartsb#2\@empty%
+ \fi}
+
+
+%作者修改判断,是否中文,若中文输入等字符,而不是etcl
+%首先把作者和译者信息准确的记录到userf,usere中,用于判断是否是cjk字符。
+%注意\DeclareSourcemap命令只能出现一次
+\DeclareSourcemap{
+\maps[datatype=bibtex]{
+\map{ %增加文献标识符如[M],[J]等,下面首先生成这一信息
+%使用下面biber动态修改bbl文件的方法是正确的
+ %\perdatasource{examples.bib}
+ \pertype{article}
+ \pertype{periodical}
+ \step[fieldset=usera, fieldvalue={J}]
+ }
+ \map{
+ \pertype{book}
+ \pertype{inbook}
+ \step[fieldset=usera, fieldvalue={M}]
+ }
+ \map{
+ \pertype{patent}
+ \step[fieldset=usera, fieldvalue={P}]
+ }
+ \map{
+ \pertype{inproceedings}
+ \pertype{conference}
+ \step[fieldset=usera, fieldvalue={C}]
+ \step[fieldsource=institution] %有时会把version和edition混淆,这里处理后就没有这个问题,可以直接用version
+ \step[fieldset=publisher, origfieldval]
+ \step[fieldsource=editor] %
+ \step[fieldset=bookauthor, origfieldval]
+ }
+ \map{
+ \pertype{proceedings}
+ \step[fieldset=usera, fieldvalue={C}]
+ \step[fieldsource=institution] %有时会把version和edition混淆,这里处理后就没有这个问题,可以直接用version
+ \step[fieldset=publisher, origfieldval]
+ \step[fieldsource=editor] %%有的时候可能只填写了编者,没有author,把它复制一下
+ \step[fieldset=author, origfieldval]
+ }
+ \map{
+ \pertype{report}
+ \step[fieldset=usera, fieldvalue={R}]
+ }
+ \map{
+ \pertype{thesis}
+ \step[fieldset=usera, fieldvalue={D}]
+ }
+ \map{
+ \pertype{online}
+ \step[fieldset=usera, fieldvalue={EB}]
+ }
+ \map{
+ \pertype{manual}
+ \step[fieldset=usera, fieldvalue={A}]
+ \step[fieldsource=edition] %有时会把version和edition混淆,这里处理后就没有这个问题,可以直接用version
+ \step[fieldset=version, origfieldval]
+ \step[fieldsource=organization]%因为用的report的驱动,所以需要institution域,也把organization转成它,这样增大兼容性
+ \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{
+ \step[fieldsource=author]
+ \step[fieldset=userf, origfieldval]
+ \step[fieldsource=translator]
+ \step[fieldset=usere, origfieldval]
+ \step[fieldsource=year]
+ \step[fieldset=date, origfieldval]
+ %\step[fieldset=userb, fieldvalue={en}]
+ }
+}
+}
+
+%\DeclareStyleSourcemap{
+%{\testCJKfirst{\thefield{title}}}%
+%\iftoggle{ifCJKforgbt}%
+%{\map{\step[fieldset=userb, fieldvalue={en}]}}
+%{\map{\step[fieldset=userb, fieldvalue={cn}]}}
+%}
+
+%这个用style改变数据的方式,其中的cjk判断不起作用,所以也就失效了。
+%\DeclareStyleSourcemap{
+%\maps[datatype=bibtex]{
+%\map{
+%\step[fieldsource=title]%
+%\testCJKfirst{origfieldval}%
+%\iftoggle{ifCJKforgbt}{\step[fieldset=userb, fieldvalue={cn}]}{}
+%}
+%}
+%}
+
+
+%排序用降序或userb域
+\DeclareSortingScheme{nyt}{
+ \sort{
+ \field{presort}
+ }
+ \sort[final]{
+ \field{sortkey}
+ }
+ \sort{
+ \field{userb}
+ }
+ \sort{%[direction=descending]
+ \field{sortname}
+ \field{author}
+ \field{editor}
+ \field{translator}
+ \field{sorttitle}
+ \field{title}
+ }
+ \sort{
+ \field{sortyear}
+ \field{year}
+ }
+ \sort{
+ \field{sorttitle}
+ \field{title}
+ }
+ \sort{
+ \field[padside=left,padwidth=4,padchar=0]{volume}
+ \literal{0000}
+ }
+}
+
+%新增文献类型标识符的格式
+%\DeclareFieldFormat{gbtypeflag}{\nobreak\mkbibbrackets{\nobreak#1}\nobreak}
+\DeclareFieldFormat{gbtypeflag}{%
+\iffieldundef{url}%当存在url时,增加一个OL标识符
+{\nobreak\printtext{[}\nobreak#1\printtext{]}\nobreak}%
+{\nobreak\printtext{[}\nobreak#1\printtext{\texttt{/}OL]}\nobreak}%
+}
+\DeclareFieldFormat{gbtypeflagn}{%用于报纸newspaper
+\iffieldundef{url}%当存在url时,增加一个OL标识符
+{\nobreak\printtext{[}\nobreak N\printtext{]}\nobreak}%
+{\nobreak\printtext{[}\nobreak N\printtext{\texttt{/}OL]}\nobreak}%
+}
+\DeclareFieldFormat{gbtypeflags}{%用于报纸newspaper
+\iffieldundef{url}%当存在url时,增加一个OL标识符
+{\nobreak\printtext{[}\nobreak S\printtext{]}\nobreak}%
+{\nobreak\printtext{[}\nobreak S\printtext{\texttt{/}OL]}\nobreak}%
+}
+
+%重设title的输出格式,不加emph,原格式来自biblatex.def文件
+%\DeclareFieldFormat{journaltitle}{\mkbibemph{#1}}
+%\DeclareFieldFormat{issuetitle}{\mkbibemph{#1}}
+%\DeclareFieldFormat{maintitle}{\mkbibemph{#1}}
+%\DeclareFieldFormat{title}{\mkbibemph{#1}}
+%\DeclareFieldFormat{booktitle}{\mkbibemph{#1}}
+\DeclareFieldFormat{title}{#1}
+\DeclareFieldFormat{journaltitle}{#1}
+\DeclareFieldFormat{issuetitle}{#1}
+\DeclareFieldFormat{maintitle}{#1}
+\DeclareFieldFormat{booktitle}{#1}
+%\DeclareFieldFormat[article,inbook,incollection,inproceedings,patent,thesis,unpublished]
+% {title}{\mkbibquote{#1\isdot}}
+\DeclareFieldFormat%将期刊等文献的标题中原来带的引号去掉
+ [article,inbook,incollection,inproceedings,patent,thesis,unpublished]
+ {title}{#1}
+
+%重设标题格式,将其修改为首字母大写
+%\DeclareFieldFormat{titlecase}{#1}
+\DeclareFieldFormat{titlecase}{\MakeCapital#1}
+
+%重设title的输出,将文献类型标识符输出出去,原输出来自biblatex.def文件
+\newbibmacro*{title}{%
+ \ifboolexpr{%
+ test{\iffieldundef{title}}%
+ and%
+ test{\iffieldundef{subtitle}}%
+ }%
+ {}%
+ {\printtext[title]{%
+ \printfield[titlecase]{title}%
+ \ifboolexpr{test {\iffieldundef{subtitle}}}%这里增加了对子标题的判断,解决不判断多一个点的问题
+ {}{\setunit{\subtitlepunct}%
+ \printfield[titlecase]{subtitle}}}%
+ \iffieldundef{titleaddon}{}%判断一下titleaddon,否则直接加可能多一个空格
+ {\setunit{\subtitlepunct}\printfield{titleaddon}}%
+ \iffieldundef{note}{\printfield[gbtypeflag]{usera}}%在标题后直接给出文献标识字母,判断一下,是否是报纸和标准
+ {\def\comparetmp{news}\def\comparetmpa{standard}\edef\comparetmpb{\thefield{note}}%
+ \ifx\comparetmp\comparetmpb%判断是否为报纸
+ \printfield[gbtypeflagn]{usera}%
+ \else%
+ \ifx\comparetmpa\comparetmpb%判断是否为标准
+ \printfield[gbtypeflags]{usera}%
+ \else%
+ \printfield[gbtypeflag]{usera}%
+ \fi
+ \fi%
+ }%
+ \iffieldundef{booktitle}{\newunit}{}%当title是析出时,不要标点
+ %\newunit
+}%
+}
+
+%url相关输出,源来自biblatex.def
+%\DeclareFieldFormat{url}{\mkbibacro{URL}\addcolon\space\url{#1}}
+\DeclareFieldFormat{url}{\url{#1}} %url域修改如本行
+%\DeclareFieldFormat{urldate}{\mkbibparens{\bibstring{urlseen}\space#1}}
+
+\newbibmacro*{url+urldate}{%
+ %\usebibmacro{url}%%更换url的位置,放到下面
+ \iffieldundef{urlyear}%
+ {}{%\setunit*{\addspace}%
+ \usebibmacro{urldate}}%
+ \setunit{\addperiod\addspace}%
+ \usebibmacro{url}}
+
+\newbibmacro*{url}{\printfield{url}}
+%\newbibmacro*{urldate}{\printurldate} %引用时间修改如下一行
+\newbibmacro*{urldate}{\addspace\printtext{[}\printfield{urlyear}\bibrangedash\printfield{urlmonth}\bibrangedash\printfield{urlday}\printtext{]}}
+\newbibmacro*{newsdate}{%%新增加一个新闻日期
+\iffieldundef{year}{}{\printfield{year}%
+\iffieldundef{month}{}{\bibrangedash\printtext{\thefield{month}}%
+\iffieldundef{day}{}{\bibrangedash\printfield{day}}}}
+}%
+\newbibmacro*{modifydate}{%新增加一个带括号的日期
+\printtext{%
+\iffieldundef{year}{}{\mkbibparens{\printtext{\printfield{year}}%
+\iffieldundef{month}{}{\bibrangedash\thefield{month}}%
+\iffieldundef{day}{}{\bibrangedash\printfield{day}}}}%
+}}%
+
+%页码引用格式的修改
+%\newcommand*{\bibpagespunct}{\addcomma\space}
+\renewcommand*{\bibpagespunct}{\addcolon\space}%修改为用冒号
+%\DeclareFieldFormat{pages}{\mkpageprefix[bookpagination]{#1}}
+\DeclareFieldFormat{pages}{#1}%去掉前面引导页码的pp.等字符
+
+%调整doi+eprint+url格式,源来自standard.bbx
+%因为页码后面直接跟引用日期,没有标点所以去掉其中的标点。
+\newbibmacro*{doi+eprint+url}{%
+% \iftoggle{bbx:doi}%把doi的位置放到url后面
+% {\printfield{doi}}
+% {}%
+ %\newunit\newblock
+ \iftoggle{bbx:eprint}
+ {\usebibmacro{eprint}}
+ {}%
+ %\newunit\newblock
+ \iftoggle{bbx:url}
+ {\usebibmacro{url+urldate}}
+ {}
+ \newunit\newblock
+ \iftoggle{bbx:doi}
+ {\printfield{doi}}
+ {}}
+
+\newbibmacro*{chapter+pages}{%
+ \printfield{chapter}%
+ \iffieldundef{pages}{}{%这里增加一个判断,当没有页码时就不输出
+ \setunit{\bibpagespunct}%
+ \printfield{pages}}%
+ %\newunit %这里的标点去掉
+ }
+
+%作者名字的处理,参考文档4.2.3节,3.12.4 Name Parts and Name Spacing
+%\DeclareNameFormat{author}{%
+%\ifthenelse{\value{listcount}=1}
+%{#1%
+%\ifblank{#3}{}{\addcomma\space #3}}
+%{\ifblank{#3}{}{#3\space}%
+%#1}%
+%\ifthenelse{\value{listcount}<\value{liststop}}
+%{\addcomma\space}
+%{}}
+
+
+%\DeclareNameFormat{first-last}{%修改作者的姓和名的顺序,源来自于biblatex.def文件
+%\iftoggle{iftexlivesix}%
+%{\iffirstinits%
+%{\usebibmacro{name:last-first}{\namepartfamily}{\namepartgiveni}{\namepartprefix}{\namepartsuffix}}%
+%{\usebibmacro{name:last-first}{\namepartfamily}{\namepartgiven}{\namepartprefix}}%
+%}%
+%{\iffirstinits%%
+%{\usebibmacro{name:last-first}{#1}{#4}{#5}{#7}}
+%{\usebibmacro{name:last-first}{#1}{#3}{#5}{#7}}
+%}
+%\usebibmacro{name:andothers}}
+%for biblatex version 3.0
+%#1 The last names.
+%#2 The last names, given as initials.
+%#3 The first names.
+%#4 The first names, given as initials.
+%#5 The name prefixes,
+%#6 The name prefixes, given as initials.
+%#7 The name affixes,
+%#8 The name affixes, given as initials.
+%for biblatex version 3.4
+%\namepartfamily
+%\namepartfamilyi
+%\namepartgiven
+%\namepartgiveni
+%\namepartprefix
+%\namepartprefixi
+%\namepartsuffix
+%\namepartsuffixi
+
+
+
+%对版本信息做出修改,源来自biblatex.DEF
+\DeclareFieldFormat{edition}{%
+%\testCJKfirst{\thefield{title}}%
+\iffieldundef{title}{}{\testCJKfirst{\thefield{title}}}%
+%直接用title不行?可能是需要在该句后面在加一个{},在展开的时候需要。
+%\testCJKfirst{\thefield{title}} %直接用这句不行,原因不明
+ \ifinteger{#1}%
+ {\iftoggle{ifCJKforgbt}{\printtext{#1版}}%
+ {\mkbibordedition{#1}~\bibstring{edition}}}%
+ {#1\isdot}}
+
+\renewbibmacro*{author}{%
+ \ifboolexpr{
+ test \ifuseauthor
+ and
+ not test {\ifnameundef{author}}
+ }
+ {\usebibmacro{bbx:dashcheck}
+ {%\bibnamedash
+ \printnames{author}%
+ }%
+ {\usebibmacro{bbx:savehash}%
+ \printnames{author}%
+ \iffieldundef{authortype}
+ {\setunit{\addspace}}
+ {\setunit{\addcomma\space}}}%
+ \iffieldundef{authortype}
+ {}
+ {\usebibmacro{authorstrg}%
+ \setunit{\addspace}}}%
+ {\global\undef\bbx@lasthash
+ \usebibmacro{labeltitle}%
+ \setunit*{\addspace}}%
+ \setunit{\addcomma\space}%增加一个逗号
+ \usebibmacro{date+extrayear}
+ }
+
+%重设date+extrayear格式,源来自authoryear.BBX
+\renewbibmacro*{date+extrayear}{%
+ \iffieldundef{\thefield{datelabelsource}year}
+ {}
+ {\printtext{%[parens]%这里把括号去掉
+ \iffieldsequal{year}{\thefield{datelabelsource}year}
+ {\printdateextralabel}%
+ {\printfield{labelyear}%
+ \printfield{extrayear}}}}}%
+
+%修改译者位置格式,bytranslator+others原格式来自biblatex.def文件
+\newbibmacro*{bytranslator+others}{%
+ \ifnameundef{translator}
+ {}
+ {%\usebibmacro{bytranslator+othersstrg}
+ %\setunit{\addspace}%
+ \printnames[bytranslator]{translator}%
+ \clearname{translator}%
+ \usebibmacro{bytranslator+othersstrg}%“译”的位置换到下面来,即放到译者后面。
+ \setunit{\addspace}%
+ \newunit}%
+ \usebibmacro{withothers}}
+
+%判断作者或译者是否中文,若中文用字符等,否则用etcl。
+\newbibmacro*{name:andothers}{%
+ \ifboolexpr{
+ test {\ifnumequal{\value{listcount}}{\value{liststop}}}
+ and
+ test \ifmorenames
+ }
+ {%这里做一个判断是在处理author还是translator用于两者是不同语言的情况
+ \ifcurrentname{translator}{\testCJKfirst{\thefield{usere}}}{\testCJKfirst{\thefield{userf}}}%
+ %这句判断如果放到\andothersdelim后面会在等或etc.前增加一个空格,所以放前面
+ \ifnumgreater{\value{liststop}}{1}
+ {\finalandcomma}
+ {\finalandcomma}%
+\andothersdelim\iftoggle{ifCJKforgbt}{\bibstring{andotherscn}}{\bibstring{andothers}}
+%\andothersdelim\bibstring{andotherscn}
+}
+{}}
+
+%出版社和地址的处理,当没有出版社地址时
+%直接判断title的信息是否是中文,若为中文,则写出版地不详,否则用英文的字符表示。
+%事实上title对于每个文献来说是必须的,所以用它判断是最快的,而且一般标题和出版社的语言是一样的。
+\newbibmacro*{publisher+location+date}{%
+\iffieldundef{title}{}{\testCJKfirst{\thefield{title}}}%
+\testifnoteeqstd%
+\iflistundef{location}{%\adddot
+\iftoggle{ifnoteeqstandard}{}{%
+\iftoggle{ifCJKforgbt}{\printtext{[出版地不详]}\setunit*{\addcolon\addspace}}{\printtext{[S.l.\adddot]}\setunit*{\addcolon\addspace}}}}% \bibstring{noaddress}
+{\printlist{location}\setunit*{\addcolon\addspace}}%
+%\addcolon\addspace%
+\iflistundef{publisher}{%
+\iftoggle{ifnoteeqstandard}{}{%
+\iftoggle{ifCJKforgbt}{\printtext{[出版者不详]}\setunit*{\addcolon\addspace}}{\printtext{[s.n.\adddot]}\setunit*{\addcolon\addspace}}}}% \bibstring{nopublisher}
+{\printlist{publisher}\setunit*{\addcolon\addspace}}%
+%\addcomma\addspace%
+%\usebibmacro{date}%
+%\newunit %去掉这个标点
+}
+%修改book的驱动,源来自standard.BBX
+\DeclareBibliographyDriver{book}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author/editor+others/translator+others}%
+ \setunit{\labelnamepunct}\newblock
+ \usebibmacro{maintitle+title}%
+ \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}%
+ %\newunit
+ \usebibmacro{doi+eprint+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}}
+
+%修改参考文献列表环境,不要缩进
+ \defbibenvironment{bibliography}
+ {\list
+ {}
+ {%\setlength{\leftmargin}{\bibhang}%
+ %\setlength{\itemindent}{-\leftmargin}%
+ \setlength{\leftmargin}{0pt}%
+ \setlength{\itemindent}{0pt}%
+ \setlength{\itemsep}{\bibitemsep}%
+ \setlength{\parsep}{\bibparsep}}}
+ {\endlist}
+ {\item}
+
+%修改析出文献的文集的标题与附加标题间的符号
+\newbibmacro*{booktitle}{%
+ \ifboolexpr{
+ test {\iffieldundef{booktitle}}
+ and
+ test {\iffieldundef{booksubtitle}}
+ }
+ {}
+ {\printtext[booktitle]{%
+ \printfield[titlecase]{booktitle}%
+ \setunit{\subtitlepunct}%
+ \printfield[titlecase]{booksubtitle}}%
+ \newunit%标点换成下一句
+ \setunit{\subtitlepunct}}%
+ \printfield{booktitleaddon}}
+
+%修改inbook的驱动,源来自standard.BBX
+\DeclareBibliographyDriver{inbook}{%
+ \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{//}}%
+ \usebibmacro{bybookauthor}%
+ \ifnameundef{bookauthor}{}{\newunit\newblock}%替换下一句
+ %\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}}
+
+%collection直接用book的驱动
+\DeclareBibliographyDriver{collection}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author/editor+others/translator+others}%
+ \setunit{\labelnamepunct}\newblock
+ \usebibmacro{maintitle+title}%
+ \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}%
+ %\newunit
+ \usebibmacro{doi+eprint+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}}
+
+%incollection直接用inbook的驱动
+\DeclareBibliographyDriver{incollection}{%
+ \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{//}}%
+ \usebibmacro{bybookauthor}%
+ \ifnameundef{bookauthor}{}{\newunit\newblock}%替换下一句
+ %\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}}
+
+%调整期刊名的格式,源来自standard.bbx
+\newbibmacro*{journal+issuetitle}{%
+ \usebibmacro{journal}%
+ %\setunit*{\addspace}%
+ \setunit*{\addcomma\addspace}%修改为增加一个逗号
+ \iffieldundef{series}
+ {}
+ {\newunit
+ \printfield{series}%
+ \setunit{\addspace}}%
+ %\usebibmacro{volume+number+eid}%
+ %\setunit{\addspace}%
+ \usebibmacro{issue+date}%
+ %\setunit{\addcolon\space}%
+ \iffieldundef{volume}{}{\setunit{\addcomma\space}}%
+ %换成逗号和空格
+ \usebibmacro{issue}%
+ \usebibmacro{volume+number+eid}%把卷期放到年份后面
+ %\newunit
+ }
+
+%调整期刊年份的格式,去掉括号
+\newbibmacro*{issue+date}{%
+ \printtext{%去掉了[parens]
+ \iffieldundef{issue}
+ {%\usebibmacro{date}
+ \iffieldundef{note}{\usebibmacro{date}}%判断一下,是否是报纸和标准
+ {\def\comparetmp{news}\edef\comparetmpb{\thefield{note}}%
+ \ifx\comparetmp\comparetmpb%
+ \usebibmacro{newsdate}%
+ \else%
+ \usebibmacro{date}%
+ \fi}%
+ }
+ {\printfield{issue}%
+ \setunit*{\addspace}%
+ %\usebibmacro{date}
+ \iffieldundef{note}{\usebibmacro{date}}%判断一下,是否是报纸和标准
+ {\def\comparetmp{news}\edef\comparetmpb{\thefield{note}}%
+ \ifx\comparetmp\comparetmpb%
+ \usebibmacro{newsdate}%
+ \else%
+ \usebibmacro{date}%
+ \fi}%
+ }%
+ }%
+ %\newunit
+ }
+
+%调整期刊卷和期的格式,源来自standard.bbx
+\newbibmacro*{volume+number+eid}{%
+ \printfield{volume}%
+ %\setunit*{\adddot}%去掉点号
+ %\printfield{number}%
+ \iffieldundef{number}{}{\printtext{\mkbibparens{\printfield{number}}}}%增加一个圆括号
+ \iffieldundef{eid}{}{%
+ \setunit{\addcomma\space}%
+ \printfield{eid}}}
+
+%调整页码前的标点和去掉期刊文章等页码后面的标点,源来自standard.bbx
+\newbibmacro*{note+pages}{%
+ %\printfield{note}%不要note,note用来判断是否是报纸newspaper
+ \iffieldundef{pages}{}{
+ \setunit{\bibpagespunct}%
+ \printfield{pages}}%
+ %\newunit
+ }
+
+
+%期刊文章,连续出版物中的析出文献的格式
+ \DeclareBibliographyDriver{article}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author/translator+others}%
+ \setunit{\labelnamepunct}\newblock
+ \usebibmacro{title}%
+ \newunit
+ \printlist{language}%
+ \newunit\newblock
+ \usebibmacro{byauthor}%
+ \newunit\newblock
+ \usebibmacro{bytranslator+others}%
+ \newunit\newblock
+ \printfield{version}%
+ \newunit\newblock
+ %\usebibmacro{in:}% 不使用in来表示期刊等连续出版物
+ \usebibmacro{journal+issuetitle}%
+% \newunit
+% \usebibmacro{byeditor+others}%
+% \newunit
+ \usebibmacro{note+pages}%
+ \usebibmacro{doi+eprint+url}%从后面移上来,调整url和页码之间的位置
+ \newunit\newblock
+ \iftoggle{bbx:isbn}
+ {\printfield{issn}}
+ {}%
+ \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}}
+
+%编者类型做一修改,源来自biblatex.DEF
+\newbibmacro*{editorstrg}{%
+ \printtext[editortype]{%
+ \iffieldundef{editortype}
+ {
+% \ifboolexpr{ %这一段去掉,未定义编者类型情况下不处理
+% test {\ifnumgreater{\value{editor}}{1}}
+% or
+% test {\ifandothers{editor}}
+% }
+% {\bibstring{editors}}
+% {\bibstring{editor}}
+ }
+ {\ifbibxstring{\thefield{editortype}} %定义编者类型情况下处理,以后根据需要修改
+ {\ifboolexpr{
+ test {\ifnumgreater{\value{editor}}{1}}
+ or
+ test {\ifandothers{editor}}
+ }
+ {\bibstring{\thefield{editortype}s}}
+ {\bibstring{\thefield{editortype}}}}
+ {\thefield{editortype}}}
+ }}
+
+%修改期刊的标题,源来自biblatex.DEF
+\newbibmacro*{periodical}{%
+ \iffieldundef{title}
+ {}
+ {\printtext[title]{%
+ \printfield[titlecase]{title}%
+ %\setunit{\subtitlepunct}%
+ \ifboolexpr{test {\iffieldundef{subtitle}}}%这里增加了对子标题的判断,解决不判断多一个点的问题
+ {}{\setunit{\subtitlepunct}
+ \printfield[titlecase]{subtitle}}%
+ }%
+ \iffieldundef{usera}{}{%在标题后直接给出文献标识字母
+ \printfield[gbtypeflag]{usera}}
+ }
+ }
+
+%期刊的标题做修改,源来自standard.BBX
+\newbibmacro*{title+issuetitle}{%
+ \usebibmacro{periodical}%
+ %\setunit*{\addspace}%
+ \setunit*{\adddot\addspace}%标点修改为句点
+ \iffieldundef{series}
+ {}
+ {\newunit
+ \printfield{series}%
+ \setunit{\addspace}}%
+ \usebibmacro{periodical+issue}%将issue调整到上面来,并修改
+\iffieldundef{number}{}{%%进一步处理有范围的数字
+ \multinumberparser{\thefield{number}}}%
+ \iffieldundef{volume}%
+ {\printfield{year}%
+ \printtext{\mkbibparens{\multinumberfirst}}%
+ \bibrangedash%
+ \iffieldundef{endyear}{}{\printfield{endyear}\printtext{\mkbibparens{\multinumbersecond}}}%
+ }%
+ {\gbt@parse@range{\thefield{volume}}%
+ \printfield{year}%
+ \setunit{\addcomma\space}%将冒号修改为逗号
+ \printtext{\gbt@range@first}%
+ \printtext{\mkbibparens{\multinumberfirst}}%
+ \bibrangedash%
+ \iffieldundef{endyear}{}{%
+ \printfield{endyear}%
+ \setunit{\addcomma\space}%将冒号修改为逗号
+ \printtext{\gbt@range@second}%
+ \printtext{\mkbibparens{\multinumbersecond}}}%
+ }%
+ \setunit{\addcomma\space}%
+ \printfield{eid}%
+ \setunit{\addspace}%
+ %\usebibmacro{issue+date}%
+ %\setunit{\addcolon\space}%
+ \usebibmacro{issue}%
+ \newunit}
+
+%新增一个样式用于调整期刊年份的格式,只打印年份
+\newbibmacro*{periodical+issue}{%
+ \printtext{%去掉了[parens]
+ \iffieldundef{issue}
+ {%\usebibmacro{date}%修改为下一句
+ }%
+ {\printfield{issue}%
+ \setunit*{\addspace}%
+ %\usebibmacro{date}%修改为下一句
+ }%
+ }%
+ %\newunit
+}
+
+%新增一个样式用于输出连续出版物的地址,单位,时间
+%类似与上面的\newbibmacro*{publisher+location+date}
+\newbibmacro*{location+institution+date}{%
+\iflistundef{location}{
+\testCJKfirst{\thefield{title}}
+\iftoggle{ifCJKforgbt}{\printtext{[出版地不详]}}{\printtext{[S.l.\adddot]}}
+}%
+ {\printlist{location}}%
+% \iflistundef{institution}
+% {\setunit*{\addcomma\space}}
+% {\setunit*{\addcolon\space}}%
+% \printlist{institution}%
+% \setunit*{\addcomma\space}%
+\addcolon\addspace%
+\iflistundef{institution}{%
+\iftoggle{ifCJKforgbt}{\printtext{[出版者不详]}}{\printtext{[s.n.\adddot]}}}% \bibstring{nopublisher}
+{\printlist{institution}}%
+\setunit{\addcomma\addspace}%
+ %\usebibmacro{date}%
+% \printfield{year}%
+% \bibrangedash%
+% \iffieldundef{endyear}{}{\printfield{endyear}}%
+ \newunit}
+
+
+%修改连续出版物的驱动,源来自standard.BBX
+ \DeclareBibliographyDriver{periodical}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{editor}%
+ %\setunit{\labelnamepunct}\newblock
+ \newunit\newblock %删除上面一行,添加这一行
+ \usebibmacro{title+issuetitle}%
+ \newunit
+ \usebibmacro{location+institution+date}%添加这一行用于输出地址,单位和时间
+ \newunit\newblock%添加这一行
+ \printlist{language}%
+ \newunit\newblock
+ \usebibmacro{byeditor}%
+ \newunit\newblock
+ \printfield{note}%
+ \newunit\newblock
+ \iftoggle{bbx:isbn}
+ {\printfield{issn}}
+ {}%
+ \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}}
+
+%重设专利title的输出,将文献类型标识符输出出去,原输出来自biblatex.def文件
+\newbibmacro*{patenttitle}{%
+ \ifboolexpr{%
+ test{\iffieldundef{title}}%
+ and%
+ test{\iffieldundef{subtitle}}%
+ }%
+ {}%
+ {\printtext[title]{%
+ \printfield[titlecase]{title}%
+ \ifboolexpr{test {\iffieldundef{subtitle}}}%这里增加了对子标题的判断,解决不判断多一个点的问题
+ {}{\setunit{\subtitlepunct}%
+ \printfield[titlecase]{subtitle}}}%
+ \iffieldundef{titleaddon}{}%判断一下titleaddon,否则直接加可能多一个空格
+ {\setunit{\subtitlepunct}\printfield{titleaddon}}%
+ \setunit{\subtitlepunct}\printfield{number}%写专利号
+ \printfield[gbtypeflag]{usera}%
+ \iffieldundef{booktitle}{\newunit}{}%当title是析出时,不要标点
+ %\newunit
+}%
+}
+
+%处理专利文献,源来自standard.BBX
+ \DeclareBibliographyDriver{patent}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author}%
+ \setunit{\labelnamepunct}\newblock
+ %\usebibmacro{title}%
+ \usebibmacro{patenttitle}%给出专利专用的标题输出
+ \newunit
+ \printlist{language}%
+ \newunit\newblock
+ \usebibmacro{byauthor}%
+ \newunit\newblock
+ \printfield{type}%
+ \setunit*{\addspace}%
+ %\printfield{number}%
+ \iflistundef{location}
+ {}
+ {\setunit*{\addspace}%
+ \printtext[parens]{%
+ \printlist[][-\value{listtotal}]{location}}}%
+ \newunit\newblock
+ \usebibmacro{byholder}%
+ \newunit\newblock
+ \printfield{note}%
+ \newunit\newblock
+ \usebibmacro{newsdate}%
+ %\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}}
+
+%处理在线文献,源来自standard.BBX
+\DeclareBibliographyDriver{online}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author/editor+others/translator+others}%
+ \setunit{\labelnamepunct}\newblock
+ \usebibmacro{title}%
+ \newunit
+ \printlist{language}%
+ \newunit\newblock
+ \usebibmacro{byauthor}%
+ \newunit\newblock
+ \usebibmacro{byeditor+others}%
+ \newunit\newblock
+ \printfield{version}%
+ \newunit
+ \printfield{note}%
+ \newunit\newblock
+ \printlist{organization}%
+ \newunit\newblock
+ %\usebibmacro{date}%
+ \usebibmacro{modifydate}%修改为带括号的时间
+ \usebibmacro{url+urldate}%从下面移上来
+ \newunit\newblock
+ \iftoggle{bbx:eprint}
+ {\usebibmacro{eprint}}
+ {}%
+ \newunit\newblock
+ %\usebibmacro{url+urldate}%
+ %\newunit\newblock
+ \usebibmacro{addendum+pubstate}%
+ \setunit{\bibpagerefpunct}\newblock
+ \usebibmacro{pageref}%
+ \newunit\newblock
+ \iftoggle{bbx:related}
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}
+ {}%
+ \usebibmacro{finentry}}
+
+%学位论文修改,源来自standard.BBX
+ \DeclareBibliographyDriver{thesis}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author}%
+ \setunit{\labelnamepunct}\newblock
+ \usebibmacro{title}%
+ \newunit
+ \printlist{language}%
+ \newunit\newblock
+ \usebibmacro{byauthor}%
+ \newunit\newblock
+ \printfield{note}%
+ \newunit\newblock
+ \printfield{type}%
+ \newunit
+ \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}}
+
+\newbibmacro*{institution+location+date}{%
+ \printlist{location}%
+ \iflistundef{institution}
+ {\setunit*{\addcomma\space}}
+ {\setunit*{\addcolon\space}}%
+ \printlist{institution}%
+ \setunit*{\addcomma\space}%
+ \usebibmacro{date}%
+ %\usebibmacro{modifydate}%
+ %\newunit
+ }
+
+\DeclareBibliographyDriver{report}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author}%
+ \setunit{\labelnamepunct}\newblock
+ \usebibmacro{title}%
+ \newunit
+ \printlist{language}%
+ \newunit\newblock
+ \usebibmacro{byauthor}%
+ \newunit\newblock
+ \printfield{type}%
+ \setunit*{\addspace}%
+ \printfield{number}%
+ \newunit\newblock
+ \printfield{version}%
+ \newunit
+ \printfield{note}%
+ \newunit\newblock
+ \usebibmacro{institution+location+date}%
+ %\newunit\newblock
+ \usebibmacro{chapter+pages}%
+ \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}}
+
+%直接利用report做manual
+%\DeclareBibliographyDriver{report}{%
+\DeclareBibliographyDriver{manual}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author}%
+ \setunit{\labelnamepunct}\newblock
+ \usebibmacro{title}%
+ \newunit
+ \printlist{language}%
+ \newunit\newblock
+ \usebibmacro{byauthor}%
+ \newunit\newblock
+ \printfield{type}%
+ \setunit*{\addspace}%
+ \printfield{number}%
+ \newunit\newblock
+ \printfield{version}%
+ \newunit
+ \printfield{note}%
+ \newunit\newblock
+ \usebibmacro{institution+location+date}%
+ %\newunit\newblock
+ \usebibmacro{chapter+pages}%
+ \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}}
+
+%直接利用report做unpublished
+%\DeclareBibliographyDriver{report}{%
+\DeclareBibliographyDriver{unpublished}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author}%
+ \setunit{\labelnamepunct}\newblock
+ \usebibmacro{title}%
+ \newunit
+ \printlist{language}%
+ \newunit\newblock
+ \usebibmacro{byauthor}%
+ \newunit\newblock
+ \printfield{type}%
+ \setunit*{\addspace}%
+ \printfield{number}%
+ \newunit\newblock
+ \printfield{version}%
+ \newunit
+ \printfield{note}%
+ \newunit\newblock
+ \usebibmacro{institution+location+date}%
+ %\newunit\newblock
+ \usebibmacro{chapter+pages}%
+ \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}}
+
+%会议论文格式修改,源来自standard.BBX
+ \DeclareBibliographyDriver{inproceedings}{%
+ \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{//}}%似乎顶格加百分号可以避免一些不必要的空格加入,特别是这种直接处理的语句前后
+ \usebibmacro{bybookauthor}%用类似inbook的方式处理
+ \ifnameundef{bookauthor}{}{\newunit\newblock}%替换下一句
+ %\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
+ \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}}
+
+%会议论文集格式修改,源来自standard.BBX
+\DeclareBibliographyDriver{proceedings}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ %\usebibmacro{editor+others}%
+ \usebibmacro{author/translator+others}%
+ \setunit{\labelnamepunct}\newblock
+ \usebibmacro{maintitle+title}%
+ \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
+ \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}}
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
new file mode 100644
index 00000000000..5c5a3d81af2
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ay.cbx
@@ -0,0 +1,41 @@
+\ProvidesFile{gb7714-2015ay.cbx}[2016/05/20 v1.0 biblatex citation style]
+
+\RequireCitationStyle{authoryear}
+%\RequireCitationStyle{numeric}
+
+\ExecuteBibliographyOptions{
+ %autocite = superscript ,
+ %autopunct = true ,
+ %sorting = none ,
+}
+
+%\DeclareCiteCommand{\cite}[\mkbibparens]{⟨precode⟩}{⟨loopcode⟩}{⟨sepcode⟩}{⟨postcode⟩}
+%
+\DeclareCiteCommand{\cite}[\mkbibparens]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\parencite}[\mkbibparens]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\newbibmacro*{postpages}{%
+ \iffieldundef{postnote}
+ {\printfield{pages}}
+ {\printfield{postnote}}}
+
+%修改括号外带页码的引用格式
+\DeclareFieldFormat{postnote}{#1}
+
+\DeclareCiteCommand{\pagescite}
+ {\printtext{(}\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\printtext{)}\textsuperscript{\usebibmacro{postpages}}}