diff options
author | Norbert Preining <norbert@preining.info> | 2022-05-18 03:00:54 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2022-05-18 03:00:54 +0000 |
commit | 606c3150f6696596010034bfce56f3b565fd7c85 (patch) | |
tree | 3b103171029bde57b5851f5e2bf7a8e241d10509 /macros/latex | |
parent | 1eda050c415a347a8a4208797e4257c29b4beefc (diff) |
CTAN sync 202205180300
Diffstat (limited to 'macros/latex')
53 files changed, 916 insertions, 503 deletions
diff --git a/macros/latex/contrib/adjmulticol/README b/macros/latex/contrib/adjmulticol/README index 82761b3e43..caea99be65 100644 --- a/macros/latex/contrib/adjmulticol/README +++ b/macros/latex/contrib/adjmulticol/README @@ -1,9 +1,7 @@ - Adjusting Margins for Multicolumn and Unicolumn Output +Adjusting Margins for Multicolumn and Unicolumn Output -This package provides an extension of the multicol package with the -option to change the margins for multicolumn and unicolumn layout. -The package understands the difference between the even and odd -margins for two side printing. +An extension to the multicol package for changing margins for +multicolumn layout and one column output Changes: @@ -15,4 +13,6 @@ Changes: v1.3 Big fix: disappearing material in one column output - v1.4 New version of bug fix with one column
\ No newline at end of file + v1.4 New version of bug fix with one column + + v1.5 Added space after one column material
\ No newline at end of file diff --git a/macros/latex/contrib/adjmulticol/adjmulticol.dtx b/macros/latex/contrib/adjmulticol/adjmulticol.dtx index 66d2f060e5..85877a8e52 100644 --- a/macros/latex/contrib/adjmulticol/adjmulticol.dtx +++ b/macros/latex/contrib/adjmulticol/adjmulticol.dtx @@ -308,7 +308,7 @@ %</gobble> %<style>\ProvidesPackage{adjmulticol} %<*style> -[2022/04/17 v1.4 Adjusted margins for multicolumn layout] +[2022/05/15 v1.5 Adjusted margins for multicolumn layout] % \end{macrocode} % % @@ -530,12 +530,13 @@ % \end{macro} % % \begin{macro}{\adjmc@process@ne@column} -% \changes{v1.4}{2022/04/17}{Added macro} +% \changes{v1.4}{2022/04/17}{Added macro} +% \changes{v1.5}{2022/05/15}{Added \cs{vfill}} % If we have one column, we do not need to balance it. Mostly stolen % from |multicol.sty| % \begin{macrocode} \def\adjmc@process@ne@column{% - \setbox\mult@firstbox\copy\mult@box} + \setbox\mult@firstbox\vbox{\unvbox\mult@box\vfill}} % \end{macrocode} % % diff --git a/macros/latex/contrib/adjmulticol/adjmulticol.pdf b/macros/latex/contrib/adjmulticol/adjmulticol.pdf Binary files differindex 7e8514791d..d29761770b 100644 --- a/macros/latex/contrib/adjmulticol/adjmulticol.pdf +++ b/macros/latex/contrib/adjmulticol/adjmulticol.pdf diff --git a/macros/latex/contrib/adjmulticol/sample.pdf b/macros/latex/contrib/adjmulticol/sample.pdf Binary files differindex b063dffc00..26d5861b87 100644 --- a/macros/latex/contrib/adjmulticol/sample.pdf +++ b/macros/latex/contrib/adjmulticol/sample.pdf diff --git a/macros/latex/contrib/beamer/CHANGELOG.md b/macros/latex/contrib/beamer/CHANGELOG.md index bf3bb51f4c..9bfff6ad56 100644 --- a/macros/latex/contrib/beamer/CHANGELOG.md +++ b/macros/latex/contrib/beamer/CHANGELOG.md @@ -8,6 +8,15 @@ a major and minor version only. ## [Unreleased] +## [v3.67] + +### Changed +- beamer sets \@currentlabelname itself and no longer relies on nameref patches. + +### Fixed +- slide transitions if the new pdfmanagement is used +- name of transition replace in pdf is R not Replace + ## [v3.66] ### Fixed @@ -193,7 +202,8 @@ a major and minor version only. - Support for `noxcolor` with `beamerarticle` (see #483) - Treatment of mixed overlay/alert specifications -[Unreleased]: https://github.com/josephwright/beamer/compare/v3.66...HEAD +[Unreleased]: https://github.com/josephwright/beamer/compare/v3.67...HEAD +[v3.67]: https://github.com/josephwright/beamer/compare/v3.66...v3.67 [v3.66]: https://github.com/josephwright/beamer/compare/v3.65...v3.66 [v3.65]: https://github.com/josephwright/beamer/compare/v3.64...v3.65 [v3.64]: https://github.com/josephwright/beamer/compare/v3.63...v3.64 diff --git a/macros/latex/contrib/beamer/base/beamer.cls b/macros/latex/contrib/beamer/base/beamer.cls index 7b07f7b6fe..7e5b558121 100644 --- a/macros/latex/contrib/beamer/base/beamer.cls +++ b/macros/latex/contrib/beamer/base/beamer.cls @@ -12,7 +12,7 @@ % See the file doc/licenses/LICENSE for more details. \ProvidesClass{beamer} - [2022/02/08 v3.66 A class for typesetting presentations] + [2022/05/17 v3.67 A class for typesetting presentations] % Setup modes and check for article option % Also loads packages required by both beamer and beamerarticle @@ -171,8 +171,8 @@ \lccode`\~=\count@ \catcode\count@=\active \lowercase{\def~{\kern1ex}}}}} - -\DeclareOptionBeamer{onlytextwidth}{\beamer@onlytextwidthtrue} + +\DeclareOptionBeamer{onlytextwidth}{\beamer@onlytextwidthtrue} % obsolete options \DeclareOptionBeamer{notes}[show]{\csname beamer@notesaction@#1\endcsname} @@ -274,7 +274,7 @@ \AtBeginDocument{\PreloadUnicodePage{0}}% \AtBeginDocument{\PreloadUnicodePage{1}}% } - \else + \else \def\beamer@loaducs{% \RequirePackage{ucs}% \AtBeginDocument{\PreloadUnicodePage{0}}% @@ -368,7 +368,8 @@ % Normally loaded by hyperref but to be on the safe side ... \RequirePackage{atbegshi} - +% suppress the nameref beamer patches as they are now done by beamer: +\def\NR@nopatch@beamer{} \RequirePackage[implicit=false]{hyperref} \hypersetup{pdfcreator={LaTeX with Beamer class}} diff --git a/macros/latex/contrib/beamer/base/beamerarticle.sty b/macros/latex/contrib/beamer/base/beamerarticle.sty index 9e398a50e0..c56dbc55a3 100644 --- a/macros/latex/contrib/beamer/base/beamerarticle.sty +++ b/macros/latex/contrib/beamer/base/beamerarticle.sty @@ -12,7 +12,7 @@ % See the file doc/licenses/LICENSE for more details. \ProvidesPackage{beamerarticle} - [2022/02/08 v3.66 beamer input in article mode] + [2022/05/17 v3.67 beamer input in article mode] % Setup modes and check for article option % Also loads packages required by both beamer and beamerarticle diff --git a/macros/latex/contrib/beamer/base/beamerbaseauxtemplates.sty b/macros/latex/contrib/beamer/base/beamerbaseauxtemplates.sty index c77970cd31..b3638febe5 100644 --- a/macros/latex/contrib/beamer/base/beamerbaseauxtemplates.sty +++ b/macros/latex/contrib/beamer/base/beamerbaseauxtemplates.sty @@ -190,8 +190,8 @@ % prevents the period to be printed with the first/last section option \ifnum\beamer@tempcount>\beamer@toclastsection \else - \ifnum\beamer@tempcount>0 - \inserttocsectionnumber. + \ifnum\beamer@tempcount>0 + \inserttocsectionnumber. \fi\fi% \inserttocsection\par% } @@ -854,7 +854,12 @@ \defbeamertemplate{theorem end}{numbered} {\end{\inserttheoremblockenv}} - +\AtBeginDocument{% + \addtobeamertemplate{theorem begin}{% + \expandafter\GetTitleString\expandafter{\inserttheoremaddition}% + \let\@currentlabelname\GetTitleStringResult}{}% + } + \defbeamertemplate{theorem begin}{normal font} { \normalfont diff --git a/macros/latex/contrib/beamer/base/beamerbaselocalstructure.sty b/macros/latex/contrib/beamer/base/beamerbaselocalstructure.sty index d2b08184ed..59dcb77a89 100644 --- a/macros/latex/contrib/beamer/base/beamerbaselocalstructure.sty +++ b/macros/latex/contrib/beamer/base/beamerbaselocalstructure.sty @@ -305,6 +305,8 @@ \def\enddescription{\ifhmode\unskip\fi\endlist% \usebeamertemplate{description body end}} \long\def\beamer@descriptionitem#1{% + \GetTitleString{#1}% + \let\@currentlabelname\GetTitleStringResult \def\insertdescriptionitem{#1}% \hfil\hspace\labelsep{\usebeamertemplate**{description item}}} @@ -495,12 +497,12 @@ {\ifcsundef{abx@field@title}{}{\ifpunct{}{\midsentence\newunitpunct}}% \newblock\unspace\usebeamercolor[fg]{bibliography entry note}}{}{}} {}} - + % Adding patches to some biblatex styles \csappto{blx@filehook@postload@numeric.bbx}{% \mode<presentation>{\setbeamertemplate{bibliography item}{\insertbiblabel}}} \csappto{blx@filehook@postload@alphabetic.bbx}{% - \mode<presentation>{\setbeamertemplate{bibliography item}{\insertbiblabel}}} + \mode<presentation>{\setbeamertemplate{bibliography item}{\insertbiblabel}}} \csappto{blx@filehook@postload@authoryear.bbx}{% \mode<presentation>{% \pretocmd{\bibsetup}{% @@ -509,7 +511,7 @@ \addtolength{\labelwidth}{2\labelsep}% \addtolength{\bibhang}{\labelsep}% }{}{}% - }} + }} \csappto{blx@filehook@postload@authortitle.bbx}{% \mode<presentation>{% \pretocmd{\bibsetup}{% diff --git a/macros/latex/contrib/beamer/base/beamerbaseoverlay.sty b/macros/latex/contrib/beamer/base/beamerbaseoverlay.sty index 46cc607dde..8ad4f3daa8 100644 --- a/macros/latex/contrib/beamer/base/beamerbaseoverlay.sty +++ b/macros/latex/contrib/beamer/base/beamerbaseoverlay.sty @@ -741,6 +741,7 @@ \edef\beamer@temp{{pdfpagetransition={#2 \beamer@transdir\space\beamer@dur}}}% \expandafter\hypersetup\beamer@temp} + \mode <article> { @@ -759,7 +760,7 @@ \newcommand<>{\transfade}[1][]{\only#2{\beamer@dotrans[{#1}]{Fade}}} \newcommand<>{\transglitter}[1][]{\only#2{\beamer@dotrans[{#1}]{Glitter}}} \newcommand<>{\transpush}[1][]{\only#2{\beamer@dotrans[{#1}]{Push}}} - \newcommand<>{\transreplace}[1][]{\only#2{\beamer@dotrans[{#1}]{Replace}}} + \newcommand<>{\transreplace}[1][]{\only#2{\beamer@dotrans[{#1}]{R}}} \newcommand<>{\transsplitverticalin}[1][]{\only#2{\beamer@dotrans[{#1}]{Split /Dm /V /M /I}}} \newcommand<>{\transsplitverticalout}[1][]{\only#2{\beamer@dotrans[{#1}]{Split /Dm /V /M /O}}} \newcommand<>{\transsplithorizontalin}[1][]{\only#2{\beamer@dotrans[{#1}]{Split /Dm /H /M /I}}} @@ -771,6 +772,27 @@ \newcommand<>{\transduration}[1]{\only#2{\hypersetup{pdfpageduration={#1}}}} +\@ifundefined{IfPDFManagementActiveTF}{} + { + \IfPDFManagementActiveTF + { + \renewcommand\beamer@dotrans[2][]{% + \hypersetup{pdfpagetransition={style=#2,#1}}% + } + \renewcommand<>{\transblindshorizontal}[1][]{\only#2{\beamer@dotrans[{#1,direction=H}]{Blinds}}} + \renewcommand<>{\transblindsvertical}[1][]{\only#2{\beamer@dotrans[{#1,direction=V}]{Blinds}}} + \renewcommand<>{\transboxin}[1][]{\only#2{\beamer@dotrans[{#1,motion=I}]{Box}}} + \renewcommand<>{\transboxout}[1][]{\only#2{\beamer@dotrans[{#1,motion=O}]{Box}}} + \renewcommand<>{\transsplitverticalin}[1][]{\only#2{\beamer@dotrans[{#1,direction=V,motion=I}]{Split}}} + \renewcommand<>{\transsplitverticalout}[1][]{\only#2{\beamer@dotrans[{#1,direction=V,motion=O}]{Split}}} + \renewcommand<>{\transsplithorizontalin}[1][]{\only#2{\beamer@dotrans[{#1,direction=H,motion=I}]{Split}}} + \renewcommand<>{\transsplithorizontalout}[1][]{\only#2{\beamer@dotrans[{#1,direction=H,motion=O}]{Split}}} + \renewcommand<>{\transreplace}[1][]{\only#2{\beamer@dotrans[{#1}]{R}}} + } + {} + } + + \mode <article> { diff --git a/macros/latex/contrib/beamer/base/beamerbasesection.sty b/macros/latex/contrib/beamer/base/beamerbasesection.sty index b28b9ea853..82ef80b26c 100644 --- a/macros/latex/contrib/beamer/base/beamerbasesection.sty +++ b/macros/latex/contrib/beamer/base/beamerbasesection.sty @@ -178,6 +178,8 @@ \long\def\beamer@@ssection*#1{\beamer@section[{#1}]{}} \long\def\beamer@@@section#1{\beamer@section[{#1}]{#1}} \long\def\beamer@section[#1]#2{% + \GetTitleString{#1}% + \let\@currentlabelname\GetTitleStringResult \beamer@savemode% \mode<all>% \ifbeamer@inlecture @@ -202,7 +204,7 @@ \def\insertsubsection{}% \def\insertsubsubsection{}% % Deal with a defective patch in metropolis theme - \def\insertsectionhead{\hyperlink{Navigation\the\c@page}{#1}}% + \def\insertsectionhead{\hyperlink{Navigation\the\c@page}{#1}}% \edef\insertsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{\unexpanded{#1}}}% \def\insertsubsectionhead{}% \def\insertsubsubsectionhead{}% @@ -254,6 +256,8 @@ \long\def\beamer@@ssubsection*#1{\beamer@subsection[{#1}]{}} \def\beamer@@@subsection#1{\beamer@subsection[{#1}]{#1}} \def\beamer@subsection[#1]#2{% + \GetTitleString{#1}% + \let\@currentlabelname\GetTitleStringResult \beamer@savemode% \mode<all>% \ifbeamer@inlecture% @@ -319,6 +323,8 @@ \long\def\beamer@@ssubsubsection*#1{\beamer@subsubsection[{#1}]{}} \def\beamer@@@subsubsection#1{\beamer@subsubsection[{#1}]{#1}} \def\beamer@subsubsection[#1]#2{% + \GetTitleString{#1}% + \let\@currentlabelname\GetTitleStringResult \beamer@savemode% \mode<all>% \ifbeamer@inlecture% diff --git a/macros/latex/contrib/beamer/doc/beamerexample-conference-talk.pdf b/macros/latex/contrib/beamer/doc/beamerexample-conference-talk.pdf Binary files differindex 0fdd705324..7aebaaeccf 100644 --- a/macros/latex/contrib/beamer/doc/beamerexample-conference-talk.pdf +++ b/macros/latex/contrib/beamer/doc/beamerexample-conference-talk.pdf diff --git a/macros/latex/contrib/beamer/doc/beamerexample-lecture-beamer-version.pdf b/macros/latex/contrib/beamer/doc/beamerexample-lecture-beamer-version.pdf Binary files differindex 9e1b92e099..5bad383bf6 100644 --- a/macros/latex/contrib/beamer/doc/beamerexample-lecture-beamer-version.pdf +++ b/macros/latex/contrib/beamer/doc/beamerexample-lecture-beamer-version.pdf diff --git a/macros/latex/contrib/beamer/doc/beamerexample-lecture-print-version.pdf b/macros/latex/contrib/beamer/doc/beamerexample-lecture-print-version.pdf Binary files differindex ba2c3f9bae..54c13f9716 100644 --- a/macros/latex/contrib/beamer/doc/beamerexample-lecture-print-version.pdf +++ b/macros/latex/contrib/beamer/doc/beamerexample-lecture-print-version.pdf diff --git a/macros/latex/contrib/beamer/doc/beameruserguide.pdf b/macros/latex/contrib/beamer/doc/beameruserguide.pdf Binary files differindex f1462c75d5..633300470c 100644 --- a/macros/latex/contrib/beamer/doc/beameruserguide.pdf +++ b/macros/latex/contrib/beamer/doc/beameruserguide.pdf diff --git a/macros/latex/contrib/beamer/doc/beameruserguide.tex b/macros/latex/contrib/beamer/doc/beameruserguide.tex index c45081be5b..b6ca2c0380 100644 --- a/macros/latex/contrib/beamer/doc/beameruserguide.tex +++ b/macros/latex/contrib/beamer/doc/beameruserguide.tex @@ -13,7 +13,7 @@ \documentclass{ltxdoc} -\def\beamerugversion{3.66} +\def\beamerugversion{3.67} \def\beamerugpgfversion{3.1.7} \def\beamerugxcolorversion{2.00} 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 a616bdf993..004f888587 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: 2022-04-16 to version v1.1h</b> +<b>Date of last change: 2022-05-17 to version v1.1i</b> # biblatex-gb7714-2015: a biblatex style package @@ -1350,6 +1350,8 @@ biblatex中处理顺序数字编码压缩的代码默认从3个连续编码开 - ![test-special-chars-in-fields.tex](example/test-special-chars-in-fields.tex) 测试不同域中存在的特殊字符处理 - ![test-gbt-7714-1987.tex](example/test-gbt-7714-1987.tex) 测试GB/T7714-1987标准的样式 - ![test-gbt-7714-2005.tex](example/test-gbt-7714-2005.tex) 测试GB/T7714-2005标准的样式 + 测试标注中本地化字符串、标点的中英文切换 + - ![test-punct-quanjiao.tex](example/test-punct-quanjiao.tex) 测试标点中英文切换 @@ -1589,6 +1591,7 @@ please see the file 'biblatex-gb7714-2015.pdf' for further information! * 2022/03/13 v1.1f,ctan,github * 2022/04/03 v1.1g,ctan,github * 2022/04/16 v1.1h,ctan,github +* 2022/05/17 v1.1i,ctan,github --------------------------------------------------------- ## Update history: 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 1c844149fe..eabdc8f03f 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 bff9dfe0bd..8895c17937 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 @@ -685,9 +685,9 @@ leftrule=0pt,rightrule=0pt,toprule=0.4pt,bottomrule=0.4pt] \item erjpunctcn=false,则将所有的文献中的标点改为英文标点(即半角标点)。 \end{itemize} - 需要注意的是:若只想修改英文文献的全部标点为半角标点,而中文文献的标点不变,仅需在导言区加上如下命令: - \lstinline[breaklines=true]!\def\erjpunctcommalanen{\addcomma\addspace}!, - \lstinline[breaklines=true]!\def\erjpunctcolonlanen{\addcolon\addspace}!。 + 需要注意的是:若只想修改英文文献的全部标点为半角标点,而中文文献的标点不变,可在导言区采用如下方式修改英文文献的标点: + \lstinline[breaklines=true]!\def\gbpunctcommalanen{\addcomma\addspace}!, + \lstinline[breaklines=true]!\def\gbpunctcolonlanen{\addcolon\addspace}!。 \pdfbookmark[4]{gbtitlelink}{gbtitlelink} @@ -739,11 +739,11 @@ leftrule=0pt,rightrule=0pt,toprule=0.4pt,bottomrule=0.4pt] \item gblocal=chinese,强制设置所有的本地化字符串使用中文。 \item gblocal=english,强制设置所有的本地化字符串使用英文。 \end{itemize} - 当使用gb7714-2015时,本质上是使用如下的本地化字符串,如果有更多的修改需求,可以直接修改它们: + 标注和文献表中如:等、和等字符,本质上是由andincite等本地化字符串所控制的,直接修改它们可以得到不同的效果,比如: \begin{texlist} \DefineBibliographyStrings{english}{ - andincite = {和}, - andincitecn = {和}, + andincite = {和}, %判断为英文的文献使用的字符串 + andincitecn = {和}, %判断为中文的文献使用的字符串 andothersincitecn = {等}, andothersincite = {等{\adddot}},%adddot才能避开标点追踪 } @@ -1297,7 +1297,9 @@ leftrule=0pt,rightrule=0pt,toprule=0.4pt,bottomrule=0.4pt] \end{example} +\paragraph{标注中的全半角标点设置} +参考:\url{https://blog.csdn.net/xenonhu/article/details/124686522} @@ -1327,7 +1329,7 @@ leftrule=0pt,rightrule=0pt,toprule=0.4pt,bottomrule=0.4pt] \subsubsection{标题格式控制} -标题内容的设置有三种方式,这里再重复一下:一是直接在printbibliography命令中利用选项title设置,二是gbctexset=true时,重定义bibname和refname来设置,三是gbctexset=true是false时,利用本地化字符串进行设置。具体参见gbctexset选项。 +标题内容的设置有三种方式,这里再重复一下:一是直接在printbibliography命令中利用选项title设置,二是gbctexset=true时,重定义bibname和refname来设置,三是gbctexset=false时,利用本地化字符串进行设置。具体参见gbctexset选项。 标题格式的设置主要是通过重定义参考文献环境的heading进行,比如: @@ -1345,13 +1347,12 @@ leftrule=0pt,rightrule=0pt,toprule=0.4pt,bottomrule=0.4pt] \subsubsection{段落格式控制} -\paragraph{\heiti 文献表字体、颜色、间距、缩进控制} 为方便用户改变文献表段落格式、内容字体和颜色等,在 biblatex 提供的 \verb|\bibfont| 命令基础上, -增加了\verb|\bibauthorfont|、\verb|\bibtitlefont|、\verb|\bibpubfont| 等命令用于控制文献不同部分的格式,比如作者,标题,出版项等。 -增加了尺寸\verb|\bibitemindent| 用于控制参考文献条目在文献表中的缩进, -其意义与 list 环境中 \verb|\itemindent| 相同。 +\paragraph{\heiti 文献表字体、颜色} 为方便用户改变文献表段落格式、内容字体和颜色等,在 biblatex 提供的 \verb|\bibfont| 命令基础上, +增加了\verb|\bibauthorfont|、\verb|\bibtitlefont|、\verb|\bibpubfont| 等命令用于控制文献部分著录项的格式,比如作者,标题,出版项等。 用法具体见例\ref{eg:biblist:fontset},结果如图\ref{fig:par:fmt}所示。 测试用例见\href{run:example/testfontinbiblio.tex}{testfontinbiblio.tex}。 + \begin{example}{文献表段落格式、字体、颜色}{eg:biblist:fontset} \begin{texlist} % 文献项之间的间隔符控制(比如是否换行) @@ -1380,6 +1381,7 @@ leftrule=0pt,rightrule=0pt,toprule=0.4pt,bottomrule=0.4pt] \caption{文献表段落格式示例}\label{fig:par:fmt} \end{figure} +\paragraph{\heiti 文献表竖直间距控制} 文献表各条目之间的竖直间距控制如例\ref{eg:biblist:vspace}所示: \begin{example}{文献表竖直间距控制}{eg:biblist:vspace} @@ -1391,6 +1393,10 @@ leftrule=0pt,rightrule=0pt,toprule=0.4pt,bottomrule=0.4pt] \end{texlist} \end{example} + +\paragraph{\heiti 文献表水平间距(缩进)控制} +增加了尺寸\verb|\bibitemindent| 用于控制参考文献条目在文献表中的缩进, +其意义与 list 环境中 \verb|\itemindent| 相同。 文献表的水平缩进控制,两种编制方式下是不同的。对于\emph{著者-出版年}制文献表,bibitemindent表示 \emph{一条文献中第一行相对后面各行的缩进},bibhang 表示\emph{页边到文献各行起始位置的距离}。因此要调整缩进就是要设置这两尺寸。 @@ -1465,9 +1471,10 @@ leftrule=0pt,rightrule=0pt,toprule=0.4pt,bottomrule=0.4pt] \end{texlist} \end{example} -文献表中有时需要调整标点为中文的全角标点,可以通过不同机制下的标点设置来调整。 +\paragraph{\heiti 文献表中的标点控制} 文献表中有时需要调整标点为中文的全角标点,可以通过不同机制下的标点设置来调整。 调整方式如例\ref{eg:biblist:separator}所示。有时在本地化字符串中也可以实现标点调整,比如and,in等本地化字符串。有时在域格式中也可能出现标点调整,比如title域格式。而且因为不同语言的处理,可能内部也存在标点的调整。具体情况是比较复杂的,这里不再一一列举,一些修改示例可以参考: \href{run:./chinese-erj.bbx}{chinese-erj.bbx}, +\href{run:./gb7714-CCNU.bbx}{gb7714-CCNU.bbx}, \href{run:./egthesis/thesis-uibe-numeric.tex}{thesis-uibe-numeric.tex}。具体的标点命令的意义详见biblatex手册。 \begin{example}{文献表常见标点控制}{eg:biblist:separator} @@ -1488,7 +1495,7 @@ leftrule=0pt,rightrule=0pt,toprule=0.4pt,bottomrule=0.4pt] \end{texlist} \end{example} -\subsubsection{条目著录格式控制}\label{sec:entry:fmt} +\subsubsection{条目著录格式的选项控制}\label{sec:entry:fmt} 文献表输出的格式即参考文献著录样式,除了整体的段落格式外,还有条目内部的格式可以控制,条目内部的这些项称为著录项,这些著录项的格式通常可由选项控制。可用选项除了biblatex 提供的标准选项外,也包括样式包提供的选项。 图\ref{fig:content:fmta}、\ref{fig:content:fmtb}、\ref{fig:content:fmtc}给出了一些选项设置后的格式控制效果, @@ -1549,9 +1556,9 @@ leftrule=0pt,rightrule=0pt,toprule=0.4pt,bottomrule=0.4pt] \caption{文献表条目著录格式示例三}\label{fig:content:fmtc} \end{figure} -\subsubsection{著录格式局部调整}\label{sec:entry:fmtlocal} +\subsubsection{条目著录格式的局部调整}\label{sec:entry:fmtlocal} -得益于biblatex利用tex宏控制著录格式的特点,加上tex语言本身编组的局部化特性,所以在利用biblatex生成参考文献的过程中可以有丰富手段,来进行参考文献著录格式的局部调整。也正因为局部的格式调整,因此通常局部格式都是结合refsection或者refsegment来操作的。前面提到过的一个很简单的例子,当在学位论文的写作中需要正文部分的参考文献使用顺序编码制,而附录中研究成果部分使用作者年制这样的需求就是一个典型的局部化格式调整。这一问题的解决方式为在研究成果部分使用一个refsection将其局部化,并结合gb7714-2015mx样式,并利用setaystylesection命令设置该refsection为作者年制样式。 +得益于biblatex利用tex宏控制著录格式的特点,加上tex语言本身编组的局部化特性,所以在利用biblatex生成参考文献的过程中可以有丰富手段来进行参考文献著录格式的局部调整。因为是局部的格式调整,所以通常是结合refsection或者refsegment来操作的。前面提到过的一个很简单的例子,当在学位论文的写作中需要正文部分的参考文献使用顺序编码制,而附录中研究成果部分使用作者年制这样的需求就是一个典型的局部化格式调整。这一问题的解决方式为:在研究成果部分使用refsection将其局部化,并结合gb7714-2015mx样式,并利用setaystylesection命令设置该refsection为作者年制样式。 因为tex宏的局部化调整特性,因此几乎biblatex中所有格式设置都是可以做局部调整的,限于篇幅,这里仅介绍一些常见的简单的调整方式: @@ -1582,7 +1589,10 @@ leftrule=0pt,rightrule=0pt,toprule=0.4pt,bottomrule=0.4pt] \begin{example}{域格式的局部调整示例}{eg:bib:fieldsetlocal} \begin{texlist} - \DeclareFieldFormat[article,periodical]{volume}{\textbf{#1}}% volume of a journal + %期刊文献的卷加粗 + \DeclareFieldFormat[article,periodical]{volume}{\textbf{#1}} + %会议论文年份加粗 + \DeclareFieldFormat[inproceedings]{date}{\mkbibbold{#1}} \end{texlist} \end{example} @@ -1979,53 +1989,7 @@ leftrule=0pt,rightrule=0pt,toprule=0.4pt,bottomrule=0.4pt] 具体例子则可以参考\href{run:./stdgbT7714-2015.pdf}{stdgbT7714-2015.pdf}。其中第8节中大量使用这种方式。 - - -\subsection{未分类说明} - -\subsubsection{biblatex 的优点} - -基于 biblatex 宏包的参考文献生成方法,具有很多明显的优点,读者可以从 -\href{https://github.com/CTeX-org/lshort-cn}{lshort-cn}、 -\href{https://github.com/latexstudio/LaTeXFAQ-cn}{LatexFAQ-CN}、 -\href{https://tex.stackexchange.com}{tex.stackexchange.com} -了解到更多。 - -笔者从最初开始学习latex时利用 thebibliography 环境生成参考文献,到对格式化有更多需求后开始寻求利用参考文献宏包,再到最后选择使用biblatex宏包,在不断实践过程中越发感觉到biblatex 在生成参考文献方面的巨大潜力。以笔者的观点其优点主要包括: - -%[也由于对bibtex语言不熟悉,偷懒不想学$( \hat{} \bot \hat{} )$] -\begin{enumerate} -\item 使用简单。代码结构很简单,格式控制很简单,功能设置很简单,编译方式很简单,编译命令无限制(xelatex、pdflatex等均可)。例\ref{eg:func:backref} 给出了后向超链接功能的设置。 - - \begin{example}{文献条目的后向超链接设置}{eg:func:backref} - \begin{texlist} - %加上后向超链接设置,需要4步编译。 - \usepackage[backend=biber,style=gb7714-2015,backref=true]{biblatex} - \end{texlist} - \end{example} - -%使用够方便 - -\item 划分自由。在一个文档中可以生成任意数量的文献表,无需用将分档划分成不同的文件来辅助生成分章参考文献。利用refsection 和refsegment方便划分,具有嵌套、遍历等多种灵活处理方式。 -%划分很自由,划分无限制 - -\item 定制方便。使用是tex命令(宏)控制格式,定制和修改相比 bibtex 语言更为容易。全面提供适用于自然学科、人文学科的多种不同类型的参考文献样式,参考、引用、移植、定制均很便捷。 -%定制很容易 - -%处理无限制,支持更全面 -\item 支持全面。后端处理程序biber处理大数据量毫无压力,不用担心内存不足问题,字符编码支持utf-8,完全支持中文的bibtex 键(引用关键字)。biber除了自身提供的大量功能,比如:动态数据修改、参考文献数据检查、引用文献数据的bib输出(例\ref{eg:bibercmd:outbibfile})等外,还可利用一些perl模块来实现一些特殊功能,比如: - 实现文件编码的转换(perl 的Encode::CN 模块), - 排序的本地化调整(perl的Unicode::Collation::locale 模块, - 中文字符的拼音和笔画排序见例\ref{eg:sort:opts}、例\ref{eg:sort:bibercmd})等。其中引用文献数据的bib输出常用于从一个大的bib文件中导出仅有引用文献信息的小的bib文件。 - - \begin{example}{输出引用文献数据时的biber选项}{eg:bibercmd:outbibfile} - \begin{texlist} - biber jobname --output-format=bibtex - \end{texlist} - \end{example} - -\end{enumerate} -%上述这些优点也是笔者决定编写符合GB/T 7714-2015标准的参考文献样式文件的原因之一。 +\subsection{bib文件与文献条目数据} \subsubsection{数据库bib文件和文献条目}\label{sec:bib:bibtex} @@ -2233,14 +2197,79 @@ bib文件中的参考文献信息是以条目形式组织,一篇文献创建 \item 页码:\ref{sec:fmt:pages}节 \end{itemize} -\subsubsection{其它注意事项}\label{sec:pkg:hints} + + + + + +\subsection{其它注意事项}\label{sec:pkg:hints} \begin{enumerate} + \item biblatex 的优点 + + 基于 biblatex 宏包的参考文献生成方法,具有很多明显的优点,读者可以从 + \href{https://github.com/CTeX-org/lshort-cn}{lshort-cn}、 + \href{https://github.com/latexstudio/LaTeXFAQ-cn}{LatexFAQ-CN}、 + \href{https://tex.stackexchange.com}{tex.stackexchange.com} + 了解到更多。笔者从最初开始学习latex时利用 thebibliography 环境生成参考文献,到对格式化有更多需求后开始寻求利用参考文献宏包,再到最后选择使用biblatex宏包,在不断实践过程中越发感觉到biblatex 在生成参考文献方面的巨大潜力。以笔者的观点其优点主要包括: + + %[也由于对bibtex语言不熟悉,偷懒不想学$( \hat{} \bot \hat{} )$] + \begin{itemize} + \item 使用简单。代码结构很简单,格式控制很简单,功能设置很简单,编译方式很简单,编译命令无限制(xelatex、pdflatex等均可)。例\ref{eg:func:backref} 给出了后向超链接功能的设置。 + + \begin{example}{文献条目的后向超链接设置}{eg:func:backref} + \begin{texlist} + %加上后向超链接设置,需要4步编译。 + \usepackage[backend=biber,style=gb7714-2015,backref=true]{biblatex} + \end{texlist} + \end{example} + + %使用够方便 + + \item 划分自由。在一个文档中可以生成任意数量的文献表,无需用将分档划分成不同的文件来辅助生成分章参考文献。利用refsection 和refsegment方便划分,具有嵌套、遍历等多种灵活处理方式。 + %划分很自由,划分无限制 + + \item 定制方便。使用是tex命令(宏)控制格式,定制和修改相比 bibtex 语言更为容易。全面提供适用于自然学科、人文学科的多种不同类型的参考文献样式,参考、引用、移植、定制均很便捷。 + %定制很容易 + + %处理无限制,支持更全面 + \item 支持全面。后端处理程序biber处理大数据量毫无压力,不用担心内存不足问题,字符编码支持utf-8,完全支持中文的bibtex 键(引用关键字)。biber除了自身提供的大量功能,比如:动态数据修改、参考文献数据检查、引用文献数据的bib输出(例\ref{eg:bibercmd:outbibfile})等外,还可利用一些perl模块来实现一些特殊功能,比如:实现文件编码的转换(perl 的Encode::CN 模块), + 排序的本地化调整(perl的Unicode::Collation::locale 模块, + 中文字符的拼音和笔画排序见例\ref{eg:sort:opts}、例\ref{eg:sort:bibercmd})等。 + \end{itemize} + %上述这些优点也是笔者决定编写符合GB/T 7714-2015标准的参考文献样式文件的原因之一。 + + \item biber 输出引用文献bib文件 + + 利用biber可以实现引用文献数据的bib输出,常用于从一个大的bib文件中导出仅被引用的文献信息到一个小的bib 文件,比如:要提交一个小论文附带的bib文件时。 + + \begin{example}{输出引用文献数据时的biber选项}{eg:bibercmd:outbibfile} + \begin{texlist} + biber jobname --output-format=bibtex + \end{texlist} + \end{example} + - \item 本样式包的设计与实现方法以及涉及到的一些biblatex功能介绍,以项目示例的形式总结在 - \href{https://github.com/hushidong/biblatex-solution-to-latex-bibliography}{\LaTeX 文档中文参考文献的biblatex解决方案}中,本文档不再重复给出,有需要了解的用户可以参见其中的第3.1节。 + \item biber 控制特殊符号的tex宏的转换 - \item tex源文档既可以用xelatex编译,也可以利用pdflatex或latex进行编译。但要注意的是pdflatex编译可能因为某些样式比如authoryear,使用了xstring宏包中的一些命令而导致错误,但numeric类样式通常没有问题。该问题在biblatex更新到3.12版本后取消xstring 宏包后得以解决。 + 默认情况下biber为了实现更好的排序,会将一些latex提供的特殊宏转换为utf-8编码字符。但有时我们可能并不需要做这样的转换,因为转换后符号的形式就变了。由于biber依赖一个字符映射表recode\_data.xml进行转换,因此我们可以利用它来构建一个自定义映射表,从而避免biber 对一些特殊宏的转换。具体做法如下: + \begin{itemize} + \item 找到biber的临时工作路径中的,recode\_data.xml (搜索能找到) + \item 复制一个到其它位置,并定义为,比如\verb|c:\recodeudf.xml| + \item 打开该文件,并找到textquotesingle那一项删除,将所有的set修改为special,并保存 + \item 编译的时候,xelatex正常编译,biber这一步则使用命令: + + \begin{example}{使用自定义特殊字符宏映射表的biber选项}{eg:bibercmd:charmap} + \begin{texlist} + biber jobname.bcf --recodedata=c:\recodeudf.xml --decodecharsset=special + \end{texlist} + \end{example} + \end{itemize} + + + \item 不同tex引擎下的编译 + + tex源文档既可以用xelatex编译,也可以利用pdflatex或latex进行编译。但要注意的是pdflatex编译可能因为某些样式比如authoryear,使用了xstring宏包中的一些命令而导致错误,但numeric类样式通常没有问题。该问题在biblatex更新到3.12版本后取消xstring 宏包后得以解决。 中文用户编译还需要注意编码问题。 utf-8编码的文档,采用xelatex 编译没有任何注意事项,但使用pdflatex编译时,需要给ctex 宏包加载UTF8选项,比如 \verb|\usepackage[UTF8]{ctex}| 。 @@ -2248,29 +2277,44 @@ bib文件中的参考文献信息是以条目形式组织,一篇文献创建 该选项在文档类加载时给出也可,比如 \verb|\documentclass[UTF8]{article}| , 同时\bc{文献引用时所用关键词应采用英文},比如 \verb|\cite{zhangml2008}| 而不能包含中文,比如 \verb|\cite{张敏莉2008}|。 - 当文档使用其他编码时,可以利用notepad++ 或notepad2 等编辑器将其转换为UTF-8编码。若不进行转换,使用xelatex编译通常需要指定一个文档编码,比如windows 环境下的GB2312 编码的文档需要指定\verb|\XeTeXinputencoding "GBK"|,否则会显示乱码。使用pdflatex进行编译时,如果biblatex不能正确的处理编码问题,那么需要为其明确的指定texencoding和bibencoding 选项。比如windows环境下的GB2312编码的文档,需要指定\verb|\usepackge[texencoding=GBK]{biblatex}|。 + 当文档使用其他编码时,可以利用notepad++ 或notepad2 等编辑器将其转换为UTF-8编码。若不进行转换,使用xelatex编译通常需要指定一个文档编码,比如windows 环境下的GB2312 编码的文档需要指定\verb|\XeTeXinputencoding "GBK"|,否则会显示乱码。使用pdflatex 进行编译时,如果biblatex不能正确的处理编码问题,那么需要为其明确的指定texencoding 和bibencoding 选项。比如windows环境下的GB2312编码的文档, + 需要指定\verb|\usepackge[texencoding=GBK]{biblatex}|。 %增加了对GBK支持的说明,2018-05-11 - \item 当顺序编码和著者-出版年制切换,或者biblatex版本切换,或者不同样式切换时,如果编译出错,可先清理一下辅助文件,完成后再重新编译。 + \item 容易出现的错误和解决 + \begin{itemize} + \item 当顺序编码和著者-出版年制切换,或者biblatex版本切换,或者不同样式切换时,如果编译出错,可先清理一下辅助文件,完成后再重新编译。 \item 当bibtex键中含有中文的时候,texlive2015中的biblatex3.0版的对参考文献条目的超链接会出现问题,而texlive2016中的biblatex3.4或以后的版本则没有问题。 - \item GB/T 7714-2015中的著者-出版年制要求参考文献按文种集合,且中文在前英文在后。主要通过gblanorder选项、排序模板DeclareSortingScheme\{gb7714-2015\} (biblatex3.7 以前版本) 或 DeclareSortingTemplate\{gb7714-2015\} (biblatex3.8以后版本)、以及自动判断的language 域实现。一般情况下样式能够正确区分不同语言文献,如果出现错误,用户可以手动修改bib源文件,将language 域设置为正确的语言,详见\ref{sec:usage:bbx} 节的说明。 + \item GB/T 7714-2015中的著者-出版年制要求参考文献按文种集合,且中文在前英文在后。主要通过gblanorder选项、排序模板DeclareSortingScheme\{gb7714-2015\} (biblatex3.7 以前版本) 或 DeclareSortingTemplate\{gb7714-2015\} (biblatex3.8 以后版本)、以及自动判断的language 域实现。一般情况下样式能够正确区分不同语言文献,如果出现错误,用户可以手动修改bib源文件,将language 域设置为正确的语言(比如设置成:chinese,english,russian,japanese等),详见\ref{sec:usage:bbx} 节的说明。 -%上一段2016-1114更新,下面这段是旧的说法, -%通过定义DeclareSortingScheme\{nyt\},设置方向为direction=descending,可以实现中文在前英文在后但两个文种的文献各自也是降序的。还有一种变通的方法是,在录入bib文件时,在userb域填入用于排序的信息,比如需要排前面中文文献填cn,排后面的英文文献用en。这样因为修改后的排序格式nyt会在author域前先用userb进行排序,自然会把中文文献放在前面。 + %上一段2016-1114更新,下面这段是旧的说法, + %通过定义DeclareSortingScheme\{nyt\},设置方向为direction=descending,可以实现中文在前英文在后但两个文种的文献各自也是降序的。还有一种变通的方法是,在录入bib文件时,在userb域填入用于排序的信息,比如需要排前面中文文献填cn,排后面的英文文献用en。这样因为修改后的排序格式nyt会在author域前先用userb进行排序,自然会把中文文献放在前面。 \item 对于出版地和出版者同时缺省的替换处理,GB/T 7714-2015中没有给出明确说明,但给出了一个英文文献示例(见GB/T 7714-2015 附录A.3),形式为: [S.l. : s.n.],尽管中文没有示例,这里也考虑类似的格式,比如: [出版地不详 : 出版者不详]。 %,这种形式本样式没有给出,而直接用两者分开的形式,[S.l.] : [s.n.] - %事实上这里作者认为没有必要把s.l.和s.n. 合起来,不仅与缺省两者之一的情况不统一,样式处理起来也增加不必要的麻烦。 - \item 目前符合 GB/T 7714-2005 或 GB/T 7714-2015 参考文献著录规则的biblatex 样式有多个实现,除本样式外,还有李志奇(icetea)\footnote{\url{http://bbs.ctex.org/forum.php?mod=viewthread&tid=74474}} 和沈周(szsdk)\footnote{\url{http://bbs.ctex.org/forum.php?mod=viewthread&tid=152561&extra=page\%3D1}} ,其效果是类似的。此外,Casper Ti. Vector提供的biblatex 样式caspervector 也是不错的中文参考文献样式 - \footnote{\url{https://gitlab.com/CasperVector/biblatex-caspervector}}。感谢各位作者的分享! + \item 由于biblatex宏包的组成比较复杂,所以当遇到具体问题时,查找具体命令的代码会比较麻烦。出现问题首先可以从biblatex-gb7714-2015,biblatex-solution-to-latex-bibliography里面查找说明。若没有则可以从github上的readme,wiki,issue里面查找问题,当找不到解决方案可以提issue。 + 若要自己去解决问题,则可以从如下查找顺序来研究。 + biblatex自身相关的包括各种bbx,cbx文件,重点是biblatex.sty,biblatex.def,standard.bbx,还有blx-dm.def 等一些设置文件。另外不要忘记lbx文件,这里面也有一些语言相关的命令, + 比如\verb|\bibrangedash|,\verb|\finalandcomma|等。至于其它一些tex 原始命令可以从tex、xetex的相关书籍文档查找,latex 相关代码则可以从latex2e,etoolbox等说明文档或latex.ltx,etoolbox.STY等源代码文档中查找。注意多使用meaning 命令来获取命令的定义。 - \item 由于biblatex宏包的组成比较复杂,所以查找具体命令的代码会比较麻烦。总体来说,包括各种bbx,cbx文件,重点是biblatex.sty,biblatex.def,standard.bbx,还有blx-dm.def 等一些设置文件。另外不要忘记lbx文件,这里面也有一些语言相关的命令,比如\verb|\bibrangedash|,\verb|\finalandcomma|等。至于其它一些tex 原始命令可以从tex、xetex的相关书籍文档查找,latex 相关代码则可以从latex2e,etoolbox等说明文档或latex.ltx,etoolbox.STY等源代码文档中查找。注意多使用meaning命令来获取命令的定义。 + \end{itemize} + + \item 宏包设计方法说明 + + 关于宏包的设计说明,读者可以直接查看bbx,cbx文件,其中有详细的注释说明。 + 更一般的思路性质的设计与实现方法以及涉及到的一些biblatex功能介绍,以项目示例的形式总结在 + \href{https://github.com/hushidong/biblatex-solution-to-latex-bibliography}{\LaTeX 文档中文参考文献的biblatex解决方案}中,本文档不再重复给出,有需要了解的用户参考。 + + \item 其它biblatex中文样式 + + 目前符合 GB/T 7714-2005 或 GB/T 7714-2015 参考文献著录规则的 biblatex 样式有多个实现,除本样式外,还有李志奇(icetea)\footnote{\url{http://bbs.ctex.org/forum.php?mod=viewthread&tid=74474}} 和沈周(szsdk)\footnote{\url{http://bbs.ctex.org/forum.php?mod=viewthread&tid=152561&extra=page\%3D1}} ,其效果是类似的。此外,Casper Ti. Vector提供的biblatex 样式caspervector 也是不错的中文参考文献样式 + \footnote{\url{https://gitlab.com/CasperVector/biblatex-caspervector}}。感谢各位作者的分享! % \item 本文档根据GB/T 7714-2015提供的参考文献表著录格式示例做了测试和验证,详见第\ref{sec:eg:gb77142015}节。 @@ -2290,8 +2334,6 @@ bib文件中的参考文献信息是以条目形式组织,一篇文献创建 \end{enumerate} - - \section{参考文献著录格式示例}\label{sec:eg:gb77142015} %\subsection{GB/T 7714-2015 中的著录标准和顺序编码制示例} diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/chinese-erj.bbx b/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/chinese-erj.bbx index dee66e80ae..98a744005a 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/chinese-erj.bbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/chinese-erj.bbx @@ -83,27 +83,27 @@ %================================================== %定义一些标点为中文全角标点 %================================================== -\def\erjpunctdot{。}% -\def\erjpunctmark{、}% -\def\erjpunctcomma{,}% -\def\erjpunctcommalanen{,}% -\def\erjpunctcolon{:}% -\def\erjpunctcolonlanen{:}% -\def\erjpunctsemicolon{;}% -\def\erjpunctttl{《}% -\def\erjpunctttr{》} +\def\gbpunctdot{。}% +\def\gbpunctmark{、}% +\def\gbpunctcomma{,}% +\def\gbpunctcommalanen{,}% +\def\gbpunctcolon{:}% +\def\gbpunctcolonlanen{:}% +\def\gbpunctsemicolon{;}% +\def\gbpunctttl{《}% +\def\gbpunctttr{》} \def\execerjpuncten{% -\def\erjpunctdot{\adddot}% -\def\erjpunctmark{\addcomma\addspace}% -\def\erjpunctcomma{\addcomma\addspace}% -\def\erjpunctcommalanen{\addcomma\addspace}% -\def\erjpunctcolon{\addcolon\addspace}% -\def\erjpunctcolonlanen{\addcolon\addspace}% -\def\erjpunctsemicolon{\addsemicolon\addspace}% -\def\erjpunctttl{《}% -\def\erjpunctttr{》}% +\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{》}% } %================================================== @@ -111,7 +111,7 @@ %================================================== \DefineBibliographyStrings{english}{ and = { and},%and后面的空格在finalnamedelim已经加过了,所以这里去掉20191009 - andcn = {\erjpunctmark\unspace},%\erjpunctmark + andcn = {\gbpunctmark\unspace},%\gbpunctmark andincitecn = {和},%将标注中的分开,便于与文献表中的区分 andincite = {\&}, %andotherscn={等}, @@ -124,12 +124,12 @@ %设置一些标点格式为中文的标点 %================================================== \DeclareFieldFormat{titlecase}{\iffieldequalstr{userd}{chinese}{#1}{\capitalisewords{#1}}} -\DeclareFieldFormat*{title}{\iffieldequalstr{userd}{chinese}{\erjpunctttl#1\erjpunctttr}{#1\isdot}} -\DeclareFieldFormat[article]{title}{\iffieldequalstr{userd}{chinese}{\erjpunctttl#1\erjpunctttr}{\mkbibquote{#1}\isdot}} -\DeclareFieldFormat*{journaltitle}{\iffieldequalstr{userd}{chinese}{\erjpunctttl#1\erjpunctttr}{\textit{#1}}}% -%\DeclareFieldFormat*{booktitle}{\erjpunctttl#1\erjpunctttr} -\renewcommand*{\revsdnamepunct}{\iffieldequalstr{userd}{chinese}{\erjpunctcomma}{\erjpunctcommalanen}}%%来源biblatex.def -\DeclareDelimFormat*{multinamedelim}{\iffieldequalstr{userd}{chinese}{\erjpunctmark}{\erjpunctcommalanen}}%\addcomma\addspace +\DeclareFieldFormat*{title}{\iffieldequalstr{userd}{chinese}{\gbpunctttl#1\gbpunctttr}{#1\isdot}} +\DeclareFieldFormat[article]{title}{\iffieldequalstr{userd}{chinese}{\gbpunctttl#1\gbpunctttr}{\mkbibquote{#1}\isdot}} +\DeclareFieldFormat*{journaltitle}{\iffieldequalstr{userd}{chinese}{\gbpunctttl#1\gbpunctttr}{\textit{#1}}}% +%\DeclareFieldFormat*{booktitle}{\gbpunctttl#1\gbpunctttr} +\renewcommand*{\revsdnamepunct}{\iffieldequalstr{userd}{chinese}{\gbpunctcomma}{\gbpunctcommalanen}}%%来源biblatex.def +\DeclareDelimFormat*{multinamedelim}{\iffieldequalstr{userd}{chinese}{\gbpunctmark}{\gbpunctcommalanen}}%\addcomma\addspace \DeclareDelimFormat{finalnamedelim}{% %\ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}% %\addspace% @@ -172,11 +172,11 @@ \or% \bibstring{and}\space% \fi} -\DeclareDelimFormat{nameyeardelim}{\iffieldequalstr{userd}{chinese}{\erjpunctcomma}{\erjpunctcommalanen}}%\addcomma\addspace -\DeclareDelimFormat[bib,biblist]{nameyeardelim}{\iffieldequalstr{userd}{chinese}{\erjpunctcomma}{\erjpunctcommalanen}}%\addcomma\addspace -\DeclareDelimFormat{bibpagespunct}{\iffieldequalstr{userd}{chinese}{}{\unspace\erjpunctcommalanen}}%\addcomma\addspace\mbox{} -\renewcommand*{\newunitpunct}{\iffieldequalstr{userd}{chinese}{\erjpunctcomma}{\erjpunctcommalanen}}%\addcomma\space %, -\renewcommand*{\finentrypunct}{\iffieldequalstr{userd}{chinese}{\erjpunctdot}{\adddot}} +\DeclareDelimFormat{nameyeardelim}{\iffieldequalstr{userd}{chinese}{\gbpunctcomma}{\gbpunctcommalanen}}%\addcomma\addspace +\DeclareDelimFormat[bib,biblist]{nameyeardelim}{\iffieldequalstr{userd}{chinese}{\gbpunctcomma}{\gbpunctcommalanen}}%\addcomma\addspace +\DeclareDelimFormat{bibpagespunct}{\iffieldequalstr{userd}{chinese}{}{\unspace\gbpunctcommalanen}}%\addcomma\addspace\mbox{} +\renewcommand*{\newunitpunct}{\iffieldequalstr{userd}{chinese}{\gbpunctcomma}{\gbpunctcommalanen}}%\addcomma\space %, +\renewcommand*{\finentrypunct}{\iffieldequalstr{userd}{chinese}{\gbpunctdot}{\adddot}} %================================================== @@ -246,7 +246,7 @@ test{\iffieldundef{subtitle}}% }% {}% - {\setunit{\iffieldequalstr{userd}{chinese}{\erjpunctcolon}{\erjpunctcolonlanen}}\printtext[title]{\bibtitlefont%增加字体控制命令%增加了标点: + {\setunit{\iffieldequalstr{userd}{chinese}{\gbpunctcolon}{\gbpunctcolonlanen}}\printtext[title]{\bibtitlefont%增加字体控制命令%增加了标点: \printfield[titlecase]{title}% \ifboolexpr{test {\iffieldundef{subtitle}}}%这里增加了对子标题的判断,解决不判断多一个点的问题 {}{\setunit{\subtitlepunct}% 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 496fe5d98b..cc70cc84ad 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{2022/04/16 v1.1h} +\def\versionofgbtstyle{2022/05/17 v1.1i} \def\versionofbiblatex{\abx@version} \ProvidesFile{gb7714-2015.bbx}[\versionofgbtstyle biblatex bibliography style] %\RequireBiber[3]%显式指定用biber后端,当用bibtex时会报错,但其实不会影响编译,只是采用bibtex后无法达成格式需求 @@ -2414,24 +2414,32 @@ test {\iftoggle{iftlseven}}%biblatex<=3.7 % v1.0,20160701,hzz % v1.0O,20190103,hzz,修改利用新定义的一个分隔符strandothersdelim % v1.0w,20210401,hzz,针对其它语言的译者后的标点与中文不同做处理 +% v1.1h,20220416,hzz,修正远古bug:在使用中文标点时会在译者中输出多个标点 % 原理方法:判断作者或译者是否中文,若中文用字符等,否则用et al. 。 % \printnames由start-stop控制项数,默认是1和maxnames/minnames +%说明:multinamedelim是各姓名之间的标点 +% finalnamedelim是最后一个姓名前的取代multinamedelim的标点 +% 这两个标点是由printnames固定输出的。 +% 而且name:andothers在namefmtselected中是针对每个姓名都做的处理,所以其内容的输出要根据姓名列表的计数来做判断 +% 而finalandcomma 只是习惯用于最后一个and前输出的标点,但与前两个固定输出不同 +% finalandcomma 只是在宏中判断并输出的,修改宏去掉它即可使其不输出 \newcommand{\aftertransdelim}{\addcomma\addthinspace} \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}% -}{%当是译者的时候需要特殊处理:从7.2节看等,译前面加逗号,但从示例看等和译同时出现时,译前的逗号没有,比如: -%袁训来, 陈哲, 肖书海, 等. -%胡泳, 范海燕, 译. -%潘惠霞, 魏婧, 杨艳, 等译. -\ifcurrentname{translator}{\iffieldequalstr{usere}{chinese}{\aftertransdelim}{}}{}%为了实现上述第二个示例情况做的处理 -}} +\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}{}}{}}{}%为了实现上述第二个示例情况做的处理 + }% +} @@ -2668,6 +2676,7 @@ test {\iftoggle{iftlseven}}%biblatex<=3.7 \DeclareNameAlias{default}{namefmtselected}%姓名的默认格式采用可选的模式 \DeclareNameAlias{sortname}{default}% Used in the bibliography %family-given/given-family \DeclareNameAlias{citename}{default}% Default used by \citename +\DeclareNameAlias{bytranslator}{default} \DeclareDelimFormat[bib,biblist]{andothersdelim}{\addcomma\addspace} %\DeclareDelimFormat[textcite]{andothersdelim}{\addspace}% 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 deee0fd76f..1504d40265 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{2022/04/16 v1.1h} +\def\versionofgbtstyle{2022/05/17 v1.1i} \def\versionofbiblatex{\abx@version} \ProvidesFile{gb7714-2015ay.bbx}[\versionofgbtstyle biblatex bibliography style] %\RequireBiber[3]%显式指定用biber后端,当用bibtex时会报错,但其实不会影响编译,只是采用bibtex后无法达成格式需求 @@ -2267,24 +2267,32 @@ test {\iftoggle{iftlseven}}%biblatex<=3.7 % v1.0,20160701,hzz % v1.0O,20190103,hzz,修改利用新定义的一个分隔符strandothersdelim % v1.0w,20210401,hzz,针对其它语言的译者后的标点与中文不同做处理 +% v1.1h,20220416,hzz,修正远古bug:在使用中文标点时会在译者中输出多个标点 % 原理方法:判断作者或译者是否中文,若中文用字符等,否则用et al. 。 % \printnames由start-stop控制项数,默认是1和maxnames/minnames +%说明:multinamedelim是各姓名之间的标点 +% finalnamedelim是最后一个姓名前的取代multinamedelim的标点 +% 这两个标点是由printnames固定输出的。 +% 而且name:andothers在namefmtselected中是针对每个姓名都做的处理,所以其内容的输出要根据姓名列表的计数来做判断 +% 而finalandcomma 只是习惯用于最后一个and前输出的标点,但与前两个固定输出不同 +% finalandcomma 只是在宏中判断并输出的,修改宏去掉它即可使其不输出 \newcommand{\aftertransdelim}{\addcomma\addthinspace} \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}% -}{%当是译者的时候需要特殊处理:从7.2节看等,译前面加逗号,但从示例看等和译同时出现时,译前的逗号没有,比如: -%袁训来, 陈哲, 肖书海, 等. -%胡泳, 范海燕, 译. -%潘惠霞, 魏婧, 杨艳, 等译. -\ifcurrentname{translator}{\iffieldequalstr{usere}{chinese}{\aftertransdelim}{}}{}%为了实现上述第二个示例情况做的处理 -}} +\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}{}}{}}{}%为了实现上述第二个示例情况做的处理 + }% +} % 修改省略作者后的本地化字符串,比如et al. % v1.0o,20190103,hzz 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 19a92bceed..c0d9d4b985 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 @@ -67,7 +67,7 @@ %sorting = none , maxcitenames=1, mincitenames=1, - uniquename=init,%因为使用了名字缩写选项,所以需要设置uniquename=init而不是full避免冲突 + uniquename=false,%uniquename=init uniquelist=minyear } @@ -123,6 +123,7 @@ test {\iftoggle{iftlseven}}%3.7=biblatex \iffieldequalstr{userf}{chinese}{\renewcommand*{\andothersdelim}{\addthinspace}}%\addthinspace {\renewcommand*{\andothersdelim}{\addspace}}% } +\newcommand{\compextradelim}{\addcomma\addthinspace} %标注中压缩后相同年份后附加标签a、b之间的标点 % % 修订使可用选项gblabelref来控制是否将标准标签中的作者加上超链接 @@ -138,7 +139,7 @@ test {\iftoggle{iftlseven}}%3.7=biblatex {\iffieldequals{namehash}{\cbx@lasthash} {\ifthenelse{\iffieldequals{labelyear}{\cbx@lastyear}\AND \(\value{multicitecount}=0\OR\iffieldundef{postnote}\)} - {\setunit{\addcomma\addthinspace}%同一作者的年份之间的标点,示例见thesis-nwafu-ay + {\setunit{\compextradelim}%同一作者的年份之间的标点,示例见thesis-nwafu-ay%\addcomma\addthinspace \usebibmacro{cite:extradate}} {\setunit{\compcitedelim}% \usebibmacro{cite:labeldate+extradate}% @@ -156,7 +157,7 @@ test {\iftoggle{iftlseven}}%3.7=biblatex {\iffieldundef{shorthand} {\ifthenelse{\iffieldequals{labelyear}{\cbx@lastyear}\AND \(\value{multicitecount}=0\OR\iffieldundef{postnote}\)} - {\setunit{\addcomma}% + {\setunit{\compextradelim}% \usebibmacro{cite:extradate}} {\setunit{\compcitedelim}% \usebibmacro{cite:labeldate+extradate}% @@ -241,16 +242,11 @@ test {\iftoggle{iftlseven}}%3.7=biblatex % \DeclareCiteCommand{\parencite}%[\mkbibparens] {\usebibmacro{cite:init}% - \renewbibmacro*{postnote}{% - \iffieldundef{postnote}% - {}% - {\nopunct% - \printfield{postnote}}}% \mkbibleftborder\usebibmacro{prenote}}% {\usebibmacro{citeindex}% \usebibmacro{cite}} {} - {\mkbibrightborder\mkbibsuperscript{\usebibmacro{postnote}}} + {\usebibmacro{postnote}\mkbibrightborder} % % 重定义footcite需要使用的命令 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 b5587607bd..1ae850d363 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{2022/04/16 v1.1h} +\def\versionofgbtstyle{2022/05/17 v1.1i} \def\versionofbiblatex{\abx@version} \ProvidesFile{gb7714-2015ms.bbx}[\versionofgbtstyle biblatex bibliography style] %\RequireBiber[3]%显式指定用biber后端,当用bibtex时会报错,但其实不会影响编译,只是采用bibtex后无法达成格式需求 @@ -1866,9 +1866,6 @@ %===================================================================== %设置驱动格式 %===================================================================== -%定义译者后面的标点,便于在不同环境下修改。 -\newcommand{\aftertransdelim}{\addcomma\addthinspace}% - %中文环境的局部化代码 \def\localsetchinesecode{% \ifboolexpr{% @@ -1944,23 +1941,32 @@ togl{bbx:gbstyle} or test {\iffieldequalstr{userd}{chinese}}% % v1.0,20160701,hzz % v1.0O,20190103,hzz,修改利用新定义的一个分隔符strandothersdelim % v1.0w,20210401,hzz,针对其它语言的译者后的标点与中文不同做处理 +% v1.1h,20220416,hzz,修正远古bug:在使用中文标点时会在译者中输出多个标点 % 原理方法:判断作者或译者是否中文,若中文用字符等,否则用et al. 。 % \printnames由start-stop控制项数,默认是1和maxnames/minnames +%说明:multinamedelim是各姓名之间的标点 +% finalnamedelim是最后一个姓名前的取代multinamedelim的标点 +% 这两个标点是由printnames固定输出的。 +% 而且name:andothers在namefmtselected中是针对每个姓名都做的处理,所以其内容的输出要根据姓名列表的计数来做判断 +% 而finalandcomma 只是习惯用于最后一个and前输出的标点,但与前两个固定输出不同 +% finalandcomma 只是在宏中判断并输出的,修改宏去掉它即可使其不输出 +\newcommand{\aftertransdelim}{\addcomma\addthinspace}%%定义译者后面的标点,便于在不同环境下修改。 \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}% -}{%当是译者的时候需要特殊处理:从7.2节看等,译前面加逗号,但从示例看等和译同时出现时,译前的逗号没有,比如: -%袁训来, 陈哲, 肖书海, 等. -%胡泳, 范海燕, 译. -%潘惠霞, 魏婧, 杨艳, 等译. -\ifcurrentname{translator}{\iffieldequalstr{usere}{chinese}{\aftertransdelim}{}}{}%为了实现上述第二个示例情况做的处理 -}}% +\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}{}}{}}{}%为了实现上述第二个示例情况做的处理 + }% +}% % % 修改省略作者后的本地化字符串,比如et al. % v1.0o,20190103,hzz 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 4879b4221d..62bdf65054 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{2022/04/16 v1.1h} +\def\versionofgbtstyle{2022/05/17 v1.1i} \def\versionofbiblatex{\abx@version} \ProvidesFile{gb7714-2015mx.bbx}[\versionofgbtstyle biblatex bibliography style] %\RequireBiber[3]%显式指定用biber后端,当用bibtex时会报错,但其实不会影响编译,只是采用bibtex后无法达成格式需求 @@ -1878,24 +1878,32 @@ % v1.0,20160701,hzz % v1.0O,20190103,hzz,修改利用新定义的一个分隔符strandothersdelim % v1.0w,20210401,hzz,针对其它语言的译者后的标点与中文不同做处理 +% v1.1h,20220416,hzz,修正远古bug:在使用中文标点时会在译者中输出多个标点 % 原理方法:判断作者或译者是否中文,若中文用字符等,否则用et al. 。 % \printnames由start-stop控制项数,默认是1和maxnames/minnames +%说明:multinamedelim是各姓名之间的标点 +% finalnamedelim是最后一个姓名前的取代multinamedelim的标点 +% 这两个标点是由printnames固定输出的。 +% 而且name:andothers在namefmtselected中是针对每个姓名都做的处理,所以其内容的输出要根据姓名列表的计数来做判断 +% 而finalandcomma 只是习惯用于最后一个and前输出的标点,但与前两个固定输出不同 +% finalandcomma 只是在宏中判断并输出的,修改宏去掉它即可使其不输出 \newcommand{\aftertransdelim}{\addcomma\addthinspace} \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}% -}{%当是译者的时候需要特殊处理:从7.2节看等,译前面加逗号,但从示例看等和译同时出现时,译前的逗号没有,比如: -%袁训来, 陈哲, 肖书海, 等. -%胡泳, 范海燕, 译. -%潘惠霞, 魏婧, 杨艳, 等译. -\ifcurrentname{translator}{\iffieldequalstr{usere}{chinese}{\aftertransdelim}{}}{}%为了实现上述第二个示例情况做的处理 -}} +\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}{}}{}}{}%为了实现上述第二个示例情况做的处理 + }% +} @@ -3554,7 +3562,6 @@ test{\iffieldundef{day}} and test{\iffieldundef{endday}} and test{\iffieldundef{ }{} - } diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-CCNU.bbx b/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-CCNU.bbx index 50840d2dd4..0515a3b152 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-CCNU.bbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-CCNU.bbx @@ -43,33 +43,55 @@ \setlength{\bibhang}{1.2ex} \setlength{\bibparsep}{0em} +%这里把\bibhang放外面设置的方式也有其优势 +%这里使用\bibhang+\labelnumberwidth来控制文献内容左边界与页边的间距 +%然后用\biblabelsep来设置标签域文献内容左边界的间距 +%gb7714-2015中则直接用\bibhang=\biblabelsep+\labelnumberwidth来控制文献内容左边界与页边的间距 +%这其实是两种控制方式,CCNU这里用下面重定义的方式 +\defbibenvironment{bibliography} + {\list + {\printtext[labelnumberwidth]{% + \printfield{labelprefix}% + \printfield{labelnumber}}} + {\addtolength{\labelnumberwidth}{\biblabelextend}% + \setlength{\labelwidth}{\labelnumberwidth}% + \setlength{\labelsep}{\biblabelsep}% + \setlength{\leftmargin}{\bibhang}% + \addtolength{\leftmargin}{\labelnumberwidth}% + \setlength{\itemindent}{\bibitemindent}% + \setlength{\itemsep}{\bibitemsep}% + \setlength{\parsep}{\bibparsep}}% + \renewcommand*{\makelabel}[1]{\hss##1}} + {\endlist} + {\item} + %================================================== % 定义一些标点为中文全角标点 %================================================== -\def\erjpunctdot{.}% -\def\erjpunctdotlanen{\adddot\addspace}% -\def\erjpunctmark{、}% -\def\erjpunctcomma{,}% -\def\erjpunctcommalanen{\addcomma\addspace}% -\def\erjpunctcolon{:}% -\def\erjpunctcolonlanen{\addcolon\addspace}% -\def\erjpunctsemicolon{;}% -\def\erjpunctsemicolonlanen{\addsemicolon\addspace}% -\def\erjpunctparenl{(}% -\def\erjpunctparenr{)}% +\def\gbpunctdot{.}% +\def\gbpunctdotlanen{\adddot\addspace}% +\def\gbpunctmark{、}% +\def\gbpunctcomma{,}% +\def\gbpunctcommalanen{\addcomma\addspace}% +\def\gbpunctcolon{:}% +\def\gbpunctcolonlanen{\addcolon\addspace}% +\def\gbpunctsemicolon{;}% +\def\gbpunctsemicolonlanen{\addsemicolon\addspace}% +\def\gbpunctparenl{(}% +\def\gbpunctparenr{)}% \def\execpuncten{% -\def\erjpunctdot{\adddot\addspace}% -\def\erjpunctdotlanen{\adddot\addspace}% -\def\erjpunctmark{\addcomma\addspace}% -\def\erjpunctcomma{\addcomma\addspace}% -\def\erjpunctcommalanen{\addcomma\addspace}% -\def\erjpunctcolon{\addcolon\addspace}% -\def\erjpunctcolonlanen{\addcolon\addspace}% -\def\erjpunctsemicolon{\addcolon\addspace}% -\def\erjpunctsemicolonlanen{\addsemicolon\addspace}% -\def\erjpunctparenl{(}% -\def\erjpunctparenr{)}% +\def\gbpunctdot{\adddot\addspace}% +\def\gbpunctdotlanen{\adddot\addspace}% +\def\gbpunctmark{\addcomma\addspace}% +\def\gbpunctcomma{\addcomma\addspace}% +\def\gbpunctcommalanen{\addcomma\addspace}% +\def\gbpunctcolon{\addcolon\addspace}% +\def\gbpunctcolonlanen{\addcolon\addspace}% +\def\gbpunctsemicolon{\addcolon\addspace}% +\def\gbpunctsemicolonlanen{\addsemicolon\addspace}% +\def\gbpunctparenl{(}% +\def\gbpunctparenr{)}% } @@ -78,17 +100,18 @@ %为标注和文献表中标点格式,重设and本地化字符串 %================================================== \DefineBibliographyStrings{english}{ - and = {\addcomma}, - andcn = {\erjpunctcomma}, + and = {\addcomma\space}, + andcn = {\gbpunctcomma}, andincitecn = {和}, %将标注中的分开,便于与文献表中的区分 andincite = {\&}, andothers = {et al.}, andotherscn = {等}, bytranslator = {\addcomma\ 译}, + bytranslatorcn = {译}, editors = {\MakeLowercase{eds}\adddot\isdot}, editor = {\MakeLowercase{ed}\adddot\isdot}, in = {In:\addspace}, - incn = {见\iffieldequalstr{userd}{chinese}{\erjpunctcolon}{\erjpunctcolonlanen}}, + incn = {见\iffieldequalstr{userd}{chinese}{\gbpunctcolon}{\gbpunctcolonlanen}}, mathesis = {(Master dissertation)}, mathesiscn = {[硕士学位论文]}, phdthesis = {(Ph D dissertation)}, @@ -104,10 +127,11 @@ \def\gbcaselocalset{% \renewrobustcmd*{\bibinitperiod}{}% \renewcommand*{\revsdnamepunct}{}% -\renewrobustcmd*{\bibinitdelim}{}% +%\renewrobustcmd*{\bibinitdelim}{}% } -\renewcommand{\aftertransdelim}{\iffieldequalstr{userd}{chinese}{\erjpunctcomma}{\erjpunctcommalanen}} -\DeclareDelimFormat*{multinamedelim}{\iffieldequalstr{userd}{chinese}{\erjpunctcomma}{\erjpunctcommalanen}}%\addcomma\addspace + +\renewcommand{\aftertransdelim}{\iffieldequalstr{userd}{chinese}{\gbpunctcomma}{\gbpunctcommalanen}} +\DeclareDelimFormat{multinamedelim}{\iffieldequalstr{userd}{chinese}{\gbpunctcomma}{\gbpunctcommalanen}}%\addcomma\addspace \DeclareDelimFormat{finalnamedelim}{% \edef\userfieldabcde{userd}% \ifcurrentname{translator}{\edef\userfieldabcde{usere}}{}% @@ -143,13 +167,19 @@ \bibstring{andcn}% \or% \bibstring{and}% - \fi} -\DeclareDelimFormat{nameyeardelim}{\iffieldequalstr{userd}{chinese}{\erjpunctcomma}{\erjpunctcommalanen}}%\addcomma\addspace -\DeclareDelimFormat[bib,biblist]{nameyeardelim}{\iffieldequalstr{userd}{chinese}{\erjpunctcomma}{\erjpunctcommalanen}}%\addcomma\addspace -\DeclareDelimFormat{bibpagespunct}{\iffieldequalstr{userd}{chinese}{\erjpunctcolon}{\erjpunctcolonlanen}}%\addcomma\addspace\mbox{} -\renewcommand*{\newunitpunct}{\iffieldequalstr{userd}{chinese}{\erjpunctdot}{\erjpunctdotlanen}}%\addcomma\space %, -\renewcommand*{\finentrypunct}{\iffieldequalstr{userd}{chinese}{\erjpunctdot}{\adddot}} -\renewcommand{\publocpunct}{\iffieldequalstr{userd}{chinese}{\erjpunctcolon}{\addcolon\addspace}}%出版项中:出版社地址后面的标点 + \fi% + } +\DeclareDelimFormat[bib,biblist]{andothersdelim}{% +\ifcurrentname{translator}{\iffieldequalstr{usere}{chinese}{\gbpunctcomma}{\gbpunctcommalanen}}{}% +\ifcurrentname{author}{\iffieldequalstr{userf}{chinese}{\gbpunctcomma}{\gbpunctcommalanen}}{}% +\ifcurrentname{editor}{\iffieldequalstr{userc}{chinese}{\gbpunctcomma}{\gbpunctcommalanen}}{}% +} +\DeclareDelimFormat{nameyeardelim}{\iffieldequalstr{userd}{chinese}{\gbpunctcomma}{\gbpunctcommalanen}}%\addcomma\addspace +\DeclareDelimFormat[bib,biblist]{nameyeardelim}{\iffieldequalstr{userd}{chinese}{\gbpunctcomma}{\gbpunctcommalanen}}%\addcomma\addspace +\DeclareDelimFormat{bibpagespunct}{\iffieldequalstr{userd}{chinese}{\gbpunctcolon}{\gbpunctcolonlanen}}%\addcomma\addspace\mbox{} +\renewcommand*{\newunitpunct}{\iffieldequalstr{userd}{chinese}{\gbpunctdot}{\gbpunctdotlanen}}%\addcomma\space %, +\renewcommand*{\finentrypunct}{\iffieldequalstr{userd}{chinese}{\gbpunctdot}{\adddot}} +\renewcommand{\publocpunct}{\iffieldequalstr{userd}{chinese}{\gbpunctcolon}{\addcolon\addspace}}%出版项中:出版社地址后面的标点 %================================================== @@ -162,7 +192,7 @@ % v1.0k,20180425,增加了字体控制命令,hzz \renewbibmacro*{journal+issuetitle}{\bibpubfont%源来自standard.bbx \usebibmacro{journal}% - \setunit*{\iffieldequalstr{userd}{chinese}{\erjpunctcomma}{\erjpunctcommalanen}}%修改为增加一个逗号 + \setunit*{\iffieldequalstr{userd}{chinese}{\gbpunctcomma}{\gbpunctcommalanen}}%修改为增加一个逗号 \iffieldundef{series} {} {\newunit @@ -170,7 +200,7 @@ \setunit{\addspace}}% \usebibmacro{issue+date}% %\setunit{\addcolon\space}% - \iffieldundef{volume}{}{\iffieldequalstr{userd}{chinese}{\erjpunctcomma}{\erjpunctcommalanen}}% + \iffieldundef{volume}{}{\iffieldequalstr{userd}{chinese}{\gbpunctcomma}{\gbpunctcommalanen}}% %换成逗号和空格 \usebibmacro{issue}% \usebibmacro{volume+number+eid}%把卷期放到年份后面 @@ -193,7 +223,7 @@ %\printfield{number}% \iffieldundef{number}{}{% \iffieldequalstr{entrysubtype}{news}{\printtext{\mkbibparens{\printfield{number}}}}{% - \iffieldequalstr{userd}{chinese}{\printtext{\erjpunctparenl\printfield{number}\erjpunctparenr}}% + \iffieldequalstr{userd}{chinese}{\printtext{\gbpunctparenl\printfield{number}\gbpunctparenr}}% {\printtext{\mkbibparens{\printfield{number}}}}}% }%增加一个圆括号 \iffieldundef{eid}{}{% @@ -220,7 +250,7 @@ test {\iflistundef{location}} and test {\iflistundef{institution}}% \iflistundef{institution}{% \iftoggle{ifCJKforgbt}{\printtext{[\str@nopublisher]}}{\printtext{\mkbibbrackets{s.n.}}}}% {\printlist{institution}}}% -\setunit{\iffieldequalstr{userd}{chinese}{\erjpunctcomma}{\erjpunctcommalanen}}% +\setunit{\iffieldequalstr{userd}{chinese}{\gbpunctcomma}{\gbpunctcommalanen}}% %\usebibmacro{date}% \printfield{year}% \bibrangedash% @@ -231,7 +261,7 @@ test {\iflistundef{location}} and test {\iflistundef{institution}}% {\setunit*{\addcomma\space}} {\setunit*{\publocpunct}}% \printlist{institution}% - \setunit*{\iffieldequalstr{userd}{chinese}{\erjpunctcomma}{\erjpunctcommalanen}}% + \setunit*{\iffieldequalstr{userd}{chinese}{\gbpunctcomma}{\gbpunctcommalanen}}% \usebibmacro{date}% \newunit}% } @@ -257,7 +287,7 @@ test {\iflistundef{location}} and test {\iflistundef{institution}}% {\iftoggle{ifCJKforgbt}{\printtext{[\str@nopublisher]}\setunit{\adddot\addspace}\setunit*{\addcomma\addspace}}% {\printtext{\mkbibbrackets{s.n.}}\setunit{\adddot\addspace}\setunit*{\addcomma\addspace}}}}% {\printlist{publisher}}}% -\setunit*{\iffieldequalstr{userd}{chinese}{\erjpunctcomma}{\erjpunctcommalanen}}%\addcomma\addspace% +\setunit*{\iffieldequalstr{userd}{chinese}{\gbpunctcomma}{\gbpunctcommalanen}}%\addcomma\addspace% \ifentrytype{report}{\printtext{\blx@gbdate{}{}}}% {\usebibmacro{date}}% }% @@ -266,7 +296,7 @@ test {\iflistundef{location}} and test {\iflistundef{institution}}% {\setunit*{\addcomma\space}} {\setunit*{\publocpunct}}% \printlist{publisher}% - \setunit*{\iffieldequalstr{userd}{chinese}{\erjpunctcomma}{\erjpunctcommalanen}}% + \setunit*{\iffieldequalstr{userd}{chinese}{\gbpunctcomma}{\gbpunctcommalanen}}% \ifentrytype{report}{\printtext{\blx@gbdate{}{}}}% {\usebibmacro{date}}% }% @@ -283,7 +313,7 @@ test {\iflistundef{location}} and test {\iflistundef{institution}}% {\setunit*{\addcomma\space}} {\setunit*{\publocpunct}}% \printlist{institution}% - \setunit*{\iffieldequalstr{userd}{chinese}{\erjpunctcomma}{\erjpunctcommalanen}}% + \setunit*{\iffieldequalstr{userd}{chinese}{\gbpunctcomma}{\gbpunctcommalanen}}% \usebibmacro{date}% %\newunit }} @@ -301,8 +331,8 @@ test {\iflistundef{location}} and test {\iflistundef{institution}}% } {\printnames{editor}% \iffieldundef{editortype}%增加一个类型判断,用于存在editortype的情况 - {\setunit{\iffieldequalstr{userd}{chinese}{\erjpunctdot}{\erjpunctdotlanen}}}%当没有editortype时,直接用句点 - {\usebibmacro{editorstrg}\setunit{\iffieldequalstr{userd}{chinese}{\erjpunctcomma}{\erjpunctcommalanen}}}% + {\setunit{\iffieldequalstr{userd}{chinese}{\gbpunctdot}{\gbpunctdotlanen}}}%当没有editortype时,直接用句点 + {\usebibmacro{editorstrg}\setunit{\iffieldequalstr{userd}{chinese}{\gbpunctcomma}{\gbpunctcommalanen}}}% }% {}} @@ -335,7 +365,7 @@ test {\iflistundef{location}} and test {\iflistundef{institution}}% % 原理方法:使用bibmacro{in:}改变了以前在driver中直接输出//的方式,同时也简化了标点控制。 \renewbibmacro*{in:}{% \iftoggle{bbx:gbpunctin}{\printtext{\allowbreak\texttt{//}\allowbreak}}%\addthinspace - {\setunit{\iffieldequalstr{userd}{chinese}{\erjpunctdot}{\erjpunctdotlanen}}% + {\setunit{\iffieldequalstr{userd}{chinese}{\gbpunctdot}{\gbpunctdotlanen}}% \iffieldequalstr{userd}{chinese}% {\printtext{\bibstring{incn}}}% {\printtext{\bibstring{in}}}% diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-NWAFU.bbx b/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-NWAFU.bbx index 124751c3d6..6d49208e42 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-NWAFU.bbx +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/gb7714-NWAFU.bbx @@ -40,7 +40,8 @@ %一些字体设置 %================================================== %\def\bibrangedash{$\sim$}% 表示范围的波浪线符号 -\DefineBibliographyExtras{english}{\renewcommand*{\bibrangedash}{$\sim$}} +\DefineBibliographyExtras{english}{\renewcommand*{\bibrangedash}{\iffieldequalstr{userd}{chinese}% +{$\sim$}{\textendash\penalty\hyphenpenalty}}} %\newcommand\nwafubibfont{\linespread{1.0}\zihao{-5}}% 字体 \newcommand\nwafubibfont{\zihao{5}}% 字体 \renewcommand{\bibfont}{\nwafubibfont}% 全局字体设置 diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/makeall.py b/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/makeall.py index 69cebb8500..99ace83941 100644 --- a/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/makeall.py +++ b/macros/latex/contrib/biblatex-contrib/biblatex-gb7714-2015/makeall.py @@ -3,9 +3,9 @@ import os import shutil -import subprocess import pathlib import re +import subprocess def compileall(): @@ -84,6 +84,7 @@ def compileall(): fileuniset=["test*.tex","cls*.tex","opt*.tex","eg*.tex","tgb*.tex","thesis*.tex","gbt*.tex"] else: fileuniset=["test*.tex","cls*.tex","opt*.tex","code*.tex","eg*.tex","tgb*.tex","thesis*.tex","gbt*.tex"] + for fileuni in fileuniset: pf1=pathlib.Path('.').glob(fileuni) pf=[str(x) for x in pf1] @@ -106,7 +107,10 @@ def compileall(): if dirname !="tool": subprocess.run([latexcmd,"-no-pdf",file]) subprocess.run(["biber",jobname]) - subprocess.run([latexcmd,file]) + subprocess.run([latexcmd,file]) + else: + subprocess.run([latexcmd,file]) # 插入pdf的pdfpages宏包要使用目录,需要两次编译 + subprocess.run([latexcmd,file]) #根据biber的版本区别编译文档 if dirname=="egfigure": diff --git a/macros/latex/contrib/hyperref/ChangeLog.txt b/macros/latex/contrib/hyperref/ChangeLog.txt index 1b8a54e014..3c35ea9b4e 100644 --- a/macros/latex/contrib/hyperref/ChangeLog.txt +++ b/macros/latex/contrib/hyperref/ChangeLog.txt @@ -1,3 +1,7 @@ +2022-05-17 Ulrike Fischer/David Carlisle + * fixed: beamer patch in nameref has to be delayed after + the class has been loaded. issue #236. + 2022-05-16 Ulrike Fischer/David Carlisle * fixed: check if \nameref is already defined for compability with ltugboat.cls (issue #234) diff --git a/macros/latex/contrib/hyperref/README.md b/macros/latex/contrib/hyperref/README.md index 85408c55d8..2c43fe4c6f 100644 --- a/macros/latex/contrib/hyperref/README.md +++ b/macros/latex/contrib/hyperref/README.md @@ -1,6 +1,6 @@ # README for hyperref bundle -Version 2022-05-16 v7.00p +Version 2022-05-17 v7.00q ## INTRODUCTION diff --git a/macros/latex/contrib/hyperref/doc/backref.pdf b/macros/latex/contrib/hyperref/doc/backref.pdf Binary files differindex 04e14e39a2..d7c6a20b97 100644 --- a/macros/latex/contrib/hyperref/doc/backref.pdf +++ b/macros/latex/contrib/hyperref/doc/backref.pdf diff --git a/macros/latex/contrib/hyperref/doc/hyperref-doc.html b/macros/latex/contrib/hyperref/doc/hyperref-doc.html index 9282fa00ef..7a97b5fee0 100644 --- a/macros/latex/contrib/hyperref/doc/hyperref-doc.html +++ b/macros/latex/contrib/hyperref/doc/hyperref-doc.html @@ -25,7 +25,7 @@ href="https://github.com/latex3/hyperref/issues" class="url" ><span class="ec-lmvtt-10x-x-120">https://github.com/latex3/hyperref/issues</span></a><span class="ec-lmr-12">)</span></div><br /> <div class="date" ><span -class="ec-lmr-12">2022-05-16 v7.00p</span></div> +class="ec-lmr-12">2022-05-17 v7.00q</span></div> </div> <h3 class="likesectionHead"><a id="x1-1000"></a>Contents</h3> diff --git a/macros/latex/contrib/hyperref/doc/hyperref-doc.pdf b/macros/latex/contrib/hyperref/doc/hyperref-doc.pdf Binary files differindex 3807b5d399..86b1c2e818 100644 --- a/macros/latex/contrib/hyperref/doc/hyperref-doc.pdf +++ b/macros/latex/contrib/hyperref/doc/hyperref-doc.pdf diff --git a/macros/latex/contrib/hyperref/doc/hyperref-doc.tex b/macros/latex/contrib/hyperref/doc/hyperref-doc.tex index a666509181..dc817f4364 100644 --- a/macros/latex/contrib/hyperref/doc/hyperref-doc.tex +++ b/macros/latex/contrib/hyperref/doc/hyperref-doc.tex @@ -166,7 +166,7 @@ } \makeatother \title{Hypertext marks in \hologo{LaTeX}: a manual for \xpackage{hyperref}} -\date{2022-05-16 v7.00p} +\date{2022-05-17 v7.00q} \begin{document} diff --git a/macros/latex/contrib/hyperref/doc/hyperref-linktarget.pdf b/macros/latex/contrib/hyperref/doc/hyperref-linktarget.pdf Binary files differindex 78d39b6419..921bcf314a 100644 --- a/macros/latex/contrib/hyperref/doc/hyperref-linktarget.pdf +++ b/macros/latex/contrib/hyperref/doc/hyperref-linktarget.pdf diff --git a/macros/latex/contrib/hyperref/doc/hyperref.pdf b/macros/latex/contrib/hyperref/doc/hyperref.pdf Binary files differindex f293e1c18d..d26b74aa6b 100644 --- a/macros/latex/contrib/hyperref/doc/hyperref.pdf +++ b/macros/latex/contrib/hyperref/doc/hyperref.pdf diff --git a/macros/latex/contrib/hyperref/doc/nameref.pdf b/macros/latex/contrib/hyperref/doc/nameref.pdf Binary files differindex 46980eb100..f1a3d20b30 100644 --- a/macros/latex/contrib/hyperref/doc/nameref.pdf +++ b/macros/latex/contrib/hyperref/doc/nameref.pdf diff --git a/macros/latex/contrib/hyperref/hluatex.dtx b/macros/latex/contrib/hyperref/hluatex.dtx index 2dc487fcbe..c9e41e382a 100644 --- a/macros/latex/contrib/hyperref/hluatex.dtx +++ b/macros/latex/contrib/hyperref/hluatex.dtx @@ -1,6 +1,6 @@ % \iffalse % Source File: hluatex.dtx -% 2022-05-16 v7.00p +% 2022-05-17 v7.00q % % Copyright % 2016-2019 Oberdiek Package Support Group @@ -31,7 +31,7 @@ % % \begin{macrocode} %<*luatex> -%% 2022-05-16 v7.00p +%% 2022-05-17 v7.00q %% force unicode encoding, see issue #101 %% code mostly copied from hxetex.def \HyPsd@LoadUnicode diff --git a/macros/latex/contrib/hyperref/hyperref.dtx b/macros/latex/contrib/hyperref/hyperref.dtx index ba503fa255..edf82e4a16 100644 --- a/macros/latex/contrib/hyperref/hyperref.dtx +++ b/macros/latex/contrib/hyperref/hyperref.dtx @@ -52,7 +52,7 @@ %<puvnenc>\ProvidesFile{puvnenc.def} %<puarenc>\ProvidesFile{puarenc.def} %<psdextra>\ProvidesFile{psdextra.def} -%<!none&!packageEnd> [2022-05-16 v7.00p % +%<!none&!packageEnd> [2022-05-17 v7.00q % %<package> Hypertext links for LaTeX] %<nohyperref> Dummy hyperref (SR)] %<driver> Hyperref documentation driver file] diff --git a/macros/latex/contrib/hyperref/nameref.dtx b/macros/latex/contrib/hyperref/nameref.dtx index d49735cb42..0c2c3b9606 100644 --- a/macros/latex/contrib/hyperref/nameref.dtx +++ b/macros/latex/contrib/hyperref/nameref.dtx @@ -33,7 +33,7 @@ %<driver>\ProvidesFile{nameref.drv} % \fi % \ProvidesFile{nameref.dtx} - [2022-05-16 v2.49 Cross-referencing by name of section]% + [2022-05-17 v2.50 Cross-referencing by name of section]% % % % \iffalse @@ -566,43 +566,49 @@ % % \begin{macrocode} \@ifclassloaded{beamer}{% - \@ifundefined{NR@nopatch@beamer} + \@ifclasslater{beamer}{2022-05-17} + {}%do nothing {% - \def\NR@PatchBeamer#1{% - \expandafter\let\csname NRorg@beamer@#1\expandafter\endcsname - \csname beamer@#1\endcsname - \begingroup - \edef\x{\endgroup - \long\def\expandafter\noexpand\csname beamer@#1\endcsname - [####1]{% hash-ok - \noexpand\NR@gettitle{####1}% - \expandafter\noexpand\csname NRorg@beamer@#1\endcsname - [{####1}]% + \@ifundefined{NR@nopatch@beamer} + {% + \def\NR@PatchBeamer#1{% + \expandafter\let\csname NRorg@beamer@#1\expandafter\endcsname + \csname beamer@#1\endcsname + \begingroup + \edef\x{\endgroup + \long\def\expandafter\noexpand\csname beamer@#1\endcsname + [####1]{% hash-ok + \noexpand\NR@gettitle{####1}% + \expandafter\noexpand\csname NRorg@beamer@#1\endcsname + [{####1}]% + }% }% - }% - \x - }% - \NR@PatchBeamer{section}% - \NR@PatchBeamer{subsection}% - \NR@PatchBeamer{subsubsection}% + \x + }% + \AddToHook{class/beamer/after}{% + \NR@PatchBeamer{section}% + \NR@PatchBeamer{subsection}% + \NR@PatchBeamer{subsubsection}% % \end{macrocode} % % Theorem names. % \begin{macrocode} - \addtobeamertemplate{theorem begin}{% - \expandafter\NR@gettitle\expandafter{\inserttheoremaddition}% - }{}% + \addtobeamertemplate{theorem begin}{% + \expandafter\NR@gettitle\expandafter{\inserttheoremaddition}% + }{}% % \end{macrocode} % \begin{macrocode} - \@ifdefinable{\NRorg@beamer@descriptionitem}{% - \let\NRorg@beamer@descriptionitem\beamer@descriptionitem - \renewcommand{\beamer@descriptionitem}[1]{% - \NR@gettitle{#1}% - \NRorg@beamer@descriptionitem{#1}% + \@ifdefinable{\NRorg@beamer@descriptionitem}{% + \let\NRorg@beamer@descriptionitem\beamer@descriptionitem + \renewcommand{\beamer@descriptionitem}[1]{% + \NR@gettitle{#1}% + \NRorg@beamer@descriptionitem{#1}% + }% }% - }% - }{}% -}{} + }%Hook + }{}%@ifundefined + }%class later + }{} % \end{macrocode} % % \subsubsection{Theorems} diff --git a/macros/latex/contrib/hyperref/xr-hyper.sty b/macros/latex/contrib/hyperref/xr-hyper.sty index 1a37c21164..2df0588ce1 100644 --- a/macros/latex/contrib/hyperref/xr-hyper.sty +++ b/macros/latex/contrib/hyperref/xr-hyper.sty @@ -61,7 +61,7 @@ %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{xr-hyper} - [2022-05-16 v7.00p eXternal References (DPC)] + [2022-05-17 v7.00q eXternal References (DPC)] \def\externaldocument{\@testopt\XR@cite{}} \let\externalcitedocument\externaldocument diff --git a/macros/latex/contrib/thuthesis/CHANGELOG.md b/macros/latex/contrib/thuthesis/CHANGELOG.md index 086fa411a5..e7883b5e17 100644 --- a/macros/latex/contrib/thuthesis/CHANGELOG.md +++ b/macros/latex/contrib/thuthesis/CHANGELOG.md @@ -6,6 +6,24 @@ ## [Unreleased] +## [v7.3.0] - 2022-05-17 + +### Added + +- 新增 LuaTeX 支持(试验性)([#771](https://github.com/tuna/thuthesis/issues/771))。 + +### Changed + +- 研究生英文版目录中的标签分隔符由 `\quad` 改为空格([#759](https://github.com/tuna/thuthesis/discussions/759))。 +- 研究生英文版章节标题的标签分隔符由 `\quad` 改为空格([#759](https://github.com/tuna/thuthesis/discussions/759))。 +- 研究生英文封面的“Submitted”改为小写,同步《指南》2022 年 5 月版的修改。 +- 更改示例文档中 `longtable` 的“续表”标题格式,同步《指南》2021 年 6 月版的修改([#766](https://github.com/tuna/thuthesis/issues/766))。 + +### Fixed + +- 修正英文版研究成果的格式([#755](https://github.com/tuna/thuthesis/issues/755))。 +- 修复脚注内容可能跨页的问题([#778](https://github.com/tuna/thuthesis/issues/778))。 + ## [v7.2.4] - 2022-03-19 ### Added @@ -884,7 +902,8 @@ -[Unreleased]: https://github.com/tuna/thuthesis/compare/v7.2.4...HEAD +[Unreleased]: https://github.com/tuna/thuthesis/compare/v7.3.0...HEAD +[v7.3.0]: https://github.com/tuna/thuthesis/compare/v7.2.4...v7.3.0 [v7.2.4]: https://github.com/tuna/thuthesis/compare/v7.2.3...v7.2.4 [v7.2.3]: https://github.com/tuna/thuthesis/compare/v7.2.2...v7.2.3 [v7.2.2]: https://github.com/tuna/thuthesis/compare/v7.2.1...v7.2.2 diff --git a/macros/latex/contrib/thuthesis/README.md b/macros/latex/contrib/thuthesis/README.md index c84c7f409f..024a28e77a 100644 --- a/macros/latex/contrib/thuthesis/README.md +++ b/macros/latex/contrib/thuthesis/README.md @@ -15,6 +15,8 @@ Scroll down for the English version of README. **由于模板升级频繁,在开始使用和提问前,请确保您已经认真完整地阅读了使用说明文档和示例代码。** +任何违反 [LaTeX项目公共许可证 v1.3c](https://www.latex-project.org/lppl/lppl-1-3c/) 使用 ThuThesis 的行为将被记录在 [耻辱柱](https://github.com/tuna/thuthesis/issues/754) 页面中,以示警告。 + ## 下载 推荐下载**发布版**模板,里面包括具体使用说明以及示例文档: @@ -90,6 +92,8 @@ This package establishes a simple and easy-to-use LaTeX template for Tsinghua di **This template is subject to frequent changes. Please make sure you have read the usage documentation and example code completely and carefully before using and asking questions.** +Any use of ThuThesis in violation of [The LaTeX project public license v1.3c](https://www.latex-project.org/lppl/lppl-1-3c/) will be recorded in the [Hall of Shame](https://github.com/tuna/thuthesis/issues/754). + ## Downloads **Published versions** are recommended. Specific usage documentation and examples can be found in the archive. At present, these documents are <b>only available in Chinese</b>: diff --git a/macros/latex/contrib/thuthesis/data/chap02.tex b/macros/latex/contrib/thuthesis/data/chap02.tex index 65630cb5d4..57ec26cf09 100644 --- a/macros/latex/contrib/thuthesis/data/chap02.tex +++ b/macros/latex/contrib/thuthesis/data/chap02.tex @@ -85,12 +85,13 @@ 编号后跟表题(可省略)和“(续)”,置于表上方。续表均应重复表头。 \begin{longtable}{cccc} - \caption{跨页长表格的表题} \\ + \caption{跨页长表格的表题} + \label{tab:longtable} \\ \toprule 表头 1 & 表头 2 & 表头 3 & 表头 4 \\ \midrule \endfirsthead - \caption[]{跨页长表格的表题(续)} \\ + \caption*{续表~\thetable\quad 跨页长表格的表题} \\ \toprule 表头 1 & 表头 2 & 表头 3 & 表头 4 \\ \midrule diff --git a/macros/latex/contrib/thuthesis/data/chap03.tex b/macros/latex/contrib/thuthesis/data/chap03.tex index 2efdc1db96..8cd4344fbb 100644 --- a/macros/latex/contrib/thuthesis/data/chap03.tex +++ b/macros/latex/contrib/thuthesis/data/chap03.tex @@ -17,11 +17,6 @@ 注意有限增量符号 $\increment$ 固定使用正体,模板提供了 \cs{increment} 命令。 \item 小于等于号和大于等于号使用倾斜的字形 $\le$、$\ge$。 \item 积分号使用正体,比如 $\int$、$\oint$。 - \item 行间公式积分号的上下限位于积分号的上下两端,比如 - \begin{equation*} - \int_a^b f(x) \dif x. - \end{equation*} - 行内公式为了版面的美观,统一居右侧,如 $\int_a^b f(x) \dif x$ 。 \item 偏微分符号 $\partial$ 使用正体。 \item @@ -66,12 +61,11 @@ \section{数学公式} 数学公式可以使用 \env{equation} 和 \env{equation*} 环境。 -注意数学公式的引用应前后带括号,建议使用 \cs{eqref} 命令,比如式\eqref{eq:example}。 +注意数学公式的引用应前后带括号,通常使用 \cs{eqref} 命令,比如式\eqref{eq:example}。 \begin{equation} - \frac{1}{2 \uppi \symup{i}} \int_\gamma f = \sum_{k=1}^m n(\gamma; a_k) \mathscr{R}(f; a_k) + \frac{1}{2 \uppi \symup{i}} \int_\gamma f = \sum_{k=1}^m n(\gamma; a_k) \mathscr{R}(f; a_k). \label{eq:example} \end{equation} -注意公式编号的引用应含有圆括号,可以使用 \cs{eqref} 命令。 多行公式尽可能在“=”处对齐,推荐使用 \env{align} 环境。 \begin{align} diff --git a/macros/latex/contrib/thuthesis/latexmkrc b/macros/latex/contrib/thuthesis/latexmkrc index 17e9557a5e..848fd1312f 100644 --- a/macros/latex/contrib/thuthesis/latexmkrc +++ b/macros/latex/contrib/thuthesis/latexmkrc @@ -3,6 +3,7 @@ $pdf_mode = 5; $xelatex = "xelatex -shell-escape -file-line-error -halt-on-error -interaction=nonstopmode -no-pdf -synctex=1 %O %S"; +$lualatex = "lualatex -shell-escape -file-line-error -halt-on-error -interaction=nonstopmode -synctex=1 %O %S"; $xdvipdfmx = "xdvipdfmx -q -E -o %D %O %S"; $bibtex_use = 1.5; diff --git a/macros/latex/contrib/thuthesis/spine.pdf b/macros/latex/contrib/thuthesis/spine.pdf Binary files differindex 6f9d37e2ed..de169dda9b 100644 --- a/macros/latex/contrib/thuthesis/spine.pdf +++ b/macros/latex/contrib/thuthesis/spine.pdf diff --git a/macros/latex/contrib/thuthesis/thuthesis-author-year.bst b/macros/latex/contrib/thuthesis/thuthesis-author-year.bst index 514368e842..fe7e0d20dd 100644 --- a/macros/latex/contrib/thuthesis/thuthesis-author-year.bst +++ b/macros/latex/contrib/thuthesis/thuthesis-author-year.bst @@ -6,11 +6,11 @@ %% %% gbt7714.dtx (with options: `2015,thu,author-year') %% ------------------------------------------------------------------- -%% GB/T 7714—2015 BibTeX Style +%% GB/T 7714 BibTeX Style %% https://github.com/zepinglee/gbt7714-bibtex-style -%% Version: 2021/12/08 v2.1.3 +%% Version: 2022/03/21 v2.1.4 %% ------------------------------------------------------------------- -%% Copyright (C) 2016—2021 by Zeping Lee <zepinglee AT gmail.com> +%% Copyright (C) 2016--2022 by Zeping Lee <zepinglee AT gmail.com> %% ------------------------------------------------------------------- %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c @@ -37,8 +37,6 @@ INTEGERS { show.mark space.before.mark show.medium.type - slash.for.extraction - in.booktitle short.journal italic.journal bold.journal.volume @@ -60,6 +58,10 @@ INTEGERS { lang.other.order } +STRINGS { + component.part.label +} + FUNCTION {load.config} { #2 'citation.et.al.min := @@ -78,8 +80,7 @@ FUNCTION {load.config} #1 'show.mark := #0 'space.before.mark := #1 'show.medium.type := - #1 'slash.for.extraction := - #0 'in.booktitle := + "slash" 'component.part.label := #0 'short.journal := #0 'italic.journal := #0 'bold.journal.volume := @@ -112,6 +113,7 @@ ENTRY editor eprint eprinttype + entrysubtype howpublished institution journal @@ -392,9 +394,22 @@ FUNCTION {new.sentence} FUNCTION {new.slash} { output.state before.all = 'skip$ - { slash.for.extraction + { component.part.label "slash" = { after.slash 'output.state := } - { after.block 'output.state := } + { new.block + component.part.label "in" = + { entry.lang lang.en = + { "In: " output + write$ + "" + before.all 'output.state := + } + 'skip$ + if$ + } + 'skip$ + if$ + } if$ } if$ @@ -987,14 +1002,6 @@ FUNCTION {format.series.vol.num.booktitle} { format.booktitle.vol.num } if$ format.btitle - in.booktitle - { duplicate$ empty$ not entry.lang lang.en = and - { "In: " swap$ * } - 'skip$ - if$ - } - 'skip$ - if$ } FUNCTION {remove.period} @@ -1136,9 +1143,13 @@ FUNCTION {format.edition} { edition empty$ { "" } { edition is.number - { entry.lang lang.zh = - { edition " 版" * } - { edition num.to.ordinal " ed." * } + { edition "1" = not + { entry.lang lang.zh = + { edition " 版" * } + { edition num.to.ordinal " ed." * } + if$ + } + 'skip$ if$ } { entry.lang lang.en = @@ -1300,7 +1311,10 @@ FUNCTION {format.year} { year extract.before.slash extra.label * } { date empty$ not { date extract.before.dash extra.label * } - { "empty year in " cite$ * warning$ + { entry.is.electronic not + { "empty year in " cite$ * warning$ } + 'skip$ + if$ urldate empty$ not { "[" urldate extract.before.dash * extra.label * "]" * } { "" } @@ -1338,7 +1352,15 @@ FUNCTION {format.date} { date empty$ not { type$ "patent" = type$ "newspaper" = or { date } - { format.year } + { entrysubtype empty$ not + { type$ "article" = entrysubtype "newspaper" = and + { date } + { format.year } + if$ + } + { format.year } + if$ + } if$ } { year empty$ not @@ -1806,7 +1828,15 @@ FUNCTION {journal.article} new.block title.in.journal { format.title "title" output.check - "J" set.entry.mark + entrysubtype empty$ not + { + entrysubtype "newspaper" = + { "N" set.entry.mark } + { "J" set.entry.mark } + if$ + } + { "J" set.entry.mark } + if$ format.mark "" output.after new.block } diff --git a/macros/latex/contrib/thuthesis/thuthesis-bachelor.bst b/macros/latex/contrib/thuthesis/thuthesis-bachelor.bst index 78c81e628b..e7d7b7d85e 100644 --- a/macros/latex/contrib/thuthesis/thuthesis-bachelor.bst +++ b/macros/latex/contrib/thuthesis/thuthesis-bachelor.bst @@ -6,11 +6,11 @@ %% %% gbt7714.dtx (with options: `2015,numerical') %% ------------------------------------------------------------------- -%% GB/T 7714—2015 BibTeX Style +%% GB/T 7714 BibTeX Style %% https://github.com/zepinglee/gbt7714-bibtex-style -%% Version: 2021/12/08 v2.1.3 +%% Version: 2022/03/21 v2.1.4 %% ------------------------------------------------------------------- -%% Copyright (C) 2016—2021 by Zeping Lee <zepinglee AT gmail.com> +%% Copyright (C) 2016--2022 by Zeping Lee <zepinglee AT gmail.com> %% ------------------------------------------------------------------- %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c @@ -37,8 +37,6 @@ INTEGERS { show.mark space.before.mark show.medium.type - slash.for.extraction - in.booktitle short.journal italic.journal bold.journal.volume @@ -55,6 +53,10 @@ INTEGERS { end.with.period } +STRINGS { + component.part.label +} + FUNCTION {load.config} { #2 'citation.et.al.min := @@ -73,8 +75,7 @@ FUNCTION {load.config} #1 'show.mark := #0 'space.before.mark := #1 'show.medium.type := - #1 'slash.for.extraction := - #0 'in.booktitle := + "slash" 'component.part.label := #0 'short.journal := #0 'italic.journal := #0 'bold.journal.volume := @@ -102,6 +103,7 @@ ENTRY editor eprint eprinttype + entrysubtype howpublished institution journal @@ -382,9 +384,22 @@ FUNCTION {new.sentence} FUNCTION {new.slash} { output.state before.all = 'skip$ - { slash.for.extraction + { component.part.label "slash" = { after.slash 'output.state := } - { after.block 'output.state := } + { new.block + component.part.label "in" = + { entry.lang lang.en = + { "In: " output + write$ + "" + before.all 'output.state := + } + 'skip$ + if$ + } + 'skip$ + if$ + } if$ } if$ @@ -977,14 +992,6 @@ FUNCTION {format.series.vol.num.booktitle} { format.booktitle.vol.num } if$ format.btitle - in.booktitle - { duplicate$ empty$ not entry.lang lang.en = and - { "In: " swap$ * } - 'skip$ - if$ - } - 'skip$ - if$ } FUNCTION {remove.period} @@ -1126,9 +1133,13 @@ FUNCTION {format.edition} { edition empty$ { "" } { edition is.number - { entry.lang lang.zh = - { edition " 版" * } - { edition num.to.ordinal " ed." * } + { edition "1" = not + { entry.lang lang.zh = + { edition " 版" * } + { edition num.to.ordinal " ed." * } + if$ + } + 'skip$ if$ } { entry.lang lang.en = @@ -1290,7 +1301,10 @@ FUNCTION {format.year} { year extract.before.slash extra.label * } { date empty$ not { date extract.before.dash extra.label * } - { "empty year in " cite$ * warning$ + { entry.is.electronic not + { "empty year in " cite$ * warning$ } + 'skip$ + if$ urldate empty$ not { "[" urldate extract.before.dash * extra.label * "]" * } { "" } @@ -1328,7 +1342,15 @@ FUNCTION {format.date} { date empty$ not { type$ "patent" = type$ "newspaper" = or { date } - { format.year } + { entrysubtype empty$ not + { type$ "article" = entrysubtype "newspaper" = and + { date } + { format.year } + if$ + } + { format.year } + if$ + } if$ } { year empty$ not @@ -1796,7 +1818,15 @@ FUNCTION {journal.article} new.block title.in.journal { format.title "title" output.check - "J" set.entry.mark + entrysubtype empty$ not + { + entrysubtype "newspaper" = + { "N" set.entry.mark } + { "J" set.entry.mark } + if$ + } + { "J" set.entry.mark } + if$ format.mark "" output.after new.block } diff --git a/macros/latex/contrib/thuthesis/thuthesis-example.pdf b/macros/latex/contrib/thuthesis/thuthesis-example.pdf Binary files differindex b25df293c9..4345c0a1cc 100644 --- a/macros/latex/contrib/thuthesis/thuthesis-example.pdf +++ b/macros/latex/contrib/thuthesis/thuthesis-example.pdf diff --git a/macros/latex/contrib/thuthesis/thuthesis-numeric.bst b/macros/latex/contrib/thuthesis/thuthesis-numeric.bst index 0b41d73140..f667907095 100644 --- a/macros/latex/contrib/thuthesis/thuthesis-numeric.bst +++ b/macros/latex/contrib/thuthesis/thuthesis-numeric.bst @@ -6,11 +6,11 @@ %% %% gbt7714.dtx (with options: `2015,thu,numerical') %% ------------------------------------------------------------------- -%% GB/T 7714—2015 BibTeX Style +%% GB/T 7714 BibTeX Style %% https://github.com/zepinglee/gbt7714-bibtex-style -%% Version: 2021/12/08 v2.1.3 +%% Version: 2022/03/21 v2.1.4 %% ------------------------------------------------------------------- -%% Copyright (C) 2016—2021 by Zeping Lee <zepinglee AT gmail.com> +%% Copyright (C) 2016--2022 by Zeping Lee <zepinglee AT gmail.com> %% ------------------------------------------------------------------- %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c @@ -37,8 +37,6 @@ INTEGERS { show.mark space.before.mark show.medium.type - slash.for.extraction - in.booktitle short.journal italic.journal bold.journal.volume @@ -55,6 +53,10 @@ INTEGERS { end.with.period } +STRINGS { + component.part.label +} + FUNCTION {load.config} { #2 'citation.et.al.min := @@ -73,8 +75,7 @@ FUNCTION {load.config} #1 'show.mark := #0 'space.before.mark := #1 'show.medium.type := - #1 'slash.for.extraction := - #0 'in.booktitle := + "slash" 'component.part.label := #0 'short.journal := #0 'italic.journal := #0 'bold.journal.volume := @@ -102,6 +103,7 @@ ENTRY editor eprint eprinttype + entrysubtype howpublished institution journal @@ -382,9 +384,22 @@ FUNCTION {new.sentence} FUNCTION {new.slash} { output.state before.all = 'skip$ - { slash.for.extraction + { component.part.label "slash" = { after.slash 'output.state := } - { after.block 'output.state := } + { new.block + component.part.label "in" = + { entry.lang lang.en = + { "In: " output + write$ + "" + before.all 'output.state := + } + 'skip$ + if$ + } + 'skip$ + if$ + } if$ } if$ @@ -977,14 +992,6 @@ FUNCTION {format.series.vol.num.booktitle} { format.booktitle.vol.num } if$ format.btitle - in.booktitle - { duplicate$ empty$ not entry.lang lang.en = and - { "In: " swap$ * } - 'skip$ - if$ - } - 'skip$ - if$ } FUNCTION {remove.period} @@ -1126,9 +1133,13 @@ FUNCTION {format.edition} { edition empty$ { "" } { edition is.number - { entry.lang lang.zh = - { edition " 版" * } - { edition num.to.ordinal " ed." * } + { edition "1" = not + { entry.lang lang.zh = + { edition " 版" * } + { edition num.to.ordinal " ed." * } + if$ + } + 'skip$ if$ } { entry.lang lang.en = @@ -1290,7 +1301,10 @@ FUNCTION {format.year} { year extract.before.slash extra.label * } { date empty$ not { date extract.before.dash extra.label * } - { "empty year in " cite$ * warning$ + { entry.is.electronic not + { "empty year in " cite$ * warning$ } + 'skip$ + if$ urldate empty$ not { "[" urldate extract.before.dash * extra.label * "]" * } { "" } @@ -1328,7 +1342,15 @@ FUNCTION {format.date} { date empty$ not { type$ "patent" = type$ "newspaper" = or { date } - { format.year } + { entrysubtype empty$ not + { type$ "article" = entrysubtype "newspaper" = and + { date } + { format.year } + if$ + } + { format.year } + if$ + } if$ } { year empty$ not @@ -1796,7 +1818,15 @@ FUNCTION {journal.article} new.block title.in.journal { format.title "title" output.check - "J" set.entry.mark + entrysubtype empty$ not + { + entrysubtype "newspaper" = + { "N" set.entry.mark } + { "J" set.entry.mark } + if$ + } + { "J" set.entry.mark } + if$ format.mark "" output.after new.block } diff --git a/macros/latex/contrib/thuthesis/thuthesis.dtx b/macros/latex/contrib/thuthesis/thuthesis.dtx index f2a48c8a13..d273a1add8 100644 --- a/macros/latex/contrib/thuthesis/thuthesis.dtx +++ b/macros/latex/contrib/thuthesis/thuthesis.dtx @@ -14,7 +14,7 @@ % % \iffalse %<*driver> -\ProvidesFile{thuthesis.dtx}[2022/03/19 7.2.4 Tsinghua University Thesis Template] +\ProvidesFile{thuthesis.dtx}[2022/05/17 7.3.0 Tsinghua University Thesis Template] \documentclass{ltxdoc} \usepackage{dtx-style} @@ -74,7 +74,7 @@ % \item 本模板为作者根据 % 清华大学研究生院颁发的《 % \href{http://yjsy.cic.tsinghua.edu.cn/docinfo/board/boarddetail.jsp?columnId=001050603&parentColumnId=0010506&itemSeq=5365}{% -% 研究生学位论文写作指南}》(2021年6月版本,限校内网络访问)、 +% 研究生学位论文写作指南}》(更新到2022年5月版本,限校内网络访问)、 % 英文版《Guide to Thesis Writing for Graduate Students》、 % 清华大学教务处颁发的《 % \href{https://lib.tsinghua.edu.cn/info/1073/1978.htm}{% @@ -379,8 +379,8 @@ % \subsubsection{输出格式} % \DescribeOption{output} % 选择输出的格式是打印版还是电子版(用于提交),可选:\option{print}(默认)、\option{electronic}。 -% 一些院系要求提交的电子版不含空白页,但是这对打印并不友好, -% 比如正文第一页可能会在左侧;以及一些部分需要单面打印,需要插入空白页。 +% 打印版 \option{print} 自动在单面打印的部分插入空白页(比如封面),并且保证正文第 1 页在右侧。 +% 电子版 \option{electronic} 选项会去掉空白页,这是因为一些院系要求提交的电子版不含空白页。 % 注意在不同选项下,生成的声明页码很可能不同。为了避免页码错误, % \thuthesis{}将会在插入扫描的 PDF 文件时自动生成页码,因此\textbf{扫描声明页时请移除底部的页码},以防重叠。 % @@ -670,9 +670,7 @@ % \DescribeOption{toc-chapter-style} % 本科生《写作指南》关于目录章标题要求“目录从第 1 章开始,每章标题用黑体小四号字”, % 所以其中的西文和数字默认使用 Arial 字体,跟正文的章标题一致。 -% 但是论文样例\footnote{ -% \url{http://www.law.tsinghua.edu.cn/publish/law/7024/2012/20120216153516317135347/20120216153516317135347_.html} -% }的目录章标题的西文和数字却使用了 Times。 +% 但是论文样例\footnote{此前发布在法学院网站,目前已经无公开可获得的链接。}的目录章标题的西文和数字却使用了 Times。 % 如果审查老师这样要求,需要在生成目录前设置 % \begin{latex} % \thusetup{ @@ -822,7 +820,7 @@ % uppercase-greek = italic, % less-than-or-equal = slanted, % integral = upright, -% integral-limits = true, +% integral-limits = false, % partial = upright, % math-ellipsis = centered, % real-part = roman, @@ -1250,7 +1248,7 @@ % \begin{macrocode} %<cls>\NeedsTeXFormat{LaTeX2e}[2017/04/15] %<cls>\ProvidesClass{thuthesis} -%<cls>[2022/03/19 7.2.4 Tsinghua University Thesis Template] +%<cls>[2022/05/17 7.3.0 Tsinghua University Thesis Template] % \end{macrocode} % % 报错 @@ -1288,7 +1286,9 @@ % \begin{macrocode} \RequirePackage{iftex} \ifXeTeX\else - \thu@error{XeLaTeX is required to compile this document} + \ifLuaTeX\else + \thu@error{XeLaTeX or LuaLaTeX is required to compile this document} + \fi \fi % \end{macrocode} % @@ -1306,7 +1306,7 @@ %<*cls> \hyphenation{Thu-Thesis} \def\thuthesis{ThuThesis} -\def\version{7.2.4} +\def\version{7.3.0} \RequirePackage{kvdefinekeys} \RequirePackage{kvsetkeys} \RequirePackage{kvoptions} @@ -1541,6 +1541,7 @@ auto, windows, mac, + mac-word, noto, fandol, none, @@ -1767,8 +1768,11 @@ % 利用 \pkg{xeCJKfntef} 实现汉字的下划线和盒子内两段对齐,并可以避免 % \cs{makebox}\oarg{width}\oarg{s} 可能产生的 underful boxes。 % \begin{macrocode} -\RequirePackage{xeCJKfntef} -\RequirePackage{soul} +\ifXeTeX + \RequirePackage{xeCJKfntef} +\else + \RequirePackage{ulem} +\fi % \end{macrocode} % % 表格控制 @@ -2061,8 +2065,20 @@ % % 带圈数字和星号使用中文字体。 % \begin{macrocode} -\xeCJKDeclareCharClass{CJK}{"2460 -> "2473} -\xeCJKDeclareCharClass{CJK}{"2605} +\ifLuaTeX + % ctex 将带圈数字 U+2460–U+24FF 归入字符范围 3(ALchar),这里改回范围 6(JAchar) + \ltjdefcharrange{3}{% + "2000-"243F, "2500-"27BF, "2900-"29FF, "2B00-"2BFF} + \ltjdefcharrange{6}{% + "2460-"24FF, "2E80-"2EFF, "3000-"30FF, "3190-"319F, "31F0-"4DBF, + "4E00-"9FFF, "F900-"FAFF, "FE10-"FE1F, "FE30-"FE6F, "FF00-"FFEF, + "1B000-"1B16F, "1F100-"1F2FF, "20000-"3FFFF, "E0100-"E01EF} +\else + \ifXeTeX + \xeCJKDeclareCharClass{CJK}{"2460 -> "2473} + \xeCJKDeclareCharClass{CJK}{"2605} + \fi +\fi % \end{macrocode} % % \newcommand\unicodechar[1]{U+#1(\symbol{"#1})} @@ -2083,16 +2099,28 @@ % \begin{macrocode} \newcommand\thu@set@punctuations{% \ifthu@language@chinese - \xeCJKDeclareCharClass{FullLeft}{"2018, "201C}% - \xeCJKDeclareCharClass{FullRight}{ - "00B7, "2019, "201D, "2013, "2014, "2025, "2026, "2E3A, - }% + \ifLuaTeX + \ltjsetparameter{jacharrange={+9}} + \else + \ifXeTeX + \xeCJKDeclareCharClass{FullLeft}{"2018, "201C}% + \xeCJKDeclareCharClass{FullRight}{ + "00B7, "2019, "201D, "2013, "2014, "2025, "2026, "2E3A, + }% + \fi + \fi \else \ifthu@language@english - \xeCJKDeclareCharClass{HalfLeft}{"2018, "201C}% - \xeCJKDeclareCharClass{HalfRight}{ - "00B7, "2019, "201D, "2013, "2014, "2025, "2026, "2E3A, - }% + \ifLuaTeX + \ltjsetparameter{jacharrange={-9}} + \else + \ifXeTeX + \xeCJKDeclareCharClass{HalfLeft}{"2018, "201C}% + \xeCJKDeclareCharClass{HalfRight}{ + "00B7, "2019, "201D, "2013, "2014, "2025, "2026, "2E3A, + }% + \fi + \fi \fi \fi } @@ -2208,6 +2236,9 @@ % % 使用 \pkg{fontspec} 配置字体。 % \begin{macrocode} +\newcommand\thu@mac@word@font@path{% + /Applications/Microsoft Word.app/Contents/Resources/DFonts/% +} \ifthu@fontset@auto \ifthu@system@windows \thusetup{fontset = windows} @@ -2215,15 +2246,19 @@ \IfFontExistsTF{SimSun}{ \thusetup{fontset = windows} }{ - \ifthu@system@mac - \thusetup{fontset = mac} - \else - \IfFontExistsTF{Noto Serif CJK SC}{ - \thusetup{fontset = ubuntu} - }{ - \thusetup{fontset = fandol} - } - \fi + \IfFileExists{\thu@mac@word@font@path/SimSun.ttf}{ + \thusetup{fontset = windows} + }{ + \ifthu@system@mac + \thusetup{fontset = mac} + \else + \IfFontExistsTF{Noto Serif CJK SC}{ + \thusetup{fontset = ubuntu} + }{ + \thusetup{fontset = fandol} + } + \fi + } } \fi \fi @@ -2487,13 +2522,30 @@ % % \subsubsection{中文字体} % +% 去掉“no requested script”警告。 +% \begin{macrocode} +\ExplSyntaxOn +\@ifpackageloaded { xeCJK } + { \msg_redirect_name:nnn { fontspec } { no-script } { info } } + { } +\ExplSyntaxOff +% \end{macrocode} +% % \begin{macrocode} \ifthu@cjk@font@auto \ifthu@fontset@mac \thusetup{cjk-font = mac} \else \ifthu@fontset@windows - \thusetup{cjk-font = windows} + \IfFontExistsTF{SimSun}{ + \thusetup{cjk-font = windows} + }{ + \IfFileExists{\thu@mac@word@font@path/SimSun.ttf}{ + \thusetup{cjk-font = mac-word} + }{ + \thu@error{Cannot find "SimSun" font} + } + } \else \ifthu@fontset@ubuntu \thusetup{cjk-font = noto} @@ -2508,24 +2560,48 @@ % Windows 的中易字体。 % \begin{macrocode} \newcommand\thu@set@cjk@font@windows{% - \xeCJKsetup{EmboldenFactor=3}% \setCJKmainfont{SimSun}[ - AutoFakeBold = true, + AutoFakeBold = 3, ItalicFont = KaiTi, ]% - \setCJKsansfont{SimHei}[AutoFakeBold]% + \setCJKsansfont{SimHei}[AutoFakeBold = 3]% \setCJKmonofont{FangSong}% - \setCJKfamilyfont{zhsong}{SimSun}[AutoFakeBold]% - \setCJKfamilyfont{zhhei}{SimHei}[AutoFakeBold]% + \setCJKfamilyfont{zhsong}{SimSun}[AutoFakeBold = 3]% + \setCJKfamilyfont{zhhei}{SimHei}[AutoFakeBold = 3]% \setCJKfamilyfont{zhkai}{KaiTi}% \setCJKfamilyfont{zhfs}{FangSong}% } % \end{macrocode} % +% macOS 的 Microsoft Word 字体。 +% \begin{macrocode} +\@namedef{thu@set@cjk@font@mac-word}{% + \setCJKmainfont{SimSun}[% + Path = \thu@mac@word@font@path, + AutoFakeBold = 3, + ItalicFont = KaiTi, + ]% + \setCJKsansfont{SimHei}[% + Path = \thu@mac@word@font@path, + AutoFakeBold = 3, + ]% + \setCJKmonofont{FangSong}[Path=\thu@mac@word@font@path]% + \setCJKfamilyfont{zhsong}{SimSun}[% + Path = \thu@mac@word@font@path, + AutoFakeBold = 3, + ]% + \setCJKfamilyfont{zhhei}{SimHei}[% + Path = \thu@mac@word@font@path, + AutoFakeBold = 3, + ]% + \setCJKfamilyfont{zhkai}{KaiTi}[Path = \thu@mac@word@font@path]% + \setCJKfamilyfont{zhfs}{FangSong}[Path = \thu@mac@word@font@path]% +} +% \end{macrocode} +% % macOS 的华文字体。 % \begin{macrocode} \newcommand\thu@set@cjk@font@mac{% - \defaultCJKfontfeatures{}% \setCJKmainfont{Songti SC}[ UprightFont = * Light, BoldFont = * Bold, @@ -2562,30 +2638,19 @@ % 注意 Noto CJK 的 regular 字重名字不带“Regular”。 % \begin{macrocode} \newcommand\thu@set@cjk@font@noto{% - \defaultCJKfontfeatures{}% \setCJKmainfont{Noto Serif CJK SC}[ UprightFont = * Light, BoldFont = * Bold, ItalicFont = FandolKai-Regular, ItalicFeatures = {Extension = .otf}, - Script = CJK, - ]% - \setCJKsansfont{Noto Sans CJK SC}[ - BoldFont = * Medium, - Script = CJK, - ]% - \setCJKmonofont{Noto Sans Mono CJK SC}[ - Script = CJK, ]% + \setCJKsansfont{Noto Sans CJK SC}[BoldFont = * Medium]% + \setCJKmonofont{Noto Sans Mono CJK SC}% \setCJKfamilyfont{zhsong}{Noto Serif CJK SC}[ UprightFont = * Light, UprightFont = * Bold, - Script = CJK, - ]% - \setCJKfamilyfont{zhhei}{Noto Sans CJK SC}[ - BoldFont = * Medium, - Script = CJK, ]% + \setCJKfamilyfont{zhhei}{Noto Sans CJK SC}[BoldFont * Medium]% \setCJKfamilyfont{zhfs}{FandolFang}[ Extension = .otf, UprightFont = *-Regular, @@ -2600,7 +2665,6 @@ % Fandol 字体。 % \begin{macrocode} \newcommand\thu@set@cjk@font@fandol{% - \defaultCJKfontfeatures{}% \setCJKmainfont{FandolSong}[ Extension = .otf, UprightFont = *-Regular, @@ -2668,19 +2732,20 @@ \thusetup{ uppercase-greek = italic, integral = upright, - integral-limits = true, partial = upright, real-part = roman, }% \ifthu@math@style@ISO \thusetup{ less-than-or-equal = horizontal, + integral-limits = true, math-ellipsis = lower, }% \else \ifthu@math@style@GB \thusetup{ less-than-or-equal = slanted, + integral-limits = false, math-ellipsis = centered, }% \fi @@ -3187,7 +3252,6 @@ % \begin{macrocode} \ctexset{% punct=quanjiao, - space=auto, } \newcommand\thu@set@indent{% \ifthu@main@language@chinese @@ -3254,6 +3318,13 @@ % % \subsubsection{脚注} % \label{sec:footnote} +% +% 严格禁止脚注跨页,参考 \href{https://github.com/tuna/thuthesis/issues/778}{\#778} +% 和 \url{https://texfaq.org/FAQ-splitfoot}。 +% \begin{macrocode} +\interfootnotelinepenalty=10000 +% \end{macrocode} +% % 脚注内容采用小五号字,中文用宋体,英文和数字用 Times New Roman 体按两端对齐格式书写, % 单倍行距,段前段后均空 0 磅。 % 脚注的序号按页编排,不同页的脚注序号不需要连续。 @@ -3593,21 +3664,17 @@ numberformat = {}, titleformat = {}, fixskip = true, - aftername = \quad, afterindent = true, lofskip = 0pt, lotskip = 0pt, }, section = { - aftername = \quad, afterindent = true, }, subsection = { - aftername = \quad, afterindent = true, }, subsubsection = { - aftername = \quad, afterindent = true, }, paragraph/afterindent = true, @@ -3636,21 +3703,25 @@ \ctexset{% chapter = { format = \centering\sffamily\fontsize{15bp}{20bp}\selectfont, + aftername = \quad, beforeskip = 30bp, afterskip = 20bp, }, section = { format = \sffamily\fontsize{14bp}{18bp}\selectfont, + aftername = \quad, beforeskip = 25bp, afterskip = 12bp, }, subsection = { format = \sffamily\fontsize{13bp}{15bp}\selectfont, + aftername = \quad, beforeskip = 12bp, afterskip = 6bp, }, subsubsection = { format = \sffamily\fontsize{12bp}{14bp}\selectfont, + aftername = \quad, beforeskip = 12bp, afterskip = 6bp, }, @@ -3700,6 +3771,25 @@ % 由于 Word 的行距算法不同,这里进行了一些调整使得视觉上更接近。 % \begin{macrocode} \else + \ctexset{% + chapter = { + beforeskip = 27bp, + afterskip = 27bp, + number = \thechapter, + }, + section = { + beforeskip = 24bp, + afterskip = 6bp, + }, + subsection = { + beforeskip = 12bp, + afterskip = 6bp, + }, + subsubsection = { + beforeskip = 12bp, + afterskip = 6bp, + }, + }% \ifthu@main@language@chinese \ctexset{% chapter = { @@ -3707,15 +3797,19 @@ nameformat = {}, titleformat = {}, name = {第,章}, + aftername = \quad, }, section = { format = \sffamily\fontsize{14bp}{20bp}\selectfont, + aftername = \quad, }, subsection = { format = \sffamily\fontsize{13bp}{20bp}\selectfont, + aftername = \quad, }, subsubsection = { format = \sffamily\fontsize{12bp}{20bp}\selectfont, + aftername = \quad, }, }% \else @@ -3725,37 +3819,22 @@ nameformat = \MakeUppercase, titleformat = \MakeUppercase, name = \chaptername\space, + aftername = \space, }, section = { format = \sffamily\bfseries\fontsize{14bp}{20bp}\selectfont, + aftername = \space, }, subsection = { format = \sffamily\bfseries\fontsize{13bp}{20bp}\selectfont, + aftername = \space, }, subsubsection = { format = \sffamily\bfseries\fontsize{12bp}{20bp}\selectfont, + aftername = \space, }, }% \fi - \ctexset{% - chapter = { - beforeskip = 27bp, - afterskip = 27bp, - number = \thechapter, - }, - section = { - beforeskip = 24bp, - afterskip = 6bp, - }, - subsection = { - beforeskip = 12bp, - afterskip = 6bp, - }, - subsubsection = { - beforeskip = 12bp, - afterskip = 6bp, - }, - }% \fi } \thu@set@section@format @@ -3953,7 +4032,7 @@ \else \titlecontents{chapter} [\z@]{\addvspace{6bp}\heiti} - {\contentspush{\MakeUppercase{\thecontentslabel}\quad}\MakeUppercase}{\MakeUppercase} + {\contentspush{\MakeUppercase{\thecontentslabel}\space}\MakeUppercase}{\MakeUppercase} {\rmfamily\thu@leaders\thecontentspage}% \titlecontents{section} [1em]{} @@ -4133,17 +4212,22 @@ \newcommand\thu@date@en@short[3]{\thu@date@month{#2}, #1} % \end{macrocode} % -% 下划线命令 +% 下划线命令。 +% \pkg{ulem} 的下划线 \cs{uline} 可以控制粗细和深度。 % \begin{macrocode} \newcommand\thu@underline[2][6em]{\hskip1pt\underline{\hb@xt@ #1{\hss#2\hss}}\hskip3pt} -\newcommand\thu@CJKunderline[2][6em]{\CJKunderline*{\hb@xt@ #1{\hss#2\hss}}} +\newcommand\thu@uline[2][6em]{\uline{\hb@xt@ #1{\hss#2\hss}}} % \end{macrocode} % % 将内容拉伸或压缩到固定宽度。 % \begin{macrocode} \newcommand\thu@fixed@box[2]{% \begingroup - \def\CJKglue{\hskip 0pt plus 2filll minus 1filll}% + \ifLuaTeX + \ltjsetparameter{kanjiskip = {0pt plus 2filll minus 1filll}}% + \else + \renewcommand\CJKglue{\hspace{0pt plus 2filll minus 1filll}}% + \fi \makebox[#1][l]{#2}% \endgroup } @@ -4156,7 +4240,11 @@ \sbox\thu@stretch@box{#2}% \ifdim \wd\thu@stretch@box < #1\relax \begingroup - \def\CJKglue{\hskip 0pt plus 2filll}% + \ifLuaTeX + \ltjsetparameter{kanjiskip = {0pt plus 2filll}}% + \else + \renewcommand\CJKglue{\hspace{0pt plus 2filll}}% + \fi \makebox[#1][l]{#2}% \endgroup \else @@ -4379,8 +4467,14 @@ \thu@titlepage@degree \vfill \parbox[t][8.5cm][t]{\textwidth}{% - \centering\CJKfamily+{}% - \centering\fangsong\sanhao[1.95]% + \centering + \fangsong + \ifLuaTeX + \fontspec{\CJK@family}% + \else + \CJKfamily+{}% + \fi + \sanhao[1.95]% \thu@titlepage@info }\par \parbox[t][2.5cm][t]{\textwidth}{\centering\thu@titlepage@date}\par @@ -4415,8 +4509,14 @@ % \begin{macrocode} \newcommand\thu@titlepage@degree{% \begingroup - \CJKfamily+{}\xiaoer - \def\CJKglue{\hskip 1bp}% + \xiaoer + \ifLuaTeX + \fontspec{\CJK@family}% + \ltjsetparameter{kanjiskip = {1bp}}% + \else + \CJKfamily+{}% + \renewcommand\CJKglue{\hspace{1bp}}% + \fi \ifthu@thesis@type@thesis (申请清华大学\thu@degree@name \ifthu@degree@type@professional @@ -4540,7 +4640,11 @@ \newcommand\thu@titlepage@date{% \begingroup \sanhao - \def\CJKglue{\hskip 1bp}% + \ifLuaTeX + \ltjsetparameter{kanjiskip = {1bp}}% + \else + \renewcommand\CJKglue{\hspace{1bp}}% + \fi \thu@format@date{\thu@date@zh@short}{\thu@date}\par \endgroup } @@ -4632,7 +4736,7 @@ \fi } \newcommand\thu@titlepage@en@degree{% - \thu@thesis@name@en{} Submitted to\par + \thu@thesis@name@en{} submitted to\par {\bfseries Tsinghua University\par}% in partial fulfillment of the requirement\par for the @@ -4700,22 +4804,23 @@ \vskip 1.8cm% \begingroup \heiti - \ifthu@main@language@chinese - \yihao[1.56]% - \else - \fontsize{26bp}{32bp}\selectfont - \fi - \parindent=18bp% - \hangindent=72bp% - \makebox[54bp]{\xiaoer[1.2]题目:}% - \CJKunderline*[skip=false, thickness=0.05em, depth=0.12em]{\thu@title}% - \ifthu@main@language@english - \\ - \thusetup{language=english}% - \ul\thu@title@en - \thusetup{language=chinese}% - \fi - \par + % 21.0cm - 0.2cm - 3cm * 2 - 18bp * 4 = 347bp + \noindent\hspace{1em}\makebox[54bp]{\xiaoer[1.2]题目:}% + \parbox[t]{347bp}{% + \ifthu@main@language@chinese + \yihao[1.56]% + \else + \fontsize{26bp}{32bp}\selectfont + \fi + \renewcommand\ULthickness{0.05em}% + \renewcommand\ULdepth{0.17em}% + \expandafter\uline\expandafter{\thu@title}\par + \ifthu@main@language@english + \thusetup{language=english}% + \expandafter\uline\expandafter{\thu@title@en}\par + \thusetup{language=chinese}% + \fi + }\par \endgroup \vskip 1.9cm% \begingroup @@ -4746,7 +4851,12 @@ \vskip 1.4cm% \begingroup \centering - {\CJKfamily+{}\xiaosi\thu@format@date{\thu@date@zh@digit}{\thu@date}\par}% + \ifLuaTeX + \fontspec{\CJK@family}% + \else + \CJKfamily+{}% + \fi + \xiaosi\thu@format@date{\thu@date@zh@digit}{\thu@date}\par \endgroup \vfill \clearpage @@ -4774,20 +4884,23 @@ }% \vskip 0.2cm% \parbox[t][4.0cm][c]{\textwidth}{% - \centering\sihao[3.46]\CJKunderline*[depth=1em]{\thu@title}\par + \centering\sihao[3.46]% + \renewcommand\ULdepth{1em}% + \expandafter\uline\expandafter{\thu@title}\par }\par \vskip 0.4cm% {\xiaosi\thu@author\par}% \vskip 1.4cm% - {\xiaosi[1.58]\xeCJKsetup{underline/depth=0.9em}% + {\xiaosi[1.58]% + \renewcommand\ULdepth{0.9em}% 工作完成日期\quad - \thu@CJKunderline[5.9cm]{% + \thu@uline[5.9cm]{% \thu@format@date{\thu@date@zh@digit@short}{\thu@start@date}—% \thu@format@date{\thu@date@zh@digit@short}{\thu@end@date} }\par \vskip 0.55cm% 报告提交日期\quad - \thu@CJKunderline[5.9cm]{\thu@format@date{\thu@date@zh@digit@short}{\thu@date}}\par + \thu@uline[5.9cm]{\thu@format@date{\thu@date@zh@digit@short}{\thu@date}}\par }% \vskip 0.45cm% {\xiaosi[2]{\ziju{1}清华大学}\quad (北京)\par}% @@ -6047,16 +6160,49 @@ format += \centering, numbering = false, }, - subsection = { - format = \sffamily\fontsize{14bp}{20bp}\selectfont, - numbering = false, - aftertitle = \ifthu@language@chinese :\else :\fi, - }, }% - \ifthu@degree@bachelor - \ifthu@language@english - \sffamily\fontsize{15bp}{20bp}\selectfont, + \ifthu@language@chinese + \ctexset{ + subsection = { + format = \sffamily\fontsize{14bp}{20bp}\selectfont, + numbering = false, + aftertitle = :, + }, + }% + \ifthu@degree@graduate + \fontsize{12bp}{16bp}\selectfont + \fi + \setlist[achievements]{ + topsep = 6bp, + itemsep = 6bp, + leftmargin = 1cm, + labelwidth = 1cm, + labelsep = 0pt, + align = left, + label = [\arabic*], + }% + \else + \ctexset{ + subsection = { + beforeskip = 0pt, + afterskip = 0pt, + format = \bfseries\normalsize, + indent = \parindent, + numbering = false, + }, + }% + \ifthu@degree@bachelor + % 内容部分用Arial字体,字号15pt,行距采用固定值20pt, 段前后 0pt。 + \sffamily\fontsize{15bp}{20bp}\selectfont \fi + \setlist[achievements]{ + topsep = 0bp, + itemsep = 0bp, + leftmargin = 1.75cm, + labelsep = 0.5cm, + align = right, + label = [\arabic*], + }% \fi }{} % \end{macrocode} @@ -6077,19 +6223,14 @@ % \begin{macrocode} \newlist{achievements}{enumerate}{1} \setlist[achievements]{ - label = [\arabic*], - align = left, - leftmargin = 10mm, topsep = 6bp, - parsep = 0bp, partopsep = 0bp, itemsep = 6bp, - labelsep = !, - before = { - \ifthu@degree@graduate - \fontsize{12bp}{16bp}\selectfont - \fi - }, + parsep = 0bp, + leftmargin = 10mm, + itemindent = 0pt, + align = left, + label = [\arabic*], resume = achievements, } % \end{macrocode} @@ -6332,7 +6473,7 @@ % \itshape % #1\@addpunct{.}]\ignorespaces \sffamily - #1\@addpunct{\thu@theorem@separator}]\ignorespaces + #1]\ignorespaces }{% \popQED\endtrivlist\@endpefalse } diff --git a/macros/latex/contrib/thuthesis/thuthesis.pdf b/macros/latex/contrib/thuthesis/thuthesis.pdf Binary files differindex ad3acc14f2..57cc881d94 100644 --- a/macros/latex/contrib/thuthesis/thuthesis.pdf +++ b/macros/latex/contrib/thuthesis/thuthesis.pdf |