summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/thuthesis/thuthesis.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/thuthesis/thuthesis.dtx')
-rw-r--r--macros/latex/contrib/thuthesis/thuthesis.dtx58
1 files changed, 36 insertions, 22 deletions
diff --git a/macros/latex/contrib/thuthesis/thuthesis.dtx b/macros/latex/contrib/thuthesis/thuthesis.dtx
index fe1a16b6fa..f96a2d4b72 100644
--- a/macros/latex/contrib/thuthesis/thuthesis.dtx
+++ b/macros/latex/contrib/thuthesis/thuthesis.dtx
@@ -17,7 +17,7 @@
%
% \iffalse
%<*driver>
-\ProvidesFile{thuthesis.dtx}[2020/06/14 6.1.2 Tsinghua University Thesis Template]
+\ProvidesFile{thuthesis.dtx}[2020/07/09 6.1.3 Tsinghua University Thesis Template]
\documentclass{ltxdoc}
\usepackage{dtx-style}
@@ -798,15 +798,15 @@
% 也可以使用 \cs{inlinecite}\marg{key} 临时使用正文模式的引用标注。
%
% \paragraph{著者-出版年制}
-% 著者-出版年制的参考文献引用有三种模式:
+% 著者-出版年制的参考文献引用有两种模式:
% \begin{enumerate}
% \item \cs{citep}:著者与年份均在括号中,比如“(Zhang, 2008)”,
% 同默认的 \cs{cite} 命令;
% \item \cs{citet}:著者姓名作为正文的一部分,比如“Zhang (2008)”;
-% \item \cs{citeyear}:只插入年份,但不含括号,比如“2008”。
% \end{enumerate}
%
-% 关于参考文献引用的更多细节参考 \pkg{natbib} 的文档。
+% 另外还有 \cs{citeauthor}、\cs{citeyear} 等命令分别标注文献的著者姓名和年份,
+% 更多的引用文献标注法参考 \pkg{natbib} 的文档。
%
% \subsection{其他部分}
%
@@ -877,14 +877,15 @@
% \statement[scan-statement.pdf]
% \end{latex}
%
-% 由于打印版和电子版有空白页的差别,声明的页码可能不同。所以编译声明页时默认不加页码,
-% 在签字后插入扫描页时再补上页码,防止页码冲突。
+% 由于打印版和电子版有空白页的差别,声明的页码可能不同。
+% 所以编译声明页时默认不加页眉和页脚,
+% 在签字后插入扫描页时再补上页眉和页脚,防止页码冲突。
%
-% \DescribeOption{statement-page-number}
+% \DescribeOption{statement-page-style}
% 如果需要编译时也加页码(如直接对电子版进行签名而不是插入扫描页),可以使用在 \cs{statement} 前设置
% \begin{latex}
% \thusetup{
-% statement-page-number = true,
+% statement-page-style = plain,
% }
% \end{latex}
% 注意,插入扫描页总是会加页码,不受该选项控制。
@@ -1082,7 +1083,7 @@
% \begin{macrocode}
%<cls>\NeedsTeXFormat{LaTeX2e}[2017/04/15]
%<cls>\ProvidesClass{thuthesis}
-%<cls>[2020/06/14 6.1.2 Tsinghua University Thesis Template]
+%<cls>[2020/07/09 6.1.3 Tsinghua University Thesis Template]
% \end{macrocode}
%
% 报错
@@ -1090,6 +1091,9 @@
\newcommand\thu@error[1]{%
\ClassError{thuthesis}{#1}{}%
}
+\newcommand\thu@warning[1]{%
+ \ClassWarning{thuthesis}{#1}%
+}
% \end{macrocode}
%
% 检查 \LaTeXe{} kernel 版本
@@ -1116,7 +1120,7 @@
%<*cls>
\hyphenation{Thu-Thesis}
\def\thuthesis{ThuThesis}
-\def\version{6.1.2}
+\def\version{6.1.3}
\RequirePackage{kvdefinekeys}
\RequirePackage{kvsetkeys}
\RequirePackage{kvoptions}
@@ -1779,6 +1783,7 @@
BoldFont = *-bold,
ItalicFont = *-italic,
BoldItalicFont = *-bolditalic,
+ Ligatures = CommonOff,
]%
}
\newcommand\thu@load@font@xits{%
@@ -2141,7 +2146,7 @@
% \begin{macrocode}
\let\thu@main@language\thu@language
\thu@option@hook{language}{%
- \ifx\@begindocumenthook\@undefined
+ \ifx\@begindocumenthook\@undefined\else
\let\thu@main@language\thu@language
\fi
}
@@ -2203,7 +2208,7 @@
\thu@set@chapter@names
\thu@option@hook{degree}{\thu@set@chapter@names}
\thu@option@hook{language}{%
- \ifx\@begindocumenthook\@undefined
+ \ifx\@begindocumenthook\@undefined\else
\thu@set@chapter@names
\fi
}
@@ -2341,13 +2346,6 @@
\pagestyle{plain}
% \end{macrocode}
%
-% 用于声明页,不含页脚。
-% \begin{macrocode}
-\fancypagestyle{nofooter}{%
- \fancyfoot{}%
-}
-% \end{macrocode}
-%
% \cs{chapter} 会调用特殊的 page style。
% \begin{macrocode}
\ctexset{chapter/pagestyle = plain}
@@ -3823,6 +3821,14 @@
% 声明部分(支持扫描文件替换)
% \begin{macrocode}
\thu@define@key{
+ statement-page-style = {
+ name = statement@page@style,
+ choices = {
+ empty,
+ plain,
+ },
+ default = empty,
+ },
statement-page-number = {
name = statement@page@number,
choices = {
@@ -3832,6 +3838,12 @@
default = false,
},
}
+\thu@option@hook{statement-page-number}{%
+ \thu@warning{%
+ The "statement-page-number" option is deprecated.
+ Use "statement-page-style" instead%
+ }%
+}
\newcommand\statement[1][]{%
\ifthu@degree@bachelor
\cleardoublepage
@@ -3840,7 +3852,7 @@
\ifx\thu@@tmp\@empty
\thu@chapter*{\thu@statement@name}%
\ifthu@statement@page@number@false
- \thispagestyle{nofooter}%
+ \thispagestyle{\thu@statement@page@style}%
\fi
\thu@statement@text\par
\ifthu@degree@graduate
@@ -3852,6 +3864,7 @@
\thu@backdate\thu@underline[2.5cm]\relax}%
\else
\includepdf[pagecommand={%
+ \markboth{\thu@statement@name}{}%
\thu@phantomsection
\addcontentsline{toc}{chapter}{\thu@statement@name}%
}]{#1}%
@@ -4273,7 +4286,7 @@
%
% \begin{macrocode}
\newcommand{\record}[1]{%
- \clearpage
+ \cleardoublepage
\thu@pdfbookmark{0}{综合论文训练记录表}%
\includepdf[pages=-]{#1}%
}
@@ -4675,7 +4688,7 @@
\RequirePackage{fontspec}[2017/01/20]
\RequirePackage{amsmath}
\RequirePackage{unicode-math}
-\RequirePackage[UTF8,scheme=chinese]{ctex}
+\RequirePackage[UTF8,scheme=chinese,fontset=fandol]{ctex}
\RequirePackage[
top=2.5cm, bottom=2.5cm,
left=4cm, right=2cm,
@@ -4732,6 +4745,7 @@
ItalicFont = *-italic,
BoldItalicFont = *-bolditalic,
Scale = MatchLowercase,
+ Ligatures = CommonOff,
]{texgyrecursor}
}
\unimathsetup{