diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ms.bbx')
-rw-r--r-- | Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ms.bbx | 102 |
1 files changed, 78 insertions, 24 deletions
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 186f5577869..13d158fd938 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 @@ -11,7 +11,7 @@ % % 版本和时间信息 % -\def\versionofgbtstyle{2019/03/28 v1.0r} +\def\versionofgbtstyle{2019/08/28 v1.0s} \def\versionofbiblatex{\abx@version} \ProvidesFile{gb7714-2015ms.bbx}[\versionofgbtstyle biblatex bibliography style] %\RequireBiber[3]%显式指定用biber后端,当用bibtex时会报错,但其实不会影响编译,只是采用bibtex后无法达成格式需求 @@ -93,6 +93,28 @@ % 设置宏包选项 %===================================================================== % + % 增加一个控制是否输出annotation域的选项,该域可以用于在文献条目后面输出一些注释信息 + % 20190509,v1,0s,hzz + \newtoggle{bbx:gbannote} + \DeclareBibliographyOption{gbannote}[false]{%biblatex低版本 + \settoggle{bbx:gbannote}{#1}} + \ExecuteBibliographyOptions{gbannote} + % + %用于在文献条目后面输出注释信息的宏 + %FieldFormat{annotation}用于设置注释信息的格式 + \DeclareFieldFormat{annotation}{% + \printtext{\addspace(#1)}% + } + \renewbibmacro*{annotation}{% + \iftoggle{bbx:gbannote}% + {\iffieldundef{annotation}% + {\printfile[annotation]{\bibannotationprefix\thefield{entrykey}.tex}}% + {\printfield{annotation}}}% + {}% + } + + + % % 增加一个控制是否输出type域的选项 % 20190212,v1,0q,hzz \newtoggle{bbx:gbfieldtype} @@ -101,6 +123,14 @@ \ExecuteBibliographyOptions{gbfieldtype} % + % 增加一个控制是否根据页码重设脚注数字标号的选项 + % 20190422,v1,0r,hzz + \newtoggle{bbx:gbfnperpage} + \DeclareBibliographyOption{gbfnperpage}[false]{% + \settoggle{bbx:gbfnperpage}{#1}} + \ExecuteBibliographyOptions{gbfnperpage} + + % % 增加一个选项,用于控制是否实现GB/T 7714-2015标准的脚注文献表 % 20190203,v1.0p,hzz % 原理方法:默认做patch,文献引用带圈上标数字表示,脚注中的文献用带圈非上标数字做标签 @@ -132,7 +162,9 @@ %重新实现脚注的根据单页重设脚注号码 %重新实现脚注的悬挂对齐问题,不再使用footmisc,直接从latex核心代码和hyperref代码进行修改 %v1.0q 20190317 hzz - \@addtoreset{footnote}{page}%重设计数器 + %v1.0r 20190422 hzz 根据gbfnperpage选项设置 + \iftoggle{bbx:gbfnperpage}% + {\@addtoreset{footnote}{page}}{}%重设计数器 \@ifpackageloaded{hyperref}{%加载hyperref则对\H@@footnotetext做重定义 \long\def\H@@footnotetext##1{\insert\footins{% @@ -218,16 +250,16 @@ %v1.0q 20190309 区分使脚注标注适应minipage中的情况 \newbibmacro*{citesavefn}{% \ifciteseen%当被引用过为true - {\ifcsdef{sec\arabic{refsection}et\thefield{entrykey}}%当已经定义过脚注序号信息 - {\csgdef{labelsec\arabic{refsection}et\thefield{entrykey}}{% - \str@sameentry\gdef\@thefnmark{\csuse{sec\arabic{refsection}et\thefield{entrykey}}}% + {\ifcsdef{sec\arabic{refsection}\arabic{page}et\thefield{entrykey}}%当已经定义过脚注序号信息 + {\csgdef{labelsec\arabic{refsection}\arabic{page}et\thefield{entrykey}}{% + \str@sameentry\gdef\@thefnmark{\csuse{sec\arabic{refsection}\arabic{page}et\thefield{entrykey}}}% \@makefnmark% }}% - {\csxdef{sec\arabic{refsection}et\thefield{entrykey}}{% + {\csxdef{sec\arabic{refsection}\arabic{page}et\thefield{entrykey}}{% \ifcsstring{@mpfn}{mpfootnote}{\@alph\c@mpfootnote}{\thefootnote}% }}% }% - {\csxdef{sec\arabic{refsection}et\thefield{entrykey}}{% + {\csxdef{sec\arabic{refsection}\arabic{page}et\thefield{entrykey}}{% \ifcsstring{@mpfn}{mpfootnote}{\@alph\c@mpfootnote}{\thefootnote}% %判断在minipage中比较麻烦,这里使用\@mpfn的定义进行判断 }}% @@ -244,8 +276,8 @@ {}{\setunit{\addcolon\addspace}\printfield{postnote}}}%与ay样式不同,由于已修改postnote域格式,直接用printfield }% {\usebibmacro{citesavefn}% - \ifcsdef{labelsec\arabic{refsection}et\thefield{entrykey}}% - {\csuse{labelsec\arabic{refsection}et\thefield{entrykey}}\nopunct}% + \ifcsdef{labelsec\arabic{refsection}\arabic{page}et\thefield{entrykey}}% + {\csuse{labelsec\arabic{refsection}\arabic{page}et\thefield{entrykey}}\nopunct}% {\usedriver{\DeclareNameAlias{sortname}{default}}{\thefield{entrytype}}}% }% {\multicitedelim}% @@ -571,7 +603,7 @@ %andothers = {et al.}, %将超过3个人名的省略,et al.改成为 等 andotherscn = {\str@andotherscn}, %将超过3个人名的省略,et al.改成为 等 andothersincitecn={\str@andotherscn},%将标注中的分开,便于与文献表中的区分 - andothersincite={et al.}, + andothersincite={et al\adddot}, backrefpage = {\str@backrefpage:}, backrefpages = {\str@backrefpages:}, in={in\intitlepunct}, @@ -589,6 +621,15 @@ editorcn={\str@editorcn}, } + % + % 增加两个命令用于临时的局部的修改本地化字符串 + % 其中\setlocalbibstring修改缩写字符串,setlocalbiblstring修改长字符串 + % 注意使用时因为是局部修改,因此要将其与需要修改的引用命令放在一个编组符号内 + % v1.0t,hzz,20190525 + \newcommand{\setlocalbibstring}[2]{% + \csdef{abx@sstr@#1}{#2}} + \newcommand{\setlocalbiblstring}[2]{% + \csdef{abx@lstr@#1}{#2}} %===================================================================== % 动态数据修改 @@ -1663,6 +1704,16 @@ \fi}% +% +% 修改series域的输出格式 +% 2019.05.01,v1.0r,byhzz +\renewbibmacro*{series+number}{% + \printfield{series}% + %\setunit*{\addspace}% + %\printfield{number}% + %\newunit + } + %===================================================================== %设置驱动格式 %===================================================================== @@ -1847,7 +1898,7 @@ togl{bbx:gbstyle} or test {\iffieldequalstr{userd}{chinese}}% % {}% %\newunit\newblock \iftoggle{bbx:eprint} - {\usebibmacro{eprint}} + {\iffieldundef{eprint}{}{\newunit\usebibmacro{eprint}}} {}% %\newunit\newblock \iftoggle{bbx:url} @@ -2284,7 +2335,7 @@ incollection,proceedings,inproceedings]{number}{% {\usebibmacro{related:init}% \usebibmacro{related}} {}% - \usebibmacro{finentry}}% + \usebibmacro{finentry}\usebibmacro{annotation}}% % % 期刊文章,连续出版物中的析出文献的格式 % @@ -2329,7 +2380,7 @@ incollection,proceedings,inproceedings]{number}{% {\usebibmacro{related:init}% \usebibmacro{related}} {}% - \usebibmacro{finentry}}% + \usebibmacro{finentry}\usebibmacro{annotation}}% % % 连续出版物的驱动 % @@ -2364,7 +2415,7 @@ incollection,proceedings,inproceedings]{number}{% {\usebibmacro{related:init}% \usebibmacro{related}} {}% - \usebibmacro{finentry}}% + \usebibmacro{finentry}\usebibmacro{annotation}}% % % 专利文献驱动 % @@ -2406,7 +2457,7 @@ incollection,proceedings,inproceedings]{number}{% {\usebibmacro{related:init}% \usebibmacro{related}} {}% - \usebibmacro{finentry}}% + \usebibmacro{finentry}\usebibmacro{annotation}}% % % 在线文献驱动 % @@ -2451,7 +2502,7 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{ {\usebibmacro{related:init}% \usebibmacro{related}} {}% - \usebibmacro{finentry}}% + \usebibmacro{finentry}\usebibmacro{annotation}}% % % 报告类型驱动 % 2016-11-11,增加了译者信息 @@ -2499,7 +2550,7 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{ {\usebibmacro{related:init}% \usebibmacro{related}} {}% - \usebibmacro{finentry}}% + \usebibmacro{finentry}\usebibmacro{annotation}}% % % 手册类型驱动 % 2016-11-11,增加了译者信息 @@ -2551,7 +2602,7 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{ {\usebibmacro{related:init}% \usebibmacro{related}} {}% - \usebibmacro{finentry}}% + \usebibmacro{finentry}\usebibmacro{annotation}}% % % 备选类型驱动 % @@ -2591,7 +2642,7 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{ {\usebibmacro{related:init}% \usebibmacro{related}} {}% - \usebibmacro{finentry}}% + \usebibmacro{finentry}\usebibmacro{annotation}}% % % 专著中的析出文献的格式修改 % @@ -2608,8 +2659,10 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{ \ifnameundef{editor}{}{\newunit}% }{\newunit}%替换下一句 %\newunit\newblock +\iffieldundef{series}{}{\usebibmacro{series+number}\setunit{\addcolon\addspace}}%为处理一些存在series的情况而增加 \usebibmacro{maintitle+booktitle}% - \setunit{\addcolon}\printfield{volume}\printfield{number}%增加卷和册信息 +\iffieldundef{volume}{}{\setunit{\addcolon\addspace}\printfield{volume}}% +\iffieldundef{number}{}{\setunit{\addcolon\addspace}\printfield{number}}%增加卷和册信息 \newunit\newblock% % \usebibmacro{byeditor+others}% % \newunit\newblock @@ -2621,9 +2674,10 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{ % \printfield{part}} % {}% % \newunit - \printfield{volumes}% - \newunit\newblock - \usebibmacro{series+number}}% +% \printfield{volumes}% +% \newunit\newblock +% \usebibmacro{series+number} + }% \newunit\newblock %\printfield{note}% %\newunit\newblock @@ -2647,7 +2701,7 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{ {\usebibmacro{related:init}% \usebibmacro{related}} {}% - \usebibmacro{finentry}}% + \usebibmacro{finentry}\usebibmacro{annotation}}% }{}% } |