summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/thuthesis
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-06-01 03:00:58 +0000
committerNorbert Preining <norbert@preining.info>2021-06-01 03:00:58 +0000
commit0f69e2fd4a9928663f0cc64b8cac1f0d8baee9d6 (patch)
treec9ab8a25ba9f5a5dcfb4bef6a51aa35fe07834cb /macros/latex/contrib/thuthesis
parent098258765e1921f3e57f38e424272587103189dd (diff)
CTAN sync 202106010300
Diffstat (limited to 'macros/latex/contrib/thuthesis')
-rw-r--r--macros/latex/contrib/thuthesis/CHANGELOG.md14
-rw-r--r--macros/latex/contrib/thuthesis/README.md4
-rw-r--r--macros/latex/contrib/thuthesis/data/abstract.tex4
-rw-r--r--macros/latex/contrib/thuthesis/data/appendix-translation.tex2
-rw-r--r--macros/latex/contrib/thuthesis/data/appendix.tex2
-rw-r--r--macros/latex/contrib/thuthesis/data/chap02.tex56
-rw-r--r--macros/latex/contrib/thuthesis/data/chap03.tex2
-rw-r--r--macros/latex/contrib/thuthesis/spine.pdfbin23815 -> 22266 bytes
-rw-r--r--macros/latex/contrib/thuthesis/spine.tex12
-rw-r--r--macros/latex/contrib/thuthesis/thuthesis-example.pdfbin405628 -> 405257 bytes
-rw-r--r--macros/latex/contrib/thuthesis/thuthesis-example.tex11
-rw-r--r--macros/latex/contrib/thuthesis/thuthesis-inline.cbx12
-rw-r--r--macros/latex/contrib/thuthesis/thuthesis.dtx152
-rw-r--r--macros/latex/contrib/thuthesis/thuthesis.pdfbin1144457 -> 1147400 bytes
14 files changed, 164 insertions, 107 deletions
diff --git a/macros/latex/contrib/thuthesis/CHANGELOG.md b/macros/latex/contrib/thuthesis/CHANGELOG.md
index 2532ff0458..d68be6a460 100644
--- a/macros/latex/contrib/thuthesis/CHANGELOG.md
+++ b/macros/latex/contrib/thuthesis/CHANGELOG.md
@@ -6,10 +6,19 @@
## [Unreleased]
+## [v7.2.3] - 2021-05-31
+### Changed
+- 中文模板的公式编号改为中文括号(#297)。
+
+### Fixed
+- 修正硕士论文书脊的字号(#647)。
+- 修正本科生附录(调研和翻译)的目录在 TeX Live 2019 前无法生成的问题(#659)。
+- 修正本科生主要符号表的标题(#661)。
+
## [v7.2.2] - 2021-04-03
### Changed
- 修改授权说明的内容和格式,同 2020 年 12 月版 Word 模板一致(#625)。
-- 去掉参考文献的页码前与冒号之间的空格,同步 2020 年 3 月版《指南》的格式修改(#629)。
+- 参考文献的页码前与冒号之间加上空格,同步 2021 年 3 月版《指南》的格式修改(#629)。
- 著者-出版年制参考文献表的著者姓名与年份之间改为逗号。
### Fixed
@@ -686,7 +695,8 @@
-[Unreleased]: https://github.com/tuna/thuthesis/compare/v7.2.2...HEAD
+[Unreleased]: https://github.com/tuna/thuthesis/compare/v7.2.3...HEAD
+[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
[v7.2.1]: https://github.com/tuna/thuthesis/compare/v7.2.0...v7.2.1
[v7.2.0]: https://github.com/tuna/thuthesis/compare/v7.1.0...v7.2.0
diff --git a/macros/latex/contrib/thuthesis/README.md b/macros/latex/contrib/thuthesis/README.md
index d427df9a14..455b858f95 100644
--- a/macros/latex/contrib/thuthesis/README.md
+++ b/macros/latex/contrib/thuthesis/README.md
@@ -39,7 +39,7 @@ Scroll down for the English version of README.
## 更新日志
-每个版本的详细更新日志,请见 [CHANGELOG.md](blob/master/CHANGELOG.md)。使用文档中也包含了这一内容。
+每个版本的详细更新日志,请见 [CHANGELOG.md](CHANGELOG.md)。使用文档中也包含了这一内容。
## 升级
### 自动更新
@@ -109,7 +109,7 @@ Developer versions contain only source code but no pre-compiled `cls` file and d
## Changelog
-See [CHANGELOG.md](blob/master/CHANGELOG.md) for detailed changes in each release. They are also included in the usage documentation.
+See [CHANGELOG.md](CHANGELOG.md) for detailed changes in each release. They are also included in the usage documentation.
## Updates
### Automatic
diff --git a/macros/latex/contrib/thuthesis/data/abstract.tex b/macros/latex/contrib/thuthesis/data/abstract.tex
index babbca3f46..b76e3756da 100644
--- a/macros/latex/contrib/thuthesis/data/abstract.tex
+++ b/macros/latex/contrib/thuthesis/data/abstract.tex
@@ -22,7 +22,7 @@
\begin{abstract*}
An abstract of a dissertation is a summary and extraction of research work and contributions.
- Included in an abstract should be description of research topic and research objective, brief introduction to methodology and research process, and summarization of conclusion and contributions of the research.
+ Included in an abstract should be description of research topic and research objective, brief introduction to methodology and research process, and summary of conclusion and contributions of the research.
An abstract should be characterized by independence and clarity and carry identical information with the dissertation.
It should be such that the general idea and major contributions of the dissertation are conveyed without reading the dissertation.
@@ -32,7 +32,7 @@
Keywords are terms used in a dissertation for indexing, reflecting core information of the dissertation.
An abstract may contain a maximum of 5 keywords, with semi-colons used in between to separate one another.
- % Use comma as seperator when inputting
+ % Use comma as separator when inputting
\thusetup{
keywords* = {keyword 1, keyword 2, keyword 3, keyword 4, keyword 5},
}
diff --git a/macros/latex/contrib/thuthesis/data/appendix-translation.tex b/macros/latex/contrib/thuthesis/data/appendix-translation.tex
index d272480bf4..812cfcc767 100644
--- a/macros/latex/contrib/thuthesis/data/appendix-translation.tex
+++ b/macros/latex/contrib/thuthesis/data/appendix-translation.tex
@@ -50,7 +50,7 @@
\section{数学公式}
-附录中的数学公式示例(公式~\eqref{eq:appendix-translation-equation})。
+附录中的数学公式示例(公式\eqref{eq:appendix-translation-equation})。
\begin{equation}
\frac{1}{2 \uppi \symup{i}} \int_\gamma f = \sum_{k=1}^m n(\gamma; a_k) \mathscr{R}(f; a_k)
\label{eq:appendix-translation-equation}
diff --git a/macros/latex/contrib/thuthesis/data/appendix.tex b/macros/latex/contrib/thuthesis/data/appendix.tex
index 39ac664248..85b9ea6e55 100644
--- a/macros/latex/contrib/thuthesis/data/appendix.tex
+++ b/macros/latex/contrib/thuthesis/data/appendix.tex
@@ -43,7 +43,7 @@
\section{数学公式}
-附录中的数学公式示例(公式~\eqref{eq:appendix-equation})。
+附录中的数学公式示例(公式\eqref{eq:appendix-equation})。
\begin{equation}
\frac{1}{2 \uppi \symup{i}} \int_\gamma f = \sum_{k=1}^m n(\gamma; a_k) \mathscr{R}(f; a_k)
\label{eq:appendix-equation}
diff --git a/macros/latex/contrib/thuthesis/data/chap02.tex b/macros/latex/contrib/thuthesis/data/chap02.tex
index d084a3ccc2..65630cb5d4 100644
--- a/macros/latex/contrib/thuthesis/data/chap02.tex
+++ b/macros/latex/contrib/thuthesis/data/chap02.tex
@@ -12,13 +12,14 @@
\begin{figure}
\centering
- \includegraphics[width=0.6\linewidth]{example-image-a.pdf}
- \caption{示例图片}
+ \includegraphics[width=0.5\linewidth]{example-image-a.pdf}
+ \caption*{国外的期刊习惯将图表的标题和说明文字写成一段,需要改写为标题只含图表的名称,其他说明文字以注释方式写在图表下方,或者写在正文中。}
+ \caption{示例图片标题}
\label{fig:example}
\end{figure}
若图或表中有附注,采用英文小写字母顺序编号,附注写在图或表的下方。
-% LaTeX 传统上一般将附注的内容同图表的标题写在一起,形成很长的一段文字。
+国外的期刊习惯将图表的标题和说明文字写成一段,需要改写为标题只含图表的名称,其他说明文字以注释方式写在图表下方,或者写在正文中。
如果一个图由两个或两个以上分图组成时,各分图分别以 (a)、(b)、(c)...... 作为图序,并须有分图题。
推荐使用 \pkg{subcaption} 宏包来处理, 比如图~\ref{fig:subfig-a} 和图~\ref{fig:subfig-b}。
@@ -26,9 +27,9 @@
\begin{figure}
\centering
\subcaptionbox{分图 A\label{fig:subfig-a}}
- {\includegraphics[width=0.45\linewidth]{example-image-a.pdf}}
+ {\includegraphics[width=0.35\linewidth]{example-image-a.pdf}}
\subcaptionbox{分图 B\label{fig:subfig-b}}
- {\includegraphics[width=0.45\linewidth]{example-image-b.pdf}}
+ {\includegraphics[width=0.35\linewidth]{example-image-b.pdf}}
\caption{多个分图的示例}
\label{fig:multi-image}
\end{figure}
@@ -50,8 +51,6 @@
thuthesis.dtx & 模板的源文件,包括文档和注释 \\
thuthesis.cls & 模板文件 \\
thuthesis-*.bst & BibTeX 参考文献表样式文件 \\
- thuthesis-*.bbx & BibLaTeX 参考文献表样式文件 \\
- thuthesis-*.cbx & BibLaTeX 引用样式文件 \\
\bottomrule
\end{tabular}
\label{tab:three-line}
@@ -72,8 +71,6 @@
thuthesis.dtx\tnote{a} & 模板的源文件,包括文档和注释 \\
thuthesis.cls\tnote{b} & 模板文件 \\
thuthesis-*.bst & BibTeX 参考文献表样式文件 \\
- thuthesis-*.bbx & BibLaTeX 参考文献表样式文件 \\
- thuthesis-*.cbx & BibLaTeX 引用样式文件 \\
\bottomrule
\end{tabular}
\begin{tablenotes}
@@ -110,36 +107,6 @@
Row 8 & & & \\
Row 9 & & & \\
Row 10 & & & \\
- Row 11 & & & \\
- Row 12 & & & \\
- Row 13 & & & \\
- Row 14 & & & \\
- Row 15 & & & \\
- Row 16 & & & \\
- Row 17 & & & \\
- Row 18 & & & \\
- Row 19 & & & \\
- Row 20 & & & \\
- Row 21 & & & \\
- Row 22 & & & \\
- Row 23 & & & \\
- Row 24 & & & \\
- Row 25 & & & \\
- Row 26 & & & \\
- Row 27 & & & \\
- Row 28 & & & \\
- Row 29 & & & \\
- Row 30 & & & \\
- Row 31 & & & \\
- Row 32 & & & \\
- Row 33 & & & \\
- Row 34 & & & \\
- Row 35 & & & \\
- Row 36 & & & \\
- Row 37 & & & \\
- Row 38 & & & \\
- Row 39 & & & \\
- Row 40 & & & \\
\end{longtable}
@@ -156,17 +123,12 @@
\label{alg1}
\small
\begin{algorithmic}
- \REQUIRE $n \geq 0 \vee x \neq 0$
+ \REQUIRE $n \geq 0$
\ENSURE $y = x^n$
\STATE $y \leftarrow 1$
- \IF{$n < 0$}
- \STATE $X \leftarrow 1 / x$
- \STATE $N \leftarrow -n$
- \ELSE
- \STATE $X \leftarrow x$
- \STATE $N \leftarrow n$
- \ENDIF
+ \STATE $X \leftarrow x$
+ \STATE $N \leftarrow n$
\WHILE{$N \neq 0$}
\IF{$N$ is even}
diff --git a/macros/latex/contrib/thuthesis/data/chap03.tex b/macros/latex/contrib/thuthesis/data/chap03.tex
index 7106685dfe..2efdc1db96 100644
--- a/macros/latex/contrib/thuthesis/data/chap03.tex
+++ b/macros/latex/contrib/thuthesis/data/chap03.tex
@@ -66,7 +66,7 @@
\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)
\label{eq:example}
diff --git a/macros/latex/contrib/thuthesis/spine.pdf b/macros/latex/contrib/thuthesis/spine.pdf
index 17f54571d3..63eef753e0 100644
--- a/macros/latex/contrib/thuthesis/spine.pdf
+++ b/macros/latex/contrib/thuthesis/spine.pdf
Binary files differ
diff --git a/macros/latex/contrib/thuthesis/spine.tex b/macros/latex/contrib/thuthesis/spine.tex
index 4b8badf5d3..54f4d29842 100644
--- a/macros/latex/contrib/thuthesis/spine.tex
+++ b/macros/latex/contrib/thuthesis/spine.tex
@@ -6,16 +6,14 @@
\input{thusetup.tex}
+% \thusetup{
+% spine-font = {\zihao{3}},
+% spine-title = {书脊的标题},
+% spine-author = {书脊的作者姓名},
+% }
\begin{document}
\spine
-\thusetup{
- spine-font = {\Huge},
- spine-title = {书脊的标题},
- spine-author = {书脊的作者姓名},
-}
-\spine
-
\end{document}
diff --git a/macros/latex/contrib/thuthesis/thuthesis-example.pdf b/macros/latex/contrib/thuthesis/thuthesis-example.pdf
index e994bb2e6d..a881f81a4a 100644
--- a/macros/latex/contrib/thuthesis/thuthesis-example.pdf
+++ b/macros/latex/contrib/thuthesis/thuthesis-example.pdf
Binary files differ
diff --git a/macros/latex/contrib/thuthesis/thuthesis-example.tex b/macros/latex/contrib/thuthesis/thuthesis-example.tex
index 1520898b4c..7e6f698ca2 100644
--- a/macros/latex/contrib/thuthesis/thuthesis-example.tex
+++ b/macros/latex/contrib/thuthesis/thuthesis-example.tex
@@ -11,7 +11,7 @@
% chinese(默认)| english
% 字体库 fontset
% windows | mac | fandol | ubuntu
- % 研究生院建议终版使用 Windows 平台的字体编译
+ % 建议终版使用 Windows 平台的字体编译
% 论文基本配置,加载宏包等全局配置
@@ -73,12 +73,13 @@
% 声明
\statement
-% 生成的声明页是否要插入页眉和页脚(默认 empty)
-% 仅在需要进行电子签名时,才需要打开这一选项
-% 插入的扫描声明页总是会生成页眉(研究生)和页脚,不受这一选项影响
-% \statement[page-style=plain]
% 将签字扫描后的声明文件 scan-statement.pdf 替换原始页面
% \statement[file=scan-statement.pdf]
+% 本科生编译生成的声明页默认不加页脚,插入扫描版时再补上;
+% 研究生编译生成时有页眉页脚,插入扫描版时不再重复。
+% 也可以手动控制是否加页眉页脚
+% \statement[page-style=empty]
+% \statement[file=scan-statement.pdf, page-style=plain]
% 个人简历、在学期间完成的相关学术成果
\input{data/resume}
diff --git a/macros/latex/contrib/thuthesis/thuthesis-inline.cbx b/macros/latex/contrib/thuthesis/thuthesis-inline.cbx
index bec04d1d44..d268a5b96a 100644
--- a/macros/latex/contrib/thuthesis/thuthesis-inline.cbx
+++ b/macros/latex/contrib/thuthesis/thuthesis-inline.cbx
@@ -7,6 +7,16 @@
autocite = inline ,
}
+% 修改 \mkbibsuperscript 宏在最后加上一个空白使得 xeCJK 不会自动在引用标签后面加上中英文之间的空白
+\DeclareRobustCommand{\mkbibsuperscriptusp}[1]{%
+ \unspace\allowhyphens\textsuperscript{%
+ \begingroup
+ \protected\long\def\mkbibsuperscriptusp##1{%
+ \blx@warning{Nested superscript}%
+ \mkbibbrackets{##1}}%
+ #1\endgroup}}
+
+% 这里把 gb7714-2015.cbx 中 \parencite 定义借鉴过来
\DeclareCiteCommand{\cite}%[\mkbibbrackets]
{[\usebibmacro{cite:init}%]
\usebibmacro{prenote}}%
@@ -15,4 +25,4 @@
{}
{%[
\usebibmacro{cite:dump}]%
- \mkbibsuperscript{\printfield{postnote}}}
+ \mkbibsuperscriptusp{\printfield{postnote}}}
diff --git a/macros/latex/contrib/thuthesis/thuthesis.dtx b/macros/latex/contrib/thuthesis/thuthesis.dtx
index 2a9e07f9b4..3233b5e580 100644
--- a/macros/latex/contrib/thuthesis/thuthesis.dtx
+++ b/macros/latex/contrib/thuthesis/thuthesis.dtx
@@ -14,7 +14,7 @@
%
% \iffalse
%<*driver>
-\ProvidesFile{thuthesis.dtx}[2021/04/03 7.2.2 Tsinghua University Thesis Template]
+\ProvidesFile{thuthesis.dtx}[2021/05/31 7.2.3 Tsinghua University Thesis Template]
\documentclass{ltxdoc}
\usepackage{dtx-style}
@@ -344,12 +344,13 @@
% Courier & Menlo & TeX Gyre Cursor & TeX Gyre Cursor \\
% 中易宋体 & 华文宋体 & 思源宋体 & Fandol 宋体 \\
% 中易黑体 & 华文黑体 & 思源黑体 & Fandol 黑体 \\
+% 中易仿宋 & 华文仿宋 & Fandol 仿宋 & Fandol 仿宋 \\
% \bottomrule
% \end{tabular}
% \end{table}
%
-% 需要注意,研究生院建议中文字体同 Word 模板一致。
-% 也就是说,用户在提交终版前应使用 Windows 平台的字体进行编译。
+% 需要注意,建议用户在提交终版前使用 Windows 平台的字体进行编译。
+% 这样中文字体同 Word 模板一致。
%
% 关于字体的配置,
% 详见 \pkg{fontspec}、\pkg{xeCJK}、\pkg{ctex} 等宏包的使用说明和代码。
@@ -806,7 +807,7 @@
% 积分号上下限的位置,可选:\option{true}(在上下)、\option{false}(在右侧)。
% 这个设置只影响行间公式,行内公式统一居右侧,不受影响。
% \item \DescribeOption{partial}
-% 偏微分符号的正/斜体,可选:\option{upright}、\option{slanted}。
+% 偏微分符号的正/斜体,可选:\option{upright}、\option{italic}。
% \item \DescribeOption{math-ellipsis}
% 省略号 \cs{dots} 的样式,可选:\option{centered}(按照中文的习惯固定居中)、
% \option{lower} 和 \option{AMS}(取决于前后符号的位置)。
@@ -997,7 +998,7 @@
% 参考文献表采用“著者-出版年”制组织时,各篇文献首先按文种集中,然后按著者字
% 顺和出版年排列;中文文献可以按著者汉语拼音字顺排列,也可以按著者的笔画笔顺排列。
% 但由于 \hologo{BibTeX} 功能的局限性,无法自动获取著者姓名的拼音或笔画笔顺进行正确排序。
-% 一种解放方法是在 \file{.bib} 数据库的中文文献的 |key| 域手动录入著者姓名的拼音,
+% 一种解决方法是在 \file{.bib} 数据库的中文文献的 |key| 域手动录入著者姓名的拼音,
% 这比较适合中文文献数量较少的情况,如:
% \begin{latex}
% @book{capital,
@@ -1006,7 +1007,7 @@
% ...
% }
% \end{latex}
-% 另一种方式是使用 biblatex,应在在导言区设置
+% 另一种方式是使用 biblatex,应在导言区设置
% \begin{latex}
% \usepackage[backend=biber,style=thuthesis-author-year]{biblatex}
% \addbibresource{ref/refs.bib}
@@ -1075,18 +1076,21 @@
% \statement[file=scan-statement.pdf]
% \end{latex}
%
-% 由于本科生打印版和电子版有空白页的差别,声明的页码可能不同。
-% 所以编译声明页时默认不加页脚(\texttt{page-style=empty}),
-% 在签字后插入扫描页时再补上页脚,防止页码冲突。
+% 由于本科生的打印版和电子版有空白页的差别,声明的页码可能不同。
+% 所以编译生成声明页时默认不加页脚(\option{empty}),
+% 在签字后插入扫描页时再补上页脚(\option{plain}),防止页码冲突。
+% 研究生不存在空白页的问题,在编译生成声明时默认加页眉页脚(\option{plain}),
+% 而插入扫描版时不再重复(\option{empty})。
%
-% 如果需要编译时也加页码(如直接对电子版进行签名而不是插入扫描页),
-% 可以使用在 \cs{statement} 命令设置
+% 声明的页眉页脚也可以通过 \option{pagestyle} 参数手动控制,
+% 比如编译生成时固定不加页眉页脚:
% \begin{latex}
% \statement[page-style=plain]
% \end{latex}
-% 注意,本科生插入扫描页时总是会加页码,不受该选项控制。
-%
-% 研究生不存在空白页的问题,但是为了灵活性也允许用户选择是否添加页眉和页脚。
+% 插入扫面版声明补上页眉页脚:
+% \begin{latex}
+% \statement[file=scan-statement.pdf, page-style=plain]
+% \end{latex}
%
% \subsubsection{附录}
%
@@ -1149,7 +1153,7 @@
%
% \subsubsection{个人简历、在学期间完成的相关学术成果}
% \DescribeEnv{resume}
-% 研究生的标题为为“个人简历、在学期间完成的相关学术成果”,
+% 研究生的标题为“个人简历、在学期间完成的相关学术成果”,
% 本科生的标题为“在学期间参加课题的研究成果”或“PUBLICATIONS”。
%
% \DescribeEnv{achievements}
@@ -1194,11 +1198,11 @@
% 生成装订的书脊,为竖排格式。内容默认使用论文的标题和作者。
% 可以设置 \option{spine-title} 和 \option{spine-author} 来修改。
%
-% 书脊字体默认为三号字,同研究生的示例一致。
+% 博士论文的书脊字体默认为三号字,硕士的为小三号。
% 本科生要求字体大小根据论文的薄厚而定,可以使用 \option{spine-font} 设置字号。
% \begin{latex}
% \thusetup{
-% spine-font = {\Huge},
+% spine-font = {\zihao{3}},
% spine-title = {书脊的标题},
% spine-author = {书脊的作者姓名},
% }
@@ -1246,7 +1250,7 @@
% \begin{macrocode}
%<cls>\NeedsTeXFormat{LaTeX2e}[2017/04/15]
%<cls>\ProvidesClass{thuthesis}
-%<cls>[2021/04/03 7.2.2 Tsinghua University Thesis Template]
+%<cls>[2021/05/31 7.2.3 Tsinghua University Thesis Template]
% \end{macrocode}
%
% 报错
@@ -1302,7 +1306,7 @@
%<*cls>
\hyphenation{Thu-Thesis}
\def\thuthesis{ThuThesis}
-\def\version{7.2.2}
+\def\version{7.2.3}
\RequirePackage{kvdefinekeys}
\RequirePackage{kvsetkeys}
\RequirePackage{kvoptions}
@@ -1936,7 +1940,7 @@
\def\thu@list@algorithm@name{算法索引}%
\def\thu@acknowledgements@name{致\qquad 谢}%
\def\listequationname{公式索引}%
- \def\thu@denotation@name{主要符号对照表}%
+ \def\thu@denotation@name{主要符号表}%
\def\thu@resume@name{在学期间参加课题的研究成果}%
\else
\def\listfigurename{插图清单}%
@@ -2223,17 +2227,29 @@
% 但是在 Linux 下没有这两个字体,所以使用它们的克隆版 TeX Gyre Termes 和
% TeX Gyre Heros。
% \begin{macrocode}
-\ifthu@font@auto
- \ifthu@fontset@windows
- \thusetup{font=times}
- \else
- \ifthu@fontset@mac
- \thusetup{font=times}
+\newcommand\thu@set@font{%
+ \@nameuse{thu@set@font@\thu@font}%
+}
+\thu@option@hook{font}{\thu@set@font}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newcommand\thu@set@font@auto{%
+ \ifthu@font@auto
+ \ifthu@fontset@windows
+ \thusetup{font=times}%
\else
- \thusetup{font=termes}
+ \ifthu@fontset@mac
+ \thusetup{font=times}%
+ \else
+ \thusetup{font=termes}%
+ \fi
\fi
\fi
-\fi
+}
+\thu@option@hook{math-font}{\g@addto@macro\thu@setup@hook{\thu@set@font@auto}}
+\AtBeginOfPackageFile*{siunitx}{\thu@set@font@auto}
+\AtEndPreamble{\thu@set@font@auto}
% \end{macrocode}
%
% Times New Roman + Arial
@@ -2452,14 +2468,13 @@
BoldItalicFont = *-boldoblique,
]%
}
+% \end{macrocode}
+%
+% NewTX
+% \begin{macrocode}
\newcommand\thu@set@font@newtx{%
\RequirePackage{newtxtext}%
}
-\newcommand\thu@set@font{%
- \@nameuse{thu@set@font@\thu@font}%
-}
-\thu@set@font
-\thu@option@hook{font}{\thu@set@font}
% \end{macrocode}
%
% \subsubsection{中文字体}
@@ -2993,6 +3008,7 @@
\fi
\DeclareRobustCommand\symup[1]{{\mathrm{##1}}}%
\DeclareRobustCommand\symbf[1]{{\bm{##1}}}%
+ \DeclareRobustCommand\symbfsf[1]{{\bm{\mathsf{##1}}}}%
\let\increment\upDelta%
\renewcommand\thu@qed{\openbox}%
}
@@ -3317,6 +3333,34 @@
%
% 公式距前后文的距离由 4 个参数控制,参见 \cs{normalsize} 的定义。
%
+% 中文模板的公式编号使用中文括号。需要修改 \pkg{amsmath} 的 \cs{tagform@}。
+% 这里中文的 \cs{unskip} 是为了“|式~\eqref|”这样的写法不产生额外的空格。
+% \begin{macrocode}
+\newcommand\thu@put@parentheses[1]{%
+ \ifthu@language@chinese
+ \unskip
+ (#1)%
+ \else
+ (#1)%
+ \fi
+}
+% \def\tagform@#1{\maketag@@@{(\ignorespaces#1\unskip\@@italiccorr)}}
+\def\tagform@#1{\maketag@@@{\thu@put@parentheses{\ignorespaces#1\unskip\@@italiccorr}}}
+% \end{macrocode}
+%
+% 重定义 \cs{eqref},去掉原来的的 \cs{tagform@} 中 \cs{maketag@@@} 的 \cs{hbox} 和
+% \cs{m@th},防止中文左括号与前面文字的距离过窄。
+% \begin{macrocode}
+% \newcommand{\eqref}[1]{\textup{\tagform@{\ref{#1}}}}
+\renewcommand{\eqref}[1]{%
+ \textup{%
+ \normalfont\thu@put@parentheses{%
+ \ignorespaces\ref{#1}\unskip\@@italiccorr
+ }%
+ }%
+}
+% \end{macrocode}
+%
% \subsubsection{浮动对象:插图和表格}
% \label{sec:float}
%
@@ -5038,7 +5082,7 @@
% \subsubsection{主要符号表}
% \label{sec:denotationfmt}
% \begin{environment}{denotation}
-% 主要符号对照表。
+% 主要符号表。
% \begin{macrocode}
\newenvironment{denotation}[1][2.5cm]{%
\ifthu@degree@bachelor
@@ -5355,7 +5399,6 @@
\@namedef{bibstyle@thuthesis-numeric}{\citestyle{super}}
\@namedef{bibstyle@thuthesis-author-year}{\citestyle{author-year}}
\@namedef{bibstyle@thuthesis-bachelor}{\citestyle{super}}
- \@namedef{bibstyle@thuthesis-inline}{\citestyle{inline}}
% \end{macrocode}
%
% 修改引用的样式。
@@ -5793,6 +5836,20 @@
% 所以这里定义 \env{survey} 和 \env{translation} 专门处理这两种情况,
% 其中参考文献使用了 \pkg{bibunits} 宏包的功能。
%
+% 注意 \pkg{titletoc} 在 2019/07/14 v2.11.1702 修改了 \cs{printcontents} 接口,
+% 而且 \cs{@ifpackagelater} 只能用在导言区中,所以需要定义辅助宏。
+% \begin{macrocode}
+\@ifpackagelater{titletoc}{2019/07/14}{
+ \newcommand\thu@print@contents[5]{%
+ \printcontents[#1]{#2}{#3}[#4]{}%
+ }
+}{
+ \newcommand\thu@print@contents[5]{%
+ \printcontents[#1]{#2}{#3}{\setcounter{tocdepth}{#4}#5}%
+ }
+}
+% \end{macrocode}
+%
% \begin{environment}{survey}
% 外文资料的调研阅读报告。
% \begin{macrocode}
@@ -5805,7 +5862,7 @@
\renewcommand\tableofcontents{%
\section*{Contents}%
\thu@pdfbookmark{1}{Contents}%
- \printcontents[survey]{l}{1}[2]{}%
+ \thu@print@contents{survey}{l}{1}{2}{}%
\vskip 20bp%
}%
\renewcommand\bibname{参考文献}%
@@ -5831,11 +5888,23 @@
\thusetup{language = chinese}%
\let\title\thu@appendix@title
\let\maketitle\thu@appendix@maketitle
+ \renewenvironment{abstract}{%
+ \ctexset{
+ section = {
+ format += \centering,
+ numbering = false,
+ },
+ }%
+ \section{摘要}%
+ \quotation
+ }{%
+ \endquotation
+ }%
\thu@set@partial@toc@format
\renewcommand\tableofcontents{%
\section*{目录}%
\thu@pdfbookmark{1}{目录}%
- \printcontents[translation]{l}{1}[2]{}%
+ \thu@print@contents{translation}{l}{1}{2}{}%
\vskip 20bp%
}%
\def\bibsection{%
@@ -6310,12 +6379,12 @@
% 书脊上方写论文题目,下方写本科生姓名,距上下页边均为 3cm。
%
% 研究生:
+% 博士论文的书脊使用三号字,硕士的为小三号。
% 示例中上下页边距为 5.5 cm,左右边距为 1 cm。
% \begin{macrocode}
\thu@define@key{
spine-font = {
name = spine@font,
- default = {\sanhao},
},
spine-title = {
name = spine@title,
@@ -6324,6 +6393,13 @@
name = spine@author,
},
}
+\renewcommand\thu@spine@font{%
+ \ifthu@degree@doctor
+ \fontsize{16bp}{20.8bp}\selectfont
+ \else
+ \fontsize{15bp}{19.5bp}\selectfont
+ \fi
+}
\newcommand*\CJKmovesymbol[1]{\raise.3em\hbox{#1}}
\newcommand*\CJKmove{%
\punctstyle{plain}%
diff --git a/macros/latex/contrib/thuthesis/thuthesis.pdf b/macros/latex/contrib/thuthesis/thuthesis.pdf
index ff10a7f10f..6925a82705 100644
--- a/macros/latex/contrib/thuthesis/thuthesis.pdf
+++ b/macros/latex/contrib/thuthesis/thuthesis.pdf
Binary files differ