summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx')
-rw-r--r--Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx833
1 files changed, 467 insertions, 366 deletions
diff --git a/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx b/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx
index b52c7ea8510..84c320323cf 100644
--- a/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx
+++ b/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx
@@ -17,7 +17,7 @@
%
% \iffalse
%<*driver>
-\ProvidesFile{thuthesis.dtx}[2020/09/09 7.0.0 Tsinghua University Thesis Template]
+\ProvidesFile{thuthesis.dtx}[2020/10/14 7.1.0 Tsinghua University Thesis Template]
\documentclass{ltxdoc}
\usepackage{dtx-style}
@@ -75,17 +75,14 @@
% \item 本模板的发布遵守 \href{https://www.latex-project.org/lppl/lppl-1-3c.txt}{\LaTeX{} Project Public License (1.3.c)},使用前请认真阅读协议内
% 容。
% \item 本模板为作者根据
-% 清华大学教务处颁发的
-% \href{http://www.law.tsinghua.edu.cn/publish/law/7024/2012/20120216153516317135347/20120216153516317135347_.html}{《综合论文训练写作指南》},
% 清华大学研究生院颁发的
-% \href{http://yjsy.cic.tsinghua.edu.cn/docinfo/board/boarddetail.jsp?columnId=001050603&parentColumnId=0010506&itemSeq=5365}{《研究生学位论文写作指南》},
+% \href{http://yjsy.cic.tsinghua.edu.cn/docinfo/board/boarddetail.jsp?columnId=001050603&parentColumnId=0010506&itemSeq=5365}{%
+% 《研究生学位论文写作指南》}(仅限校内网络访问)、
+% 清华大学教务处颁发的《综合论文训练写作指南》和
% 清华大学
% \href{http://postdoctor.tsinghua.edu.cn/info/czxz/1283}{%
% 《编写“清华大学博士后研究报告”参考意见》}
% 编写而成,旨在供清华大学毕业生撰写学位论文使用。
-% \item 清华大学教务处和研究生院只提供毕业论文写作指南,不提供官方模板,也不会授
-% 权第三方模板为官方模板,所以此模板仅为写作指南的参考实现,不保证格式审查老师
-% 不提意见。任何由于使用本模板而引起的论文格式审查问题均与本模板作者无关。
% \item 任何个人或组织以本模板为基础进行修改、扩展而生成的新的专用模板,请严格遵
% 守 \LaTeX{} Project Public License 协议。由于违犯协议而引起的任何纠纷争端均与
% 本模板作者无关。
@@ -167,9 +164,9 @@
% thuthesis.ins & \textsc{DocStrip} 驱动文件(开发用) \\
% thuthesis.dtx & \textsc{DocStrip} 源文件(开发用)\\\midrule
% thuthesis.cls & 模板类文件\\
-% thuthesis-numeric.bst & 参考文献样式文件\\
-% thuthesis-author-year.bst & 参考文献样式文件\\
-% thuthesis-bachelor.bst & 参考文献样式文件\\
+% thuthesis-*.bst & \hologo{BibTeX} 参考文献表样式文件\\
+% thuthesis-*.bbx & BibLaTeX 参考文献表样式文件\\
+% thuthesis-*.cbx & BibLaTeX 参考文献引用样式文件\\
% tsinghua-name-bachelor.pdf & 校名 logo,本科生封面使用 \\\midrule
% thuthesis-example.tex & 示例文档主文件\\
% spine.tex & 书脊示例文档\\
@@ -245,20 +242,20 @@
%
% 首先,更新模板:
% \begin{shell}
-% $ xetex thuthesis.ins # 生成 thuthesis.cls
+% $ xetex thuthesis.ins # 生成 thuthesis.cls
% \end{shell}
%
% 然后,生成论文以及书脊:
% \begin{shell}
% $ xelatex thuthesis-example.tex
-% $ bibtex thuthesis-example.aux # 生成 bbl 文件
-% $ bibtex thuthesis-example-survey.aux # 本科生的调研报告的参考文献
-% $ bibtex thuthesis-example-translation.aux # 本科生的外文资料翻译的参考文献
-% $ bibtex thuthesis-example-index.aux # 本科生的书面翻译对应的原文索引
-% $ xelatex thuthesis-example.tex # 解决引用
-% $ xelatex thuthesis-example.tex # 生成论文 PDF
-%
-% $ xelatex spine.tex # 生成书脊 PDF
+% $ bibtex thuthesis-example.aux # 生成 bbl 文件
+% $ bibtex thuthesis-example-survey.aux # 本科生的调研报告的参考文献
+% $ bibtex thuthesis-example-translation.aux # 本科生的外文资料翻译的参考文献
+% $ bibtex thuthesis-example-index.aux # 本科生的书面翻译对应的原文索引
+% $ xelatex thuthesis-example.tex # 解决引用
+% $ xelatex thuthesis-example.tex # 生成论文 PDF
+%
+% $ xelatex spine.tex # 生成书脊 PDF
% \end{shell}
%
% 在调用 \XeLaTeX 时,如果设置了 \option{include-spine} 选项,
@@ -290,20 +287,14 @@
% \subsection{示例文件}
% \label{sec:userguide}
%
-% 模板核心文件
-% 有:\file{thuthesis.cls},\file{thuthesis-numeric.bst},
-% \file{thuthesis-author-year.bst} 和 \file{tsinghua-name-bachelor.pdf},
+% 模板核心文件有:\file{thuthesis.cls},\file{tsinghua-name-bachelor.pdf},
+% \file{thuthesis-*.bst}(\hologo{BibTeX}),
+% \file{thuthesis-*.bbx} 和 \file{thuthesis-*.cbx}(BibLaTeX),
% 但如果没有示例文档会较难下手,所以推荐从模板自带的示例文档入手。其中包括了论文
% 写作用到的所有命令及其使用方法,只需用自己的内容进行相应替换就可以。对于不清
% 楚的命令可以查阅本手册。下面的例子描述了模板中章节的组织形式,来自于示例文档,
% 具体内容可以参考模板附带的 \file{thuthesis-example.tex} 和 \file{data/}。
%
-% \lstinputlisting[style=lstStyleLaTeX]{thuthesis-example.tex}
-%
-% 其中 \file{thusetup.tex} 包括了论文基本信息的配置样例:
-%
-% \lstinputlisting[style=lstStyleLaTeX]{thusetup.tex}
-%
% \subsection{论文选项}
% \label{sec:option}
%
@@ -739,9 +730,7 @@
%
% \subsubsection{数学符号}
% \label{sec:math}
-% 数学符号应遵循 GB/T 3102.11-1993《物理科学和技术中使用的数学符号》
-% \footnote{原 GB 3102.11-1993,根据2017年第7号公告和强制性标准整合精简结论,
-% 自2017年3月23日起,该标准转化为推荐性标准。},
+% 数学符号应遵循 GB/T 3102.11—1993《物理科学和技术中使用的数学符号》
% 模板中使用 \pkg{unicode-math} 宏包来配置数学符号,
% 与 \LaTeX{} 默认的英美国家的符号习惯有所差异:
% \newcommand\dif{\mathop{}\!\mathrm{d}}
@@ -876,7 +865,7 @@
% Biblatex 运行较缓慢,无法对多个参考文献表使用不同样式。
% 用户需要根据实际选择合适的方式。
%
-% 研究生要求的参考文献格式基于《信息与文献 参考文献著录规则》(GB/T 7714-2015)
+% 研究生要求的参考文献格式基于《信息与文献 参考文献著录规则》(GB/T 7714—2015)
% 进行了少量改编(如英文姓名不使用全大写),
% 可以选择“顺序编码制”和“著者-出版年制”。
% 如果使用 BibTeX 的方式,需要在导言区载入 \pkg{natbib} 宏包并选择样式,如:
@@ -918,7 +907,7 @@
% 而且 \cs{addbibresource} 必须在导言区设置。
% 输出参考文献表应使用 \cs{printbibliography} 命令。
%
-% 本科生要求的中文参考文献格式严格遵从 GB/T 7714-2015,
+% 本科生要求的中文参考文献格式严格遵从 GB/T 7714—2015,
% 附录中调研报告的英文参考文献可以自行选择合适的风格。
% 但是 biblatex 不支持同一文档中使用不同的格式,
% 所以只能使用 \hologo{BibTeX}:
@@ -1045,71 +1034,36 @@
% \end{translation}
% \end{latex}
%
-% \subsubsection{简历}
+% \subsubsection{个人简历、在学期间完成的相关学术成果}
% \DescribeEnv{resume}
-% 开启个人简历章节,包括个人简历,发表文章,研究成果列表等。每个子项目请
-% 用以下对应命令开启:\cs{xxxitem}\marg{subtitle}。
-%
-% \DescribeMacro{\resumeitem}
-% 个人简历,用法:\cs{resumeitem}\{个人简历\}。简历内容部分没有格式要求,正常段
-% 落排版。
+% 研究生的标题为为“个人简历、在学期间完成的相关学术成果”,
+% 本科生的标题为“在学期间参加课题的研究成果”或“PUBLICATIONS”。
%
-% \DescribeMacro{\researchitem}
-% 发表学术论文,用法:\cs{researchitem}\marg{类别},包括“学术论文”和“研究成果”两
-% 个类别。分别用 \env{publications} 和 \env{achievements} 罗列。
-%
-% \DescribeEnv{publications}
-% \DescribeMacro{\publicationskip}
-% 用 \env{publications} 环境进行罗列发表的论文。按照学校要求,在学期间发表的学术
-% 论文分以下三部分按顺序分别列出,每部分之间空 1 行,序号可连续排列:
-% \begin{enumerate}
-% \item 已经刊载的学术论文(本人是第一作者,或者导师为第一作者本人是第二作者)
-% \item 尚未刊载,但已经接到正式录用函的学术论文(本人为第一作者,或者导师为第一
-% 作者本人是第二作者)。
-% \item 其他学术论文。可列出除上述两种情况以外的其他学术论文,但必须是已经刊载或
-% 者收到正式录用函的论文。
-% \end{enumerate}
+% \DescribeEnv{achievements}
+% 本章的其他标题同样使用 \cs{section*},\cs{subsection*} 等命令生成,
+% 研究成果用 \env{achievements} 环境罗列。
%
-% \env{publications} 环境支持每一部分分别编写,逻辑上更清楚,为了在环境之间支持
-% 空行,需要利用 \cs{publicationskip} 控制。示例:
% \begin{latex}
-% \researchitem{发表的学术论文}
-%
-% % 1. 已经刊载的学术论文
-% \begin{publications}
-% \item Yang Y, Ren T L, Zhang L T, et al. Miniature microphone with
-% silicon-based ferroelectric thin films. Integrated Ferroelectrics,
-% 2003, 52:229-235. (SCI 收录, 检索号:758FZ.)
-% \item 杨轶, 张宁欣, 任天令, 等. 硅基铁电微声学器件中薄膜残余应力的研究. 中国机
-% 械工程, 2005, 16(14):1289-1291. (EI 收录, 检索号:0534931 2907.)
-% \item 杨轶, 张宁欣, 任天令, 等. 集成铁电器件中的关键工艺研究. 仪器仪表学报,
-% 2003, 24(S4):192-193. (EI 源刊.)
-% \end{publications}
-%
-% % 2. 尚未刊载,但已经接到正式录用函的学术论文
-% \begin{publications}[before*=\publicationskip,after*=\publicationskip]
-% \item Yang Y, Ren T L, Zhu Y P, et al. PMUTs for handwriting
-% recognition. In press. (已被 Integrated Ferroelectrics 录用. SCI 源刊.)
-% \end{publications}
-%
-% % 3. 其他学术论文。
-% \begin{publications}
-% \item Wu X M, Yang Y, Cai J, et al. Measurements of ferroelectric
-% MEMS microphones. Integrated Ferroelectrics, 2005, 69:417-429.
-% (SCI 收录, 检索号:896KM)
-% \item 贾泽, 杨轶, 陈兢, 等. 用于压电和电容微麦克风的体硅腐蚀相关研究. 压电与声
-% 光, 2006, 28(1):117-119. (EI 收录, 检索号:06129773469)
-% \item 伍晓明, 杨轶, 张宁欣, 等. 基于MEMS技术的集成铁电硅微麦克风. 中国集成电路,
-% 2003, 53:59-61.
-% \end{publications}
+% \begin{resume}
+% \section*{个人简历}
+% ……
+%
+% \section*{在学期间完成的相关学术成果}
+%
+% \subsection*{学术论文}
+% \begin{achievements}
+% \item ……
+% \item ……
+% \end{achievements}
+%
+% \subsection*{专利}
+% \begin{achievements}
+% \item ……
+% \item ……
+% \end{achievements}
+% \end{resume}
% \end{latex}
%
-% \DescribeEnv{achievements}
-% 研究成果用 \cs{researchitem}\{研究成果\} 开启,随后用 \env{achievements} 环
-% 境罗列。
-%
-% 具体用法请参看示例文档 \file{data/resume.tex}。
-%
% \subsubsection{综合论文训练记录表}
% \DescribeMacro{\record}
% 本科生需要在最后附上综合论文训练记录表,可以用如下命令:
@@ -1179,7 +1133,7 @@
% \begin{macrocode}
%<cls>\NeedsTeXFormat{LaTeX2e}[2017/04/15]
%<cls>\ProvidesClass{thuthesis}
-%<cls>[2020/09/09 7.0.0 Tsinghua University Thesis Template]
+%<cls>[2020/10/14 7.1.0 Tsinghua University Thesis Template]
% \end{macrocode}
%
% 报错
@@ -1193,6 +1147,15 @@
\newcommand\thu@patch@error[1]{%
\thu@error{Failed to patch command \protect#1}%
}
+\newcommand\thu@deprecate[2]{%
+ \def\thu@@tmp{#2}%
+ \thu@warning{%
+ The #1 is deprecated%
+ \ifx\thu@@tmp\@empty\else
+ . Use #2 instead%
+ \fi
+ }%
+}
% \end{macrocode}
%
% 检查 \LaTeXe{} kernel 版本
@@ -1226,7 +1189,7 @@
%<*cls>
\hyphenation{Thu-Thesis}
\def\thuthesis{ThuThesis}
-\def\version{7.0.0}
+\def\version{7.1.0}
\RequirePackage{kvdefinekeys}
\RequirePackage{kvsetkeys}
\RequirePackage{kvoptions}
@@ -1757,6 +1720,7 @@
\clearpage
\fi
\@mainmatterfalse
+ \thusetup{toc-depth = 0}%
}
% \end{macrocode}
% \end{macro}
@@ -2042,7 +2006,7 @@
\fi
\fi
\newcommand\thu@load@cjk@font@windows{%
- \xeCJKsetup{EmboldenFactor=2}
+ \xeCJKsetup{EmboldenFactor=3}%
\setCJKmainfont{SimSun}[
AutoFakeBold = true,
ItalicFont = KaiTi,
@@ -2078,7 +2042,6 @@
UprightFont = * Light,
BoldFont = * Bold,
]%
- \xeCJKsetwidth{‘’“”}{1em}%
}
% \end{macrocode}
%
@@ -2161,13 +2124,50 @@
%
% \begin{macro}{\normalsize}
% 正文小四号 (12bp) 字,行距为固定值 20 bp。
+% 其他字号的行距按照相同的比例设置。
+%
+% 表达式行的行距为单倍行距,段前空 6 磅,段后空 6 磅。
% \begin{macrocode}
\renewcommand\normalsize{%
\@setfontsize\normalsize{12bp}{20bp}%
- \abovedisplayskip=12bp \@plus 2bp \@minus 2bp
- \abovedisplayshortskip=12bp \@plus 2bp \@minus 2bp
- \belowdisplayskip=\abovedisplayskip
- \belowdisplayshortskip=\abovedisplayshortskip}
+ \abovedisplayskip 6bp%
+ \abovedisplayshortskip 6bp%
+ \belowdisplayshortskip 6bp%
+ \belowdisplayskip \abovedisplayskip
+}
+\normalsize
+\ifx\MakeRobust\@undefined \else
+ \MakeRobust\normalsize
+\fi
+\DeclareRobustCommand\small{%
+ \@setfontsize\small{10.5bp}{17.5bp}%
+ \abovedisplayskip 6bp%
+ \abovedisplayshortskip 6bp%
+ \belowdisplayshortskip 6bp%
+ \def\@listi{\leftmargin\leftmargini
+ \topsep \z@skip
+ \parsep \z@skip
+ \itemsep \z@skip}%
+ \belowdisplayskip \abovedisplayskip
+}
+\DeclareRobustCommand\footnotesize{%
+ \@setfontsize\footnotesize{9bp}{15bp}%
+ \abovedisplayskip 6bp%
+ \abovedisplayshortskip 6bp%
+ \belowdisplayshortskip 6bp%
+ \def\@listi{\leftmargin\leftmargini
+ \topsep \z@skip
+ \parsep \z@skip
+ \itemsep \z@skip}%
+ \belowdisplayskip \abovedisplayskip
+}
+\DeclareRobustCommand\scriptsize{\@setfontsize\scriptsize{7.5bp}{12.5bp}}
+\DeclareRobustCommand\tiny{\@setfontsize\tiny{6.5bp}{10.83bp}}
+\DeclareRobustCommand\large{\@setfontsize\large{15bp}{25bp}}
+\DeclareRobustCommand\Large{\@setfontsize\Large{18bp}{30bp}}
+\DeclareRobustCommand\LARGE{\@setfontsize\LARGE{22bp}{36.67bp}}
+\DeclareRobustCommand\huge{\@setfontsize\huge{24bp}{40bp}}
+\DeclareRobustCommand\Huge{\@setfontsize\Huge{26bp}{43.33bp}}
% \end{macrocode}
% \end{macro}
%
@@ -2207,25 +2207,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\chuhao}
-% \begin{macro}{\xiaochu}
-% \begin{macro}{\yihao}
-% \begin{macro}{\xiaoyi}
-% \begin{macro}{\erhao}
-% \begin{macro}{\xiaoer}
-% \begin{macro}{\sanhao}
-% \begin{macro}{\xiaosan}
-% \begin{macro}{\sihao}
-% \begin{macro}{\banxiaosi}
-% \begin{macro}{\xiaosi}
-% \begin{macro}{\dawu}
-% \begin{macro}{\wuhao}
-% \begin{macro}{\xiaowu}
-% \begin{macro}{\liuhao}
-% \begin{macro}{\xiaoliu}
-% \begin{macro}{\qihao}
-% \begin{macro}{\bahao}
-% 一组字号定义。TODO:用 \cs{zihao} 替代。
+% 一组字号定义。
% \begin{macrocode}
\thu@def@fontsize{chuhao}{42bp}
\thu@def@fontsize{xiaochu}{36bp}
@@ -2236,9 +2218,7 @@
\thu@def@fontsize{sanhao}{16bp}
\thu@def@fontsize{xiaosan}{15bp}
\thu@def@fontsize{sihao}{14bp}
-\thu@def@fontsize{banxiaosi}{13bp}
\thu@def@fontsize{xiaosi}{12bp}
-\thu@def@fontsize{dawu}{11bp}
\thu@def@fontsize{wuhao}{10.5bp}
\thu@def@fontsize{xiaowu}{9bp}
\thu@def@fontsize{liuhao}{7.5bp}
@@ -2246,24 +2226,6 @@
\thu@def@fontsize{qihao}{5.5bp}
\thu@def@fontsize{bahao}{5bp}
% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
%
%
% \subsubsection{语言设置}
@@ -2297,9 +2259,9 @@
\def\bibname{参考文献}%
\def\appendixname{附录}%
\def\indexname{索引}%
- \def\thu@acknowledgements@name{致\hspace{\ccwd}谢}%
+ \def\thu@acknowledgements@name{致\quad 谢}%
\ifthu@degree@bachelor
- \def\contentsname{目\hspace{\ccwd}录}%
+ \def\contentsname{目\quad 录}%
\def\listfigurename{插图索引}%
\def\listtablename{表格索引}%
\def\thu@list@figure@table@name{插图和附表索引}%
@@ -2314,12 +2276,11 @@
\def\thu@list@algorithm@name{算法清单}%
\def\listequationname{公式清单}%
\ifthu@degree@graduate
- \def\contentsname{目\hspace{\ccwd}录}%
- \def\thu@toc@contents@name{目录}%
+ \def\contentsname{目\quad 录}%
\def\thu@denotation@name{符号和缩略语说明}%
\def\thu@resume@name{个人简历、在学期间完成的相关学术成果}%
\else % degree = postdoc
- \def\contentsname{目\hspace{2\ccwd}次}%
+ \def\contentsname{目\qquad 次}%
\def\thu@denotation@name{符号表}%
\def\thu@resume@name{个人简历、发表的学术论文与科研成果}%
\fi
@@ -2344,7 +2305,6 @@
\def\thu@resume@name{PUBLICATIONS}%
\else
\def\contentsname{Contents}%
- \def\thu@toc@contents@name{Contents}%
\def\listfigurename{List of Figures}%
\def\listtablename{List of Tables}%
\def\thu@list@figure@table@name{List of Figures and Tables}%
@@ -2418,6 +2378,12 @@
\thu@option@hook{language}{\thu@set@names}
% \end{macrocode}
%
+% 带圈数字和星号使用中文字体。
+% \begin{macrocode}
+\xeCJKDeclareCharClass{CJK}{"2460 -> "2473}
+\xeCJKDeclareCharClass{CJK}{"2605}
+% \end{macrocode}
+%
% \newcommand\unicodechar[1]{U+#1(\symbol{"#1})}
% 由于 Unicode 的一些标点符号是中西文混用的:
% \unicodechar{00B7}、
@@ -2497,7 +2463,7 @@
\fancyfoot[C]{\wuhao\thepage}%
\let\@mkboth\markboth
\def\chaptermark##1{%
- \markboth{\CTEXifname{\CTEXthechapter\hskip\ccwd}{}##1}{}%
+ \markboth{\CTEXifname{\CTEXthechapter\quad}{}##1}{}%
}%
\fi
\let\sectionmark\@gobble
@@ -2536,7 +2502,48 @@
\thu@option@hook{main-language}{\thu@set@indent}
% \end{macrocode}
%
-% 利用 \pkg{enumitem} 命令调整默认列表环境间的距离,以符合中文习惯。
+% 设置 url 样式,与上下文一致
+% \begin{macrocode}
+\urlstyle{same}
+% \end{macrocode}
+%
+% 使用 \pkg{xurl} 的方法,增加 URL 可断行的位置。
+% \begin{macrocode}
+\g@addto@macro\UrlBreaks{%
+ \do0\do1\do2\do3\do4\do5\do6\do7\do8\do9%
+ \do\A\do\B\do\C\do\D\do\E\do\F\do\G\do\H\do\I\do\J\do\K\do\L\do\M
+ \do\N\do\O\do\P\do\Q\do\R\do\S\do\T\do\U\do\V\do\W\do\X\do\Y\do\Z
+ \do\a\do\b\do\c\do\d\do\e\do\f\do\g\do\h\do\i\do\j\do\k\do\l\do\m
+ \do\n\do\o\do\p\do\q\do\r\do\s\do\t\do\u\do\v\do\w\do\x\do\y\do\z
+}
+\Urlmuskip=0mu plus 0.1mu
+% \end{macrocode}
+%
+% 取消列表的间距,以符合中文习惯。
+% \begin{macrocode}
+\partopsep=\z@skip
+\def\@listi{\leftmargin\leftmargini
+ \parsep \z@skip
+ \topsep \z@skip
+ \itemsep\z@skip}
+\let\@listI\@listi
+\@listi
+\def\@listii {\leftmargin\leftmarginii
+ \labelwidth\leftmarginii
+ \advance\labelwidth-\labelsep
+ \topsep \z@skip
+ \parsep \z@skip
+ \itemsep \z@skip}
+\def\@listiii{\leftmargin\leftmarginiii
+ \labelwidth\leftmarginiii
+ \advance\labelwidth-\labelsep
+ \topsep \z@skip
+ \parsep \z@skip
+ \partopsep \z@skip
+ \itemsep \z@skip}
+% \end{macrocode}
+%
+% 使用 \pkg{enumitem} 命令调整默认列表环境间的距离,
% \begin{macrocode}
\setlist{nosep}
% \end{macrocode}
@@ -2544,56 +2551,85 @@
%
% \subsubsection{脚注}
% \label{sec:footnote}
-% 脚注符合中文习惯,数字带圈。
-% \begin{macro}{\thu@textcircled}
+% 脚注内容采用小五号字,中文用宋体,英文和数字用 Times New Roman 体按两端对齐格式书写,
+% 单倍行距,段前段后均空 0 磅。
+% 脚注的序号按页编排,不同页的脚注序号不需要连续。
+%
+% 脚注处序号“1,……,10”的字体是“正文”,不是“上标”,序号与脚注内容文字之间空半个汉字符,
+% 脚注的段落格式为:单倍行距,段前空 0 磅,段后空 0 磅,悬挂缩进 1.5 字符;
+% 字号为小五号字,汉字用宋体,外文用 Times New Roman 体。
+%
+% 脚注序号使用带圈数字。
+% \begin{macro}{\thu@circled}
% 生成带圈的脚注数字,最多处理到 10。
% \begin{macrocode}
-\def\thu@textcircled#1{%
- \ifnum\value{#1} >10\relax
+\newcommand\thu@circled[1]{%
+ \ifnum#1 >10\relax
\thu@error{%
Too many footnotes in this page.
Keep footnote less than 10%
}%
\fi
- {\CJKfamily+{}\symbol{\the\numexpr\value{#1}+"245F\relax}}%
+ {\symbol{\the\numexpr#1+"245F\relax}}%
}
-\renewcommand{\thefootnote}{\thu@textcircled{footnote}}
-\renewcommand{\thempfootnote}{\thu@textcircled{mpfootnote}}
+\renewcommand{\thefootnote}{\thu@circled{\c@footnote}}
+\renewcommand{\thempfootnote}{\thu@circled{\c@mpfootnote}}
% \end{macrocode}
% \end{macro}
%
% 定义脚注分割线,字号(宋体小五),以及悬挂缩进(1.5字符)。
% \begin{macrocode}
\def\footnoterule{\vskip-3\p@\hrule\@width0.3\textwidth\@height0.4\p@\vskip2.6\p@}
-\let\thu@footnotesize\footnotesize
-\renewcommand\footnotesize{\thu@footnotesize\xiaowu[1.5]}
-\footnotemargin1.5em\relax
+\footnotemargin=13.5bp
% \end{macrocode}
%
-% \cs{@makefnmark} 默认是上标样式,而在脚注部分要求为正文大小。利用\cs{patchcmd}
-% 动态调整 \cs{@makefnmark} 的定义。
+% 修改 \pkg{footmisc} 定义的脚注格式。
% \begin{macrocode}
-\let\thu@makefnmark\@makefnmark
-\def\thu@@makefnmark{\hbox{{\normalfont\@thefnmark}}}
-\pretocmd{\@makefntext}{\let\@makefnmark\thu@@makefnmark}{}{}
-\apptocmd{\@makefntext}{\let\@makefnmark\thu@makefnmark}{}{}
-% \end{macrocode}
-%
-% 设置 url 样式,与上下文一致
-% \begin{macrocode}
-\urlstyle{same}
-% \end{macrocode}
-%
-% 使用 \pkg{xurl} 的方法,增加 URL 可断行的位置。
-% \begin{macrocode}
-\g@addto@macro\UrlBreaks{%
- \do0\do1\do2\do3\do4\do5\do6\do7\do8\do9%
- \do\A\do\B\do\C\do\D\do\E\do\F\do\G\do\H\do\I\do\J\do\K\do\L\do\M
- \do\N\do\O\do\P\do\Q\do\R\do\S\do\T\do\U\do\V\do\W\do\X\do\Y\do\Z
- \do\a\do\b\do\c\do\d\do\e\do\f\do\g\do\h\do\i\do\j\do\k\do\l\do\m
- \do\n\do\o\do\p\do\q\do\r\do\s\do\t\do\u\do\v\do\w\do\x\do\y\do\z
+\long\def\@makefntext#1{%
+ \begingroup
+ % 序号取消上标
+ \def\@makefnmark{\hbox{\normalfont\@thefnmark}}%
+ \xiaowu
+ \ifFN@hangfoot
+ \bgroup
+ \setbox\@tempboxa\hbox{%
+ \ifdim\footnotemargin>\z@
+ \hb@xt@\footnotemargin{\@makefnmark\hss}%
+ \else
+ \@makefnmark
+ \fi
+ }%
+ \leftmargin\wd\@tempboxa
+ \rightmargin\z@
+ \linewidth \columnwidth
+ \advance \linewidth -\leftmargin
+ \parshape \@ne \leftmargin \linewidth
+ % \footnotesize
+ \xiaowu
+ \@setpar{{\@@par}}%
+ \leavevmode
+ \llap{\box\@tempboxa}%
+ \parskip\hangfootparskip\relax
+ \parindent\hangfootparindent\relax
+ \else
+ \parindent1em%
+ \noindent
+ \ifdim\footnotemargin>\z@
+ \hb@xt@ \footnotemargin{\hss\@makefnmark}%
+ \else
+ \ifdim\footnotemargin=\z@
+ \llap{\@makefnmark}%
+ \else
+ \llap{\hb@xt@ -\footnotemargin{\@makefnmark\hss}}%
+ \fi
+ \fi
+ \fi
+ \footnotelayout#1%
+ \ifFN@hangfoot
+ \par\egroup
+ \fi
+ \endgroup
}
-\Urlmuskip=0mu plus 0.1mu
% \end{macrocode}
%
%
@@ -2703,36 +2739,15 @@
%
% 公式距前后文的距离由 4 个参数控制,参见 \cs{normalsize} 的定义。
%
-% 本科的公式编号要求很诡异,不得不修改 \pkg{amsmath} 中很深的一个命令 \cs{tagform@}。
-% 同时为了让 \pkg{amsmath} 的 \cs{tag*} 命令得到正确的格式,我们必须修改这些代
-% 码。\cs{make@df@tag} 是定义 \cs{tag*} 和 \cs{tag} 内部命令的。
-% \cs{make@df@tag@@} 处理 \cs{tag*},我们就改它!
-% \begin{latex}
-% \def\make@df@tag{\@ifstar\make@df@tag@@\make@df@tag@@@}
-% \def\make@df@tag@@#1{%
-% \gdef\df@tag{\maketag@@@{#1}\def\@currentlabel{#1}}}
-% \end{latex}
-% \begin{macrocode}
-\def\make@df@tag{\@ifstar\thu@make@df@tag@@\make@df@tag@@@}
-\def\thu@make@df@tag@@#1{\gdef\df@tag{\thu@maketag{#1}\def\@currentlabel{#1}}}
-\iffalse
-\ifthu@degree@bachelor
- \def\thu@maketag#1{\maketag@@@{%
- (\ignorespaces\text{\thu@equation@name\hskip0.5em}#1\unskip\@@italiccorr)}}
- \def\tagform@#1{\maketag@@@{%
- (\ignorespaces\text{\thu@equation@name\hskip0.5em}#1\unskip\@@italiccorr)\equcaption{#1}}}
-\fi
-\fi
-\def\thu@maketag#1{\maketag@@@{(\ignorespaces #1\unskip\@@italiccorr)}}
-\def\tagform@#1{\maketag@@@{(\ignorespaces #1\unskip\@@italiccorr)\equcaption{#1}}}
-% \end{macrocode}
-% 修改 \cs{tagform} 会影响 \cs{eqref}。
+% \subsubsection{浮动对象:插图和表格}
+% \label{sec:float}
+%
+% 图表浮动体的默认位置设为 |h|。
% \begin{macrocode}
-\renewcommand{\eqref}[1]{\textup{(\ref{#1})}}
+\def\fps@figure{h}
+\def\fps@table{h}
% \end{macrocode}
%
-% \subsubsection{浮动对象:插图和表格}
-% \label{sec:float}
% 设置浮动对象和文字之间的距离
% \begin{macrocode}
\setlength{\floatsep}{6bp}
@@ -2753,12 +2768,13 @@
% \end{macrocode}
%
% 研究生要求表单元格中的文字采用 11pt 宋体字,单倍行距,段前空 3 磅,段后空 3 磅。
+% $(3 + 3) / (11 \times 1.3) \approx 0.4$
% \begin{macrocode}
\patchcmd\@floatboxreset{%
\normalsize
}{%
\fontsize{11bp}{14.3bp}\selectfont
- \renewcommand\arraystretch{1.2}%
+ \renewcommand\arraystretch{1.4}%
}{}{\thu@patch@error{\@floatboxreset}}
% \end{macrocode}
%
@@ -2780,12 +2796,21 @@
% \end{macrocode}
%
% \begin{macrocode}
-\DeclareCaptionFont{thu}{\dawu}
-\DeclareCaptionLabelSeparator{thu}{\hspace{\ccwd}}
+\newcommand\thu@caption@font{}
+\newcommand\thu@set@caption@font{%
+ \ifthu@degree@bachelor
+ \renewcommand\thu@caption@font{\fontsize{11bp}{15bp}\selectfont}%
+ \else
+ \renewcommand\thu@caption@font{\fontsize{11bp}{14.3bp}\selectfont}%
+ \fi
+}
+\thu@set@caption@font
+\thu@option@hook{degree}{\thu@set@caption@font}
+\DeclareCaptionFont{thu}{\thu@caption@font}
\captionsetup{
format = hang,
font = thu,
- labelsep = thu,
+ labelsep = quad,
aboveskip = 6bp,
belowskip = 6bp,
figureposition = bottom,
@@ -2805,16 +2830,11 @@
\lightrulewidth=1bp
% \end{macrocode}
%
-% \begin{macro}{\hlinewd}
-% 简单的表格使用三线表推荐用 \cs{hlinewd}。如果表格比较复杂还是用 \pkg{booktabs} 的命
-% 令好一些。
% \begin{macrocode}
-\def\hlinewd#1{%
- \noalign{\ifnum0=`}\fi\hrule \@height #1 \futurelet
- \reserved@a\@xhline}
+\AtEndOfPackageFile*{threeparttable}{
+ \g@addto@macro\TPT@defaults{\wuhao}
+}
% \end{macrocode}
-% \end{macro}
-%
%
% \subsubsection{章节标题}
% \label{sec:theor}
@@ -2823,7 +2843,7 @@
\newcommand{\thu@abstract@name}{中文摘要}
\newcommand{\thu@abstract@name@en}{ABSTRACT}
\else
- \newcommand{\thu@abstract@name}{摘\hspace{\ccwd}要}
+ \newcommand{\thu@abstract@name}{摘\quad 要}
\newcommand{\thu@abstract@name@en}{Abstract}
\fi
% \end{macrocode}
@@ -2930,14 +2950,14 @@
% 段前空 12 磅,段后空 6 磅。
% \end{itemize}
%
-% 由于 Word 模板中开启了“对齐到网格”,实际的段前段后距离有所调整。
+% 由于 Word 的行距算法不同,这里进行了一些调整使得视觉上更接近。
% \begin{macrocode}
\else
\ctexset{%
chapter = {
format = \centering\sffamily\sanhao,
- beforeskip = 32bp,
- afterskip = 32bp,
+ beforeskip = 27bp,
+ afterskip = 27bp,
},
section = {
format = \sffamily\fontsize{14bp}{20bp}\selectfont,
@@ -3051,7 +3071,7 @@
% \begin{macrocode}
\renewcommand\tableofcontents{%
\ifthu@degree@graduate
- \thu@chapter*[\thu@toc@contents@name]{\contentsname}%
+ \thu@chapter*{\contentsname}%
\else
\thu@chapter*[]{\contentsname}%
\fi
@@ -3136,13 +3156,7 @@
% \begin{macrocode}
\else
\titlecontents{chapter}
- [\z@]{\addvspace{6bp}
- \ifthu@main@language@chinese
- \heiti
- \else
- \sffamily
- \fi
- }
+ [\z@]{\addvspace{6bp}\sffamily}
{\contentspush{\thecontentslabel\quad}}{}
{\rmfamily\thu@leaders\thecontentspage}%
\titlecontents{section}
@@ -3499,7 +3513,7 @@
%
% \begin{macrocode}
\newcommand\thu@titlepage@secret{%
- \sffamily\CJKfamily+{}\sanhao
+ \sffamily\sanhao
\ifx\thu@secret@level\@empty
\phantom{秘密}%
\else
@@ -3764,7 +3778,7 @@
\centering
\parbox[t][0cm][t]{\textwidth}{%
\hfill
- \CJKfamily+{}\xiaosi
+ \xiaosi
\ifx\thu@secret@level\@empty\else
\thu@secret@level\space\thu@secret@year 年\par
\fi
@@ -3953,52 +3967,19 @@
% \begin{macro}{\copyrightpage}
% 授权说明
% \begin{macrocode}
-\newcommand{\thu@authorization@title}{关于学位论文使用授权的说明}
-\newcommand{\thu@authorization@content}{%
-\ifthu@degree@bachelor
- 本人完全了解清华大学有关保留、使用学位论文的规定,%
- 即:学校有权保留学位论文的复印件,允许该论文被查阅和借阅;%
- 学校可以公布该论文的全部或部分内容,可以采用影印、缩印或其他复制手段保存该论文。%
-\else
- 本人完全了解清华大学有关保留、使用学位论文的规定,即:\par
- 清华大学拥有在著作权法规定范围内学位论文的使用权,其中包括:%
- (1)已获学位的研究生必须按学校规定提交学位论文,%
- 学校可以采用影印、缩印或其他复制手段保存研究生上交的学位论文;%
- (2)为教学和科研目的,学校可以将公开的学位论文作为资料在图书馆、资料室等场所供校内师生阅读,%
- 或在校园网上供校内师生浏览部分内容;%
- \ifthu@degree@doctor
- (3)根据《中华人民共和国学位条例暂行实施办法》及相关部门具体要求,向国家图书馆报送相应的学位论文。%
- \else
- (3)按照相关部门督导、抽查等要求,报送相应的学位论文。%
- \fi
- \par
- 本人保证遵守上述规定。%
- \fi
-}
-\newcommand{\thu@authorization@addon}{%
- \ifthu@degree@bachelor(涉密的学位论文在解密后应遵守此规定)\else (保密的论文在解密后遵守此规定)\fi}
-\newcommand{\thu@authorization@authorsig}{\ifthu@degree@bachelor 签\hskip1em名:\else 作者签名:\fi}
-\newcommand{\thu@authorization@teachersig}{导师签名:}
-\newcommand{\thu@authorization@frontdate}{%
- 日\ifthu@degree@bachelor\hspace{1em}\else\hspace{2em}\fi 期:}
\newcommand\copyrightpage[1][]{%
\ifthu@degree@postdoc\relax\else
- \cleardoublepage
- \thispagestyle{empty}%
- \thu@pdfbookmark{0}{\thu@authorization@title}%
\def\thu@@tmp{#1}
\ifx\thu@@tmp\@empty
- \ifthu@degree@bachelor\thu@authorization@mk\else%
- \begin{list}{}{%
- \topsep\z@%
- \listparindent\parindent%
- \parsep\parskip%
- \setlength{\leftmargin}{0.9mm}%
- \setlength{\rightmargin}{0.9mm}}%
- \item[]\thu@authorization@mk%
- \end{list}%
- \fi%
+ \ifthu@degree@bachelor
+ \thu@copyright@page@bachelor
+ \else
+ \thu@copyright@page@graduate
+ \fi
\else
+ \cleardoublepage
+ \thispagestyle{empty}%
+ \thu@pdfbookmark{0}{\thu@authorization@title}%
\thu@phantomsection
\kv@define@key{thu@copyright}{file}{\includepdf{\kv@value}}%
\kv@set@family@handler{thu@copyright}{%
@@ -4016,25 +3997,84 @@
%
% 支持扫描文件替换。
% \begin{macrocode}
-\newcommand{\thu@authorization@mk}{%
- \ifthu@degree@bachelor\vspace*{0.2cm}\else\vspace*{0.42cm}\fi % shit code!
- \begin{center}\erhao\heiti \thu@authorization@title\end{center}
- \ifthu@degree@bachelor\vskip5pt\else\vskip40pt\sihao[2.03]\fi\par
- \thu@authorization@content\par
- \textbf{\thu@authorization@addon}\par
- \ifthu@degree@bachelor\vskip0.7cm\else\vskip1.0cm\fi
- \ifthu@degree@bachelor
- \indent\mbox{\thu@authorization@authorsig\thu@underline\relax%
- \thu@authorization@teachersig\thu@underline\relax\thu@authorization@frontdate\thu@underline\relax}
- \else
- \begingroup
- \parindent0pt\xiaosi
- \hspace*{1.5cm}\thu@authorization@authorsig\thu@underline[7em]\relax\hfill%
- \thu@authorization@teachersig\thu@underline[7em]\relax\hspace*{1cm}\\[3pt]
- \hspace*{1.5cm}\thu@authorization@frontdate\thu@underline[7em]\relax\hfill%
- \thu@authorization@frontdate\thu@underline[7em]\relax\hspace*{1cm}
- \endgroup
- \fi}
+\newcommand{\thu@authorization@frontdate}{%
+ 日\ifthu@degree@bachelor\hspace{1em}\else\hspace{2em}\fi 期:}
+\newcommand\thu@copyright@page@graduate{%
+ \cleardoublepage
+ \newgeometry{
+ vmargin = 3.8cm,
+ hmargin = 3.2cm,
+ }%
+ \begingroup
+ \ctexset{
+ chapter = {
+ format = {\centering\sffamily\erhao},
+ beforeskip = 18bp,
+ afterskip = 6bp,
+ },
+ }%
+ \thu@chapter*[]{关于学位论文使用授权的说明}%
+ \thispagestyle{empty}%
+ \endgroup
+ \vskip 50bp%
+ \begingroup
+ \fontsize{14bp}{26bp}\selectfont
+ 本人完全了解清华大学有关保留、使用学位论文的规定,即:\par
+ 清华大学拥有在著作权法规定范围内学位论文的使用权,其中包括:%
+ (1)已获学位的研究生必须按学校规定提交学位论文,%
+ 学校可以采用影印、缩印或其他复制手段保存研究生上交的学位论文;%
+ (2)\nobreak 为教学和科研目的,学校可以将公开的学位论文作为资料在图书馆、资料室等场所供校内师生阅读,%
+ 或在校园网上供校内师生浏览部分内容;%
+ \ifthu@degree@doctor
+ (3)根据《中华人民共和国学位条例暂行实施办法》及上级教育主管部门具体要求,向国家图书馆报送相应的学位论文。%
+ \else
+ (3)按照上级教育主管部门督导、抽查等要求,报送相应的学位论文。%
+ \fi
+ \par
+ 本人保证遵守上述规定。\par
+ \vskip 6bp%
+ \textbf{(保密的论文在解密后遵守此规定)}\par
+ \endgroup
+ \vskip1.2cm%
+ \begingroup
+ \noindent\xiaosi
+ \hspace*{1.5cm}%
+ 作者签名:\thu@underline[7em]\relax\hfill
+ 导师签名:\thu@underline[7em]\relax\hspace*{1cm}\\[3pt]%
+ \hspace*{1.5cm}%
+ 日\hspace{2em}期:\thu@underline[7em]\relax\hfill
+ 日\hspace{2em}期:\thu@underline[7em]\relax\hspace*{1cm}%
+ \endgroup
+ \clearpage
+ \restoregeometry
+}
+\newcommand\thu@copyright@page@bachelor{%
+ \cleardoublepage
+ \begingroup
+ \ctexset{
+ chapter = {
+ format = {\centering\sffamily\erhao[1]},
+ beforeskip = 1bp,
+ afterskip = 24bp,
+ },
+ }%
+ \thu@chapter*[]{关于学位论文使用授权的说明}%
+ \thispagestyle{empty}%
+ \endgroup
+ \vskip 4bp%
+ 本人完全了解清华大学有关保留、使用学位论文的规定,即:%
+ 学校有权保留学位论文的复印件,允许该论文被查阅和借阅;%
+ 学校可以公布该论文的全部或部分内容,可以采用影印、缩印或其他复制手段保存该论文。\par
+ \textbf{(涉密的学位论文在解密后应遵守此规定)}\par
+ \null\par
+ \begingroup
+ \centering
+ 签\quad 名:\thu@underline[6em]{}%
+ 导师签名:\thu@underline[6em]{}%
+ 日\quad 期\thu@underline[6em]{}%
+ \par
+ \endgroup
+}
% \end{macrocode}
% \end{macro}
%
@@ -4088,18 +4128,14 @@
% 每个关键词之间空两个汉字符宽度, 且为悬挂缩进。
% \begin{macrocode}
\par
+ \null\par
\ifthu@degree@graduate
- \vspace*{\stretch{4}}%
\noindent
\textsf{关键词:}%
\else
- \null\par
\textbf{关键词:}%
\fi
\thu@clist@use{\thu@keywords}{;}%
- \ifthu@degree@graduate
- \vspace*{\stretch{1}}%
- \fi
\ifthu@degree@bachelor
\cleardoublepage
\fi
@@ -4118,23 +4154,17 @@
\fi
\thusetup{language = english}%
\ifthu@degree@graduate
- \begingroup
- \ctexset{chapter/format+=\bfseries}%
- \thu@chapter*[\sffamily\bfseries\thu@abstract@name@en]{\thu@abstract@name@en}%
- \endgroup
+ \thu@chapter*{\thu@abstract@name@en}%
\else
\thu@chapter*[]{\thu@abstract@name@en}%
\fi
}{%
\par
+ \null\par
\ifthu@degree@graduate
- \vspace*{\stretch{4}}%
\noindent
- \textbf{Key Words:}\space
- \else
- \null\par
- \textbf{Keywords:}\space
\fi
+ \textbf{Keywords:}\space
\thu@clist@use{\thu@keywords@en}{; }%
\ifthu@degree@graduate
\vspace*{\stretch{1}}%
@@ -4313,7 +4343,7 @@
}
\titlecontents{figure}
[\z@]{}
- {\contentspush{\figurename~\thecontentslabel\hspace{\ccwd}}}{}
+ {\contentspush{\figurename~\thecontentslabel\quad}}{}
{\nobreak\thu@leaders\nobreak\hfil\thecontentspage}
% \end{macrocode}
% \end{macro}
@@ -4328,7 +4358,7 @@
}
\titlecontents{table}
[\z@]{}
- {\contentspush{\tablename~\thecontentslabel\hspace{\ccwd}}}{}
+ {\contentspush{\tablename~\thecontentslabel\quad}}{}
{\thu@leaders\thecontentspage}
% \end{macrocode}
% \end{macro}
@@ -4393,6 +4423,11 @@
\thu@define@key{
cite-style = {
name = cite@style,
+ choices = {
+ super,
+ inline,
+ author-year,
+ }
}
}
% \end{macrocode}
@@ -4416,14 +4451,25 @@
% 几种种引用样式,与 \file{bst} 文件名保持一致,
% 这样在使用 \cs{bibliographystyle} 选择参考文献表的样式时也会设置对应的引用样式。
% \begin{macrocode}
- \expandafter\newcommand\csname bibstyle@thuthesis-numeric\endcsname{%
+ \newcommand\bibstyle@super{%
\bibpunct{[}{]}{,}{s}{,}{\textsuperscript{,}}}
- \expandafter\newcommand\csname bibstyle@thuthesis-author-year\endcsname{%
+ \newcommand\bibstyle@inline{%
+ \bibpunct{[}{]}{,}{n}{,}{,}}
+ \@namedef{bibstyle@author-year}{%
\bibpunct{(}{)}{;}{a}{,}{,}}
- \expandafter\newcommand\csname bibstyle@thuthesis-bachelor\endcsname{%
- \bibpunct{[}{]}{,}{s}{,}{\textsuperscript{,}}}
- \@namedef{bibstyle@thuthesis-inline}{\bibpunct{[}{]}{,}{n}{,}{,}}
- \thu@option@hook{cite-style}{\@nameuse{bibstyle@thuthesis-\thu@cite@style}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \thu@option@hook{cite-style}{\@nameuse{bibstyle@\thu@cite@style}}
+% \end{macrocode}
+%
+% 几种种引用样式,与 \file{bst} 文件名保持一致,
+% 这样在使用 \cs{bibliographystyle} 选择参考文献表的样式时也会设置对应的引用样式。
+% \begin{macrocode}
+ \@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}
%
% 修改引用的样式。
@@ -4665,7 +4711,7 @@
\newcommand\thu@set@bibliography@format{%
\ifthu@degree@bachelor
\renewcommand\bibfont{\fontsize{10.5bp}{17bp}\selectfont}%
- \setlength{\bibsep}{6bp}%
+ \setlength{\bibsep}{6bp \@plus 3bp \@minus 3bp}%
\ifthu@main@language@chinese
\setlength{\bibhang}{21bp}%
\else
@@ -4673,7 +4719,7 @@
\fi
\else
\renewcommand\bibfont{\fontsize{10.5bp}{16bp}\selectfont}%
- \setlength{\bibsep}{3bp}%
+ \setlength{\bibsep}{3bp \@plus 3bp \@minus 3bp}%
\setlength{\bibhang}{21bp}%
\fi
}
@@ -4682,6 +4728,25 @@
\thu@option@hook{main-language}{\thu@set@bibliography@format}
% \end{macrocode}
%
+% 研究生要求每一条文献的内容要尽量写在同一页内。
+% 遇有被迫分页的情况,可通过“留白”或微调本页行距的方式尽量将同一条文献内容放在一页。
+% 所以上述 \cs{bibsep} 的设置允许 1pt 的伸缩,
+% 同时增加同一条文献内分页的惩罚,
+% 这里参考 \href{https://github.com/plk/biblatex/blob/e5d6e69e61613cc33ab1fcc2083a8277eb9cfce5/tex/latex/biblatex/biblatex.def}{BibLaTeX 的设置}。
+% \begin{macrocode}
+ \patchcmd\thebibliography{%
+ \clubpenalty4000%
+ }{%
+ \interlinepenalty=5000\relax
+ \clubpenalty=10000\relax
+ }{}{\thu@patch@error{\thebibliography}}
+ \patchcmd\thebibliography{%
+ \widowpenalty4000%
+ }{%
+ \widowpenalty=10000\relax
+ }{}{\thu@patch@error{\thebibliography}}
+% \end{macrocode}
+%
% 参考文献表的编号居左,宽度 1 cm。
% \begin{macrocode}
\def\@biblabel#1{[#1]\hfill}
@@ -4720,7 +4785,7 @@
\newcommand\thu@set@bibliography@format{%
\ifthu@degree@bachelor
\renewcommand\bibfont{\fontsize{10.5bp}{17bp}\selectfont}%
- \setlength{\bibitemsep}{6bp}%
+ \setlength{\bibitemsep}{6bp \@plus 3bp \@minus 3bp}%
\ifthu@main@language@chinese
\setlength{\bibhang}{21bp}%
\else
@@ -4728,7 +4793,7 @@
\fi
\else
\renewcommand\bibfont{\fontsize{10.5bp}{16bp}\selectfont}%
- \setlength{\bibitemsep}{3bp}%
+ \setlength{\bibitemsep}{3bp \@plus 3bp \@minus 3bp}%
\setlength{\biblabelsep}{0.1cm}%
\setlength{\bibhang}{21bp}%
\fi
@@ -4828,6 +4893,7 @@
\section*{Contents}%
\thu@pdfbookmark{1}{Contents}%
\printcontents[survey]{l}{1}[2]{}%
+ \vskip 20bp%
}%
\renewcommand\bibname{参考文献}%
\let\bibsection\thu@appendix@bibsection
@@ -4857,6 +4923,7 @@
\section*{目录}%
\thu@pdfbookmark{1}{目录}%
\printcontents[translation]{l}{1}[2]{}%
+ \vskip 20bp%
}%
\def\bibsection{%
\begingroup
@@ -4907,15 +4974,15 @@
\newcommand\thu@set@partial@toc@format{%
\titlecontents{section}
[\z@]{}
- {\contentspush{\thecontentslabel\hspace{\ccwd}}}{}
+ {\contentspush{\thecontentslabel\quad}}{}
{\thu@leaders\thecontentspage}%
\titlecontents{subsection}
- [1\ccwd]{}
- {\contentspush{\thecontentslabel\hspace{\ccwd}}}{}
+ [1em]{}
+ {\contentspush{\thecontentslabel\quad}}{}
{\thu@leaders\thecontentspage}%
\titlecontents{subsubsection}
- [2\ccwd]{}
- {\contentspush{\thecontentslabel\hspace{\ccwd}}}{}
+ [2em]{}
+ {\contentspush{\thecontentslabel\quad}}{}
{\thu@leaders\thecontentspage}%
}
% \end{macrocode}
@@ -4941,52 +5008,73 @@
% \begin{environment}{resume}
% 个人简历发表文章等。
% \begin{macrocode}
-\newenvironment{resume}[1][\thu@resume@name]{%
+\newenvironment{resume}{%
\@mainmatterfalse
- \thu@chapter*{#1}}{}
+ \thu@chapter*{\thu@resume@name}%
+ \ctexset{
+ section = {
+ 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,
+ \fi
+ \fi
+}{}
% \end{macrocode}
% \end{environment}
%
-% \begin{macro}{\resumeitem}
-% 个人简历部分。每条信息一个段落,故不需要特别处理。
+% 旧的 \cs{resumeitem} 和 \cs{researchitem} 已经过时。
% \begin{macrocode}
-\newcommand{\resumeitem}[1]{%
- \vspace{24bp}{\sihao\heiti\centerline{#1}}\par\vspace{6bp}}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\researchitem}
-% 研究成果用 \cs{researchitem}\marg{类别} 开启,包括“学术论文”和“研究成果”两个
-% 列表。
-% \begin{macrocode}
-\newcommand{\researchitem}[1]{%
- \vspace{32bp}{\sihao\heiti\centerline{#1}}\par\vspace{14bp}}
+\newcommand\resumeitem[1]{%
+ \thu@error{The "\protect\resumeitem" is obsolete. Please update to the new format}%
+}
+\newcommand\researchitem[1]{%
+ \thu@error{The "\protect\researchitem" is obsolete. Please update to the new format}%
+}
% \end{macrocode}
-% \end{macro}
%
-% \begin{environment}{publications}
% \begin{environment}{achievements}
-% 二者分别通过两个环境 \env{publications} 和 \env{achievements} 罗
-% 列。
-%
+% 学术成果由 \env{achievements} 环境罗列。
% \begin{macrocode}
-\newlist{publications}{enumerate}{1}
-\setlist[publications]{label=[\arabic*],align=left,nosep,itemsep=8bp,
- leftmargin=10mm,labelsep=!,before=\xiaosi[1.26],resume}
\newlist{achievements}{enumerate}{1}
-\setlist[achievements]{label=[\arabic*],align=left,nosep,itemsep=8bp,
- leftmargin=10mm,labelsep=!,before=\xiaosi[1.26]}
+\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
+ },
+ resume = achievements,
+}
% \end{macrocode}
% \end{environment}
-% \end{environment}
%
-% \begin{macro}{\publicationskip}
-% \env{publications} 环境可以连续出现多次,第二类论文列表前后要空一行,使
-% 用 \cs{publicationskip}。
% \begin{macrocode}
-\def\publicationskip{\bigskip\bigskip}
+\newenvironment{publications}{%
+ \thu@deprecate{"publications" environment}{"achievements"}%
+ \begin{achievements}%
+}{%
+ \end{achievements}%
+}
+\newcommand\publicationskip{%
+ \thu@error{The "\protect\publicationskip" is obsolete. Do not use it}%
+}
% \end{macrocode}
-% \end{macro}
%
% \subsection{综合论文训练记录表}
%
@@ -5048,7 +5136,8 @@
\phantomsection
}
\pdfstringdefDisableCommands{
- \let\\\@empty
+ \let\\\relax
+ \let\quad\relax
\let\hspace\@gobble
}%
% \end{macrocode}
@@ -5108,9 +5197,11 @@
%
% 我们采用 \pkg{longtable} 来处理跨页的表格。同样我们需要设置其默认字体为五号。
% \begin{macrocode}
-\AtBeginDocument{%
- \let\thu@LT@array\LT@array
- \def\LT@array{\dawu[1.5]\thu@LT@array} % set default font size
+\AtEndOfPackageFile*{longtable}{
+ \pretocmd\LT@array{%
+ \fontsize{11bp}{14.3bp}\selectfont
+ \renewcommand\arraystretch{1.4}%
+ }{}{\thu@patch@error{\LT@array}}
}
% \end{macrocode}
%
@@ -5232,7 +5323,7 @@
\contentsuse{algorithm}{loa}
\titlecontents{algorithm}
[\z@]{}
- {\contentspush{\fname@algorithm~\thecontentslabel\hspace{\ccwd}}}{}
+ {\contentspush{\fname@algorithm~\thecontentslabel\quad}}{}
{\thu@leaders\thecontentspage}
}
% \end{macrocode}
@@ -5245,10 +5336,10 @@
\PassOptionsToPackage{algochapter}{algorithm2e}
\AtEndOfPackageFile*{algorithm2e}{
\renewcommand\algorithmcfname{\thu@algorithm@name}
- \SetAlgoCaptionLayout{dawu}
+ \SetAlgoCaptionLayout{thu@caption@font}
\SetAlCapSty{relax}
\SetAlgoCaptionSeparator{\hspace*{1em}}
- \SetAlFnt{\dawu}
+ \SetAlFnt{\fontsize{11bp}{14.3bp}\selectfont}
\renewcommand\listofalgorithms{%
\thu@listof{algorithmcf}%
}
@@ -5257,7 +5348,7 @@
\contentsuse{algocf}{loa}
\titlecontents{algocf}
[\z@]{}
- {\contentspush{\algorithmcfname~\thecontentslabel\hspace{\ccwd}}}{}
+ {\contentspush{\algorithmcfname~\thecontentslabel\quad}}{}
{\thu@leaders\thecontentspage}
}
% \end{macrocode}
@@ -5392,9 +5483,17 @@
% \subsection{其它}
% \label{sec:other}
%
-% 在模板文档结束时即装入配置文件,这样用户就能在导言区进行相应的修改。
+% 借用 \cls{ltxdoc} 和 \cls{l3doc} 里面的几个命令方便写文档。
+% \begin{macrocode}
+\DeclareRobustCommand\cs[1]{\texttt{\char`\\#1}}
+\DeclareRobustCommand\file{\nolinkurl}
+\DeclareRobustCommand\env{\textsf}
+\DeclareRobustCommand\pkg{\textsf}
+\DeclareRobustCommand\cls{\textsf}
+% \end{macrocode}
+%
% \begin{macrocode}
-\AtEndOfClass{\sloppy}
+\sloppy
%</cls>
% \end{macrocode}
%
@@ -5570,9 +5669,11 @@
\DeclareDocumentCommand{\option}{m}{\textsf{#1}}
\DeclareDocumentCommand{\env}{m}{\texttt{#1}}
\DeclareDocumentCommand{\pkg}{s m}{%
- \texttt{#2}\IfBooleanF#1{\thu@special@index{package}{#2}}}
+ \textsf{#2}\IfBooleanF#1{\thu@special@index{package}{#2}}}
+\DeclareDocumentCommand{\cls}{s m}{%
+ \textsf{#2}\IfBooleanF#1{\thu@special@index{package}{#2}}}
\DeclareDocumentCommand{\file}{s m}{%
- \texttt{#2}\IfBooleanF#1{\thu@special@index{file}{#2}}}
+ \nolinkurl{#2}\IfBooleanF#1{\thu@special@index{file}{#2}}}
\newcommand{\myentry}[1]{%
\marginpar{\raggedleft\color{purple}\bfseries\strut #1}}
\newcommand{\note}[2][Note]{{%