summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015.cbx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015.cbx')
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015.cbx74
1 files changed, 60 insertions, 14 deletions
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 62db91eea8c..e72c3a26607 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
@@ -3,16 +3,11 @@
%% biblatex-gb7714-2015 --- A biblatex implementation of the
%% GBT7714-2015 citation style,numerical sequence
%% Maintained by huzhenzhen
-%% history:
-%% 2016/05/20 v1.0 2016/10/23 v1.0a 2016/11/11 v1.0b
-%% 2016/11/14 v1.0c 2016/11/24 v1.0d 2016/12/07 v1.0e
-%% 2017/02/26 v1.0g 2017/04/11 v1.0h 2017/11/21 v1.0i
-%% 2018/01/20 v1.0j 2018/04/03 v1.0k
%% E-mail: hzzmail@163.com
%% Released under the LaTeX Project Public License v1.3c or later
%% ---------------------------------------------------------------
%%
-\ProvidesFile{gb7714-2015.cbx}[2018/04/03 v1.0k biblatex citation style]
+\ProvidesFile{gb7714-2015.cbx}[2018/06/01 v1.0l biblatex citation style]
%
% 加载标准样式
@@ -27,22 +22,51 @@
\ExecuteBibliographyOptions{
autocite = superscript ,
autopunct = true ,
- sorting = none ,
+ %sorting = none ,
+ maxcitenames=1,
+ mincitenames=1,
+}
+
+%textcite标注命令中的标点设置
+%\DeclareDelimFormat[textcite]{andothersdelim}{\addspace}%
+
+%
+% 定义一个上标方括号wrapper
+%
+\newcommand*\mkbibsuperbracket[1]{%
+ \mkbibsuperscript{\mkbibbrackets{#1}}%
}
%
% 重定义cite命令
%
-% 方法:\DeclareCiteCommand{\cite}[\mkbibparens]{⟨precode⟩}{⟨loopcode⟩}{⟨sepcode⟩}{⟨postcode⟩}
-\DeclareCiteCommand{\cite}[\mkbibsuperscript]
- {[\usebibmacro{cite:init}%直接添加方括号
+% 方法:\DeclareCiteCommand{\cite}[\mkbibparens]{precode}{loopcode}{sepcode}{postcode}
+\DeclareCiteCommand{\cite}[\mkbibsuperbracket]%利用mkbibsuperbracket添加方括号
+ {\usebibmacro{cite:init}
\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\usebibmacro{cite:comp}}
{}
{\usebibmacro{cite:dump}%
- \usebibmacro{postnote}]}
+ \usebibmacro{postnote}}
+%
+% 定义upcite命令
+% 20180604,v1.0l,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}}
%
% 新定义pagescite命令,以满足标签带页码的国标要求
@@ -57,7 +81,7 @@
{\printfield{postnote}}}
% 3.新增\pagescite引用命令
\DeclareCiteCommand{\pagescite}[\mkbibsuperscript]%\mkbibbrackets,仍然用上标
- {[\usebibmacro{cite:init}%
+ {[\usebibmacro{cite:init}%]直接添加方括号
\usebibmacro{prenote}%
}
{\usebibmacro{citeindex}%
@@ -70,7 +94,7 @@
% 定义yearpagescite,为与ay样式兼容,等同于\pagescite
%
\DeclareCiteCommand{\yearpagescite}[\mkbibsuperscript]%\mkbibbrackets,仍然用上标
- {[\usebibmacro{cite:init}%
+ {[\usebibmacro{cite:init}%]直接添加方括号
\usebibmacro{prenote}%
}
{\usebibmacro{citeindex}%
@@ -84,10 +108,32 @@
%
% 原理方法:等同于\pagescite,但不要页码
\DeclareCiteCommand{\yearcite}[\mkbibsuperscript]%\mkbibbrackets,仍然用上标
- {[\usebibmacro{cite:init}%
+ {[\usebibmacro{cite:init}%]直接添加方括号
\usebibmacro{prenote}%
}
{\usebibmacro{citeindex}%
\usebibmacro{cite:comp}}
{}
{\usebibmacro{cite:dump}]}
+
+%
+% 定义\authornumcite命令,输出作者信息,然后在后面带上顺序编码
+% 20180427,v1.0k,增加,hzz
+% gb7714样式新定义的命令都把cite放到最后,比如前面的pagescite,yearcite,这里的\authornumcite
+% 区别于biblatex定义的命令都把cite放到前面,比如citeauthor等。
+%见numeric.CBX
+\newbibmacro*{cite}{%
+ \printtext[bibhyperref]{%
+ \printfield{labelprefix}%
+ \printfield{labelnumber}%
+ \ifbool{bbx:subentry}
+ {\printfield{entrysetcount}}
+ {}}}
+%见numeric.CBX,\DeclareCiteCommand{\cite},
+\DeclareCiteCommand{\authornumcite}%[\mkbibsuperscript]
+ {\usebibmacro{prenote}}
+ {\renewcommand*{\andothersdelim}{\addspace}%
+ \printnames{labelname}\mkbibsuperscript{\mkbibbrackets{\usebibmacro{citeindex}%
+ \usebibmacro{cite}}}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}