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.cbx42
1 files changed, 33 insertions, 9 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 e63eddf2792..7802151895d 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/01/19 v1.0p}
+\def\versionofgbtstyle{2019/02/07 v1.0q}
\ProvidesFile{gb7714-2015.cbx}[\versionofgbtstyle biblatex citation style]
%
@@ -37,18 +37,31 @@
\mkbibsuperscript{\mkbibbrackets{#1}}%
}
+% 修改postnote的输出格式
+\DeclareFieldFormat{postnote}{#1}
+
%
% 重定义cite命令
%
% 方法:\DeclareCiteCommand{\cite}[\mkbibparens]{precode}{loopcode}{sepcode}{postcode}
-\DeclareCiteCommand{\cite}[\mkbibsuperbracket]%利用mkbibsuperbracket添加方括号
- {\usebibmacro{cite:init}%
+% v1.0p版后将cite的处理方式修改为类似pagescite,而不再使用biblatex的标准方式
+\DeclareCiteCommand{\cite}[\mkbibsuperscript]%利用mkbibsuperbracket添加方括号
+ {[\usebibmacro{cite:init}%
\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\usebibmacro{cite:comp}}
{}
- {\usebibmacro{cite:dump}%
- \usebibmacro{postnote}}
+ {\usebibmacro{cite:dump}]%
+ \printfield{postnote}}
+% v1.0p 以前用的方式
+%\DeclareCiteCommand{\cite}[\mkbibsuperbracket]%利用mkbibsuperbracket添加方括号
+% {\usebibmacro{cite:init}%
+% \usebibmacro{prenote}}
+% {\usebibmacro{citeindex}%
+% \usebibmacro{cite:comp}}
+% {}
+% {\usebibmacro{cite:dump}%
+% \usebibmacro{postnote}}
%
% 定义upcite命令
@@ -69,17 +82,28 @@
{\usebibmacro{cite:dump}}
%
+% 重定义parencite命令,以满足标签带页码的国标要求
+%
+\DeclareCiteCommand{\parencite}%[\mkbibbrackets]
+ {[\usebibmacro{cite:init}%]
+ \usebibmacro{prenote}}%
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite:comp}}
+ {}
+ {%[
+ \usebibmacro{cite:dump}]%
+ \mkbibsuperscript{\printfield{postnote}}}
+
+%
% 新定义pagescite命令,以满足标签带页码的国标要求
%
% 原理方法:
-% 1.修改postnote的输出格式
-\DeclareFieldFormat{postnote}{#1}
-% 2.新增页码输出宏
+% 1.新增页码输出宏
\newbibmacro*{postpages}{%
\iffieldundef{postnote}
{\printfield[postnote]{pages}}
{\printfield{postnote}}}
-% 3.新增\pagescite引用命令
+% 2.新增\pagescite引用命令
\DeclareCiteCommand{\pagescite}[\mkbibsuperscript]%\mkbibbrackets,仍然用上标
{[\usebibmacro{cite:init}%]直接添加方括号
\usebibmacro{prenote}%