texlive[66929] Master/texmf-dist: biblatex-gb7714-2015 (24apr23)
commits+karl at tug.org
commits+karl at tug.org
Mon Apr 24 22:15:38 CEST 2023
Revision: 66929
http://tug.org/svn/texlive?view=revision&revision=66929
Author: karl
Date: 2023-04-24 22:15:38 +0200 (Mon, 24 Apr 2023)
Log Message:
-----------
biblatex-gb7714-2015 (24apr23)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/biblatex-gb7714-2015/README.md
trunk/Master/texmf-dist/doc/latex/biblatex-gb7714-2015/biblatex-gb7714-2015.pdf
trunk/Master/texmf-dist/doc/latex/biblatex-gb7714-2015/biblatex-gb7714-2015.tex
trunk/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/chinese-css.bbx
trunk/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/chinese-css.cbx
trunk/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/chinese-erj.cbx
trunk/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015.bbx
trunk/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ay.bbx
Added Paths:
-----------
trunk/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/chinese-jmw.bbx
trunk/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/chinese-jmw.cbx
Modified: trunk/Master/texmf-dist/doc/latex/biblatex-gb7714-2015/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/biblatex-gb7714-2015/README.md 2023-04-24 20:15:03 UTC (rev 66928)
+++ trunk/Master/texmf-dist/doc/latex/biblatex-gb7714-2015/README.md 2023-04-24 20:15:38 UTC (rev 66929)
@@ -1,4 +1,4 @@
-<b>Date of last change: 2023-03-31 to version v1.1l</b>
+<b>Date of last change: 2023-04-24 to version v1.1m</b>
# biblatex-gb7714-2015: a biblatex style package
@@ -1313,6 +1313,8 @@
- ![codeopt-gbcodegbk.tex](example/codeopt-gbcodegbk.tex) 测试gb7714-2015、ay样式,对于GBK编码文档的兼容性
- ![teststyleerj.tex](example/teststyleerj.tex) 测试chinese-erj样式
- ![teststylecss.tex](example/teststylecss.tex) 测试chinese-css样式
+ - ![teststylecss.tex](example/teststylecssorg.tex) 测试chinese-css样式
+ - ![teststylecss.tex](example/teststylejmw.tex) 测试chinese-jmw样式
- ![eg-opt-gbstyle.tex](example/eg-opt-gbstyle.tex) 测试gb7714-2015ms样式一篇文档中中英文两种格式设置,多语言对照,多语言混合文献表
- ![testallformat.tex](example/testallformat.tex) 测试全面的类型、格式
- ![egtest.tex](example/egtest.tex) 测试示例
@@ -1597,6 +1599,7 @@
* 2022/08/29 v1.1j,ctan,github
* 2022/11/07 v1.1k,ctan,github
* 2023/03/31 v1.1l,ctan,github
+* 2023/04/24 v1.1m,ctan,github
---------------------------------------------------------
## Update history:
Modified: trunk/Master/texmf-dist/doc/latex/biblatex-gb7714-2015/biblatex-gb7714-2015.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/biblatex-gb7714-2015/biblatex-gb7714-2015.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/biblatex-gb7714-2015/biblatex-gb7714-2015.tex 2023-04-24 20:15:03 UTC (rev 66928)
+++ trunk/Master/texmf-dist/doc/latex/biblatex-gb7714-2015/biblatex-gb7714-2015.tex 2023-04-24 20:15:38 UTC (rev 66929)
@@ -6,6 +6,9 @@
\documentclass[11pt]{article} %用draft选项找到badbox的位置 twoside,
\input{biblatex-gb7714-2015-preamble} %宏包和一些格式设置
\usepackage{microtype}
+\usepackage{datetime}
+\renewcommand{\dateseparator}{-}
+\yyyymmdddate
%\usepackage[russian,french,english]{babel}
%\DefineHyphenationExceptions{english}{conf-erence}
\begin{document}
@@ -22,18 +25,19 @@
\pagenumbering{Roman}
\titleformanual{符合GB/T 7714-2015标准的biblatex参考文献样式
-\footnote{This Manual was created with biblatex v\versionofbiblatex, last revised at \today;\\%
+\footnote{This Manual was first created at 2016-07-01 and revised at \today ~with biblatex v\versionofbiblatex;\\%
Style Files (gb7714-2015*.*) have version number: \versionofgbtstyle.}
\footnote{repository address: \url{https://github.com/hushidong/biblatex-gb7714-2015}}}
\authorformanual{胡振震\setcounter{footnote}{0}\footnote{Email: hzzmail at 163.com}}
-\dateformanual{2016-07-01}
+\dateformanual{\today}
\titleandauthor
\begin{quotation}
-biblatex-gb7714-2015 宏包是为满足《GB/T 7714-2015~~信息与文献~~参考文献著录规则》要求而开发的 biblatex 样式包。宏包提供两种编制样式: 一、顺序编码制(gb7714-2015);二、著者-出版年制(gb7714-2015ay),能够精确地实现国标提出的著录和标注格式,且具备易用、兼容、灵活等特点,能为国内\LaTeX{}用户提供一个可靠的参考文献生成工具。
+biblatex-gb7714-2015 宏包是为满足《GB/T 7714-2015~~信息与文献~~参考文献著录规则》要求而开发的 biblatex 样式包。宏包主要提供两种编制样式: 一、顺序编码制(gb7714-2015);二、著者-出版年制(gb7714-2015ay),能够精确地实现国标提出的著录和标注格式。另外提供gb7714-2005和gb7714-1987两个老版本的国标样式,和经济学研究(chinese-erj)、社会科学(chinese-css)、管理世界(chinese-jmw)等期刊的文献样式,以及西北农林(gb7714-NWAFU)、华中师范(gb7714-CCNU)、东南大学(gb7714-SEU)等几个明显有别于国标的特殊学位论文文献样式。
+具备灵活、易用、兼容性好等特点,能为国内\LaTeX{}用户提供一个可靠的参考文献生成工具。
%old:
%biblatex-gb7714-2015 样式宏包提供了符合《GB/T 7714-2015 信息与文献 参考文献
%著录规则》要求的 biblatex 参考文献样式。分为两种编制方式: 一、顺序编码制;二、著
@@ -152,7 +156,7 @@
\zd{gb7714-2015ms.bbx/cbx}是混合样式,支持区分中英文语言分设不同标准的著录格式。
\zd{gb7714-2015mx.bbx/cbx}是混合样式,支持在不同的参考文献分节中使用不同的编制样式,比如有的节使用顺序编码制,有的节使用著者年份制。
\zd{gb7715-2015-gbk.def}为GBK编码文档编译所需的支撑文件。
-\zd{chinese-erj.bbx/cbx} 是经济学研究期刊的文献样式。后三者仅支持较新的biblatex版本。
+\zd{chinese-erj.bbx/cbx}、\zd{chinese-css.bbx/cbx}、\zd{chinese-jmw.bbx/cbx} 是经济学研究、社会科学、管理世界期刊的文献样式。%后三者仅支持较新的biblatex版本。
\zd{biblatex-gb7714-2015.tex} 为宏包说明文档,\zd{example}目录下为各种选项的测试用例,
\zd{egfigure}目录下为说明文档中的图例文档,\zd{egthesis}为国内一些大学学位论文文献样式的测试用例,包括完全按照国标的BUPT、CAU、ECNU、FDU、SJTU、THU、USTC、XJTU、ZJU,与国标略有差异的UCAS,以及与国标有较大差异的NWAFU、SEU等。\zd{*.bat}、\zd{*.sh}分别为windows和linux下说明文档的编译脚本。\zd{*.pl}为gb7714格式著录文献表到bib文件的perl转换脚本,\zd{*.dat}为转换测试文献表。
@@ -174,13 +178,13 @@
\draw[color=cyan,thick] (script.north) -- ($(script.north)+(0mm,3mm)$) ;
\draw[color=cyan,thick] ($(style.north)+(0mm,3mm)$) -- ($(script.north)+(0mm,3mm)$);
-\node[below of=style,fill=gbgrey!20,yshift=0.5cm,xshift=2mm,text width=2cm] (numcbbx) {\tiny \textcolor{black}{gb7715-2015/ay.c/bbx}};
-\node[below of=numcbbx,fill=gbgrey!20,yshift=8mm,text width=2cm] (aycbbx) {\tiny \textcolor{black}{gb7715-1987/ay.c/bbx}};
-\node[below of=aycbbx,fill=gbgrey!20,yshift=8mm,text width=2cm] (mscbbx) {\tiny \textcolor{black}{gb7715-2015ms.c/bbx}};
-\node[below of=mscbbx,fill=gbgrey!20,yshift=8mm,text width=2cm] (mxcbbx) {\tiny \textcolor{black}{gb7715-2015mx.c/bbx}};
-\node[below of=mxcbbx,fill=gbgrey!20,yshift=8mm,text width=2cm] (gbkdef) {\tiny \textcolor{black}{gb7715-2005/ay.c/bbx}};
-\node[below of=gbkdef,fill=gbgrey!20,yshift=8mm,text width=2cm] (erjcbbx) {\tiny \textcolor{black}{chinese-erj.c/bbx}};
-\node[below of=erjcbbx,fill=gbgrey!20,yshift=8mm,text width=2cm] (csscbbx) {\tiny \textcolor{black}{chinese-css.c/bbx}};
+\node[below of=style,fill=gbgrey!20,yshift=0.5cm,xshift=2mm,text width=2.5cm] (numcbbx) {\tiny \textcolor{black}{gb7715-2015/ay.c/bbx}};
+\node[below of=numcbbx,fill=gbgrey!20,yshift=8mm,text width=2.5cm] (aycbbx) {\tiny \textcolor{black}{gb7715-1987/ay.c/bbx}};
+\node[below of=aycbbx,fill=gbgrey!20,yshift=8mm,text width=2.5cm] (mscbbx) {\tiny \textcolor{black}{gb7715-2015ms.c/bbx}};
+\node[below of=mscbbx,fill=gbgrey!20,yshift=8mm,text width=2.5cm] (mxcbbx) {\tiny \textcolor{black}{gb7715-2015mx.c/bbx}};
+\node[below of=mxcbbx,fill=gbgrey!20,yshift=8mm,text width=2.5cm] (gbkdef) {\tiny \textcolor{black}{gb7715-2005/ay.c/bbx}};
+\node[below of=gbkdef,fill=gbgrey!20,yshift=8mm,text width=2.5cm] (erjcbbx) {\tiny \textcolor{black}{chinese-erj.c/bbx}};
+\node[below of=erjcbbx,fill=gbgrey!20,yshift=8mm,text width=2.5cm] (csscbbx) {\tiny \textcolor{black}{chinese-css.c/bbx等}};
%\node[below of=msbbx,fill=gbgrey!20,yshift=8mm,text width=2cm] (mscbx) {\tiny \textcolor{black}{gb7715-2015ms.cbx}};
\draw[color=blue,semithick] (numcbbx.west) -- ($(numcbbx.west)+(-3mm,0mm)$) ;
@@ -192,7 +196,7 @@
\draw[color=blue,semithick] (csscbbx.west) -- ($(csscbbx.west)+(-3mm,0mm)$) ;
%\draw[color=blue,semithick] (mscbx.west) -- ($(mscbx.west)+(-3mm,0mm)$) ;
-\draw[color=blue,semithick] ($(csscbbx.west)+(-3mm,0mm)$) -- ($(style.center)+(-12mm,-2.5mm)$);
+\draw[color=blue,semithick] ($(csscbbx.west)+(-3mm,0mm)$) -- ($(style.center)+(-14.5mm,-2.5mm)$);
\node[below of=manual,fill=gbsteelblue!15,yshift=0.5cm,xshift=2mm,text width=2.8cm] (mtex) {\tiny \textcolor{black}{biblatex-gb7714-2015.tex}};
\node[below of=mtex,fill=gbsteelblue!15,yshift=8mm,text width=2.8cm] (mpdf) {\tiny \textcolor{black}{biblatex-gb7714-2015.pdf}};
@@ -227,16 +231,7 @@
\subsection{最小示例}
基于biblatex宏包的参考文献生成方法非常简单,例 \ref{code:doc:structrue} 是一个最小工作示例。示例代码中给出了详细注释,介绍了使用biblatex 的tex源文档基本结构,其中gb7714-2015 样式随biblatex宏包加载,
-参考文献数据文件example.bib(bib文件需另外准备,详见\ref{sec:bib:bibtex}节)利用 \verb|\addbibresource|加载,文献表利用 \verb|\printbibliography| 命令输出(可在正文任意位置)。所有基于 biblatex 生成参考文献的文档无论大小万变不离其宗。
-若需更全面了解biblatex及参考文献生成高级功能另可参考:
-\href{https://github.com/plk/biblatex}{biblatex宏包手册}
-\footnote{地址:\url{https://github.com/plk/biblatex}}、
-\href{https://github.com/hushidong/biblatex-zh-cn}{中文版}
-\footnote{地址:\url{https://github.com/hushidong/biblatex-zh-cn}}
-或者
-\href{https://github.com/hushidong/biblatex-solution-to-latex-bibliography}{LaTeX 文档中文参考文献的biblatex解决方案}
-\footnote{地址:%
-\url{https://github.com/hushidong/biblatex-solution-to-latex-bibliography}}。
+参考文献数据文件example.bib利用 \verb|\addbibresource|加载 (注意:bib文件需另外准备,详见\ref{sec:bib:bibtex}节),文献表利用 \verb|\printbibliography| 命令输出(可在正文任意位置)。
\begin{example}{biblatex参考文献生成的最小工作示例}{code:doc:structrue}
\begin{texlist}
@@ -260,29 +255,8 @@
\end{texlist}
\end{example}
-
-
-\subsection{编译方式}
-
-与基于bibtex传统方法的四步编译不同,基于biblatex生成参考文献一般只需三步编译,第一遍xelatex,第二遍biber,第三遍xelatex。如若需要后向超链接,则除设置backref 选项外,还需第四遍 xelatex 编译。例\ref{eg:compile:cmd} 给出编译命令,其中\verb|--synctex=-1| 选项也可以是-synctex=1。另外四步命令可以用一条 latexmk 命令代替。
-关于非utf-8编码文档和使用pdflatex命令编译的细节另见第\ref{sec:pkg:hints}节。
-
-\begin{example}{文档编译命令}{eg:compile:cmd}
-\begin{texlist}
-%四步编译命令
-xelatex --synctex=-1 jobname.tex
-biber jobname
-xelatex --synctex=-1 jobname.tex
-xelatex --synctex=-1 jobname.tex
-%或采用latexmk,则仅需一条命令
-latexmk -xelatex jobname.tex
-\end{texlist}
-\end{example}
-
-前述的最小工作示例的编译结果如图\ref{fig:eg:ref}所示。
-
-\begin{refsection}
-\begin{figure}[!htb]
+%\begin{refsection}
+\begin{figure}[!h]
\centering
%\begin{tcolorbox}[left skip=0pt,right skip=0pt,%
%width=\linewidth,colframe=gblabelcolor,colback=white,arc=0pt,%
@@ -305,9 +279,38 @@
%\end{tcolorbox}
\caption{最小工作示例编译生成的PDF文档}\label{fig:eg:ref}
\end{figure}
-\end{refsection}
+%\end{refsection}
+上述最小工作示例的编译结果如图\ref{fig:eg:ref}所示。所有基于 biblatex 生成参考文献的文档无论大小万变不离其宗,
+若需更全面了解biblatex及参考文献生成高级功能另可参考:
+\href{https://github.com/plk/biblatex}{biblatex宏包手册}
+\footnote{地址:\url{https://github.com/plk/biblatex}}、
+\href{https://github.com/hushidong/biblatex-zh-cn}{中文版}
+\footnote{地址:\url{https://github.com/hushidong/biblatex-zh-cn}}
+或者
+\href{https://github.com/hushidong/biblatex-solution-to-latex-bibliography}{LaTeX 文档中文参考文献的biblatex解决方案}
+\footnote{地址:%
+\url{https://github.com/hushidong/biblatex-solution-to-latex-bibliography}}。
+
+\subsection{编译方式}
+
+与基于bibtex传统方法的四步编译不同,基于biblatex生成参考文献一般只需三步编译,第一遍xelatex,第二遍biber,第三遍xelatex。如若需要后向超链接,则除设置backref 选项外,还需第四遍 xelatex 编译。例\ref{eg:compile:cmd} 给出编译命令,其中\verb|--synctex=-1| 选项也可以是-synctex=1。另外四步命令可以用一条 latexmk 命令代替。
+关于非utf-8编码文档和使用pdflatex命令编译的细节另见第\ref{sec:pkg:hints}节。
+
+\begin{example}{文档编译命令}{eg:compile:cmd}
+\begin{texlist}
+%四步编译命令
+xelatex --synctex=-1 jobname.tex
+biber jobname
+xelatex --synctex=-1 jobname.tex
+xelatex --synctex=-1 jobname.tex
+%或采用latexmk,则仅需一条命令
+latexmk -xelatex jobname.tex
+\end{texlist}
+\end{example}
+
+
\section{使用说明}
\subsection{样式及选项加载}
@@ -370,10 +373,39 @@
\end{texlist}
\end{example}
-其中,v1.0m版本增加的gb7714-2015ms样式文件,主要是为了在一个文献表中针对不同语言使用不同多种样式,比如中文文献使用GB/T 7714-2015规定的著录格式,而其它语言文献使用biblatex提供的标准样式。v1.0r版本增加了gb7714-2015mx样式,主要是为了在一个文档中针对不同参考文献分节使用不同的参考文献样式,比如某些节使用著者年份制,某些节使用顺序编码制。尽管这些方式不常用,但偶尔也有需求,所以都做了实现。
+其中,
+v1.0m版本增加的gb7714-2015ms样式文件,主要是为了在一个文献表中针对不同语言使用不同的样式,比如中文文献使用GB/T 7714-2015规定的著录格式,而其它语言文献使用biblatex提供的标准样式。
+v1.0r版本增加了gb7714-2015mx样式,主要是为了在一个文档中针对不同参考文献分节使用不同的参考文献样式,比如某些节使用著者年份制,某些节使用顺序编码制。
+%尽管这些方式不常用,但偶尔也有需求,所以都做了实现。
-另外根据需求,v1.0r版本增加了chinese-erj样式用于生成经济研究期刊的文献,v1.1l版本增加了chinese-css样式用于生成社会科学期刊的脚注注释。且在egthesis文件夹内,针对国内一些大学的学位论文文献要求,基于国标样式做了一些定制和测试。
+尽管国标1987和2005版本已经过时,但仍然有些地方还在使用,所以1.0z版本增加了gb7714-1987和gb7714-2005两个版本的样式,也分顺序编码和著者年份制:
+\pdfbookmark[4]{gb7714-1987}{gb7714-1987}
+\pdfbookmark[4]{gb7714-1987ay}{gb7714-1987ay}
+\pdfbookmark[4]{gb7714-2005}{gb7714-2005}
+\pdfbookmark[4]{gb7714-2005ay}{gb7714-2005ay}
+\begin{example}{1987和2005版的国标样式}{eg:gb87and2005}
+\begin{texlist}
+%国标1987顺序编码制
+\usepackage[backend=biber,style=gb7714-1987]{biblatex}
+%国标1987著者年份制
+\usepackage[backend=biber,style=gb7714-1987ay]{biblatex}
+%国标2005顺序编码制
+\usepackage[backend=biber,style=gb7714-2005]{biblatex}
+%国标2005著者年份制
+\usepackage[backend=biber,style=gb7714-2005ay]{biblatex}
+\end{texlist}
+\end{example}
+
+
+另外,根据国内大学的学位论文的文献生成需求,增加了几个与国标有明显区别的样式,包括:西北农林(gb7714-NWAFU)、华中师范(gb7714-CCNU)、东南大学(gb7714-SEU)等。其他大学的文献样式与国标基本一致,比如上海交大、浙大、复旦等,直接使用即可。另外一些大学与国标略有差别,可以通过简单的设置满足要求,比如清华、科学院大学、中科大、国防科大等,通常在学位论文模板中实现,在egthesis文件夹内,针对一些大学的学位论文参考文献做了测试。
+
+此外,根据期刊文献生成需求,为文科类期刊增加了如下样式:
+v1.0r版本增加了chinese-erj样式用于生成经济研究期刊的文献;
+v1.1l版本增加了chinese-css样式用于生成社会科学期刊的脚注注释;
+v1.1m版本增加了chinese-jmw样式用于生成管理世界期刊的文献。
+而理工类期刊文献通常与国标差别不大,部分期刊与国标的最大的差异主要是在双语对照文献中,比如计算机学报等,可以通过简单的设置来满足要求,具体可以参考github上的问题。
+
\pdfbookmark[4]{chinese-erj}{chinese-erj}
\begin{example}{经济研究期刊文献样式(chinese-erj)}{eg:gbchineseerj}
\begin{texlist}
@@ -390,26 +422,17 @@
\end{texlist}
\end{example}
-尽管国标1987和2005版本已经过时,但仍然有些地方还在使用,所以1.0z版本增加了gb7714-1987和gb7714-2005两个版本的样式,也分顺序编码和著者年份制:
-\pdfbookmark[4]{gb7714-1987}{gb7714-1987}
-\pdfbookmark[4]{gb7714-1987ay}{gb7714-1987ay}
-\pdfbookmark[4]{gb7714-2005}{gb7714-2005}
-\pdfbookmark[4]{gb7714-2005ay}{gb7714-2005ay}
-\begin{example}{1987和2005版的国标样式}{eg:gb87and2005}
+\pdfbookmark[4]{chinese-jmw}{chinese-jmw}
+\begin{example}{管理世界期刊文献样式(chinese-jmw)}{eg:gbchinesejmw}
\begin{texlist}
-%国标1987顺序编码制
-\usepackage[backend=biber,style=gb7714-1987]{biblatex}
-%国标1987著者年份制
-\usepackage[backend=biber,style=gb7714-1987ay]{biblatex}
-%国标2005顺序编码制
-\usepackage[backend=biber,style=gb7714-2005]{biblatex}
-%国标2005著者年份制
-\usepackage[backend=biber,style=gb7714-2005ay]{biblatex}
+%使用社会科学期刊文献样式
+\usepackage[backend=biber,style=chinese-jmw]{biblatex}
\end{texlist}
\end{example}
+
\subsubsection{新增选项}\label{sec:added:opt}
样式包新增了一些选项和命令,新增选项更常用一些,所以在本节集中介绍,而新增命令往往涉及更细节的修改,所以在后面介绍各类格式调整的内容中介绍。
新增选项用于标签对齐方式、出版项缺省处理、责任者(作者)缺省处理等功能的控制,其使用方式与biblatex宏包选项完全相同:
@@ -980,9 +1003,9 @@
\pdfbookmark[4]{gbfootbibfmt}{gbfootbibfmt}
\item[gbfootbibfmt]=true,\textbf{false}. \hfill default is false
- 如果要实现脚注文献表,但不想要国标要求的脚注符号和缩进,但要求相同文献用标签替代,则可使用gbfootbibfmt代替上面的gbfootbib选项。
+ 如果不想要默认的脚注符号和缩进,但要实现脚注文献表且脚注中相同文献用标签替代等国标要求,则可使用gbfootbibfmt代替上面的gbfootbib选项。
\begin{itemize}
- \item gbfootbibfmt=true,处理使脚注文献表中的相同的文献用标签代替。
+ \item gbfootbibfmt=true,实现脚注文献表及相同文献用标签代替等国标要求,但不设置脚注符号和缩进,用户可自行通过其它方式或宏包设置需要的符号和缩进形式。
\item gbfootbibfmt=false,不做任何附加处理。
\end{itemize}
Modified: trunk/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/chinese-css.bbx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/chinese-css.bbx 2023-04-24 20:15:03 UTC (rev 66928)
+++ trunk/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/chinese-css.bbx 2023-04-24 20:15:38 UTC (rev 66929)
@@ -38,6 +38,7 @@
doi=false,
url=false,
gbfieldtype=true,
+ dateabbrev=false,
%datezeros=false,
}
@@ -73,13 +74,14 @@
%为标注和文献表中标点格式,重设and本地化字符串
%==================================================
\DefineBibliographyStrings{english}{
-% and = { and},%and后面的空格在finalnamedelim已经加过了,所以这里去掉20191009
+ and = {\ifcitation{ and}{\addcomma\addspace}},%and后面的空格在finalnamedelim已经加过了,所以这里去掉20191009
% andcn = {\gbpunctmark\unspace},%\gbpunctmark
% andincitecn = {和},%将标注中的分开,便于与文献表中的区分
-% andincite = {\&},
+ %andincite = { and },
%andotherscn={等},
mathesiscn={硕士学位论文},
phdthesiscn={博士学位论文},
+ bytranslator= {\ifcitation{trans\adddot\space}{trans\adddot\ \lbx at sfromlang\ by}},
}
@@ -92,11 +94,15 @@
%\DeclareFieldFormat*{booktitle}{\gbpunctttl#1\gbpunctttr}
\DeclareFieldFormat*{title}{%
\ifcitation{\iffieldequalstr{userd}{chinese}{\gbpunctttl#1\gbpunctttr}{\textit{#1}\isdot}}{#1\isdot}}
-\DeclareFieldFormat[article]{title}{%
+\DeclareFieldFormat[archive]{title}{%
+\ifcitation{\iffieldequalstr{userd}{chinese}{\gbpunctttl#1\gbpunctttr}{#1\isdot}}{#1\isdot}}
+\DeclareFieldFormat[article,incollection,inbook,inproceedings]{title}{%
\ifcitation{\iffieldequalstr{userd}{chinese}{\gbpunctttl#1\gbpunctttr}{\mkbibquote{#1}\isdot}}%
{#1\adddot\addthinspace}}
\DeclareFieldFormat*{journaltitle}{%
\ifcitation{\iffieldequalstr{userd}{chinese}{\gbpunctttl#1\gbpunctttr}{\textit{#1}}}{#1\isdot}}%
+\DeclareFieldFormat{booktitle}{%
+\ifcitation{\iffieldequalstr{userd}{chinese}{\gbpunctttl#1\gbpunctttr}{\textit{#1}}}{#1}}
\renewcommand*{\revsdnamepunct}{%
\ifcitation{\iffieldequalstr{userd}{chinese}{\gbpunctcomma}{\gbpunctcommalanen}}{}}
\DeclareDelimFormat{multinamedelim}{%
@@ -196,9 +202,6 @@
\DeclareDelimFormat{finalpunct}{\iffieldequalstr{userd}{chinese}{\gbpunctdot}{\adddot}}
\DeclareDelimFormat[fullinnercite]{finalpunct}{}
-\DeclareFieldFormat{booktitle}{%
-\ifcitation{\iffieldequalstr{userd}{chinese}{\gbpunctttl#1\gbpunctttr}{#1}}{#1}}
-
%出版项中:出版社地址后面的标点
\renewcommand{\publocpunct}{%
\ifcitation{\iffieldequalstr{userd}{chinese}{\gbpunctcolon}{\addcolon\addspace}}{\addcolon\addspace}%
@@ -205,28 +208,154 @@
}
%调整出版社与年份之间的标点
\renewcommand{\pubdatadelim}{%
-\ifcitation{\iffieldequalstr{userd}{chinese}{\gbpunctcomma}{\setunit*{\addcomma\space}}}%
+\ifcitation{\iffieldequalstr{userd}{chinese}{\iffieldundef{year}{}{\setunit*{\gbpunctcomma}}}{\setunit*{\addcomma\space}}}%
{\setunit*{\addcomma\space}}%
}
+\renewcommand{\locnopubdelim}{%
+\ifcitation{\iffieldequalstr{userd}{chinese}{\iffieldundef{year}{}{\setunit*{\gbpunctcomma}}}{\setunit*{\addcomma\space}}}%
+{\setunit*{\addcomma\space}}%
+}
+%编者与编者类型之间的标点
+\DeclareDelimFormat{editortypedelim}{\iffieldequalstr{userd}{chinese}{}{\addcomma\space}}
+
+%子标题前的标点
+\renewcommand*{\subtitlepunct}{%
+\ifcitation{\iffieldequalstr{userd}{chinese}{}{\addcolon\addspace}}{\addcolon\addspace}}
+
%==================================================
%调整部分域的输出格式
%==================================================
+%重新调整输出编者的类型
+\renewbibmacro*{editor+others}{%
+ \ifcitation{\ifboolexpr{
+ test \ifuseeditor
+ and
+ not test {\ifnameundef{editor}}
+ }
+ {\printnames{editor}%
+ \setunit{\printdelim{editortypedelim}}%
+ \usebibmacro{editor+othersstrg}%
+ \clearname{editor}}%
+ {}}%
+ {\ifboolexpr{%
+ test \ifuseeditor
+ and
+ not test {\ifnameundef{editor}}
+ }%
+ {\printnames{editor}%
+ \clearname{editor}}
+ {}}%
+ }
+
+\renewbibmacro*{editor+othersstrg}{%
+ \iffieldundef{editortype}
+ {\ifboolexpr{
+ test {\ifnumgreater{\value{editor}}{1}}
+ or
+ test {\ifandothers{editor}}
+ }
+ {\def\abx at tempa{editors}}
+ {\def\abx at tempa{editor}}}
+ {\ifboolexpr{
+ test {\ifnumgreater{\value{editor}}{1}}
+ or
+ test {\ifandothers{editor}}
+ }
+ {\edef\abx at tempa{\thefield{editortype}s}}
+ {\edef\abx at tempa{\thefield{editortype}}}}%
+ \let\abx at tempb=\empty
+ \ifnamesequal{editor}{translator}
+ {\appto\abx at tempa{tr}%
+ \appto\abx at tempb{\clearname{translator}}}
+ {}%
+ \ifnamesequal{editor}{commentator}
+ {\appto\abx at tempa{co}%
+ \appto\abx at tempb{\clearname{commentator}}}
+ {\ifnamesequal{editor}{annotator}
+ {\appto\abx at tempa{an}%
+ \appto\abx at tempb{\clearname{annotator}}}
+ {}}%
+ \ifnamesequal{editor}{introduction}
+ {\appto\abx at tempa{in}%
+ \appto\abx at tempb{\clearname{introduction}}}
+ {\ifnamesequal{editor}{foreword}
+ {\appto\abx at tempa{fo}%
+ \appto\abx at tempb{\clearname{foreword}}}
+ {\ifnamesequal{editor}{afterword}
+ {\appto\abx at tempa{af}%
+ \appto\abx at tempb{\clearname{afterword}}}
+ {}}}%
+ \ifbibxstring{\abx at tempa}
+ {\printtext[editortype]{%
+ \iffieldequalstr{userd}{chinese}{\bibstring{\abx at tempa cn}}{\bibstring{\abx at tempa}}%
+ }\abx at tempb}
+ {\usebibmacro{editorstrg}}}
+
+%去掉译前的标点
+\renewbibmacro*{name:andothers}{\bibauthorfont%
+\ifcitation{\ifboolexpr{test {\ifnumequal{\value{listcount}}{\value{liststop}}}
+ and test \ifmorenames}
+ {\ifnumgreater{\value{liststop}}{1}%注意这里试图去区分姓名总数大于1的情况,当姓名总数大于1时,最后一个姓名后面先加入一个\finalandcomma
+ {}{}%\finalandcomma,目前国标没有这样的区分要求,如果有需要也是可以这么去做的。
+ \printdelim{andothersdelim}\printdelim{strandothersdelim}}%
+ {}}%
+{\ifboolexpr{test {\ifnumequal{\value{listcount}}{\value{liststop}}}
+ and test \ifmorenames}
+ {\ifnumgreater{\value{liststop}}{1}%注意这里试图去区分姓名总数大于1的情况,当姓名总数大于1时,最后一个姓名后面先加入一个\finalandcomma
+ {}%\finalandcomma,目前国标没有这样的区分要求,如果有需要也是可以这么去做的。
+ {}%
+ \printdelim{andothersdelim}\printdelim{strandothersdelim}%
+ }%
+ {%当是译者的时候需要特殊处理:从7.2节看等,译前面加逗号,但从示例看等和译同时出现时,译前的逗号没有,比如:
+ %袁训来, 陈哲, 肖书海, 等.
+ %胡泳, 范海燕, 译.
+ %潘惠霞, 魏婧, 杨艳, 等译.
+ \ifnumequal{\value{listcount}}{\value{liststop}}%
+ {\ifcurrentname{translator}{\iffieldequalstr{usere}{chinese}{\aftertransdelim}{}}{}}{}%为了实现上述第二个示例情况做的处理
+ }}%
+}
+
+
+
%增加年字
\renewbibmacro*{date}{%
-\ifcitation{\iffieldequalstr{userd}{chinese}{\printdate 年}{\printdate}}%
+\ifcitation{%
+ \iffieldequalstr{userd}{chinese}{%
+ \ifboolexpr{test {\ifentrytype{article}} or test {\ifentrytype{inproceedings}}
+ or test {\ifentrytype{archive}} or test {\ifentrytype{online}}}
+ {\printtext{\blx at gbdatecn{}{}}}%
+ {\printdate\iffieldundef{year}{}{年}}%
+ }{\ifentrytype{archive}{\printtext{\blx at gbdateen{}{}}}{\printdate}}%
+}%
{\printdate}%
}
-
-
\newrobustcmd*{\blx at gbdatecn}[3][]{%
\dateeraprintpre{#2#3year}%
- \blx at imc@forcezerosy{\thefield{#2#3year}年}\ifblank{#1}{}{\printfield{#1}}%
+ \iffieldundef{#2#3year}{}{\blx at imc@forcezerosy{\thefield{#2#3year}年}}\ifblank{#1}{}{\printfield{#1}}%
\iffieldundef{#2#3month}{}{{\thefield{#2#3month}}月}%
\iffieldundef{#2#3day}{}{{\thefield{#2#3day}}日}}
+\newrobustcmd*{\blx at gbdateen}[3][]{%
+\mkbibdateen{#2#3year}{#2#3month}{#2#3day}%
+}
+
+\newrobustcmd*{\mkbibdateen}[3]{%
+ \iffieldundef{#2}
+ {}
+ {\mkbibmonth{\thefield{#2}}%
+ \iffieldundef{#1}{}{\space}}%
+ \iffieldundef{#3}
+ {}
+ {{\thefield{#3}}%
+ \iffieldundef{#2}{}{\addcomma\space}}%
+ \iffieldbibstring{#1}
+ {\bibstring{\thefield{#1}}}
+ {\dateeraprintpre{#1}\stripzeros{\thefield{#1}}}}
+
+
\renewbibmacro*{newsdate}{%%
\ifboolexpr{%
test{\ifcitation} and test{\iffieldequalstr{userd}{chinese}}%
@@ -257,6 +386,18 @@
}}%
+\renewbibmacro*{url+urldate}{%
+\ifcitation{\newunit\usebibmacro{url}\newunit%
+ \printtext{\blx at gbdatecn{}{url}}%
+ }%
+ {\iffieldundef{urlyear}%
+ {}{%\setunit*{\addspace}%
+ \usebibmacro{urldate}}%
+ \setunit{\addperiod\addspace}%
+ \usebibmacro{url}}%
+}
+
+
\DeclareFieldFormat{type}%
{\ifcitation{\iffieldequalstr{userd}{chinese}%
{\ifbibxstring{#1cn}{\bibxstring{#1cn}}{#1}}%
@@ -280,30 +421,57 @@
\DeclareFieldFormat[newspaper,article,periodical]{number}%
{\ifcitation{%
\iffieldequalstr{userd}{chinese}{%
- \iffieldequalstr{entrysubtype}{news}{\printtext{\gbpunctcomma\bibstring{serialcn} #1 版}}
+ \iffieldequalstr{entrysubtype}{news}{%
+ \iffieldint{number}%
+ {\printtext{\gbpunctcomma\bibstring{serialcn} #1 版}}%
+ {\printtext{\gbpunctcomma #1}}%
+ }%
{\iffieldint{number}{\setcounter{numberwithoutzero}{#1}%
- \printtext{\bibstring{serialcn}\addthinspace\arabic{numberwithoutzero}\addthinspace\bibstring{numbercn}}}%
- {\printtext{\bibstring{serialcn}\addthinspace #1\addthinspace\bibstring{numbercn}}}%
+ \printtext{\bibstring{serialcn}\addthinspace\arabic{numberwithoutzero} 期}}%
+ {\printtext{\bibstring{serialcn}\addthinspace #1 期}}%
}}%
- {\setcounter{numberwithoutzero}{#1}\printtext{(}\arabic{numberwithoutzero}\printtext{)}}%
+ {\newunit\setcounter{numberwithoutzero}{#1}\printtext{\bibstring{number}}\arabic{numberwithoutzero}}%
}%
- {\setcounter{numberwithoutzero}{#1}\arabic{numberwithoutzero}}%
+ {\iffieldint{number}{\setcounter{numberwithoutzero}{#1}\arabic{numberwithoutzero}}{#1}}%
}
-\DeclareFieldFormat[article,periodical]{volume}%
+\DeclareFieldFormat[book,inbook,incollection]{number}%
+{\iffieldequalstr{userd}{chinese}{\iffieldint{number}%
+ {%
+ \bibstring{serialcn}#1\bibstring{numbercn}%
+ }{#1}%
+ }%
+ {\bibstring{number}~#1}%
+}
+
+\DeclareFieldFormat[article,periodical,newspaper]{volume}%
{\ifcitation{%
-\iffieldequalstr{userd}{chinese}{\bibstring{serialcn}#1\bibstring{volumecn}}%
- {\bibstring{volume}~#1}}%
+\iffieldequalstr{userd}{chinese}{%
+ \iffieldint{volume}%
+ {\bibstring{serialcn}#1\bibstring{volumecn}}%
+ {#1}%
+ }%
+ {\bibstring{volume}~#1}}%
{#1}%
}
-\DeclareFieldFormat[book]{volume}%
+\DeclareFieldFormat[book,inbook,incollection]{volume}%
{\iffieldequalstr{userd}{chinese}{\iffieldint{volume}%
- {\bibstring{serialcn}#1\bibstring{volumecn}}{#1}%
+ {\iffieldequalstr{entrysubtype}{classic}{\bibstring{volumecn}#1}%
+ {\bibstring{serialcn}#1\bibstring{volumecn}}%
+ }{#1}%
}%
{\bibstring{volume}~#1}%
}
+\DeclareListFormat[article,newspaper]{location}{%
+\iffieldequalstr{userd}{chinese}{\gbpunctprl#1\gbpunctprr}{#1}%
+}
+
+\DeclareListFormat[article]{series}{%
+\iffieldequalstr{userd}{chinese}{\gbpunctprl#1\gbpunctprr}{#1}%
+}
+
%
% 调整期刊名的格式
%
@@ -312,15 +480,15 @@
\renewbibmacro*{journal+issuetitle}{%
\ifcitation{\bibpubfont%
\usebibmacro{journal}%
+ \iflistundef{location}{}{\printlist{location}}%
\iffieldundef{series}%
{}%
- {\printfield{series}%
- \setunit{\addspace}}%
+ {\printfield{series}}%
\iffieldundef{volume}%
{\ifciteseen{}{\usebibmacro{issue+date}%
\usebibmacro{volume+number+eid}}}%
{\ifciteseen{}{\usebibmacro{volume+number+eid}%
- \newunit%
+ \iffieldundef{year}{}{\newunit}%
\usebibmacro{issue+date}}}%
}%
{\bibpubfont%源来自standard.bbx
@@ -446,7 +614,9 @@
test{\iffieldundef{subtitle}}%
}%
{}%
- {\setunit{\iffieldequalstr{userd}{chinese}{\gbpunctcolon}{\gbpunctcolonlanen}}%
+ {\setunit*{\iffieldequalstr{userd}{chinese}{\gbpunctcolon}{\gbpunctcommalanen}}%
+ \ifboolexpr{not test {\iffieldundef{origyear}} and test{\iffieldequalstr{entrysubtype}{classic}}}%
+ {\printorigdate}{}%
\printtext[title]{\bibtitlefont%增加字体控制命令%增加了标点:
\printfield[titlecase]{title}%
\ifboolexpr{test {\iffieldundef{subtitle}}}%这里增加了对子标题的判断,解决不判断多一个点的问题
@@ -453,15 +623,9 @@
{}{\setunit{\subtitlepunct}%
\printfield[titlecase]{subtitle}}%
\iffieldundef{titleaddon}{}%判断一下titleaddon,否则直接加可能多一个空格
- {\setunit{\subtitlepunct}\printfield{titleaddon}}%
- \iftoggle{bbx:gbtype}{%
- \iffieldundef{entrysubtype}{\printfield[gbtypeflag]{usera}}%在标题后直接给出文献标识字母,判断一下,是否是报纸和标准
- {\iffieldequalstr{entrysubtype}{standard}{\printfield[gbtypeflags]{usera}}%判断是否为标准
- {\iffieldequalstr{entrysubtype}{news}{\printfield[gbtypeflagn]{usera}}% 判断是否为报纸
- {\printfield[gbtypeflag]{usera}}}% 其它
- }}{}%
- }\ifboolexpr{test{\ifentrytype{book}} and (not test{\iffieldundef{volume}})}%判断一下book类有没有volume
- {\ifcitation{}{\setunit{\subtitlepunct}}\printfield{volume}}{}%%
+ {\setunit{\subtitlepunct}\printfield{titleaddon}}}%
+ \ifboolexpr{test{\ifentrytype{book}} and (not test{\iffieldundef{volume}})}%判断一下book类有没有volume
+ {\printfield{volume}}{}%%
}}{\ifboolexpr{%
test{\iffieldundef{title}}%
and
@@ -600,6 +764,7 @@
}{\printdelim{authotitledelim}}%
\iffieldundef{series}{}{\usebibmacro{series+number}\setunit{\addcolon\addspace}}%为处理一些存在series的情况而增加
\usebibmacro{maintitle+booktitle}%
+ \usebibmacro{inbook:volume+number}%
}
%
@@ -626,7 +791,45 @@
\ifcitation{\iffieldequalstr{userd}{chinese}{\gbpunctcolon}{\addperiod\space}}{\addperiod\space}%
}
+\renewbibmacro*{maintitle+booktitle}{%
+\ifcitation{%
+ \iffieldundef{maintitle}
+ {}
+ {\usebibmacro{maintitle}%
+ \newunit\newblock
+ \iffieldundef{volume}
+ {}
+ {\printfield{volume}%
+ \printfield{part}%
+ \setunit{\addcolon\space}}}%
+ \usebibmacro{booktitle}%
+ }%
+ {\iffieldundef{maintitle}
+ {}
+ {\usebibmacro{maintitle}%
+ \newunit\newblock
+ \iffieldundef{volume}
+ {}
+ {\printfield{volume}%
+ \printfield{part}%
+ \setunit{\addcolon\space}}}%
+ \usebibmacro{booktitle}%
+ \newunit}%
+}
+
+\newbibmacro*{inbook:volume+number}{%
+\ifcitation{%
+ \iffieldundef{volume}{}{\printfield{volume}}%
+ \iffieldundef{number}{}{\printfield{number}}%
+ }%
+ {\iffieldundef{volume}{}{\setunit{\addcolon\addspace}\printfield{volume}}%
+ \iffieldundef{number}{}{\setunit{\addcolon\addspace}\printfield{number}}%增加卷和册信息
+ }%
+}
+
+
+
%
% 增加inbook:parent用于辅助crossref传统功能的实现
% 用在{crosscite}宏中
@@ -636,12 +839,122 @@
\ifnameundef{bookauthor}{%
\ifnameundef{editor}{}{\printdelim{authotitledelim}}%
}{\printdelim{authotitledelim}}%
-\iffieldundef{series}{}{\usebibmacro{series+number}\setunit{\addcolon\addspace}}%为处理一些存在series的情况而增加
+\ifboolexpr{test {\ifcitation} and test{\iffieldequalstr{entrysubtype}{classic}}}{}
+{\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}}%增加卷和册信息
+ \usebibmacro{inbook:volume+number}%
+\ifboolexpr{test {\ifcitation} and test{\iffieldequalstr{entrysubtype}{classic}}}%
+{\iffieldundef{series}{}{\newunit\usebibmacro{series+number}}}{}%
\newunit\newblock%
- \printfield{edition}%
+\ifboolexpr{test {\ifcitation} and test{\iffieldequalstr{entrysubtype}{classic}}}{}{\printfield{edition}}%
\newunit
\newunit\newblock
- \usebibmacro{publisher+location+date}}
+ \usebibmacro{publisher+location+date}%
+\ifboolexpr{test {\ifcitation} and test{\iffieldequalstr{entrysubtype}{classic}}}{\printfield{edition}}{}%
+}
+
+
+\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%
+\ifboolexpr{test {\ifcitation} and test{\iffieldequalstr{entrysubtype}{classic}}}{}{\printfield{edition}}%
+\newunit\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}%
+\ifboolexpr{test {\ifcitation} and test{\iffieldequalstr{entrysubtype}{classic}}}{\printfield{edition}}{}%
+%\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}}
+
+
+
+\DeclareBibliographyDriver{manual}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author/editor+others/translator+others}%
+\ifnameundef{namea}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点
+ \usebibmacro{title}%
+ \iftoggle{bbx:gbstrict}{}{%
+ \newunit%
+ \printlist{language}%
+ \newunit\newblock
+ \usebibmacro{byauthor}}%
+ \newunit\newblock
+ \usebibmacro{byeditor+others}%增加的译者信息
+ \newunit\newblock
+ \iftoggle{bbx:gbfieldtype}{%
+ \printfield{type}%
+ \setunit*{\addspace}}{}%
+ \ifboolexpr{test {\ifcitation} and test{\ifentrytype{archive}}}%
+ {}{\printfield{number}}%
+ \newunit\newblock
+ \printfield{version}%
+ \newunit
+ \printfield{note}%
+ \newunit\newblock
+ \usebibmacro{institution+location+date}%
+ \ifboolexpr{test {\ifcitation} and test{\ifentrytype{archive}}}%
+ {\newunit\printfield{number}}{}%
+ %\newunit\newblock
+ \usebibmacro{chapter+pages}%
+ \iffieldundef{url}{}{%当没有网址时也不输出修改或更新日期
+ \usebibmacro{modifydate}}%修改或更新日期为带括号的时间
+ \usebibmacro{doi+eprint+url}%
+ \newunit
+ \printfield{pagetotal}%
+ \newunit\newblock
+ \iftoggle{bbx:isbn}
+ {\printfield{isrn}}
+ {}%
+ \newunit\newblock
+ \usebibmacro{addendum+pubstate}%
+ \setunit{\bibpagerefpunct}\newblock
+ \usebibmacro{pageref}%
+ \newunit\newblock
+ \iftoggle{bbx:related}
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}
+ {}%
+ \usebibmacro{annotation}\usebibmacro{finentry}}
Modified: trunk/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/chinese-css.cbx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/chinese-css.cbx 2023-04-24 20:15:03 UTC (rev 66928)
+++ trunk/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/chinese-css.cbx 2023-04-24 20:15:38 UTC (rev 66929)
@@ -10,7 +10,7 @@
%%用法:类似于标准的样式在biblatex加载时设置样式
%%文献表正常处理,标注命令主要用cite和textcite
-\ProvidesFile{chinese-css.cbx}[2023/03/31 v1.0a a biblatex citation style for CSS]
+\ProvidesFile{chinese-css.cbx}[v1.0a a biblatex citation style for CSS]
%==================================================
%加载gb样式
@@ -21,10 +21,10 @@
%==================================================
%选项设置
%==================================================
-%\ExecuteBibliographyOptions{
-% maxcitenames=2,
-% mincitenames=1,
-%}
+\ExecuteBibliographyOptions{
+ maxcitenames=2,
+ mincitenames=1,
+}
%==================================================
%引用命令设置,主要用cite和textcite
@@ -35,6 +35,20 @@
\renewcommand{\bibfootnotewrapper}[1]{%
\bibsentence#1}%
+%避免去除前面的空白
+\renewrobustcmd{\blx at mkbibfootnote}[2]{%
+ \iftoggle{blx at footnote}
+ {\blx at warning{Nested notes}%
+ \addspace\mkbibparens{#2}}
+ {%\unspace
+ \ifnum\blx at notetype=\tw@
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+ {\csuse{blx at theendnote#1}{\protecting{\blxmkbibnote{end}{#2}}}}
+ {\csuse{footnote#1}{\protecting{\blxmkbibnote{foot}{#2}}}}}}
+
%修改脚注注释的实现
\def\execgbfootbib%
{%
@@ -44,8 +58,8 @@
%
%重定义\footfullcite使完成css的脚注文献要求
\DeclareCiteCommand{\footfullcite}[\mkbibfootnote]%
- {\defcounter{maxnames}{\blx at maxbibnames}%局部定义maxnames和minnames计数器
- \defcounter{minnames}{\blx at minbibnames}%使footfullcite内的作者输出与正文文献表中的一致。
+ {\defcounter{maxnames}{\blx at maxcitenames}%局部定义maxnames和minnames计数器
+ \defcounter{minnames}{\blx at mincitenames}%使footfullcite内的作者输出与正文文献表中的一致。
\usebibmacro{prenote}%
\renewbibmacro*{postnote}{%
\iffieldundef{postnote}%
@@ -59,8 +73,14 @@
{\multicitedelim}%
{\usebibmacro{postnote}\usebibmacro{finentry}}
+
\DeclareCiteCommand{\fullcite}
- {\usebibmacro{prenote}}
+ {\usebibmacro{prenote}%
+ \renewbibmacro*{postnote}{%
+ \iffieldundef{postnote}%
+ {}{\setunit{\iffieldequalstr{userd}{chinese}{\unspace\gbpunctcomma}{\addcolon\addspace}}%
+ \printfield{postnote}}}%与ay样式不同,由于已修改postnote域格式,直接用printfield
+ }
{\ifciteseen%
{\usedriver{\DeclareNameAlias{sortname}{default}}{citeseen:\thefield{entrytype}}}%\nopunct
{\usedriver{\DeclareNameAlias{sortname}{default}}{\thefield{entrytype}}}%
@@ -68,8 +88,14 @@
{\multicitedelim}
{\usebibmacro{postnote}\usebibmacro{finentry}}
+
\DeclareCiteCommand{\fullinnercite}
- {\usebibmacro{prenote}}
+ {\usebibmacro{prenote}%
+ \renewbibmacro*{postnote}{%
+ \iffieldundef{postnote}%
+ {}{\setunit{\iffieldequalstr{userd}{chinese}{\unspace\gbpunctcomma}{\addcolon\addspace}}%
+ \printfield{postnote}}}%与ay样式不同,由于已修改postnote域格式,直接用printfield
+ }
{\ifciteseen%
{\usedriver{\DeclareNameAlias{sortname}{default}}{citeseen:\thefield{entrytype}}}%\nopunct
{\usedriver{\DeclareNameAlias{sortname}{default}}{\thefield{entrytype}}}%
@@ -93,3 +119,30 @@
\printfield[citejz]{labeltitle}}
{\multicitedelim}
{\usebibmacro{postnote}}
+
+
+\DeclareFieldFormat{citetitle}{%
+\iffieldequalstr{userd}{chinese}{\gbpunctttl#1\gbpunctttr}%
+{\mkbibemph{#1}}%
+}
+
+\DeclareFieldFormat
+ [article,inbook,incollection,inproceedings,patent,thesis,unpublished]
+ {citetitle}{%
+ \iffieldequalstr{userd}{chinese}{\gbpunctttl#1\gbpunctttr}%
+ {\mkbibquote{#1\isdot}}%
+ }
+
+
+%为文献输出出版信息
+\DeclareCiteCommand{\citepub}
+ {\boolfalse{citetracker}%
+ \boolfalse{pagetracker}%
+ \usebibmacro{prenote}}
+ {\ifciteindex
+ {\indexfield{indextitle}}
+ {}%
+ \ifentrytype{online}{\usebibmacro{institution+location+date}}{\usebibmacro{publisher+location+date}}%
+ }
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
Modified: trunk/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/chinese-erj.cbx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/chinese-erj.cbx 2023-04-24 20:15:03 UTC (rev 66928)
+++ trunk/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/chinese-erj.cbx 2023-04-24 20:15:38 UTC (rev 66929)
@@ -10,7 +10,7 @@
%%用法:类似于标准的样式在biblatex加载时设置样式
%%文献表正常处理,标注命令主要用cite和textcite
-\ProvidesFile{chinese-erj.cbx}[2022/02/22 v1.0a a biblatex citation style for ERJ]
+\ProvidesFile{chinese-erj.cbx}[v1.0a a biblatex citation style for ERJ]
%==================================================
%加载gb样式
@@ -22,17 +22,17 @@
% 增加一个控制标注中标点是英文还是中文的选项
% 20220222,v1.0a,hzz
\DeclareBibliographyOption{gbcitepunctcn}[true]{%biblatex低版本
- \ifstrequal{#1}{false}{\execerjpunctencite}{}}
+ \ifstrequal{#1}{false}{\exegbpunctencite}{}}
-\def\erjpunctmarkcite{、}%
-\def\erjpunctsemicoloncite{;}%
-\def\erjpunctparenlcite{(}%
-\def\erjpunctparenrcite{)}
-\def\execerjpunctencite{%
-\def\erjpunctmarkcite{\addcomma\addspace}%
-\def\erjpunctsemicoloncite{\addsemicolon\addspace}%
-\def\erjpunctparenlcite{(}%
-\def\erjpunctparenrcite{)}
+\def\gbpunctmarkcite{、}%
+\def\gbpunctsemicoloncite{;}%
+\def\gbpunctparenlcite{(}%
+\def\gbpunctparenrcite{)}
+\def\exegbpunctencite{%
+\def\gbpunctmarkcite{\addcomma\addspace}%
+\def\gbpunctsemicoloncite{\addsemicolon\addspace}%
+\def\gbpunctparenlcite{(}%
+\def\gbpunctparenrcite{)}
}
%==================================================
@@ -47,13 +47,13 @@
%引用命令设置,主要用cite和textcite
%包括标点设置
%==================================================
-\renewcommand*{\multicitedelim}{\erjpunctsemicoloncite}%\addsemicolon\addspace;
+\renewcommand*{\multicitedelim}{\gbpunctsemicoloncite}%\addsemicolon\addspace;
\renewcommand*{\textcitedelim}{%
\iffinalcitedelim
{\ifnumgreater{\value{textcitetotal}}{2}
{}{}%\iftextcitepunct{\finalandsemicolon}{\finalandcomma}
- \addspace\erjpunctmarkcite}%\addspace\bibstring{andincitecn}
- {\iftextcitepunct{\addsemicolon\space}{\addspace\erjpunctmarkcite}}%\addcomma
+ \addspace\gbpunctmarkcite}%\addspace\bibstring{andincitecn}
+ {\iftextcitepunct{\addsemicolon\space}{\addspace\gbpunctmarkcite}}%\addcomma
}%\space
\DeclareDelimFormat[textcite]{nameyeardelim}{\addspace}%\addcomma\space
@@ -67,7 +67,7 @@
}
%标注压缩时,直接用date+extradate代替extradate实现2006a,2006b的效果
-%\DeclareDelimFormat*{compcitedelim}{\erjpunctmarkcite}%\addcomma\addspace
+%\DeclareDelimFormat*{compcitedelim}{\gbpunctmarkcite}%\addcomma\addspace
\newbibmacro*{cite:extradate}{%
\iffieldundef{extradate}
{}
@@ -81,12 +81,12 @@
%添加前后空格
\DeclareCiteCommand{\cite}%[\mkbibparens]
{\usebibmacro{cite:init}%
- \unspace\printtext{\erjpunctparenlcite}\usebibmacro{prenote}}%\addspace
+ \unspace\printtext{\gbpunctparenlcite}\usebibmacro{prenote}}%\addspace
{\usebibmacro{citeindex}%
\usebibmacro{cite}}
{}
{\usebibmacro{postnote}%
- \erjpunctparenrcite}%\addspace
+ \gbpunctparenrcite}%\addspace
%原版
%\DeclareCiteCommand{\cite}[\mkbibparens]
@@ -124,7 +124,7 @@
{\usebibmacro{cite:label}%
\setunit{%
\global\booltrue{cbx:parens}%
- \printdelim{nonameyeardelim}\unspace\erjpunctparenlcite}%\bibopenparen
+ \printdelim{nonameyeardelim}\unspace\gbpunctparenlcite}%\bibopenparen
\ifnumequal{\value{citecount}}{1}
{\usebibmacro{prenote}}
{}%
@@ -133,7 +133,7 @@
{\printnames{labelname}%
\setunit{%
\global\booltrue{cbx:parens}%
- \printdelim{nameyeardelim}\unspace\erjpunctparenlcite}%\bibopenparen
+ \printdelim{nameyeardelim}\unspace\gbpunctparenlcite}%\bibopenparen
\ifnumequal{\value{citecount}}{1}
{\usebibmacro{prenote}}
{}%
@@ -148,7 +148,7 @@
\savefield{namehash}{\cbx at lasthash}}%
\setunit{%
\ifbool{cbx:parens}
- {\erjpunctparenrcite\global\boolfalse{cbx:parens}}%\bibcloseparen
+ {\gbpunctparenrcite\global\boolfalse{cbx:parens}}%\bibcloseparen
{}%
\textcitedelim}}
@@ -158,11 +158,11 @@
{\setunit{}%
\printtext{%
\ifbool{cbx:parens}
- {\erjpunctparenrcite\global\boolfalse{cbx:parens}}%\bibcloseparen
+ {\gbpunctparenrcite\global\boolfalse{cbx:parens}}%\bibcloseparen
{}}}
{\setunit{%
\ifbool{cbx:parens}
- {\erjpunctparenrcite\global\boolfalse{cbx:parens}}%\bibcloseparen
+ {\gbpunctparenrcite\global\boolfalse{cbx:parens}}%\bibcloseparen
{}%
\textcitedelim}}}
Added: trunk/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/chinese-jmw.bbx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/chinese-jmw.bbx (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/chinese-jmw.bbx 2023-04-24 20:15:38 UTC (rev 66929)
@@ -0,0 +1,821 @@
+%%
+%% ---------------------------------------------------------------
+%% css.bbx --- A citation style of journal of management world in china
+%% modified from gb7714-2015
+%% Maintained by huzhenzhen
+%% E-mail: hzzmail at 163.com
+%% Released under the LaTeX Project Public License v1.3c or later
+%% history
+%% 2019/03/28 v1.0
+%% 2022/02/22 v1.0a
+%% ---------------------------------------------------------------
+%%
+%%用法:类似于标准的样式在biblatex加载时设置样式
+%%文献表正常处理,标注命令主要用cite和textcite
+\ProvidesFile{chinese-jmw.bbx}[2023/04/24 v1.0a a biblatex bibliography style for JMW]
+
+
+%==================================================
+%加载gb样式
+%==================================================
+\RequireBibliographyStyle{gb7714-2015}
+
+
+%
+% 增加一个控制标点是英文还是中文的选项
+% 20220222,v1.0a,hzz
+\DeclareBibliographyOption{gbpunctcn}[true]{%biblatex低版本
+ \ifstrequal{#1}{false}{\execgbpuncten}{}}
+
+\newbibmacro*{bbx:ifmergeddate}{\@secondoftwo}
+
+\newbibmacro*{date+extradate}{}
+
+% merge date with date label
+\def\bbx at opt@mergedate at true{%
+ \renewbibmacro*{date+extradate}{%
+ \iffieldundef{labelyear}
+ {}
+ {\printtext{%
+ \iflabeldateisdate
+ {\printdateextra}
+ {\printlabeldateextra}}}}%
+ \renewbibmacro*{bbx:ifmergeddate}{\iflabeldateisdate}%
+% \renewbibmacro*{issue+date}{%
+% \ifboolexpr{test {\usebibmacro{bbx:ifmergeddate}}
+% and
+% test {\iffieldundef{issue}}}
+% {}
+% {\printtext[parens]{%
+% \printfield{issue}%
+% \setunit*{\addspace}%
+% \usebibmacro{bbx:ifmergeddate}
+% {}
+% {\printdate}}}%
+% \newunit}
+}
+
+
+\renewbibmacro*{author}{%
+ \ifboolexpr{
+ test \ifuseauthor
+ and
+ not test {\ifnameundef{author}}
+ }
+ {\printnames{author}%
+ \iffieldundef{authortype}
+ {\setunit{\printdelim{nameyeardelim}}}
+ {\setunit{\printdelim{authortypedelim}}}%
+ \iffieldundef{authortype}
+ {}
+ {\usebibmacro{authorstrg}%
+ \setunit{\printdelim{nameyeardelim}}}}%
+ {\global\undef\bbx at lasthash
+ \usebibmacro{labeltitle}%
+ \setunit*{\printdelim{nonameyeardelim}}}%
+\iffieldequalstr{userd}{chinese}{}{\usebibmacro{date+extradate}\clearfield{year}}%
+}
+
+
+%==================================================
+%选项设置
+%==================================================
+\ExecuteBibliographyOptions{
+ gbnamefmt=familyahead,
+ gbbiblabel=parens,
+ gbtype=false,
+ gbpub=false,
+ doi=false,
+ url=false,
+ gbfieldtype=true,
+ dateabbrev=false,
+ maxbibnames=99,
+ mergedate=true,
+ %datezeros=false,
+ }
+
+%==================================================
+%定义一些标点为中文全角标点
+%==================================================
+\def\gbpunctdot{。}%
+\def\gbpunctmark{、}%
+\def\gbpunctcomma{,}%
+\def\gbpunctcommalanen{,}%\addcomma\addspace
+\def\gbpunctcolon{:}%
+\def\gbpunctcolonlanen{\addcolon\addspace}%
+\def\gbpunctsemicolon{;}%
+\def\gbpunctttl{《}%
+\def\gbpunctttr{》}
+\def\gbpunctprl{(}%
+\def\gbpunctprr{)}
+
+
+\def\execgbpuncten{%
+\def\gbpunctdot{\adddot}%
+\def\gbpunctmark{\addcomma\addspace}%
+\def\gbpunctcomma{\addcomma\addspace}%
+\def\gbpunctcommalanen{\addcomma\addspace}%
+\def\gbpunctcolon{\addcolon\addspace}%
+\def\gbpunctcolonlanen{\addcolon\addspace}%
+\def\gbpunctsemicolon{\addsemicolon\addspace}%
+\def\gbpunctttl{《}%
+\def\gbpunctttr{》}%
+}
+
+\DefineBibliographyExtras{english}{\renewcommand*{\bibrangedash}{$\sim$}}%将页码间隔符替换会英文的短横线
+
+%==================================================
+%为标注和文献表中标点格式,重设and本地化字符串
+%==================================================
+\DefineBibliographyStrings{english}{
+ and = { and},%and后面的空格在finalnamedelim已经加过了,所以这里去掉20191009
+ andcn = {\gbpunctmark\unspace},%\gbpunctmark
+ %andotherscn={等},
+ mathesiscn={硕士学位论文},
+ phdthesiscn={博士学位论文},
+ bytranslator= {trans\adddot\ \lbx at sfromlang\ by},
+}
+
+
+
+
+%==================================================
+%设置一些标点格式为中文的标点
+%==================================================
+%\DeclareFieldFormat{titlecase}{\iffieldequalstr{userd}{chinese}{#1}{\capitalisewords{#1}}}
+%\DeclareFieldFormat*{booktitle}{\gbpunctttl#1\gbpunctttr}
+\DeclareFieldFormat*{title}{%
+\iffieldequalstr{userd}{chinese}{\gbpunctttl#1\gbpunctttr}{\textit{#1}\isdot}}
+\DeclareFieldFormat[book]{title}{%
+\iffieldequalstr{userd}{chinese}{\gbpunctttl#1\gbpunctttr}{\textbf{\textit{#1}}\isdot}}
+\DeclareFieldFormat[archive]{title}{%
+\iffieldequalstr{userd}{chinese}{\gbpunctttl#1\gbpunctttr}{#1\isdot}}
+\DeclareFieldFormat[article,incollection,inbook,inproceedings,misc]{title}{%
+\iffieldequalstr{userd}{chinese}{\gbpunctttl#1\gbpunctttr}{\mkbibquote{#1}\isdot}}
+\DeclareFieldFormat*{journaltitle}{%
+\iffieldequalstr{userd}{chinese}{\gbpunctttl#1\gbpunctttr}{\textbf{\textit{#1}}}}%
+\DeclareFieldFormat{booktitle}{%
+\iffieldequalstr{userd}{chinese}{\gbpunctttl#1\gbpunctttr}{\textbf{\textit{#1}}}}
+\renewcommand*{\revsdnamepunct}{%
+\iffieldequalstr{userd}{chinese}{\gbpunctcomma}{\gbpunctcommalanen}}
+\DeclareDelimFormat{multinamedelim}{%
+\iffieldequalstr{userd}{chinese}{\gbpunctmark}{\gbpunctcommalanen}}
+\DeclareDelimFormat{finalnamedelim}{%
+ %\ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}%
+ %\addspace%
+ \edef\userfieldabcde{userd}%
+ \ifcurrentname{translator}{\edef\userfieldabcde{usere}}{}%
+ \ifcurrentname{editor}{\edef\userfieldabcde{userc}}{}%
+ \ifcurrentname{author}{\edef\userfieldabcde{userf}}{}%
+ \ifcurrentname{bookauthor}{\edef\userfieldabcde{userb}}{}%
+ \ifcase\value{gbcitelocalcase}%
+ \iffieldequalstr{\userfieldabcde}{chinese}{\bibstring{andincitecn}}{}%
+ \iffieldequalstr{\userfieldabcde}{korean}{\bibstring{andkr}}{}%
+ \iffieldequalstr{\userfieldabcde}{japanese}{\bibstring{andjp}}{}%
+ \iffieldequalstr{\userfieldabcde}{english}{\space\bibstring{andincite}\space}{}%
+ \iffieldequalstr{\userfieldabcde}{french}{\bibstring{and}}{}%
+ \iffieldequalstr{\userfieldabcde}{russian}{\bibstring{and}}{}%
+%\space%
+ \or%
+ \bibstring{andincitecn}\space%
+ \or%
+ \bibstring{andincite}\space%
+ \fi}
+\DeclareDelimFormat[bib,biblist]{finalnamedelim}{%
+% \ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}%
+ \edef\userfieldabcde{userd}%
+ \ifcurrentname{translator}{\edef\userfieldabcde{usere}}{}%
+ \ifcurrentname{editor}{\edef\userfieldabcde{userc}}{}%
+ \ifcurrentname{author}{\edef\userfieldabcde{userf}}{}%
+ \ifcurrentname{bookauthor}{\edef\userfieldabcde{userb}}{}%
+ \ifcase\value{gbbiblocalcase}%
+ \iffieldequalstr{\userfieldabcde}{chinese}{\bibstring{andcn}}{}%
+ \iffieldequalstr{\userfieldabcde}{korean}{\bibstring{andkr}}{}%
+ \iffieldequalstr{\userfieldabcde}{japanese}{\bibstring{andjp}}{}%
+ \iffieldequalstr{\userfieldabcde}{english}{\bibstring{and}}{}%
+ \iffieldequalstr{\userfieldabcde}{french}{\bibstring{and}}{}%
+ \iffieldequalstr{\userfieldabcde}{russian}{\bibstring{and}}{}%
+\space%
+ \or%
+\bibstring{andcn}\space%
+ \or%
+ \bibstring{and}\space%
+ \fi}
+\DeclareDelimFormat{nameyeardelim}{%
+\iffieldequalstr{userd}{chinese}{\gbpunctcomma}{\gbpunctcommalanen}}
+\DeclareDelimFormat[bib,biblist]{nameyeardelim}{%
+\iffieldequalstr{userd}{chinese}{\gbpunctcomma}{\gbpunctcommalanen}}
+\DeclareDelimFormat{bibpagespunct}{%
+\iffieldequalstr{userd}{chinese}{\unspace\gbpunctcomma}{\unspace\gbpunctcommalanen}}
+\DeclareFieldFormat{pages}{%%前面引导页码的pp.等字符
+\iffieldequalstr{userd}{chinese}{%
+\printtext{\bibstring{serialcn} #1\addthinspace 页}}%
+{\mkpageprefix[bookpagination]{#1}}}
+
+%
+% 调整页码前的标点和去掉期刊文章等页码后面的标点
+%
+\renewbibmacro*{note+pages}{%源来自standard.bbx
+% \iffieldundef{postnote}{\iffieldundef{pages}{}{%
+% \setunit{\bibpagespunct}%
+% \printfield{pages}}}{}%
+}
+
+
+%
+% 调整页码的格式,即chapter+pages格式
+%
+\renewbibmacro*{chapter+pages}{%
+\iffieldundef{postnote}{\iffieldundef{pages}{}{%
+ \setunit{\bibpagespunct}%
+ \printfield{pages}}}{}%
+}
+
+
+\renewcommand*{\newunitpunct}{%
+\iffieldequalstr{userd}{chinese}{\gbpunctcomma}{\gbpunctcommalanen}%
+}
+\renewcommand*{\finentrypunct}{%
+\printdelim{finalpunct}}
+%调整标注的注释中的条目结尾标点
+\DeclareDelimFormat{finalpunct}{\iffieldequalstr{userd}{chinese}{\gbpunctdot}{\adddot}}
+\DeclareDelimFormat[fullinnercite]{finalpunct}{}
+
+%出版项中:出版社地址后面的标点
+\renewcommand{\publocpunct}{%
+\iffieldequalstr{userd}{chinese}{\gbpunctcolon}{\addcolon\addspace}%
+}
+%调整出版社与年份之间的标点
+\renewcommand{\pubdatadelim}{%
+\iffieldequalstr{userd}{chinese}%
+ {\iffieldundef{year}{}{\setunit*{\gbpunctcomma}}}{\setunit*{\addcomma\space}}}
+\renewcommand{\locnopubdelim}{%
+\iffieldequalstr{userd}{chinese}
+ {\iffieldundef{year}{}{\setunit*{\gbpunctcomma}}}{\setunit*{\addcomma\space}}}
+
+%编者与编者类型之间的标点
+\DeclareDelimFormat{editortypedelim}{\iffieldequalstr{userd}{chinese}{}{\addcomma\space}}
+
+%子标题前的标点
+\renewcommand*{\subtitlepunct}{%
+\iffieldequalstr{userd}{chinese}{}{\addcolon\addspace}}
+
+%==================================================
+%调整部分域的输出格式
+%==================================================
+
+%重新调整输出编者的类型
+\renewbibmacro*{editor+others}{%
+ \ifboolexpr{
+ test \ifuseeditor
+ and
+ not test {\ifnameundef{editor}}
+ }
+ {\printnames{editor}%
+ \setunit{\printdelim{editortypedelim}}%
+ \usebibmacro{editor+othersstrg}%
+ \clearname{editor}}%
+ {}%
+ }
+
+\renewbibmacro*{editor+othersstrg}{%
+ \iffieldundef{editortype}
+ {\ifboolexpr{
+ test {\ifnumgreater{\value{editor}}{1}}
+ or
+ test {\ifandothers{editor}}
+ }
+ {\def\abx at tempa{editors}}
+ {\def\abx at tempa{editor}}}
+ {\ifboolexpr{
+ test {\ifnumgreater{\value{editor}}{1}}
+ or
+ test {\ifandothers{editor}}
+ }
+ {\edef\abx at tempa{\thefield{editortype}s}}
+ {\edef\abx at tempa{\thefield{editortype}}}}%
+ \let\abx at tempb=\empty
+ \ifnamesequal{editor}{translator}
+ {\appto\abx at tempa{tr}%
+ \appto\abx at tempb{\clearname{translator}}}
+ {}%
+ \ifnamesequal{editor}{commentator}
+ {\appto\abx at tempa{co}%
+ \appto\abx at tempb{\clearname{commentator}}}
+ {\ifnamesequal{editor}{annotator}
+ {\appto\abx at tempa{an}%
+ \appto\abx at tempb{\clearname{annotator}}}
+ {}}%
+ \ifnamesequal{editor}{introduction}
+ {\appto\abx at tempa{in}%
+ \appto\abx at tempb{\clearname{introduction}}}
+ {\ifnamesequal{editor}{foreword}
+ {\appto\abx at tempa{fo}%
+ \appto\abx at tempb{\clearname{foreword}}}
+ {\ifnamesequal{editor}{afterword}
+ {\appto\abx at tempa{af}%
+ \appto\abx at tempb{\clearname{afterword}}}
+ {}}}%
+ \ifbibxstring{\abx at tempa}
+ {\printtext[editortype]{%
+ \iffieldequalstr{userd}{chinese}{\bibstring{\abx at tempa cn}}{\bibstring{\abx at tempa}}%
+ }\abx at tempb}
+ {\usebibmacro{editorstrg}}}
+
+%去掉译前的标点
+\renewbibmacro*{name:andothers}{\bibauthorfont%
+ \ifboolexpr{test {\ifnumequal{\value{listcount}}{\value{liststop}}}
+ and test \ifmorenames}
+ {\ifnumgreater{\value{liststop}}{1}%注意这里试图去区分姓名总数大于1的情况,当姓名总数大于1时,最后一个姓名后面先加入一个\finalandcomma
+ {}{}%\finalandcomma,目前国标没有这样的区分要求,如果有需要也是可以这么去做的。
+ \printdelim{andothersdelim}\printdelim{strandothersdelim}}%
+ {}%
+}
+
+
+
+%增加年字
+\renewbibmacro*{date}{%
+ \iffieldequalstr{userd}{chinese}{%
+ \ifboolexpr{test {\ifentrytype{article}} or test {\ifentrytype{inproceedings}}
+ or test {\ifentrytype{archive}} or test {\ifentrytype{online}}}
+ {\printtext{\blx at gbdatecn{}{}}}%
+ {\printdate\iffieldundef{year}{}{年}}%
+ }{\ifentrytype{archive}{\printtext{\blx at gbdateen{}{}}}{\printdate}}%
+}
+
+\newrobustcmd*{\blx at gbdatecn}[3][]{%
+ \dateeraprintpre{#2#3year}%
+ \iffieldundef{#2#3year}{}{\blx at imc@forcezerosy{\thefield{#2#3year}年}}\ifblank{#1}{}{\printfield{#1}}%
+ \iffieldundef{#2#3month}{}{{\thefield{#2#3month}}月}%
+ \iffieldundef{#2#3day}{}{{\thefield{#2#3day}}日}}
+
+\newrobustcmd*{\blx at gbdateen}[3][]{%
+\mkbibdateen{#2#3year}{#2#3month}{#2#3day}%
+}
+
+\newrobustcmd*{\mkbibdateen}[3]{%
+ \iffieldundef{#2}
+ {}
+ {\mkbibmonth{\thefield{#2}}%
+ \iffieldundef{#1}{}{\space}}%
+ \iffieldundef{#3}
+ {}
+ {{\thefield{#3}}%
+ \iffieldundef{#2}{}{\addcomma\space}}%
+ \iffieldbibstring{#1}
+ {\bibstring{\thefield{#1}}}
+ {\dateeraprintpre{#1}\stripzeros{\thefield{#1}}}}
+
+
+\renewbibmacro*{newsdate}{%%
+\iffieldequalstr{userd}{chinese}
+ {\printtext{\blx at gbdatecn{}{}}}%
+ {\printtext{\blx at gbdate{}{}}}%%
+}
+
+
+%
+\renewbibmacro*{modifydate}{%新增加一个带括号的日期,用于表示电子资源的更新和修改日期,而公告日期则按日期格式
+\iffieldequalstr{userd}{chinese}
+ {%
+ \printtext{\blx at gbdatecn{}{}}%
+ }%
+ {\ifboolexpr{%
+ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{eventday}}%
+ }%
+ {}%更新或修改日期通常有day信息
+ {\iffieldundef{year}{%
+ \iffieldundef{endyear}{\iffieldundef{eventyear}{}{\printtext{\gbleftparen}\printeventdate\printtext{\gbrightparen}}}%
+ {\printtext{\gbleftparen}\printenddate\printtext{\gbrightparen}}%
+ }{\iffieldequalstr{year}{}{%因为year存在,但为空
+ }{\printtext{\gbleftparen}\blx at gbdate{}{}\printtext{\gbrightparen}}%
+ }}%
+}}%
+
+
+\renewbibmacro*{url+urldate}{%
+ \newunit\usebibmacro{url}\newunit%
+ \printtext{\blx at gbdatecn{}{url}}%
+}
+
+
+\DeclareFieldFormat{type}%
+{\iffieldequalstr{userd}{chinese}%
+ {\ifbibxstring{#1cn}{\bibxstring{#1cn}}{#1}}%
+ {\ifbibstring{#1}{\bibstring{#1}}{#1}}%
+}
+
+
+\renewbibmacro*{in:}{%
+\iftoggle{bbx:gbpunctin}{\gbpunctcomma}%\addthinspace
+ {\setunit{\adddot\addspace}%
+ \iffieldequalstr{userd}{chinese}%
+ {\gbpunctcomma}%
+ {\printtext{\bibstring{in}}}%
+ }}%\newunit\newblock\intitlepunct
+
+
+%
+% 修改number和volume的格式
+%
+\newcounter{numberwithoutzero}
+\DeclareFieldFormat[newspaper,article,periodical]{number}%
+{\iffieldequalstr{userd}{chinese}{%
+ \iffieldequalstr{entrysubtype}{news}{%
+ \iffieldint{number}%
+ {\printtext{\gbpunctcomma\bibstring{serialcn} #1 版}}%
+ {\printtext{\gbpunctcomma #1}}%
+ }%
+ {\iffieldint{number}{\setcounter{numberwithoutzero}{#1}%
+ \printtext{\bibstring{serialcn}\addthinspace\arabic{numberwithoutzero} 期}}%
+ {\printtext{\bibstring{serialcn}\addthinspace #1 期}}%
+ }}%
+ {\newunit\setcounter{numberwithoutzero}{#1}\printtext{\bibstring{number}}\arabic{numberwithoutzero}}%
+}
+
+\DeclareFieldFormat[book,inbook,incollection,misc]{number}%
+{\iffieldequalstr{userd}{chinese}{\iffieldint{number}%
+ {%
+ \bibstring{serialcn}#1\bibstring{numbercn}%
+ }{#1}%
+ }%
+ {\bibstring{number}~#1}%
+}
+
+\DeclareFieldFormat[article,periodical,newspaper]{volume}%
+{\iffieldequalstr{userd}{chinese}{%
+ \iffieldint{volume}%
+ {\bibstring{serialcn}#1\bibstring{volumecn}}%
+ {#1}%
+ }%
+ {\bibstring{volume}~#1}%
+}
+
+\DeclareFieldFormat[book,inbook,incollection]{volume}%
+{\iffieldequalstr{userd}{chinese}{\iffieldint{volume}%
+ {\iffieldequalstr{entrysubtype}{classic}{\bibstring{volumecn}#1}%
+ {\bibstring{serialcn}#1\bibstring{volumecn}}%
+ }{#1}%
+ }%
+ {\bibstring{volume}~#1}%
+}
+
+\DeclareListFormat[article,newspaper]{location}{%
+\iffieldequalstr{userd}{chinese}{\gbpunctprl#1\gbpunctprr}{#1}%
+}
+
+\DeclareListFormat[article]{series}{%
+\iffieldequalstr{userd}{chinese}{\gbpunctprl#1\gbpunctprr}{#1}%
+}
+
+%
+% 调整期刊名的格式
+%
+% v1.0k,20180425,增加了字体控制命令,hzz
+% v1.1j,20220527,修复期刊名不存在时多余的标点
+\renewbibmacro*{journal+issuetitle}{%
+ \bibpubfont%
+ \usebibmacro{journal}\newunit%
+ \iflistundef{location}{}{\printlist{location}}%
+ \iffieldundef{series}%
+ {}%
+ {\printfield{series}}%
+ \iffieldundef{volume}%
+ {\usebibmacro{issue+date}%
+ \usebibmacro{volume+number+eid}}%
+ {\usebibmacro{volume+number+eid}%
+ \iffieldundef{year}{}{\newunit}%
+ \usebibmacro{issue+date}}%
+}
+
+
+%去掉期刊名后的标点
+\renewbibmacro*{journal}{%
+ \ifboolexpr{
+ test {\iffieldundef{journaltitle}}
+ and
+ test {\iffieldundef{journalsubtitle}}
+ }
+ {}
+ {\printtext[journaltitle]{%
+ \printfield[titlecase]{journaltitle}%
+ \printfield[titlecase]{journalsubtitle}}%
+ }%
+ \iffieldundef{journaltitleaddon}
+ {}
+ {\printfield{journaltitleaddon}}}
+
+
+
+
+%
+% 调整期刊卷和期的格式
+%
+\renewbibmacro*{volume+number+eid}{%源来自standard.bbx
+\iffieldequalstr{userd}{chinese}%
+ {\iffieldundef{volume}{}{\printfield{volume}}%
+ \iffieldundef{number}{}{\printfield{number}}}%区别于顺序编码制
+ {\newunit\printfield{volume}%
+ \printfield{number}%
+ \setunit{\addcomma\space}%
+ \printfield{eid}}%
+}
+
+
+%
+% 期刊的标题做修改
+%
+\renewbibmacro*{title+issuetitle}{%源来自standard.BBX
+ \usebibmacro{periodical}%
+ \iffieldequalstr{userd}{chinese}{\setunit*{\gbpunctcomma}}{\setunit*{\adddot\addspace}}%
+ \iffieldundef{series}%
+ {}%
+ {\newunit%
+ \printfield{series}%
+ \setunit{\addspace}}%
+ \usebibmacro{periodical+issue}%将issue调整到上面来,并修改
+ \usebibmacro{issue+date}%
+ \usebibmacro{issue}%
+ \usebibmacro{volume+number+eid}
+}
+
+
+
+
+%
+% 重设title的输出
+%
+% 20180425,v1.0k,为标题增加字体控制命令,Hu Zhenzhen
+% 原理方法:将文献类型标识符输出出去,原输出来自biblatex.def文件
+% 利用toggle做标识符是否输出的判断
+\renewbibmacro*{title}{%
+ \ifboolexpr{%
+ test{\iffieldundef{title}}%
+ and
+ test{\iffieldundef{subtitle}}%
+ }%
+ {}%
+ {\setunit*{\iffieldequalstr{userd}{chinese}{\gbpunctcolon}{\gbpunctcommalanen}}%
+ \ifboolexpr{not test {\iffieldundef{origyear}} and test{\iffieldequalstr{entrysubtype}{classic}}}%
+ {\printorigdate}{}%
+ \printtext[title]{\bibtitlefont%增加字体控制命令%增加了标点:
+ \printfield[titlecase]{title}%
+ \ifboolexpr{test {\iffieldundef{subtitle}}}%这里增加了对子标题的判断,解决不判断多一个点的问题
+ {}{\setunit{\subtitlepunct}%
+ \printfield[titlecase]{subtitle}}%
+ \iffieldundef{titleaddon}{}%判断一下titleaddon,否则直接加可能多一个空格
+ {\setunit{\subtitlepunct}\printfield{titleaddon}}}%
+ \ifboolexpr{test{\ifentrytype{book}} and (not test{\iffieldundef{volume}})}%判断一下book类有没有volume
+ {\printfield{volume}}{}%%
+ }%
+}
+
+
+%=====================================================================
+%设置驱动格式
+%=====================================================================
+
+\DeclareDelimFormat{authotitledelim}
+{%
+\iffieldequalstr{userd}{chinese}{\gbpunctcolon}{\addperiod\space}%
+}
+
+\renewbibmacro*{maintitle+booktitle}{%
+ \iffieldundef{maintitle}
+ {}
+ {\usebibmacro{maintitle}%
+ \newunit\newblock
+ \iffieldundef{volume}
+ {}
+ {\printfield{volume}%
+ \printfield{part}%
+ \setunit{\addcolon\space}}}%
+ \usebibmacro{booktitle}%
+}
+
+
+\newbibmacro*{inbook:volume+number}{%
+ \iffieldundef{volume}{}{\printfield{volume}}%
+ \iffieldundef{number}{}{\printfield{number}}%
+}
+
+
+\renewbibmacro*{thesis:institution+location+date}{\bibpubfont%当没有institution时不处理。
+{\printlist{location}%%加了一个编组避免\usebibmacro{date}把month和day信息去掉
+ \iflistundef{institution}
+ {\setunit*{\addcomma\space}}
+ {\setunit*{\publocpunct}}%
+ \printlist{institution}%
+ \iftoggle{bbx:gbfieldtype}{%
+ \printfield{type}%
+ \setunit*{\addspace}}{}%
+ \pubdatadelim%
+ \usebibmacro{date}%
+ %\newunit
+ }}
+
+
+%
+% 增加inbook:parent用于辅助crossref传统功能的实现
+% 用在{crosscite}宏中
+% 20210216,v1.0w,hzz
+\newbibmacro*{inbook:parent}{%
+\usebibmacro{bybookauthor}%
+\ifnameundef{bookauthor}{%
+ \ifnameundef{editor}{}{\printdelim{authotitledelim}}%
+ }{\printdelim{authotitledelim}}%
+{\iffieldundef{series}{}{\usebibmacro{series+number}\setunit{\addcolon\addspace}}}%为处理一些存在series的情况而增加
+ \usebibmacro{maintitle+booktitle}%
+ \usebibmacro{inbook:volume+number}%
+ \newunit\newblock%
+ {\printfield{edition}}%
+ \newunit
+ \newunit\newblock
+ \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}}%
+\newunit\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}}
+
+
+\DeclareBibliographyDriver{thesis}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author/editor+others/translator+others}%
+\ifnameundef{namea}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点
+ \usebibmacro{title}%
+ \iftoggle{bbx:gbstrict}{}{%
+ \newunit%
+ \printlist{language}%
+ \newunit\newblock
+ \usebibmacro{byauthor}}%
+ \newunit\newblock
+ \usebibmacro{byeditor+others}%增加的译者信息
+ \newunit\newblock
+ {\printfield{number}}%
+ \newunit\newblock
+ \printfield{version}%
+ \newunit
+ \printfield{note}%
+ \newunit\newblock
+ \usebibmacro{thesis:institution+location+date}%
+ %\newunit\newblock
+ \usebibmacro{chapter+pages}%
+ \iffieldundef{url}{}{%当没有网址时也不输出修改或更新日期
+ \usebibmacro{modifydate}}%修改或更新日期为带括号的时间
+ \usebibmacro{doi+eprint+url}%
+ \newunit
+ \printfield{pagetotal}%
+ \newunit\newblock
+ \iftoggle{bbx:isbn}
+ {\printfield{isrn}}
+ {}%
+ \newunit\newblock
+ \usebibmacro{addendum+pubstate}%
+ \setunit{\bibpagerefpunct}\newblock
+ \usebibmacro{pageref}%
+ \newunit\newblock
+ \iftoggle{bbx:related}
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}
+ {}%
+ \usebibmacro{annotation}\usebibmacro{finentry}}
+
+
+\DeclareBibliographyDriver{manual}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author/editor+others/translator+others}%
+\ifnameundef{namea}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点
+ \usebibmacro{title}%
+ \iftoggle{bbx:gbstrict}{}{%
+ \newunit%
+ \printlist{language}%
+ \newunit\newblock
+ \usebibmacro{byauthor}}%
+ \newunit\newblock
+ \usebibmacro{byeditor+others}%增加的译者信息
+ \newunit\newblock
+ \iftoggle{bbx:gbfieldtype}{%
+ \printfield{type}%
+ \setunit*{\addspace}}{}%
+ {\printfield{number}}%
+ \newunit\newblock
+ \printfield{version}%
+ \newunit
+ \printfield{note}%
+ \newunit\newblock
+ \usebibmacro{institution+location+date}%
+ %\newunit\newblock
+ \usebibmacro{chapter+pages}%
+ \iffieldundef{url}{}{%当没有网址时也不输出修改或更新日期
+ \usebibmacro{modifydate}}%修改或更新日期为带括号的时间
+ \usebibmacro{doi+eprint+url}%
+ \newunit
+ \printfield{pagetotal}%
+ \newunit\newblock
+ \iftoggle{bbx:isbn}
+ {\printfield{isrn}}
+ {}%
+ \newunit\newblock
+ \usebibmacro{addendum+pubstate}%
+ \setunit{\bibpagerefpunct}\newblock
+ \usebibmacro{pageref}%
+ \newunit\newblock
+ \iftoggle{bbx:related}
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}
+ {}%
+ \usebibmacro{annotation}\usebibmacro{finentry}}
+
+
+\DeclareBibliographyDriver{misc}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author/editor+others/translator+others}%
+\ifnameundef{namea}{}{\setunit{\labelnamepunct}\newblock}%这一段用于去除作者不存在时多出的标点
+ \usebibmacro{title}%
+\iftoggle{bbx:gbstrict}{}{%
+ \newunit
+ \printlist{language}%
+ \newunit\newblock
+ \usebibmacro{byauthor}%
+ \newunit\newblock
+ \usebibmacro{byeditor+others}}%
+ \newunit\newblock
+ \printfield{howpublished}%
+ \newunit\newblock
+ \printfield{type}%
+ \newunit
+ \printfield{version}%
+ \newunit
+ \printfield{note}%
+ \newunit\newblock
+ \usebibmacro{institution+location+date}%
+ \newunit%
+ \printfield{number}%
+ %\usebibmacro{organization+location+date}%
+ %\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}}
Added: trunk/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/chinese-jmw.cbx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/chinese-jmw.cbx (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/chinese-jmw.cbx 2023-04-24 20:15:38 UTC (rev 66929)
@@ -0,0 +1,183 @@
+%%
+%% ---------------------------------------------------------------
+%% css.cbx --- A citation style of journal of management world in china
+%% modified from gb7714-2015
+%% Maintained by huzhenzhen
+%% E-mail: hzzmail at 163.com
+%% Released under the LaTeX Project Public License v1.3c or later
+%% ---------------------------------------------------------------
+%%
+%%用法:类似于标准的样式在biblatex加载时设置样式
+%%文献表正常处理,标注命令主要用cite和textcite
+
+\ProvidesFile{chinese-jmw.cbx}[v1.0a a biblatex citation style for jmw]
+
+%==================================================
+%加载gb样式
+%==================================================
+\RequireCitationStyle{gb7714-2015ay} %
+
+
+%
+% 增加一个控制标注中标点是英文还是中文的选项
+% 20220222,v1.0a,hzz
+\DeclareBibliographyOption{gbcitepunctcn}[true]{%biblatex低版本
+ \ifstrequal{#1}{false}{\execgbpunctencite}{}}
+
+\def\gbpunctcommacite{,}%
+\def\gbpunctmarkcite{、}%
+\def\gbpunctsemicoloncite{;}%
+\def\gbpunctparenlcite{(}%
+\def\gbpunctparenrcite{)}
+\def\execgbpunctencite{%
+\def\gbpunctcommacite{\addcomma\addspace}%
+\def\gbpunctmarkcite{\addcomma\addspace}%
+\def\gbpunctsemicoloncite{\addsemicolon\addspace}%
+\def\gbpunctparenlcite{(}%
+\def\gbpunctparenrcite{)}
+}
+
+%==================================================
+%选项设置
+%==================================================
+\ExecuteBibliographyOptions{
+ maxcitenames=2,
+ mincitenames=1,
+}
+
+\DeclareDelimFormat[textcite]{delimandincitecn}{和}%\addcomma\space
+\DeclareDelimFormat[parencite]{delimandincitecn}{\gbpunctmarkcite}%\addcomma\space
+\DeclareDelimFormat[textcite]{delimandincite}{和}%\addcomma\space
+\DeclareDelimFormat[parencite]{delimandincite}{ and }%\addcomma\space
+\DeclareDelimFormat[textcite]{delimandothersincite}{\str at andotherscn}%\addcomma\space
+\DeclareDelimFormat[parencite]{delimandothersincite}{et al\adddot}%\addcomma\space
+
+\DefineBibliographyStrings{english}{
+ andincitecn = {\printdelim{delimandincitecn}},
+ andincite = {\printdelim{delimandincite}},
+ %andothersincitecn={\str at andotherscn},
+ andothersincite={\printdelim{delimandothersincite}},
+}
+
+%==================================================
+%引用命令设置,主要用cite和textcite
+%包括标点设置
+%==================================================
+\renewcommand*{\multicitedelim}{\gbpunctsemicoloncite}%\addsemicolon\addspace;
+\renewcommand*{\textcitedelim}{%
+ \iffinalcitedelim
+ {\ifnumgreater{\value{textcitetotal}}{2}
+ {}{}%\iftextcitepunct{\finalandsemicolon}{\finalandcomma}
+ \addspace\gbpunctmarkcite}%\addspace\bibstring{andincitecn}
+ {\iftextcitepunct{\addsemicolon\space}{\addspace\gbpunctmarkcite}}%\addcomma
+}%\space
+
+\DeclareDelimFormat[textcite]{nameyeardelim}{\addspace}%\addcomma\space
+\DeclareDelimFormat[parencite]{nameyeardelim}{\gbpunctcommacite}
+\DeclareDelimFormat[textcite]{andothersdelim}{\addspace}%
+\DeclareDelimFormat[parencite]{andothersdelim}{\iffieldequalstr{userf}{chinese}{}{\addspace}}%
+
+
+%标注压缩时,直接用date+extradate代替extradate实现2006a,2006b的效果
+%\DeclareDelimFormat*{compcitedelim}{\gbpunctmarkcite}%\addcomma\addspace
+\newbibmacro*{cite:extradate}{%
+ \iffieldundef{extradate}
+ {}
+ {\printtext[bibhyperref]{\addspace\printlabeldateextra}}}%\printfield{extradate}\printlabeldateextra \printfield{labelyear}\printfield{extradate}
+
+%\AtEveryCite{%
+%\let\parentext=\parentexttrack%
+%\let\bibopenparen=(%
+%\let\bibcloseparen=)}
+
+%添加前后空格
+\DeclareCiteCommand{\parencite}%[\mkbibparens]
+ {\usebibmacro{cite:init}%
+ \unspace\printtext{\gbpunctparenlcite}\usebibmacro{prenote}}%\addspace
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {}
+ {\usebibmacro{postnote}%
+ \gbpunctparenrcite}%\addspace
+
+%原版
+%\DeclareCiteCommand{\cite}[\mkbibparens]
+% {\usebibmacro{cite:init}%
+% \usebibmacro{prenote}}%)
+% {\usebibmacro{citeindex}%
+% \usebibmacro{cite}}
+% {}
+% {\usebibmacro{postnote}}
+
+%
+%添加后面空格
+%\DeclareCiteCommand{\cbx at textcite}
+% {\usebibmacro{cite:init}}
+% {\usebibmacro{citeindex}%
+% \usebibmacro{textcite}}
+% {}
+% {\usebibmacro{textcite:postnote}\addspace}
+
+\newbibmacro*{textcite}{%
+ \iffieldequals{namehash}{\cbx at lasthash}
+ {\iffieldundef{shorthand}
+ {\ifthenelse{\iffieldequals{labelyear}{\cbx at lastyear}\AND
+ \(\value{multicitecount}=0\OR\iffieldundef{postnote}\)}
+ {\setunit{\addcomma}%
+ \usebibmacro{cite:extradate}}
+ {\setunit{\compcitedelim}%
+ \usebibmacro{cite:labeldate+extradate}%
+ \savefield{labelyear}{\cbx at lastyear}}}
+ {\setunit{\compcitedelim}%
+ \usebibmacro{cite:shorthand}%
+ \global\undef\cbx at lastyear}}
+ {\ifnameundef{labelname}
+ {\iffieldundef{shorthand}
+ {\usebibmacro{cite:label}%
+ \setunit{%
+ \global\booltrue{cbx:parens}%
+ \printdelim{nonameyeardelim}\unspace\gbpunctparenlcite}%\bibopenparen
+ \ifnumequal{\value{citecount}}{1}
+ {\usebibmacro{prenote}}
+ {}%
+ \usebibmacro{cite:labeldate+extradate}}
+ {\usebibmacro{cite:shorthand}}}
+ {\printnames{labelname}%
+ \setunit{%
+ \global\booltrue{cbx:parens}%
+ \printdelim{nameyeardelim}\unspace\gbpunctparenlcite}%\bibopenparen
+ \ifnumequal{\value{citecount}}{1}
+ {\usebibmacro{prenote}}
+ {}%
+ \iffieldundef{shorthand}
+ {\iffieldundef{labelyear}
+ {\usebibmacro{cite:label}}
+ {\usebibmacro{cite:labeldate+extradate}}%
+ \savefield{labelyear}{\cbx at lastyear}}
+ {\usebibmacro{cite:shorthand}%
+ \global\undef\cbx at lastyear}}%
+ \stepcounter{textcitecount}%
+ \savefield{namehash}{\cbx at lasthash}}%
+ \setunit{%
+ \ifbool{cbx:parens}
+ {\gbpunctparenrcite\global\boolfalse{cbx:parens}}%\bibcloseparen
+ {}%
+ \textcitedelim}}
+
+\newbibmacro*{textcite:postnote}{%
+ \usebibmacro{postnote}%
+ \ifthenelse{\value{multicitecount}=\value{multicitetotal}}
+ {\setunit{}%
+ \printtext{%
+ \ifbool{cbx:parens}
+ {\gbpunctparenrcite\global\boolfalse{cbx:parens}}%\bibcloseparen
+ {}}}
+ {\setunit{%
+ \ifbool{cbx:parens}
+ {\gbpunctparenrcite\global\boolfalse{cbx:parens}}%\bibcloseparen
+ {}%
+ \textcitedelim}}}
+
+\let\citet=\textcite
+\let\citep=\parencite
+\let\cite=\parencite
Modified: trunk/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015.bbx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015.bbx 2023-04-24 20:15:03 UTC (rev 66928)
+++ trunk/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015.bbx 2023-04-24 20:15:38 UTC (rev 66929)
@@ -11,7 +11,7 @@
%
% 版本和时间信息
%
-\def\versionofgbtstyle{2023/03/31 v1.1l}
+\def\versionofgbtstyle{2023/04/24 v1.1m}
\def\versionofbiblatex{\abx at version}
\ProvidesFile{gb7714-2015.bbx}[\versionofgbtstyle biblatex bibliography style]
%\RequireBiber[3]%显式指定用biber后端,当用bibtex时会报错,但其实不会影响编译,只是采用bibtex后无法达成格式需求
@@ -543,6 +543,13 @@
\def\str at mathesiscn{硕士学位论文}
\def\str at phdthesiscn{博士学位论文}
\def\str at editorcn{主编}
+ \def\str at editorscn{主编}
+ \def\str at compilerscn{整理}
+ \def\str at compilercn{整理}
+ \def\str at revisercn{编}
+ \def\str at reviserscn{编}
+ \def\str at foundercn{编著}
+ \def\str at founderscn{编著}
\AtEndOfPackage{%
\iftoggle{bbx:codegbk}{%
@@ -919,9 +926,16 @@
\NewBibliographyString{editorcn}
\NewBibliographyString{editorscn}
\NewBibliographyString{bytranslatorcn}
+ \NewBibliographyString{compilercn}
+ \NewBibliographyString{compilerscn}
+ \NewBibliographyString{revisercn}
+ \NewBibliographyString{reviserscn}
+ \NewBibliographyString{foundercn}
+ \NewBibliographyString{founderscn}
+
%
% 修改一些当地化字符串
%
@@ -956,6 +970,12 @@
phdthesiscn={\str at phdthesiscn},
editorscn={\str at editorcn},
editorcn={\str at editorcn},
+ compilerscn={\str at compilerscn},
+ compilercn={\str at compilercn},
+ reviserscn={\str at reviserscn},
+ revisercn={\str at revisercn},
+ founderscn={\str at founderscn},
+ foundercn={\str at foundercn},
}
%
@@ -2670,7 +2690,8 @@
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}}%
-\or
+\or%
+\renewrobustcmd*{\bibinithyphendelim}{.\mbox{-}}%
\ifgiveninits
{\usebibmacro{name:given-family}
{\namepartfamily}
@@ -2682,7 +2703,8 @@
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}}%
-\or
+\or%
+\renewrobustcmd*{\bibinithyphendelim}{.\mbox{-}}%
\ifgiveninits
{\usebibmacro{name:family-given}
{\namepartfamily}
@@ -2700,7 +2722,8 @@
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}%
-\or
+\or%
+\renewrobustcmd*{\bibinithyphendelim}{.\mbox{-}}%
\ifnumequal{\value{listcount}}{1}
{\ifgiveninits
{\usebibmacro{name:family-given}
@@ -3298,6 +3321,7 @@
%定义出版社与年份之间的标点便于后面重定义
\newcommand{\pubdatadelim}{\setunit*{\addcomma\space}}
+\newcommand{\locnopubdelim}{\setunit*{\addcomma\space}}
% 新增一个样式用于输出连续出版物的地址,单位,时间,
% 用于periodical连续出版物的出版社和地址的处理
@@ -3327,7 +3351,7 @@
\newunit}%
{\printlist{location}%
\iflistundef{institution}%
- {\setunit*{\addcomma\space}}
+ {\locnopubdelim}
{\setunit*{\publocpunct}}%
\printlist{institution}%
\pubdatadelim%
@@ -3362,7 +3386,7 @@
}%
{\printlist{location}%
\iflistundef{publisher}
- {\setunit*{\addcomma\space}}
+ {\locnopubdelim}
{\setunit*{\publocpunct}}%
\printlist{publisher}%
\pubdatadelim%
@@ -3396,6 +3420,12 @@
{\bibstring{serialcn}#1\bibstring{volumecn}}%
{\bibstring{volume}~#1}%
}% volume of a book
+\DeclareFieldFormat[book,inbook,incollection]{volume}%
+{\iffieldequalstr{userd}{chinese}{\iffieldint{volume}%
+ {\bibstring{serialcn}#1\bibstring{volumecn}%
+ }{#1}}%
+ {\bibstring{volume}~#1}%
+}
\DeclareFieldFormat[article,periodical]{volume}{#1}% volume of a journal
%
Modified: trunk/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ay.bbx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ay.bbx 2023-04-24 20:15:03 UTC (rev 66928)
+++ trunk/Master/texmf-dist/tex/latex/biblatex-gb7714-2015/gb7714-2015ay.bbx 2023-04-24 20:15:38 UTC (rev 66929)
@@ -10,7 +10,7 @@
%
% 版本和时间信息
%
-\def\versionofgbtstyle{2023/03/31 v1.1l}
+\def\versionofgbtstyle{2023/04/24 v1.1m}
\def\versionofbiblatex{\abx at version}
\ProvidesFile{gb7714-2015ay.bbx}[\versionofgbtstyle biblatex bibliography style]
%\RequireBiber[3]%显式指定用biber后端,当用bibtex时会报错,但其实不会影响编译,只是采用bibtex后无法达成格式需求
@@ -492,6 +492,13 @@
\def\str at mathesiscn{硕士学位论文}
\def\str at phdthesiscn{博士学位论文}
\def\str at editorcn{主编}
+ \def\str at editorscn{主编}
+ \def\str at compilerscn{整理}
+ \def\str at compilercn{整理}
+ \def\str at revisercn{编}
+ \def\str at reviserscn{编}
+ \def\str at foundercn{编著}
+ \def\str at founderscn{编著}
\AtEndOfPackage{%
\iftoggle{bbx:codegbk}{%
@@ -876,6 +883,12 @@
\NewBibliographyString{editorcn}
\NewBibliographyString{editorscn}
\NewBibliographyString{bytranslatorcn}
+ \NewBibliographyString{compilercn}
+ \NewBibliographyString{compilerscn}
+ \NewBibliographyString{revisercn}
+ \NewBibliographyString{reviserscn}
+ \NewBibliographyString{foundercn}
+ \NewBibliographyString{founderscn}
%
% 修改一些当地化字符串
@@ -910,6 +923,12 @@
phdthesiscn={\str at phdthesiscn},
editorscn={\str at editorcn},
editorcn={\str at editorcn},
+ compilerscn={\str at compilerscn},
+ compilercn={\str at compilercn},
+ reviserscn={\str at reviserscn},
+ revisercn={\str at revisercn},
+ founderscn={\str at founderscn},
+ foundercn={\str at foundercn},
}
%
@@ -2526,7 +2545,8 @@
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}}%
-\or
+\or%
+\renewrobustcmd*{\bibinithyphendelim}{.\mbox{-}}%
\ifgiveninits
{\usebibmacro{name:given-family}
{\namepartfamily}
@@ -2538,7 +2558,8 @@
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}}%
-\or
+\or%
+\renewrobustcmd*{\bibinithyphendelim}{.\mbox{-}}%
\ifgiveninits
{\usebibmacro{name:family-given}
{\namepartfamily}
@@ -2556,7 +2577,8 @@
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}%
-\or
+\or%
+\renewrobustcmd*{\bibinithyphendelim}{.\mbox{-}}%
\ifnumequal{\value{listcount}}{1}
{\ifgiveninits
{\usebibmacro{name:family-given}
@@ -3217,6 +3239,12 @@
{\bibstring{serialcn}#1\bibstring{volumecn}}%
{\bibstring{volume}~#1}%
}% volume of a book
+\DeclareFieldFormat[book,inbook,incollection]{volume}%
+{\iffieldequalstr{userd}{chinese}{\iffieldint{volume}%
+ {\bibstring{serialcn}#1\bibstring{volumecn}%
+ }{#1}}%
+ {\bibstring{volume}~#1}%
+}
\DeclareFieldFormat[article,periodical]{volume}{#1}% volume of a journal
%
More information about the tex-live-commits
mailing list.