diff options
Diffstat (limited to 'macros/latex/contrib')
19 files changed, 351 insertions, 105 deletions
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/README.md b/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/README.md index 8e0a745fdc..3959490ae3 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/README.md +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/README.md @@ -1,4 +1,4 @@ -<b>Date of last change: 2021-09-11 to version v1.1a</b> +<b>Date of last change: 2021-12-11 to version v1.1b</b> # biblatex-gb7714-2015: a biblatex style package @@ -44,6 +44,7 @@ biblatex-gb7714-2015 宏包是中文参考文献著录/标注标准 `GB/T 7714-2 * special characters in all fields? * entry without author: the delimiter between title and year? * TEST FOR texlive 2015,2016,2017 + * 标注中包围符号的定义[]、()、圆圈、方框等,有些命令没有去修改。 @@ -670,7 +671,7 @@ gbyntd 以语言、年份、作者、标题、降序排列 * <b>我习惯用传统的bst文件来生成参考文献,有没有GB/T 7714-2015标准的实现版本?</b> -GB/T 7714-2015标准实现的bst版本,已经由[zeping lee](https://github.com/zepinglee/gbt7714-bibtex-style)开发完毕,直接使用即可。 +GB/T 7714-2015标准实现的bst版本,已经由[zeping lee](https://github.com/CTeX-org/gbt7714-bibtex-style)开发完毕,直接使用即可。 @@ -1546,7 +1547,7 @@ please see the file 'biblatex-gb7714-2015.pdf' for further information! * 2021/05/06 v1.0y,ctan * 2021/08/19 v1.0z,ctan * 2021/09/11 v1.1a,ctan - +* 2021/12/11 v1.1b,ctan --------------------------------------------------------- diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/biblatex-gb7714-2015.pdf b/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/biblatex-gb7714-2015.pdf Binary files differindex 7f970fb784..0181a2f438 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/biblatex-gb7714-2015.pdf +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/biblatex-gb7714-2015.pdf diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/biblatex-gb7714-2015.tex b/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/biblatex-gb7714-2015.tex index 60833504ae..c94e6f3588 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/biblatex-gb7714-2015.tex +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/biblatex-gb7714-2015.tex @@ -100,6 +100,7 @@ sorting选项值(gb7714-2015支持以语言著者-出版年标题升序排列, 析出文献标识符控制(gbpunctin选项,可设置\texttt{//}不输出或其它表示形式)、 标题超链接控制(gbtitlelink选项,可设置文献表中各条目标题超链接)、 标准标签超链接控制(gblabelref选项,可设置标注中作者标签的超链接)、 +标注标签格式控制(gbcitelabel选项,可设置标签包围符号)、 作者项处理(gbnoauthor选项,可设置作者缺失时是否填补信息); 著录表格式选项和命令: @@ -514,6 +515,22 @@ leftrule=0pt,rightrule=0pt,toprule=0.4pt,bottomrule=0.4pt] \end{figure} + \pdfbookmark[4]{gbcitelabel}{gbcitelabel} + \item[gbcitelabel]=\textbf{bracket},parens,plain,dot,box,circle. \hfill default is bracket + + 为标注标签的包围符号增加的选项,用于选择正文中标注标签符号。 + \begin{itemize} + \item gbcitelabel=bracket,标注标签由方括号包围,比如[1]; + \item gbcitelabel=parens,标注标签由圆括号包围,比如(1); + \item gbcitelabel=dot,标注标签数字后面加点,比如1.; + \item gbcitelabel=plain,标注标签无装饰,比如1; + \item gbcitelabel=box,标注标签由方框包围,比如\framebox{1}; + \item gbcitelabel=circle,标注标签由圆圈包围,比如\textcircled{1}。 + \end{itemize} + 顺序编码制和作者年制存在一定的差异,作者年制主要是方括号、圆括号、无括号的选择。 + 顺序编码制默认是方括号,作者年制默认是圆括号。 + + \pdfbookmark[4]{gbnamefmt}{gbnamefmt} \item[gbnamefmt]=\textbf{uppercase},lowercase,givenahead,familyahead,pinyin. \hfill default is uppercase diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-2005.bbx b/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-2005.bbx index 12271aa8a8..825dd92b75 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-2005.bbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-2005.bbx @@ -52,3 +52,34 @@ } } } + +%================================================== +%输出格式调整 +%================================================== +% +% 重设专利title的输出,将文献类型标识符输出出去,并将国别加入进来 +% +\renewbibmacro*{patenttitle}{%原输出来自biblatex.def文件 + \ifboolexpr{% + test{\iffieldundef{title}}% + and% + test{\iffieldundef{subtitle}}% + }% + {}% + {\printtext[title]{\bibtitlefont% + \printfield[titlecase]{title}% + \ifboolexpr{test {\iffieldundef{subtitle}}}% + {}{\setunit{\subtitlepunct}% + \printfield[titlecase]{subtitle}}% + \iffieldundef{titleaddon}{\setunit{\subtitlepunct}}% + {\setunit{\subtitlepunct}\printfield{titleaddon}\setunit{\addcomma\space}}% + \iflistundef{location}{}% + {\setunit{\subtitlepunct}\printlist{location}\setunit{\addcomma\space}}% + \printfield{number}% + \iftoggle{bbx:gbtype}{\printfield[gbtypeflag]{usera}}{}% + %\iffieldundef{booktitle}{\newunit}{}%当title是析出时,不要标点 + %\newunit + }% +}% +\clearlist{location}\clearlist{address}% +} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-2005ay.bbx b/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-2005ay.bbx index 44d089fddd..a3c3059832 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-2005ay.bbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-2005ay.bbx @@ -50,3 +50,36 @@ } } } + + + +%================================================== +%输出格式调整 +%================================================== +% +% 重设专利title的输出,将文献类型标识符输出出去,并将国别加入进来 +% +\renewbibmacro*{patenttitle}{%原输出来自biblatex.def文件 + \ifboolexpr{% + test{\iffieldundef{title}}% + and% + test{\iffieldundef{subtitle}}% + }% + {}% + {\printtext[title]{\bibtitlefont% + \printfield[titlecase]{title}% + \ifboolexpr{test {\iffieldundef{subtitle}}}% + {}{\setunit{\subtitlepunct}% + \printfield[titlecase]{subtitle}}% + \iffieldundef{titleaddon}{\setunit{\subtitlepunct}}% + {\setunit{\subtitlepunct}\printfield{titleaddon}\setunit{\addcomma\space}}% + \iflistundef{location}{}% + {\setunit{\subtitlepunct}\printlist{location}\setunit{\addcomma\space}}% + \printfield{number}% + \iftoggle{bbx:gbtype}{\printfield[gbtypeflag]{usera}}{}% + %\iffieldundef{booktitle}{\newunit}{}%当title是析出时,不要标点 + %\newunit + }% +}% +\clearlist{location}\clearlist{address}% +} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-2015.bbx b/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-2015.bbx index f383483dd4..a61fde5bd6 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-2015.bbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-2015.bbx @@ -11,7 +11,7 @@ % % 版本和时间信息 % -\def\versionofgbtstyle{2021/09/11 v1.1a} +\def\versionofgbtstyle{2021/12/11 v1.1b} \def\versionofbiblatex{\abx@version} \ProvidesFile{gb7714-2015.bbx}[\versionofgbtstyle biblatex bibliography style] %\RequireBiber[3]%显式指定用biber后端,当用bibtex时会报错,但其实不会影响编译,只是采用bibtex后无法达成格式需求 @@ -194,10 +194,12 @@ %为单个条目的姓名格式控制增加nameformat和namefmtid两个域 %为缩略信息文献表增加了shortbooktitle域 %为多语言排序增加了lansortorder域 + %因为language域会被clearlang选项清除,增加languageid域,类型设为field而不是list \DeclareDatamodelFields[type=field,datatype=literal]{mark,medium,nameformat} \DeclareDatamodelFields[type=field,datatype=integer]{namefmtid} \DeclareDatamodelFields[type=field,datatype=literal]{shortbooktitle} \DeclareDatamodelFields[type=field,datatype=literal]{lansortorder} + \DeclareDatamodelFields[type=field,datatype=literal]{languageid} %因为biblatex更新3.14版本以后,biber对于为声明数据模型的条目类型 %不再默认读取,而是以空字符串作为条目类型名,自然在条目定义alias时 @@ -1343,31 +1345,37 @@ %这里为兼容3.11及以下版本,所以用一个复杂一点的正则表达式 \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=languageid,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=languageid,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=languageid,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=languageid,fieldvalue={chinese}] \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=languageid,fieldvalue={japanese}] \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=languageid,fieldvalue={korean}] \step[fieldset=lansortorder,fieldvalue=\lankrorder] } \map[overwrite]{%bib中abstract和howpublished常出现特殊字符这里做一下预处理。 @@ -2690,7 +2698,7 @@ test {\iftoggle{iftlseven}}%biblatex<=3.7 {\mkbibnameprefix{#3}\isdot}% \ifprefchar{}{\bibnamedelimc}}% \ifdefvoid{#2}{\mkbibnamefamily{\MakeCapital{#1}}}{\mkbibnamefamily{\MakeUppercase{#1}}}\isdot% - \ifdefvoid{#2}{}{\revsdnamepunct\bibnamedelimd\MakeSentenceCase{\mkbibnamegiven{#2}}\isdot}%\MakeCapital + \ifdefvoid{#2}{}{\revsdnamepunct\bibnamedelimd\mkbibnamegiven{\MakeSentenceCase{#2}}\isdot}%\MakeCapital \ifdefvoid{#4}{}{\bibnamedelimd\mkbibnamesuffix{#4}\isdot}} {\usebibmacro{name:delim}{#1}% \usebibmacro{name:hook}{#1}% @@ -2720,7 +2728,7 @@ test {\iftoggle{iftlseven}}%biblatex<=3.7 {\mkbibnameprefix{#3}\isdot}% \ifprefchar{}{\bibnamedelimc}}% \ifdefvoid{#2}{\mkbibnamefamily{\MakeCapital{#1}}}{\mkbibnamefamily{\MakeCapital{#1}}}\isdot% - \ifdefvoid{#2}{}{\revsdnamepunct\bibnamedelimd\MakeSentenceCase{\mkbibnamegiven{#2}}\isdot}%\MakeCapital + \ifdefvoid{#2}{}{\revsdnamepunct\bibnamedelimd\mkbibnamegiven{\MakeSentenceCase{#2}}\isdot}%\MakeCapital \ifdefvoid{#4}{}{\bibnamedelimd\mkbibnamesuffix{#4}\isdot}} {\usebibmacro{name:delim}{#1}% \usebibmacro{name:hook}{#1}% @@ -2809,7 +2817,7 @@ test {\iftoggle{iftlseven}}%biblatex<=3.7 {\mkbibnameprefix{#3}\isdot}% \ifpunctmark{'}{}{\bibnamedelimc}}% \ifblank{#2}{\MakeCapital#1}{\mkbibnamelast{\MakeUppercase{#1}}}\isdot%\MakeUppercase %\mkbibnamelast{\MakeUppercase{#1}} %\MakeSentenceCase - \ifblank{#2}{}{\revsdnamepunct\bibnamedelimd\MakeSentenceCase{\mkbibnamefirst{#2}}\isdot}% + \ifblank{#2}{}{\revsdnamepunct\bibnamedelimd\mkbibnamefirst{\MakeSentenceCase{#2}}\isdot}% \ifblank{#4}{}{\addcomma\addspace\bibnamedelimd\mkbibnameaffix{#4}\isdot}} {\usebibmacro{name:delim}{#1}% \usebibmacro{name:hook}{#1}% @@ -2833,7 +2841,7 @@ test {\iftoggle{iftlseven}}%biblatex<=3.7 {\mkbibnameprefix{#3}\isdot}% \ifpunctmark{'}{}{\bibnamedelimc}}% \ifblank{#2}{\MakeCapital#1}{\mkbibnamelast{\MakeCapital{#1}}}\isdot%\MakeUppercase %\mkbibnamelast{\MakeUppercase{#1}} %\MakeSentenceCase - \ifblank{#2}{}{\revsdnamepunct\bibnamedelimd\MakeSentenceCase{\mkbibnamefirst{#2}}\isdot}% + \ifblank{#2}{}{\revsdnamepunct\bibnamedelimd\mkbibnamefirst{\MakeSentenceCase{#2}}\isdot}% \ifblank{#4}{}{\addcomma\addspace\bibnamedelimd\mkbibnameaffix{#4}\isdot}} {\usebibmacro{name:delim}{#1}% \usebibmacro{name:hook}{#1}% diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-2015.cbx b/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-2015.cbx index ddc80006c2..8ce01ed872 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-2015.cbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-2015.cbx @@ -22,6 +22,58 @@ \settoggle{bbx:gblabelref}{#1}} \ExecuteBibliographyOptions{gblabelref} +% +% 增加标签包围符号格式处理选项 +% 20211030,1.1a,hzz +% +\newrobustcmd{\mkbibleftborder}{[} +\newrobustcmd{\mkbibrightborder}{]} +\DeclareBibliographyOption[string]{gbcitelabel}[bracket]{% + \csuse{gbcitelabelopt@#1} +} +\ExecuteBibliographyOptions{gbcitelabel} + +\renewrobustcmd{\mkbibsuperscript}[1]{% + \unspace\allowhyphens\textsuperscript{% + \begingroup + \protected\long\def\mkbibsuperscript##1{% + \blx@warning{Nested superscript}% + \mkbibbrackets{##1}}%嵌套的这里没有动 + #1\endgroup}\kern\z@}% + +\def\gbcitelabelopt@bracket{% +\renewrobustcmd{\mkbibleftborder}{[}% +\renewrobustcmd{\mkbibrightborder}{]}% +} +\def\gbcitelabelopt@parens{% +\renewrobustcmd{\mkbibleftborder}{(}% +\renewrobustcmd{\mkbibrightborder}{)}% +} +\def\gbcitelabelopt@dot{% +\renewrobustcmd{\mkbibleftborder}{}% +\renewrobustcmd{\mkbibrightborder}{.}% +} +\def\gbcitelabelopt@plain{% +\renewrobustcmd{\mkbibleftborder}{}% +\renewrobustcmd{\mkbibrightborder}{}% +} +\def\gbcitelabelopt@box{% +\renewrobustcmd{\mkbibleftborder}{}% +\renewrobustcmd{\mkbibrightborder}{}% +\renewrobustcmd{\mkbibsuperscript}[1]{% + \unspace\allowhyphens\textsuperscript{% + \begingroup +\framebox{##1}\endgroup}\kern\z@}% +} +\def\gbcitelabelopt@circle{% +\renewrobustcmd{\mkbibleftborder}{}% +\renewrobustcmd{\mkbibrightborder}{}% +\renewrobustcmd{\mkbibsuperscript}[1]{% + \unspace\allowhyphens\textsuperscript{% + \begingroup +\textcircled{##1}\endgroup}\kern\z@}% +} + % % 选项设置 @@ -125,14 +177,15 @@ %修改\mkbibsuperscript宏在最后加上一个空白使得xeCJK不会自动在引用标签后面加上中英文之间的空白 -%hzz,v1.0w,2021-0401 -\renewrobustcmd{\mkbibsuperscript}[1]{% - \unspace\allowhyphens\textsuperscript{% - \begingroup - \protected\long\def\mkbibsuperscript##1{% - \blx@warning{Nested superscript}% - \mkbibbrackets{##1}}% - #1\endgroup}\kern\z@} +%20210401,v1.0w,hzz +%20211030,v1.1a,hzz,调整到选项中去 +%\renewrobustcmd{\mkbibsuperscript}[1]{% +% \unspace\allowhyphens\textsuperscript{% +% \begingroup +% \protected\long\def\mkbibsuperscript##1{% +% \blx@warning{Nested superscript}% +% \mkbibbrackets{##1}}% +% #1\endgroup}\kern\z@} \newrobustcmd{\mkbibsuperscriptusp}[1]{% \unspace\allowhyphens\textsuperscript{% @@ -142,19 +195,20 @@ \mkbibbrackets{##1}}% #1\endgroup}} + + % % 重定义cite命令 % % 方法:\DeclareCiteCommand{\cite}[\mkbibparens]{precode}{loopcode}{sepcode}{postcode} % v1.0p版后将cite的处理方式修改为类似pagescite,而不再使用biblatex的标准方式 \DeclareCiteCommand{\cite}[\mkbibsuperscript]%利用mkbibsuperbracket添加方括号 \textsuperscript - {[\usebibmacro{cite:init}%] + {\mkbibleftborder\usebibmacro{cite:init}% \usebibmacro{prenote}} {\usebibmacro{citeindex}% \usebibmacro{cite:comp}} {} - {%[ - \usebibmacro{cite:dump}]% + {\usebibmacro{cite:dump}\mkbibrightborder% \printfield{postnote}}%\kern\p@ \kern\z@ %\renewcommand{\cite}[1]{\textsuperscript{[\supercite{#1}]}\kern\z@} @@ -180,13 +234,13 @@ % 重定义parencite命令,以满足标签带页码的国标要求 % \DeclareCiteCommand{\parencite}%[\mkbibbrackets] - {[\usebibmacro{cite:init}%] + {\mkbibleftborder\usebibmacro{cite:init}% \usebibmacro{prenote}}% {\usebibmacro{citeindex}% \usebibmacro{cite:comp}} {} {%[ - \usebibmacro{cite:dump}]% + \usebibmacro{cite:dump}\mkbibrightborder% \mkbibsuperscriptusp{\printfield{postnote}}} % @@ -200,26 +254,26 @@ {\printfield{postnote}}} % 2.新增\pagescite引用命令 \DeclareCiteCommand{\pagescite}[\mkbibsuperscript]%\mkbibbrackets,仍然用上标 - {[\usebibmacro{cite:init}%]直接添加方括号 + {\mkbibleftborder\usebibmacro{cite:init}%]直接添加方括号 \usebibmacro{prenote}% } {\usebibmacro{citeindex}% \usebibmacro{cite:comp}} {} - {\usebibmacro{cite:dump}]% + {\usebibmacro{cite:dump}\mkbibrightborder% \usebibmacro{postpages}} % % 定义yearpagescite,为与ay样式兼容,等同于\pagescite % \DeclareCiteCommand{\yearpagescite}[\mkbibsuperscript]%\mkbibbrackets,仍然用上标 - {[\usebibmacro{cite:init}%]直接添加方括号 + {\mkbibleftborder\usebibmacro{cite:init}%直接添加方括号 \usebibmacro{prenote}% } {\usebibmacro{citeindex}% \usebibmacro{cite:comp}} {} - {\usebibmacro{cite:dump}]% + {\usebibmacro{cite:dump}\mkbibrightborder% \usebibmacro{postpages}} % @@ -227,13 +281,14 @@ % % 原理方法:等同于\pagescite,但不要页码 \DeclareCiteCommand{\yearcite}[\mkbibsuperscript]%\mkbibbrackets,仍然用上标 - {[\usebibmacro{cite:init}%]直接添加方括号 + {\mkbibleftborder\usebibmacro{cite:init}%直接添加方括号 \usebibmacro{prenote}% } {\usebibmacro{citeindex}% \usebibmacro{cite:comp}} {} - {\usebibmacro{cite:dump}]} + {\usebibmacro{cite:dump}\mkbibrightborder} + % % 定义\authornumcite命令,输出作者信息,然后在后面带上顺序编码 @@ -254,8 +309,8 @@ {\iffieldequalstr{userf}{cn}{\renewcommand*{\andothersdelim}{\addthinspace}}%\addthinspace {\renewcommand*{\andothersdelim}{\addspace}}% \iftoggle{bbx:gblabelref}{\printtext[bibhyperref]{\printnames{labelname}}}{\printnames{labelname}}% - \mkbibsuperscript{\mkbibbrackets{\usebibmacro{citeindex}% - \usebibmacro{citeathn}}}} + \mkbibsuperscript{\mkbibleftborder\usebibmacro{citeindex}% + \usebibmacro{citeathn}\mkbibrightborder}} {\multicitedelim} {\mkbibsuperscript{\printfield{postnote}}} @@ -354,12 +409,12 @@ \DeclareCiteCommand{\citep}[\mkbibsuperscript]%利用mkbibsuperbracket添加方括号 - {[\usebibmacro{cite:init}% + {\mkbibleftborder\usebibmacro{cite:init}% \usebibmacro{prenote}} {\usebibmacro{citeindex}% \usebibmacro{cite:comp}} {} - {\usebibmacro{cite:dump}]% + {\usebibmacro{cite:dump}\mkbibrightborder% \printfield{postnote}} \newrobustcmd*{\citetns}% @@ -376,7 +431,8 @@ % 20190430,v1.0r,hzz % citec和citecs命令是实现了[1]-[3]这样的压缩形式。 % authornumcites是常用命令authornumcite的复数形式 -\DeclareFieldFormat{labelbracket}{\mkbibbrackets{#1}} +%\DeclareFieldFormat{labelbracket}{\mkbibbrackets{#1}} +\DeclareFieldFormat{labelbracket}{\mkbibleftborder{#1}\mkbibrightborder} \newbibmacro*{citec:comp:comp}{% \ifboolexpr{ diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-2015ay.bbx b/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-2015ay.bbx index 25455abe4a..2e38ec22c4 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-2015ay.bbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-2015ay.bbx @@ -10,7 +10,7 @@ % % 版本和时间信息 % -\def\versionofgbtstyle{2021/09/11 v1.1a} +\def\versionofgbtstyle{2021/12/11 v1.1b} \def\versionofbiblatex{\abx@version} \ProvidesFile{gb7714-2015ay.bbx}[\versionofgbtstyle biblatex bibliography style] %\RequireBiber[3]%显式指定用biber后端,当用bibtex时会报错,但其实不会影响编译,只是采用bibtex后无法达成格式需求 @@ -191,10 +191,12 @@ %为单个条目的姓名格式控制增加nameformat和namefmtid两个域 %为缩略信息文献表增加了shortbooktitle域 %为多语言排序增加了lansortorder域 + %因为language域会被clearlang选项清除,增加languageid域,类型设为field而不是list \DeclareDatamodelFields[type=field,datatype=literal]{mark,medium,nameformat} \DeclareDatamodelFields[type=field,datatype=integer]{namefmtid} \DeclareDatamodelFields[type=field,datatype=literal]{shortbooktitle} \DeclareDatamodelFields[type=field,datatype=literal]{lansortorder} + \DeclareDatamodelFields[type=field,datatype=literal]{languageid} %因为biblatex更新3.14版本以后,biber对于为声明数据模型的条目类型 %不再默认读取,而是以空字符串作为条目类型名,自然在条目定义alias时 @@ -1292,31 +1294,37 @@ %这里为兼容3.11及以下版本,所以用一个复杂一点的正则表达式 \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=languageid,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=languageid,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=languageid,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=languageid,fieldvalue={chinese}] \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=languageid,fieldvalue={japanese}] \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=languageid,fieldvalue={korean}] \step[fieldset=lansortorder,fieldvalue=\lankrorder] } \map{%尝试未定义数据模型的standard类型映射为其他类型book或inbook, @@ -2543,7 +2551,7 @@ test {\iftoggle{iftlseven}}%biblatex<=3.7 {\mkbibnameprefix{#3}\isdot}% \ifprefchar{}{\bibnamedelimc}}% \ifdefvoid{#2}{\mkbibnamefamily{\MakeCapital{#1}}}{\mkbibnamefamily{\MakeUppercase{#1}}}\isdot% - \ifdefvoid{#2}{}{\revsdnamepunct\bibnamedelimd\MakeSentenceCase{\mkbibnamegiven{#2}}\isdot}%\MakeCapital + \ifdefvoid{#2}{}{\revsdnamepunct\bibnamedelimd\mkbibnamegiven{\MakeSentenceCase{#2}}\isdot}%\MakeCapital \ifdefvoid{#4}{}{\bibnamedelimd\mkbibnamesuffix{#4}\isdot}} {\usebibmacro{name:delim}{#1}% \usebibmacro{name:hook}{#1}% @@ -2573,7 +2581,7 @@ test {\iftoggle{iftlseven}}%biblatex<=3.7 {\mkbibnameprefix{#3}\isdot}% \ifprefchar{}{\bibnamedelimc}}% \ifdefvoid{#2}{\mkbibnamefamily{\MakeCapital{#1}}}{\mkbibnamefamily{\MakeCapital{#1}}}\isdot% - \ifdefvoid{#2}{}{\revsdnamepunct\bibnamedelimd\MakeSentenceCase{\mkbibnamegiven{#2}}\isdot}%\MakeCapital + \ifdefvoid{#2}{}{\revsdnamepunct\bibnamedelimd\mkbibnamegiven{\MakeSentenceCase{#2}}\isdot}%\MakeCapital \ifdefvoid{#4}{}{\bibnamedelimd\mkbibnamesuffix{#4}\isdot}} {\usebibmacro{name:delim}{#1}% \usebibmacro{name:hook}{#1}% @@ -2662,7 +2670,7 @@ test {\iftoggle{iftlseven}}%biblatex<=3.7 {\mkbibnameprefix{#3}\isdot}% \ifpunctmark{'}{}{\bibnamedelimc}}% \ifblank{#2}{\MakeCapital#1}{\mkbibnamelast{\MakeUppercase{#1}}}\isdot%\MakeUppercase %\mkbibnamelast{\MakeUppercase{#1}} %\MakeSentenceCase - \ifblank{#2}{}{\revsdnamepunct\bibnamedelimd\MakeSentenceCase{\mkbibnamefirst{#2}}\isdot}% + \ifblank{#2}{}{\revsdnamepunct\bibnamedelimd\mkbibnamefirst{\MakeSentenceCase{#2}}\isdot}% \ifblank{#4}{}{\addcomma\addspace\bibnamedelimd\mkbibnameaffix{#4}\isdot}} {\usebibmacro{name:delim}{#1}% \usebibmacro{name:hook}{#1}% @@ -2686,7 +2694,7 @@ test {\iftoggle{iftlseven}}%biblatex<=3.7 {\mkbibnameprefix{#3}\isdot}% \ifpunctmark{'}{}{\bibnamedelimc}}% \ifblank{#2}{\MakeCapital#1}{\mkbibnamelast{\MakeCapital{#1}}}\isdot%\MakeUppercase %\mkbibnamelast{\MakeUppercase{#1}} %\MakeSentenceCase - \ifblank{#2}{}{\revsdnamepunct\bibnamedelimd\MakeSentenceCase{\mkbibnamefirst{#2}}\isdot}% + \ifblank{#2}{}{\revsdnamepunct\bibnamedelimd\mkbibnamefirst{\MakeSentenceCase{#2}}\isdot}% \ifblank{#4}{}{\addcomma\addspace\bibnamedelimd\mkbibnameaffix{#4}\isdot}} {\usebibmacro{name:delim}{#1}% \usebibmacro{name:hook}{#1}% diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-2015ay.cbx b/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-2015ay.cbx index e6540216ba..19a92bceed 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-2015ay.cbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-2015ay.cbx @@ -24,6 +24,43 @@ \ExecuteBibliographyOptions{gblabelref} +% +% 增加标签包围符号格式处理选项 +% 20211030,1.1a,hzz +% +\newrobustcmd{\mkbibleftborder}{(} +\newrobustcmd{\mkbibrightborder}{)} +\DeclareBibliographyOption[string]{gbcitelabel}[bracket]{% + \csuse{gbcitelabelopt@#1} +} +\ExecuteBibliographyOptions{gbcitelabel} + +\def\gbcitelabelopt@bracket{% +\renewrobustcmd{\mkbibleftborder}{[}% +\renewrobustcmd{\mkbibrightborder}{]}% +} +\def\gbcitelabelopt@parens{% +\renewrobustcmd{\mkbibleftborder}{(}% +\renewrobustcmd{\mkbibrightborder}{)}% +} +\def\gbcitelabelopt@dot{% +\renewrobustcmd{\mkbibleftborder}{}% +\renewrobustcmd{\mkbibrightborder}{.}% +} +\def\gbcitelabelopt@plain{% +\renewrobustcmd{\mkbibleftborder}{}% +\renewrobustcmd{\mkbibrightborder}{}% +} +\def\gbcitelabelopt@box{% +\renewrobustcmd{\mkbibleftborder}{}% +\renewrobustcmd{\mkbibrightborder}{}% +} +\def\gbcitelabelopt@circle{% +\renewrobustcmd{\mkbibleftborder}{}% +\renewrobustcmd{\mkbibrightborder}{}% +} + + \ExecuteBibliographyOptions{ %autocite = superscript , %autopunct = true , @@ -69,6 +106,11 @@ or test {\iftoggle{iftlseven}}%3.7=biblatex }{\newbibmacro{cite:labeldate+extradate}{\usebibmacro{cite:labelyear+extrayear}}}{}%else: biblatex>3.7 +%标注中biblatex专门定义了labelname来控制格式 +%所以如果要让标注的格式也同著录表一样的话 +%就可以使用下面这一个定义,当然通常情况下我们使用默认的定义即可。 +%\DeclareNameAlias{labelname}{namefmtselected} + %textcite标注命令中的标点设置,注意只针对textcite命令。 % v-old % v1.0t,20200320,hzz,修改如下 @@ -179,12 +221,11 @@ test {\iftoggle{iftlseven}}%3.7=biblatex \iffieldundef{postnote}% {}% {\thefield{postnote}}}% - (\usebibmacro{prenote}}%) + \mkbibleftborder\usebibmacro{prenote}}% {\usebibmacro{citeindex}% \usebibmacro{cite}} {} - {%( - )\mkbibsuperscript{\usebibmacro{postnote}}%\usebibmacro{postnote} + {\mkbibrightborder\mkbibsuperscript{\usebibmacro{postnote}}%\usebibmacro{postnote} } % @@ -198,19 +239,34 @@ test {\iftoggle{iftlseven}}%3.7=biblatex % % 重定义parencite命令 % -%\DeclareCiteCommand{\parencite} -% {\usebibmacro{cite:init}% -% \renewbibmacro*{postnote}{% -% \iffieldundef{postnote}% -% {}% -% {\nopunct% -% \printfield{postnote}}}% -% (\usebibmacro{prenote}}%) -% {\usebibmacro{citeindex}% -% \usebibmacro{cite}} -% {} -% {%( -% )\mkbibsuperscript{\usebibmacro{postnote}}} +\DeclareCiteCommand{\parencite}%[\mkbibparens] + {\usebibmacro{cite:init}% + \renewbibmacro*{postnote}{% + \iffieldundef{postnote}% + {}% + {\nopunct% + \printfield{postnote}}}% + \mkbibleftborder\usebibmacro{prenote}}% + {\usebibmacro{citeindex}% + \usebibmacro{cite}} + {} + {\mkbibrightborder\mkbibsuperscript{\usebibmacro{postnote}}} + +% +% 重定义footcite需要使用的命令 +% +\renewrobustcmd{\blx@mkbibfootnote}[2]{% + \iftoggle{blx@footnote} + {\blx@warning{Nested notes}% + \addspace\mkbibleftborder{#2}\mkbibrightborder} + {\unspace + \ifnum\blx@notetype=\tw@ + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi + {\csuse{blx@theendnote#1}{\protecting{\blxmkbibnote{end}{#2}}}} + {\csuse{footnote#1}{\protecting{\blxmkbibnote{foot}{#2}}}}}} % @@ -224,13 +280,12 @@ test {\iftoggle{iftlseven}}%3.7=biblatex \iffieldundef{postnote}% {\thefield{pages}}% {\thefield{postnote}}}% - (\usebibmacro{prenote}%) + \mkbibleftborder\usebibmacro{prenote}% }% {\usebibmacro{citeindex}% \usebibmacro{cite}} {} - {%( - )\mkbibsuperscript{\usebibmacro{postnote}}} + {\mkbibrightborder\mkbibsuperscript{\usebibmacro{postnote}}} % % 定义yearpagescite,用于当文中作者已经存在,需要页码和年份的情况 @@ -243,10 +298,10 @@ test {\iftoggle{iftlseven}}%3.7=biblatex \iffieldundef{postnote}% {\thefield{pages}}% {\thefield{postnote}}}% - \printtext{(}\usebibmacro{prenote}}% + \printtext{\mkbibleftborder}\usebibmacro{prenote}}% {\usebibmacro{cite:labeldate+extradate}}%\printfield{year}\printfield{extrayear} {\multicitedelim}% - {\printtext{)}\textsuperscript{\usebibmacro{postnote}}} + {\printtext{\mkbibrightborder}\textsuperscript{\usebibmacro{postnote}}} % % 定义yearcite,用于当文中作者已经存在,仅需要年份的情况 @@ -254,10 +309,10 @@ test {\iftoggle{iftlseven}}%3.7=biblatex % 原理:增加一个命令yearcite \DeclareCiteCommand{\yearcite}%仅输出年份,不要页码 {\usebibmacro{cite:init}% - \printtext{(}\usebibmacro{prenote}}% + \printtext{\mkbibleftborder}\usebibmacro{prenote}}% {\usebibmacro{cite:labeldate+extradate}}%\printfield{year}\printfield{extrayear} {\multicitedelim}% - {\printtext{)}} + {\printtext{\mkbibrightborder}} % % 定义\authornumcite命令,输出作者信息,然后在后面带上顺序编码 @@ -355,13 +410,13 @@ test {\iftoggle{iftlseven}}%3.7=biblatex {} {\ifbool{cbx:incitet}{\usebibmacro{citet:postnote}}{\usebibmacro{textcite:postnote}}} - \newrobustcmd{\cbx@citet@init}[2]{% +\newrobustcmd{\cbx@citet@init}[2]{% \global\booltrue{cbx:incitet}% \setcounter{textcitetotal}{0}% \setcounter{textcitecount}{0}% \def\cbx@savedcites{#1}#2\cbx@savedcites\empty} - \renewrobustcmd{\cbx@textcite@init}[2]{% +\renewrobustcmd{\cbx@textcite@init}[2]{% \global\boolfalse{cbx:incitet}% \setcounter{textcitetotal}{0}% \setcounter{textcitecount}{0}% @@ -397,12 +452,11 @@ test {\iftoggle{iftlseven}}%3.7=biblatex \iffieldundef{postnote}% {}% {\thefield{postnote}}}% - (\usebibmacro{prenote}}%) + \mkbibleftborder\usebibmacro{prenote}}% {\usebibmacro{citeindex}% \usebibmacro{cite}} {} - {%( - )\mkbibsuperscript{\usebibmacro{postnote}}%\usebibmacro{postnote} + {\mkbibrightborder\mkbibsuperscript{\usebibmacro{postnote}}%\usebibmacro{postnote} } \newrobustcmd*{\citetns}% diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-2015ms.bbx b/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-2015ms.bbx index 3044440ca2..218823ac90 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-2015ms.bbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-2015ms.bbx @@ -11,7 +11,7 @@ % % 版本和时间信息 % -\def\versionofgbtstyle{2021/09/11 v1.1a} +\def\versionofgbtstyle{2021/12/11 v1.1b} \def\versionofbiblatex{\abx@version} \ProvidesFile{gb7714-2015ms.bbx}[\versionofgbtstyle biblatex bibliography style] %\RequireBiber[3]%显式指定用biber后端,当用bibtex时会报错,但其实不会影响编译,只是采用bibtex后无法达成格式需求 @@ -85,10 +85,12 @@ %为单个条目的姓名格式控制增加nameformat和namefmtid两个域 %为缩略信息文献表增加了shortbooktitle域 %为多语言排序增加了lansortorder域 + %因为language域会被clearlang选项清除,增加languageid域,类型设为field而不是list \DeclareDatamodelFields[type=field,datatype=literal]{mark,medium,nameformat} \DeclareDatamodelFields[type=field,datatype=integer]{namefmtid} \DeclareDatamodelFields[type=field,datatype=literal]{shortbooktitle} \DeclareDatamodelFields[type=field,datatype=literal]{lansortorder} + \DeclareDatamodelFields[type=field,datatype=literal]{languageid} %因为biblatex更新3.14版本以后,biber对于为声明数据模型的条目类型 %不再默认读取,而是以空字符串作为条目类型名,自然在条目定义alias时 @@ -1052,26 +1054,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=languageid,fieldvalue={english}] } \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=languageid,fieldvalue={russian}] } \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=languageid,fieldvalue={french}] } \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=languageid,fieldvalue={chinese}] } \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=languageid,fieldvalue={japanese}] } \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=languageid,fieldvalue={korean}] } } } @@ -1578,7 +1586,7 @@ {\mkbibnameprefix{#3}\isdot}% \ifprefchar{}{\bibnamedelimc}}% \ifdefvoid{#2}{\mkbibnamefamily{\MakeCapital{#1}}}{\mkbibnamefamily{\MakeUppercase{#1}}}\isdot% - \ifdefvoid{#2}{}{\revsdnamepunct\bibnamedelimd\MakeSentenceCase{\mkbibnamegiven{#2}}\isdot}%\MakeCapital + \ifdefvoid{#2}{}{\revsdnamepunct\bibnamedelimd\mkbibnamegiven{\MakeSentenceCase{#2}}\isdot}%\MakeCapital \ifdefvoid{#4}{}{\bibnamedelimd\mkbibnamesuffix{#4}\isdot}} {\usebibmacro{name:delim}{#1}% \usebibmacro{name:hook}{#1}% @@ -1609,7 +1617,7 @@ {\mkbibnameprefix{#3}\isdot}% \ifprefchar{}{\bibnamedelimc}}% \ifdefvoid{#2}{\mkbibnamefamily{\MakeCapital{#1}}}{\mkbibnamefamily{\MakeCapital{#1}}}\isdot% - \ifdefvoid{#2}{}{\revsdnamepunct\bibnamedelimd\MakeSentenceCase{\mkbibnamegiven{#2}}\isdot}%\MakeCapital + \ifdefvoid{#2}{}{\revsdnamepunct\bibnamedelimd\mkbibnamegiven{\MakeSentenceCase{#2}}\isdot}%\MakeCapital \ifdefvoid{#4}{}{\bibnamedelimd\mkbibnamesuffix{#4}\isdot}} {\usebibmacro{name:delim}{#1}% \usebibmacro{name:hook}{#1}% diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-2015mx.bbx b/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-2015mx.bbx index e622a03e49..9266b481a5 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-2015mx.bbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-2015mx.bbx @@ -11,7 +11,7 @@ % % 版本和时间信息 % -\def\versionofgbtstyle{2021/09/11 v1.1a} +\def\versionofgbtstyle{2021/12/11 v1.1b} \def\versionofbiblatex{\abx@version} \ProvidesFile{gb7714-2015mx.bbx}[\versionofgbtstyle biblatex bibliography style] %\RequireBiber[3]%显式指定用biber后端,当用bibtex时会报错,但其实不会影响编译,只是采用bibtex后无法达成格式需求 @@ -109,10 +109,12 @@ %为单个条目的姓名格式控制增加nameformat和namefmtid两个域 %为缩略信息文献表增加了shortbooktitle域 %为多语言排序增加了lansortorder域 + %因为language域会被clearlang选项清除,增加languageid域,类型设为field而不是list \DeclareDatamodelFields[type=field,datatype=literal]{mark,medium,nameformat} \DeclareDatamodelFields[type=field,datatype=integer]{namefmtid} \DeclareDatamodelFields[type=field,datatype=literal]{shortbooktitle} \DeclareDatamodelFields[type=field,datatype=literal]{lansortorder} + \DeclareDatamodelFields[type=field,datatype=literal]{languageid} %为多样式文献表增加的stylesections、styleaysection域: \DeclareDatamodelFields[type=field,datatype=integer]{aysections} \DeclareDatamodelFields[type=field,datatype=literal]{styleaysection} @@ -1102,31 +1104,37 @@ %这里为兼容3.11及以下版本,所以用一个复杂一点的正则表达式 \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=languageid,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=languageid,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=languageid,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=languageid,fieldvalue={chinese}] \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=languageid,fieldvalue={japanese}] \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=languageid,fieldvalue={korean}] \step[fieldset=lansortorder,fieldvalue=\lankrorder] } } @@ -2153,7 +2161,7 @@ {\mkbibnameprefix{#3}\isdot}% \ifprefchar{}{\bibnamedelimc}}% \ifdefvoid{#2}{\mkbibnamefamily{\MakeCapital{#1}}}{\mkbibnamefamily{\MakeUppercase{#1}}}\isdot% - \ifdefvoid{#2}{}{\revsdnamepunct\bibnamedelimd\MakeSentenceCase{\mkbibnamegiven{#2}}\isdot}%\MakeCapital + \ifdefvoid{#2}{}{\revsdnamepunct\bibnamedelimd\mkbibnamegiven{\MakeSentenceCase{#2}}\isdot}%\MakeCapital \ifdefvoid{#4}{}{\bibnamedelimd\mkbibnamesuffix{#4}\isdot}} {\usebibmacro{name:delim}{#1}% \usebibmacro{name:hook}{#1}% @@ -2184,7 +2192,7 @@ {\mkbibnameprefix{#3}\isdot}% \ifprefchar{}{\bibnamedelimc}}% \ifdefvoid{#2}{\mkbibnamefamily{\MakeCapital{#1}}}{\mkbibnamefamily{\MakeCapital{#1}}}\isdot% - \ifdefvoid{#2}{}{\revsdnamepunct\bibnamedelimd\MakeSentenceCase{\mkbibnamegiven{#2}}\isdot}%\MakeCapital + \ifdefvoid{#2}{}{\revsdnamepunct\bibnamedelimd\mkbibnamegiven{\MakeSentenceCase{#2}}\isdot}%\MakeCapital \ifdefvoid{#4}{}{\bibnamedelimd\mkbibnamesuffix{#4}\isdot}} {\usebibmacro{name:delim}{#1}% \usebibmacro{name:hook}{#1}% diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-publist/README b/macros/latex/contrib/biblatex-contrib/biblatex-publist/README index f6209aa2ed..ae2d769a96 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-publist/README +++ b/macros/latex/contrib/biblatex-contrib/biblatex-publist/README @@ -45,6 +45,9 @@ instructions. == CHANGES == +* V. 1.24 (2021-12-11): + - Robustify handling of names with non-ASCII chars (#35). + * V. 1.23 (2021-09-01): - Fix omission of plauthor after related field (#34). diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-publist/biblatex-publist.pdf b/macros/latex/contrib/biblatex-contrib/biblatex-publist/biblatex-publist.pdf Binary files differindex a5cfc89607..cb0ba5891a 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-publist/biblatex-publist.pdf +++ b/macros/latex/contrib/biblatex-contrib/biblatex-publist/biblatex-publist.pdf diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-publist/biblatex-publist.tex b/macros/latex/contrib/biblatex-contrib/biblatex-publist/biblatex-publist.tex index 754704e300..282f87d9e0 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-publist/biblatex-publist.tex +++ b/macros/latex/contrib/biblatex-contrib/biblatex-publist/biblatex-publist.tex @@ -102,7 +102,7 @@ \thanks{Please report issues via \protect\url{https://github.com/jspitz/biblatex-publist}.}% } -\date{Version 1.23, 2021/09/01} +\date{Version 1.24, 2021/12/11} \maketitle \begin{abstract} @@ -667,6 +667,11 @@ or \begin{description} + \item [{V. 1.24 (2021-12-11):}]~ + \begin{itemize} + \item Robustify handling of names with non-ASCII chars. + \end{itemize} + \item [{V. 1.23 (2021-09-01):}]~ \begin{itemize} \item Fix omission of publist author after related field. @@ -906,7 +911,7 @@ Gregorio.% Thanks go to Enrico Gregorio (egreg on \emph{tex.stackexchange.com}) for helping me with correct name parsing (actually, the code the package uses is completely his), user gusbrs on \emph{tex.stackexchange.com}, -Marko Budii\'{c}, Clea F. Rees, Yannick Kalff, Moritz Wemheuer and many +Marko Budii\'{c}, Ulrike Fischer, Clea F. Rees, Yannick Kalff, Moritz Wemheuer and many other users for testing, bug reports and suggestions, Nicolas Markey for \emph{publist.bst} and of course Philipp Lehman and the current \bibltx\ team (Philipp Kime, Moritz Wemheuer, Audrey Boruvka and diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.bbx b/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.bbx index 418b8f68b0..5edbe259b9 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.bbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.bbx @@ -25,8 +25,8 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\def\bpl@version{1.23} -\def\bpl@rdate{2021/09/01} +\def\bpl@version{1.24} +\def\bpl@rdate{2021/12/11} \ProvidesFile{publist.bbx}[\bpl@rdate\space v.\bpl@version\space biblatex bibliography style (JSP)] @@ -272,7 +272,7 @@ \def\bpl@lvonpart{} \def\jsp@splitpllist#1{% \begingroup - \edef\@tempa{#1}% + \protected@edef\@tempa{#1}% \expandafter\endgroup \expandafter\jsp@@splitpllist\@tempa\relax% } @@ -285,7 +285,7 @@ % Fully expanded comparison % (adapted from scrbase.sty) \newcommand\bpl@ifstreq[2]{% - \begingroup\edef\@tempa{#1}\edef\@tempb{#2}% + \begingroup\protected@edef\@tempa{#1}\protected@edef\@tempb{#2}% \ifx\@tempa\@tempb \endgroup\expandafter\@firstoftwo \else diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.cbx b/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.cbx index b005d71c51..0ceed4cbb3 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.cbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.cbx @@ -26,8 +26,8 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\def\bpl@version{1.23} -\def\bpl@rdate{2021/09/01} +\def\bpl@version{1.24} +\def\bpl@rdate{2021/12/11} \ProvidesFile{publist.cbx}[\bpl@rdate\space v.\bpl@version\space biblatex citation style (JSP)] diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx index 9e6d709139..5d3b335dee 100644 --- a/macros/latex/contrib/easybook/easybook.dtx +++ b/macros/latex/contrib/easybook/easybook.dtx @@ -15,7 +15,7 @@ %<*class> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e} -\ProvidesExplClass{easybook}{2021/12/10}{1.41O} +\ProvidesExplClass{easybook}{2021/12/11}{1.41P} {Typeset Chinese theses or books} \bool_set_false:N \l__eb_compile_draft_bool @@ -309,7 +309,7 @@ %<*package> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e,etoolbox} -\ProvidesExplPackage{easybase}{2021/12/10}{1.41O} +\ProvidesExplPackage{easybase}{2021/12/11}{1.41P} {Typeset Chinese theses or books} \cs_generate_variant:Nn \dim_set:Nn { NV } @@ -1957,8 +1957,8 @@ \cs_new_protected:Npn \eb_thm_biname_set:nnn #1#2#3 { \tl_if_eq:NnTF \l__ctex_scheme_tl { chinese } - { \tl_set:cn { c__eb_thm_biname_#1_tl } {#3} } - { \tl_set:cn { c__eb_thm_biname_#1_tl } {#2} } + { \tl_set:cn { l__eb_thm_biname_#1_tl } {#3} } + { \tl_set:cn { l__eb_thm_biname_#1_tl } {#2} } } \cs_set_eq:NN \eb@declaretheorem@save \declaretheorem \cs_set_eq:NN \eb@declaretheoremsyle@save \declaretheoremstyle @@ -1982,12 +1982,18 @@ } \eb_thm_biname_set:nnn {#1} {#2} {#3} \declaretheorem{#1}[ - name = \tl_use:c { c__eb_thm_biname_#1_tl }, + name = \tl_use:c { l__eb_thm_biname_#1_tl }, style = eb-theorem,#5 ] \eb_if_thmframe_with_tcolorbox:TF - { \tcolorboxenvironment{#1}{#4} } { } - \labelformat{#1}{\tl_use:c { c__eb_thm_biname_#1_tl }~##1} + { + \bool_if_exist:cTF { l__eb_tcb_repeat_env_#1_bool } + { \bool_set_true:c { l__eb_tcb_repeat_env_#1_bool } } + { \bool_set_false:c { l__eb_tcb_repeat_env_#1_bool } } + \bool_if:cF { l__eb_tcb_repeat_env_#1_bool } + { \tcolorboxenvironment{#1}{#4} } + } { } + \labelformat{#1}{\tl_use:c { l__eb_thm_biname_#1_tl }~##1} } \prop_new:N \l__eb_thmtools_entry_prop @@ -2051,18 +2057,18 @@ \c__eb_thmtools_entry_clist { notebraces = \l__eb_thm_notebraces_tl } \exp_last_unbraced:NNV \declaretheoremstyle[\c__eb_thmtools_entry_clist]{eb-theorem} - \deftheorem{lemma}{引理} - \deftheorem{axiom}{公理} - \deftheorem{example}{例} - \deftheorem{problem}{问题} - \deftheorem{theorem}{定理} - \deftheorem{corollary}{推论} + \deftheorem{proof}{证明}[numbered = no,qed = \qedsymbol] + \deftheorem{remark}{注}[numbered = no] + \deftheorem{proposition}{性质} \deftheorem{assumption}{假设} \deftheorem{conjecture}{猜想} \deftheorem{definition}{定义} - \deftheorem{proposition}{性质} - \deftheorem{remark}{注}[numbered = no] - \deftheorem{proof}{证明}[numbered = no,qed = \qedsymbol] + \deftheorem{corollary}{推论} + \deftheorem{problem}{问题} + \deftheorem{theorem}{定理} + \deftheorem{example}{例} + \deftheorem{axiom}{公理} + \deftheorem{lemma}{引理} } \setchemformula @@ -2433,7 +2439,7 @@ } %</package> %<*tcolorbox> -\ProvidesExplFile{eb-tcolorbox.cfg}{2021/12/10}{1.41O} +\ProvidesExplFile{eb-tcolorbox.cfg}{2021/12/11}{1.41P} {Customization of tcolorbox for easybook} \cs_set_protected:Npn \setexercise #1 @@ -2542,8 +2548,15 @@ \tl_new:N \p@eb@exercise \tl_new:N \eb@tc@list@prologue -\cs_new:Npn \exerprologue #1 { \tl_gset:Nn \eb@tc@list@prologue {#1} } -\cs_new:Npn \tcphantomifname #1#2 +\bool_gset_true:N \g__eb_exer_clear_prologue_bool +\NewDocumentCommand{\exerprologue}{sm} + { + \IfBooleanTF{#1} + {\bool_gset_false:N \g__eb_exer_clear_prologue_bool} + {\bool_gset_true:N \g__eb_exer_clear_prologue_bool} + \tl_gset:Nn \eb@tc@list@prologue {#2} + } +\cs_new_protected:Npn \tcphantomifname #1#2 { \tl_gset:Nn \eb@tc@exercise@ifnametrue {#1} \tl_gset:Nn \eb@tc@exercise@ifnamefalse {#2} @@ -2561,7 +2574,7 @@ \eb@tc@exercise@title } }{} -\cs_set:Npn \eb_exercise_label_noempty_use: +\cs_new:Npn \eb_exercise_label_noempty_use: { \eb_current_label:n { eb@exercise } \tl_if_empty:NF \eb@tc@exercise@label @@ -2613,7 +2626,8 @@ \begin{eb@exercise@list}[\eb@tc@list@number,#5] #6 \end{eb@exercise@list} - \tl_gclear:N \eb@tc@list@prologue + \bool_if:NT \g__eb_exer_clear_prologue_bool + { \tl_gclear:N \eb@tc@list@prologue } }{} \DeclareTColorBox{easybox}{sO{Khaki}d()O{}} { diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf Binary files differindex 01f18259c0..5e44f4860a 100644 --- a/macros/latex/contrib/easybook/easybook.pdf +++ b/macros/latex/contrib/easybook/easybook.pdf diff --git a/macros/latex/contrib/easybook/easybook.tex b/macros/latex/contrib/easybook/easybook.tex index c0ccb8a86f..f625f1edf2 100644 --- a/macros/latex/contrib/easybook/easybook.tex +++ b/macros/latex/contrib/easybook/easybook.tex @@ -20,8 +20,8 @@ name = easybook, color-scheme = blue, title = EASYBOOK 使用手册, - version = v1.41O, - date = 2021/12/10, + version = v1.41P, + date = 2021/12/11, authors = 瞿毅, info = 排版简体中文学位论文和书籍, email = q1jx@foxmail.com, @@ -593,7 +593,7 @@ 文档类已预置 12 个定理环境,环境名及对应的定理名见小节 \ref{subsec:theorem},它们均使用预置的定理样式 \code{eb-theorem}。下面 \module*{thmset} 模块选项的用法名称与 \pkg*{thmtools} 宏包基本一致,且仅对预置定理样式生效。如果下面的选项不满足需求,可使用支持完整选项的相关命令创建定理环境。 \begin{options} \keybool{thmframe}\Module{thmset}\Default{false} - 给定理环境使用彩色盒子。这个特殊选项在本模块中使用 \pkg*{tcolorbox} 宏包来支持,\meta{盒子风格} 默认为 \code{tc-theorem}。\pkg*{thmtools} 具有类似的选项 \option*{thmbox},可在新建定理样式的命令中使用。 + 给定理环境使用彩色盒子。这个特殊选项在本模块中使用 \pkg*{tcolorbox} 宏包来支持,\meta{盒子风格} 默认为 \code{tc-theorem}。注意它应当在定理声明命令前使用。\pkg*{thmtools} 具有类似的选项 \option*{thmbox}。 \keyval-{headfont}{字体命令}\Default{\cs*{color}\Carg{ctex@emph}\cs*{sffamily}} 定理标题部分的字体,包括字体族、字体系列、字体尺寸和字体形状命令。 \keyval-{notefont}{字体命令}\Default @@ -1052,8 +1052,8 @@ \end{options} \command{setexerlist}[\marg{键值列表3}] 命令 \cs{setexerlist} 用于全局设置习题条目选项 \meta{键值列表3} 的值。\meta{键值列表3} 的选项与 \pkg*{enumitem} 的排序列表相同,也可以使用下述 \option{enumitem} 选项,不过第一个选项无法是短编号形式,这被 \option{number} 选项代替。 - \command{exerprologue}[\marg{序言内容}] - 序言命令 \cs{exerprologue} 在习题环境开始前插入一段内容,可以是文本或者代码,需要在每一个习题环境前使用。 + \command{exerprologue}[\sarg\marg{序言内容}] + 序言命令 \cs{exerprologue} 在习题环境开始前插入一段内容,可以是文本或者代码,需要在每一个习题环境前使用。带有星号参数的命令会使序言在习题环境一直有效。 \command{tcphantomifname}[\marg{编号代码}\marg{不编号代码}] 命令 \cs{tcphantomifname} 根据使用 \pkg*{tcolorbox} 生成的习题标题是否编号,在超链接锚点的位置加入代码,比如使用 \cs*{addcontentsline} 命令将习题标题加入目录。 \end{commands} |