summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-12-29 00:14:23 +0000
committerKarl Berry <karl@freefriends.org>2015-12-29 00:14:23 +0000
commit3f859926aa0c82e95948c0cd64dfe1d9bfd0003c (patch)
treeefc79149885b73e3226c3ddc234ab335bab22561
parent32a3f4d6e166863d0c93ddc1bb3f8ef7a9bf18cd (diff)
thuthesis (27dec15)
git-svn-id: svn://tug.org/texlive/trunk@39220 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/thuthesis/README.md (renamed from Master/texmf-dist/doc/latex/thuthesis/README)0
-rw-r--r--Master/texmf-dist/doc/latex/thuthesis/data/appendix01.tex14
-rw-r--r--Master/texmf-dist/doc/latex/thuthesis/data/chap01.tex107
-rw-r--r--Master/texmf-dist/doc/latex/thuthesis/data/chap02.tex38
-rw-r--r--Master/texmf-dist/doc/latex/thuthesis/data/cover.tex119
-rw-r--r--Master/texmf-dist/doc/latex/thuthesis/data/denotation.tex8
-rw-r--r--Master/texmf-dist/doc/latex/thuthesis/dtx-style.sty24
-rw-r--r--Master/texmf-dist/doc/latex/thuthesis/figures/bachelor-cover.pdfbin351144 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/thuthesis/figures/doctor-cover.pdfbin319377 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/thuthesis/figures/doctor-ecover.pdfbin110553 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/thuthesis/figures/master-cover.pdfbin319888 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/thuthesis/figures/master-toc.pdfbin320530 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/thuthesis/figures/thanks.pdfbin36470 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/thuthesis/main.pdfbin797489 -> 796245 bytes
-rw-r--r--Master/texmf-dist/doc/latex/thuthesis/main.tex15
-rw-r--r--Master/texmf-dist/doc/latex/thuthesis/shuji.pdfbin21474 -> 21353 bytes
-rw-r--r--Master/texmf-dist/doc/latex/thuthesis/shuji.tex8
-rw-r--r--Master/texmf-dist/doc/latex/thuthesis/thuthesis.pdfbin641182 -> 666062 bytes
-rw-r--r--Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx742
-rw-r--r--Master/texmf-dist/tex/latex/thuthesis/thuthesis.cfg7
-rw-r--r--Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls125
-rw-r--r--Master/texmf-dist/tex/latex/thuthesis/thuthesis.sty14
22 files changed, 675 insertions, 546 deletions
diff --git a/Master/texmf-dist/doc/latex/thuthesis/README b/Master/texmf-dist/doc/latex/thuthesis/README.md
index 060e9ac17cf..060e9ac17cf 100644
--- a/Master/texmf-dist/doc/latex/thuthesis/README
+++ b/Master/texmf-dist/doc/latex/thuthesis/README.md
diff --git a/Master/texmf-dist/doc/latex/thuthesis/data/appendix01.tex b/Master/texmf-dist/doc/latex/thuthesis/data/appendix01.tex
index 2bef97964e4..cb0476875f5 100644
--- a/Master/texmf-dist/doc/latex/thuthesis/data/appendix01.tex
+++ b/Master/texmf-dist/doc/latex/thuthesis/data/appendix01.tex
@@ -97,7 +97,7 @@ solving linear programming.
\caption*{Table~1\hskip1em This is an example for manually numbered table, which
would not appear in the list of tables}
\label{tab:badtabular2}
- \begin{tabular}[c]{|c|m{0.8in}|c|c|c|c|c|}\hline
+ \begin{tabular}[c]{|m{1.5cm}|c|c|c|c|c|c|}\hline
\multicolumn{2}{|c|}{Network Topology} & \# of nodes &
\multicolumn{3}{c|}{\# of clients} & Server \\\hline
GT-ITM & Waxman Transit-Stub & 600 &
@@ -106,7 +106,7 @@ solving linear programming.
\multirow{2}{2em}{50\%}&
\multirow{2}{1.2in}{Max. Connectivity}\\\cline{1-3}
\multicolumn{2}{|c|}{Inet-2.1} & 6000 & & & &\\\hline
- \multirow{2}{1in}{Xue} & Rui & Ni &\multicolumn{4}{c|}{\multirow{2}*{\thuthesis}}\\\cline{2-3}
+ \multirow{2}{1.5cm}{Xue} & Rui & Ni &\multicolumn{4}{c|}{\multirow{2}*{\thuthesis}}\\\cline{2-3}
& \multicolumn{2}{c|}{ABCDEF} &\multicolumn{4}{c|}{} \\\hline
\end{tabular}
\end{table}
@@ -128,8 +128,8 @@ special-structural nonlinear programming based on the mathematical theory
concerned with analyzing the structure of problems.
\begin{figure}[h]
\centering
- \includegraphics[clip]{thu-lib-logo}
- \caption*{Figure~1\hskip1em This is an example for manually numbered figure,
+ \includegraphics{thu-lib-logo}
+ \caption*{Figure~1\quad This is an example for manually numbered figure,
which would not appear in the list of figures}
\label{tab:badfigure2}
\end{figure}
@@ -200,7 +200,7 @@ the {\em branch-and-bound enumeration} developed by Balas (1965) and Dakin
\centering
\caption*{表~1\hskip1em 这是手动编号但不出现在索引中的一个表格例子}
\label{tab:badtabular3}
- \begin{tabular}[c]{|c|m{0.8in}|c|c|c|c|c|}\hline
+ \begin{tabular}[c]{|m{1.5cm}|c|c|c|c|c|c|}\hline
\multicolumn{2}{|c|}{Network Topology} & \# of nodes &
\multicolumn{3}{c|}{\# of clients} & Server \\\hline
GT-ITM & Waxman Transit-Stub & 600 &
@@ -209,7 +209,7 @@ the {\em branch-and-bound enumeration} developed by Balas (1965) and Dakin
\multirow{2}{2em}{50\%}&
\multirow{2}{1.2in}{Max. Connectivity}\\\cline{1-3}
\multicolumn{2}{|c|}{Inet-2.1} & 6000 & & & &\\\hline
- \multirow{2}{1in}{Xue} & Rui & Ni &\multicolumn{4}{c|}{\multirow{2}*{\thuthesis}}\\\cline{2-3}
+ \multirow{2}{1.5cm}{Xue} & Rui & Ni &\multicolumn{4}{c|}{\multirow{2}*{\thuthesis}}\\\cline{2-3}
& \multicolumn{2}{c|}{ABCDEF} &\multicolumn{4}{c|}{} \\\hline
\end{tabular}
\end{table}
@@ -254,4 +254,4 @@ the {\em branch-and-bound enumeration} developed by Balas (1965) and Dakin
\chapter{其它附录}
前面两个附录主要是给本科生做例子。其它附录的内容可以放到这里,当然如果你愿意,可
-以把这部分也放到独立的文件中,然后将其 \verb|\input| 到主文件中。
+以把这部分也放到独立的文件中,然后将其 \cs{input} 到主文件中。
diff --git a/Master/texmf-dist/doc/latex/thuthesis/data/chap01.tex b/Master/texmf-dist/doc/latex/thuthesis/data/chap01.tex
index 52a4f8a6d1b..cd7f0005a3d 100644
--- a/Master/texmf-dist/doc/latex/thuthesis/data/chap01.tex
+++ b/Master/texmf-dist/doc/latex/thuthesis/data/chap01.tex
@@ -72,11 +72,11 @@
\subsection{基本表格}
\label{sec:basictable}
-模板中关于表格的宏包有三个: \textsf{booktabs}、\textsf{array} 和
-\textsf{longtabular},命令有一个 \verb|\hlinewd|。三线表可以用 \textsf{booktabs}
-提供的 \verb|\toprule|、\verb|\midrule| 和 \verb|\bottomrule|。它们与
-\textsf{longtable} 能很好的配合使用。如果表格比较简单的话可以直接用命令
-\verb|hlinewd{xpt}| 控制。
+模板中关于表格的宏包有三个: \pkg{booktabs}、\pkg{array} 和
+\pkg{longtabular},命令有一个 \cs{hlinewd}。三线表可以用 \pkg{booktabs}
+提供的 \cs{toprule}、\cs{midrule} 和 \cs{bottomrule}。它们与
+\pkg{longtable} 能很好的配合使用。如果表格比较简单的话可以直接用命令
+\cs{hlinewd}\marg{width} 控制。
\begin{table}[htb]
\centering
\begin{minipage}[t]{0.8\linewidth} % 如果想在表格中使用脚注,minipage是个不错的办法
@@ -84,7 +84,7 @@
观,所以要像 chapter 那样在前面用中括号写一个简短的标题。这个标题会出现在索
引中。}
\label{tab:template-files}
- \begin{tabular*}{\linewidth}{lp{10cm}}
+ \begin{tabularx}{\linewidth}{lX}
\toprule[1.5pt]
{\heiti 文件名} & {\heiti 描述} \\\midrule[1pt]
thuthesis.ins & \LaTeX{} 安装文件,docstrip\footnote{表格中的脚注} \\
@@ -94,13 +94,13 @@
thuthesis.bst & 参考文献 Bibtex 样式文件。\\
thuthesis.sty & 常用的包和命令写在这里,减轻主文件的负担。\\
\bottomrule[1.5pt]
- \end{tabular*}
+ \end{tabularx}
\end{minipage}
\end{table}
首先来看一个最简单的表格。表 \ref{tab:template-files} 列举了本模板主要文件及其功
能。请大家注意三线表中各条线对应的命令。这个例子还展示了如何在表格中正确使用脚注。
-由于 \LaTeX{} 本身不支持在表格中使用 \verb|\footnote|,所以我们不得不将表格放在
+由于 \LaTeX{} 本身不支持在表格中使用 \cs{footnote},所以我们不得不将表格放在
小页中,而且最好将表格的宽度设置为小页的宽度,这样脚注看起来才更美观。
\subsection{复杂表格}
@@ -115,7 +115,7 @@
\begin{minipage}[t]{0.8\textwidth}
\begin{tabularx}{\linewidth}{|l|X|X|X|X|}
\hline
- \multirow{2}*{\diagbox[width=5em]{x}{y}} & \multicolumn{2}{c|}{First Half} & \multicolumn{2}{c|}{Second Half}\\\cline{2-5}
+ \multirow{2}*{\diagbox[width=5em]{x}{y}} & \multicolumn{2}{c|}{First Half} & \multicolumn{2}{c|}{Second Half}\\\cline{2-5}
& 1st Qtr &2nd Qtr&3rd Qtr&4th Qtr \\ \hline
East$^{*}$ & 20.4& 27.4& 90& 20.4 \\
West$^{**}$ & 30.6 & 38.6 & 34.6 & 31.6 \\ \hline
@@ -126,8 +126,8 @@
\end{minipage}
\end{table}
-此外,表~\ref{tab:tabexamp1} 同时还演示了另外两个功能:1)通过 \textsf{tabularx} 的
- \texttt{|X|} 扩展实现表格自动放大;2)通过命令 \verb|\diagbox| 在表头部分
+此外,表~\ref{tab:tabexamp1} 同时还演示了另外两个功能:1)通过 \pkg{tabularx} 的
+ \texttt{|X|} 扩展实现表格自动放大;2)通过命令 \cs{diagbox} 在表头部分
插入反斜线。
为了使我们的例子更接近实际情况,我会在必要的时候插入一些“无关”文字,以免太多图
@@ -143,11 +143,12 @@
贵妃。帝欲官白,妃辄沮止。白自知不为亲近所容,恳求还山。帝赐金放还。乃浪迹江湖,
终日沉饮。永王璘都督江陵,辟为僚佐。璘谋乱,兵败,白坐长流夜郎,会赦得还。族人阳
冰为当涂令,白往依之。代宗立,以左拾遗召,而白已卒。文宗时,诏以白歌诗、裴旻剑舞、
-张旭草书为三绝云。集三十卷。今编诗二十五卷。\hfill\pozhehao《全唐诗》诗人小传
+张旭草书为三绝云。集三十卷。今编诗二十五卷。\hfill —— 《全唐诗》诗人小传
浮动体的并排放置一般有两种情况:1)二者没有关系,为两个独立的浮动体;2)二者隶属
于同一个浮动体。对表格来说并排表格既可以像图~\ref{tab:parallel1}、图~\ref{tab:parallel2}
使用小页环境,也可以如图~\ref{tab:subtable} 使用子表格来做。图的例子参见第~\ref{sec:multifig} 节。
+
\begin{table}[htbp]
\noindent\begin{minipage}{0.5\textwidth}
\centering
@@ -158,7 +159,7 @@
111 & 222 \\\midrule[1pt]
222 & 333 \\\bottomrule[1.5pt]
\end{tabular}
-\end{minipage}
+\end{minipage}%
\begin{minipage}{0.5\textwidth}
\centering
\caption{第二个并排子表格}
@@ -215,7 +216,7 @@
\centering\dawu[1.3]
\caption{复杂表格示例 2}
\label{tab:tabexamp2}
- \begin{tabular}[c]{|c|m{0.8in}|c|c|c|c|c|}\hline
+ \begin{tabular}[c]{|m{1.5cm}|c|c|c|c|c|c|}\hline
\multicolumn{2}{|c|}{Network Topology} & \# of nodes &
\multicolumn{3}{c|}{\# of clients} & Server \\\hline
GT-ITM & Waxman Transit-Stub & 600 &
@@ -224,7 +225,7 @@
\multirow{2}{2em}{50\%}&
\multirow{2}{1.2in}{Max. Connectivity}\\\cline{1-3}
\multicolumn{2}{|c|}{Inet-2.1} & 6000 & & & &\\\hline
- \multirow{2}{1in}{Xue} & Rui & Ni &\multicolumn{4}{c|}{\multirow{2}*{\thuthesis}}\\\cline{2-3}
+ \multirow{2}{1.5cm}{Xue} & Rui & Ni &\multicolumn{4}{c|}{\multirow{2}*{\thuthesis}}\\\cline{2-3}
& \multicolumn{2}{c|}{ABCDEF} &\multicolumn{4}{c|}{} \\\hline
\end{tabular}
\end{table}
@@ -246,9 +247,9 @@
都是使用 Word 等字处理工具,以为 \LaTeX{}模板的用法也应该类似,所以就沿袭同样的思
路来对待这种所见非所得的排版工具,结果被折腾的焦头烂额,疲惫不堪。
-如果您要排版的表格长度超过一页,那么推荐使用 \textsf{longtable} 或者 \textsf{supertabular}
-宏包,模板对 \textsf{longtable} 进行了相应的设置,所以用起来可能简单一些。
-表~\ref{tab:performance} 就是 \textsf{longtable} 的简单示例。
+如果您要排版的表格长度超过一页,那么推荐使用 \pkg{longtable} 或者 \pkg{supertabular}
+宏包,模板对 \pkg{longtable} 进行了相应的设置,所以用起来可能简单一些。
+表~\ref{tab:performance} 就是 \pkg{longtable} 的简单示例。
\begin{longtable}[c]{c*{6}{r}}
\caption{实验数据}\label{tab:performance}\\
\toprule[1.5pt]
@@ -299,31 +300,27 @@ EP.B.8 & 126.74 & 0.003 & 0.017 & 0.005 & 0.083 & 1656 \\
\subsection{其它}
\label{sec:tableother}
-有的同学不想让某个表格或者图片出现在索引里面,那么请使用命令 \verb|\caption*{}|,
+如果不想让某个表格或者图片出现在索引里面,请使用命令 \cs{caption*}。
这个命令不会给表格编号,也就是出来的只有标题文字而没有“表~XX”,“图~XX”,否则
索引里面序号不连续就显得不伦不类,这也是 \LaTeX{} 里星号命令默认的规则。
有这种需求的多是本科同学的英文资料翻译部分,如果你觉得附录中英文原文中的表格和图
-片显示成“ 表”和“图”很不协调的话,一个很好的办法就是用 \verb|\caption*|,参数
+片显示成“ 表”和“图”很不协调的话,一个很好的办法就是用 \cs{caption*},参数
随便自己写,比如不守规矩的表~1.111 和图~1.111 能满足这种特殊需要(可以参看附录部
分)。
\begin{table}[ht]
-\centering
- \begin{minipage}{0.45\linewidth}
- \centering
- \caption*{表~1.111\hskip1em 这是一个手动编号,不出现在索引中的表格。}
- \label{tab:badtabular}
- \begin{picture}(150,50)
- \framebox(150,50)[c]{\thuthesis}
- \end{picture}
- \end{minipage}\hfill
- \begin{minipage}{0.45\linewidth}
- \centering
- \begin{picture}(150,50)
+ \begin{minipage}{0.4\linewidth}
+ \centering
+ \caption*{表~1.111\quad 这是一个手动编号,不出现在索引中的表格。}
+ \label{tab:badtabular}
+ \framebox(150,50)[c]{\thuthesis}
+ \end{minipage}%
+ \hfill%
+ \begin{minipage}{0.4\linewidth}
+ \centering
+ \caption*{Figure~1.111\quad 这是一个手动编号,不出现在索引中的图。}
+ \label{tab:badfigure}
\framebox(150,50)[c]{薛瑞尼}
- \end{picture}
- \caption*{Figure~1.111\hskip1em 这是一个手动编号,不出现在索引中的图。}
- \label{tab:badfigure}
\end{minipage}
\end{table}
@@ -337,7 +334,7 @@ EP.B.8 & 126.74 & 0.003 & 0.017 & 0.005 & 0.083 & 1656 \\
柳宗元,字子厚(773-819),河东(今永济县)人\footnote{山西永济水饺。},是唐代
杰出的文学家,哲学家,同时也是一位政治改革家。与韩愈共同倡导唐代古文运动,并称
韩柳\footnote{唐宋八大家之首二位。}。
-\end{minipage}\\[-5pt]
+\end{minipage}
唐朝安史之乱后,宦官专权,藩镇割据,土地兼并日渐严重,社会生产破坏严重,民不聊生。柳宗
元对这种社会现实极为不满,他积极参加了王叔文领导的“永济革新”,并成为这一
@@ -372,7 +369,7 @@ EP.B.8 & 126.74 & 0.003 & 0.017 & 0.005 & 0.083 & 1656 \\
千秋万古,为留待骚人,狂歌痛饮,来访雁丘处。
\begin{proposition}
- 曾子曰:「吾日三省吾身 \pozhehao 为人谋而不忠乎?与朋友交而不信乎?传不习乎?」
+ 曾子曰:「吾日三省吾身 —— 为人谋而不忠乎?与朋友交而不信乎?传不习乎?」
\end{proposition}
多么凄美的命题啊!其日牛马嘶,新妇入青庐,奄奄黄昏后,寂寂人定初,我命绝今日,
@@ -431,7 +428,7 @@ x&\equiv y+1\pod{m^2}
忽已晚。 弃捐勿复道,努力加餐饭。
\begin{theorem}\label{the:theorem1}
-犯我强汉者,虽远必诛\hfill \pozhehao 陈汤(汉)
+犯我强汉者,虽远必诛\hfill —— 陈汤(汉)
\end{theorem}
\begin{subequations}
\begin{align}
@@ -453,7 +450,7 @@ y & = 0
风俗与化移易,吾恶知其今不异于古所云邪?聊以吾子之行卜之也。董生勉乎哉?
吾因子有所感矣。为我吊望诸君之墓,而观于其市,复有昔时屠狗者乎?为我谢
-曰:“明天子在上,可以出而仕矣!” \hfill\pozhehao 韩愈《送董邵南序》
+曰:“明天子在上,可以出而仕矣!” \hfill —— 韩愈《送董邵南序》
\end{proof}
\begin{corollary}
@@ -498,7 +495,7 @@ V_j & = v_j, & \qquad X_j & = x_j,
回答还是不回答,是个问题。
\end{problem}
-如何引用定理~\ref{the:theorem1} 呢?加上 \verb|label| 使用 \verb|ref| 即可。妾发
+如何引用定理~\ref{the:theorem1} 呢?加上 \cs{label} 使用 \cs{ref} 即可。妾发
初覆额,折花门前剧。郎骑竹马来,绕床弄青梅。同居长干里,两小无嫌猜。 十四为君妇,
羞颜未尝开。低头向暗壁,千唤不一回。十五始展眉,愿同尘与灰。常存抱柱信,岂上望夫
台。 十六君远行,瞿塘滟滪堆。五月不可触,猿声天上哀。门前迟行迹,一一生绿苔。苔深
@@ -527,9 +524,10 @@ V_j & = v_j, & \qquad X_j & = x_j,
\begin{verbatim}
\RequirePackage{hyperref}
\end{verbatim}
-一行改为
+一行改为:
\begin{verbatim}
-\PassOptionsToPackage{hyphens}{url}\RequirePackage{hyperref}
+\PassOptionsToPackage{hyphens}{url}
+\RequirePackage{hyperref}
\end{verbatim}
使得连字符处可以断行。更多设置可以参考 \texttt{url} 宏包文档。
@@ -543,7 +541,7 @@ p(y|\mathbf{x}) = \frac{p(\mathbf{x},y)}{p(\mathbf{x})}=
\frac{p(\mathbf{x}|y)p(y)}{p(\mathbf{x})}
\end{equation}
-论文里面公式越多,\TeX{} 就越 happy。再看一个 \textsf{amsmath} 的例子:
+论文里面公式越多,\TeX{} 就越 happy。再看一个 \pkg{amsmath} 的例子:
\newcommand{\envert}[1]{\left\lvert#1\right\rvert}
\begin{equation}\label{detK2}
\det\mathbf{K}(t=1,t_1,\dots,t_n)=\sum_{I\in\mathbf{n}}(-1)^{\envert{I}}
@@ -552,7 +550,7 @@ p(y|\mathbf{x}) = \frac{p(\mathbf{x},y)}{p(\mathbf{x})}=
\end{equation}
前面定理示例部分列举了很多公式环境,可以说把常见的情况都覆盖了,大家在写公式的时
-候一定要好好看 \textsf{amsmath} 的文档,并参考模板中的用法:
+候一定要好好看 \pkg{amsmath} 的文档,并参考模板中的用法:
\begin{multline*}%\tag{[b]} % 这个出现在索引中的
\int_a^b\biggl\{\int_a^b[f(x)^2g(y)^2+f(y)^2g(x)^2]
-2f(x)g(x)f(y)g(y)\,dx\biggr\}\,dy \\
@@ -575,24 +573,3 @@ p(y|\mathbf{x}) = \frac{p(\mathbf{x},y)}{p(\mathbf{x})}=
\end{array}\right.
\end{equation}
这些跟规划相关的公式都来自于刘宝碇老师《不确定规划》的课件。
-
-\section{破折号}
-\label{sec:pozhehao}
-
-中文破折号为一个两个字宽垂直居中的直线,输入法直接得到的破折号是两个断开的小短线
-(——),这看起来不舒服。所以我定义了一个破折号的命令 \verb|\pozhehao|,请看几个
-例子:
-\begin{itemize}
-\item 这是一个 \pozhehao 破折号
- \begin{enumerate}[(1)]
- \item 同时也可以看看
- \item 不同列表环境的间距
- \end{enumerate}
-\item 看起来这个要好一些
-\item 破折号 \pozhehao 就说到这里。
-\end{itemize}
-
-默认的列表环境上下间距很大,模板将其重定义为 \textsf{paralist} 中的压缩环境,看起
-来要好一些。如果还是不满意,自己也可以调 \verb|\itemsep| 的。\textsf{paralist} 还
-可以方便的指定标签的样式。
-
diff --git a/Master/texmf-dist/doc/latex/thuthesis/data/chap02.tex b/Master/texmf-dist/doc/latex/thuthesis/data/chap02.tex
index f9667200aec..75057458b36 100644
--- a/Master/texmf-dist/doc/latex/thuthesis/data/chap02.tex
+++ b/Master/texmf-dist/doc/latex/thuthesis/data/chap02.tex
@@ -20,21 +20,21 @@ p(y|\mathbf{x}) = \frac{p(\mathbf{x},y)}{p(\mathbf{x})}=
\subsection{绘图}
\label{sec:draw}
-本模板不再预先装载任何绘图包(如 \textsf{pstricks,pgf} 等),完全由你自己来决定。
-个人觉得 \textsf{pgf} 不错,不依赖于 Postscript。此外还有很多针对 \LaTeX{} 的
+本模板不再预先装载任何绘图包(如 \pkg{pstricks,pgf} 等),完全由你自己来决定。
+个人觉得 \pkg{pgf} 不错,不依赖于 Postscript。此外还有很多针对 \LaTeX{} 的
GUI 作图工具,如 XFig(jFig), WinFig, Tpx, Ipe, Dia, Inkscape, LaTeXPiX,
jPicEdt, jaxdraw 等等。
\subsection{插图}
\label{sec:graphs}
-强烈推荐《\LaTeXe 插图指南》!关于子图形的使用细节请参看 \textsf{subcaption} 宏包的说明文档。
+强烈推荐《\LaTeXe 插图指南》!关于子图形的使用细节请参看 \pkg{subcaption} 宏包的说明文档。
\subsubsection{一个图形}
\label{sec:onefig}
一般图形都是处在浮动环境中。之所以称为浮动是指最终排版效果图形的位置不一定与源文
件中的位置对应\footnote{This is not a bug, but a feature of \LaTeX!},这也是刚使
-用 \LaTeX{} 同学可能遇到的问题。如果要强制固定浮动图形的位置,请使用 \textsf{float} 宏包,
+用 \LaTeX{} 同学可能遇到的问题。如果要强制固定浮动图形的位置,请使用 \pkg{float} 宏包,
它提供了 \texttt{[H]} 参数,比如图~\ref{fig:xfig1}。
\begin{figure}[H] % use float package if you want it here
\centering
@@ -51,25 +51,26 @@ jPicEdt, jaxdraw 等等。
平。自天子以至于庶人,壹是皆以修身为本。其本乱而未治者 否矣。其所厚者薄,而其所
薄者厚,未之有也!
-\hfill \pozhehao《大学》
+\hfill —— 《大学》
\subsubsection{多个图形}
\label{sec:multifig}
-如果多个图形相互独立,并不共用一个图形计数器,那么用 \verb|minipage| 或者
-\verb|parbox| 就可以。否则,请参看图~\ref{fig:big1-subcaptionbox},它包含两个小图,分别是图~\ref{fig:subfig1}
-和图~\ref{fig:subfig2}。推荐使用\verb|\subcaptionbox|,
-因为可以像图~\ref{fig:big1-subcaptionbox} 那样对齐子图的标题,
-也可以使用\textsf{subcaption}宏包的\verb|\subcaption|(放在minipage中,用法同\verb|\caption|)
-或是 subfigure 、 subtable环境,像图~\ref{fig:big1-subfigure},不要再用 \verb|\subfloat|、
-\verb|\subfigure| 和 \verb|\subtable|。
+如果多个图形相互独立,并不共用一个图形计数器,那么
+用 \texttt{minipage} 或者\texttt{parbox} 就可以。否则,请参看
+图~\ref{fig:big1-subcaptionbox},它包含两个小图,分别是图~\ref{fig:subfig1}和
+图~\ref{fig:subfig2}。推荐使用\cs{subcaptionbox},因为可以像
+图~\ref{fig:big1-subcaptionbox} 那样对齐子图的标题,也可以使
+用\pkg{subcaption}宏包的\cs{subcaption}(放在 minipage中,用法同\cs{caption})
+或是 \pkg{subfigure} 、 \pkg{subtable}环境,像图~\ref{fig:big1-subfigure},
+不要再用 \cs{subfloat}、\cs{subfigure} 和 \cs{subtable}。
+
\begin{figure}[h]
\centering%
- \subcaptionbox{第一个小图形\label{fig:subfig1}}
- [3cm] %标题的长度,超过则会换行,如下一个小图。
- {\includegraphics[height=3cm]{thu-fig-logo}}
- \hspace{4em}%
+ \subcaptionbox{第一个小图形\label{fig:subfig1}}[3cm] %标题的长度,超过则会换行,如下一个小图。
+ {\includegraphics[height=3cm]{thu-fig-logo}}%
+ \hspace{4em}%
\subcaptionbox{第二个小图形,注意这个图略矮些。如果标题很长的话,它会自动换行\label{fig:subfig2}}
{\includegraphics[height=2cm]{thu-text-logo}}
\caption{包含子图形的大图形(subcaptionbox示例)}
@@ -80,7 +81,7 @@ jPicEdt, jaxdraw 等等。
\begin{subfigure}{3cm}
\includegraphics[height=3cm]{thu-fig-logo}
\caption{第一个小图形}
- \end{subfigure}
+ \end{subfigure}%
\hspace{4em}%
\begin{subfigure}{0.5\textwidth}
\includegraphics[height=2cm]{thu-text-logo}
@@ -89,6 +90,7 @@ jPicEdt, jaxdraw 等等。
\caption{包含子图形的大图形(subfigure示例)}
\label{fig:big1-subfigure}
\end{figure}
+
古之学者必有师。师者,所以传道受业解惑也。人非生而知之者,孰能无惑?惑而不从师,
其为惑也,终不解矣。生乎吾前,其闻道也固先乎吾,吾从而师之;生乎吾後,其闻道也亦
先乎吾,吾从而师之。吾师道也,夫庸知其年之先後生於吾乎!是故无贵无贱无长无少,道
@@ -124,4 +126,4 @@ jPicEdt, jaxdraw 等等。
李氏子蟠,年十七,好古文、六艺,经传皆通习之,不拘於时,学於余。余嘉其能行古
道,作师说以贻之。
-\hfill \pozhehao 韩愈(唐)
+\hfill —— 韩愈(唐)
diff --git a/Master/texmf-dist/doc/latex/thuthesis/data/cover.tex b/Master/texmf-dist/doc/latex/thuthesis/data/cover.tex
index 06f10d484cb..7281174007d 100644
--- a/Master/texmf-dist/doc/latex/thuthesis/data/cover.tex
+++ b/Master/texmf-dist/doc/latex/thuthesis/data/cover.tex
@@ -2,62 +2,66 @@
%%% mode: latex
%%% TeX-master: t
%%% End:
-\secretlevel{绝密} \secretyear{2100}
-\ctitle{清华大学学位论文 \LaTeX\ 模板\\使用示例文档}
-% 根据自己的情况选,不用这样复杂
-\makeatletter
-\ifthu@bachelor\relax\else
- \ifthu@doctor
- \cdegree{工学博士}
- \else
- \ifthu@master
- \cdegree{工学硕士}
- \fi
- \fi
-\fi
-\makeatother
-
-
-\cdepartment[计算机]{计算机科学与技术系}
-\cmajor{计算机科学与技术}
-\cauthor{薛瑞尼}
-\csupervisor{郑纬民教授}
-% 如果没有副指导老师或者联合指导老师,把下面两行相应的删除即可。
-\cassosupervisor{陈文光教授}
-\ccosupervisor{某某某教授}
-% 日期自动生成,如果你要自己写就直接改这个cdate。
-% 硕博也可以启用如下三行,替换其中的\the\year和\the\month为阿拉伯数字。
-%\cdate{\zhdigits{\the\year}年\zhnumber{\the\month}月}
-
-% 博士后部分
-% \cfirstdiscipline{计算机科学与技术}
-% \cseconddiscipline{系统结构}
-% \postdoctordate{2009年7月——2011年7月}
-
-\etitle{An Introduction to \LaTeX{} Thesis Template of Tsinghua University}
-% 这块比较复杂,需要分情况讨论:
-% 1. 学术型硕士
-% \edegree:必须为Master of Arts或Master of Science(注意大小写)
-% “哲学、文学、历史学、法学、教育学、艺术学门类,公共管理学科
-% 填写Master of Arts,其它填写Master of Science”
-% \emajor:“获得一级学科授权的学科填写一级学科名称,其它填写二级学科名称”
-% 2. 专业型硕士
-% \edegree:“填写专业学位英文名称全称”
-% \emajor:“工程硕士填写工程领域,其它专业学位不填写此项”
-% 3. 学术型博士
-% \edegree:Doctor of Philosophy(注意大小写)
-% \emajor:“获得一级学科授权的学科填写一级学科名称,其它填写二级学科名称”
-% 4. 专业型博士
-% \edegree:“填写专业学位英文名称全称”
-% \emajor:不填写此项
-\edegree{Doctor of Engineering}
-\emajor{Computer Science and Technology}
-\eauthor{Xue Ruini}
-\esupervisor{Professor Zheng Weimin}
-\eassosupervisor{Chen Wenguang}
-% 这个日期也会自动生成,你要改么?
-% \edate{December, 2005}
+\thusetup{
+ %%%%%%%%%%%%%%%%%%%%%%%%%
+ % 注意:配置里面不要出现空行
+ %%%%%%%%%%%%%%%%%%%%%%%%%
+ % 不需要就注释掉
+ secretlevel={绝密},
+ secretyear={2100},
+ %
+ % 中文信息
+ ctitle={清华大学学位论文 \LaTeX\ 模板\\使用示例文档},
+ cdegree={工学硕士},
+ % cdepartment允许在[]中输入简称
+ cdepartment={[计算机]{计算机科学与技术系}},
+ cmajor={计算机科学与技术},
+ cauthor={薛瑞尼},
+ csupervisor={郑纬民教授},
+ % 根据实际情况相应注释以下两行:
+ cassosupervisor={陈文光教授}, % 副指导老师
+ ccosupervisor={某某某教授}, % 联合指导老师
+ % 日期自动使用当前时间,若需指定按如下方式修改:
+ % cdate={超新星纪元},
+ %
+ % 博士后专有部分
+ % cfirstdiscipline={计算机科学与技术},
+ % cseconddiscipline={系统结构},
+ % postdoctordate={2009年7月——2011年7月},
+ % id={what?},
+ % udc={what?},
+ % catalognumber={what},
+ %
+ % 英文信息
+ etitle={An Introduction to \LaTeX{} Thesis Template of Tsinghua University},
+ % 这块比较复杂,需要分情况讨论:
+ % 1. 学术型硕士
+ % edegree:必须为Master of Arts或Master of Science(注意大小写)
+ % “哲学、文学、历史学、法学、教育学、艺术学门类,公共管理学科
+ % 填写Master of Arts,其它填写Master of Science”
+ % emajor:“获得一级学科授权的学科填写一级学科名称,其它填写二级学科名称”
+ % 2. 专业型硕士
+ % edegree:“填写专业学位英文名称全称”
+ % emajor:“工程硕士填写工程领域,其它专业学位不填写此项”
+ % 3. 学术型博士
+ % edegree:Doctor of Philosophy(注意大小写)
+ % emajor:“获得一级学科授权的学科填写一级学科名称,其它填写二级学科名称”
+ % 4. 专业型博士
+ % edegree:“填写专业学位英文名称全称”
+ % emajor:不填写此项
+ edegree={Doctor of Engineering},
+ emajor={Computer Science and Technology},
+ eauthor={Xue Ruini},
+ esupervisor={Professor Zheng Weimin},
+ eassosupervisor={Chen Wenguang},
+ % 日期自动生成,若需指定按如下方式修改:
+ % edate={December, 2005}
+ %
+ % 关键词用“英文逗号”分割
+ ckeywords={\TeX, \LaTeX, CJK, 模板, 论文},
+ ekeywords={\TeX, \LaTeX, CJK, template, thesis}
+}
% 定义中英文摘要和关键字
\begin{cabstract}
@@ -84,7 +88,8 @@
理。英文关键词同理。)
\end{cabstract}
-\ckeywords{\TeX, \LaTeX, CJK, 模板, 论文}
+% 如果习惯关键字跟在摘要文字后面,可以用直接命令来设置,如下:
+% \ckeywords{\TeX, \LaTeX, CJK, 模板, 论文}
\begin{eabstract}
An abstract of a dissertation is a summary and extraction of research work
@@ -106,4 +111,4 @@
words, with semi-colons used in between to separate one another.
\end{eabstract}
-\ekeywords{\TeX, \LaTeX, CJK, template, thesis}
+% \ekeywords{\TeX, \LaTeX, CJK, template, thesis}
diff --git a/Master/texmf-dist/doc/latex/thuthesis/data/denotation.tex b/Master/texmf-dist/doc/latex/thuthesis/data/denotation.tex
index 73675043031..981541d42c4 100644
--- a/Master/texmf-dist/doc/latex/thuthesis/data/denotation.tex
+++ b/Master/texmf-dist/doc/latex/thuthesis/data/denotation.tex
@@ -10,15 +10,15 @@
\item[MPBI] 聚苯并咪唑模型化合物,N-苯基苯并咪唑
\item[PY] 聚吡咙
\item[PMDA-BDA] 均苯四酸二酐与联苯四胺合成的聚吡咙薄膜
-\item[$\Delta G$] 活化自由能~(Activation Free Energy)
-\item [$\chi$] 传输系数~(Transmission Coefficient)
+\item[$\Delta G$] 活化自由能 (Activation Free Energy)
+\item [$\chi$] 传输系数 (Transmission Coefficient)
\item[$E$] 能量
\item[$m$] 质量
\item[$c$] 光速
\item[$P$] 概率
\item[$T$] 时间
\item[$v$] 速度
-\item[劝 学] 君子曰:学不可以已。青,取之于蓝,而青于蓝;冰,水为之,而寒于水。木
+\item[劝学] 君子曰:学不可以已。青,取之于蓝,而青于蓝;冰,水为之,而寒于水。木
直中绳。輮以为轮,其曲中规。虽有槁暴,不复挺者,輮使之然也。故木受绳则直,金就
砺则利,君子博学而日参省乎己,则知明而行无过矣。吾尝终日而思矣,不如须臾之所学
也;吾尝跂而望矣,不如登高之博见也。登高而招,臂非加长也,而见者远;顺风而呼,
@@ -27,5 +27,5 @@
而神明自得,圣心备焉。故不积跬步,无以至千里;不积小流,无以成江海。骐骥一跃,
不能十步;驽马十驾,功在不舍。锲而舍之,朽木不折;锲而不舍,金石可镂。蚓无爪牙
之利,筋骨之强,上食埃土,下饮黄泉,用心一也。蟹六跪而二螯,非蛇鳝之穴无可寄托
- 者,用心躁也。\pozhehao{} 荀况
+ 者,用心躁也。—— 荀况
\end{denotation}
diff --git a/Master/texmf-dist/doc/latex/thuthesis/dtx-style.sty b/Master/texmf-dist/doc/latex/thuthesis/dtx-style.sty
index ec677025eb9..c4c0e773198 100644
--- a/Master/texmf-dist/doc/latex/thuthesis/dtx-style.sty
+++ b/Master/texmf-dist/doc/latex/thuthesis/dtx-style.sty
@@ -1,7 +1,7 @@
\ProvidesPackage{dtx-style}
\RequirePackage[UTF8,scheme=chinese]{ctex}
-\RequirePackage[top=2.5cm, bottom=2.5cm]{geometry}
+\RequirePackage[top=2.5cm, bottom=2.5cm, headsep=5mm]{geometry}
\RequirePackage{calc}
\RequirePackage{array,longtable}
@@ -9,9 +9,10 @@
\RequirePackage{fancyhdr}
\RequirePackage{xcolor}
\RequirePackage{url}
+\RequirePackage{hyperref}
+\RequirePackage{enumitem}
\RequirePackage{ifxetex}
-\RequirePackage{hyperref}
\hypersetup{%
bookmarksnumbered=true,
bookmarksopen=true,
@@ -30,6 +31,7 @@
CJKbookmarks=false}
\fi
+\setlist{nosep}
\def\SpecialOptionIndex#1{\@bsphack%
\index{#1\actualchar{\protect\bfseries #1}}\@esphack}
\newenvironment{options}
@@ -41,19 +43,25 @@
\ovalbox{\color{magenta}\bfseries\sffamily ##1}%
\SpecialOptionIndex{##1}}}
}{\endlist}
+
\DefineVerbatimEnvironment{example}{Verbatim}%
{frame=single,framerule=0.3mm,rulecolor=\color{violet},%
fillcolor=\color{violet!5},framesep=1mm,baselinestretch=1.2,%
fontsize=\small,gobble=1}
+
\DefineVerbatimEnvironment{shell}{Verbatim}%
{frame=single,framerule=0.3mm,rulecolor=\color{olive},%
fillcolor=\color{olive!5},framesep=1mm,fontsize=\small,gobble=1}
-\newcommand{\myentry}[1]{%
- \vskip5pt\par\noindent\llap{{\color{purple}\bfseries #1}}\marginpar{\strut}\hskip\parindent}
+
+\newcommand{\myentry}[1]{\vskip5pt\par%
+ \noindent\llap{{\color{purple}\bfseries #1}}%
+ \marginpar{\strut}\hskip\parindent}
+
\MakeShortVerb{\|}
-\def\pkg#1{\texttt{#1}}
-\def\option#1{\textsf{#1}}
-\def\file#1{\textsl{#1}}
+
+\newcommand*\pkg[1]{\texttt{#1}}
+\newcommand*\option[1]{\textsf{#1}}
+\newcommand*\file[1]{\textsl{#1}}
\def\thuthesis{\textsc{Thu}\-\textsc{Thesis}}
\newcommand{\note}[1]{\par%
- {\color{magenta}\bfseries 说明:#1}}
+ {\color{magenta}{\bfseries 说明:}\emph{#1}}}
diff --git a/Master/texmf-dist/doc/latex/thuthesis/figures/bachelor-cover.pdf b/Master/texmf-dist/doc/latex/thuthesis/figures/bachelor-cover.pdf
deleted file mode 100644
index 83a9ce1fa38..00000000000
--- a/Master/texmf-dist/doc/latex/thuthesis/figures/bachelor-cover.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/thuthesis/figures/doctor-cover.pdf b/Master/texmf-dist/doc/latex/thuthesis/figures/doctor-cover.pdf
deleted file mode 100644
index e2578f0a671..00000000000
--- a/Master/texmf-dist/doc/latex/thuthesis/figures/doctor-cover.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/thuthesis/figures/doctor-ecover.pdf b/Master/texmf-dist/doc/latex/thuthesis/figures/doctor-ecover.pdf
deleted file mode 100644
index 2ddbe5720bf..00000000000
--- a/Master/texmf-dist/doc/latex/thuthesis/figures/doctor-ecover.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/thuthesis/figures/master-cover.pdf b/Master/texmf-dist/doc/latex/thuthesis/figures/master-cover.pdf
deleted file mode 100644
index d7fd5d83548..00000000000
--- a/Master/texmf-dist/doc/latex/thuthesis/figures/master-cover.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/thuthesis/figures/master-toc.pdf b/Master/texmf-dist/doc/latex/thuthesis/figures/master-toc.pdf
deleted file mode 100644
index 3d088071334..00000000000
--- a/Master/texmf-dist/doc/latex/thuthesis/figures/master-toc.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/thuthesis/figures/thanks.pdf b/Master/texmf-dist/doc/latex/thuthesis/figures/thanks.pdf
deleted file mode 100644
index 924b42cc64c..00000000000
--- a/Master/texmf-dist/doc/latex/thuthesis/figures/thanks.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/thuthesis/main.pdf b/Master/texmf-dist/doc/latex/thuthesis/main.pdf
index c3397265018..d2935a36509 100644
--- a/Master/texmf-dist/doc/latex/thuthesis/main.pdf
+++ b/Master/texmf-dist/doc/latex/thuthesis/main.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/thuthesis/main.tex b/Master/texmf-dist/doc/latex/thuthesis/main.tex
index b895ac1b28e..ec87346d311 100644
--- a/Master/texmf-dist/doc/latex/thuthesis/main.tex
+++ b/Master/texmf-dist/doc/latex/thuthesis/main.tex
@@ -13,24 +13,19 @@
% 所有其它可能用到的包都统一放到这里了,可以根据自己的实际添加或者删除。
\usepackage{thuthesis}
-% 你可以在这里修改配置文件中的定义,导言区可以使用中文。
+% 定义所有的图片文件在 figures 子目录下
+\graphicspath{{figures/}}
+
+% 可以在这里修改配置文件中的定义。导言区可以使用中文。
% \def\myname{薛瑞尼}
\begin{document}
-% 定义所有的eps文件在 figures 子目录下
-\graphicspath{{figures/}}
-
-
%%% 封面部分
\frontmatter
\input{data/cover}
-% 设置 PDF 文档的作者、主题等属性
-\makeatletter
-\thu@setup@pdfinfo
-\makeatother
% 如果使用授权说明扫描页,将可选参数中指定为扫描得到的 PDF 文件名,例如:
-%\makecover[scan-auth.pdf]
+% \makecover[scan-auth.pdf]
\makecover
% 目录
diff --git a/Master/texmf-dist/doc/latex/thuthesis/shuji.pdf b/Master/texmf-dist/doc/latex/thuthesis/shuji.pdf
index 00eee593f6b..5809699807f 100644
--- a/Master/texmf-dist/doc/latex/thuthesis/shuji.pdf
+++ b/Master/texmf-dist/doc/latex/thuthesis/shuji.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/thuthesis/shuji.tex b/Master/texmf-dist/doc/latex/thuthesis/shuji.tex
index e0a0eed0b14..66973cfdb3b 100644
--- a/Master/texmf-dist/doc/latex/thuthesis/shuji.tex
+++ b/Master/texmf-dist/doc/latex/thuthesis/shuji.tex
@@ -1,4 +1,4 @@
-\documentclass{thuthesis}
+\documentclass[type=master]{thuthesis}
\ifxetex
\setCJKfamilyfont{zhfs}[RawFeature={vertical:}]{FangSong}
@@ -7,8 +7,10 @@
\fi
\begin{document}
-\cauthor{薛瑞尼}
-\ctitle{没有英文的中文标题}
+\thusetup{
+ cauthor={薛瑞尼},
+ ctitle={没有英文的中文标题}
+}
\shuji % 使用默认标题和默认作者
diff --git a/Master/texmf-dist/doc/latex/thuthesis/thuthesis.pdf b/Master/texmf-dist/doc/latex/thuthesis/thuthesis.pdf
index 6aa488aabe8..d07befa1f52 100644
--- a/Master/texmf-dist/doc/latex/thuthesis/thuthesis.pdf
+++ b/Master/texmf-dist/doc/latex/thuthesis/thuthesis.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx b/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx
index 10be7444974..8026578ca4a 100644
--- a/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx
+++ b/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx
@@ -18,7 +18,7 @@
%
% \iffalse
%<*driver>
-\ProvidesFile{thuthesis.dtx}[2015/12/24 5.0 Tsinghua University Thesis Template]
+\ProvidesFile{thuthesis.dtx}[2015/12/27 5.1.0 Tsinghua University Thesis Template]
\documentclass{ltxdoc}
\usepackage{dtx-style}
@@ -91,12 +91,17 @@
% \changes{v2.5.1}{2006/05/24}{根据教务处的新要求调整附录部分。}
% \changes{v2.5.1}{2006/05/25}{参考文献中杂志文章如果没有卷号,那么页码直接跟在
% 年份后面,并用句点分割。在 \file{thubib.bst} 中增加 output.year 函数。}
-% \changes{v2.6.1}{2006/06/16}{取消 \file{thubib.bst} 中 inbook 类 volume 后的页码。}
+% \changes{v2.6.1}{2006/06/16}{取消 \file{thubib.bst} 中 inbook 类 volume 后的页
+% 码。}
+% \changes{v3.0}{2007/05/12}{没有了综合论文训练页面,很多本科论文专用命令就消失了。}
+% \changes{v4.4}{2008/05/12}{修复网址断字。}
+% \changes{v4.5}{2008/01/03}{加入 XeTeX 支持,需要 \pkg{xeCJK}。}
% \changes{v4.5}{2008/01/04}{彻底转向 UTF-8,并支持 xelatex。}
% \changes{v4.6}{2011/04/27}{增加博士后文档部分。}
% \changes{v4.6}{2011/10/22}{使用手册更新。}
% \changes{v4.7}{2012/06/12}{去掉 \pkg{hypernat} 依赖,\pkg{hyperref} 和 \pkg{natbib} 可以很好配合了。}
-% \changes{v4.8}{2014/11/25}{好几年累积的一些更新,最重要的是切换到 \pkg{ctex}。}
+% \changes{v4.8}{2013/03/04}{dvips method is deprecated. We ask their users to load it manually.}
+% \changes{v4.8}{2014/11/25}{好几年累积的一些更新,最重要的是切换到 \CTeX。}
%
% \DoNotIndex{\begin,\end,\begingroup,\endgroup,\par,\\}
% \DoNotIndex{\if,\ifx,\ifdim,\ifnum,\ifcase,\else,\or,\fi}
@@ -118,12 +123,9 @@
% \GlossaryPrologue{\section*{修改记录}%
% \addcontentsline{toc}{section}{修改记录}}
%
-% \renewcommand{\abstractname}{摘~~要}
-% \renewcommand{\contentsname}{目~~录}
%
-% \title{\bfseries\thuthesis:清华大学学位论文模板\thanks{Tsinghua University \LaTeX{} Thesis Template.}}
-% \author{{\fangsong 薛瑞尼\thanks{LittleLeo@newsmth}}\\[5pt]{\fangsong 清华大学
-% 计算机系高性能所\thanks{目前于电子科技大学工作。}}\\[5pt] \texttt{xueruini@gmail.com}}
+% \title{\bfseries\thuthesis:清华大学学位论文模板\thanks{\textbf{T}sing\textbf{h}ua \textbf{U}niversity \LaTeX{} \textbf{Thesis} Template.}}
+% \author{{\fangsong 薛瑞尼\thanks{LittleLeo@newsmth}}\\[5pt] \texttt{xueruini@gmail.com}}
% \date{v\fileversion\ (\filedate)}
% \maketitle\thispagestyle{empty}
%
@@ -178,11 +180,19 @@
% \label{sec:installation}
%
% \subsection{下载}
+% \thuthesis{} 已经包含在主要的 \TeX{} 发行版中,一般不需要安装,阅读文档可以使
+% 用以下命令:
+% \begin{shell}
+% $ texdoc thuthesis
+% \end{shell}
+%
+% 如果要自己安装,请继续阅读。
% \thuthesis{} 相关链接:
% \begin{itemize}
% \item 主页:\href{https://github.com/xueruini/thuthesis}{GitHub}
% \item 下载:\href{http://www.ctan.org/pkg/thuthesis}{CTAN}
% \end{itemize}
+%
% 除此之外,不再维护任何镜像。
%
%
@@ -214,10 +224,11 @@
% Makefile & self-explanation\\
% latexmkrc & latexmk 配置文件 \\
% zhfonts.py & 生成中文字体配置文件\\
-% README.md & self-explanation\\
+% README.md & Readme\\
% \textbf{thuthesis.pdf} & 用户手册(本文档)\\\hline
% \end{longtable}
% \end{center}
+%
% 几点说明:
% \begin{itemize}
% \item \file{thuthesis.cls} 和 \file{thuthesis.cfg} 可以由 \file{thuthesis.ins}
@@ -265,7 +276,7 @@
% \label{sec:xelatex}
% 很多用户对 \LaTeX{} 命令执行的次数不太清楚,一个基本的原则是多次运行 \LaTeX{}命
% 令直至不再出现警告。下面给出生成示例文档的详细过程(\# 开头的行为注释),首先来
-% 看比较推荐的 \texttt{xelatex} 方式:
+% 看推荐的 \texttt{xelatex} 方式:
% \begin{shell}
% # 1. 发现里面的引用关系,文件后缀 .tex 可以省略
% $ xelatex main
@@ -366,13 +377,8 @@
% \item \href{http://groups.google.com/group/thuthesis}{ThuThesis@Google Groups}
% \end{itemize}
%
-% \subsection{\thuthesis{} 使用向导}
+% \subsection{示例文件}
% \label{sec:userguide}
-% 推荐新用户先看网上的《\thuthesis{} 使用向导》幻灯片\footnote{有点老了,不过还是
-% 很有帮助的。},那份讲稿比这份文档简练易懂。
-%
-% \subsection{\thuthesis{} 示例文件}
-% \label{sec:userguide1}
% 模板核心文件有四
% 个:\file{thuthesis.cls},\file{thuthesis.cfg},\file{ctex-fontset-thuthesis.def} 和
% \file{thuthesis.bst},但是如果没有示例文档用户会发现很难下手。所以推荐新用户从模板
@@ -393,15 +399,14 @@
% % 所有其它可能用到的包都统一放到这里了,可以根据自己的实际添加或者删除。
% \usepackage{thuthesis}
%
+% % 指定图片的搜索目录
+% \graphicspath{{figures/}}
+%
% % 可以在这里修改配置文件中的定义,导言区可以使用中文。
% % \def\myname{薛瑞尼}
%
% \begin{document}
%
-% % 指定图片的搜索目录
-% \graphicspath{{figures/}}
-%
-%
% %%% 封面部分
% \frontmatter
% \input{data/cover}
@@ -415,13 +420,11 @@
% % 符号对照表
% \input{data/denotation}
%
-%
% %%% 正文部分
% \mainmatter
% \include{data/chap01}
% \include{data/chap02}
%
-%
% %%% 其它部分
% \backmatter
% % 插图索引
@@ -431,14 +434,12 @@
% % 公式索引
% \listofequations
%
-%
% % 参考文献
-% % 注意至少需要引用一篇参考文献,否则下面两行可能引起编译错误。
+% % 注意:至少需要引用一篇参考文献,否则下面两行可能引起编译错误。
% % 如果不需要参考文献,请将下面两行删除或注释掉。
% \bibliographystyle{thuthesis}
% \bibliography{ref/refs}
%
-%
% % 致谢
% \include{data/ack}
%
@@ -453,13 +454,15 @@
% \end{document}
% \end{example}
%
-% \subsection{选项}
+% \subsection{论文选项}
% \label{sec:option}
% 本模板提供了一些选项以方便使用:
% \begin{options}
-% \changes{v4.8.2}{2015/12/13}{使用 \pkg{kvoptions} 简化选项 type。}
+% \changes{v5.0.0}{2015/12/13}{使用 \pkg{kvoptions} 简化选项 type。}
% \item[type]
-% 选择论文类型,当前支持:bachelor,master,doctor,postdoctor。默认为:bachelor。
+% 选择论文类型,当前支
+% 持:\option{bachelor},\option{master},\option{doctor},\option{postdoctor}。
+% 为必选项。
% \begin{example}
% \documentclass[type=doctor]{thuthesis}
% \end{example}
@@ -480,33 +483,36 @@
% 正规出版物的章节出现在奇数页,也就是右手边的页面,这就是 \option{openright},
% 也是 \thuthesis\ 的默认选项。在这种情况下,如果前一章的最后一页也是奇数,那么
% 模板会自动生成一个纯粹的空白页,很多人不是很习惯这种方式,而且学校的格式似乎
-% 更倾向于页面连续,那就是通常所说的 \option{openany}。{\fangsong 目前所有论文
-% 都是 \option{openany}。}这两个选项不用专门设置,\thuthesis{} 会根据当前论文类
+% 更倾向于页面连续,那就是通常所说的 \option{openany}。\footnote{目前所有论文
+% 都是 \option{openany}。}这两个选项不用设置,\thuthesis{} 会根据当前论文类
% 型自动选择。
%
% \item[arial]
-% 使用真正的 \option{arial} 字体。此选项会装载 \pkg{arial} 字体宏包,如果此宏包
+% 使用真正的 \emph{Arial} 字体。此选项会装载 \pkg{Arial} 字体宏包,如果此宏包
% 不存在,就装
% 载 \pkg{Helvet}。\option{arialtoc} 和 \option{arialtitle} 不受
-% \texttt{arial} 的影响。因为一般的 \TeX{} 发行都没有 \pkg{arial} 字体,所以默
-% 认采用 \pkg{Helvet},二者效果非常相似。如果一定要用 \pkg{arial} 字体,请参
+% \option{arial} 选项的影响。因为一般的 \TeX{} 发行都没有 \emph{Arial} 字体,所以默
+% 认采用 \pkg{Helvet},二者效果非常相似。如果一定要用 \emph{Arial} 字体,请参
% 看:\href{http://www.mail-archive.com/ctan-ann@dante.de/msg00627.html}{Arial
% 字体}。
%
% \item[arialtoc]
-% 目录项(章目录项除外)中的英文是否用 \option{arial} 字体。本选项
+% 目录项(章目录项除外)中的英文是否用 \emph{Arial} 字体。本选项
% 和 \option{arialtitle} 都不用用户干预,模板根据当前论文类型自动设置。
%
% \item[arialtitle]
-% 章节标题中英文是否用 \option{arial} 字体(默认打开)。
+% 章节标题中英文是否用 \emph{Arial} 字体(默认打开)。
% \end{options}
%
-% \subsection{字体配置}
+% \subsection{中文字体}
+% \label{sec:chinese-fonts}
+%
+% \subsubsection{字体配置}
% \label{sec:font-config}
-% 正确配置中文字体是使用模板的第一步。模板调用 \pkg{ctex} 宏包,提供如下字体使用方式:
+% 正确配置中文字体是使用模板的第一步。模板调用 \CTeX\ 宏包,提供如下字体使用方式:
% \begin{itemize}
-% \item 基于传统 \pkg{CJK} 包,使用 latex、pdflatex 编译;
-% \item 基于 \pkg{xeCJK} 包,使用 xelatex 编译。
+% \item 基于传统 \pkg{CJK} 包,使用 latex、pdflatex 编译。
+% \item 基于 \pkg{xeCJK} 包,使用 xelatex 编译。(推荐方法)
% \end{itemize}
%
% 第一种方式的字体配置比较繁琐,建议使用 \emph{donated@newsmth} 制作的中文字体包
@@ -515,6 +521,7 @@
% \file{ctex-fontset-thuthesis.def} 文件配置所需字体。使用中易六种字体的配置如下:
% \begin{example}
% \ProvidesFile{ctex-fontset-thuthesis.def}
+%
% \setCJKmainfont[BoldFont={SimHei},ItalicFont={KaiTi}]{SimSun}
% \setCJKsansfont{SimHei}
% \setCJKmonofont{FangSong}
@@ -524,6 +531,7 @@
% \setCJKfamilyfont{zhfs}{FangSong}
% \setCJKfamilyfont{zhli}{LiSu}
% \setCJKfamilyfont{zhyou}{YouYuan}
+%
% \newcommand*{\songti}{\CJKfamily{zhsong}} % 宋体
% \newcommand*{\heiti}{\CJKfamily{zhhei}} % 黑体
% \newcommand*{\kaishu}{\CJKfamily{zhkai}} % 楷书
@@ -536,12 +544,13 @@
% 为 |FangSong_GB2312|。
%
% 研究生一般用不到隶书和幼圆字体。如果系统中没有导致报错,可以将
-% \file{ctex-fontset-thuthesis.def} 文件中 zhli 和 zhyou 相应行删除,并将论文 \file{.tex} 文件
-% 中引用 |\lishu| 和 |\youyuan| 的文字删除。
+% \file{ctex-fontset-thuthesis.def} 文件中 \texttt{zhli} 和 \texttt{zhyou} 相应行删除,并将论文 \file{.tex} 文件
+% 中引用 \cs{lishu} 和 \cs{youyuan} 的文字删除。
%
% 宏包中包含了 \file{zhfonts.py} 脚本,为 Linux/Mac 用户提供一种交互式的方式从系
-% 统中文字体中选择合适的六种字体,最终生成对应的 \file{ctex-fontset-thuthesis.def}文件。要使用
-% 它,只需在命令行输入该脚本的完整路径即可。
+% 统中文字体中选择合适的六种字体,最终生成对应
+% 的\file{ctex-fontset-thuthesis.def} 文件。要使用它,只需在命令行输入该脚本的完
+% 整路径即可。
%
% 另外,用户也可以通过命令
% \begin{shell}
@@ -549,16 +558,8 @@
% \end{shell}
% 得到系统中现有的中文字体列表,并相应替换上述配置。
%
-% \subsection{命令}
-% \label{sec:command}
-% 模板中的命令分为两类:一是格式控制,二是内容替换。格式控制如字体、字号、字距和
-% 行距。内容替换如姓名、院系、专业、致谢等等。其中内容替换命令居多,而且主要集中
-% 在封面上,其中有以本科论文为最(比硕士和博士论文多了\textbf{综合论文训练任务书}一
-% 页)。首先来看格式控制命令。
-%
-% \subsubsection{基本控制命令}
-% \label{sec:basiccom}
-%
+% \subsubsection{字体命令}
+% \label{sec:fontcmds}
% \myentry{字体}
% \DescribeMacro{\songti}
% \DescribeMacro{\fangsong}
@@ -566,7 +567,7 @@
% \DescribeMacro{\kaishu}
% \DescribeMacro{\lishu}
% \DescribeMacro{\youyuan}
-% 等分别用来切换宋体、仿宋、黑体、楷体、隶书和幼圆字体。
+% 用来切换宋体、仿宋、黑体、楷体、隶书和幼圆字体。
%
% \begin{example}
% {\songti 乾:元,亨,利贞}
@@ -592,7 +593,7 @@
% \end{tabular}
% \end{center}
%
-% 使用方法为:\cs{command}\oarg{num},其中 |command| 为字号命令,|num| 为行距。比
+% 使用方法为:\cs{command}\oarg{num},其中 command 为字号命令,num 为行距。比
% 如 |\xiaosi[1.5]| 表示选择小四字体,行距 1.5 倍。写作指南要求表格中的字体
% 是 \cs{dawu},模板已经设置好了。
%
@@ -600,135 +601,130 @@
% {\erhao 二号 \sanhao 三号 \sihao 四号 \qihao 七号}
% \end{example}
%
-% \myentry{密级}
-% \DescribeMacro{\secretlevel}
-% \DescribeMacro{\secretyear}
-% 定义秘密级别和年限:
-% \begin{example}
-% \secretyear{5}
-% \secretlevel{内部}
-% \end{example}
+% 也可以使用 \CTeX\ 定义的 \cs{zihao}\marg{num} 来切换字号,具体用法参看其文
+% 档。
%
-% \myentry{引用方式}
-% \changes{v4.8.2}{2015/11/23}{用 \cs{inlinecite} 替换 \cs{onlinecite}。为保证兼
-% 容性,\cs{onlinecite} 会保留。}
-% \DescribeMacro{\inlinecite}
-%
-% 学校要求的参考文献引用有两种模式:(1)上标模式。比如``同样的工作有很
-% 多$^{[1,2]}$\ldots''。(2)正文模式。比如``文[3] 中详细说明了\ldots''。其中上标
-% 模式使用远比正文模式频繁,所以为了符合使用习惯,上标模式仍然用常规
-% 的 |\cite{key}|,而 |\inlinecite{key}| 则用来生成正文模式。
+% \subsection{封面信息}
+% \label{sec:titlepage}
+% 封面信息提供两种配置方法:一是通过统一设置命
+% 令 \cs{thusetup} 通过\emph{key=value} 形式完成;二是每个信息利用命令独立设置,
+% 其中命令的名字跟 |key| 相同。两种方式可以交叉使用,并按顺序执行(即后来的设置会覆
+% 盖前面的)。以 \texttt{c} 开头的命令跟中文相关,\texttt{e} 开头则为对应的英文。
%
-% 关于参考文献模板推荐使用 \BibTeX{},关于中文参考文献需要额外增加一个 Entry: lang,将其设置为 \texttt{zh}
-% 用来指示此参考文献为中文,以便 \file{thuthesis.bst} 处理。如:
+% \DescribeMacro{\thusetup}
+% 用法与常见 \emph{key=value} 命令相同,如下:
% \begin{example}
-% @INPROCEEDINGS{cnproceed,
-% author = {王重阳 and 黄药师 and 欧阳峰 and 洪七公 and 段皇帝},
-% title = {武林高手从入门到精通},
-% booktitle = {第~$N$~次华山论剑},
-% year = 2006,
-% address = {西安, 中国},
-% month = sep,
-% lang = "zh",
+% \thusetup{
+% key1 = value1,
+% key2 = {a value, with comma},
% }
-%
-% @ARTICLE{cnarticle,
-% AUTHOR = "贾宝玉 and 林黛玉 and 薛宝钗 and 贾探春",
-% TITLE = "论刘姥姥食量大如牛之现实意义",
-% JOURNAL = "红楼梦杂谈",
-% PAGES = "260--266",
-% VOLUME = "224",
-% YEAR = "1800",
-% LANG = "zh",
+% % 可以多次调用
+% \thusetup{
+% key3 = value3,
+% key1 = value11, % 覆盖 value1
% }
% \end{example}
%
-% 注意如果不需要引用参考文献,请删除 \file{main.tex} 中 |\bibliography| 开头的两行,
-% 以避免可能的编译错误。
-%
-% \myentry{书脊}
-% \DescribeMacro{\shuji}
-% 生成装订的书脊,为竖排格式,命令格式:\cs{shuji}\oarg{标题}\oarg{作者}。默认参
-% 数为论文中文题目和中文作者。如果中文题目中没有英文字母,那么直接调用此命令即可。
-% 否则,就要像例子里面那样做一些微调(参看模板自带的 \file{shuji.tex})。下面是一
-% 个例子:
-% \begin{example}
-% \documentclass{thuthesis}
-%
-% \begin{document}
-% \ctitle{论文中文题目}
-% \cauthor{中文姓名}
-%
-% \shuji % 使用默认标题和默认作者
+% \note{\cs{thusetup} 使用 \pkg{kvoptions} 机制,所以配置项之间不能有空行,否则
+% 会报错。}
%
-% \shuji[使用默认作者的标题]
+% 大多数命令的使用方法都是: \cs{command}\marg{arg},例外者将具体指出。这些命令都
+% 在示例文档的 \file{data/cover.tex} 中。
%
-% \shuji[同时修改标题和作者的标题][尼瑞薛]
+% \subsubsection{密级}
+% \DescribeMacro{\secretlevel}
+% \DescribeMacro{\secretyear}
+% 定义秘密级别和年限,需要打开论文的 \option{secret} 选项。
+% \begin{example}
+% \thusetup{
+% secretyear=2020,
+% secretlevel=内部,
+% }
+% % 以下命令方式与上面的等价:
+% \secretyear{2020}
+% \secretlevel{内部}
+% \end{example}
%
-% % 如果标题中有英文,那可以参考如下方法进行微调:
-% \shuji[清华大学~\hspace{0.2em}\raisebox{2pt}{\LaTeX}%
-% \hspace{-0.25em} 论文模板 \hspace{0.1em}\raisebox{2pt}%
-% {v\version}\hspace{-0.25em}样例]
-% \end{document}
+% \subsubsection{博士后专用参数}
+% \DescribeMacro{\catalognumber}
+% \DescribeMacro{\udc}
+% \DescribeMacro{\id}
+% \begin{example}
+% \thusetup{
+% catalognumber={分类号},
+% udc={udc},
+% id={id}
+% }
+% % 等价:
+% \catalognumber{分类号}
+% \udc{udc}
+% \id{编号}
% \end{example}
%
-% \myentry{破折号}
-% \DescribeMacro{\pozhehao}
-% 中文破折号在 CJK-\LaTeX\ 里没有很好的处理,我们平时输入的都是两个小短线,比如这
-% 样,{\heiti 中国——中华人民共和国}。这不符合中文习惯。所以这里定义了一个命令生成更
-% 好看的破折号,不过这似乎不是一个好的解决办法。有同学说不能用在 \cs{section} 等命
-% 令中使用,简单的办法是可以提供一个不带破折号的段标题:\cs{section}\oarg{没有破
-% 折号精简标题}\marg{带破折号的标题}。
-%
-%
-% \subsubsection{封面命令}
-% \label{sec:titlepage}
-% 下面是内容替换命令,其中以 |c| 开头的命令跟中文相关,|e| 开头则为对应的英文。这
-% 部分的命令数目虽然比较多,实际上都相当简单,套用即可。
-%
-% 大多数命令的使用方法都是: \cs{command}\marg{arg},例外者将具体指出。这些命令都
-% 在示例文档的 \file{data/cover.tex} 中。
-%
-% \myentry{论文标题}
+% \subsubsection{论文标题}
% \DescribeMacro{\ctitle}
% \DescribeMacro{\etitle}
% \begin{example}
+% \thusetup{
+% ctitle={论文中文题目},
+% etitle={Thesis English Title}
+% }
+% % 等价命令形式:
% \ctitle{论文中文题目}
% \etitle{Thesis English Title}
% \end{example}
%
-% \myentry{作者姓名}
+% \subsubsection{作者姓名}
% \DescribeMacro{\cauthor}
% \DescribeMacro{\eauthor}
% \begin{example}
+% \thusetup{
+% cauthor={中文姓名},
+% eauthor={Name in Pinyin}
+% }
+% % 等价:
% \cauthor{中文姓名}
-% \eauthor{Your name in PinYin}
+% \eauthor{Name in PinYin}
% \end{example}
%
-% \myentry{申请学位名称}
+% \subsubsection{申请学位名称}
% \DescribeMacro{\cdegree}
% \DescribeMacro{\edegree}
% \begin{example}
+% \thusetup{
+% cdegree={您要申请什么学位},
+% edegree={degree in English}
+% }
+% % 等价:
% \cdegree{您要申请什么学位}
% \edegree{degree in English}
% \end{example}
%
-% \myentry{院系名称}
+% \subsubsection{院系名称}
% \DescribeMacro{\cdepartment}
% \DescribeMacro{\edepartment}
-%
% \cs{cdepartment} 可以加一个可选参数,如:\cs{cdepartmentl}\oarg{精简}\marg{详
-% 细},主要针对本科生的\textbf{综合论文训练}部分,因为需要填写的空间有限,最好
-% 给出一个详细和精简院系名称,如\textbf{计算机科学与技术}和\textbf{计算机}。
+% 细},主要针对本科生的“\textbf{综合论文训练}”部分,因为需要填写的空间有限,最好
+% 给出一个详细和精简院系名称,如“\textbf{计算机科学与技术}”和“\textbf{计算机}”。
% \begin{example}
+% \thusetup{
+% cdepartment={[系名简称]{系名全称}},
+% edepartment={Deparment}
+% }
+% % 等价:
% \cdepartment[系名简称]{系名全称}
% \edepartment{Department}
% \end{example}
%
-% \myentry{专业名称}
+% \subsubsection{专业名称}
% \DescribeMacro{\cmajor}
% \DescribeMacro{\emajor}
% \begin{example}
+% \thusetup{
+% cmajor={专业名称},
+% emajor={Major in English}
+% }
+% % 等价:
% \cmajor{专业名称}
% \emajor{Major in English}
% \end{example}
@@ -736,14 +732,25 @@
% \DescribeMacro{\cfirstdiscipline}
% \DescribeMacro{\cseconddiscipline}
% \begin{example}
+% \thusetup{
+% cfirstdiscipline={博士后一级学科},
+% cseconddiscipline={博士后二级学科}
+% }
+% % 等价:
% \cfirstdiscipline{博士后一级学科}
% \cseconddiscipline{博士后二级学科}
% \end{example}
%
-% \myentry{导师姓名}
+% \subsubsection{导师}
+% \myentry{导师}
% \DescribeMacro{\csupervisor}
% \DescribeMacro{\esupervisor}
% \begin{example}
+% \thusetup{
+% csupervisor={导师~教授},
+% esupervisor={Supervisor}
+% }
+% % 等价:
% \csupervisor{导师~教授}
% \esupervisor{Supervisor}
% \end{example}
@@ -754,7 +761,7 @@
% 本科生的辅导教师,硕士的副指导教师。
% \begin{example}
% \cassosupervisor{副导师~副教授}
-% \eassosupervisor{Small Boss}
+% \eassosupervisor{2nd Boss}
% \end{example}
%
% \myentry{联合导师}
@@ -762,40 +769,45 @@
% \DescribeMacro{\ecosupervisor}
% 硕士生联合指导教师,博士生联合导师。
% \begin{example}
+% \thusetup{
+% ccosupervisor={联合导师~教授},
+% ecosupervisor={3rd Boss}
+% }
+% % 等价:
% \ccosupervisor{联合导师~教授}
-% \ecosupervisor{Tiny Boss}
+% \ecosupervisor{3rd Boss}
% \end{example}
%
-% \myentry{论文成文日期}
+% \subsubsection{成文日期}
% \DescribeMacro{\cdate}
% \DescribeMacro{\edate}
% \DescribeMacro{\postdoctordate}
% 默认为当前时间,也可以自己指定。
% \begin{example}
+% \thusetup{
+% cdate={中文日期},
+% edate={English Date},
+% postdoctordate={2009年7月——2011年7月} % 博士后研究起止日期
+% }
+% % 等价:
% \cdate{中文日期}
% \edate{English Date}
% \postdoctordate{2009年7月——2011年7月} % 博士后研究起止日期
% \end{example}
%
-% \myentry{博士后专用参数}
-% \DescribeMacro{\catalognumber}
-% \DescribeMacro{\udc}
-% \DescribeMacro{\id}
-% \begin{example}
-% \catalognumber{分类号}
-% \udc{udc}
-% \id{编号}
-% \end{example}
-%
-% \myentry{摘要}
+% \subsubsection{摘要}
+% \myentry{摘要正文}
% \DescribeEnv{cabstract}
% \DescribeEnv{eabstract}
+% \note{摘要正文只能用环境命令的形式,不支持 \cs{thusetup}。}
+%
% \begin{example}
% \begin{cabstract}
% 摘要请写在这里...
% \end{cabstract}
+%
% \begin{eabstract}
-% Here comes English abstract...
+% Here comes the abstract in English...
% \end{eabstract}
% \end{example}
%
@@ -805,6 +817,11 @@
% 关键词用英文逗号分割写入相应的命令中,模板会解析各关键词并生成符合不同论文格式
% 要求的关键词格式。
% \begin{example}
+% \thusetup{
+% ckeywords={关键词 1, 关键词 2},
+% ekeywords={keyword 1, keyword 2}
+% }
+% % 等价:
% \ckeywords{关键词 1, 关键词 2}
% \ekeywords{keyword 1, keyword 2}
% \end{example}
@@ -821,12 +838,7 @@
% \makecover[scan-auth.pdf]
% \end{example}
%
-%
-% \subsubsection{其它部分}
-% \label{sec:otherparts}
-% 论文其它主要部分命令:
-%
-% \myentry{符号对照表}
+% \subsubsection{符号对照表}
% \DescribeEnv{denotation}
% 主要符号表环境。简单定义的一个 \texttt{list},跟 \texttt{description} 非常类似,
% 使用方法参见示例文件。带一个可选参数,用来指定符号列的宽度(默认为 2.5cm)。
@@ -847,27 +859,32 @@
% \end{denotation}
% \end{example}
%
-% \myentry{索引}
-% 插图、表格和公式三个索引命令分别如下,将其插入到期望的位置即可(带星号的命令表
+% \subsection{目录和索引表}
+% 目录、插图、表格和公式等索引命令分别如下,将其插入到期望的位置即可(带星号的命令表
% 示对应的索引表不会出现在目录中):
%
+% \DescribeMacro{\tableofcontents}
+% \DescribeMacro{\listoffigures}
+% \DescribeMacro{\listoftables}
+% \DescribeMacro{\listofequations}
% \begin{center}
% \begin{tabular}{ll}
% \hline
-% {\heiti 命令} & {\heiti 说明} \\\hline
-% \cs{listoffigures} & 插图索引\\
-% \cs{listoffigures*} & \\\hline
-% \cs{listoftables} & 表格索引\\
-% \cs{listoftables*} & \\\hline
-% \cs{listofequations} & 公式索引\\
-% \cs{listofequations*} & \\\hline
+% {\heiti 用途} & {\heiti 命令} \\\hline\hline
+% 目录 & \cs{tableofcontents} \\\hline
+% 插图索引 & \cs{listoffigures} \\
+% & \cs{listoffigures*} \\\hline
+% 表格索引 & \cs{listoftables} \\
+% & \cs{listoftables*} \\\hline
+% 公式索引 & \cs{listofequations} \\
+% & \cs{listofequations*}\\\hline
% \end{tabular}
% \end{center}
%
% \LaTeX{} 默认支持插图和表格索引,是通过 \cs{caption} 命令完成的,因此它们必须出
% 现在浮动环境中,否则不被计数。
%
-% 有的同学不想让某个表格或者图片出现在索引里面,那么请使用命令 \cs{caption*},这
+% 如果不想让某个表格或者图片出现在索引里面,那么请使用命令 \cs{caption*},这
% 个命令不会给表格编号,也就是出来的只有标题文字而没有``表~xx'',``图~xx'',否则
% 索引里面序号不连续就显得不伦不类,这也是 \LaTeX{} 里星号命令默认的规则。
%
@@ -875,8 +892,7 @@
% 图片显示成``表''和``图''很不协调的话,一个很好的办法还是用 \cs{caption*},参数
% 随便自己写,具体用法请参看示例文档。
%
-% 如果你的确想让它编号,但又不想让它出现在索引中的话,那就自己改一改模板的代码吧,
-% 我目前不打算给模板增加这种另类命令。
+% 如果的确想让其编号,但又不想出现在索引中的话,目前模板暂不支持。
%
% 公式索引为本模板扩展,模板扩展了 \pkg{amsmath} 几个内部命令,使得公式编号样式和
% 自动索引功能非常方便。一般来说,你用到的所有数学环境编号都没问题了,这个可以参
@@ -895,13 +911,14 @@
% \end{mymath}
% \end{example}
%
-% 当然 mymath 正文中公式的编号需要你自己来做。
+% 当然 mymath 正文中公式的编号需要自己来做。
%
% 同图表一样,附录中的公式有时候也不希望它跟全文统一编号,而且不希望它出现在公式
% 索引中,目前的解决办法就是利用 \cs{tag*}\marg{公式编号} 来解决。用法很简单,此
% 处不再罗嗦,实例请参看示例文档附录 A 的前两个公式。
%
-% \myentry{简历}
+% \subsection{封底部分}
+% \subsubsection{简历}
% \DescribeEnv{resume}
% 开启个人简历章节,包括个人简历,发表文章,研究成果列表等。每个子项目请
% 用以下对应命令开启:\cs{xxxitem}\marg{subtitle}。
@@ -920,7 +937,7 @@
%
% 具体用法请参看示例文档 \file{data/resume.tex}。
%
-% \myentry{附录}
+% \subsubsection{附录}
% \DescribeEnv{appendix}
% 所有的附录都插到这里来。因为附录会更改默认的 chapter 属性,而后面的{\heiti 个人简
% 历}又需要恢复,所以实现为环境可以保证全局的属性不受影响。
@@ -931,7 +948,7 @@
% \end{appendix}
% \end{example}
%
-% \myentry{致谢声明}
+% \subsubsection{致谢声明}
% \DescribeEnv{ack}
% 把致谢做成一个环境更好一些,直接往里面写感谢的话就可以啦!下面是数学系一位同
% 学致谢里的话,拿过来做个广告。希望每个人都能写这么一句 :)
@@ -952,17 +969,10 @@
% \end{ack}
% \end{example}
%
-% \myentry{列表环境}
-% \DescribeEnv{itemize}
-% \DescribeEnv{enumerate}
-% \DescribeEnv{description}
-% 为了适合中文习惯,模板将这三个常用的列表环境用 \pkg{enumitem} 进行了纵向间距压
-% 缩。一方面满足了多余空间的清楚,另一方面可以自己指定标签的样式和符号。细节请参
-% 看 \pkg{enumitem} 文档,此处不再赘述。
-%
-% \changes{v3.0}{2007/05/12}{没有了综合论文训练页面,很多本科论文专用命令就消失了。}
+% \subsection{自定义}
+% \label{sec:othercmd}
%
-% \subsection{数学环境}
+% \subsubsection{数学环境}
% \label{sec:math}
% \thuthesis{} 定义了常用的数学环境:
%
@@ -992,26 +1002,97 @@
% 然后这样使用:
% \begin{example}
% \begin{nonsense}
-% 契丹武士要来中原夺武林秘笈。\pozhehao 慕容博
+% 契丹武士要来中原夺武林秘笈。—— 慕容博
% \end{nonsense}
% \end{example}
% 产生(自动编号):\\[5pt]
-% \fbox{{\heiti 胡说~1.1~~~} {契丹武士要来中原夺武林秘笈。\kern0.3ex\rule[0.8ex]{2em}{0.1ex}\kern0.3ex 慕容博}}
+% \fbox{{\heiti 胡说~1.1~~~} {契丹武士要来中原夺武林秘笈。—— 慕容博}}
%
-% \subsection{自定义以及其它}
-% \label{sec:othercmd}
-% 模板的配置文件 \file{thuthesis.cfg} 中定义了很多固定词汇,一般无须修改。如果有特殊需求,
-% 推荐在导言区使用 \cs{renewcommand}。当然,导言区里可以直接使用中文。
+% \changes{v5.0.0}{2015/11/23}{用 \cs{inlinecite} 替换 \cs{onlinecite}。为保证兼
+% 容性,\cs{onlinecite} 会保留。}
%
+% \subsubsection{引用方式}
+% \DescribeMacro{\inlinecite}
+% 学校要求的参考文献引用有两种模式:(1)上标模式。比如``同样的工作有很
+% 多$^{[1,2]}$\ldots''。(2)正文模式。比如``文[3] 中详细说明了\ldots''。其中上标
+% 模式使用远比正文模式频繁,所以为了符合使用习惯,上标模式仍然用常规
+% 的 \cs{cite}\marg{key},而 \cs{inlinecite}\marg{key} 则用来生成正文模式。
+%
+% 关于参考文献模板推荐使用 \BibTeX{},关于中文参考文献需要额外增加一个 Entry:
+% lang,将其设置为 \texttt{zh}用来指示此参考文献为中文,以
+% 便 \file{thuthesis.bst} 处理。如:
+% \begin{example}
+% @INPROCEEDINGS{cnproceed,
+% author = {王重阳 and 黄药师 and 欧阳峰 and 洪七公 and 段皇帝},
+% title = {武林高手从入门到精通},
+% booktitle = {第~$N$~次华山论剑},
+% year = 2006,
+% address = {西安, 中国},
+% month = sep,
+% lang = "zh",
+% }
+%
+% @ARTICLE{cnarticle,
+% AUTHOR = "贾宝玉 and 林黛玉 and 薛宝钗 and 贾探春",
+% TITLE = "论刘姥姥食量大如牛之现实意义",
+% JOURNAL = "红楼梦杂谈",
+% PAGES = "260--266",
+% VOLUME = "224",
+% YEAR = "1800",
+% LANG = "zh",
+% }
+% \end{example}
+%
+% 注意如果不需要引用参考文献,请删除 \file{main.tex} 中 \cs{bibliography} 开头的两行,
+% 以避免可能的编译错误。
+%
+% \subsubsection{列表环境}
+% \DescribeEnv{itemize}
+% \DescribeEnv{enumerate}
+% \DescribeEnv{description}
+% 为了适合中文习惯,模板将这三个常用的列表环境用 \pkg{enumitem} 进行了纵向间距压
+% 缩。一方面清除了多余空间,另一方面用户可以自己指定列表环境的样式(如标签符号,
+% 缩进等)。细节请参看 \pkg{enumitem} 文档,此处不再赘述。
+%
+% \subsubsection{书脊}
+% \DescribeMacro{\shuji}
+% 生成装订的书脊,为竖排格式,命令格式:\cs{shuji}\oarg{标题}\oarg{作者}。默认参
+% 数为论文中文题目和中文作者。如果中文题目中没有英文字母,那么直接调用此命令即可。
+% 否则,就要像例子里面那样做一些微调(参看模板自带的 \file{shuji.tex})。下面是一
+% 个例子:
+% \begin{example}
+% \documentclass[type=master]{thuthesis}
+% % 此处 type 无所谓
+%
+% \begin{document}
+% \thuset{
+% ctitle={论文中文题目},
+% cauthor={中文姓名}}
+%
+% \shuji % 使用默认标题和默认作者
+%
+% \shuji[使用默认作者的标题]
+%
+% \shuji[同时修改标题和作者的标题][尼瑞薛]
+%
+% % 如果标题中有英文,那可以参考如下方法进行微调:
+% \shuji[清华大学~\hspace{0.2em}\raisebox{2pt}{\LaTeX}%
+% \hspace{-0.25em} 论文模板 \hspace{0.1em}\raisebox{2pt}%
+% {v\version}\hspace{-0.25em}样例]
+% \end{document}
+% \end{example}
+%
+% \subsection{其它}
+% 模板的配置文件 \file{thuthesis.cfg} 中定义了很多固定词汇,一般无须修改。如果有特殊需求,
+% 推荐在导言区使用 \cs{renewcommand}。
%
% \section{致谢}
% \label{sec:thanks}
% 感谢这些年来一直陪伴 \thuthesis{} 成长的新老同学,大家的需求是模板前进的动力,
% 大家的反馈是模板提高的机会。
%
-% 本人已离开清华,不能如往日及时升级,热烈欢迎各位
-% 到\href{http://github.com/xueruini/thuthesis/}{Github 主页}贡献,继续为大家服
-% 务。
+% 本人已离开清华,热烈欢迎各位
+% 到\href{http://github.com/xueruini/thuthesis/}{\thuthesis\ Github 主页}贡献!
%
% \StopEventually{\PrintChanges\PrintIndex}
% \clearpage
@@ -1023,7 +1104,7 @@
%<cls>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<cls>\ProvidesClass{thuthesis}
%<cfg>\ProvidesFile{thuthesis.cfg}
-%<cls|cfg>[2015/12/24 5.0 Tsinghua University Thesis Template]
+%<cls|cfg>[2015/12/27 5.1.0 Tsinghua University Thesis Template]
% \end{macrocode}
%
% \subsection{定义选项}
@@ -1042,7 +1123,7 @@
%<*cls>
\hyphenation{Thu-Thesis}
\def\thuthesis{\textsc{ThuThesis}}
-\def\version{4.8.1}
+\def\version{5.1.0}
\RequirePackage{kvoptions}
\SetupKeyvalOptions{
@@ -1061,7 +1142,7 @@
\expandafter\csname thu@#1true\endcsname}
\def\thu@deprecated@type@option{%
- \setkeys{thu}{type=\CurrentOption} % for compatability.
+ \kvsetkeys{thu}{type=\CurrentOption} % for compatability.
\ClassError{thuthesis}{Option '\CurrentOption' is deprecated, \MessageBreak
please use 'type=\CurrentOption' instead}{}}
\DeclareVoidOption{bachelor}{\thu@deprecated@type@option}
@@ -1093,7 +1174,7 @@
%
% noraggedbottom 选项
% \changes{v4.8}{2013/03/05}{增加 noraggedbottom 选项。}
-% \changes{v4.8.2}{2015/12/13}{norggedbottom 选项修改未 raggedbottom。}
+% \changes{v5.0.0}{2015/12/13}{norggedbottom 选项修改未 raggedbottom。}
% \begin{macrocode}
\DeclareBoolOption{raggedbottom}
% \end{macrocode}
@@ -1108,12 +1189,11 @@
% \changes{v3.1}{2007/10/09}{本科的目录又不要 arial 字体了。}
% \changes{v4.8}{2013/03/10}{使用 ctexbook 类,优于调用 ctex 宏包。}
% \changes{v4.8}{2013/05/29}{添加 nocap 选项,恢复默认标题样式,模板会进一步定制。}
-% \changes{v4.8.2}{2015/03/12}{使用 XeTeX 引擎时,fontspec 宏包会被 xeCJK 自动
+% \changes{v5.0.0}{2015/03/12}{使用 XeTeX 引擎时,fontspec 宏包会被 xeCJK 自动
% 调用。传递给 fontspec 宏包 no-math 选项,避免部分数学符号字体自动调整为 CMR。
% 其他引擎下没有这个问题,这一行会被无视。}
% \begin{macrocode}
-\setkeys{thu}{%
- type=bachelor,
+\kvsetkeys{thu}{%
raggedbottom,
arial,
arialtitle}
@@ -1183,7 +1263,7 @@
% \changes{v2.6.2}{2006/06/18}{去掉 \pkg{paralist} 的 newitem 和 newenum 选项,因为默
% 认是打开的。}
% \changes{v2.6.4}{2006/10/23}{增加 \texttt{neverdecrease} 选项。}
-% \changes{v4.8.2}{2012/12/13}{删除 \pkg{paralist} 选项。}
+% \changes{v5.0.0}{2012/12/13}{删除 \pkg{paralist} 选项。}
% \begin{macrocode}
\RequirePackage[shortlabels]{enumitem}
% \end{macrocode}
@@ -1199,12 +1279,13 @@
\fi
% \end{macrocode}
%
-% \changes{v4.5}{2008/01/03}{加入 XeTeX 支持,需要 \pkg{xeCJK}。}
+% 利用 \pkg{CJKfntef} 实现汉字的下划线和盒子内两段对齐,并可以避免
+% \cs{makebox}\oarg{width}\oarg{s} 可能产生的 underful boxes。
+% \begin{macrocode}
+\RequirePackage{CJKfntef}
+% \end{macrocode}
% \changes{v4.8}{2013/03/09}{reset baselinestretch after ctex's change.}
% \begin{macrocode}
-\ifthu@bachelor
- \RequirePackage{CJKfntef}
-\fi
\renewcommand{\baselinestretch}{1.0} % todo:?
\ifxetex
% todo: minor fix of CJKnumb
@@ -1214,7 +1295,7 @@
% 默认采用中易的六款免费字体。缺少上述字体的用户可以通过
% \file{ctex-fontset-thuthesis.def} 文件自定义字体。
% \changes{v4.8}{2013/05/28}{在 CJK 模式下用 \pkg{CJKspace} 保留中英文间空格。}
-% \changes{v4.8.2}{2015/04/17}{固定字体设置,同时改善与 ctex 兼容性。}
+% \changes{v5.0.0}{2015/04/17}{固定字体设置,同时改善与 ctex 兼容性。}
% \begin{macrocode}
\IfFileExists{ctex-fontset-thuthesis.def}%
{\ctexset{fontset=thuthesis}}%
@@ -1282,9 +1363,6 @@
% \end{macrocode}
%
% dvips 模式下网址断字有问题,请手工加载 breakurl 这个宏包解决之。
-% \changes{v4.4}{2008/05/12}{修复网址断字。}
-% \changes{v4.8}{2013/03/04}{dvips method is deprecated. We ask their users to load it manually.}
-%
% 设置 url 样式,与上下文一致
% \begin{macrocode}
\urlstyle{same}
@@ -1299,9 +1377,9 @@
% 过 dvips 不指定页面类型而得到古怪的结果。}
% \changes{v4.5.2}{2010/09/19}{研究生页面边距由 3.2cm 改为 3cm。}
% \changes{v4.7}{2012/05/29}{修改本科生页脚间距与样例基本一致。}
-% \changes{v4.8.2}{2015/03/10}{不再将页面尺寸写入 dvi,因为已不支持 dvips,
+% \changes{v5.0.0}{2015/03/10}{不再将页面尺寸写入 dvi,因为已不支持 dvips,
% 而该方案会使得在使用 tikzexternalize 时外部 PDF 图片 BBox 不对。}
-% \changes{v4.8.2}{2015/12/14}{用 \pkg{geometry} 简化设置。}
+% \changes{v5.0.0}{2015/12/14}{用 \pkg{geometry} 简化设置。}
% \begin{macrocode}
\RequirePackage{geometry}
\geometry{
@@ -1312,6 +1390,7 @@
\ifthu@bachelor
\geometry{
left=32mm,
+ headheight=5mm,
headsep=5mm,
textheight=220mm,
bottom=37mm,
@@ -1319,6 +1398,7 @@
\else
\geometry{
left=30mm,
+ headheight=5mm,
headsep=5mm,
textheight=237mm,
bottom=29mm,
@@ -1343,7 +1423,7 @@
%<*cls>
\let\thu@cleardoublepage\cleardoublepage
\newcommand{\thu@clearemptydoublepage}{%
- \clearpage{\pagestyle{empty}\thu@cleardoublepage}}
+ \clearpage{\pagestyle{thu@empty}\thu@cleardoublepage}}
\let\cleardoublepage\thu@clearemptydoublepage
% \end{macrocode}
% \end{macro}
@@ -1518,7 +1598,7 @@
% 正文小四号 (12bp) 字,行距为固定值 20 bp。
% \begin{macrocode}
\renewcommand\normalsize{%
- \@setfontsize\normalsize{12bp}{20bp}
+ \@setfontsize\normalsize{12bp}{20bp}%
\abovedisplayskip=20bp \@plus 2bp \@minus 2bp
\abovedisplayshortskip=20bp \@plus 2bp \@minus 2bp
\belowdisplayskip=\abovedisplayskip
@@ -1537,7 +1617,7 @@
% \changes{v2.5}{2006/05/13}{本科的奇偶页眉不同。}
% \changes{v2.5}{2006/05/20}{增加 empty 页面样式。}
% \changes{v4.7}{2012/05/29}{本科页码用小五号字。}
-% \changes{v4.8.2}{2015/12/20}{利用 \pkg{fancyhdr} 设置页眉页脚。}
+% \changes{v5.0.0}{2015/12/20}{利用 \pkg{fancyhdr} 设置页眉页脚。}
% \begin{macro}{\ps@thu@empty}
% \begin{macro}{\ps@thu@plain}
% \begin{macro}{\ps@thu@headings}
@@ -1711,7 +1791,7 @@
% 定理字样使用黑体,正文使用宋体,冒号隔开
% \changes{v2.6.2}{2006/06/17}{增加问题和猜想两个数学环境。}
% \changes{v4.2}{2008/03/07}{调整证明环境的编号和结尾的方块。}
-% \changes{v4.8.2}{2015/04/18}{修正定理字样为黑体 (\#104)。}
+% \changes{v5.0.0}{2015/04/18}{修正定理字样为黑体 (\#104)。}
% \begin{macrocode}
\theorembodyfont{\rmfamily\songti}
\theoremheaderfont{\rmfamily\heiti}
@@ -1776,7 +1856,7 @@
% \changes{v2.5.1}{2006/05/24}{重新定义表格默认字体。}
% \changes{v2.5.3}{2006/06/07}{不管 caption 出现在什么位置,\cs{aboveskip} 总是出现在标题和浮动体之间的距离。}
% \changes{v4.3}{2008/03/11}{子图引用时加括号。}
-% \changes{v4.8.2}{2015/06/27}{本科附录图表编号用-不用.(如图A-1,表A-2)。}
+% \changes{v5.0.0}{2015/06/27}{本科附录图表编号用-不用.(如图A-1,表A-2)。}
% \begin{macrocode}
\ifthu@bachelor
\g@addto@macro\appendix{\renewcommand*{\thefigure}{\thechapter-\arabic{figure}}}
@@ -1816,7 +1896,7 @@
% \end{macro}
%
%
-% \subsubsection{中文标题定义}
+% \subsubsection{章节标题}
% \label{sec:theor}
% \changes{v2.5}{2006/05/19}{增加索引名称定义。}
% \begin{macrocode}
@@ -1856,10 +1936,6 @@
%</cfg>
% \end{macrocode}
%
-%
-% \subsubsection{章节标题}
-% \label{sec:titleandtoc}
-%
% 如果章节题目中的英文要使用 arial,那么就加上 \cs{sffamily}
% \begin{macrocode}
%<*cls>
@@ -1897,7 +1973,7 @@
% \end{macrocode}
%
% 各级标题格式设置。
-% \changes{v4.8.2}{2012/12/23}{用 \cs{ctexset} 来设置,替换复杂的 \cs{@startsection}。}
+% \changes{v5.0.0}{2012/12/23}{用 \cs{ctexset} 来设置,替换复杂的 \cs{@startsection}。}
% \begin{description}
% \item[chapter] 章序号与章名之间空一个汉字符 黑体三号字,居中书写,单倍行距,段
% 前空 24 磅,段后空 18 磅。本科要求:段前段后间距 30/20 pt,行距 20pt。但正文
@@ -1906,7 +1982,7 @@
% \changes{v2.5}{2006/05/13}{取消 \pkg{titlesec} 宏包,用基本 \LaTeX{} 命令格式化标题。}
% \changes{v2.5.1}{2006/05/23}{让 \cs{chapter*} 自动 \cs{markboth}。}
% \changes{v3.1}{2006/06/16}{英文摘要标题要搞特殊化,ft!}
-% \changes{v4.8.2}{2015/04/17}{修正章节间距问题(\#57)}
+% \changes{v5.0.0}{2015/04/17}{修正章节间距问题(\#57)}
%
% \item[section] 一级节标题,例如:\fbox{2.1 实验装置与实验方法}。节标题序号与标
% 题名之间空一个汉字符(下同)。采用黑体四号(14pt)字居左书写,行距为固定
@@ -2019,12 +2095,12 @@
%</cls>
%
%
-% \subsubsection{目录格式}
+% \subsubsection{目录}
% \label{sec:toc}
% 最多涉及 4 层,即: x.x.x.x。\par
% chapter(0), section(1), subsection(2), subsubsection(3)
% \changes{v3.1}{2007/10/09}{博士论文目录只出现到第 3 级标题即可。}
-% \changes{v4.8.2}{2015/05/21}{硕士博士论文目录只出现到第 3 级标题即可。其他未明确要求。}
+% \changes{v5.0.0}{2015/05/21}{硕士博士论文目录只出现到第 3 级标题即可。其他未明确要求。}
% \begin{macrocode}
%<*cls>
\setcounter{secnumdepth}{3}
@@ -2091,7 +2167,7 @@
% 研究生学位论文写作指南中规定:目录中的章标题行居左书写,一级节标题行缩进 1 个
% 汉字符,二级节标题行缩进 2 个汉字符(但示例文件中为 1.5 个汉字符)。本科生指
% 南中未作明确规定,示例文件中对于一级和二级节标题分别缩进 1 和 1.5 个汉字符。
-% \changes{v4.8.2}{2015/04/28}{修正学位论文中目录里节前缩进(\#103)}
+% \changes{v5.0.0}{2015/04/28}{修正学位论文中目录里节前缩进(\#103)}
% \begin{macrocode}
\renewcommand*\l@section{\@dottedtocline{1}{\ccwd}{2.1em}}
\renewcommand*\l@subsection{\@dottedtocline{2}{\ifthu@bachelor 1.5\ccwd\else 2\ccwd\fi}{3em}}
@@ -2109,7 +2185,8 @@
% \changes{v3.1}{2006/06/16}{重新定义摘要为环境,long 选项不需要了。}
% \begin{macrocode}
%<*cls>
-\def\thu@def@term#1{
+\def\thu@def@term#1{%
+ \define@key{thu}{#1}{\csname #1\endcsname{##1}}
\expandafter\gdef\csname #1\endcsname##1{%
\expandafter\gdef\csname thu@#1\endcsname{##1}}
\csname #1\endcsname{}}
@@ -2160,12 +2237,16 @@
\thu@def@term{secretyear}
\thu@def@term{ctitle}
\thu@def@term{cdegree}
-\newcommand\cdepartment[2][]{\def\thu@cdepartment@short{#1}\def\thu@cdepartment{#2}}
-\def\caffil{\cdepartment} % todo: for compatibility
+\newcommand\cdepartment[2][]{% todo: for definekeys
+ \def\thu@cdepartment@short{#1}
+ \def\thu@cdepartment{#2}}
+\define@key{thu}{cdepartment}{%
+ \expandafter\cdepartment#1}
+\def\caffil{\cdepartment} % for compatibility
\def\thu@cdepartment@short{}
\def\thu@cdepartment{}
\thu@def@term{cmajor}
-\def\csubject{\cmajor} % todo: for compatibility
+\def\csubject{\cmajor} % for compatibility
\thu@def@term{cfirstdiscipline}
\thu@def@term{cseconddiscipline}
\thu@def@term{cauthor}
@@ -2177,9 +2258,9 @@
\thu@def@term{etitle}
\thu@def@term{edegree}
\thu@def@term{edepartment}
-\def\eaffil{\edepartment} % todo: for compability
+\def\eaffil{\edepartment} % for compability
\thu@def@term{emajor}
-\def\esubject{\emajor} % todo: for compability
+\def\esubject{\emajor} %for compability
\thu@def@term{eauthor}
\thu@def@term{esupervisor}
\thu@def@term{eassosupervisor}
@@ -2252,7 +2333,8 @@
% \cs{expandafter} 都快把我整晕了。
% \begin{macrocode}
\def\thu@parse@keywords#1{
- \expandafter\gdef\csname thu@#1\endcsname{} % todo: need or not?
+ \define@key{thu}{#1}{\csname #1\endcsname{##1}}
+ \expandafter\gdef\csname thu@#1\endcsname{}
\expandafter\gdef\csname #1\endcsname##1{
\@for\reserved@a:=##1\do{
\expandafter\ifx\csname thu@#1\endcsname\@empty\else
@@ -2269,11 +2351,30 @@
% \begin{macrocode}
\thu@parse@keywords{ckeywords}
\thu@parse@keywords{ekeywords}
-%</cls>
% \end{macrocode}
% \end{macro}
% \end{macro}
%
+% \changes{v5.1.0}{2015/12/26}{通过 \cs{thusetup} 统一设置封面信息。}
+% 由上可见,封面和封底有一大堆信息需要设置,为了简化操作界面,提供一
+% 个 \cs{thusetup} 命令支持 key/value 的方式来设置。key 就是前面各个设置项的
+% 名字。\note{只能设置普通项,不支持环境项,
+% 如 \texttt{cabstract} 和 \texttt{eabstract}。} 由于这些设置项被 \cs{makecover}
+% 调用,所以此命令需要在 \cs{makecover} 之前被调用。
+% \begin{macro}{thusetup}
+% \begin{macrocode}
+\def\thusetup{\kvsetkeys{thu}}
+%</cls>
+% \end{macrocode}
+% \begin{example}
+% \thusetup{
+% cauthor={薛瑞尼},
+% ckeywords={\TeX, \LaTeX, 论文},
+% % 其它
+% }
+% \end{example}
+% \end{macro}
+%
% \changes{v1.4rc1}{2005/12/14}{I have to put all chinese chars into cfg,
% otherwise they would not appear.}
% \changes{v2.5.1}{2006/05/25}{硕士封面的冒号前居然有点小距离!}
@@ -2386,12 +2487,14 @@
% \changes{v4.6}{2011/04/26}{增加博士后封面。}
% \changes{v4.7}{2011/11/28}{硕士中文封面不再需要英文标题。}
% \changes{v4.7}{2012/05/30}{本科生题目下划线长度自动适应字数。}
+% \changes{v5.1.0}{2015/12/27}{利用 CJKfilltwosides 优化封面排版。}
%
% \begin{macrocode}
%<*cls>
\newcommand\thu@underline[2][6em]{\hskip1pt\underline{\hb@xt@ #1{\hss#2\hss}}\hskip3pt}
\newlength{\thu@title@width}
-\def\thu@put@title#1{\makebox{\hb@xt@\thu@title@width{#1}}}
+\newcommand{\thu@put@title}[2][\thu@title@width]{%
+ \begin{CJKfilltwosides}{#1}#2\end{CJKfilltwosides}}
\def\thu@first@titlepage{%
\ifthu@postdoctor\thu@first@titlepage@postdoctor\else\thu@first@titlepage@other\fi}
\newcommand{\thu@first@titlepage@postdoctor}{
@@ -2432,7 +2535,6 @@
\vskip2cm
{\sihao\thu@postdoctor@date@title\hskip1em\underline\thu@postdoctordate}
\end{center}}
-\newcommand*{\getcmlength}[1]{\strip@pt\dimexpr0.035146\dimexpr#1\relax\relax}
\newcommand{\thu@first@titlepage@other}{
\begin{center}
\vspace*{-1.6cm}
@@ -2474,26 +2576,28 @@
% \changes{v2.6.2}{2006/06/17}{如果本科生没有辅导教师则不显示。}
% \changes{v3.1}{2007/10/09}{重新放置封面表格的提示元素。}
% \changes{v4.4.3}{2008/06/09}{修改本科生论文封面格式以符合新样例。}
+% \changes{v5.1.0}{2015/12/27}{修改联合指导教师显示问题。}
% \begin{macrocode}
\ifthu@bachelor
\vskip1cm
- \parbox[t][7.0cm][t]{\textwidth}{{\sanhao[1.8]
- \hspace*{1.65cm}\fangsong
- \setlength{\thu@title@width}{4em}
- \setlength{\extrarowheight}{6pt}
- \ifxetex % todo: ugly codes
- \begin{tabular}{p{\thu@title@width}@{}l@{\extracolsep{8pt}}l}
- \else
- \begin{tabular}{p{\thu@title@width}l@{}l}
- \fi
- \thu@put@title{\thu@department@title} & \thu@title@sep & \thu@cdepartment\\
- \thu@put@title{\thu@major@title} & \thu@title@sep & \thu@cmajor\\
- \thu@put@title{\thu@author@title} & \thu@title@sep & \thu@cauthor \\
- \thu@put@title{\thu@supervisor@title} & \thu@title@sep & \thu@csupervisor\\
- \ifx\thu@cassosupervisor\@empty\else
- \thu@put@title{\thu@assosuper@title} & \thu@title@sep & \thu@cassosupervisor\\
- \fi
- \end{tabular}
+ \parbox[t][7.0cm][t]{\textwidth}{%
+ {\fangsong\sanhao[1.8]%
+ \hspace*{1.65cm}
+ \setlength{\thu@title@width}{4em}
+ \setlength{\extrarowheight}{6pt}
+ \ifxetex % todo: ugly codes
+ \begin{tabular}{p{\thu@title@width}@{}l@{\extracolsep{8pt}}l}
+ \else
+ \begin{tabular}{p{\thu@title@width}l@{}l}
+ \fi
+ \thu@put@title{\thu@department@title} & \thu@title@sep & \thu@cdepartment\\
+ \thu@put@title{\thu@major@title} & \thu@title@sep & \thu@cmajor\\
+ \thu@put@title{\thu@author@title} & \thu@title@sep & \thu@cauthor \\
+ \thu@put@title{\thu@supervisor@title} & \thu@title@sep & \thu@csupervisor\\
+ \ifx\thu@cassosupervisor\@empty\else%
+ \thu@put@title{\thu@assosuper@title} & \thu@title@sep & \thu@cassosupervisor\\
+ \fi
+ \end{tabular}
}}
\else
\vskip 5bp
@@ -2514,7 +2618,7 @@
\thu@put@title{\thu@assosuper@title} & \thu@title@sep & {\ziju{0.6875}\thu@cassosupervisor}\\
\fi
\ifx\thu@ccosupervisor\@empty\else
- \thu@put@title{\thu@cosuper@title} & \thu@title@sep & {\ziju{0.6875}\thu@ccosupervisor}\\
+ \hfill\makebox[0pt][r]{\thu@cosuper@title} & \thu@title@sep & {\ziju{0.6875}\thu@ccosupervisor}\\
\fi
\end{tabular}
\end{center}}}
@@ -2537,19 +2641,27 @@
% \changes{v4.2}{2008/01/23}{博士英文封面补充联合导师。}
% \changes{v4.7}{2011/11/28}{硕士生新增英文封面。}
% \begin{macrocode}
+%</cls>
+%<*cfg>
+\def\thu@master@art{Master of Arts}
+\def\thu@master@sci{Master of Science}
+\def\thu@doctor@phi{Doctor of Philosophy}
+%</cfg>
+%<*cls>
\newcommand{\thu@engcover}{%
- \def\thu@master@art{Master of Arts}
- \def\thu@master@sci{Master of Science}
- \def\thu@doctor@phi{Doctor of Philosophy}
- \newif\ifthu@professional
- \thu@professionalfalse
+ \newif\ifthu@professional\thu@professionalfalse
\ifthu@master
- \ifx\thu@edegree\thu@master@art\relax\else
- \ifx\thu@edegree\thu@master@sci\relax\else
- \thu@professionaltrue\fi\fi\fi
+ \ifthenelse{\equal{\thu@edegree}{\thu@master@art}}
+ {\relax}
+ {\ifthenelse{\equal{\thu@edegree}{\thu@master@sci}}
+ {\relax}
+ {\thu@professionaltrue}}
+ \fi
\ifthu@doctor
- \ifx\thu@edegree\thu@doctor@phi\relax\else
- \thu@professionaltrue\fi\fi
+ \ifthenelse{\equal{\thu@edegree}{\thu@doctor@phi}}
+ {\relax}
+ {\thu@professionaltrue}
+ \fi
\begin{center}
\vspace*{-5pt}
\parbox[t][5.2cm][t]{\paperwidth-7.2cm}{
@@ -2629,11 +2741,20 @@
% \end{macrocode}
% \end{macro}
%
-%
% \begin{macro}{\makecover}
+% 生成封面总命令。
% \changes{v2.1}{2006/02/29}{分成几个小模块来搞,不然这个 macro 太大了,看不过来。}
% \begin{macrocode}
-\NewDocumentCommand{\makecover}{o}{
+\def\makecover{%
+ \thu@setup@pdfinfo\thu@makecover}
+\def\thu@setup@pdfinfo{%
+ \hypersetup{%
+ pdftitle={\thu@ctitle},
+ pdfauthor={\thu@cauthor},
+ pdfsubject={\thu@cdegree},
+ pdfkeywords={\thu@ckeywords},
+ pdfcreator={\thuthesis-v\version}}}
+\NewDocumentCommand{\thu@makecover}{o}{
\phantomsection
\pdfbookmark[-1]{\thu@ctitle}{ctitle}
\normalsize%
@@ -2661,7 +2782,7 @@
% \changes{v3.0}{2007/05/12}{本科论文授权图片扫描取消。}
% \changes{v4.5.2}{2010/05/29}{本科封面和授权说明之间不要空白页。}
% \changes{v4.6}{2011/05/29}{博士后报告无授权说明。}
-% \changes{v4.8.2}{2015/06/05}{使用 pdfpages 宏包支持本硕博论文授权说明扫描版(\#36)。}
+% \changes{v5.0.0}{2015/06/05}{使用 pdfpages 宏包支持本硕博论文授权说明扫描版(\#36)。}
% \begin{macrocode}
\ifthu@postdoctor\relax\else%
\ifthu@bachelor\clearpage\else\cleardoublepage\fi%
@@ -2695,7 +2816,7 @@
% \end{macrocode}
% \end{macro}
%
-% \subsubsection{摘要格式}
+% \subsubsection{摘要}
% \label{sec:abstractformat}
%
% \begin{macro}{\thu@makeabstract}
@@ -2835,7 +2956,7 @@
% \end{macrocode}
% 声明部分
% \changes{v3.0}{2007/05/12}{本科论文声明部分图片扫描取消。}
-% \changes{v4.8.2}{2015/06/05}{使用 pdfpages 宏包支持本硕博论文声明扫描版(\#36)。}
+% \changes{v5.0.0}{2015/06/05}{使用 pdfpages 宏包支持本硕博论文声明扫描版(\#36)。}
% \begin{macrocode}
{
\ifthu@postdoctor\relax\else%
@@ -2855,7 +2976,7 @@
% \end{macrocode}
% \end{environment}
%
-% \subsubsection{索引部分}
+% \subsubsection{图表索引}
% \label{sec:threeindex}
% \changes{v2.5}{2006/05/18}{增加插图、表格和公式索引。}
% \changes{v2.5}{2006/05/19}{为了让索引中能出现\textbf{图 xxx},不得不修改 \LaTeX
@@ -2926,7 +3047,7 @@
% \end{macro}
%
%
-% \subsubsection{参考文献}
+% \subsection{参考文献}
% \label{sec:ref}
%
% \begin{macro}{\inlinecite}
@@ -2957,6 +3078,7 @@
% \changes{v3.1}{2007/06/19}{引入 cs{thudot} 来自动完成参考文献最后的点。}
% \begin{macrocode}
\def\thudot{\ifthu@bachelor\else\unskip.\fi}
+%</cls>
% \end{macrocode}
% \end{macro}
% \begin{macro}{\thumasterbib}
@@ -2970,8 +3092,10 @@
% 本科生写作指南未指定,参考文献著录格式文档中对中外文学位论文都标注``[D]''。
% \changes{v4.7}{2012/05/29}{修改两个宏使其对应不同的中文论文需求。}
% \begin{macrocode}
+%<*cfg>
\def\thumasterbib{\ifthu@bachelor [D]\else [硕士学位论文]\fi}
\def\thuphdbib{\ifthu@bachelor [D]\else [博士学位论文]\fi}
+%</cfg>
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -2982,6 +3106,7 @@
% \changes{v2.5}{2006/05/13}{参考文献序号靠左,而不是靠右。}
% \changes{v2.6.4}{2006/10/23}{调整参考文献标签宽度,使得条目增多时仍能对齐。}
% \begin{macrocode}
+%<*cls>
\renewenvironment{thebibliography}[1]{%
\thu@chapter*{\bibname}%
\wuhao[1.5]
@@ -3009,7 +3134,7 @@
% \end{environment}
%
%
-% \subsubsection{附录}
+% \subsection{附录}
% \label{sec:appendix}
%
% \begin{environment}{appendix}
@@ -3023,7 +3148,7 @@
% \end{macrocode}
% \end{environment}
%
-% \subsubsection{个人简历}
+% \subsection{个人简历}
% \changes{v1.5}{2005/12/16}{增加个人简历章节的命令,去掉主文件中需要重新
% 定义 \cs{cleardoublepage} 和自己写 \cs{markboth},\cs{addcontentsline} 的部分。}
%
@@ -3046,8 +3171,8 @@
% 分别用于个人简历里面会出现的学术论文列表和研究成果列表。
% publications 环境可以连续出现多次,模板会自动在之间加入空行。
% \changes{v2.5.1}{2006/05/23}{ft,教务处和研究生院非要搞的不一样!}
-% \changes{v4.8.2}{2015/04/18}{博士后就不提在学期间了,不合适(\#100)}
-% \changes{v4.8.2}{2015/05/17}{让简历部分更符合格式指南和示例文件(\#122)}
+% \changes{v5.0.0}{2015/04/18}{博士后就不提在学期间了,不合适(\#100)}
+% \changes{v5.0.0}{2015/05/17}{让简历部分更符合格式指南和示例文件(\#122)}
% \begin{macro}{\resumeitem}
% \begin{macro}{\researchitem}
% \begin{environment}{publications}
@@ -3080,12 +3205,12 @@ leftmargin=10mm,labelsep=!,before*=\xiaosi[1.26]}
% \end{macro}
% \end{macro}
%
-% \subsubsection{书脊}
+% \subsection{书脊}
% \label{sec:shuji}
% \begin{macro}{\shuji}
% 单独使用书脊命令会在新的一页产生竖排书脊。
% \changes{v4.5}{2009/01/04}{简化代码,同时支持 xelatex。}
-% \changes{v4.8.2}{2015/12/21}{扩展 \cs{shuji}\oarg{标题}\oarg{作者}。}
+% \changes{v5.0.0}{2015/12/21}{扩展 \cs{shuji}\oarg{标题}\oarg{作者}。}
% \begin{macrocode}
%<*cls>
\NewDocumentCommand{\shuji}{O{\thu@ctitle} O{\thu@cauthor}}{%
@@ -3095,7 +3220,7 @@ leftmargin=10mm,labelsep=!,before*=\xiaosi[1.26]}
% \end{macrocode}
% \end{macro}
%
-% \subsubsection{索引}
+% \subsection{索引}
%
% 生成索引的一些命令,虽然我们暂时还用不到。
% \begin{macrocode}
@@ -3124,22 +3249,21 @@ leftmargin=10mm,labelsep=!,before*=\xiaosi[1.26]}
%</cls>
% \end{macrocode}
%
-% \subsubsection{自定义命令和环境}
+% \subsection{自定义命令和环境}
% \label{sec:userdefine}
%
% \begin{macro}{\pozhehao}
-% 定义破折号。两个字宽,ex 差不多是当前字体的一半高度,所以通过 \cs{rule} 可以简单
-% 的完成破折号绘制。
+% 为了兼容性保留之,推荐直接输入“——”。
% \changes{v2.1}{2006/01/12}{稍微加宽一点。同时把名字改为\textbf{破折号}:\cs{pozhehao}}
% \begin{macrocode}
%<*cls>
-\newcommand{\pozhehao}{\kern0.3ex\rule[0.8ex]{2em}{0.1ex}\kern0.3ex}
+\newcommand{\pozhehao}{——}
%</cls>
% \end{macrocode}
% \end{macro}
%
%
-% \subsubsection{其它}
+% \subsection{其它}
% \label{sec:other}
%
% 在模板文档结束时即装入配置文件,这样用户就能在导言区进行相应的修改,否则
@@ -3148,24 +3272,6 @@ leftmargin=10mm,labelsep=!,before*=\xiaosi[1.26]}
% \begin{macrocode}
%<*cls>
\AtEndOfClass{\input{thuthesis.cfg}}
-% \end{macrocode}
-%
-% \begin{macro}{\thu@setup@pdfinfo}
-% 设置一些 pdf 文档信息,依赖于 \pkg{hyperref} 宏包。
-% \begin{macrocode}
-\def\thu@setup@pdfinfo{%
- \hypersetup{%
- pdftitle={\thu@ctitle},
- pdfauthor={\thu@cauthor},
- pdfsubject={\thu@cdegree},
- pdfkeywords={\thu@ckeywords},
- pdfcreator={\thu@cauthor},
- pdfproducer={\thuthesis}}}
-% \end{macrocode}
-% \end{macro}
-%
-% 应用对列表环境的修改。
-% \begin{macrocode}
\AtEndOfClass{\sloppy}
%</cls>
% \end{macrocode}
@@ -3178,7 +3284,7 @@ leftmargin=10mm,labelsep=!,before*=\xiaosi[1.26]}
\ProvidesPackage{dtx-style}
\RequirePackage[UTF8,scheme=chinese]{ctex}
-\RequirePackage[top=2.5cm, bottom=2.5cm]{geometry}
+\RequirePackage[top=2.5cm, bottom=2.5cm, headsep=5mm]{geometry}
\RequirePackage{calc}
\RequirePackage{array,longtable}
@@ -3186,9 +3292,10 @@ leftmargin=10mm,labelsep=!,before*=\xiaosi[1.26]}
\RequirePackage{fancyhdr}
\RequirePackage{xcolor}
\RequirePackage{url}
+\RequirePackage{hyperref}
+\RequirePackage{enumitem}
\RequirePackage{ifxetex}
-\RequirePackage{hyperref}
\hypersetup{%
bookmarksnumbered=true,
bookmarksopen=true,
@@ -3207,6 +3314,7 @@ leftmargin=10mm,labelsep=!,before*=\xiaosi[1.26]}
CJKbookmarks=false}
\fi
+\setlist{nosep}
\def\SpecialOptionIndex#1{\@bsphack%
\index{#1\actualchar{\protect\bfseries #1}}\@esphack}
\newenvironment{options}
@@ -3218,22 +3326,28 @@ leftmargin=10mm,labelsep=!,before*=\xiaosi[1.26]}
\ovalbox{\color{magenta}\bfseries\sffamily ##1}%
\SpecialOptionIndex{##1}}}
}{\endlist}
+
\DefineVerbatimEnvironment{example}{Verbatim}%
{frame=single,framerule=0.3mm,rulecolor=\color{violet},%
fillcolor=\color{violet!5},framesep=1mm,baselinestretch=1.2,%
fontsize=\small,gobble=1}
+
\DefineVerbatimEnvironment{shell}{Verbatim}%
{frame=single,framerule=0.3mm,rulecolor=\color{olive},%
fillcolor=\color{olive!5},framesep=1mm,fontsize=\small,gobble=1}
-\newcommand{\myentry}[1]{%
- \vskip5pt\par\noindent\llap{{\color{purple}\bfseries #1}}\marginpar{\strut}\hskip\parindent}
+
+\newcommand{\myentry}[1]{\vskip5pt\par%
+ \noindent\llap{{\color{purple}\bfseries #1}}%
+ \marginpar{\strut}\hskip\parindent}
+
\MakeShortVerb{\|}
-\def\pkg#1{\texttt{#1}}
-\def\option#1{\textsf{#1}}
-\def\file#1{\textsl{#1}}
+
+\newcommand*\pkg[1]{\texttt{#1}}
+\newcommand*\option[1]{\textsf{#1}}
+\newcommand*\file[1]{\textsl{#1}}
\def\thuthesis{\textsc{Thu}\-\textsc{Thesis}}
\newcommand{\note}[1]{\par%
- {\color{magenta}\bfseries 说明:#1}}
+ {\color{magenta}{\bfseries 说明:}\emph{#1}}}
%</dtx-style>
% \end{macrocode}
% \fi
diff --git a/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cfg b/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cfg
index 2de98c9384f..8d657ce0bfa 100644
--- a/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cfg
+++ b/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cfg
@@ -23,7 +23,7 @@
%% This is the configuration file of the thuthesis package with LaTeX2e.
%%
\ProvidesFile{thuthesis.cfg}
-[2015/12/24 5.0 Tsinghua University Thesis Template]
+[2015/12/27 5.1.0 Tsinghua University Thesis Template]
\theoremsymbol{\ensuremath{\square}}
\newtheorem*{proof}{证明}
\theoremstyle{plain}
@@ -153,6 +153,9 @@
\newcommand{\thu@frontdate}{%
日\ifthu@bachelor\hspace{1em}\else\hspace{2em}\fi 期:}
\newcommand{\thu@ckeywords@title}{关键词:}
+\def\thu@master@art{Master of Arts}
+\def\thu@master@sci{Master of Science}
+\def\thu@doctor@phi{Doctor of Philosophy}
\newcommand{\thu@denotation@name}{主要符号对照表}
\newcommand{\thu@ackname}{致\hspace{1em}谢}
\newcommand{\thu@declarename}{声\hspace{1em}明}
@@ -162,6 +165,8 @@
其他个人和集体,均已在文中以明确方式标明。}
\newcommand{\thu@signature}{签\hspace{1em}名:}
\newcommand{\thu@backdate}{日\hspace{1em}期:}
+\def\thumasterbib{\ifthu@bachelor [D]\else [硕士学位论文]\fi}
+\def\thuphdbib{\ifthu@bachelor [D]\else [博士学位论文]\fi}
\ifthu@bachelor
\newcommand{\thu@resume@title}{在学期间参加课题的研究成果}
\else
diff --git a/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls b/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls
index ff65bda19c3..35320b4a26c 100644
--- a/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls
+++ b/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls
@@ -25,10 +25,10 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesClass{thuthesis}
-[2015/12/24 5.0 Tsinghua University Thesis Template]
+[2015/12/27 5.1.0 Tsinghua University Thesis Template]
\hyphenation{Thu-Thesis}
\def\thuthesis{\textsc{ThuThesis}}
-\def\version{4.8.1}
+\def\version{5.1.0}
\RequirePackage{kvoptions}
\SetupKeyvalOptions{
@@ -47,7 +47,7 @@
\expandafter\csname thu@#1true\endcsname}
\def\thu@deprecated@type@option{%
- \setkeys{thu}{type=\CurrentOption} % for compatability.
+ \kvsetkeys{thu}{type=\CurrentOption} % for compatability.
\ClassError{thuthesis}{Option '\CurrentOption' is deprecated, \MessageBreak
please use 'type=\CurrentOption' instead}{}}
\DeclareVoidOption{bachelor}{\thu@deprecated@type@option}
@@ -61,8 +61,7 @@
\DeclareBoolOption{arialtitle}
\DeclareBoolOption{raggedbottom}
\DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{ctexbook}}
-\setkeys{thu}{%
- type=bachelor,
+\kvsetkeys{thu}{%
raggedbottom,
arial,
arialtitle}
@@ -96,9 +95,7 @@
\else
\RequirePackage[perpage]{footmisc}
\fi
-\ifthu@bachelor
- \RequirePackage{CJKfntef}
-\fi
+\RequirePackage{CJKfntef}
\renewcommand{\baselinestretch}{1.0} % todo:?
\ifxetex
% todo: minor fix of CJKnumb
@@ -151,6 +148,7 @@
\ifthu@bachelor
\geometry{
left=32mm,
+ headheight=5mm,
headsep=5mm,
textheight=220mm,
bottom=37mm,
@@ -158,6 +156,7 @@
\else
\geometry{
left=30mm,
+ headheight=5mm,
headsep=5mm,
textheight=237mm,
bottom=29mm,
@@ -166,7 +165,7 @@
\RequirePackage{fancyhdr}
\let\thu@cleardoublepage\cleardoublepage
\newcommand{\thu@clearemptydoublepage}{%
- \clearpage{\pagestyle{empty}\thu@cleardoublepage}}
+ \clearpage{\pagestyle{thu@empty}\thu@cleardoublepage}}
\let\cleardoublepage\thu@clearemptydoublepage
\renewcommand\frontmatter{%
\if@openright\cleardoublepage\else\clearpage\fi
@@ -207,7 +206,7 @@
\thu@def@fontsize{qihao}{5.5bp}
\thu@def@fontsize{bahao}{5bp}
\renewcommand\normalsize{%
- \@setfontsize\normalsize{12bp}{20bp}
+ \@setfontsize\normalsize{12bp}{20bp}%
\abovedisplayskip=20bp \@plus 2bp \@minus 2bp
\abovedisplayshortskip=20bp \@plus 2bp \@minus 2bp
\belowdisplayskip=\abovedisplayskip
@@ -437,7 +436,8 @@
\renewcommand*\l@section{\@dottedtocline{1}{\ccwd}{2.1em}}
\renewcommand*\l@subsection{\@dottedtocline{2}{\ifthu@bachelor 1.5\ccwd\else 2\ccwd\fi}{3em}}
\renewcommand*\l@subsubsection{\@dottedtocline{3}{\ifthu@bachelor 2.4em\else 3.5em\fi}{3.8em}}
-\def\thu@def@term#1{
+\def\thu@def@term#1{%
+ \define@key{thu}{#1}{\csname #1\endcsname{##1}}
\expandafter\gdef\csname #1\endcsname##1{%
\expandafter\gdef\csname thu@#1\endcsname{##1}}
\csname #1\endcsname{}}
@@ -448,12 +448,16 @@
\thu@def@term{secretyear}
\thu@def@term{ctitle}
\thu@def@term{cdegree}
-\newcommand\cdepartment[2][]{\def\thu@cdepartment@short{#1}\def\thu@cdepartment{#2}}
-\def\caffil{\cdepartment} % todo: for compatibility
+\newcommand\cdepartment[2][]{% todo: for definekeys
+ \def\thu@cdepartment@short{#1}
+ \def\thu@cdepartment{#2}}
+\define@key{thu}{cdepartment}{%
+ \expandafter\cdepartment#1}
+\def\caffil{\cdepartment} % for compatibility
\def\thu@cdepartment@short{}
\def\thu@cdepartment{}
\thu@def@term{cmajor}
-\def\csubject{\cmajor} % todo: for compatibility
+\def\csubject{\cmajor} % for compatibility
\thu@def@term{cfirstdiscipline}
\thu@def@term{cseconddiscipline}
\thu@def@term{cauthor}
@@ -465,9 +469,9 @@
\thu@def@term{etitle}
\thu@def@term{edegree}
\thu@def@term{edepartment}
-\def\eaffil{\edepartment} % todo: for compability
+\def\eaffil{\edepartment} % for compability
\thu@def@term{emajor}
-\def\esubject{\emajor} % todo: for compability
+\def\esubject{\emajor} %for compability
\thu@def@term{eauthor}
\thu@def@term{esupervisor}
\thu@def@term{eassosupervisor}
@@ -484,7 +488,8 @@
\newcommand{\thu@@eabstract}[1]{\long\gdef\thu@eabstract{#1}}
\newenvironment{eabstract}{\collect@body\thu@@eabstract}{}
\def\thu@parse@keywords#1{
- \expandafter\gdef\csname thu@#1\endcsname{} % todo: need or not?
+ \define@key{thu}{#1}{\csname #1\endcsname{##1}}
+ \expandafter\gdef\csname thu@#1\endcsname{}
\expandafter\gdef\csname #1\endcsname##1{
\@for\reserved@a:=##1\do{
\expandafter\ifx\csname thu@#1\endcsname\@empty\else
@@ -494,9 +499,11 @@
\expandafter\csname thu@#1\expandafter\endcsname\expandafter{\reserved@a}}}}
\thu@parse@keywords{ckeywords}
\thu@parse@keywords{ekeywords}
+\def\thusetup{\kvsetkeys{thu}}
\newcommand\thu@underline[2][6em]{\hskip1pt\underline{\hb@xt@ #1{\hss#2\hss}}\hskip3pt}
\newlength{\thu@title@width}
-\def\thu@put@title#1{\makebox{\hb@xt@\thu@title@width{#1}}}
+\newcommand{\thu@put@title}[2][\thu@title@width]{%
+ \begin{CJKfilltwosides}{#1}#2\end{CJKfilltwosides}}
\def\thu@first@titlepage{%
\ifthu@postdoctor\thu@first@titlepage@postdoctor\else\thu@first@titlepage@other\fi}
\newcommand{\thu@first@titlepage@postdoctor}{
@@ -537,7 +544,6 @@
\vskip2cm
{\sihao\thu@postdoctor@date@title\hskip1em\underline\thu@postdoctordate}
\end{center}}
-\newcommand*{\getcmlength}[1]{\strip@pt\dimexpr0.035146\dimexpr#1\relax\relax}
\newcommand{\thu@first@titlepage@other}{
\begin{center}
\vspace*{-1.6cm}
@@ -573,23 +579,24 @@
\fi
\ifthu@bachelor
\vskip1cm
- \parbox[t][7.0cm][t]{\textwidth}{{\sanhao[1.8]
- \hspace*{1.65cm}\fangsong
- \setlength{\thu@title@width}{4em}
- \setlength{\extrarowheight}{6pt}
- \ifxetex % todo: ugly codes
- \begin{tabular}{p{\thu@title@width}@{}l@{\extracolsep{8pt}}l}
- \else
- \begin{tabular}{p{\thu@title@width}l@{}l}
- \fi
- \thu@put@title{\thu@department@title} & \thu@title@sep & \thu@cdepartment\\
- \thu@put@title{\thu@major@title} & \thu@title@sep & \thu@cmajor\\
- \thu@put@title{\thu@author@title} & \thu@title@sep & \thu@cauthor \\
- \thu@put@title{\thu@supervisor@title} & \thu@title@sep & \thu@csupervisor\\
- \ifx\thu@cassosupervisor\@empty\else
- \thu@put@title{\thu@assosuper@title} & \thu@title@sep & \thu@cassosupervisor\\
- \fi
- \end{tabular}
+ \parbox[t][7.0cm][t]{\textwidth}{%
+ {\fangsong\sanhao[1.8]%
+ \hspace*{1.65cm}
+ \setlength{\thu@title@width}{4em}
+ \setlength{\extrarowheight}{6pt}
+ \ifxetex % todo: ugly codes
+ \begin{tabular}{p{\thu@title@width}@{}l@{\extracolsep{8pt}}l}
+ \else
+ \begin{tabular}{p{\thu@title@width}l@{}l}
+ \fi
+ \thu@put@title{\thu@department@title} & \thu@title@sep & \thu@cdepartment\\
+ \thu@put@title{\thu@major@title} & \thu@title@sep & \thu@cmajor\\
+ \thu@put@title{\thu@author@title} & \thu@title@sep & \thu@cauthor \\
+ \thu@put@title{\thu@supervisor@title} & \thu@title@sep & \thu@csupervisor\\
+ \ifx\thu@cassosupervisor\@empty\else%
+ \thu@put@title{\thu@assosuper@title} & \thu@title@sep & \thu@cassosupervisor\\
+ \fi
+ \end{tabular}
}}
\else
\vskip 5bp
@@ -610,7 +617,7 @@
\thu@put@title{\thu@assosuper@title} & \thu@title@sep & {\ziju{0.6875}\thu@cassosupervisor}\\
\fi
\ifx\thu@ccosupervisor\@empty\else
- \thu@put@title{\thu@cosuper@title} & \thu@title@sep & {\ziju{0.6875}\thu@ccosupervisor}\\
+ \hfill\makebox[0pt][r]{\thu@cosuper@title} & \thu@title@sep & {\ziju{0.6875}\thu@ccosupervisor}\\
\fi
\end{tabular}
\end{center}}}
@@ -620,18 +627,19 @@
\end{center}
\end{center}} % end of titlepage
\newcommand{\thu@engcover}{%
- \def\thu@master@art{Master of Arts}
- \def\thu@master@sci{Master of Science}
- \def\thu@doctor@phi{Doctor of Philosophy}
- \newif\ifthu@professional
- \thu@professionalfalse
+ \newif\ifthu@professional\thu@professionalfalse
\ifthu@master
- \ifx\thu@edegree\thu@master@art\relax\else
- \ifx\thu@edegree\thu@master@sci\relax\else
- \thu@professionaltrue\fi\fi\fi
+ \ifthenelse{\equal{\thu@edegree}{\thu@master@art}}
+ {\relax}
+ {\ifthenelse{\equal{\thu@edegree}{\thu@master@sci}}
+ {\relax}
+ {\thu@professionaltrue}}
+ \fi
\ifthu@doctor
- \ifx\thu@edegree\thu@doctor@phi\relax\else
- \thu@professionaltrue\fi\fi
+ \ifthenelse{\equal{\thu@edegree}{\thu@doctor@phi}}
+ {\relax}
+ {\thu@professionaltrue}
+ \fi
\begin{center}
\vspace*{-5pt}
\parbox[t][5.2cm][t]{\paperwidth-7.2cm}{
@@ -700,7 +708,16 @@
\thu@frontdate\thu@underline[7em]\relax\hspace*{1cm}
\endgroup
\fi}
-\NewDocumentCommand{\makecover}{o}{
+\def\makecover{%
+ \thu@setup@pdfinfo\thu@makecover}
+\def\thu@setup@pdfinfo{%
+ \hypersetup{%
+ pdftitle={\thu@ctitle},
+ pdfauthor={\thu@cauthor},
+ pdfsubject={\thu@cdegree},
+ pdfkeywords={\thu@ckeywords},
+ pdfcreator={\thuthesis-v\version}}}
+\NewDocumentCommand{\thu@makecover}{o}{
\phantomsection
\pdfbookmark[-1]{\thu@ctitle}{ctitle}
\normalsize%
@@ -810,8 +827,6 @@
\def\@inlinecite#1{\begingroup\let\@cite\NAT@citenum\citep{#1}\endgroup}
\let\onlinecite\inlinecite
\def\thudot{\ifthu@bachelor\else\unskip.\fi}
-\def\thumasterbib{\ifthu@bachelor [D]\else [硕士学位论文]\fi}
-\def\thuphdbib{\ifthu@bachelor [D]\else [博士学位论文]\fi}
\renewenvironment{thebibliography}[1]{%
\thu@chapter*{\bibname}%
\wuhao[1.5]
@@ -867,16 +882,8 @@ leftmargin=10mm,labelsep=!,before*=\xiaosi[1.26]}
\texttt{#1}}
\newcommand{\wi}[1]{\index{#1}#1}
\fi
-\newcommand{\pozhehao}{\kern0.3ex\rule[0.8ex]{2em}{0.1ex}\kern0.3ex}
+\newcommand{\pozhehao}{——}
\AtEndOfClass{\input{thuthesis.cfg}}
-\def\thu@setup@pdfinfo{%
- \hypersetup{%
- pdftitle={\thu@ctitle},
- pdfauthor={\thu@cauthor},
- pdfsubject={\thu@cdegree},
- pdfkeywords={\thu@ckeywords},
- pdfcreator={\thu@cauthor},
- pdfproducer={\thuthesis}}}
\AtEndOfClass{\sloppy}
\endinput
%%
diff --git a/Master/texmf-dist/tex/latex/thuthesis/thuthesis.sty b/Master/texmf-dist/tex/latex/thuthesis/thuthesis.sty
index 2ac69daec37..4b5940223b1 100644
--- a/Master/texmf-dist/tex/latex/thuthesis/thuthesis.sty
+++ b/Master/texmf-dist/tex/latex/thuthesis/thuthesis.sty
@@ -33,6 +33,20 @@
% 给自定义的宏后面自动加空白
% \RequirePackage{xspace}
+% 借用 ltxdoc 里面的几个命令。
+\def\cmd#1{\cs{\expandafter\cmd@to@cs\string#1}}
+\def\cmd@to@cs#1#2{\char\number`#2\relax}
+\DeclareRobustCommand\cs[1]{\texttt{\char`\\#1}}
+
+\newcommand*{\meta}[1]{{%
+ \ensuremath{\langle}\rmfamily\itshape#1\/\ensuremath{\rangle}}}
+\providecommand\marg[1]{%
+ {\ttfamily\char`\{}\meta{#1}{\ttfamily\char`\}}}
+\providecommand\oarg[1]{%
+ {\ttfamily[}\meta{#1}{\ttfamily]}}
+\providecommand\parg[1]{%
+ {\ttfamily(}\meta{#1}{\ttfamily)}}
+\providecommand\pkg[1]{{\sffamily#1}}
% 定义自己常用的东西
\newcommand{\china}{中华人民共和国}