summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-08-29 22:50:47 +0000
committerKarl Berry <karl@freefriends.org>2019-08-29 22:50:47 +0000
commit6228e603ee4b60d2a8c779fc2fadce176160cff3 (patch)
tree313ec8fad2e6c62f047e5566b6ca3dbf8f9e892b /Master/texmf-dist/tex/latex
parentef6fb210fcab69030fe59706b2ceaa84476b8f40 (diff)
biblatex-gb7714-2015 (29aug19)
git-svn-id: svn://tug.org/texlive/trunk@51985 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015.bbx113
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015.cbx145
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ay.bbx135
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ay.cbx98
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ms.bbx102
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ms.cbx56
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015mx.bbx112
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015mx.cbx129
8 files changed, 723 insertions, 167 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015.bbx b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015.bbx
index 6429952be64..7bc20e91635 100644
--- a/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015.bbx
+++ b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015.bbx
@@ -11,7 +11,7 @@
%
% 版本和时间信息
%
-\def\versionofgbtstyle{2019/03/28 v1.0r}
+\def\versionofgbtstyle{2019/08/28 v1.0s}
\def\versionofbiblatex{\abx@version}
\ProvidesFile{gb7714-2015.bbx}[\versionofgbtstyle biblatex bibliography style]
%\RequireBiber[3]%显式指定用biber后端,当用bibtex时会报错,但其实不会影响编译,只是采用bibtex后无法达成格式需求
@@ -205,6 +205,27 @@
% 设置宏包选项
%=====================================================================
%
+ % 增加一个控制是否输出annotation域的选项,该域可以用于在文献条目后面输出一些注释信息
+ % 20190509,v1,0s,hzz
+ \newtoggle{bbx:gbannote}
+ \DeclareBibliographyOption{gbannote}[false]{%biblatex低版本
+ \settoggle{bbx:gbannote}{#1}}
+ \ExecuteBibliographyOptions{gbannote}
+ %
+ %用于在文献条目后面输出注释信息的宏
+ %FieldFormat{annotation}用于设置注释信息的格式
+ \DeclareFieldFormat{annotation}{%
+ \printtext{\addspace(#1)}%
+ }
+ \renewbibmacro*{annotation}{%
+ \iftoggle{bbx:gbannote}%
+ {\iffieldundef{annotation}%
+ {\printfile[annotation]{\bibannotationprefix\thefield{entrykey}.tex}}%
+ {\printfield{annotation}}}%
+ {}%
+ }
+
+ %
% 增加一个控制是否输出type域的选项
% 20190212,v1,0q,hzz
\newtoggle{bbx:gbfieldtype}
@@ -213,6 +234,15 @@
\ExecuteBibliographyOptions{gbfieldtype}
%
+ % 增加一个控制是否根据页码重设脚注数字标号的选项
+ % 20190422,v1,0r,hzz
+ \newtoggle{bbx:gbfnperpage}
+ \DeclareBibliographyOption{gbfnperpage}[false]{%
+ \settoggle{bbx:gbfnperpage}{#1}}
+ \ExecuteBibliographyOptions{gbfnperpage}
+
+
+ %
% 增加一个选项,用于控制是否实现GB/T 7714-2015标准的脚注文献表
% 20190203,v1.0p,hzz
% 原理方法:默认做patch,文献引用带圈上标数字表示,脚注中的文献用带圈非上标数字做标签
@@ -244,7 +274,9 @@
%重新实现脚注的根据单页重设脚注号码
%重新实现脚注的悬挂对齐问题,不再使用footmisc,直接从latex核心代码和hyperref代码进行修改
%v1.0q 20190317 hzz
- \@addtoreset{footnote}{page}%重设计数器
+ %v1.0r 20190422 hzz 根据gbfnperpage选项设置
+ \iftoggle{bbx:gbfnperpage}%
+ {\@addtoreset{footnote}{page}}{}%重设计数器
\@ifpackageloaded{hyperref}{%加载hyperref则对\H@@footnotetext做重定义
\long\def\H@@footnotetext##1{\insert\footins{%
@@ -330,16 +362,16 @@
%v1.0q 20190309 区分使脚注标注适应minipage中的情况
\newbibmacro*{citesavefn}{%
\ifciteseen%当被引用过为true
- {\ifcsdef{sec\arabic{refsection}et\thefield{entrykey}}%当已经定义过脚注序号信息
- {\csgdef{labelsec\arabic{refsection}et\thefield{entrykey}}{%
- \str@sameentry\gdef\@thefnmark{\csuse{sec\arabic{refsection}et\thefield{entrykey}}}%
+ {\ifcsdef{sec\arabic{refsection}\arabic{page}et\thefield{entrykey}}%当已经定义过脚注序号信息
+ {\csgdef{labelsec\arabic{refsection}\arabic{page}et\thefield{entrykey}}{%
+ \str@sameentry\gdef\@thefnmark{\csuse{sec\arabic{refsection}\arabic{page}et\thefield{entrykey}}}%
\@makefnmark%
}}%
- {\csxdef{sec\arabic{refsection}et\thefield{entrykey}}{%
+ {\csxdef{sec\arabic{refsection}\arabic{page}et\thefield{entrykey}}{%
\ifcsstring{@mpfn}{mpfootnote}{\@alph\c@mpfootnote}{\thefootnote}%
}}%
}%
- {\csxdef{sec\arabic{refsection}et\thefield{entrykey}}{%
+ {\csxdef{sec\arabic{refsection}\arabic{page}et\thefield{entrykey}}{%
\ifcsstring{@mpfn}{mpfootnote}{\@alph\c@mpfootnote}{\thefootnote}%
%判断在minipage中比较麻烦,这里使用\@mpfn的定义进行判断
}}%
@@ -356,8 +388,8 @@
{}{\setunit{\addcolon\addspace}\printfield{postnote}}}%与ay样式不同,由于已修改postnote域格式,直接用printfield
}%
{\usebibmacro{citesavefn}%
- \ifcsdef{labelsec\arabic{refsection}et\thefield{entrykey}}%
- {\csuse{labelsec\arabic{refsection}et\thefield{entrykey}}}%\nopunct
+ \ifcsdef{labelsec\arabic{refsection}\arabic{page}et\thefield{entrykey}}%
+ {\csuse{labelsec\arabic{refsection}\arabic{page}et\thefield{entrykey}}}%\nopunct
{\usedriver{\DeclareNameAlias{sortname}{default}}{\thefield{entrytype}}}%
}%
{\multicitedelim}%
@@ -775,7 +807,7 @@
%andothers = {et al.},%将超过3个人名的省略,et al.改成为 等
andotherscn = {\str@andotherscn},%将超过3个人名的省略,et al.改成为 等
andothersincitecn={\str@andotherscn},%将标注中的分开,便于与文献表中的区分
- andothersincite={et al.},
+ andothersincite={et al\adddot},
backrefpage = {\str@backrefpage:},
backrefpages = {\str@backrefpages:},
in={in\intitlepunct},
@@ -793,6 +825,15 @@
editorcn={\str@editorcn},
}
+ %
+ % 增加两个命令用于临时的局部的修改本地化字符串
+ % 其中\setlocalbibstring修改缩写字符串,setlocalbiblstring修改长字符串
+ % 注意使用时因为是局部修改,因此要将其与需要修改的引用命令放在一个编组符号内
+ % v1.0t,hzz,20190525
+ \newcommand{\setlocalbibstring}[2]{%
+ \csdef{abx@sstr@#1}{#2}}
+ \newcommand{\setlocalbiblstring}[2]{%
+ \csdef{abx@lstr@#1}{#2}}
%=====================================================================
% 动态数据修改
@@ -1787,7 +1828,7 @@
% 修改译者位置格式
%
% 原理方法:修改来自biblatex.def文件的bytranslator+others宏的格式
-\renewbibmacro*{bytranslator+others}{%
+\renewbibmacro*{bytranslator+others}{\bibauthorfont%
\ifnameundef{translator}
{}
{%\usebibmacro{bytranslator+othersstrg}
@@ -1808,7 +1849,7 @@
% v1.0O,20190103,hzz,修改利用新定义的一个分隔符strandothersdelim
%
% 原理方法:判断作者或译者是否中文,若中文用字符等,否则用et al. 。
-\renewbibmacro*{name:andothers}{%
+\renewbibmacro*{name:andothers}{\bibauthorfont%
\ifboolexpr{
test {\ifnumequal{\value{listcount}}{\value{liststop}}}
and
@@ -2470,7 +2511,8 @@ test{\iftoggle{iftlnine}}
%
% 调整doi+eprint+url格式
-%
+% 2016.07.01 byhzz
+% 2019.05.01 byhzz 在eprint前增加一个空格
% 原理方法:源来自standard.bbx,因为页码后面直接跟引用日期,没有标点所以去掉其中的标点。
\renewbibmacro*{doi+eprint+url}{%
% \iftoggle{bbx:doi}%把doi的位置放到url后面
@@ -2478,7 +2520,7 @@ test{\iftoggle{iftlnine}}
% {}%
%\newunit\newblock
\iftoggle{bbx:eprint}
- {\usebibmacro{eprint}}
+ {\iffieldundef{eprint}{}{\newunit\usebibmacro{eprint}}}
{}%
%\newunit\newblock
\iftoggle{bbx:url}
@@ -2621,7 +2663,7 @@ incollection,proceedings,inproceedings]{number}{%
%
% 对edition版本信息格式做出修改
%
-\DeclareFieldFormat{edition}{%源来自biblatex.DEF
+\DeclareFieldFormat{edition}{\bibtitlefont%源来自biblatex.DEF
\testCJKfirst{userd}%
\iftoggle{ifCJKforgbt}%
{\ifinteger{#1}%
@@ -2634,7 +2676,7 @@ incollection,proceedings,inproceedings]{number}{%
%
% 对version的版本信息做出修改
%
-\DeclareFieldFormat{version}{%源来自biblatex.DEF
+\DeclareFieldFormat{version}{\bibtitlefont%源来自biblatex.DEF
\testCJKfirst{userd}%
\ifinteger{#1}%
{\iftoggle{ifCJKforgbt}{\printtext{#1\str@edition}}%
@@ -2971,6 +3013,16 @@ incollection,proceedings,inproceedings]{number}{%
{\ifbibstring{#1}{\bibstring{#1}}{#1}}%
}
+%
+% 修改series域的输出格式
+% 2019.05.01,v1.0r,byhzz
+\renewbibmacro*{series+number}{%
+ \printfield{series}%
+ %\setunit*{\addspace}%
+ %\printfield{number}%
+ %\newunit
+ }
+
%=====================================================================
%设置驱动格式
%=====================================================================
@@ -3028,7 +3080,7 @@ incollection,proceedings,inproceedings]{number}{%
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
- \usebibmacro{finentry}}
+ \usebibmacro{finentry}\usebibmacro{annotation}}
%
@@ -3075,7 +3127,7 @@ incollection,proceedings,inproceedings]{number}{%
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
- \usebibmacro{finentry}}
+ \usebibmacro{finentry}\usebibmacro{annotation}}
@@ -3113,7 +3165,7 @@ incollection,proceedings,inproceedings]{number}{%
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
- \usebibmacro{finentry}}
+ \usebibmacro{finentry}\usebibmacro{annotation}}
%
% 专利文献驱动
@@ -3156,7 +3208,7 @@ incollection,proceedings,inproceedings]{number}{%
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
- \usebibmacro{finentry}}
+ \usebibmacro{finentry}\usebibmacro{annotation}}
%
@@ -3203,7 +3255,7 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
- \usebibmacro{finentry}}
+ \usebibmacro{finentry}\usebibmacro{annotation}}
%
@@ -3253,7 +3305,7 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
- \usebibmacro{finentry}}
+ \usebibmacro{finentry}\usebibmacro{annotation}}
%
% 论文、手册类型驱动
@@ -3305,7 +3357,7 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
- \usebibmacro{finentry}}
+ \usebibmacro{finentry}\usebibmacro{annotation}}
%
% 备选类型驱动
@@ -3346,7 +3398,7 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
- \usebibmacro{finentry}}
+ \usebibmacro{finentry}\usebibmacro{annotation}}
%
@@ -3365,8 +3417,10 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{
\ifnameundef{editor}{}{\newunit}%
}{\newunit}%替换下一句
%\newunit\newblock
+\iffieldundef{series}{}{\usebibmacro{series+number}\setunit{\addcolon\addspace}}%为处理一些存在series的情况而增加
\usebibmacro{maintitle+booktitle}%
- \setunit{\addcolon}\printfield{volume}\printfield{number}%增加卷和册信息
+\iffieldundef{volume}{}{\setunit{\addcolon\addspace}\printfield{volume}}%
+\iffieldundef{number}{}{\setunit{\addcolon\addspace}\printfield{number}}%增加卷和册信息
\newunit\newblock%
% \usebibmacro{byeditor+others}%
% \newunit\newblock
@@ -3378,9 +3432,10 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{
% \printfield{part}}
% {}%
% \newunit
- \printfield{volumes}%
- \newunit\newblock
- \usebibmacro{series+number}}%
+% \printfield{volumes}%
+% \newunit\newblock
+% \usebibmacro{series+number}
+ }%
\newunit\newblock
%\printfield{note}%
%\newunit\newblock
@@ -3404,4 +3459,4 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
- \usebibmacro{finentry}}
+ \usebibmacro{finentry}\usebibmacro{annotation}}
diff --git a/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015.cbx b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015.cbx
index 949c37dca92..a62ca688b3c 100644
--- a/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015.cbx
+++ b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015.cbx
@@ -7,7 +7,7 @@
%% Released under the LaTeX Project Public License v1.3c or later
%% ---------------------------------------------------------------
%%
-\def\versionofgbtstyle{2019/03/28 v1.0r}
+\def\versionofgbtstyle{2019/08/28 v1.0s}
\ProvidesFile{gb7714-2015.cbx}[\versionofgbtstyle biblatex citation style]
%
@@ -66,20 +66,10 @@
%
% 定义upcite命令
% 20180604,v1.0l,hzz
+% 20190409,v1.0r,hzz
% 方法:对supercite增加[]
-\DeclareCiteCommand{\upcite}[\mkbibsuperbracket]%
- {\usebibmacro{cite:init}%
- \let\multicitedelim=\supercitedelim
- \iffieldundef{prenote}
- {}
- {\BibliographyWarning{Ignoring prenote argument}}%
- \iffieldundef{postnote}
- {}
- {\BibliographyWarning{Ignoring postnote argument}}}
- {\usebibmacro{citeindex}%
- \usebibmacro{cite:comp}}
- {}
- {\usebibmacro{cite:dump}}
+\newrobustcmd*{\upcite}{%
+ \cite}
%
% 重定义parencite命令,以满足标签带页码的国标要求
@@ -161,4 +151,129 @@
\printnames{labelname}\mkbibsuperscript{\mkbibbrackets{\usebibmacro{citeindex}%
\usebibmacro{cite}}}}
{\multicitedelim}
- {\usebibmacro{postnote}}
+ {\mkbibsuperscript{\printfield{postnote}}}
+
+
+%
+% 增加如下多个命令
+% 20190409,v1.0r,hzz
+% 方法:利用newcommand或newrobustcmd命令进行定义
+% 注意\citet和\citep命令之所以不用newrobustcmd,是为避免加载natbib模块后产生冲突
+\DeclareCiteCommand{\citet}%
+ {\usebibmacro{prenote}}
+ {\iffieldequalstr{userf}{cn}{\renewcommand*{\andothersdelim}{\addthinspace}}%\addthinspace
+ {\renewcommand*{\andothersdelim}{\addspace}}%
+ \printnames{labelname}\mkbibsuperscript{\mkbibbrackets{\usebibmacro{citeindex}%
+ \usebibmacro{cite}}}}
+ {\multicitedelim}
+ {\mkbibsuperscript{\printfield{postnote}}}
+
+
+\DeclareCiteCommand{\citep}[\mkbibsuperscript]%利用mkbibsuperbracket添加方括号
+ {[\usebibmacro{cite:init}%
+ \usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite:comp}}
+ {}
+ {\usebibmacro{cite:dump}]%
+ \printfield{postnote}}
+
+\newrobustcmd*{\citetns}%
+ {\textcite}
+
+\newrobustcmd*{\citepns}%
+ {\parencite}
+
+\newrobustcmd*{\inlinecite}%
+ {\parencite}
+
+%
+% 增加如下复数的命令,以符合biblatex的复数命令习惯
+% 20190430,v1.0r,hzz
+% citec和citecs命令是实现了[1]-[3]这样的压缩形式。
+% authornumcites是常用命令authornumcite的复数形式
+\DeclareFieldFormat{labelbracket}{\mkbibbrackets{#1}}
+
+\newbibmacro*{citec:comp:comp}{%
+ \ifboolexpr{
+ ( test {\iffieldundef{labelprefix}} and test {\ifundef\cbx@lastprefix} )
+ or
+ test {\iffieldequals{labelprefix}{\cbx@lastprefix}}
+ }
+ {\ifnumequal{\thefield{labelnumber}}{\value{cbx@tempcntb}}
+ {\savefield{entrykey}{\cbx@lastkey}%
+ \savefield{labelnumber}{\cbx@lastnumber}%
+ \addtocounter{cbx@tempcnta}{1}}
+ {\ifnumequal{\thefield{labelnumber}}{\value{cbx@tempcntb}-1}
+ {}
+ {\usebibmacro{citec:dump}%
+ \ifnumgreater{\value{cbx@tempcntb}}{-1}
+ {\multicitedelim}
+ {}%
+ \printtext[bibhyperref]{%
+ \printfield{labelprefix}%
+ \printtext[labelbracket]{\printfield{labelnumber}}}}}}
+ {\usebibmacro{cite:comp:end}}%
+ \setcounter{cbx@tempcntb}{\thefield{labelnumber}}%
+ \savefield{labelprefix}{\cbx@lastprefix}}
+
+\newbibmacro*{citec:comp}{%
+ \addtocounter{cbx@tempcntb}{1}%
+ \iffieldundef{shorthand}
+ {\ifbool{bbx:subentry}
+ {\iffieldundef{entrysetcount}
+ {\usebibmacro{citec:comp:comp}}
+ {\usebibmacro{cite:comp:inset}}}
+ {\usebibmacro{citec:comp:comp}}}
+ {\usebibmacro{cite:comp:shand}}}
+
+\newbibmacro*{citec:dump}{%
+ \ifnumgreater{\value{cbx@tempcnta}}{0}
+ {\ifnumgreater{\value{cbx@tempcnta}}{1}
+ {\bibrangedash}
+ {\multicitedelim}%
+ \bibhyperref[\cbx@lastkey]{%
+ \ifdef\cbx@lastprefix
+ {\printtext[labelprefix]{\cbx@lastprefix}}
+ {}%
+ \printtext[labelbracket]{\cbx@lastnumber}}}%labelnumber
+ {}%
+ \setcounter{cbx@tempcnta}{0}%
+ \global\undef\cbx@lastprefix}
+
+%\DeclareCiteCommand{\citec}[\mkbibsuperscript]%[\mkbibbrackets]
+% {\usebibmacro{cite:init}%
+% \usebibmacro{prenote}}
+% {\usebibmacro{citeindex}%
+% \usebibmacro{citec:comp}}
+% {}
+% {\usebibmacro{citec:dump}%
+% \usebibmacro{postnote}}
+
+%上面这个用于非压缩情况,这里考虑了压缩的情况
+\DeclareCiteCommand{\citec}[\mkbibsuperscript]%
+ {\ifnumless{\value{multicitecount}}{2}
+ {\usebibmacro{cite:init}%
+ \usebibmacro{prenote}}
+ {\iffieldundef{prenote}
+ {\iffieldundef{postnote}
+ {}
+ {\usebibmacro{citec:dump}%
+ \usebibmacro{cite:init}%
+ \setunit{\multicitedelim}}}
+ {\usebibmacro{citec:dump}%
+ \usebibmacro{cite:init}%
+ \setunit{\multicitedelim}%
+ \usebibmacro{prenote}}}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{citec:comp}}
+ {}
+ {\ifboolexpr{ test {\ifnumequal{\value{multicitecount}}{\value{multicitetotal}}}
+ or not test {\iffieldundef{postnote}}}
+ {\usebibmacro{citec:dump}%
+ \usebibmacro{postnote}}
+ {}}
+
+\DeclareMultiCiteCommand{\citecs}[\mkbibsuperscript]{\citec}{}
+
+\DeclareMultiCiteCommand{\authornumcites}[]{\authornumcite}{\multicitedelim}
diff --git a/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ay.bbx b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ay.bbx
index 593f17155a9..e0609f60a15 100644
--- a/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ay.bbx
+++ b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ay.bbx
@@ -10,7 +10,7 @@
%
% 版本和时间信息
%
-\def\versionofgbtstyle{2019/03/28 v1.0r}
+\def\versionofgbtstyle{2019/08/28 v1.0s}
\def\versionofbiblatex{\abx@version}
\ProvidesFile{gb7714-2015ay.bbx}[\versionofgbtstyle biblatex bibliography style]
%\RequireBiber[3]%显式指定用biber后端,当用bibtex时会报错,但其实不会影响编译,只是采用bibtex后无法达成格式需求
@@ -202,6 +202,28 @@
% 设置宏包选项
%=====================================================================
%
+ % 增加一个控制是否输出annotation域的选项,该域可以用于在文献条目后面输出一些注释信息
+ % 20190509,v1,0s,hzz
+ \newtoggle{bbx:gbannote}
+ \DeclareBibliographyOption{gbannote}[false]{%biblatex低版本
+ \settoggle{bbx:gbannote}{#1}}
+ \ExecuteBibliographyOptions{gbannote}
+ %
+ %用于在文献条目后面输出注释信息的宏
+ %FieldFormat{annotation}用于设置注释信息的格式
+ \DeclareFieldFormat{annotation}{%
+ \printtext{\addspace(#1)}%
+ }
+ \renewbibmacro*{annotation}{%
+ \iftoggle{bbx:gbannote}%
+ {\iffieldundef{annotation}%
+ {\printfile[annotation]{\bibannotationprefix\thefield{entrykey}.tex}}%
+ {\printfield{annotation}}}%
+ {}%
+ }
+
+
+ %
% 增加一个控制是否输出type域的选项
% 20190212,v1,0q,hzz
\newtoggle{bbx:gbfieldtype}
@@ -210,6 +232,14 @@
\ExecuteBibliographyOptions{gbfieldtype}
%
+ % 增加一个控制是否根据页码重设脚注数字标号的选项
+ % 20190422,v1,0r,hzz
+ \newtoggle{bbx:gbfnperpage}
+ \DeclareBibliographyOption{gbfnperpage}[false]{%
+ \settoggle{bbx:gbfnperpage}{#1}}
+ \ExecuteBibliographyOptions{gbfnperpage}
+
+ %
% 增加一个选项,用于控制是否实现GB/T 7714-2015标准的脚注文献表
% 20190203,v1.0p,hzz
% 原理方法:默认做patch,文献引用带圈上标数字表示,脚注中的文献用带圈非上标数字做标签
@@ -241,7 +271,9 @@
%重新实现脚注的根据单页重设脚注号码
%重新实现脚注的悬挂对齐问题,不再使用footmisc,直接从latex核心代码和hyperref代码进行修改
%v1.0q 20190317 hzz
- \@addtoreset{footnote}{page}%重设计数器
+ %v1.0r 20190422 hzz 根据gbfnperpage选项设置
+ \iftoggle{bbx:gbfnperpage}%
+ {\@addtoreset{footnote}{page}}{}%重设计数器
\@ifpackageloaded{hyperref}{%加载hyperref则对\H@@footnotetext做重定义
\long\def\H@@footnotetext##1{\insert\footins{%
@@ -326,16 +358,16 @@
%v1.0q 20190309 区分使脚注标注适应minipage中的情况
\newbibmacro*{citesavefn}{%
\ifciteseen%当被引用过为true
- {\ifcsdef{sec\arabic{refsection}et\thefield{entrykey}}%当已经定义过脚注序号信息
- {\csgdef{labelsec\arabic{refsection}et\thefield{entrykey}}{%
- \str@sameentry\gdef\@thefnmark{\csuse{sec\arabic{refsection}et\thefield{entrykey}}}%
+ {\ifcsdef{sec\arabic{refsection}\arabic{page}et\thefield{entrykey}}%当已经定义过脚注序号信息
+ {\csgdef{labelsec\arabic{refsection}\arabic{page}et\thefield{entrykey}}{%
+ \str@sameentry\gdef\@thefnmark{\csuse{sec\arabic{refsection}\arabic{page}et\thefield{entrykey}}}%
\@makefnmark%
}}%
- {\csxdef{sec\arabic{refsection}et\thefield{entrykey}}{%
+ {\csxdef{sec\arabic{refsection}\arabic{page}et\thefield{entrykey}}{%
\ifcsstring{@mpfn}{mpfootnote}{\@alph\c@mpfootnote}{\thefootnote}%
}}%
}%
- {\csxdef{sec\arabic{refsection}et\thefield{entrykey}}{%
+ {\csxdef{sec\arabic{refsection}\arabic{page}et\thefield{entrykey}}{%
\ifcsstring{@mpfn}{mpfootnote}{\@alph\c@mpfootnote}{\thefootnote}%
%判断在minipage中比较麻烦,这里使用\@mpfn的定义进行判断
}}%
@@ -352,8 +384,8 @@
{}{\setunit{\addcolon\addspace}\printtext{\thefield{postnote}}}}%由于ay样式中没有修改postnote域,此处因为格式需要不使用默认域格式
}%
{\usebibmacro{citesavefn}%
- \ifcsdef{labelsec\arabic{refsection}et\thefield{entrykey}}%
- {\csuse{labelsec\arabic{refsection}et\thefield{entrykey}}\nopunct}%
+ \ifcsdef{labelsec\arabic{refsection}\arabic{page}et\thefield{entrykey}}%
+ {\csuse{labelsec\arabic{refsection}\arabic{page}et\thefield{entrykey}}\nopunct}%
{\usedriver{\DeclareNameAlias{sortname}{default}}{\thefield{entrytype}}}%
}%
{\multicitedelim}%
@@ -718,6 +750,16 @@
}
%
+% 针对3.13<=biblatex版本的选项设置,因为内容有限,所以不再增加版本区分,而用时间直接判断
+%
+% 解决国标中“王临慧, 2010a.”和“王临慧, 等, 2010b.”的问题
+% 在没有这个选项之前无法加上a和b
+% v1.0s,20190828
+\@ifpackagelater{biblatex}{2019/08/16}{%
+ \ExecuteBibliographyOptions{%
+ nohashothers=true}}{}
+
+%
% 根据biblatex版本信息,选择选项设置
%
% 原理方法:如下这种选择机制能自动兼容更新的版本,但对于老版本
@@ -772,7 +814,7 @@
%andothers = {et al.}, %将超过3个人名的省略,et al.改成为 等
andotherscn = {\str@andotherscn},%将超过3个人名的省略,et al.改成为 等
andothersincitecn={\str@andotherscn},%将标注中的分开,便于与文献表中的区分
- andothersincite={et al.},
+ andothersincite={et al\adddot},
backrefpage = {\str@backrefpage:},
backrefpages = {\str@backrefpages:},
in={in\intitlepunct},
@@ -788,8 +830,17 @@
phdthesiscn={\str@phdthesiscn},
editorscn={\str@editorcn},
editorcn={\str@editorcn},
-}
+ }
+ %
+ % 增加两个命令用于临时的局部的修改本地化字符串
+ % 其中\setlocalbibstring修改缩写字符串,setlocalbiblstring修改长字符串
+ % 注意使用时因为是局部修改,因此要将其与需要修改的引用命令放在一个编组符号内
+ % v1.0t,hzz,20190525
+ \newcommand{\setlocalbibstring}[2]{%
+ \csdef{abx@sstr@#1}{#2}}
+ \newcommand{\setlocalbiblstring}[2]{%
+ \csdef{abx@lstr@#1}{#2}}
%=====================================================================
% 动态数据修改
@@ -2006,7 +2057,7 @@ test {\iftoggle{iftlseven}}%biblatex<=3.7
% 而不用对每一个引用命令单独设置,比如cite,parancite,textcite都设置
\DeclareDelimFormat{finalnamedelim}{%
\ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}%
- \addspace%
+% \addspace%
\edef\userfieldabcde{userd}%
\ifcurrentname{translator}{\edef\userfieldabcde{usere}}{}%
\ifcurrentname{editor}{\edef\userfieldabcde{userc}}{}%
@@ -2016,14 +2067,14 @@ test {\iftoggle{iftlseven}}%biblatex<=3.7
\iffieldequalstr{\userfieldabcde}{chinese}{\bibstring{andincitecn}}{}%
\iffieldequalstr{\userfieldabcde}{korean}{\bibstring{andkr}}{}%
\iffieldequalstr{\userfieldabcde}{japanese}{\bibstring{andjp}}{}%
- \iffieldequalstr{\userfieldabcde}{english}{\bibstring{andincite}}{}%
- \iffieldequalstr{\userfieldabcde}{french}{\bibstring{and}}{}%
- \iffieldequalstr{\userfieldabcde}{russian}{\bibstring{and}}{}%
-\space%
+ \iffieldequalstr{\userfieldabcde}{english}{\space\bibstring{andincite}\space}{}%
+ \iffieldequalstr{\userfieldabcde}{french}{\space\bibstring{and}\space}{}%
+ \iffieldequalstr{\userfieldabcde}{russian}{\space\bibstring{and}\space}{}%
+%\space%
\or%
- \bibstring{andincitecn}\space%
+ \bibstring{andincitecn}%\space%
\or%
- \bibstring{andincite}\space%
+\space\bibstring{andincite}\space%
\fi}
\DeclareDelimFormat[bib,biblist]{finalnamedelim}{%
@@ -2616,7 +2667,7 @@ test{\iftoggle{iftlnine}}
% {}%
%\newunit\newblock
\iftoggle{bbx:eprint}
- {\usebibmacro{eprint}}
+ {\iffieldundef{eprint}{}{\newunit\usebibmacro{eprint}}}%必须要做域判断否则容易产生多余的标点
{}%
%\newunit\newblock
\iftoggle{bbx:url}
@@ -2904,7 +2955,8 @@ incollection,proceedings,inproceedings]{number}{%
\iffieldundef{labelyear}
{}
{}}%[parens]\printtext{\printlabeldateextra}
-\renewbibmacro*{bbx:ifmergeddate}{\@secondoftwo}%
+\renewbibmacro*{bbx:ifmergeddate}{\@secondoftwo}%这一句用于3.12版本
+\renewbibmacro*{date}{\printdate}%这一句用于biblatex3.11以下版本
\renewbibmacro*{issue+date}{%去掉括号
\setunit{\addcomma\addspace}%
\printtext{%去掉了[parens]
@@ -2922,7 +2974,8 @@ incollection,proceedings,inproceedings]{number}{%
{\usebibmacro{date}}%
}}}%
%\newunit
- }}
+ }%
+ }
\iftoggle{iftlfive}{\switchversion{3.0}{dateextra}}{}%biblatex<=3.2
\iftoggle{iftlsix}{\switchversion{3.4}{dateextra}}{}%3.3<=biblatex<=3.6
@@ -3287,6 +3340,17 @@ test {\ifentrytype{conference}}
{\ifbibstring{#1}{\bibstring{#1}}{#1}}%
}
+
+%
+% 修改series域的输出格式
+% 2019.05.01,v1.0r,byhzz
+\renewbibmacro*{series+number}{%
+ \printfield{series}%
+ %\setunit*{\addspace}%
+ %\printfield{number}%
+ %\newunit
+ }
+
%=====================================================================
%设置驱动格式
%=====================================================================
@@ -3344,7 +3408,7 @@ test {\ifentrytype{conference}}
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
- \usebibmacro{finentry}}
+ \usebibmacro{finentry}\usebibmacro{annotation}}
@@ -3393,7 +3457,7 @@ test {\ifentrytype{conference}}
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
- \usebibmacro{finentry}}
+ \usebibmacro{finentry}\usebibmacro{annotation}}
%
@@ -3430,7 +3494,7 @@ test {\ifentrytype{conference}}
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
- \usebibmacro{finentry}}
+ \usebibmacro{finentry}\usebibmacro{annotation}}
%
% 专利文献驱动
@@ -3473,7 +3537,7 @@ test {\ifentrytype{conference}}
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
- \usebibmacro{finentry}}
+ \usebibmacro{finentry}\usebibmacro{annotation}}
%
@@ -3520,7 +3584,7 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
- \usebibmacro{finentry}}
+ \usebibmacro{finentry}\usebibmacro{annotation}}
@@ -3572,7 +3636,7 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
- \usebibmacro{finentry}}
+ \usebibmacro{finentry}\usebibmacro{annotation}}
%
% 论文、手册类型驱动
@@ -3625,7 +3689,7 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
- \usebibmacro{finentry}}
+ \usebibmacro{finentry}\usebibmacro{annotation}}
%
% 备选类型驱动
@@ -3666,7 +3730,7 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
- \usebibmacro{finentry}}
+ \usebibmacro{finentry}\usebibmacro{annotation}}
@@ -3688,8 +3752,10 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{
\ifnameundef{editor}{}{\newunit}%
}{\newunit}%替换下一句
%\newunit\newblock
+\iffieldundef{series}{}{\usebibmacro{series+number}\setunit{\addcolon\addspace}}%为处理一些存在series的情况而增加
\usebibmacro{maintitle+booktitle}%
- \setunit{\addcolon}\printfield{volume}\printfield{number}%增加卷和册信息
+\iffieldundef{volume}{}{\setunit{\addcolon\addspace}\printfield{volume}}%
+\iffieldundef{number}{}{\setunit{\addcolon\addspace}\printfield{number}}%增加卷和册信息
\newunit\newblock%
% \usebibmacro{byeditor+others}%
% \newunit\newblock
@@ -3701,9 +3767,10 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{
% \printfield{part}}
% {}%
% \newunit
- \printfield{volumes}%
- \newunit\newblock
- \usebibmacro{series+number}}%
+% \printfield{volumes}%
+% \newunit\newblock
+% \usebibmacro{series+number}
+ }%
\newunit\newblock
%\printfield{note}%
%\newunit\newblock
@@ -3727,4 +3794,4 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
- \usebibmacro{finentry}}
+ \usebibmacro{finentry}\usebibmacro{annotation}}
diff --git a/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ay.cbx b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ay.cbx
index 3c35d2891d8..9b9adf9b141 100644
--- a/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ay.cbx
+++ b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ay.cbx
@@ -7,7 +7,7 @@
%% Released under the LaTeX Project Public License v1.3c or later
%% ---------------------------------------------------------------
%%
-\def\versionofgbtstyle{2019/03/28 v1.0r}
+\def\versionofgbtstyle{2019/08/28 v1.0s}
\ProvidesFile{gb7714-2015ay.cbx}[\versionofgbtstyle biblatex citation style]
%
@@ -102,13 +102,10 @@ test {\iftoggle{iftlseven}}%3.7=biblatex
%
% 定义upcite命令
% 20180604,v1.0l,hzz
-% 方法:与yearcite命令相同
-\DeclareCiteCommand{\upcite}%仅输出年份,不要页码
- {\usebibmacro{cite:init}%
- \printtext{(}\usebibmacro{prenote}}%
- {\usebibmacro{cite:labeldate+extradate}}%\printfield{year}\printfield{extrayear}
- {\multicitedelim}%
- {\printtext{)}}
+% 20190409,v1.0r,hzz
+% 方法:与cite命令相同
+\newrobustcmd*{\upcite}{%
+ \cite}
%
% 重定义parencite命令
@@ -177,8 +174,67 @@ test {\iftoggle{iftlseven}}%3.7=biblatex
%
% 定义\authornumcite命令,输出作者信息,然后在后面带上顺序编码
% 20180427,v1.0k,增加,hzz
-% 为与顺序编码制兼容,增加了命令,定义与cite相同
-\DeclareCiteCommand{\authornumcite}
+% 20190409,v1.0r,hzz
+% 为与顺序编码制兼容,增加了命令,定义与citet相同
+\newbibmacro*{citet}{%
+ \iffieldundef{shorthand}
+ {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}
+ {\usebibmacro{cite:label}%
+ \setunit{\printdelim{nonameyeardelim}}%
+ \usebibmacro{cite:labeldate+extradate}%
+ \usebibmacro{cite:reinit}}
+ {\iffieldequals{namehash}{\cbx@lasthash}
+ {\ifthenelse{\iffieldequals{labelyear}{\cbx@lastyear}\AND
+ \(\value{multicitecount}=0\OR\iffieldundef{postnote}\)}
+ {\setunit{\addcomma}%
+ \usebibmacro{cite:extradate}}
+ {\setunit{\compcitedelim}%
+ \usebibmacro{cite:labeldate+extradate}%
+ \savefield{labelyear}{\cbx@lastyear}}}
+ {\printnames{labelname}%
+ %\setunit{\printdelim{nameyeardelim}}%
+ (\usebibmacro{cite:labeldate+extradate})%
+ \savefield{namehash}{\cbx@lasthash}%
+ \savefield{labelyear}{\cbx@lastyear}}}}
+ {\usebibmacro{cite:shorthand}%
+ \usebibmacro{cite:reinit}}%
+ \setunit{\multicitedelim}}
+
+\DeclareCiteCommand{\authornumcite}%
+ {\usebibmacro{cite:init}%
+ \renewbibmacro*{postnote}{%
+ \iffieldundef{postnote}%
+ {}%
+ {\thefield{postnote}}}%
+ \usebibmacro{prenote}}%
+ {\usebibmacro{citeindex}%
+ \usebibmacro{citet}}
+ {}
+ {\mkbibsuperscript{\usebibmacro{postnote}}%\usebibmacro{postnote}
+ }
+
+%
+% 增加如下多个命令
+% 20190409,v1.0r,hzz
+% 方法:利用newcommand或newrobustcmd命令进行定义
+% 注意\citet和\citep命令之所以不用newrobustcmd,是为避免加载natbib模块后产生冲突
+
+%同\authornumcite
+\DeclareCiteCommand{\citet}%
+ {\usebibmacro{cite:init}%
+ \renewbibmacro*{postnote}{%
+ \iffieldundef{postnote}%
+ {}%
+ {\thefield{postnote}}}%
+ \usebibmacro{prenote}}%
+ {\usebibmacro{citeindex}%
+ \usebibmacro{citet}}
+ {}
+ {\mkbibsuperscript{\usebibmacro{postnote}}%\usebibmacro{postnote}
+ }
+
+%同cite
+\DeclareCiteCommand{\citep}
{\usebibmacro{cite:init}%
\renewbibmacro*{postnote}{%
\iffieldundef{postnote}%
@@ -191,3 +247,25 @@ test {\iftoggle{iftlseven}}%3.7=biblatex
{%(
)\mkbibsuperscript{\usebibmacro{postnote}}%\usebibmacro{postnote}
}
+
+\newrobustcmd*{\citetns}%
+ {\textcite}
+
+\newrobustcmd*{\citepns}%
+ {\parencite}
+
+\newrobustcmd*{\inlinecite}%
+ {\parencite}
+
+
+%
+% 增加如下复数的命令,以符合biblatex的复数命令习惯
+% 20190430,v1.0r,hzz
+% citec和citecs命令是为了兼容顺序编码制。
+% authornumcites是常用命令authornumcite的复数形式
+\newrobustcmd*{\citec}%
+ {\cite}
+
+\DeclareMultiCiteCommand{\citecs}[]{\cite}{\multicitedelim}
+
+\DeclareMultiCiteCommand{\authornumcites}[]{\authornumcite}{\multicitedelim}
diff --git a/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ms.bbx b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ms.bbx
index 186f5577869..13d158fd938 100644
--- a/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ms.bbx
+++ b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ms.bbx
@@ -11,7 +11,7 @@
%
% 版本和时间信息
%
-\def\versionofgbtstyle{2019/03/28 v1.0r}
+\def\versionofgbtstyle{2019/08/28 v1.0s}
\def\versionofbiblatex{\abx@version}
\ProvidesFile{gb7714-2015ms.bbx}[\versionofgbtstyle biblatex bibliography style]
%\RequireBiber[3]%显式指定用biber后端,当用bibtex时会报错,但其实不会影响编译,只是采用bibtex后无法达成格式需求
@@ -93,6 +93,28 @@
% 设置宏包选项
%=====================================================================
%
+ % 增加一个控制是否输出annotation域的选项,该域可以用于在文献条目后面输出一些注释信息
+ % 20190509,v1,0s,hzz
+ \newtoggle{bbx:gbannote}
+ \DeclareBibliographyOption{gbannote}[false]{%biblatex低版本
+ \settoggle{bbx:gbannote}{#1}}
+ \ExecuteBibliographyOptions{gbannote}
+ %
+ %用于在文献条目后面输出注释信息的宏
+ %FieldFormat{annotation}用于设置注释信息的格式
+ \DeclareFieldFormat{annotation}{%
+ \printtext{\addspace(#1)}%
+ }
+ \renewbibmacro*{annotation}{%
+ \iftoggle{bbx:gbannote}%
+ {\iffieldundef{annotation}%
+ {\printfile[annotation]{\bibannotationprefix\thefield{entrykey}.tex}}%
+ {\printfield{annotation}}}%
+ {}%
+ }
+
+
+ %
% 增加一个控制是否输出type域的选项
% 20190212,v1,0q,hzz
\newtoggle{bbx:gbfieldtype}
@@ -101,6 +123,14 @@
\ExecuteBibliographyOptions{gbfieldtype}
%
+ % 增加一个控制是否根据页码重设脚注数字标号的选项
+ % 20190422,v1,0r,hzz
+ \newtoggle{bbx:gbfnperpage}
+ \DeclareBibliographyOption{gbfnperpage}[false]{%
+ \settoggle{bbx:gbfnperpage}{#1}}
+ \ExecuteBibliographyOptions{gbfnperpage}
+
+ %
% 增加一个选项,用于控制是否实现GB/T 7714-2015标准的脚注文献表
% 20190203,v1.0p,hzz
% 原理方法:默认做patch,文献引用带圈上标数字表示,脚注中的文献用带圈非上标数字做标签
@@ -132,7 +162,9 @@
%重新实现脚注的根据单页重设脚注号码
%重新实现脚注的悬挂对齐问题,不再使用footmisc,直接从latex核心代码和hyperref代码进行修改
%v1.0q 20190317 hzz
- \@addtoreset{footnote}{page}%重设计数器
+ %v1.0r 20190422 hzz 根据gbfnperpage选项设置
+ \iftoggle{bbx:gbfnperpage}%
+ {\@addtoreset{footnote}{page}}{}%重设计数器
\@ifpackageloaded{hyperref}{%加载hyperref则对\H@@footnotetext做重定义
\long\def\H@@footnotetext##1{\insert\footins{%
@@ -218,16 +250,16 @@
%v1.0q 20190309 区分使脚注标注适应minipage中的情况
\newbibmacro*{citesavefn}{%
\ifciteseen%当被引用过为true
- {\ifcsdef{sec\arabic{refsection}et\thefield{entrykey}}%当已经定义过脚注序号信息
- {\csgdef{labelsec\arabic{refsection}et\thefield{entrykey}}{%
- \str@sameentry\gdef\@thefnmark{\csuse{sec\arabic{refsection}et\thefield{entrykey}}}%
+ {\ifcsdef{sec\arabic{refsection}\arabic{page}et\thefield{entrykey}}%当已经定义过脚注序号信息
+ {\csgdef{labelsec\arabic{refsection}\arabic{page}et\thefield{entrykey}}{%
+ \str@sameentry\gdef\@thefnmark{\csuse{sec\arabic{refsection}\arabic{page}et\thefield{entrykey}}}%
\@makefnmark%
}}%
- {\csxdef{sec\arabic{refsection}et\thefield{entrykey}}{%
+ {\csxdef{sec\arabic{refsection}\arabic{page}et\thefield{entrykey}}{%
\ifcsstring{@mpfn}{mpfootnote}{\@alph\c@mpfootnote}{\thefootnote}%
}}%
}%
- {\csxdef{sec\arabic{refsection}et\thefield{entrykey}}{%
+ {\csxdef{sec\arabic{refsection}\arabic{page}et\thefield{entrykey}}{%
\ifcsstring{@mpfn}{mpfootnote}{\@alph\c@mpfootnote}{\thefootnote}%
%判断在minipage中比较麻烦,这里使用\@mpfn的定义进行判断
}}%
@@ -244,8 +276,8 @@
{}{\setunit{\addcolon\addspace}\printfield{postnote}}}%与ay样式不同,由于已修改postnote域格式,直接用printfield
}%
{\usebibmacro{citesavefn}%
- \ifcsdef{labelsec\arabic{refsection}et\thefield{entrykey}}%
- {\csuse{labelsec\arabic{refsection}et\thefield{entrykey}}\nopunct}%
+ \ifcsdef{labelsec\arabic{refsection}\arabic{page}et\thefield{entrykey}}%
+ {\csuse{labelsec\arabic{refsection}\arabic{page}et\thefield{entrykey}}\nopunct}%
{\usedriver{\DeclareNameAlias{sortname}{default}}{\thefield{entrytype}}}%
}%
{\multicitedelim}%
@@ -571,7 +603,7 @@
%andothers = {et al.}, %将超过3个人名的省略,et al.改成为 等
andotherscn = {\str@andotherscn}, %将超过3个人名的省略,et al.改成为 等
andothersincitecn={\str@andotherscn},%将标注中的分开,便于与文献表中的区分
- andothersincite={et al.},
+ andothersincite={et al\adddot},
backrefpage = {\str@backrefpage:},
backrefpages = {\str@backrefpages:},
in={in\intitlepunct},
@@ -589,6 +621,15 @@
editorcn={\str@editorcn},
}
+ %
+ % 增加两个命令用于临时的局部的修改本地化字符串
+ % 其中\setlocalbibstring修改缩写字符串,setlocalbiblstring修改长字符串
+ % 注意使用时因为是局部修改,因此要将其与需要修改的引用命令放在一个编组符号内
+ % v1.0t,hzz,20190525
+ \newcommand{\setlocalbibstring}[2]{%
+ \csdef{abx@sstr@#1}{#2}}
+ \newcommand{\setlocalbiblstring}[2]{%
+ \csdef{abx@lstr@#1}{#2}}
%=====================================================================
% 动态数据修改
@@ -1663,6 +1704,16 @@
\fi}%
+%
+% 修改series域的输出格式
+% 2019.05.01,v1.0r,byhzz
+\renewbibmacro*{series+number}{%
+ \printfield{series}%
+ %\setunit*{\addspace}%
+ %\printfield{number}%
+ %\newunit
+ }
+
%=====================================================================
%设置驱动格式
%=====================================================================
@@ -1847,7 +1898,7 @@ togl{bbx:gbstyle} or test {\iffieldequalstr{userd}{chinese}}%
% {}%
%\newunit\newblock
\iftoggle{bbx:eprint}
- {\usebibmacro{eprint}}
+ {\iffieldundef{eprint}{}{\newunit\usebibmacro{eprint}}}
{}%
%\newunit\newblock
\iftoggle{bbx:url}
@@ -2284,7 +2335,7 @@ incollection,proceedings,inproceedings]{number}{%
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
- \usebibmacro{finentry}}%
+ \usebibmacro{finentry}\usebibmacro{annotation}}%
%
% 期刊文章,连续出版物中的析出文献的格式
%
@@ -2329,7 +2380,7 @@ incollection,proceedings,inproceedings]{number}{%
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
- \usebibmacro{finentry}}%
+ \usebibmacro{finentry}\usebibmacro{annotation}}%
%
% 连续出版物的驱动
%
@@ -2364,7 +2415,7 @@ incollection,proceedings,inproceedings]{number}{%
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
- \usebibmacro{finentry}}%
+ \usebibmacro{finentry}\usebibmacro{annotation}}%
%
% 专利文献驱动
%
@@ -2406,7 +2457,7 @@ incollection,proceedings,inproceedings]{number}{%
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
- \usebibmacro{finentry}}%
+ \usebibmacro{finentry}\usebibmacro{annotation}}%
%
% 在线文献驱动
%
@@ -2451,7 +2502,7 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
- \usebibmacro{finentry}}%
+ \usebibmacro{finentry}\usebibmacro{annotation}}%
%
% 报告类型驱动
% 2016-11-11,增加了译者信息
@@ -2499,7 +2550,7 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
- \usebibmacro{finentry}}%
+ \usebibmacro{finentry}\usebibmacro{annotation}}%
%
% 手册类型驱动
% 2016-11-11,增加了译者信息
@@ -2551,7 +2602,7 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
- \usebibmacro{finentry}}%
+ \usebibmacro{finentry}\usebibmacro{annotation}}%
%
% 备选类型驱动
%
@@ -2591,7 +2642,7 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
- \usebibmacro{finentry}}%
+ \usebibmacro{finentry}\usebibmacro{annotation}}%
%
% 专著中的析出文献的格式修改
%
@@ -2608,8 +2659,10 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{
\ifnameundef{editor}{}{\newunit}%
}{\newunit}%替换下一句
%\newunit\newblock
+\iffieldundef{series}{}{\usebibmacro{series+number}\setunit{\addcolon\addspace}}%为处理一些存在series的情况而增加
\usebibmacro{maintitle+booktitle}%
- \setunit{\addcolon}\printfield{volume}\printfield{number}%增加卷和册信息
+\iffieldundef{volume}{}{\setunit{\addcolon\addspace}\printfield{volume}}%
+\iffieldundef{number}{}{\setunit{\addcolon\addspace}\printfield{number}}%增加卷和册信息
\newunit\newblock%
% \usebibmacro{byeditor+others}%
% \newunit\newblock
@@ -2621,9 +2674,10 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{
% \printfield{part}}
% {}%
% \newunit
- \printfield{volumes}%
- \newunit\newblock
- \usebibmacro{series+number}}%
+% \printfield{volumes}%
+% \newunit\newblock
+% \usebibmacro{series+number}
+ }%
\newunit\newblock
%\printfield{note}%
%\newunit\newblock
@@ -2647,7 +2701,7 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
- \usebibmacro{finentry}}%
+ \usebibmacro{finentry}\usebibmacro{annotation}}%
}{}%
}
diff --git a/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ms.cbx b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ms.cbx
index 361f9d73a31..8c19244e17b 100644
--- a/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ms.cbx
+++ b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ms.cbx
@@ -7,8 +7,8 @@
%% Released under the LaTeX Project Public License v1.3c or later
%% ---------------------------------------------------------------
%%
-\def\versionofgbtstyle{2019/03/28 v1.0r}
-\ProvidesFile{gb7714-2015.cbx}[\versionofgbtstyle biblatex citation style]
+\def\versionofgbtstyle{2019/08/28 v1.0s}
+\ProvidesFile{gb7714-2015ms.cbx}[\versionofgbtstyle biblatex citation style]
%
% 加载标准样式
@@ -66,20 +66,10 @@
%
% 定义upcite命令
% 20180604,v1.0l,hzz
+% 20190409,v1.0r,hzz
% 方法:对supercite增加[]
-\DeclareCiteCommand{\upcite}[\mkbibsuperbracket]
- {\usebibmacro{cite:init}
- \let\multicitedelim=\supercitedelim
- \iffieldundef{prenote}
- {}
- {\BibliographyWarning{Ignoring prenote argument}}%
- \iffieldundef{postnote}
- {}
- {\BibliographyWarning{Ignoring postnote argument}}}
- {\usebibmacro{citeindex}%
- \usebibmacro{cite:comp}}
- {}
- {\usebibmacro{cite:dump}}
+\newrobustcmd*{\upcite}{%
+ \cite}
%
% 重定义parencite命令,以满足标签带页码的国标要求
@@ -163,4 +153,38 @@
\printnames{labelname}\mkbibsuperscript{\mkbibbrackets{\usebibmacro{citeindex}%
\usebibmacro{cite}}}}
{\multicitedelim}
- {\usebibmacro{postnote}}
+ {\mkbibsuperscript{\printfield{postnote}}}
+
+
+%
+% 增加如下多个命令
+% 20190409,v1.0r,hzz
+% 方法:利用newcommand或newrobustcmd命令进行定义
+% 注意\citet和\citep命令之所以不用newrobustcmd,是为避免加载natbib模块后产生冲突
+\DeclareCiteCommand{\citet}%
+ {\usebibmacro{prenote}}
+ {\iffieldequalstr{userf}{cn}{\renewcommand*{\andothersdelim}{\addthinspace}}%\addthinspace
+ {\renewcommand*{\andothersdelim}{\addspace}}%
+ \printnames{labelname}\mkbibsuperscript{\mkbibbrackets{\usebibmacro{citeindex}%
+ \usebibmacro{cite}}}}
+ {\multicitedelim}
+ {\mkbibsuperscript{\printfield{postnote}}}
+
+
+\DeclareCiteCommand{\citep}[\mkbibsuperscript]%利用mkbibsuperbracket添加方括号
+ {[\usebibmacro{cite:init}%
+ \usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite:comp}}
+ {}
+ {\usebibmacro{cite:dump}]%
+ \printfield{postnote}}
+
+\newrobustcmd*{\citetns}%
+ {\textcite}
+
+\newrobustcmd*{\citepns}%
+ {\parencite}
+
+\newrobustcmd*{\inlinecite}%
+ {\parencite}
diff --git a/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015mx.bbx b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015mx.bbx
index 7b043ea65b6..d92ac1daf92 100644
--- a/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015mx.bbx
+++ b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015mx.bbx
@@ -11,7 +11,7 @@
%
% 版本和时间信息
%
-\def\versionofgbtstyle{2019/03/28 v1.0r}
+\def\versionofgbtstyle{2019/08/28 v1.0s}
\def\versionofbiblatex{\abx@version}
\ProvidesFile{gb7714-2015mx.bbx}[\versionofgbtstyle biblatex bibliography style]
%\RequireBiber[3]%显式指定用biber后端,当用bibtex时会报错,但其实不会影响编译,只是采用bibtex后无法达成格式需求
@@ -27,6 +27,28 @@
% 功能函数
%=====================================================================
%
+ % 增加一个控制是否输出annotation域的选项,该域可以用于在文献条目后面输出一些注释信息
+ % 20190509,v1,0s,hzz
+ \newtoggle{bbx:gbannote}
+ \DeclareBibliographyOption{gbannote}[false]{%biblatex低版本
+ \settoggle{bbx:gbannote}{#1}}
+ \ExecuteBibliographyOptions{gbannote}
+ %
+ %用于在文献条目后面输出注释信息的宏
+ %FieldFormat{annotation}用于设置注释信息的格式
+ \DeclareFieldFormat{annotation}{%
+ \printtext{\addspace(#1)}%
+ }
+ \renewbibmacro*{annotation}{%
+ \iftoggle{bbx:gbannote}%
+ {\iffieldundef{annotation}%
+ {\printfile[annotation]{\bibannotationprefix\thefield{entrykey}.tex}}%
+ {\printfield{annotation}}}%
+ {}%
+ }
+
+
+ %
% biblatex版本判断
% 20180629,v1.0k,hzz
%
@@ -104,6 +126,14 @@
\ExecuteBibliographyOptions{gbfieldtype}
%
+ % 增加一个控制是否根据页码重设脚注数字标号的选项
+ % 20190422,v1,0r,hzz
+ \newtoggle{bbx:gbfnperpage}
+ \DeclareBibliographyOption{gbfnperpage}[false]{%
+ \settoggle{bbx:gbfnperpage}{#1}}
+ \ExecuteBibliographyOptions{gbfnperpage}
+
+ %
% 增加一个选项,用于控制是否实现GB/T 7714-2015标准的脚注文献表
% 20190203,v1.0p,hzz
% 原理方法:默认做patch,文献引用带圈上标数字表示,脚注中的文献用带圈非上标数字做标签
@@ -135,7 +165,9 @@
%重新实现脚注的根据单页重设脚注号码
%重新实现脚注的悬挂对齐问题,不再使用footmisc,直接从latex核心代码和hyperref代码进行修改
%v1.0q 20190317 hzz
- \@addtoreset{footnote}{page}%重设计数器
+ %v1.0r 20190422 hzz 根据gbfnperpage选项设置
+ \iftoggle{bbx:gbfnperpage}%
+ {\@addtoreset{footnote}{page}}{}%重设计数器
\@ifpackageloaded{hyperref}{%加载hyperref则对\H@@footnotetext做重定义
\long\def\H@@footnotetext##1{\insert\footins{%
@@ -221,16 +253,16 @@
%v1.0q 20190309 区分使脚注标注适应minipage中的情况
\newbibmacro*{citesavefn}{%
\ifciteseen%当被引用过为true
- {\ifcsdef{sec\arabic{refsection}et\thefield{entrykey}}%当已经定义过脚注序号信息
- {\csgdef{labelsec\arabic{refsection}et\thefield{entrykey}}{%
- \str@sameentry\gdef\@thefnmark{\csuse{sec\arabic{refsection}et\thefield{entrykey}}}%
+ {\ifcsdef{sec\arabic{refsection}\arabic{page}et\thefield{entrykey}}%当已经定义过脚注序号信息
+ {\csgdef{labelsec\arabic{refsection}\arabic{page}et\thefield{entrykey}}{%
+ \str@sameentry\gdef\@thefnmark{\csuse{sec\arabic{refsection}\arabic{page}et\thefield{entrykey}}}%
\@makefnmark%
}}%
- {\csxdef{sec\arabic{refsection}et\thefield{entrykey}}{%
+ {\csxdef{sec\arabic{refsection}\arabic{page}et\thefield{entrykey}}{%
\ifcsstring{@mpfn}{mpfootnote}{\@alph\c@mpfootnote}{\thefootnote}%
}}%
}%
- {\csxdef{sec\arabic{refsection}et\thefield{entrykey}}{%
+ {\csxdef{sec\arabic{refsection}\arabic{page}et\thefield{entrykey}}{%
\ifcsstring{@mpfn}{mpfootnote}{\@alph\c@mpfootnote}{\thefootnote}%
%判断在minipage中比较麻烦,这里使用\@mpfn的定义进行判断
}}%
@@ -247,8 +279,8 @@
{}{\setunit{\addcolon\addspace}\printtext{\thefield{postnote}}}}%由于ay样式中没有修改postnote域,此处因为格式需要不使用默认域格式
}%
{\usebibmacro{citesavefn}%
- \ifcsdef{labelsec\arabic{refsection}et\thefield{entrykey}}%
- {\csuse{labelsec\arabic{refsection}et\thefield{entrykey}}}%\nopunct
+ \ifcsdef{labelsec\arabic{refsection}\arabic{page}et\thefield{entrykey}}%
+ {\csuse{labelsec\arabic{refsection}\arabic{page}et\thefield{entrykey}}}%\nopunct
{\usedriver{\DeclareNameAlias{sortname}{default}}{\thefield{entrytype}}}%
}%
{\multicitedelim}%
@@ -567,6 +599,15 @@
labeldateparts=true,
}
+%
+% 针对3.13<=biblatex版本的选项设置,因为内容有限,所以不做版本区分,而用时间直接判断
+%
+% 解决国标中“王临慧, 2010a.”和“王临慧, 等, 2010b.”的问题
+% 在没有这个选项之前无法加上a和b
+% v1.0s,20190828
+\@ifpackagelater{biblatex}{2019/08/16}{%
+ \ExecuteBibliographyOptions{%
+ nohashothers=true}}{}
%=====================================================================
% 设置本地化字符串
@@ -613,7 +654,7 @@
%andothers = {et al.},%将超过3个人名的省略,et al.改成为 等
andotherscn = {\str@andotherscn},%将超过3个人名的省略,et al.改成为 等
andothersincitecn={\str@andotherscn},%将标注中的分开,便于与文献表中的区分
- andothersincite={et al.},
+ andothersincite={et al\adddot},
backrefpage = {\str@backrefpage:},
backrefpages = {\str@backrefpages:},
in={in\intitlepunct},
@@ -631,6 +672,15 @@
editorcn={\str@editorcn},
}
+ %
+ % 增加两个命令用于临时的局部的修改本地化字符串
+ % 其中\setlocalbibstring修改缩写字符串,setlocalbiblstring修改长字符串
+ % 注意使用时因为是局部修改,因此要将其与需要修改的引用命令放在一个编组符号内
+ % v1.0t,hzz,20190525
+ \newcommand{\setlocalbibstring}[2]{%
+ \csdef{abx@sstr@#1}{#2}}
+ \newcommand{\setlocalbiblstring}[2]{%
+ \csdef{abx@lstr@#1}{#2}}
%=====================================================================
% 动态数据修改
@@ -2104,7 +2154,7 @@
% {}%
%\newunit\newblock
\iftoggle{bbx:eprint}
- {\usebibmacro{eprint}}
+ {\iffieldundef{eprint}{}{\newunit\usebibmacro{eprint}}}
{}%
%\newunit\newblock
\iftoggle{bbx:url}
@@ -2598,6 +2648,17 @@ incollection,proceedings,inproceedings]{number}{%
{\ifbibstring{#1}{\bibstring{#1}}{#1}}%
}
+
+%
+% 修改series域的输出格式
+% 2019.05.01,v1.0r,byhzz
+\renewbibmacro*{series+number}{%
+ \printfield{series}%
+ %\setunit*{\addspace}%
+ %\printfield{number}%
+ %\newunit
+ }
+
%=====================================================================
%设置驱动格式
%=====================================================================
@@ -2655,7 +2716,7 @@ incollection,proceedings,inproceedings]{number}{%
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
- \usebibmacro{finentry}}
+ \usebibmacro{finentry}\usebibmacro{annotation}}
%
@@ -2702,7 +2763,7 @@ incollection,proceedings,inproceedings]{number}{%
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
- \usebibmacro{finentry}}
+ \usebibmacro{finentry}\usebibmacro{annotation}}
@@ -2740,7 +2801,7 @@ incollection,proceedings,inproceedings]{number}{%
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
- \usebibmacro{finentry}}
+ \usebibmacro{finentry}\usebibmacro{annotation}}
%
% 专利文献驱动
@@ -2783,7 +2844,7 @@ incollection,proceedings,inproceedings]{number}{%
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
- \usebibmacro{finentry}}
+ \usebibmacro{finentry}\usebibmacro{annotation}}
%
@@ -2830,7 +2891,7 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
- \usebibmacro{finentry}}
+ \usebibmacro{finentry}\usebibmacro{annotation}}
%
@@ -2880,7 +2941,7 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
- \usebibmacro{finentry}}
+ \usebibmacro{finentry}\usebibmacro{annotation}}
%
% 论文、手册类型驱动
@@ -2932,7 +2993,7 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
- \usebibmacro{finentry}}
+ \usebibmacro{finentry}\usebibmacro{annotation}}
%
% 备选类型驱动
@@ -2973,7 +3034,7 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
- \usebibmacro{finentry}}
+ \usebibmacro{finentry}\usebibmacro{annotation}}
%
@@ -2992,8 +3053,10 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{
\ifnameundef{editor}{}{\newunit}%
}{\newunit}%替换下一句
%\newunit\newblock
+\iffieldundef{series}{}{\usebibmacro{series+number}\setunit{\addcolon\addspace}}%为处理一些存在series的情况而增加
\usebibmacro{maintitle+booktitle}%
- \setunit{\addcolon}\printfield{volume}\printfield{number}%增加卷和册信息
+\iffieldundef{volume}{}{\setunit{\addcolon\addspace}\printfield{volume}}%
+\iffieldundef{number}{}{\setunit{\addcolon\addspace}\printfield{number}}%增加卷和册信息
\newunit\newblock%
% \usebibmacro{byeditor+others}%
% \newunit\newblock
@@ -3005,9 +3068,10 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{
% \printfield{part}}
% {}%
% \newunit
- \printfield{volumes}%
- \newunit\newblock
- \usebibmacro{series+number}}%
+% \printfield{volumes}%
+% \newunit\newblock
+% \usebibmacro{series+number}
+ }%
\newunit\newblock
%\printfield{note}%
%\newunit\newblock
@@ -3031,7 +3095,7 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
- \usebibmacro{finentry}}
+ \usebibmacro{finentry}\usebibmacro{annotation}}
%
diff --git a/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015mx.cbx b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015mx.cbx
index 28682a5601c..bf2e591f0c2 100644
--- a/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015mx.cbx
+++ b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015mx.cbx
@@ -7,7 +7,7 @@
%% Released under the LaTeX Project Public License v1.3c or later
%% ---------------------------------------------------------------
%%
-\def\versionofgbtstyle{2019/03/28 v1.0r}
+\def\versionofgbtstyle{2019/08/28 v1.0s}
\ProvidesFile{gb7714-2015mx.cbx}[\versionofgbtstyle biblatex citation style]
%
@@ -69,20 +69,10 @@
%
% 定义upcite命令
% 20180604,v1.0l,hzz
+% 20190409,v1.0r,hzz
% 方法:对supercite增加[]
-\DeclareCiteCommand{\upcite}[\mkbibsuperbracket]%
- {\usebibmacro{cite:init}%
- \let\multicitedelim=\supercitedelim
- \iffieldundef{prenote}
- {}
- {\BibliographyWarning{Ignoring prenote argument}}%
- \iffieldundef{postnote}
- {}
- {\BibliographyWarning{Ignoring postnote argument}}}
- {\usebibmacro{citeindex}%
- \usebibmacro{cite:comp}}
- {}
- {\usebibmacro{cite:dump}}
+\newrobustcmd*{\upcite}{%
+ \cite}
%
% 重定义parencite命令,以满足标签带页码的国标要求
@@ -164,7 +154,41 @@
\printnames{labelname}\mkbibsuperscript{\mkbibbrackets{\usebibmacro{citeindex}%
\usebibmacro{cite}}}}
{\multicitedelim}
- {\usebibmacro{postnote}}
+ {\mkbibsuperscript{\printfield{postnote}}}
+
+
+%
+% 增加如下多个命令
+% 20190409,v1.0r,hzz
+% 方法:利用newcommand或newrobustcmd命令进行定义
+% 注意\citet和\citep命令之所以不用newrobustcmd,是为避免加载natbib模块后产生冲突
+\DeclareCiteCommand{\citet}%
+ {\usebibmacro{prenote}}
+ {\iffieldequalstr{userf}{cn}{\renewcommand*{\andothersdelim}{\addthinspace}}%\addthinspace
+ {\renewcommand*{\andothersdelim}{\addspace}}%
+ \printnames{labelname}\mkbibsuperscript{\mkbibbrackets{\usebibmacro{citeindex}%
+ \usebibmacro{cite}}}}
+ {\multicitedelim}
+ {\mkbibsuperscript{\printfield{postnote}}}
+
+
+\DeclareCiteCommand{\citep}[\mkbibsuperscript]%利用mkbibsuperbracket添加方括号
+ {[\usebibmacro{cite:init}%
+ \usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite:comp}}
+ {}
+ {\usebibmacro{cite:dump}]%
+ \printfield{postnote}}
+
+\newrobustcmd*{\citetns}%
+ {\textcite}
+
+\newrobustcmd*{\citepns}%
+ {\parencite}
+
+\newrobustcmd*{\inlinecite}%
+ {\parencite}
%textcite标注命令中的标点设置
@@ -360,7 +384,82 @@
{}
{\usebibmacro{postnote}}
+%
+% 定义\authornumcite命令,输出作者信息,然后在后面带上顺序编码
+% 20180427,v1.0k,增加,hzz
+% 20190409,v1.0r,hzz
+% 为与顺序编码制兼容,增加了命令,定义与citet相同
+\newbibmacro*{citet}{%
+ \iffieldundef{shorthand}
+ {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}
+ {\usebibmacro{cite:label}%
+ \setunit{\printdelim{nonameyeardelim}}%
+ \usebibmacro{cite:labeldate+extradate}%
+ \usebibmacro{cite:reinit}}
+ {\iffieldequals{namehash}{\cbx@lasthash}
+ {\ifthenelse{\iffieldequals{labelyear}{\cbx@lastyear}\AND
+ \(\value{multicitecount}=0\OR\iffieldundef{postnote}\)}
+ {\setunit{\addcomma}%
+ \usebibmacro{cite:extradate}}
+ {\setunit{\compcitedelim}%
+ \usebibmacro{cite:labeldate+extradate}%
+ \savefield{labelyear}{\cbx@lastyear}}}
+ {\printnames{labelname}%
+ %\setunit{\printdelim{nameyeardelim}}%
+ (\usebibmacro{cite:labeldate+extradate})%
+ \savefield{namehash}{\cbx@lasthash}%
+ \savefield{labelyear}{\cbx@lastyear}}}}
+ {\usebibmacro{cite:shorthand}%
+ \usebibmacro{cite:reinit}}%
+ \setunit{\multicitedelim}}
+
+\DeclareCiteCommand{\authornumcite}%
+ {\usebibmacro{cite:init}%
+ \renewbibmacro*{postnote}{%
+ \iffieldundef{postnote}%
+ {}%
+ {\thefield{postnote}}}%
+ \usebibmacro{prenote}}%
+ {\usebibmacro{citeindex}%
+ \usebibmacro{citet}}
+ {}
+ {\mkbibsuperscript{\usebibmacro{postnote}}%\usebibmacro{postnote}
+ }
+
+%
+% 增加如下多个命令
+% 20190409,v1.0r,hzz
+% 方法:利用newcommand或newrobustcmd命令进行定义
+% 注意\citet和\citep命令之所以不用newrobustcmd,是为避免加载natbib模块后产生冲突
+
+%同\authornumcite
+\DeclareCiteCommand{\citet}%
+ {\usebibmacro{cite:init}%
+ \renewbibmacro*{postnote}{%
+ \iffieldundef{postnote}%
+ {}%
+ {\thefield{postnote}}}%
+ \usebibmacro{prenote}}%
+ {\usebibmacro{citeindex}%
+ \usebibmacro{citet}}
+ {}
+ {\mkbibsuperscript{\usebibmacro{postnote}}%\usebibmacro{postnote}
+ }
+%同cite
+\DeclareCiteCommand{\citep}
+ {\usebibmacro{cite:init}%
+ \renewbibmacro*{postnote}{%
+ \iffieldundef{postnote}%
+ {}%
+ {\thefield{postnote}}}%
+ (\usebibmacro{prenote}}%)
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {}
+ {%(
+ )\mkbibsuperscript{\usebibmacro{postnote}}%\usebibmacro{postnote}
+ }
}