summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-11-11 22:44:29 +0000
committerKarl Berry <karl@freefriends.org>2016-11-11 22:44:29 +0000
commitf981ead0d5ebfe93234e3ef1eb9c90e387fe2425 (patch)
tree4ad031a4e605a33efdbebfb8098c32b3de7688a0 /Master/texmf-dist/tex
parent28951a39ae365952612c2555d333f776a57b617e (diff)
biblatex-gb7714-2015 (11nov16)
git-svn-id: svn://tug.org/texlive/trunk@42485 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015.bbx294
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015.cbx3
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ay.bbx142
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ay.cbx3
4 files changed, 117 insertions, 325 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 abbfab00203..fb9717f3104 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
@@ -6,29 +6,19 @@
%% history:
%% 2016/05/20 v1.0
%% 2016/10/23 v1.0a
+%% 2016/11/11 v1.0b
%% E-mail: hzzmail@163.com
%% Released under the LaTeX Project Public License v1.3c or later
%% ---------------------------------------------------------------
%%
-\ProvidesFile{gb7714-2015.bbx}[2016/10/23 v1.0a biblatex bibliography style]
+\ProvidesFile{gb7714-2015.bbx}[2016/11/11 v1.0b 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开始使用新的姓名机制
+%版本判断,根据biblatex更新历史可知,版本3.3开始使用新的姓名机制
%所以当版本大于3.2开始,就用设置\toggletrue{iftexlivesix}
\def\numparserta#1.#2\relax{#1}%注意relax的重要性
\def\numparsertb#1.#2\relax{#2}
@@ -36,9 +26,10 @@
\def\numdigital{\expandafter\numparsertb\abx@version\relax}
\ifnumcomp{\numdigital}{>}{2}{\toggletrue{iftexlivesix}}{\togglefalse{iftexlivesix}}
-\iftoggle{iftexlivesix}{
%设置一些全局选项
% Alter settings that carry through from biblatex
+\iftoggle{iftexlivesix}
+{%biblatex3.3版后(比如texlive2016中的3.4版)的使用方式
\ExecuteBibliographyOptions{
sorting=none,
useprefix=true, %名字的信息包括前缀
@@ -77,9 +68,7 @@
\ifdefvoid{#4}{}{\bibnamedelimd\mkbibnamesuffix{#4}\isdot}}}
}
-{
-%设置一些全局选项
-% Alter settings that carry through from biblatex
+{%biblatex3.3版前(比如texlive2015中的3.0版)的使用方式
\ExecuteBibliographyOptions{
sorting=none,
useprefix=true, %名字的信息包括前缀
@@ -130,25 +119,15 @@
%定义判断中文字符的函数,用于判断作者等信息是否由中文字符构成
\providetoggle{ifCJKforgbt}
\def\testCJKfirstchar#1#2&{%
-\ifnumgreater{`#1}{"2E7F}{\toggletrue{ifCJKforgbt}}{\togglefalse{ifCJKforgbt}}}
+\ifnumgreater{`#1}{"2E7F}{\toggletrue{ifCJKforgbt}}{\togglefalse{ifCJKforgbt}}}%
\def\testCJKfirst#1{%
-\edef\tempa{#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}}%判断一下,是否是报纸和标准
+\iffieldundef{note}{\togglefalse{ifnoteeqstandard}}%判断一下,是否是标准
{\def\comparetmp{standard}\edef\comparetmpb{\thefield{note}}%
\ifx\comparetmp\comparetmpb%
\toggletrue{ifnoteeqstandard}%
@@ -198,7 +177,10 @@
%具体可以修改哪些需要的参考english.lbx文件
%当然也可以增加比如上面定义的andotherscn
\DefineBibliographyStrings{english}{
-bytranslator= {\addcomma\ 译\adddot}, %将trans. by 改成 译
+bibliography = {参考文献},
+references = {参考文献},
+%bytranslator= {\addcomma\ 译\adddot}, %将trans. by 改成 译
+bytranslator= {\addcomma\ 译},%\addperiod
and = {\addcomma},%将第2和3人名见的and符号改成 逗号,用\finalnamedelim命令也可以定义,参见3.9.1节
%andothers = {et al.}, %将超过3个人名的省略,et al.改成为 等
andotherscn = {等}, %将超过3个人名的省略,et al.改成为 等
@@ -268,60 +250,34 @@ nopublisher = {[s.n.]}
\printnames[bytranslator]{translator}%
\clearname{translator}%
\usebibmacro{bytranslator+othersstrg}%“译”的位置换到下面来,即放到译者后面。
- \setunit{\addspace}%
+ \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}
+\newbibmacro*{bytranslator+othersstrg}{%
+ \def\abx@tempa{bytranslator}%
+ \ifnamesequal{translator}{commentator}%
{\appto\abx@tempa{co}%
- \clearname{commentator}}
- {\ifnamesequal{translator}{annotator}
+ \clearname{commentator}}%
+ {\ifnamesequal{translator}{annotator}%
{\appto\abx@tempa{an}%
- \clearname{annotator}}
+ \clearname{annotator}}%
{}}%
\ifnamesequal{translator}{introduction}
{\appto\abx@tempa{in}%
- \clearname{introduction}}
- {\ifnamesequal{translator}{foreword}
+ \clearname{introduction}}%
+ {\ifnamesequal{translator}{foreword}%
{\appto\abx@tempa{fo}%
- \clearname{foreword}}
- {\ifnamesequal{translator}{afterword}
+ \clearname{foreword}}%
+ {\ifnamesequal{translator}{afterword}%
{\appto\abx@tempa{af}%
- \clearname{afterword}}
+ \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
+\bibstring{\abx@tempa}}
+
+%修改输入的源文件数据,用于中文判断等
%首先把作者和译者信息准确的记录到userf,usere中,用于判断是否是cjk字符。
%注意\DeclareSourcemap命令只能出现一次
\DeclareSourcemap{
@@ -400,26 +356,28 @@ nopublisher = {[s.n.]}
\step[fieldset=usere, origfieldval]
\step[fieldsource=year]
\step[fieldset=date, origfieldval]
+ \step[fieldsource=note]%将note域信息复制给keywords,用于输出时容易区分标准和报纸
+ \step[fieldset=keywords, origfieldval]
}
}
}
%判断作者或译者是否中文,若中文用字符等,否则用etcl。
\newbibmacro*{name:andothers}{%
- \ifboolexpr{
+ \ifboolexpr{%
test {\ifnumequal{\value{listcount}}{\value{liststop}}}
and
test \ifmorenames
- }
+ }%
{%这里做一个判断是在处理author还是translator用于两者是不同语言的情况
- \ifcurrentname{translator}{\testCJKfirst{\thefield{usere}}}{\testCJKfirst{\thefield{userf}}}
+ \ifcurrentname{translator}{\testCJKfirst{\thefield{usere}}}{\testCJKfirst{\thefield{userf}}}%
%这句判断如果放到\andothersdelim后面会在等或etc.前增加一个空格,所以放前面
- \ifnumgreater{\value{liststop}}{1}
- {\finalandcomma}
- {}%
-\andothersdelim\iftoggle{ifCJKforgbt}{\bibstring{andotherscn}}{\bibstring{andothers}}
+ \ifnumgreater{\value{liststop}}{1}%
+ {\finalandcomma}%
+ {\finalandcomma}%biblatex作者要区别单作者加等的情况,这里为符合gbt7714-2015第7.2节的要求加上了逗号。
+\andothersdelim\iftoggle{ifCJKforgbt}{\bibstring{andotherscn}}{\bibstring{andothers}}%
%\andothersdelim\bibstring{andotherscn}
-}
+}%
{}}
%新增文献类型标识符的格式
@@ -507,14 +465,14 @@ nopublisher = {[s.n.]}
\usebibmacro{url}}
\newbibmacro*{url}{\printfield{url}}
-%\newbibmacro*{urldate}{\printurldate} %引用时间修改如下一行
+%\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}{%新增加一个带括号的日期
+\newbibmacro*{modifydate}{%新增加一个带括号的日期,用于表示表示电子资源的更新和修改日期,而公告日期安按日期格式
\printtext{%
\iffieldundef{year}{}{\mkbibparens{\printtext{\printfield{year}}%
\iffieldundef{month}{}{\bibrangedash\thefield{month}}%
@@ -555,87 +513,6 @@ nopublisher = {[s.n.]}
%\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对于每个文献来说是必须的,所以用它判断是最快的,而且一般标题和出版社的语言是一样的。
@@ -660,61 +537,34 @@ nopublisher = {[s.n.]}
%对版本信息做出修改,源来自biblatex.DEF
\DeclareFieldFormat{edition}{%
\testCJKfirst{\thefield{title}}%
- \ifinteger{#1}%
- {\iftoggle{ifCJKforgbt}{\printtext{#1版}}%
- {\mkbibordedition{#1}~\bibstring{edition}}}%
- {#1\isdot}}
+\iftoggle{ifCJKforgbt}%
+{\ifinteger{#1}%
+{\printtext{#1版}}%
+{#1\isdot}}%
+{\ifinteger{#1}%
+{\mkbibordedition{#1}~\bibstring{edition}}%
+{#1\isdot}}}
+
+%对version的版本信息做出修改,源来自biblatex.DEF
+\DeclareFieldFormat{version}{%
+\testCJKfirst{\thefield{title}}%
+\ifinteger{#1}%
+{\iftoggle{ifCJKforgbt}{\printtext{#1版}}%
+{\mkbibordedition{#1}~\bibstring{version}}}%
+{#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}%这样仍然多出一个空格%草,这种方式又可以了,真的不知道原因所在了,以后再测试一下。
+\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}%这句要顶格,否则会多出一个空格,因为前面有判断语句%草,也没有影响呢,真奇怪了,以后再来测试一下。
+{\setunit{\labelnamepunct}\newblock}%这个注释去除标题前空格
+\usebibmacro{maintitle+title}%
\newunit
\printlist{language}%
\newunit\newblock
@@ -785,7 +635,7 @@ nopublisher = {[s.n.]}
\printtext{%去掉了[parens]
\iffieldundef{issue}
{%\usebibmacro{date}
- \iffieldundef{note}{\usebibmacro{date}}%判断一下,是否是报纸和标准
+ \iffieldundef{note}{\usebibmacro{date}}%判断一下,是否是报纸
{\def\comparetmp{news}\edef\comparetmpb{\thefield{note}}%
\ifx\comparetmp\comparetmpb%
\usebibmacro{newsdate}%
@@ -796,7 +646,7 @@ nopublisher = {[s.n.]}
{\printfield{issue}%
\setunit*{\addspace}%
%\usebibmacro{date}
- \iffieldundef{note}{\usebibmacro{date}}%判断一下,是否是报纸和标准
+ \iffieldundef{note}{\usebibmacro{date}}%判断一下,是否是报纸
{\def\comparetmp{news}\edef\comparetmpb{\thefield{note}}%
\ifx\comparetmp\comparetmpb%
\usebibmacro{newsdate}%
@@ -898,15 +748,8 @@ nopublisher = {[s.n.]}
{\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{//}
+\printtext{\texttt{//}}
+%\texttt{//}
\usebibmacro{bybookauthor}%
\ifnameundef{bookauthor}{\newblock}{\newunit\newblock}%替换下一句
%\newunit\newblock
@@ -1273,6 +1116,7 @@ nopublisher = {[s.n.]}
%\newunit
}
+%2016-11-11增加了译者信息
\DeclareBibliographyDriver{report}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
@@ -1284,6 +1128,8 @@ nopublisher = {[s.n.]}
\newunit\newblock
\usebibmacro{byauthor}%
\newunit\newblock
+ \usebibmacro{byeditor+others}%增加的译者信息
+ \newunit\newblock
\printfield{type}%
\setunit*{\addspace}%
\printfield{number}%
@@ -1315,7 +1161,7 @@ nopublisher = {[s.n.]}
{}%
\usebibmacro{finentry}}
-%直接利用report做manual
+%直接利用report做manual,2016-11-11增加了译者信息
%\DeclareBibliographyDriver{report}{%
\DeclareBibliographyDriver{manual}{%
\usebibmacro{bibindex}%
@@ -1328,6 +1174,8 @@ nopublisher = {[s.n.]}
\newunit\newblock
\usebibmacro{byauthor}%
\newunit\newblock
+ \usebibmacro{byeditor+others}%增加的译者信息
+ \newunit\newblock
\printfield{type}%
\setunit*{\addspace}%
\printfield{number}%
@@ -1407,14 +1255,14 @@ nopublisher = {[s.n.]}
\DeclareBibliographyDriver{collection}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
-\usebibmacro{author/editor+others/translator+others}%这样仍然多出一个空格%草,这种方式又可以了,真的不知道原因所在了,以后再测试一下。
+\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}%这句要顶格,否则会多出一个空格,因为前面有判断语句%草,也没有影响呢,真奇怪了,以后再来测试一下。
+ \usebibmacro{maintitle+title}
\newunit
\printlist{language}%
\newunit\newblock
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 541e719a207..526ddb12a0e 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
@@ -6,11 +6,12 @@
%% history:
%% 2016/05/20 v1.0
%% 2016/10/23 v1.0a
+%% 2016/11/11 v1.0b
%% E-mail: hzzmail@163.com
%% Released under the LaTeX Project Public License v1.3c or later
%% ---------------------------------------------------------------
%%
-\ProvidesFile{gb7714-2015.cbx}[2016/10/23 v1.0a biblatex citation style]
+\ProvidesFile{gb7714-2015.cbx}[2016/11/11 v1.0b biblatex citation style]
\RequireCitationStyle{numeric-comp}
%\RequireCitationStyle{numeric}
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 aa706514e33..50b2521235a 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
@@ -6,41 +6,18 @@
%% history:
%% 2016/05/20 v1.0
%% 2016/10/23 v1.0a
+%% 2016/11/11 v1.0b
%% E-mail: hzzmail@163.com
%% Released under the LaTeX Project Public License v1.3c or later
%% ---------------------------------------------------------------
%%
-\ProvidesFile{gb7714-2015ay.bbx}[2016/10/23 v1.0a biblatex bibliography style]
-
-%to be done
-%著者年制,没有作者,用佚名,英文怎么办?
-%没有年怎么办?
+\ProvidesFile{gb7714-2015ay.bbx}[2016/11/11 v1.0b biblatex bibliography style]
% 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开始使用新的姓名机制
+%版本判断,根据biblatex更新历史可知,版本3.3开始使用新的姓名机制
%所以当版本大于3.2开始,就用设置\toggletrue{iftexlivesix}
\def\numparserta#1.#2\relax{#1}%注意relax的重要性
\def\numparsertb#1.#2\relax{#2}
@@ -48,16 +25,21 @@
\def\numdigital{\expandafter\numparsertb\abx@version\relax}
\ifnumcomp{\numdigital}{>}{2}{\toggletrue{iftexlivesix}}{\togglefalse{iftexlivesix}}
-\iftoggle{iftexlivesix}{
%设置一些全局选项
% Alter settings that carry through from biblatex
+\iftoggle{iftexlivesix}{
+%biblatex3.3版后(比如texlive2016中的3.4版)的使用方式
\ExecuteBibliographyOptions{
useprefix = true, %名字的信息包括前缀
%firstinits = true, %名字有缩写,参考3.1.2.3 Internal
giveninits = true,
date = year, %日期仅写到年
- maxnames = 1 , %设置名字最大数量
- minnames = 1 %设置缩减后的名字最小数量
+ %maxnames = 3 , %设置名字最大数量
+ %minnames = 3, %设置缩减后的名字最小数量
+ maxbibnames=3, %将文献列表和引用中最大名字数量区分开
+ minbibnames=3,
+ maxcitenames=1,
+ mincitenames=1
%uniquename = init
}
@@ -115,14 +97,17 @@
}
{
-%设置一些全局选项
-% Alter settings that carry through from biblatex
+%biblatex3.3版前(比如texlive2015中的3.0版)的使用方式
\ExecuteBibliographyOptions{
useprefix = true, %名字的信息包括前缀
firstinits = true, %名字有缩写,参考3.1.2.3 Internal
date = year, %日期仅写到年
- maxnames = 1 , %设置名字最大数量
- minnames = 1 %设置缩减后的名字最小数量
+ %maxnames = 3 , %设置名字最大数量
+ %minnames = 3, %设置缩减后的名字最小数量
+ maxbibnames=3, %将文献列表和引用中最大名字数量区分开
+ minbibnames=3,
+ maxcitenames=1,
+ mincitenames=1
%uniquename = init
}
\DeclareNameFormat{first-last}{%修改作者的姓和名的顺序,源来自于biblatex.def文件
@@ -131,6 +116,7 @@
{\usebibmacro{name:last-first}{#1}{#3}{#5}{#7}}%
\usebibmacro{name:andothers}}
+%作者名字的处理,参考文档4.2.3节,3.12.4 Name Parts and Name Spacing
\newbibmacro*{name:last-first}[4]{%
\ifuseprefix
{\usebibmacro{name:delim}{#3#1}%
@@ -165,9 +151,9 @@
%定义判断中文字符的函数,用于判断作者等信息是否由中文字符构成
\providetoggle{ifCJKforgbt}
\def\testCJKfirstchar#1#2&{%
-\ifnumgreater{`#1}{"2E7F}{\toggletrue{ifCJKforgbt}}{\togglefalse{ifCJKforgbt}}}
+\ifnumgreater{`#1}{"2E7F}{\toggletrue{ifCJKforgbt}}{\togglefalse{ifCJKforgbt}}}%
\def\testCJKfirst#1{%
-\edef\tempa{#1}
+\edef\tempa{#1}%
\expandafter\testCJKfirstchar\tempa&}
%判断是否是标准
@@ -198,6 +184,8 @@
%具体可以修改哪些需要的参考english.lbx文件
%当然也可以增加比如上面定义的andotherscn
\DefineBibliographyStrings{english}{
+bibliography = {参考文献},
+references = {参考文献},
bytranslator= {\addcomma\ 译\adddot}, %将trans. by 改成 译
and = {\addcomma},%将第2和3人名见的and符号改成 逗号,用\finalnamedelim命令也可以定义,参见3.9.1节
%andothers = {et al.}, %将超过3个人名的省略,et al.改成为 等
@@ -259,7 +247,7 @@ nopublisher = {[s.n.]}
\fi}
-%作者修改判断,是否中文,若中文输入等字符,而不是etcl
+%修改输入的源文件数据,用于中文判断等
%首先把作者和译者信息准确的记录到userf,usere中,用于判断是否是cjk字符。
%注意\DeclareSourcemap命令只能出现一次
\DeclareSourcemap{
@@ -338,29 +326,13 @@ nopublisher = {[s.n.]}
\step[fieldset=usere, origfieldval]
\step[fieldsource=year]
\step[fieldset=date, origfieldval]
+ \step[fieldsource=note]%将note域信息复制给keywords,用于输出时容易区分标准和报纸
+ \step[fieldset=keywords, 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}{
@@ -527,50 +499,6 @@ nopublisher = {[s.n.]}
%\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}}%
@@ -582,6 +510,14 @@ nopublisher = {[s.n.]}
{\mkbibordedition{#1}~\bibstring{edition}}}%
{#1\isdot}}
+%对version的版本信息做出修改,源来自biblatex.DEF
+\DeclareFieldFormat{version}{%
+\iffieldundef{title}{}{\testCJKfirst{\thefield{title}}}%
+ \ifinteger{#1}%
+ {\iftoggle{ifCJKforgbt}{\printtext{#1版}}%
+ {\mkbibordedition{#1}~\bibstring{version}}}%
+ {#1\isdot}}
+
\renewbibmacro*{author}{%
\ifboolexpr{
test \ifuseauthor
@@ -631,7 +567,7 @@ nopublisher = {[s.n.]}
\newunit}%
\usebibmacro{withothers}}
-%判断作者或译者是否中文,若中文用字符等,否则用etcl。
+%判断作者或译者是否中文,若中文用字符等,否则用etal。
\newbibmacro*{name:andothers}{%
\ifboolexpr{
test {\ifnumequal{\value{listcount}}{\value{liststop}}}
@@ -668,6 +604,7 @@ nopublisher = {[s.n.]}
%\usebibmacro{date}%
%\newunit %去掉这个标点
}
+
%修改book的驱动,源来自standard.BBX
\DeclareBibliographyDriver{book}{%
\usebibmacro{bibindex}%
@@ -1324,6 +1261,7 @@ nopublisher = {[s.n.]}
%\newunit
}
+%2016-11-11增加了译者信息
\DeclareBibliographyDriver{report}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
@@ -1335,6 +1273,8 @@ nopublisher = {[s.n.]}
\newunit\newblock
\usebibmacro{byauthor}%
\newunit\newblock
+ \usebibmacro{byeditor+others}%增加的译者信息
+ \newunit\newblock
\printfield{type}%
\setunit*{\addspace}%
\printfield{number}%
@@ -1366,7 +1306,7 @@ nopublisher = {[s.n.]}
{}%
\usebibmacro{finentry}}
-%直接利用report做manual
+%直接利用report做manual,2016-11-11增加了译者信息
%\DeclareBibliographyDriver{report}{%
\DeclareBibliographyDriver{manual}{%
\usebibmacro{bibindex}%
@@ -1379,6 +1319,8 @@ nopublisher = {[s.n.]}
\newunit\newblock
\usebibmacro{byauthor}%
\newunit\newblock
+ \usebibmacro{byeditor+others}%
+ \newunit\newblock
\printfield{type}%
\setunit*{\addspace}%
\printfield{number}%
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 11bdffa9667..1efa222358f 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
@@ -6,11 +6,12 @@
%% history:
%% 2016/05/20 v1.0
%% 2016/10/23 v1.0a
+%% 2016/11/11 v1.0b
%% E-mail: hzzmail@163.com
%% Released under the LaTeX Project Public License v1.3c or later
%% ---------------------------------------------------------------
%%
-\ProvidesFile{gb7714-2015ay.cbx}[2016/10/23 v1.0a biblatex citation style]
+\ProvidesFile{gb7714-2015ay.cbx}[2016/11/11 v1.0b biblatex citation style]
\RequireCitationStyle{authoryear}
%\RequireCitationStyle{numeric}