summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx
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 /Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx
parent32a3f4d6e166863d0c93ddc1bb3f8ef7a9bf18cd (diff)
thuthesis (27dec15)
git-svn-id: svn://tug.org/texlive/trunk@39220 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx')
-rw-r--r--Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx742
1 files changed, 428 insertions, 314 deletions
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