diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex')
5 files changed, 445 insertions, 24 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/chinese-erj.bbx b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/chinese-erj.bbx index 7a0646b5627..dbb03b854a6 100644 --- a/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/chinese-erj.bbx +++ b/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/chinese-erj.bbx @@ -75,7 +75,7 @@ %为标注和文献表中标点格式,重设and本地化字符串 %================================================== \DefineBibliographyStrings{english}{ - and = { and }, + and = { and},%and后面的空格在finalnamedelim已经加过了,所以这里去掉20191009 andcn = {、}, andincitecn = {和},%将标注中的分开,便于与文献表中的区分 andincite = {\&}, 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 7bc20e91635..2178050a455 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 @@ -199,12 +199,28 @@ \DeclareDatamodelFields[type=field,datatype=literal]{shortbooktitle} \DeclareDatamodelFields[type=field,datatype=literal]{lansortorder} + %因为biblatex更新3.14版本以后,biber对于为声明数据模型的条目类型 + %不再默认读取,而是以空字符串作为条目类型名,自然在条目定义alias时 + %就会出现问题,因此显式的声明一下newspaper,然后保留后面采用alias的方式 + %而standard类型则是采用另一种方式直接在sourcemap中转换为其它类型。 + \@ifpackagelater{biblatex}{2019/11/30}{%2019/12/01 v3.14 + \DeclareDatamodelEntrytypes{newspaper}% + }{} + %===================================================================== % 设置宏包选项 %===================================================================== % + % 增加一个控制是否输出文献载体的选项 + % 20191125,v1,0s,hzz + \newtoggle{bbx:gbmedium} + \DeclareBibliographyOption{gbmedium}[true]{%biblatex低版本 + \settoggle{bbx:gbmedium}{#1}} + \ExecuteBibliographyOptions{gbmedium} + + % % 增加一个控制是否输出annotation域的选项,该域可以用于在文献条目后面输出一些注释信息 % 20190509,v1,0s,hzz \newtoggle{bbx:gbannote} @@ -606,7 +622,39 @@ % numeric样式,不使用该选项,这里给出仅为兼容性考虑 % v1.0q,20190307,hzz % - \DeclareBibliographyOption[string]{gblanorder}[chineseahead]{} + % 增加不同语言排序的切换选项 + % gblanorder=chineseahead的顺序为cn,jp,kr,en,fr,ru + % gblanorder=englishahead的顺序为en,fr,ru,cn,jp,kr + % gblanorder=cn;en;ru;fr;jp;kr的顺序为指定的cn;en;ru;fr;jp;kr,自定义内容可以随意写以分号分隔 + % v1.0q,20190307,hzz + % + \DeclareBibliographyOption[string]{gblanorder}[chineseahead]{% + \ifstrequal{#1}{chineseahead}%%中文在前的顺序 + {\gdef\lancnorder{1}\gdef\lanjporder{2}\gdef\lankrorder{3}% + \gdef\lanenorder{4}\gdef\lanfrorder{5}\gdef\lanruorder{6}}% + {% + \ifstrequal{#1}{englishahead}% + {\execlanodeah\dealsortlan}% + {\execlanodudf{#1}\dealsortlan}% + }% + } + \ExecuteBibliographyOptions{gblanorder} + + \def\execlanodeah{%中文在后的顺序 + \gdef\lancnorder{4} + \gdef\lanjporder{5} + \gdef\lankrorder{6} + \gdef\lanenorder{1} + \gdef\lanfrorder{2} + \gdef\lanruorder{3}} + + \newcounter{lanordernum} + \newcommand{\execlanodudf}[1]{%like:cn;en;ru;fr;jp;kr + \setcounter{lanordernum}{0} + \DeclareListParser{\parsinglanorder}{;} + \renewcommand*{\do}[1]{\stepcounter{lanordernum}\csxdef{lan##1order}{\thelanordernum}} + \parsinglanorder{#1} + } % % 增加本地化字符串的中英文切换选项 @@ -670,7 +718,7 @@ } {% 针对biblatex<3.3版本的选项设置 % 增加不同语言排序的切换选项 - % numeric样式,不使用该选项,这里给出仅为兼容性考虑 + % numeric样式, biblatex 3.4及以下版本不能使用多个stylesourcemap,所以不使用该选项 % v1.0q,20190307,hzz % \DeclareBibliographyOption{gblanorder}[chineseahead]{} @@ -1237,26 +1285,32 @@ \map{%当文献给出language域时,设置文献要使用的本地化字符串的语言 \step[fieldsource=language,match=\regexp{(e|E)(n|N)(g|G)(l|L)(i|I)(s|S)(h|H)},final] \step[fieldset=langid,fieldvalue={english}] + \step[fieldset=lansortorder,fieldvalue=\lanenorder] } \map{ \step[fieldsource=language,match=\regexp{(r|R)(u|U)(s|S)(s|S)(i|I)(a|A)(n|N)},final] \step[fieldset=langid,fieldvalue={russian}] + \step[fieldset=lansortorder,fieldvalue=\lanruorder] } \map{% \step[fieldsource=language,match=\regexp{(f|F)(r|R)(e|E)(n|N)(c|C)(h|H)},final] \step[fieldset=langid,fieldvalue={french}] + \step[fieldset=lansortorder,fieldvalue=\lanfrorder] } \map{% \step[fieldsource=language,match=\regexp{(c|C)(h|H)(i|I)(n|N)(e|E)(s|S)(e|E)},final]%中日韩语目前都用english, \step[fieldset=langid,fieldvalue={english}] + \step[fieldset=lansortorder,fieldvalue=\lancnorder] } \map{% \step[fieldsource=language,match=\regexp{(j|J)(a|A)(p|P)(a|A)(n|N)(e|E)(s|S)(e|E)},final]%中日韩语目前都用english, \step[fieldset=langid,fieldvalue={english}] + \step[fieldset=lansortorder,fieldvalue=\lanjporder] } \map{% \step[fieldsource=language,match=\regexp{(k|K)(o|O)(r|R)(e|E)(a|A)(n|N)},final]%中日韩语目前都用english, \step[fieldset=langid,fieldvalue={english}] + \step[fieldset=lansortorder,fieldvalue=\lankrorder] } } } @@ -1562,6 +1616,42 @@ {\switchversion{3.0}{map}}%%当采用biblatex<=3.2版本时 {\switchversion{3.4}{map}}%%当采用3.3<=biblatex版本时 + +% +% 不同语言分集调整的实现方式 +% +% 原理方法:利用样式层的动态数据修改lansortorder域来实现排序 +\def\dealsortlan{ + \DeclareStyleSourcemap{ + \maps[datatype=bibtex]{ + \map[overwrite]{%当文献给出language域时,设置文献要使用的本地化字符串的语言 + \step[fieldsource=language,match=english,final] + \step[fieldset=lansortorder,fieldvalue=\lanenorder] + } + \map[overwrite]{ + \step[fieldsource=language,match=russian,final] + \step[fieldset=lansortorder,fieldvalue=\lanruorder] + } + \map[overwrite]{% + \step[fieldsource=language,match=french,final] + \step[fieldset=lansortorder,fieldvalue=\lanfrorder] + } + \map[overwrite]{% + \step[fieldsource=language,match=chinese,final]%中日韩语目前都用english, + \step[fieldset=lansortorder,fieldvalue=\lancnorder] + } + \map[overwrite]{% + \step[fieldsource=language,match=japanese,final]%中日韩语目前都用english, + \step[fieldset=lansortorder,fieldvalue=\lanjporder] + } + \map[overwrite]{% + \step[fieldsource=language,match=korean,final]%中日韩语目前都用english, + \step[fieldset=lansortorder,fieldvalue=\lankrorder] + } + } + } +} + % %驱动别名等价于驱动层映射 % @@ -1579,7 +1669,274 @@ \DeclareBibliographyAlias{map}{manual} \DeclareBibliographyAlias{archive}{manual} +%===================================================================== +% 设置排序格式 +%===================================================================== +% +% 排序格式,用降序,及userb域,针对biblatex3.7及以下版本 +% +\defversion{3.7}{sort}{%这是3.4版的,3.7版略有差异,但不大,后面有注释 + \DeclareSortingScheme{gb7714-2015}{ + \sort{ + \field{presort} + } + \sort[final]{ + \field{sortkey} + } + \sort{ + \field{lansortorder}%language + } + \sort{%[direction=descending] + \field{sortname} + \field{author} + \field{editor} + \field{translator} + } + \sort{ + \field{sortyear} + \field{year} + } + \sort{ + \field{sorttitle} + \field{title} + } + \sort{ + \field[padside=left,padwidth=4,padchar=0]{volume}%3.7版是\field{volume} + \literal{0000}%3.7版是\literal{0} + } + } + %降序的nyt + \DeclareSortingScheme{gbnytd}{ + \sort{ + \field{presort} + } + \sort[final]{ + \field{sortkey} + } + \sort{ + \field{lansortorder}%language + } + \sort[direction=descending]{ + \field{sortname} + \field{author} + \field{editor} + \field{translator} + } + \sort{ + \field{sortyear} + \field{year} + } + \sort{ + \field{sorttitle} + \field{title} + } + \sort{ + \field[padside=left,padwidth=4,padchar=0]{volume}%3.7版是\field{volume} + \literal{0000}%3.7版是\literal{0} + } + } + + %降序的ynt + \DeclareSortingScheme{gbyntd}{ + \sort{ + \field{presort} + } + \sort[final]{ + \field{sortkey} + } + \sort{ + \field{lansortorder}%language + } + \sort[direction=descending]{ + \field{sortyear} + \field{year} + } + \sort{ + \field{sortname} + \field{author} + \field{editor} + \field{translator} + } + \sort{ + \field{sorttitle} + \field{title} + } + \sort{ + \field[padside=left,padwidth=4,padchar=0]{volume}%3.7版是\field{volume} + \literal{0000}%3.7版是\literal{0} + } + } + + %升序的ynt + \DeclareSortingScheme{gbynta}{ + \sort{ + \field{presort} + } + \sort[final]{ + \field{sortkey} + } + \sort{ + \field{lansortorder}%language + } + \sort{ + \field{sortyear} + \field{year} + } + \sort{ + \field{sortname} + \field{author} + \field{editor} + \field{translator} + } + \sort{ + \field{sorttitle} + \field{title} + } + \sort{ + \field[padside=left,padwidth=4,padchar=0]{volume}%3.7版是\field{volume} + \literal{0000}%3.7版是\literal{0} + } + } +} + + +% +% 排序格式,用降序,及userb域,针对biblatex3.8及以上版本 +% +\defversion{3.8}{sort}{ + \DeclareSortingTemplate{gb7714-2015}{ + \sort{ + \field{presort} + } + \sort[final]{ + \field{sortkey} + } + \sort{ + \field{lansortorder}%language + } + \sort{%[direction=descending] + \field{sortname} + \field{author} + \field{editor} + \field{translator} + } + \sort{ + \field{sortyear} + \field{year} + } + \sort{ + \field{sorttitle} + \field{title} + } + \sort{ + \field{volume} + \literal{0} + } + } + + %降序的nyt + \DeclareSortingTemplate{gbnytd}{ + \sort{ + \field{presort} + } + \sort[final]{ + \field{sortkey} + } + \sort{ + \field{lansortorder}%language + } + \sort[direction=descending]{% + \field{sortname} + \field{author} + \field{editor} + \field{translator} + } + \sort{ + \field{sortyear} + \field{year} + } + \sort{ + \field{sorttitle} + \field{title} + } + \sort{ + \field{volume} + \literal{0} + } + } + + %降序的ynt + \DeclareSortingTemplate{gbyntd}{ + \sort{ + \field{presort} + } + \sort[final]{ + \field{sortkey} + } + \sort{ + \field{lansortorder}%language + } + \sort[direction=descending]{ + \field{sortyear} + \field{year} + } + \sort{% + \field{sortname} + \field{author} + \field{editor} + \field{translator} + } + \sort{ + \field{sorttitle} + \field{title} + } + \sort{ + \field{volume} + \literal{0} + } + } + + %升序的ynt + \DeclareSortingTemplate{gbynta}{ + \sort{ + \field{presort} + } + \sort[final]{ + \field{sortkey} + } + \sort{ + \field{lansortorder}%language + } + \sort{%[direction=ascending] + \field{sortyear} + \field{year} + } + \sort{% + \field{sortname} + \field{author} + \field{editor} + \field{translator} + } + \sort{ + \field{sorttitle} + \field{title} + } + \sort{ + \field{volume} + \literal{0} + } + } +} + + +\ifboolexpr{ +test {\iftoggle{iftlfive}} +or +test {\iftoggle{iftlsix}} +or +test {\iftoggle{iftlseven}}%biblatex<=3.7 +}{\switchversion{3.7}{sort}}{\switchversion{3.8}{sort}}%3.8<=biblatex %===================================================================== % 参考文献表环境 @@ -1708,7 +2065,8 @@ % 而[]中间的内容,从4.6.2节的例子看也是可以分割的,因此内部的nobreak也可以去掉 % \DeclareFieldFormat{gbtypeflag}{% -\iftoggle{bbx:url}% +\iftoggle{bbx:gbmedium}% +{\iftoggle{bbx:url}% {\iffieldundef{url}%当存在url时,增加一个OL标识符 {\nobreak\printtext{[}\nobreak#1\nobreak\printtext{\iffieldundef{medium}{}{\texttt{/}\thefield{medium}}]}}% {\nobreak\printtext{[}\nobreak#1\nobreak\printtext{\texttt{/}OL]}}% @@ -1716,31 +2074,36 @@ {\ifentrytype{online}% {\nobreak\printtext{[}\nobreak#1\nobreak\printtext{\texttt{/}OL]}}% {\nobreak\printtext{[}\nobreak#1\nobreak\printtext{\iffieldundef{medium}{}{\texttt{/}\thefield{medium}}]}}% - }% + }}% + {\nobreak\printtext{[}\nobreak#1\nobreak\printtext{]}}% } % % 新增用于报纸的文献类型标识符的格式 % \DeclareFieldFormat{gbtypeflagn}{%用于报纸newspaper -\iftoggle{bbx:url}% +\iftoggle{bbx:gbmedium}% +{\iftoggle{bbx:url}% {\iffieldundef{url}%当存在url时,增加一个OL标识符 {\nobreak\printtext{[}\nobreak N\printtext{\iffieldundef{medium}{}{\texttt{/}\thefield{medium}}]}\nobreak}% {\nobreak\printtext{[}\nobreak N\printtext{\texttt{/}OL]}\nobreak}% }% {\nobreak\printtext{[}\nobreak N\printtext{\iffieldundef{medium}{}{\texttt{/}\thefield{medium}}]}\nobreak}% +}{\nobreak\printtext{[}\nobreak N\printtext{]}\nobreak}% } % % 新增用于标准的文献类型标识符的格式 % \DeclareFieldFormat{gbtypeflags}{%用于标准standard -\iftoggle{bbx:url}% +\iftoggle{bbx:gbmedium}% +{\iftoggle{bbx:url}% {\iffieldundef{url}%当存在url时,增加一个OL标识符 {\nobreak\printtext{[}\nobreak S\printtext{\iffieldundef{medium}{}{\texttt{/}\thefield{medium}}]}\nobreak}% {\nobreak\printtext{[}\nobreak S\printtext{\texttt{/}OL]}\nobreak}% }% {\nobreak\printtext{[}\nobreak S\printtext{\iffieldundef{medium}{}{\texttt{/}\thefield{medium}}]}\nobreak}% +}{\nobreak\printtext{[}\nobreak S\printtext{]}\nobreak}% } % 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 e0609f60a15..d6d9a84174d 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 @@ -196,12 +196,26 @@ \DeclareDatamodelFields[type=field,datatype=literal]{shortbooktitle} \DeclareDatamodelFields[type=field,datatype=literal]{lansortorder} - + %因为biblatex更新3.14版本以后,biber对于为声明数据模型的条目类型 + %不再默认读取,而是以空字符串作为条目类型名,自然在条目定义alias时 + %就会出现问题,因此显式的声明一下newspaper,然后保留后面采用alias的方式 + %而standard类型则是采用另一种方式直接在sourcemap中转换为其它类型。 + \@ifpackagelater{biblatex}{2019/11/30}{%2019/12/01 v3.14 + \DeclareDatamodelEntrytypes{newspaper}% + }{} %===================================================================== % 设置宏包选项 %===================================================================== % + % 增加一个控制是否输出文献载体的选项 + % 20191125,v1,0s,hzz + \newtoggle{bbx:gbmedium} + \DeclareBibliographyOption{gbmedium}[true]{%biblatex低版本 + \settoggle{bbx:gbmedium}{#1}} + \ExecuteBibliographyOptions{gbmedium} + + % % 增加一个控制是否输出annotation域的选项,该域可以用于在文献条目后面输出一些注释信息 % 20190509,v1,0s,hzz \newtoggle{bbx:gbannote} @@ -1805,6 +1819,7 @@ test {\iftoggle{iftlseven}}%biblatex<=3.7 \setlength{\bibhang}{1em} \newlength{\bibitemindent} \setlength{\bibitemindent}{-\bibhang} +\setlength{\bibitemsep}{4.5pt} \defbibenvironment{bibliography} {\list {} @@ -1841,7 +1856,8 @@ test {\iftoggle{iftlseven}}%biblatex<=3.7 % 而[]中间的内容,从4.6.2节的例子看也是可以分割的,因此内部的nobreak也可以去掉 % \DeclareFieldFormat{gbtypeflag}{% -\iftoggle{bbx:url}% +\iftoggle{bbx:gbmedium}% +{\iftoggle{bbx:url}% {\iffieldundef{url}%当存在url时,增加一个OL标识符 {\nobreak\printtext{[}\nobreak#1\nobreak\printtext{\iffieldundef{medium}{}{\texttt{/}\thefield{medium}}]}}% {\nobreak\printtext{[}\nobreak#1\nobreak\printtext{\texttt{/}OL]}}% @@ -1849,33 +1865,36 @@ test {\iftoggle{iftlseven}}%biblatex<=3.7 {\ifentrytype{online}% {\nobreak\printtext{[}\nobreak#1\nobreak\printtext{\texttt{/}OL]}}% {\nobreak\printtext{[}\nobreak#1\nobreak\printtext{\iffieldundef{medium}{}{\texttt{/}\thefield{medium}}]}}% - }% + }}% + {\nobreak\printtext{[}\nobreak#1\nobreak\printtext{]}}% } - % % 新增用于报纸的文献类型标识符的格式 % \DeclareFieldFormat{gbtypeflagn}{%用于报纸newspaper -\iftoggle{bbx:url}% +\iftoggle{bbx:gbmedium}% +{\iftoggle{bbx:url}% {\iffieldundef{url}%当存在url时,增加一个OL标识符 {\nobreak\printtext{[}\nobreak N\printtext{\iffieldundef{medium}{}{\texttt{/}\thefield{medium}}]}\nobreak}% {\nobreak\printtext{[}\nobreak N\printtext{\texttt{/}OL]}\nobreak}% }% {\nobreak\printtext{[}\nobreak N\printtext{\iffieldundef{medium}{}{\texttt{/}\thefield{medium}}]}\nobreak}% +}{\nobreak\printtext{[}\nobreak N\printtext{]}\nobreak}% } - % % 新增用于标准的文献类型标识符的格式 % \DeclareFieldFormat{gbtypeflags}{%用于标准standard -\iftoggle{bbx:url}% +\iftoggle{bbx:gbmedium}% +{\iftoggle{bbx:url}% {\iffieldundef{url}%当存在url时,增加一个OL标识符 {\nobreak\printtext{[}\nobreak S\printtext{\iffieldundef{medium}{}{\texttt{/}\thefield{medium}}]}\nobreak}% {\nobreak\printtext{[}\nobreak S\printtext{\texttt{/}OL]}\nobreak}% }% {\nobreak\printtext{[}\nobreak S\printtext{\iffieldundef{medium}{}{\texttt{/}\thefield{medium}}]}\nobreak}% +}{\nobreak\printtext{[}\nobreak S\printtext{]}\nobreak}% } % 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 13d158fd938..0efdddd18d8 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 @@ -87,12 +87,26 @@ \DeclareDatamodelFields[type=field,datatype=literal]{shortbooktitle} \DeclareDatamodelFields[type=field,datatype=literal]{lansortorder} - + %因为biblatex更新3.14版本以后,biber对于为声明数据模型的条目类型 + %不再默认读取,而是以空字符串作为条目类型名,自然在条目定义alias时 + %就会出现问题,因此显式的声明一下newspaper,然后保留后面采用alias的方式 + %而standard类型则是采用另一种方式直接在sourcemap中转换为其它类型。 + \@ifpackagelater{biblatex}{2019/11/30}{%2019/12/01 v3.14 + \DeclareDatamodelEntrytypes{newspaper}% + }{} %===================================================================== % 设置宏包选项 %===================================================================== % + % 增加一个控制是否输出文献载体的选项 + % 20191125,v1,0s,hzz + \newtoggle{bbx:gbmedium} + \DeclareBibliographyOption{gbmedium}[true]{%biblatex低版本 + \settoggle{bbx:gbmedium}{#1}} + \ExecuteBibliographyOptions{gbmedium} + + % % 增加一个控制是否输出annotation域的选项,该域可以用于在文献条目后面输出一些注释信息 % 20190509,v1,0s,hzz \newtoggle{bbx:gbannote} @@ -1302,7 +1316,8 @@ % 而[]中间的内容,从4.6.2节的例子看也是可以分割的,因此内部的nobreak也可以去掉 % \DeclareFieldFormat{gbtypeflag}{% -\iftoggle{bbx:url}% +\iftoggle{bbx:gbmedium}% +{\iftoggle{bbx:url}% {\iffieldundef{url}%当存在url时,增加一个OL标识符 {\nobreak\printtext{[}\nobreak#1\nobreak\printtext{\iffieldundef{medium}{}{\texttt{/}\thefield{medium}}]}}% {\nobreak\printtext{[}\nobreak#1\nobreak\printtext{\texttt{/}OL]}}% @@ -1310,31 +1325,36 @@ {\ifentrytype{online}% {\nobreak\printtext{[}\nobreak#1\nobreak\printtext{\texttt{/}OL]}}% {\nobreak\printtext{[}\nobreak#1\nobreak\printtext{\iffieldundef{medium}{}{\texttt{/}\thefield{medium}}]}}% - }% + }}% + {\nobreak\printtext{[}\nobreak#1\nobreak\printtext{]}}% } % % 新增用于报纸的文献类型标识符的格式 % \DeclareFieldFormat{gbtypeflagn}{%用于报纸newspaper -\iftoggle{bbx:url}% +\iftoggle{bbx:gbmedium}% +{\iftoggle{bbx:url}% {\iffieldundef{url}%当存在url时,增加一个OL标识符 {\nobreak\printtext{[}\nobreak N\printtext{\iffieldundef{medium}{}{\texttt{/}\thefield{medium}}]}\nobreak}% {\nobreak\printtext{[}\nobreak N\printtext{\texttt{/}OL]}\nobreak}% }% {\nobreak\printtext{[}\nobreak N\printtext{\iffieldundef{medium}{}{\texttt{/}\thefield{medium}}]}\nobreak}% +}{\nobreak\printtext{[}\nobreak N\printtext{]}\nobreak}% } % % 新增用于标准的文献类型标识符的格式 % \DeclareFieldFormat{gbtypeflags}{%用于标准standard -\iftoggle{bbx:url}% +\iftoggle{bbx:gbmedium}% +{\iftoggle{bbx:url}% {\iffieldundef{url}%当存在url时,增加一个OL标识符 {\nobreak\printtext{[}\nobreak S\printtext{\iffieldundef{medium}{}{\texttt{/}\thefield{medium}}]}\nobreak}% {\nobreak\printtext{[}\nobreak S\printtext{\texttt{/}OL]}\nobreak}% }% {\nobreak\printtext{[}\nobreak S\printtext{\iffieldundef{medium}{}{\texttt{/}\thefield{medium}}]}\nobreak}% +}{\nobreak\printtext{[}\nobreak S\printtext{]}\nobreak}% } % 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 d92ac1daf92..81cf2b95b8e 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 @@ -27,6 +27,13 @@ % 功能函数 %===================================================================== % + % 增加一个控制是否输出文献载体的选项 + % 20191125,v1,0s,hzz + \newtoggle{bbx:gbmedium} + \DeclareBibliographyOption{gbmedium}[true]{%biblatex低版本 + \settoggle{bbx:gbmedium}{#1}} + \ExecuteBibliographyOptions{gbmedium} + % % 增加一个控制是否输出annotation域的选项,该域可以用于在文献条目后面输出一些注释信息 % 20190509,v1,0s,hzz \newtoggle{bbx:gbannote} @@ -110,7 +117,13 @@ \DeclareDatamodelFields[type=field,datatype=integer]{aysections} \DeclareDatamodelFields[type=field,datatype=literal]{styleaysection} - + %因为biblatex更新3.14版本以后,biber对于为声明数据模型的条目类型 + %不再默认读取,而是以空字符串作为条目类型名,自然在条目定义alias时 + %就会出现问题,因此显式的声明一下newspaper,然后保留后面采用alias的方式 + %而standard类型则是采用另一种方式直接在sourcemap中转换为其它类型。 + \@ifpackagelater{biblatex}{2019/11/30}{%2019/12/01 v3.14 + \DeclareDatamodelEntrytypes{newspaper}% + }{} @@ -1591,7 +1604,8 @@ % 而[]中间的内容,从4.6.2节的例子看也是可以分割的,因此内部的nobreak也可以去掉 % \DeclareFieldFormat{gbtypeflag}{% -\iftoggle{bbx:url}% +\iftoggle{bbx:gbmedium}% +{\iftoggle{bbx:url}% {\iffieldundef{url}%当存在url时,增加一个OL标识符 {\nobreak\printtext{[}\nobreak#1\nobreak\printtext{\iffieldundef{medium}{}{\texttt{/}\thefield{medium}}]}}% {\nobreak\printtext{[}\nobreak#1\nobreak\printtext{\texttt{/}OL]}}% @@ -1599,31 +1613,36 @@ {\ifentrytype{online}% {\nobreak\printtext{[}\nobreak#1\nobreak\printtext{\texttt{/}OL]}}% {\nobreak\printtext{[}\nobreak#1\nobreak\printtext{\iffieldundef{medium}{}{\texttt{/}\thefield{medium}}]}}% - }% + }}% + {\nobreak\printtext{[}\nobreak#1\nobreak\printtext{]}}% } % % 新增用于报纸的文献类型标识符的格式 % \DeclareFieldFormat{gbtypeflagn}{%用于报纸newspaper -\iftoggle{bbx:url}% +\iftoggle{bbx:gbmedium}% +{\iftoggle{bbx:url}% {\iffieldundef{url}%当存在url时,增加一个OL标识符 {\nobreak\printtext{[}\nobreak N\printtext{\iffieldundef{medium}{}{\texttt{/}\thefield{medium}}]}\nobreak}% {\nobreak\printtext{[}\nobreak N\printtext{\texttt{/}OL]}\nobreak}% }% {\nobreak\printtext{[}\nobreak N\printtext{\iffieldundef{medium}{}{\texttt{/}\thefield{medium}}]}\nobreak}% +}{\nobreak\printtext{[}\nobreak N\printtext{]}\nobreak}% } % % 新增用于标准的文献类型标识符的格式 % \DeclareFieldFormat{gbtypeflags}{%用于标准standard -\iftoggle{bbx:url}% +\iftoggle{bbx:gbmedium}% +{\iftoggle{bbx:url}% {\iffieldundef{url}%当存在url时,增加一个OL标识符 {\nobreak\printtext{[}\nobreak S\printtext{\iffieldundef{medium}{}{\texttt{/}\thefield{medium}}]}\nobreak}% {\nobreak\printtext{[}\nobreak S\printtext{\texttt{/}OL]}\nobreak}% }% {\nobreak\printtext{[}\nobreak S\printtext{\iffieldundef{medium}{}{\texttt{/}\thefield{medium}}]}\nobreak}% +}{\nobreak\printtext{[}\nobreak S\printtext{]}\nobreak}% } % |