diff options
Diffstat (limited to 'macros/latex/contrib/thuthesis/thuthesis.dtx')
-rw-r--r-- | macros/latex/contrib/thuthesis/thuthesis.dtx | 86 |
1 files changed, 60 insertions, 26 deletions
diff --git a/macros/latex/contrib/thuthesis/thuthesis.dtx b/macros/latex/contrib/thuthesis/thuthesis.dtx index d273a1add8..17d61b37e8 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/05/17 7.3.0 Tsinghua University Thesis Template] +\ProvidesFile{thuthesis.dtx}[2022/10/05 7.3.1 Tsinghua University Thesis Template] \documentclass{ltxdoc} \usepackage{dtx-style} @@ -1248,7 +1248,7 @@ % \begin{macrocode} %<cls>\NeedsTeXFormat{LaTeX2e}[2017/04/15] %<cls>\ProvidesClass{thuthesis} -%<cls>[2022/05/17 7.3.0 Tsinghua University Thesis Template] +%<cls>[2022/10/05 7.3.1 Tsinghua University Thesis Template] % \end{macrocode} % % 报错 @@ -1306,7 +1306,7 @@ %<*cls> \hyphenation{Thu-Thesis} \def\thuthesis{ThuThesis} -\def\version{7.3.0} +\def\version{7.3.1} \RequirePackage{kvdefinekeys} \RequirePackage{kvsetkeys} \RequirePackage{kvoptions} @@ -1939,7 +1939,7 @@ % \begin{macrocode} \newcommand\thu@set@chapter@names{% \ifthu@main@language@chinese - \def\thu@comments@name{指导教师学术评语}% + \def\thu@comments@name{指导教师评语}% \def\bibname{参考文献}% \def\appendixname{附录}% \def\indexname{索引}% @@ -2650,7 +2650,7 @@ UprightFont = * Light, UprightFont = * Bold, ]% - \setCJKfamilyfont{zhhei}{Noto Sans CJK SC}[BoldFont * Medium]% + \setCJKfamilyfont{zhhei}{Noto Sans CJK SC}[BoldFont = * Medium]% \setCJKfamilyfont{zhfs}{FandolFang}[ Extension = .otf, UprightFont = *-Regular, @@ -4967,26 +4967,29 @@ \kvsetkeys{thu@committee}{#1}% \ifx\thu@committee@file\@empty \begingroup - \ifthu@main@language@english - \ctexset{chapter/format=\centering\sffamily\fontsize{16bp}{20bp}\selectfont} - \fi + \ctexset{ + chapter = { + format = \centering\sffamily\fontsize{16bp}{20bp}\selectfont, + afterskip = 49bp, + }, + section = { + beforeskip = 26bp, + afterskip = 9.5bp, + format += \centering, + numbering = false, + afterindent = false, + }, + }% \thu@chapter*[]{\thu@committee@name}% + \thispagestyle{empty}% + \thusetup{language=chinese}% + \BODY\clearpage + \thu@reset@main@language \endgroup \else \thu@pdfbookmark{0}{\thu@committee@name}% \includepdf{\thu@committee@file}% \fi - \thispagestyle{empty}% - \ctexset{ - section = { - format += {\centering}, - numbering = false, - afterindent = false, - }, - }% - \thusetup{language=chinese} - \BODY\clearpage - \thu@reset@main@language \fi } % \end{macrocode} @@ -5965,14 +5968,15 @@ % 造成 \env{survey} 的子目录中 |tocdepth| 为 0。 % \begin{macrocode} \thu@option@hook{toc-depth}{% - \protected@write\@auxout{}{% - \string\ttl@writefile{toc}{% - \protect\setcounter{tocdepth}{\thu@toc@depth}% + \ifx\@begindocumenthook\@undefined + \protected@write\@auxout{}{% + \string\ttl@writefile{toc}{% + \protect\setcounter{tocdepth}{\thu@toc@depth}% + }% }% - }% - \addtocontents{lof}{\string\let\string\contentsline\string\ttl@gobblecontents} - \addtocontents{lot}{\string\let\string\contentsline\string\ttl@gobblecontents} - \addtocontents{loe}{\string\let\string\contentsline\string\ttl@gobblecontents} + \else + \setcounter{tocdepth}{\thu@toc@depth}% + \fi } \g@addto@macro\appendix{% \thusetup{ @@ -5981,6 +5985,36 @@ } % \end{macrocode} % +% 附录中的图、表不列入插图清单/附表清单。 +% \begin{macrocode} +\thu@define@key{ + appendix-figure-in-lof = { + name = appendix@figure@in@lof, + choices = { + true, + false, + }, + default = false, + }, +} +\thu@option@hook{appendix-figure-in-lof}{% + \ifthu@appendix@figure@in@lof@true + \addtocontents{lof}{\string\let\string\contentsline\string\ttl@contentsline}% + \addtocontents{lot}{\string\let\string\contentsline\string\ttl@contentsline}% + \addtocontents{loe}{\string\let\string\contentsline\string\ttl@contentsline}% + \else + \addtocontents{lof}{\string\let\string\contentsline\string\ttl@gobblecontents}% + \addtocontents{lot}{\string\let\string\contentsline\string\ttl@gobblecontents}% + \addtocontents{loe}{\string\let\string\contentsline\string\ttl@gobblecontents}% + \fi +} +\g@addto@macro\appendix{% + \thusetup{ + appendix-figure-in-lof = false, + }% +} +% \end{macrocode} +% % 本科生《写作指南》有独特的要求:附录 A 为外文资料的调研阅读报告或书面翻译, % 并且要分别附上独立的参考文献和外文资料的原文索引。 % 所以这里定义 \env{survey} 和 \env{translation} 专门处理这两种情况, |