summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-CCNU.bbx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-CCNU.bbx')
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-CCNU.bbx97
1 files changed, 95 insertions, 2 deletions
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-CCNU.bbx b/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-CCNU.bbx
index ba2d479971..50840d2dd4 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-CCNU.bbx
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-CCNU.bbx
@@ -100,6 +100,7 @@
%设置一些标点格式为中文的标点
%==================================================
\DeclareFieldFormat*{title}{\iffieldequalstr{userd}{chinese}{#1}{#1\isdot}}
+\DeclareFieldFormat[book]{title}{#1}
\def\gbcaselocalset{%
\renewrobustcmd*{\bibinitperiod}{}%
\renewcommand*{\revsdnamepunct}{}%
@@ -205,7 +206,7 @@
%
% v1.0k,20180425,为出版信息增加字体控制命令,hzz
% %类似\newbibmacro*{publisher+location+date}
-\newbibmacro*{location+institution+date}{\bibpubfont%
+\renewbibmacro*{location+institution+date}{\bibpubfont%
\iftoggle{bbx:gbpub}%
{\testCJKfirst{userd}%
\ifboolexpr{%
@@ -310,7 +311,7 @@ test {\iflistundef{location}} and test {\iflistundef{institution}}%
% 增加inbook:parent用于辅助crossref传统功能的实现
% 用在{crosscite}宏中
% 20210216,v1.0w,hzz
-\newbibmacro*{inbook:parent}{%
+\renewbibmacro*{inbook:parent}{%
\usebibmacro{bybookauthor}%
%\ifnameundef{bookauthor}{%
% \ifnameundef{editor}{}{\newunit}%
@@ -339,3 +340,95 @@ test {\iflistundef{location}} and test {\iflistundef{institution}}%
{\printtext{\bibstring{incn}}}%
{\printtext{\bibstring{in}}}%
}}%\newunit\newblock\intitlepunct
+
+
+%
+% 对edition版本信息格式做出修改
+% 注意实现逻辑:
+% 1. 不是整数时原样输出
+% 2. 当是整数且大于1时按版本格式输出
+\DeclareFieldFormat{edition}{\bibtitlefont%源来自biblatex.DEF
+ \testCJKfirst{userd}%
+ \iftoggle{ifCJKforgbt}%
+ {\ifinteger{#1}%
+ {\ifnumgreater{#1}{1}{\printtext{#1\str@edition}\newunit}{}}%
+ {#1\isdot\newunit}}%
+ {\ifinteger{#1}%
+ {\ifnumgreater{#1}{1}{\mkbibordedition{#1}~\bibstring{edition}\newunit}{}}%
+ {#1\isdot\newunit}}%
+}
+
+
+%
+% 增加inbook:parent用于辅助crossref传统功能的实现
+% 用在{crosscite}宏中
+% 20210216,v1.0w,hzz
+\renewbibmacro*{inbook:parent}{%
+\usebibmacro{bybookauthor}%
+%\ifnameundef{bookauthor}{%
+% \ifnameundef{editor}{}{\newunit}%
+%}{\newunit}%替换下一句
+ %\newunit\newblock
+\iffieldundef{series}{}{\usebibmacro{series+number}\setunit{\addcolon\addspace}}%为处理一些存在series的情况而增加
+\usebibmacro{maintitle+booktitle}%
+\iffieldundef{volume}{}{\setunit{\addcolon\addspace}\printfield{volume}}%
+\iffieldundef{number}{}{\setunit{\addcolon\addspace}\printfield{number}}%增加卷和册信息
+ \newunit\newblock%
+ \printfield{edition}%
+ \usebibmacro{publisher+location+date}}
+
+
+
+
+\DeclareBibliographyDriver{book}{%源来自standard.bbx文件
+\usebibmacro{bibindex}%
+\usebibmacro{begentry}%
+\usebibmacro{author/editor+others/translator+others}%
+\ifnameundef{namea}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点
+\usebibmacro{maintitle+title}%
+\iftoggle{bbx:gbstrict}{}{%
+\newunit%
+\printlist{language}%
+\newunit\newblock%
+\usebibmacro{byauthor}%
+\newunit\newblock}%
+\usebibmacro{byeditor+others}%
+\newunit%
+\printfield{edition}%
+\newblock%%
+\iftoggle{bbx:gbstrict}{}{%
+\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}%
+ \iffieldundef{url}{}{%当没有网址时也不输出
+ \usebibmacro{modifydate}}%带括号的修改或更新日期,
+\usebibmacro{doi+eprint+url}%从下面移动到上面来,因为gbt2015的url需直接放在页码后面。
+ \newunit\newblock%
+ \printfield{pagetotal}%
+ \newunit\newblock%
+ \iftoggle{bbx:isbn}
+ {\printfield{isbn}}
+ {}%
+ \newunit\newblock
+ %\usebibmacro{doi+eprint+url}%
+ %\newunit\newblock
+ \usebibmacro{addendum+pubstate}%
+ \setunit{\bibpagerefpunct}\newblock
+ \usebibmacro{pageref}%
+ \newunit\newblock
+ \iftoggle{bbx:related}
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}
+ {}%
+ \usebibmacro{annotation}\usebibmacro{finentry}}