From 9788a8cf3f4f60828e8b9157e5036156a4da4dd4 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 1 Feb 2016 23:07:09 +0000 Subject: thuthesis (2feb16) git-svn-id: svn://tug.org/texlive/trunk@39543 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/doc/latex/thuthesis/data/chap01.tex | 23 +- .../texmf-dist/doc/latex/thuthesis/data/chap02.tex | 4 +- .../texmf-dist/doc/latex/thuthesis/data/cover.tex | 4 +- .../texmf-dist/doc/latex/thuthesis/dtx-style.sty | 2 +- Master/texmf-dist/doc/latex/thuthesis/main.pdf | Bin 701682 -> 704097 bytes Master/texmf-dist/doc/latex/thuthesis/main.tex | 2 + Master/texmf-dist/doc/latex/thuthesis/shuji.pdf | Bin 11651 -> 11579 bytes .../texmf-dist/doc/latex/thuthesis/thuthesis.pdf | Bin 699016 -> 701063 bytes .../source/latex/thuthesis/thuthesis.dtx | 652 ++++++++++----------- .../texmf-dist/tex/latex/thuthesis/thuthesis.cfg | 1 - .../texmf-dist/tex/latex/thuthesis/thuthesis.cls | 159 ++--- 11 files changed, 405 insertions(+), 442 deletions(-) (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/thuthesis/data/chap01.tex b/Master/texmf-dist/doc/latex/thuthesis/data/chap01.tex index 6eb8bd15e91..928f65b4b1f 100644 --- a/Master/texmf-dist/doc/latex/thuthesis/data/chap01.tex +++ b/Master/texmf-dist/doc/latex/thuthesis/data/chap01.tex @@ -4,16 +4,16 @@ 这是 \thuthesis{} 的示例文档,基本上覆盖了模板中所有格式的设置。建议大家在使用模 板之前,除了阅读《\thuthesis{}用户手册》,这个示例文档也最好能看一看。 -小老鼠偷吃热凉粉;短长虫环绕矮高粱。\footnote{韩愈(768-824),字退之,河南河阳( +小老鼠偷吃热凉粉;短长虫环绕矮高粱\footnote{韩愈(768-824),字退之,河南河阳( 今河南孟县)人,自称郡望昌黎,世称韩昌黎。幼孤贫刻苦好学,德宗贞元八年进士。曾 任监察御史,因上疏请免关中赋役,贬为阳山县令。后随宰相裴度平定淮西迁刑部侍郎, 又因上表谏迎佛骨,贬潮州刺史。做过吏部侍郎,死谥文公,故世称韩吏部、韩文公。是 - 唐代古文运动领袖,与柳宗元合称韩柳。诗力求险怪新奇,雄浑重气势。} + 唐代古文运动领袖,与柳宗元合称韩柳。诗力求险怪新奇,雄浑重气势。}。 \section{封面相关} 封面的例子请参看 cover.tex。主要符号表参看 denation.tex,附录和个人简历分别参看 appendix01.tex -和 resume.tex。里面的命令都非常简单,一看即会。\footnote{你说还是看不懂?怎么会呢?} +和 resume.tex。里面的命令都很只管,一看即会\footnote{你说还是看不懂?怎么会呢?}。 \section{字体命令} \label{sec:first} @@ -81,11 +81,11 @@ \begin{tabularx}{\linewidth}{lX} \toprule[1.5pt] {\heiti 文件名} & {\heiti 描述} \\\midrule[1pt] - thuthesis.ins & \LaTeX{} 安装文件,docstrip\footnote{表格中的脚注} \\ + thuthesis.ins & \LaTeX{} 安装文件,\textsc{DocStrip}\footnote{表格中的脚注} \\ thuthesis.dtx & 所有的一切都在这里面\footnote{再来一个}。\\ thuthesis.cls & 模板类文件。\\ thuthesis.cfg & 模板配置文。cls 和 cfg 由前两个文件生成。\\ - thuthesis.bst & 参考文献 Bibtex 样式文件。\\ + thuthesis.bst & 参考文献 BIB\TeX\ 样式文件。\\ thuthesis.sty & 常用的包和命令写在这里,减轻主文件的负担。\\ \bottomrule[1.5pt] \end{tabularx} @@ -101,7 +101,7 @@ \label{sec:complicatedtable} 我们经常会在表格下方标注数据来源,或者对表格里面的条目进行解释。前面的脚注是一种 -不错的方法,如果你不喜欢脚注。那么完全可以在表格后面自己写注释,比如表~\ref{tab:tabexamp1}。 +不错的方法,如果不喜欢脚注,可以在表格后面写注释,比如表~\ref{tab:tabexamp1}。 \begin{table}[htbp] \centering \caption{复杂表格示例 1} @@ -204,7 +204,7 @@ } \end{table} -不可否认 \LaTeX{} 的表格功能没有想象中的那么强大,不过只要你足够认真,足够细致,那么 +不可否认 \LaTeX{} 的表格功能没有想象中的那么强大,不过只要足够认真,足够细致, 同样可以排出来非常复杂非常漂亮的表格。请参看表~\ref{tab:tabexamp2}。 \begin{table}[htbp] \centering\dawu[1.3] @@ -298,8 +298,8 @@ EP.B.8 & 126.74 & 0.003 & 0.017 & 0.005 & 0.083 & 1656 \\ 这个命令不会给表格编号,也就是出来的只有标题文字而没有“表~XX”,“图~XX”,否则 索引里面序号不连续就显得不伦不类,这也是 \LaTeX{} 里星号命令默认的规则。 -有这种需求的多是本科同学的英文资料翻译部分,如果你觉得附录中英文原文中的表格和图 -片显示成“ 表”和“图”很不协调的话,一个很好的办法就是用 \cs{caption*},参数 +有这种需求的多是本科同学的英文资料翻译部分,如果觉得附录中英文原文中的表格和图 +片显示成“表”和“图”不协调的话,一个很好的办法就是用 \cs{caption*},参数 随便自己写,比如不守规矩的表~1.111 和图~1.111 能满足这种特殊需要(可以参看附录部 分)。 \begin{table}[ht] @@ -318,8 +318,7 @@ EP.B.8 & 126.74 & 0.003 & 0.017 & 0.005 & 0.083 & 1656 \\ \end{minipage} \end{table} -如果你的确想让它编号,但又不想让它出现在索引中的话,那就自己看看代码改一改吧,我 -目前不打算给模板增加这种另类命令。 +如果的确想让它编号,但又不想让它出现在索引中的话,目前模板上不支持。 最后,虽然大家不一定会独立使用小页,但是关于小页中的脚注还是有必要提一下。请看下 面的例子。 @@ -497,7 +496,7 @@ V_j & = v_j, & \qquad X_j & = x_j, \section{参考文献} \label{sec:bib} -当然参考文献可以直接写 bibitem,虽然费点功夫,但是好控制,各种格式可以自己随意改 +当然参考文献可以直接写 \cs{bibitem},虽然费点功夫,但是好控制,各种格式可以自己随意改 写。 本模板推荐使用 BIB\TeX,样式文件为 \texttt{thuthesis.bst},基本符合学校的参考文献格 diff --git a/Master/texmf-dist/doc/latex/thuthesis/data/chap02.tex b/Master/texmf-dist/doc/latex/thuthesis/data/chap02.tex index d635f54da4e..e3baefc9187 100644 --- a/Master/texmf-dist/doc/latex/thuthesis/data/chap02.tex +++ b/Master/texmf-dist/doc/latex/thuthesis/data/chap02.tex @@ -15,7 +15,7 @@ p(y|\mathbf{x}) = \frac{p(\mathbf{x},y)}{p(\mathbf{x})}= \subsection{绘图} \label{sec:draw} -本模板不再预先装载任何绘图包(如 \pkg{pstricks,pgf} 等),完全由你自己来决定。 +本模板不再预先装载任何绘图包(如 \pkg{pstricks,pgf} 等),完全由用户来决定。 个人觉得 \pkg{pgf} 不错,不依赖于 Postscript。此外还有很多针对 \LaTeX{} 的 GUI 作图工具,如 XFig(jFig), WinFig, Tpx, Ipe, Dia, Inkscape, LaTeXPiX, jPicEdt, jaxdraw 等等。 @@ -23,7 +23,7 @@ jPicEdt, jaxdraw 等等。 \subsection{插图} \label{sec:graphs} -强烈推荐《\LaTeXe 插图指南》!关于子图形的使用细节请参看 \pkg{subcaption} 宏包的说明文档。 +强烈推荐《\LaTeXe\ 插图指南》!关于子图形的使用细节请参看 \pkg{subcaption} 宏包的说明文档。 \subsubsection{一个图形} \label{sec:onefig} diff --git a/Master/texmf-dist/doc/latex/thuthesis/data/cover.tex b/Master/texmf-dist/doc/latex/thuthesis/data/cover.tex index 04c4b9f6c06..0205f5c5306 100644 --- a/Master/texmf-dist/doc/latex/thuthesis/data/cover.tex +++ b/Master/texmf-dist/doc/latex/thuthesis/data/cover.tex @@ -14,7 +14,7 @@ %========= % 中文信息 %========= - ctitle={清华大学学位论文 \LaTeX\ 模板\\使用示例文档}, + ctitle={清华大学学位论文 \LaTeX\ 模板\\使用示例文档 v\version}, cdegree={工学硕士}, cdepartment={计算机科学与技术系}, cmajor={计算机科学与技术}, @@ -36,7 +36,7 @@ %========= % 英文信息 %========= - etitle={An Introduction to \LaTeX{} Thesis Template of Tsinghua University}, + etitle={An Introduction to \LaTeX{} Thesis Template of Tsinghua University v\version}, % 这块比较复杂,需要分情况讨论: % 1. 学术型硕士 % edegree:必须为Master of Arts或Master of Science(注意大小写) diff --git a/Master/texmf-dist/doc/latex/thuthesis/dtx-style.sty b/Master/texmf-dist/doc/latex/thuthesis/dtx-style.sty index c17d5835b57..476b836d791 100644 --- a/Master/texmf-dist/doc/latex/thuthesis/dtx-style.sty +++ b/Master/texmf-dist/doc/latex/thuthesis/dtx-style.sty @@ -23,7 +23,6 @@ %% To produce the documentation run the original source files ending with `.dtx' %% through LaTeX. %% -%% \end{latex} \ProvidesPackage{dtx-style} \RequirePackage{hypdoc} \RequirePackage[UTF8,scheme=chinese]{ctex} @@ -39,6 +38,7 @@ \RequirePackage{xcolor} \RequirePackage{enumitem} \RequirePackage{etoolbox} +\RequirePackage{metalogo} \colorlet{thu@macro}{blue!60!black} \colorlet{thu@env}{blue!70!black} diff --git a/Master/texmf-dist/doc/latex/thuthesis/main.pdf b/Master/texmf-dist/doc/latex/thuthesis/main.pdf index 8e64481ce57..65d3f9b16eb 100644 Binary files a/Master/texmf-dist/doc/latex/thuthesis/main.pdf and b/Master/texmf-dist/doc/latex/thuthesis/main.pdf differ diff --git a/Master/texmf-dist/doc/latex/thuthesis/main.tex b/Master/texmf-dist/doc/latex/thuthesis/main.tex index 27ca5753dc4..a8a0104bfb8 100644 --- a/Master/texmf-dist/doc/latex/thuthesis/main.tex +++ b/Master/texmf-dist/doc/latex/thuthesis/main.tex @@ -2,7 +2,9 @@ % 选项: % type=[bachelor|master|doctor|postdoctor], % 必选 % secret, % 可选 +% pifootnote, % 可选(建议打开) % openany|openright, % 可选,基本不用 +% arial, % 可选,基本不用 % arialtoc, % 可选,基本不用 % arialtitle % 可选,基本不用 diff --git a/Master/texmf-dist/doc/latex/thuthesis/shuji.pdf b/Master/texmf-dist/doc/latex/thuthesis/shuji.pdf index 02a891f4927..0cd29ce4a1b 100644 Binary files a/Master/texmf-dist/doc/latex/thuthesis/shuji.pdf and b/Master/texmf-dist/doc/latex/thuthesis/shuji.pdf differ diff --git a/Master/texmf-dist/doc/latex/thuthesis/thuthesis.pdf b/Master/texmf-dist/doc/latex/thuthesis/thuthesis.pdf index 29225d78bb6..8dd8f81261d 100644 Binary files a/Master/texmf-dist/doc/latex/thuthesis/thuthesis.pdf and b/Master/texmf-dist/doc/latex/thuthesis/thuthesis.pdf differ diff --git a/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx b/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx index e2b9189567d..fe0c3556db4 100644 --- a/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx +++ b/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx @@ -17,7 +17,7 @@ % \iffalse %<*driver> \def\thudate{\the\year/\the\month/\the\day} -\def\thuversion{5.2.1} +\def\thuversion{5.2.2} \ProvidesFile{thuthesis.dtx}[{\thudate} {\thuversion} Tsinghua University Thesis Template] \documentclass{ltxdoc} \usepackage{dtx-style} @@ -76,23 +76,23 @@ % \changes{v1.0}{2005/07/06}{Please refer to ``Bao--Pan'' version.} % \changes{v1.1}{2005/11/03}{Initial version, migrate from the old ``Bao--Pan'' % version. Make the template a class instead of package.} -% \changes{v1.2}{2005/11/04}{Remove \pkg*{fancyref}; Remove \pkg*{ucite} and implement -% \cs{onlinecite}; use package \pkg*{arial} or \pkg*{helvet} selectively.} -% \changes{v1.3}{2005/11/14}{Replace \pkg*{subfigure} with \pkg*{subfig}, replace \pkg*{caption2} -% with \pkg*{caption}, add details about using figure are in the example.} +% \changes{v1.2}{2005/11/04}{Remove \pkg{fancyref}; Remove \pkg{ucite} and implement +% \cs{onlinecite}; use package \pkg{arial} or \pkg{helvet} selectively.} +% \changes{v1.3}{2005/11/14}{Replace \pkg{subfigure} with \pkg{subfig}, replace \pkg{caption2} +% with \pkg{caption}, add details about using figure are in the example.} % \changes{v1.4rc1}{2005/11/20}{I do not know why \cs{thu@authorizationaddon} does not work % now for v1.3, while it's fine in v1.2. Temporarily, I remove the directive % :(. There might be better solution. Other changes: add \option{config} option to -% subfig to be compatible with subfigure. add \pkg*{courier} package for tt font.} +% subfig to be compatible with subfigure. add \pkg{courier} package for tt font.} % \changes{v1.4}{2005/12/05}{Fix the problem of \textbf{chinese}, which is % because both CJK and everysel redefine the \cs{selectfont}. So, a not so good -% workaround is merge them up. Add \file*{shuji.tex} example. Add \cs{pozhehao} command.} +% workaround is merge them up. Add \file{shuji.tex} example. Add \cs{pozhehao} command.} % \changes{v2.1}{2006/02/27}{Add support to bachelor thesis.} -% \changes{v2.1}{2006/03/01}{Remove \pkg*{fancyhdr} and \pkg*{geometry}.} +% \changes{v2.1}{2006/03/01}{Remove \pkg{fancyhdr} and \pkg{geometry}.} % \changes{v2.1}{2006/03/01}{Redefine footnote marks.} -% \changes{v2.1}{2006/03/01}{Replace \file*{thubib.bst} with \file*{chinesebst.bst}.} -% \changes{v2.1}{2006/03/02}{Merge the modification of \pkg*{ntheorem}.} -% \changes{v2.1}{2006/03/02}{Remove \pkg*{footmisc} and refine the document.} +% \changes{v2.1}{2006/03/01}{Replace \file{thubib.bst} with \file{chinesebst.bst}.} +% \changes{v2.1}{2006/03/02}{Merge the modification of \pkg{ntheorem}.} +% \changes{v2.1}{2006/03/02}{Remove \pkg{footmisc} and refine the document.} % \changes{v2.1}{2006/03/03}{Work very hard on the document.} % \changes{v2.1}{2006/03/03}{Add \cs{checklab} code to reduce ``unresolved labels'' warning} % \changes{v2.2}{2006/03/26}{Adjust margins. How bad it is to simulate MS WORD!.} @@ -114,7 +114,7 @@ % \changes{v2.4}{2006/04/14}{自动隐藏密级为内部时后面的五角星。} % \changes{v2.4}{2006/04/14}{增加“注释 (Remark)”环境。} % \changes{v2.4}{2006/04/14}{压缩 item 之间的距离。} -% \changes{v2.4}{2006/04/14}{\file*{thubib.bst} 文献标题取消自动小写。} +% \changes{v2.4}{2006/04/14}{\file{thubib.bst} 文献标题取消自动小写。} % \changes{v2.4}{2006/04/14}{中文参考文献取消 In: Proceedings。} % \changes{v2.4}{2006/04/14}{英文文参考文献调整 In: editor, Proceedings。} % \changes{v2.4}{2006/04/14}{参考文献为学位论文时,加方括号,作者后面为实心点。} @@ -128,24 +128,25 @@ % \changes{v2.4.2}{2006/04/18}{去掉参考文献第二个作者后面烦人的逗号。} % \changes{v2.5}{2006/05/19}{对本科论文进行大幅度的重写,因为教务处修改了格式要求。} % \changes{v2.5}{2006/05/19}{重新整理代码,使其布局更易读。} -% \changes{v2.5.1}{2006/05/24}{如果选项设置了 dvips,但是用 pdflatex 编译,报错。} +% \changes{v2.5.1}{2006/05/24}{如果选项设置了 dvips,但是用 PDF\LaTeX\ 编译,报错。} % \changes{v2.5.1}{2006/05/24}{根据教务处的新要求调整附录部分。} % \changes{v2.5.1}{2006/05/25}{参考文献中杂志文章如果没有卷号,那么页码直接跟在 -% 年份后面,并用句点分割。在 \file*{thubib.bst} 中增加 output.year 函数。} +% 年份后面,并用句点分割。在 \file{thubib.bst} 中增加 output.year 函数。} % \changes{v2.6}{2006/06/09}{增加 dvipdfm 选项。} -% \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{v2.6.2}{2006/06/18}{改正 groupmembers 的拼写错误。} % \changes{v3.0}{2007/05/12}{不用专门为本科论文生成“\textbf{提交}”版本了。} % \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.5}{2008/01/03}{加入 \XeTeX\ 支持,需要 \pkg{xeCJK}。} +% \changes{v4.5}{2008/01/04}{彻底转向 UTF-8,并支持 \XeLaTeX。} % \changes{v4.5}{2009/01/03}{增加 xetex, pdftex 选项。} % \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}{2013/03/02}{no need to load \pkg*{indentfirst} directly since we use \pkg*{ctex}.} -% \changes{v4.8}{2013/03/02}{内部调用 ctex 宏包,自动检测编译引擎。} +% \changes{v4.7}{2012/06/12}{去掉 \pkg{hypernat} 依赖,\pkg{hyperref} 和 \pkg{natbib} 可以很好配合了。} +% \changes{v4.8}{2013/03/02}{no need to load \pkg{indentfirst} directly since we use \pkg{ctex}.} +% \changes{v4.8}{2013/03/02}{内部调用 \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。} % @@ -211,13 +212,13 @@ % \label{sec:installation} % % \subsection{下载} -% \thuthesis{} 已经包含在主要的 \TeX{} 发行版中,一般不需要安装,阅读文档可以使 -% 用以下命令: +% \thuthesis{} 已经包含在主要的 \TeX{} 发行版中,一般不需要安装,可以利用发行版自 +% 带更新工具自动更新。阅读文档可以使用以下命令: % \begin{shell} % $ texdoc thuthesis % \end{shell} % -% 如果要自己安装,请继续阅读。 +% 如果要使用开发版,需自己安装,请继续阅读。 % \thuthesis{} 相关链接: % \begin{itemize} % \item 主页:\href{https://github.com/xueruini/thuthesis}{GitHub} @@ -235,13 +236,13 @@ % \toprule % {\heiti 文件(夹)} & {\heiti 功能描述}\\\midrule % \endfirsthead -% \hline +% \midrule % {\heiti 文件(夹)} & {\heiti 功能描述}\\\midrule % \endhead % \endfoot % \endlastfoot -% thuthesis.ins & 模板驱动文件 \\ -% thuthesis.dtx & 模板文档代码的混合文件\\ +% thuthesis.ins & \textsc{DocStrip} 驱动文件(开发用) \\ +% thuthesis.dtx & \textsc{DocStrip} 源文件(开发用)\\\midrule % thuthesis.cls & 模板类文件\\ % thuthesis.cfg & 模板配置文件\\ % ctex-fontset-thuthesis.def & 中文字体配置文件\\ @@ -282,7 +283,7 @@ % \note{默认的发行包中已经包含了所有文件,可以直接使用。如果对如何生成模板文件以 % 及模板文档不感兴趣,请跳过本小节。} % -% 模板解压缩后生成文件夹 \file{thuthesis-VERSION}\footnote{VERSION 为版本号。}, +% 模板解压缩后生成文件夹 \file{thuthesis-vX.Y.Z}\footnote{\texttt{vX.Y.Z} 为版本号。}, % 其中包括:模板源文件(\file{thuthesis.ins} 和 \file{thuthesis.dtx}),参考文献 % 样式 \file{thuthesis.bst},示例文档 % (\file{main.tex},\file{shuji.tex},\file{thuthesis.sty}\footnote{可能用到的包 @@ -292,7 +293,7 @@ % 板文件和配置文件(具体命令细节请参考 \file{README.md} 和 \file{Makefile}): % % \begin{shell} -% $ cd thuthesis-VERSION +% $ cd thuthesis-vX.Y.Z % # 生成 thuthesis.cls 和 thuthesis.cfg % $ latex thuthesis.ins % @@ -304,7 +305,7 @@ % $ xelatex thuthesis.dtx % 生成说明文档 thuthesis.pdf % \end{shell} % -% \subsubsection{xelatex} +% \subsubsection{\XeLaTeX} % \label{sec:xelatex} % 很多用户对 \LaTeX{} 命令执行的次数不太清楚,一个基本的原则是多次运行 \LaTeX{}命 % 令直至不再出现警告。下面给出生成示例文档的详细过程(\texttt{\#} 开头的行为注 @@ -320,7 +321,7 @@ % $ xelatex main % $ xelatex main # 此时生成完整的 pdf 文件 % \end{shell} -% Xe\TeX 最大的优势就是不再需要繁琐的字体配置。\thuthesis{} 通过 \pkg{xeCJK} 来控 +% \XeTeX\ 最大的优势就是不再需要繁琐的字体配置。\thuthesis{} 通过 \pkg{xeCJK} 来控 % 制中文字体和标点压缩。模板里默认用的是中易的六款免费字体(宋,黑,楷,仿宋,隶 % 书和幼圆),因学位论文需求不建议替换为其他字体。如果实在必要,可以通过定 % 制 \file{ctex-fontset-thuthesis.def} 文件中的字体自行替换。研究生一般用不到隶书 @@ -341,12 +342,12 @@ % $ dvipdfmx main % \end{shell} % -% \subsubsection{pdflatex} +% \subsubsection{PDF\LaTeX} % \label{sec:pdflatex} % 如果使用 PDF\LaTeX,按照第~\ref{sec:xelatex} 节的顺序执行即可,只是将命令中 -% xelatex 替换为 pdflatex。 +% \texttt{xelatex} 替换为 \texttt{pdflatex}。 % -% 需要注意的是 PDF\LaTeX\ 不能处理常见的 EPS 图形,需要先用 epstopdf 将其转化 +% 需要注意的是 PDF\LaTeX\ 不能处理常见的 EPS 图形,需要先用 \texttt{epstopdf} 将其转化 % 成 PDF。不过 PDF\LaTeX\ 增加了对 png,jpg 等标量图形的支持,比较方便。TeX Live % 自从 2010 版本起自动调用 \texttt{epstopdf} 将 EPS 图形转化为 PDF。 % @@ -374,7 +375,7 @@ % \end{shell} % % \thuthesis{} 的 Makefile 默认用 \texttt{latexmk} 调用 -% \texttt{xelatex} 编译,此外还支持采用 \texttt{xelatex}、\texttt{pdflatex} 和 +% \texttt{xelatex} 编译,此外还支持直接用 \texttt{xelatex}、\texttt{pdflatex} 和 % \texttt{dvipdfmx} 方式编译,如有需要可以修 % 改 \file{Makefile} 开头的参数设置或通过命令行传递参数(请参看 \file{README.md}), % 进一步还可以修改 \file{latexmkrc} 进行定制。 @@ -453,14 +454,22 @@ % \secretyear{2020} % \end{latex} % +% \DescribeOption{pifootnote} +% 是否使用 \pkg{pifont} 的带圈字符标记脚注编号。默认关闭,即使用\cs{textcircled} +% 命令,效果不太好,但是符合学校样式要求。不管使用哪种方式,一页的脚注建议控制 +% 在 9 个以内,否则大于 10的数字带圈的效果不太好。建议使用时打开此选项,脚注编号 +% 很漂亮,如下: +% \begin{latex} +% \documentclass[pifootnote]{thuthesis} +% \end{latex} % % \DescribeOption{openany} % \DescribeOption{openright} % 正规出版物的章节出现在奇数页,也就是右手边的页面,这就是 \option{openright},也 % 是 \thuthesis\ 的默认选项。在这种情况下,如果前一章的最后一页也是奇数,那么模板 % 会自动生成一个纯粹的空白页,很多人不是很习惯这种方式,而且学校的格式似乎更倾向 -% 于页面连续,那就是通常所说的 \option{openany}。\footnote{目前所有论文都 -% 是 \option{openany}。}这两个选项不用设置,\thuthesis{} 会根据当前论文类型自动选 +% 于页面连续,那就是通常所说的 \option{openany}\footnote{目前所有论文都 +% 是 \option{openany}。}。这两个选项不用设置,\thuthesis{} 会根据当前论文类型自动选 % 择。 % % \DescribeOption{arial} @@ -486,14 +495,15 @@ % \label{sec:font-config} % 正确配置中文字体是使用模板的第一步。模板调用 \CTeX\ 宏包,提供如下字体使用方式: % \begin{itemize} -% \item 基于传统 \pkg{CJK} 包,使用 latex、pdflatex 编译。 -% \item 基于 \pkg{xeCJK} 包,使用 xelatex 编译。(推荐方法) +% \item 基于传统 \pkg{CJK} 包,使用 \LaTeX、PDF\LaTeX\ 编译。 +% \item 基于 \pkg{xeCJK} 包,使用 \XeLaTeX\ 编译。(推荐方法) % \end{itemize} % -% 第一种方式的字体配置比较繁琐,建议使用 \emph{donated@newsmth} 制作的中文字体包 -% (自包含安装方法),请用户自行下载安装,此处不再赘述。本模板推荐使用第二种方法, -% 只要把所需字体放入系统字体文件夹(也可以指定自定义文件夹)即可。用户可以使用 -% \file{ctex-fontset-thuthesis.def} 文件配置所需字体。使用中易六种字体的配置如下: +% 第一种方式中文字体配置比较繁琐,建议使用 \CTeX\ 套装,已经自带中文字体配置。或 +% 者使用 \CTeX-Fonts 生成中文字体包,此处不再赘述。本模板推荐使用第二种方法,只要 +% 把所需字体放入系统字体文件夹(也可以指定自定义文件夹)即可。用户可以使 +% 用\file{ctex-fontset-thuthesis.def} 文件配置所需字体。使用中易六种字体的配置如 +% 下: % % \begin{latex} % \ProvidesFile{ctex-fontset-thuthesis.def} @@ -559,8 +569,11 @@ % % \myentry{字号} % \DescribeMacro{\chuhao} +% \DescribeMacro{\xiaochu} +% \DescribeMacro{\yihao} +% \DescribeMacro{\xiaoyi} % \DescribeMacro{\bahao} -% 等命令定义一组字体大小,分别为: +% 定义字体大小,分别为: % % \begin{center} % \begin{tabular}{llllll} @@ -576,7 +589,10 @@ % 是 \cs{dawu},模板已经设置好了。 % % \begin{latex} -% {\erhao 二号 \sanhao 三号 \sihao 四号 \qihao 七号} +% {\erhao 二号} +% {\sanhao[1.5] 三号} +% {\sihao 四号} +% {\qihao[2] 七号} % \end{latex} % % 也可以使用 \CTeX\ 定义的 \cs{zihao}\marg{num} 来切换字号,具体用法参看其文 @@ -590,7 +606,7 @@ % 盖前面的)。以 \texttt{c} 开头的命令跟中文相关,\texttt{e} 开头则为对应的英文。 % % \DescribeMacro{\thusetup} -% 用法与常见 \emph{key=value} 命令相同,如下: +% \cs{thusetup} 用法与常见 \emph{key=value} 命令相同,如下: % \begin{latex} % \thusetup{ % key1 = value1, @@ -881,7 +897,7 @@ % \DescribeMacro{\listofequations} % \DescribeMacro{\listofequations*} % \begin{center} -% \begin{tabular}{ll} +% \begin{longtable}{ll} % \toprule % {\heiti 用途} & {\heiti 命令} \\\midrule % 目录 & \cs{tableofcontents} \\\midrule @@ -891,7 +907,7 @@ % & \cs{listoftables*} \\\midrule % 公式索引 & \cs{listofequations} \\ % & \cs{listofequations*}\\\bottomrule -% \end{tabular} +% \end{longtable} % \end{center} % % \LaTeX{} 默认支持插图和表格索引,是通过 \cs{caption} 命令完成的,因此它们必须出 @@ -1037,7 +1053,7 @@ % \item 伍晓明, 杨轶, 张宁欣, 等. 基于MEMS技术的集成铁电硅微麦克风. 中国集成电路, % 2003, 53:59-61. % \end{publications} -%% \end{latex} +% \end{latex} % % \DescribeEnv{achievements} % 研究成果用 \cs{researchitem}\{研究成果\} 开启,随后用 \env{achievements} 环 @@ -1199,7 +1215,7 @@ %<*cls> \hyphenation{Thu-Thesis} \def\thuthesis{\textsc{ThuThesis}} -\def\version{5.2.1} +\def\version{5.2.2} \RequirePackage{kvoptions} \SetupKeyvalOptions{ @@ -1207,8 +1223,9 @@ prefix=thu@, setkeys=\kvsetkeys} % \end{macrocode} +% % 用 \pkg{kvoptions} 的 key=value 方式来设置论文类型。 -% \changes{v5.0.0}{2015/12/13}{使用 \pkg*{kvoptions} 简化选项 type。} +% \changes{v5.0.0}{2015/12/13}{使用 \pkg{kvoptions} 简化选项 type。} % \begin{macrocode} \newif\ifthu@bachelor \newif\ifthu@master @@ -1220,7 +1237,6 @@ \thu@doctorfalse \thu@postdoctorfalse \expandafter\csname thu@#1true\endcsname} - \def\thu@deprecated@type@option{% \kvsetkeys{thu}{type=\CurrentOption} % for compatability. \ClassError{thuthesis}{Option '\CurrentOption' is deprecated, \MessageBreak @@ -1229,38 +1245,46 @@ \DeclareVoidOption{master}{\thu@deprecated@type@option} \DeclareVoidOption{doctor}{\thu@deprecated@type@option} \DeclareVoidOption{postdoctor}{\thu@deprecated@type@option} - +% \end{macrocode} +% +% 论文是否保密。 +% \begin{macrocode} \DeclareBoolOption{secret} % \end{macrocode} % -% 如果需要使用 arial 字体,请打开 [arial] 选项 +% 正文 Sans 字体是否使用 Arial 字体(默认打开)。 % \begin{macrocode} \DeclareBoolOption{arial} % \end{macrocode} % -% 目录中英文是否用 arial +% 目录中英文是否用 Arial 字体(默认关闭)。 % \begin{macrocode} \DeclareBoolOption{arialtoc} % \end{macrocode} % -% 章节标题中的英文是否用 arial +% 章节标题中的英文是否用 Arial 字体(默认打开)。 % \begin{macrocode} \DeclareBoolOption{arialtitle} % \end{macrocode} % -% \option{raggedbottom} 选项 +% \option{raggedbottom} 选项(默认打开) % \changes{v4.8}{2013/03/05}{增加 noraggedbottom 选项。} % \changes{v5.0.0}{2015/12/13}{norggedbottom 选项修改为 raggedbottom。} % \begin{macrocode} \DeclareBoolOption{raggedbottom} % \end{macrocode} % +% 在脚注标记中使用 \pkg{pifont} 的带圈数字(默认关闭) +% \begin{macrocode} +\DeclareBoolOption{pifootnote} +% \end{macrocode} +% % 将选项传递给 \pkg{ctexbook}。 % \begin{macrocode} \DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{ctexbook}} % \end{macrocode} % -% \changes{v2.5.1}{2006/05/24}{ft,研究生院目录要 times,而教务处要 arial。} +% \changes{v2.5.1}{2006/05/24}{研究生院目录要 times,而教务处要 arial。} % \changes{v2.5.1}{2006/05/26}{本科 openright,研究生 openany。} % \changes{v3.1}{2007/10/09}{本科的目录又不要 arial 字体了。} % \changes{v4.8}{2013/05/29}{添加 nocap 选项,恢复默认标题样式,模板会进一步定制。} @@ -1277,7 +1301,7 @@ \ProcessKeyvalOptions* % \end{macrocode} % -% 使用 XeTeX 引擎时,\pkg{fontspec} 宏包会被 \pkg{xeCJK} 自动 +% 使用 \XeTeX\ 引擎时,\pkg{fontspec} 宏包会被 \pkg{xeCJK} 自动 % 调用。传递给 \pkg{fontspec} 宏包 \option{no-math} 选项,避免部分数学符号字体自动调整为 CMR。 % 其他引擎下没有这个问题,这一行会被无视。 % \begin{macrocode} @@ -1309,6 +1333,7 @@ % % 引用的宏包和相应的定义。 % \begin{macrocode} +\RequirePackage{etoolbox} \RequirePackage{ifxetex} \RequirePackage{xparse} % \end{macrocode} @@ -1320,10 +1345,11 @@ % \end{macrocode} % % \pkg{newtx} 设置 Times New Roman,Helvetica。 -% \changes{v3.1}{2007/06/16}{replace \pkg*{mathptmx} with \pkg*{txfonts}.} -% \changes{v5.2.1}{2016/01/14}{使用 \pkg*{newtx} 替换 \pkg*{txfonts}。} +% \changes{v3.1}{2007/06/16}{replace \pkg{mathptmx} with \pkg{txfonts}.} +% \changes{v5.2.1}{2016/01/14}{使用 \pkg{newtx} 替换 \pkg{txfonts}。} +% \changes{v5.2.2}{2016/02/01}{不希望 \pkg{newtx} 修改 \cs{@makefnmark}。 } % \begin{macrocode} -\RequirePackage{newtxtext} +\RequirePackage[defaultsups]{newtxtext} \RequirePackage{newtxmath} % \end{macrocode} % @@ -1351,25 +1377,32 @@ % \end{macrocode} % % 更好的列表环境。 -% \changes{v2.6.2}{2006/06/18}{去掉 \pkg*{paralist} 的 \option{newitem} 和 +% \changes{v2.6.2}{2006/06/18}{去掉 \pkg{paralist} 的 \option{newitem} 和 % \option{newenum} 选项,因为默认是打开的。} % \changes{v2.6.4}{2006/10/23}{增加 \option{neverdecrease} 选项。} % \changes{v5.0.0}{2012/12/13}{删除 \pkg{paralist} 选项。} +% \changes{v5.2.2}{2016/01/31}{利用 \pkg{environ} 的 \cs{Collect@Body}。} % \begin{macrocode} \RequirePackage[shortlabels]{enumitem} +\RequirePackage{environ} % \end{macrocode} % % 禁止 \LaTeX 自动调整多余的页面底部空白,并保持脚注仍然在底部。 % 脚注按页编号。 % \begin{macrocode} \ifthu@raggedbottom - \RequirePackage[bottom,perpage]{footmisc} + \RequirePackage[bottom,perpage,hang]{footmisc} \raggedbottom \else - \RequirePackage[perpage]{footmisc} + \RequirePackage[perpage,hang]{footmisc} \fi % \end{macrocode} % +% \begin{macrocode} +\ifthu@pifootnote + \RequirePackage{pifont} +\fi +% \end{macrocode} % 利用 \pkg{CJKfntef} 实现汉字的下划线和盒子内两段对齐,并可以避免 % \cs{makebox}\oarg{width}\oarg{s} 可能产生的 underful boxes。 % \begin{macrocode} @@ -1377,24 +1410,24 @@ % \end{macrocode} % % TODO:重置 \cs{baselinestretch},这个地方太诡异了。是古老版本留下来的,会影响 -% 封面部分的排班,应该优化一下。 +% 封面部分的排版,应该优化一下。 % \changes{v4.8}{2013/03/09}{reset baselinestretch after ctex's change.} % \begin{macrocode} \renewcommand{\baselinestretch}{1.0} % todo:? % \end{macrocode} % -% XeTeX 环境下独立配置,包括零对应的圆圈符号和字体。 +% \XeTeX\ 环境下独立配置,包括零对应的圆圈符号和字体。 % \begin{macrocode} \ifxetex \def\CJK@null{\kern\CJKnullspace\Unicode{48}{7}\kern\CJKnullspace} \defaultfontfeatures{Mapping=tex-text} % \end{macrocode} % 默认采用中易的六款免费字体。缺少上述字体的用户可以通过 -% \file{ctex-fontset-thuthesis.def} 文件自定义字体。非 XeTeX 环境下利用 +% \file{ctex-fontset-thuthesis.def} 文件自定义字体。非 \XeTeX\ 环境下利用 % \pkg{CJKspace} 来控制中英文之间的间距。 -% \changes{v4.8}{2013/05/28}{在 CJK 模式下用 \pkg*{CJKspace} 保留中英文间空格。} -% \changes{v5.0.0}{2015/04/17}{固定字体设置,同时改善与 ctex 兼容性。} -% \changes{v5.2.1}{2016/01/14}{使用 \pkg*{newtx} 字体。} +% \changes{v4.8}{2013/05/28}{在 CJK 模式下用 \pkg{CJKspace} 保留中英文间空格。} +% \changes{v5.0.0}{2015/04/17}{固定字体设置,同时改善与 \pkg{ctex} 兼容性。} +% \changes{v5.2.1}{2016/01/14}{使用 \pkg{newtx} 字体。} % \begin{macrocode} \IfFileExists{ctex-fontset-thuthesis.def}% {\ctexset{fontset=thuthesis}}% @@ -1408,7 +1441,7 @@ \ifthu@arial \IfFileExists{arial.sty}% {\RequirePackage{arial}}% - {\ClassWarning{thuthesis}{no arial.sty availiable!}} + {\ClassWarning{thuthesis}{arial.sty is not availiable!}} \fi \fi % \end{macrocode} @@ -1419,7 +1452,7 @@ % \end{macrocode} % % 表格控制 -% \changes{v2.6}{2006/06/09}{增加 \pkg*{longtable}。} +% \changes{v2.6}{2006/06/09}{增加 \pkg{longtable}。} % \begin{macrocode} \RequirePackage{array} \RequirePackage{longtable} @@ -1437,6 +1470,7 @@ % % 生成有书签的 pdf 及其开关,请结合 gbk2uni 避免书签乱码。 % \changes{v2.6}{2006/06/09}{去除 hyperref 选项,等待全局传递。} +% \changes{v5.2.2}{2016/01/25}{目录中标题和页码都是链接。} % \begin{macrocode} \RequirePackage{hyperref} \ifxetex @@ -1448,6 +1482,7 @@ CJKbookmarks=false} \fi \hypersetup{% + linktoc=all, bookmarksnumbered=true, bookmarksopen=true, bookmarksopenlevel=1, @@ -1475,7 +1510,7 @@ % \changes{v4.7}{2012/05/29}{修改本科生页脚间距与样例基本一致。} % \changes{v5.0.0}{2015/03/10}{不再将页面尺寸写入 dvi,因为已不支持 dvips, % 而该方案会使得在使用 tikzexternalize 时外部 PDF 图片 BBox 不对。} -% \changes{v5.0.0}{2015/12/14}{用 \pkg*{geometry} 简化设置。} +% \changes{v5.0.0}{2015/12/14}{用 \pkg{geometry} 简化设置。} % \begin{macrocode} \RequirePackage{geometry} \geometry{ @@ -1596,97 +1631,64 @@ \thu@choosefont{##1}{#2}}} % \end{macrocode} % \end{macro} +% % \begin{macro}{\chuhao} -% 初号 -% \begin{macrocode} -\thu@def@fontsize{chuhao}{42bp} -% \end{macrocode} -% \end{macro} % \begin{macro}{\xiaochu} -% \begin{macrocode} -\thu@def@fontsize{xiaochu}{36bp} -% \end{macrocode} -% \end{macro} % \begin{macro}{\yihao} -% \begin{macrocode} -\thu@def@fontsize{yihao}{26bp} -% \end{macrocode} -% \end{macro} % \begin{macro}{\xiaoyi} -% \begin{macrocode} -\thu@def@fontsize{xiaoyi}{24bp} -% \end{macrocode} -% \end{macro} % \begin{macro}{\erhao} -% \begin{macrocode} -\thu@def@fontsize{erhao}{22bp} -% \end{macrocode} -% \end{macro} % \begin{macro}{\xiaoer} -% \begin{macrocode} -\thu@def@fontsize{xiaoer}{18bp} -% \end{macrocode} -% \end{macro} % \begin{macro}{\sanhao} -% \begin{macrocode} -\thu@def@fontsize{sanhao}{16bp} -% \end{macrocode} -% \end{macro} % \begin{macro}{\xiaosan} -% \begin{macrocode} -\thu@def@fontsize{xiaosan}{15bp} -% \end{macrocode} -% \end{macro} % \begin{macro}{\sihao} -% \begin{macrocode} -\thu@def@fontsize{sihao}{14bp} -% \end{macrocode} -% \end{macro} % \begin{macro}{\banxiaosi} -% \begin{macrocode} -\thu@def@fontsize{banxiaosi}{13bp} -% \end{macrocode} -% \end{macro} % \begin{macro}{\xiaosi} -% \begin{macrocode} -\thu@def@fontsize{xiaosi}{12bp} -% \end{macrocode} -% \end{macro} % \begin{macro}{\dawu} -% \begin{macrocode} -\thu@def@fontsize{dawu}{11bp} -% \end{macrocode} -% \end{macro} % \begin{macro}{\wuhao} -% \begin{macrocode} -\thu@def@fontsize{wuhao}{10.5bp} -% \end{macrocode} -% \end{macro} % \begin{macro}{\xiaowu} -% \begin{macrocode} -\thu@def@fontsize{xiaowu}{9bp} -% \end{macrocode} -% \end{macro} % \begin{macro}{\liuhao} -% \begin{macrocode} -\thu@def@fontsize{liuhao}{7.5bp} -% \end{macrocode} -% \end{macro} % \begin{macro}{\xiaoliu} -% \begin{macrocode} -\thu@def@fontsize{xiaoliu}{6.5bp} -% \end{macrocode} -% \end{macro} % \begin{macro}{\qihao} -% \begin{macrocode} -\thu@def@fontsize{qihao}{5.5bp} -% \end{macrocode} -% \end{macro} % \begin{macro}{\bahao} +% 一组字号定义。TODO:用 \cs{zihao} 替代。 % \begin{macrocode} +\thu@def@fontsize{chuhao}{42bp} +\thu@def@fontsize{xiaochu}{36bp} +\thu@def@fontsize{yihao}{26bp} +\thu@def@fontsize{xiaoyi}{24bp} +\thu@def@fontsize{erhao}{22bp} +\thu@def@fontsize{xiaoer}{18bp} +\thu@def@fontsize{sanhao}{16bp} +\thu@def@fontsize{xiaosan}{15bp} +\thu@def@fontsize{sihao}{14bp} +\thu@def@fontsize{banxiaosi}{13bp} +\thu@def@fontsize{xiaosi}{12bp} +\thu@def@fontsize{dawu}{11bp} +\thu@def@fontsize{wuhao}{10.5bp} +\thu@def@fontsize{xiaowu}{9bp} +\thu@def@fontsize{liuhao}{7.5bp} +\thu@def@fontsize{xiaoliu}{6.5bp} +\thu@def@fontsize{qihao}{5.5bp} \thu@def@fontsize{bahao}{5bp} % \end{macrocode} % \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} % % \begin{macro}{\normalsize} % 正文小四号 (12bp) 字,行距为固定值 20 bp。 @@ -1705,8 +1707,7 @@ % \subsubsection{页眉页脚} % \label{sec:headerfooter} % -% 定义页眉和页脚。\cs{chapter} 自动调用 -% \cs{thispagestyle\{thu@plain\}},所以要重新定义 \cs{thu@plain}。 +% 定义页眉和页脚。 % \begin{macro}{\ps@thu@empty} % \begin{macro}{\ps@thu@plain} % \begin{macro}{\ps@thu@headings} @@ -1715,11 +1716,12 @@ % \changes{v2.5}{2006/05/13}{本科的奇偶页眉不同。} % \changes{v2.5}{2006/05/20}{增加 empty 页面样式。} % \changes{v4.7}{2012/05/29}{本科页码用小五号字。} -% \changes{v5.0.0}{2015/12/20}{利用 \pkg*{fancyhdr} 设置页眉页脚。} +% \changes{v5.0.0}{2015/12/20}{利用 \pkg{fancyhdr} 设置页眉页脚。} % 定义三种页眉页脚格式: % \begin{itemize} % \item \texttt{thu@empty}:页眉页脚都没有 -% \item \texttt{thu@plain}:只显示页脚的页码 +% \item \texttt{thu@plain}:只显示页脚的页码。\cs{chapter} 自动调用 +% \cs{thispagestyle\{thu@plain\}}。 % \item \texttt{thu@headings}:页眉页脚同时显示 % \end{itemize} % \begin{macrocode} @@ -1769,48 +1771,48 @@ % % \subsubsection{脚注} % \label{sec:footnote} -% 脚注字体:宋体小五,单倍行距。悬挂缩进 1.5 字符。标号在正文中是上标,在脚注中为 -% 正体。默认情况下 \cs{@makefnmark} 显示为上标,同时为脚标和正文所用,所以如果要区 -% 分,必须分别定义脚注的标号和正文的标号。 +% 脚注符合中文习惯,数字带圈。 % \changes{v2.1}{2006/03/01}{让脚注它悬挂起来,而且中文中用上标,脚注中用正体。} % \changes{v2.5}{2006/05/13}{修正 minipage 中的脚注。} -% \changes{v2.5.1}{2006/05/21}{脚注编号使用 \cs{textcircled} 命令,每页允许至多 99 个 -% 脚注条目。} % \begin{macro}{\thu@textcircled} -% 生成带圈的脚注数字。最多处理到 99,当然这个很容易扩展了。 +% \changes{v2.5.1}{2006/05/21}{脚注编号使用 \cs{textcircled} 命令,每页允许至多 99 个。} +% \changes{v5.2.2}{2016/02/01}{脚注编号每页允许至多 9 个。} +% 生成带圈的脚注数字,最多处理到 10。 % \begin{macrocode} %<*cls> \def\thu@textcircled#1{% - \ifnum \value{#1} <10 \textcircled{\xiaoliu\arabic{#1}} - \else\ifnum \value{#1} <100 \textcircled{\qihao\arabic{#1}}\fi + \ifnum\value{#1} >9 + \ClassError{thuthesis}% + {Too many footnotes in this page.}{Keep footnote less than 10.} + \fi + \ifthu@pifootnote% + \ding{\numexpr171+\value{#1}}% + \else% + \textcircled{\xiaoliu\arabic{#1}}% \fi} +\renewcommand{\thefootnote}{\thu@textcircled{footnote}} +\renewcommand{\thempfootnote}{\thu@textcircled{mpfootnote}} % \end{macrocode} % \end{macro} -% 修改脚注内部命令。 -% \changes{v2.6}{2006/06/09}{脚注改成 1.5 倍行距,漂亮。} +% +% 定义脚注分割线,字号(宋体小五),以及悬挂缩进(1.5字符)。 % \begin{macrocode} -\renewcommand{\thefootnote}{\thu@textcircled{footnote}} -\renewcommand{\thempfootnote}{\thu@textcircled{mpfootnote}} \def\footnoterule{\vskip-3\p@\hrule\@width0.3\textwidth\@height0.4\p@\vskip2.6\p@} \let\thu@footnotesize\footnotesize \renewcommand\footnotesize{\thu@footnotesize\xiaowu[1.5]} -\def\@makefnmark{\textsuperscript{\hbox{\normalfont\@thefnmark}}} -\long\def\@makefntext#1{ - \bgroup - \newbox\thu@tempboxa - \setbox\thu@tempboxa\hbox{% - \hb@xt@ 2em{\@thefnmark\hss}} - \leftmargin\wd\thu@tempboxa - \rightmargin\z@ - \linewidth \columnwidth - \advance \linewidth -\leftmargin - \parshape \@ne \leftmargin \linewidth - \footnotesize - \@setpar{{\@@par}}% - \leavevmode - \llap{\box\thu@tempboxa}% - #1 - \par\egroup} +\footnotemargin1.5em\relax +% \end{macrocode} +% +% \cs{@makefnmark} 默认是上标样式,而在脚注部分要求为正文大小。利用\cs{patchcmd} +% 动态调整 \cs{@makefnmark} 的定义。 +% \changes{v2.6}{2006/06/09}{脚注改成 1.5 倍行距,漂亮。} +% \changes{v5.2.2}{2016/02/01}{基于 \pkg{footmisc} 来设置不同位置 footnote +% marker 样式。} +% \begin{macrocode} +\let\thu@makefnmark\@makefnmark +\def\thu@@makefnmark{\hbox{{\normalfont\@thefnmark}}} +\pretocmd{\@makefntext}{\let\@makefnmark\thu@@makefnmark}{}{} +\apptocmd{\@makefntext}{\let\@makefnmark\thu@makefnmark}{}{} % % \end{macrocode} % @@ -1828,12 +1830,11 @@ % % 公式改成 (1-1) 的形式,本科还要在前面加上\textbf{公式}二字,我不知道他们是怎么想的,这 % 忒不好看了。 -% \changes{v2.5.1}{2006/05/24}{本科公式编号前添加\textbf{公式}二字。ft,这个需要修 \pkg*{amsmath} 极其深入的一个命令。} +% \changes{v2.5.1}{2006/05/24}{本科公式编号前添加\textbf{公式}二字。需要修 \pkg{amsmath} 极其深的一个命令。} % \changes{v2.5.1}{2006/05/24}{教务处居然要本科论文公式全文编号!} % \changes{v2.5.2}{2006/05/29}{上一个版本忘了把研究生的公式编号排除。} -% \changes{v3.0}{2007/05/12}{本科公式又要取消全文统一编号了,这帮家伙,早就告诉 -% 过他们,就是不听。} -% 本科的公式编号太变态了,不得不修改 \pkg{amsmath} 中很深的一个命令 \cs{tagform@}。 +% \changes{v3.0}{2007/05/12}{本科公式又要取消全文统一编号了。} +% 本科的公式编号要求很诡异,不得不修改 \pkg{amsmath} 中很深的一个命令 \cs{tagform@}。 % \changes{v2.6.2}{2006/06/19}{根据不同论文格式显示不同公式编号,并自动加入索引。} % \changes{v4.2}{2008/01/23}{\cs{eqref} 加括号。} % 同时为了让 \pkg{amsmath} 的 \cs{tag*} 命令得到正确的格式,我们必须修改这些代 @@ -1844,7 +1845,7 @@ % \def\make@df@tag@@#1{% % \gdef\df@tag{\maketag@@@{#1}\def\@currentlabel{#1}}} % \end{latex} -% \changes{v4.4}{2008/05/30}{变态的本科论文终于去掉了\textbf{公式}二字。} +% \changes{v4.4}{2008/05/30}{本科论文终于去掉了\textbf{公式}二字。} % \changes{v4.4.4}{2008/06/12}{修复了一个从 v4.3 升级到 v4.4 过程中的丢失公式索引的 bug,原修改代码保留备忘。} % \begin{macrocode} \def\make@df@tag{\@ifstar\thu@make@df@tag@@\make@df@tag@@@} @@ -1863,26 +1864,7 @@ %\fi % \end{macrocode} % -% TODO:解决证明环境中方块乱跑的问题。 -% \begin{macrocode} -\gdef\@endtrivlist#1{% % from \endtrivlist - \if@inlabel \indent\fi - \if@newlist \@noitemerr\fi - \ifhmode - \ifdim\lastskip >\z@ #1\unskip \par - \else #1\unskip \par \fi - \fi - \if@noparlist \else - \ifdim\lastskip >\z@ - \@tempskipa\lastskip \vskip -\lastskip - \advance\@tempskipa\parskip \advance\@tempskipa -\@outerparskip - \vskip\@tempskipa - \fi - \@endparenv - \fi #1} -% \end{macrocode} -% -% 定理字样使用黑体,正文使用宋体,冒号隔开 +% 定理标题使用黑体,正文使用宋体,冒号隔开。 % \changes{v2.6.2}{2006/06/17}{增加问题和猜想两个数学环境。} % \changes{v4.2}{2008/03/07}{调整证明环境的编号和结尾的方块。} % \changes{v5.0.0}{2015/04/18}{修正定理字样为黑体 (\#104)。} @@ -1891,9 +1873,7 @@ \theoremheaderfont{\rmfamily\heiti} % %<*cfg> -% \theoremsymbol{\ensuremath{\blacksquare}} \theoremsymbol{\ensuremath{\square}} -%\theoremstyle{nonumberplain} \newtheorem*{proof}{证明} \theoremstyle{plain} \theoremsymbol{} @@ -1946,7 +1926,7 @@ % \changes{v2.4}{2006/04/14}{表格内容为 11 磅。} % \changes{v2.4}{2006/04/14}{图表标题左对齐,取消原先漂亮的 hang 模式。} % \changes{v2.5}{2006/05/13}{标题上下间距重调,以前没有考虑 \cs{intextsep} 的影响。} -% \changes{v2.5.1}{2006/05/23}{增加 \pkg*{subfigure} 和 \pkg*{subtable} 的 caption 配置。} +% \changes{v2.5.1}{2006/05/23}{增加 \pkg{subfigure} 和 \pkg{subtable} 的 caption 配置。} % \changes{v2.5.1}{2006/05/24}{重新定义表格默认字体。} % \changes{v2.5.3}{2006/06/07}{不管 caption 出现在什么位置,\cs{aboveskip} 总是出现在标题和浮动体之间的距离。} % \changes{v4.3}{2008/03/11}{子图引用时加括号。} @@ -1970,8 +1950,8 @@ % \renewcommand{\p@subfigure}{:} % \end{macrocode} % 我们采用 \pkg{longtable} 来处理跨页的表格。同样我们需要设置其默认字体为五号。 -% \changes{v2.5.3}{2006/06/08}{增加对 \pkg*{longtable} 的处理。} -% \changes{v4.5.1}{2009/01/06}{太好了,不用处理 \pkg*{longtable} 的 \cs{caption} +% \changes{v2.5.3}{2006/06/08}{增加对 \pkg{longtable} 的处理。} +% \changes{v4.5.1}{2009/01/06}{太好了,不用处理 \pkg{longtable} 的 \cs{caption} % 了。} % \begin{macrocode} \let\thu@LT@array\LT@array @@ -1979,7 +1959,7 @@ % \end{macrocode} % % \begin{macro}{\hlinewd} -% 简单的表格使用三线表推荐用 \cs{hlinewd}。如果表格比较复杂还是用 \pkg*{booktabs} 的命 +% 简单的表格使用三线表推荐用 \cs{hlinewd}。如果表格比较复杂还是用 \pkg{booktabs} 的命 % 令好一些。 % \begin{macrocode} \def\hlinewd#1{% @@ -2073,7 +2053,7 @@ % 前空 24 磅,段后空 18 磅。本科要求:段前段后间距 30/20 pt,行距 20pt。但正文 % 章节 30pt 的话和样例效果不一致。 % -% \changes{v2.5}{2006/05/13}{取消 \pkg*{titlesec} 宏包,用基本 \LaTeX{} 命令格式化标题。} +% \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}{英文摘要标题要搞特殊化。} % \changes{v5.0.0}{2015/04/17}{修正章节间距问题(\#57)} @@ -2142,8 +2122,8 @@ % 默认的 \cs{chapter*} 很难同时满足研究生院和本科生的论文要求。本科论文要求所有 % 的章都出现在目录里,比如摘要、Abstract、主要符号表等,所以可以简单的扩展默认 % \cs{chapter*} 实现这个目的。但是研究生又不要这些出现在目录中,而且致谢和声明 -% 部分的章名、页眉和目录都不同,所以我想定义一个功能强悍的 \cs{thu@chapter*} 专 -% 门处理他们的变态要求。 +% 部分的章名、页眉和目录都不同,所以我想定义一个灵活的 \cs{thu@chapter*} 专 +% 门处理他们的这些要求。 % % \cs{thu@chapter*}\oarg{tocline}\marg{title}\oarg{header}: tocline 是出现在目录 % 中的条目,如果为空则此 chapter 不出现在目录中,如果省略表示目录出现 title; @@ -2194,8 +2174,9 @@ % % 每章标题行前空 6 磅,后空 0 磅。如果使用目录项中英文要使用 Arial,那么就加上 \cs{sffamily}。 % 章节名中英文用 Arial 字体,页码仍用 Times。 +% \begin{macro}{\tableofcontents} % \changes{v2.0}{2005/12/18}{附录的目录项需要调整一下。以及公式编号方式等等。} -% \changes{v2.5}{2006/05/13}{取消 \pkg*{titletoc} 宏包,用 \cs{dottedtocline} 调整 +% \changes{v2.5}{2006/05/13}{取消 \pkg{titletoc} 宏包,用 \cs{dottedtocline} 调整 % 目录。} % \changes{v2.5.1}{2006/05/23}{减小目录项中的导引小点跟页码之间的留白。} % \changes{v2.5.2}{2006/05/29}{用 \cs{thu@chapter*} 改写目录命令。} @@ -2204,32 +2185,23 @@ % \changes{v4.4}{2008/06/04}{本科生目录字号改回\cs{xiaosi}\oarg{1.8}。} % \changes{v4.4}{2008/06/04}{本科生目录缩进要求不同。} % \changes{v4.4}{2008/06/18}{本科章目录项一直用黑体 (Arial)。} -% \begin{macro}{\tableofcontents} -% 目录生成命令。 +% 目录生成命令。 % \begin{macrocode} \renewcommand\tableofcontents{% \thu@chapter*[]{\contentsname} \ifthu@bachelor\xiaosi[1.8]\else\xiaosi[1.65]\fi\@starttoc{toc}\normalsize} +% \end{macrocode} +% 调整目录样式,允许指定目录字体。 +% \changes{v5.2.2}{2016/01/23}{用 \cs{patchcmd} 修改 \cs{@dottedtocline}。} +% \begin{macrocode} \ifthu@arialtoc \def\thu@toc@font{\sffamily} \fi -\def\@pnumwidth{2em} % 这个参数没用了 -\def\@tocrmarg{2em} -\def\@dotsep{1} % 目录点间的距离 -\def\@dottedtocline#1#2#3#4#5{% - \ifnum #1>\c@tocdepth \else - \vskip \z@ \@plus.2\p@ - {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip - \parindent #2\relax\@afterindenttrue - \interlinepenalty\@M - \leavevmode - \@tempdima #3\relax - \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip - {\csname thu@toc@font\endcsname #4}\nobreak - \leaders\hbox{$\m@th\mkern \@dotsep mu\hbox{.}\mkern \@dotsep mu$}\hfill - \nobreak{\normalfont \normalcolor #5}% - \par}% - \fi} +\def\@pnumwidth{2em} +\def\@tocrmarg{\@pnumwidth} +\def\@dotsep{1} +\patchcmd{\@dottedtocline}{#4}{\csname thu@toc@font\endcsname #4}{}{} +\patchcmd{\@dottedtocline}{\hb@xt@\@pnumwidth}{\hbox}{}{} \renewcommand*\l@chapter[2]{% \ifnum \c@tocdepth >\m@ne \addpenalty{-\@highpenalty}% @@ -2285,79 +2257,44 @@ % \changes{v2.0}{2005/12/18}{增加了封面密级,增加博士封面支持} % \changes{v4.6}{2011/04/27}{增加博士后相关指令。} % -% \begin{macro}{\id} -% \begin{macro}{\udc} -% \begin{macro}{\catalognumber} % \begin{macro}{\secretlevel} % \begin{macro}{\secretyear} +% 定义密级参数。 +% \begin{macrocode} +\thu@def@term{secretlevel} +\thu@def@term{secretyear} +% \end{macrocode} +% \end{macro} +% \end{macro} +% % \begin{macro}{\ctitle} -% \begin{macro}{\cdegree} -% \begin{macro}{\cdepartment} -% \begin{macro}{\cmajor} -% \begin{macro}{\cfirstdiscipline} -% \begin{macro}{\cseconddiscipline} +% \begin{macro}{\etitle} +% 论文中英文题目。 +% \begin{macrocode} +\thu@def@term{ctitle} +\thu@def@term{etitle} +% \end{macrocode} +% \end{macro} +% \end{macro} +% % \begin{macro}{\cauthor} +% \begin{macro}{\eauthor} % \begin{macro}{\csupervisor} % \begin{macro}{\cassosupervisor} % \begin{macro}{\ccosupervisor} -% \begin{macro}{\cdate} -% \begin{macro}{\postdoctordate} -% \begin{macro}{\etitle} -% \begin{macro}{\edegree} -% \begin{macro}{\edepartment} -% \begin{macro}{\emajor} -% \begin{macro}{\eauthor} % \begin{macro}{\esupervisor} % \begin{macro}{\eassosupervisor} % \begin{macro}{\ecosupervisor} -% \begin{macro}{\edate} -% 定义一批封面参数。 -% \changes{v2.5}{2006/05/20}{院系和专业分别改名用 department 和 major,代替原来 -% 的 affil 和 subject。} -% \changes{v2.6.2}{2006/06/18}{改正 groupmembers 的拼写错误。} +% 作者、导师、副导师、联合指导老师。 % \begin{macrocode} -\thu@def@term{id} -\thu@def@term{udc} -\thu@def@term{catalognumber} -\thu@def@term{secretlevel} -\thu@def@term{secretyear} -\thu@def@term{ctitle} -\thu@def@term{cdegree} -\thu@def@term{cdepartment} -\def\caffil{% for compatibility - \ClassWarning{thuthesis} - {'\string\caffil' is deprecated, please use '\string\cdepartment' instead.}{}% - \cdepartment} -\thu@def@term{cmajor} -\def\csubject{% for compatibility - \ClassWarning{thuthesis} - {'\string\csubject' is deprecated, please use '\string\cmajor' instead.}{}% - \cmajor} -\thu@def@term{cfirstdiscipline} -\thu@def@term{cseconddiscipline} \thu@def@term{cauthor} \thu@def@term{csupervisor} \thu@def@term{cassosupervisor} \thu@def@term{ccosupervisor} -\thu@def@term{cdate} -\thu@def@term{postdoctordate} -\thu@def@term{etitle} -\thu@def@term{edegree} -\thu@def@term{edepartment} -\def\eaffil{% for compability - \ClassWarning{thuthesis} - {'\string\eaffil' is deprecated, please use '\string\edepartment' instead.}{}% - \edepartment} -\thu@def@term{emajor} -\def\esubject{%for compability - \ClassWarning{thuthesis} - {'\string\esubject' is deprecated, please use '\string\emajor' instead.}{}% - \emajor} \thu@def@term{eauthor} \thu@def@term{esupervisor} \thu@def@term{eassosupervisor} \thu@def@term{ecosupervisor} -\thu@def@term{edate} % \end{macrocode} % \end{macro} % \end{macro} @@ -2367,18 +2304,80 @@ % \end{macro} % \end{macro} % \end{macro} +% +% \begin{macro}{\cdegree} +% \begin{macro}{\edegree} +% 学位中英文。 +% \begin{macrocode} +\thu@def@term{cdegree} +\thu@def@term{edegree} +% \end{macrocode} % \end{macro} % \end{macro} +% +% \begin{macro}{\cdepartment} +% \begin{macro}{\edepartment} +% 院系中英文名称。 +% \begin{macrocode} +\thu@def@term{cdepartment} +\def\caffil{% for compatibility + \ClassWarning{thuthesis} + {'\string\caffil' is deprecated, please use '\string\cdepartment' instead.}{}% + \cdepartment} +\thu@def@term{edepartment} +\def\eaffil{% for compability + \ClassWarning{thuthesis} + {'\string\eaffil' is deprecated, please use '\string\edepartment' instead.}{}% + \edepartment} +% \end{macrocode} % \end{macro} % \end{macro} +% +% \begin{macro}{\cmajor} +% \begin{macro}{\emajor} +% 学位中英文名称。 +% \changes{v2.5}{2006/05/20}{院系和专业分别改名用 department 和 major,代替原来 +% 的 affil 和 subject。} +% \begin{macrocode} +\thu@def@term{cmajor} +\def\csubject{% for compatibility + \ClassWarning{thuthesis} + {'\string\csubject' is deprecated, please use '\string\cmajor' instead.}{}% + \cmajor} +\thu@def@term{emajor} +\def\esubject{%for compability + \ClassWarning{thuthesis} + {'\string\esubject' is deprecated, please use '\string\emajor' instead.}{}% + \emajor} +% \end{macrocode} % \end{macro} % \end{macro} +% +% \begin{macro}{\cdate} +% \begin{macro}{\edate} +% 论文成文日期。 +% \begin{macrocode} +\thu@def@term{cdate} +\thu@def@term{edate} +% \end{macrocode} % \end{macro} % \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} +% +% \begin{macro}{\id} +% \begin{macro}{\udc} +% \begin{macro}{\catalognumber} +% \begin{macro}{\cfirstdiscipline} +% \begin{macro}{\cseconddiscipline} +% \begin{macro}{\postdoctordate} +% 博士后专用封面参数。 +% \begin{macrocode} +\thu@def@term{id} +\thu@def@term{udc} +\thu@def@term{catalognumber} +\thu@def@term{cfirstdiscipline} +\thu@def@term{cseconddiscipline} +\thu@def@term{postdoctordate} +% \end{macrocode} % \end{macro} % \end{macro} % \end{macro} @@ -2389,31 +2388,15 @@ % \begin{environment}{cabstract} % \begin{environment}{eabstract} % 摘要最好以环境的形式出现(否则命令的形式会导致开始结束的括号距离太远,我不喜 -% 欢),这就必须让环境能够自己保存内容留待以后使用。ctt 上找到两种方法: -% \begin{itemize} -% \item 使用 \pkg{amsmath} 中的 \cs{collect@body},但是此宏没有定义 -% 为 \texttt{long},不能直接用。 -% \item 利用 \LaTeX{} 中环境和对应命令间的命名关系以及参数分隔符的特点非常巧妙地 -% 实现了这个功能,其不足是不能嵌套环境。 -% \end{itemize} -% 由于摘要部分经常会用到诸如 \texttt{itemize} 类似的环境,所以我们不得不选择第一 -% 种复杂的方法。以下是修改 \pkg{amsmath} 代码部分: +% 欢),这就必须让环境能够自己保存内容留待以后使用。使用 \pkg{environ} 的 +% \cs{Collect@Body} 来实现。 % \changes{v3.1}{2006/06/17}{重新定义摘要成为环境。} -% \begin{macrocode} -\long\@xp\def\@xp\collect@@body\@xp#\@xp1\@xp\end\@xp#\@xp2\@xp{% - \collect@@body{#1}\end{#2}} -\long\@xp\def\@xp\push@begins\@xp#\@xp1\@xp\begin\@xp#\@xp2\@xp{% - \push@begins{#1}\begin{#2}} -\long\@xp\def\@xp\addto@envbody\@xp#\@xp1\@xp{% - \addto@envbody{#1}} -% \end{macrocode} -% -% 使用 \cs{collect@body} 来构建摘要环境。 +% \changes{v5.2.2}{2016/01/31}{用 \pkg{environ} 封装的 \cs{Collect@Body}。} % \begin{macrocode} \newcommand{\thu@@cabstract}[1]{\long\gdef\thu@cabstract{#1}} -\newenvironment{cabstract}{\collect@body\thu@@cabstract}{} +\newenvironment{cabstract}{\Collect@Body\thu@@cabstract}{} \newcommand{\thu@@eabstract}[1]{\long\gdef\thu@eabstract{#1}} -\newenvironment{eabstract}{\collect@body\thu@@eabstract}{} +\newenvironment{eabstract}{\Collect@Body\thu@@eabstract}{} % \end{macrocode} % \end{environment} % \end{environment} @@ -2437,7 +2420,8 @@ % \end{macro} % \begin{macro}{\ckeywords} % \begin{macro}{\ekeywords} -% 利用 \cs{thu@parse@keywords} 来定义,内部通过 \cs{thu@ckeywords} 来引用。 +% 利用 \cs{thu@parse@keywords} 来定义,内部通过 \cs{thu@ckeywords} 和 +% \cs{thu@ekeywords} 来引用。 % \changes{v3.1}{2007/06/16}{增强的关键词命令。} % \begin{macrocode} \thu@parse@keywords{ckeywords} @@ -2891,7 +2875,7 @@ % \changes{v3.0}{2007/05/12}{本科论文授权图片扫描取消。} % \changes{v4.5.2}{2010/05/29}{本科封面和授权说明之间不要空白页。} % \changes{v4.6}{2011/05/29}{博士后报告无授权说明。} -% \changes{v5.0.0}{2015/06/05}{使用 \pkg*{pdfpages} 宏包支持本硕博论文授权说明扫描版(\#36)。} +% \changes{v5.0.0}{2015/06/05}{使用 \pkg{pdfpages} 宏包支持本硕博论文授权说明扫描版(\#36)。} % \begin{macrocode} \ifthu@postdoctor\relax\else% \ifthu@bachelor\clearpage\else\cleardoublepage\fi% @@ -2928,16 +2912,29 @@ % \subsubsection{摘要} % \label{sec:abstractformat} % +% \begin{macro}{\thu@put@keywords} +% 排版关键字。 +% \begin{macrocode} +%<*cls> +\newbox\thu@kw +\newcommand\thu@put@keywords[2]{% + \begingroup + \setbox\thu@kw=\hbox{#1} + \ifthu@bachelor\indent\else\noindent\hangindent\wd\thu@kw\hangafter1\fi% + \box\thu@kw#2\par + \endgroup} +% \end{macrocode} +% \end{macro} +% % \begin{macro}{\thu@makeabstract} % 中文摘要部分的标题为\textbf{摘要},用黑体三号字。 -% \changes{v2.5.1}{2006/05/24}{我靠,教务处又不要正文前的页眉了,ft!} +% \changes{v2.5.1}{2006/05/24}{教务处又不要正文前的页眉了。} % \changes{v2.5.1}{2006/05/24}{不管是哪种论文格式,摘要都要右开。} % \changes{v2.5.2}{2006/05/29}{在研究生论文中,摘要不出现在目录中,但是要在书签中出现。} % \changes{v2.5.3}{2006/06/03}{\cs{pagenumber} 会自动设置页码为 1。} % \changes{v2.6.3}{2006/06/30}{为本科正确设置目录及以后的页码。} % \changes{v4.5.2}{2010/05/29}{本科论文摘要亦无需右开。} % \begin{macrocode} -%<*cls> \newcommand{\thu@makeabstract}{% \ifthu@bachelor\clearpage\else\cleardoublepage\fi \thu@chapter*[]{\cabstractname} % no tocline @@ -2955,16 +2952,14 @@ % \begin{macrocode} \thu@cabstract % \end{macrocode} -% 每个关键词之间空两个汉字符宽度, 且为悬挂缩进 +% 每个关键词之间空两个汉字符宽度, 且为悬挂缩进。 % \changes{v2.6.2}{2006/06/17}{取消最后一列的空白。} % \changes{v2.6.2}{2006/06/20}{取消 tabular 环境,用 \cs{hangindent} 实现关键词 % 悬挂缩进,英文摘要同。} % \changes{v4.4.2}{2008/06/05}{本科生格式中文关键词采用首行缩进且无悬挂缩进。} % \begin{macrocode} \vskip12bp - \setbox0=\hbox{{\heiti\thu@ckeywords@title}} - \ifthu@bachelor\indent\else\noindent\hangindent\wd0\hangafter1\fi - \box0\thu@ckeywords + \thu@put@keywords{\heiti\thu@ckeywords@title}{\thu@ckeywords} % \end{macrocode} % % 英文摘要部分的标题为 \textbf{Abstract},用 Arial 体三号字。研究生的英文摘要要求 @@ -2979,7 +2974,7 @@ \thu@eabstract % \end{macrocode} % -% 每个关键词之间空四个英文字符宽度 +% 每个关键词之间空四个英文字符宽度。 % \changes{v2.4}{2006/04/14}{It is \textbf{Key words}, but not \textbf{Key % Words}.} % \changes{v2.6.2}{2006/06/17}{取消最后一列的空白。} @@ -2991,9 +2986,8 @@ % \changes{v4.7}{2012/06/02}{Bachelor sample uses Keywords w/o space \texttt{-\_-}} % \begin{macrocode} \vskip12bp - \setbox0=\hbox{\textbf{\ifthu@bachelor Keywords:\else Key words:\fi\enskip}} - \ifthu@bachelor\indent\else\noindent\hangindent\wd0\hangafter1\fi - \box0\thu@ekeywords} + \thu@put@keywords{% + \textbf{\ifthu@bachelor Keywords:\else Key words:\fi\enskip}}{\thu@ekeywords}} % % \end{macrocode} % \end{macro} @@ -3004,7 +2998,7 @@ % 主要符号对照表。 % \changes{v2.0e}{2005/12/18}{主要符号表定义为一个 list,用起来方便。} % \changes{v2.4}{2006/04/14}{为主要符号表环境增加一个可选参数,调节符号列的宽度。} -% \changes{v5.2.1}{2016/01/11}{利用 \pkg*{enumitem} 改造环境定义,更直观。} +% \changes{v5.2.1}{2016/01/11}{利用 \pkg{enumitem} 改造环境定义,更直观。} % \begin{macrocode} %<*cfg> \newcommand{\thu@denotation@name}{主要符号对照表} @@ -3057,7 +3051,7 @@ % \cs{cleardoublepage},使新开章节的页码到达正确的状态。否则会因为 \cs{addcontentsline} % 在 chapter 之前而导致目录页码错误。} % 定义致谢与声明环境。 -% \changes{v2.5}{2006/05/16}{ft,本科论文要求致谢声明分页,但是研究生的不分!} +% \changes{v2.5}{2006/05/16}{本科论文要求致谢声明分页,但是研究生的不分。} % \changes{v2.5.2}{2006/05/29}{研究生致谢右开。} % \changes{v2.5.2}{2006/05/30}{研究生致谢题目是致谢,目录是致谢与声明。} % \changes{v2.6.3}{2006/07/01}{重画双虚线,自适应页面宽度。} @@ -3110,7 +3104,7 @@ % \changes{v2.5}{2006/05/19}{为了让索引中能出现\textbf{图 xxx},不得不修改 \LaTeX % 内部命令 \cs{@caption}。} % \changes{v2.6.4}{2006/10/23}{增加 \cs{listoffigures*},\cs{listoftables*}。} -% \changes{v4.5.1}{2009/01/06}{更优雅的插图/表格索引,避免跟 \pkg*{caption} 包冲 +% \changes{v4.5.1}{2009/01/06}{更优雅的插图/表格索引,避免跟 \pkg{caption} 包冲 % 突。\cs{thu@listof} 相应修改。} % \begin{macrocode} %<*cls> @@ -3134,7 +3128,7 @@ % \end{macro} % % \begin{macro}{\equcaption} -% \changes{v2.6.2}{2006/06/19}{此命令配合 \pkg*{amsmath} 命令基本可以满足所有 +% \changes{v2.6.2}{2006/06/19}{此命令配合 \pkg{amsmath} 命令基本可以满足所有 % 公式需要。} % 本命令只是为了生成公式列表,所以这个 caption 是假的。如果要编号最好用 % equation 环境,如果是其它编号环境,请手动添加添加 \cs{equcaption}。 @@ -3201,7 +3195,7 @@ % 只好定义一个东西来拙劣地处理了, % 本来这个命令通过 \texttt{@preamble} 命令放到 bib 文件中是最省事的,但是那 % 样的话很多人肯定不知道该怎么做了。 -% \changes{v3.1}{2007/06/19}{引入 cs{thudot} 来自动完成参考文献最后的点。} +% \changes{v3.1}{2007/06/19}{引入 \cs{thudot} 来自动完成参考文献最后的点。} % \begin{macrocode} \def\thudot{\ifthu@bachelor\else\unskip.\fi} % @@ -3305,7 +3299,7 @@ % 定义 \cs{cleardoublepage} 和自己写 \cs{markboth},\cs{addcontentsline} 的部分。} % \changes{v2.0}{2005/12/18}{最后决定将 resume 定义为环境。这样与前面的主要符号 % 表、致谢等对应。} -% \changes{v2.5.1}{2006/05/23}{ft,教务处和研究生院非要搞的不一样!} +% \changes{v2.5.1}{2006/05/23}{教务处和研究生院非要搞的不一样!} % \changes{v2.5.2}{2006/05/29}{研究生的个人介绍要右开。} % \changes{v4.6}{2011/05/02}{支持可选参数,自己定义简历章节标题。} % 个人简历发表文章等。 @@ -3376,7 +3370,7 @@ % \label{sec:shuji} % \begin{macro}{\shuji} % 单独使用书脊命令会在新的一页产生竖排书脊。 -% \changes{v4.5}{2009/01/04}{简化代码,同时支持 xelatex。} +% \changes{v4.5}{2009/01/04}{简化代码,同时支持 \XeLaTeX。} % \changes{v5.0.0}{2015/12/21}{扩展 \cs{shuji}\oarg{标题}\oarg{作者}。} % \begin{macrocode} %<*cls> @@ -3404,8 +3398,7 @@ % \subsection{其它} % \label{sec:other} % -% 在模板文档结束时即装入配置文件,这样用户就能在导言区进行相应的修改,否则 -% 必须在 document 开始后才能,感觉不好。 +% 在模板文档结束时即装入配置文件,这样用户就能在导言区进行相应的修改。 % \changes{v2.5}{2006/05/13}{不用 \cs{CJKcaption},在导言区直接引入配置文件。} % \begin{macrocode} %<*cls> @@ -3433,6 +3426,7 @@ \RequirePackage{xcolor} \RequirePackage{enumitem} \RequirePackage{etoolbox} +\RequirePackage{metalogo} \colorlet{thu@macro}{blue!60!black} \colorlet{thu@env}{blue!70!black} diff --git a/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cfg b/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cfg index c022d814abf..d8da22f4a49 100644 --- a/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cfg +++ b/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cfg @@ -22,7 +22,6 @@ %% %% This is the configuration file of the thuthesis package with LaTeX2e. %% -%% \end{latex} \ProvidesFile{thuthesis.cfg} [2016/01/18 5.2.1 Tsinghua University Thesis Template] \theoremsymbol{\ensuremath{\square}} diff --git a/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls b/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls index f9a0f9c781e..f7358e248c6 100644 --- a/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls +++ b/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls @@ -23,13 +23,12 @@ %% To produce the documentation run the original source files ending with `.dtx' %% through LaTeX. %% -%% \end{latex} \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesClass{thuthesis} [2016/01/18 5.2.1 Tsinghua University Thesis Template] \hyphenation{Thu-Thesis} \def\thuthesis{\textsc{ThuThesis}} -\def\version{5.2.1} +\def\version{5.2.2} \RequirePackage{kvoptions} \SetupKeyvalOptions{ @@ -46,7 +45,6 @@ \thu@doctorfalse \thu@postdoctorfalse \expandafter\csname thu@#1true\endcsname} - \def\thu@deprecated@type@option{% \kvsetkeys{thu}{type=\CurrentOption} % for compatability. \ClassError{thuthesis}{Option '\CurrentOption' is deprecated, \MessageBreak @@ -55,12 +53,12 @@ \DeclareVoidOption{master}{\thu@deprecated@type@option} \DeclareVoidOption{doctor}{\thu@deprecated@type@option} \DeclareVoidOption{postdoctor}{\thu@deprecated@type@option} - \DeclareBoolOption{secret} \DeclareBoolOption{arial} \DeclareBoolOption{arialtoc} \DeclareBoolOption{arialtitle} \DeclareBoolOption{raggedbottom} +\DeclareBoolOption{pifootnote} \DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{ctexbook}} \kvsetkeys{thu}{% raggedbottom, @@ -80,10 +78,11 @@ \fi \fi \fi +\RequirePackage{etoolbox} \RequirePackage{ifxetex} \RequirePackage{xparse} \RequirePackage{amsmath} -\RequirePackage{newtxtext} +\RequirePackage[defaultsups]{newtxtext} \RequirePackage{newtxmath} \RequirePackage{tgcursor} \RequirePackage{graphicx} @@ -91,11 +90,15 @@ \RequirePackage{pdfpages} \includepdfset{fitpaper=true} \RequirePackage[shortlabels]{enumitem} +\RequirePackage{environ} \ifthu@raggedbottom - \RequirePackage[bottom,perpage]{footmisc} + \RequirePackage[bottom,perpage,hang]{footmisc} \raggedbottom \else - \RequirePackage[perpage]{footmisc} + \RequirePackage[perpage,hang]{footmisc} +\fi +\ifthu@pifootnote + \RequirePackage{pifont} \fi \RequirePackage{CJKfntef} \renewcommand{\baselinestretch}{1.0} % todo:? @@ -110,7 +113,7 @@ \ifthu@arial \IfFileExists{arial.sty}% {\RequirePackage{arial}}% - {\ClassWarning{thuthesis}{no arial.sty availiable!}} + {\ClassWarning{thuthesis}{arial.sty is not availiable!}} \fi \fi \RequirePackage[amsmath,thmmarks,hyperref]{ntheorem} @@ -128,6 +131,7 @@ CJKbookmarks=false} \fi \hypersetup{% + linktoc=all, bookmarksnumbered=true, bookmarksopen=true, bookmarksopenlevel=1, @@ -230,31 +234,25 @@ autoindent=true} \setlist{nosep} \def\thu@textcircled#1{% - \ifnum \value{#1} <10 \textcircled{\xiaoliu\arabic{#1}} - \else\ifnum \value{#1} <100 \textcircled{\qihao\arabic{#1}}\fi + \ifnum\value{#1} >9 + \ClassError{thuthesis}% + {Too many footnotes in this page.}{Keep footnote less than 10.} + \fi + \ifthu@pifootnote% + \ding{\numexpr171+\value{#1}}% + \else% + \textcircled{\xiaoliu\arabic{#1}}% \fi} \renewcommand{\thefootnote}{\thu@textcircled{footnote}} \renewcommand{\thempfootnote}{\thu@textcircled{mpfootnote}} \def\footnoterule{\vskip-3\p@\hrule\@width0.3\textwidth\@height0.4\p@\vskip2.6\p@} \let\thu@footnotesize\footnotesize \renewcommand\footnotesize{\thu@footnotesize\xiaowu[1.5]} -\def\@makefnmark{\textsuperscript{\hbox{\normalfont\@thefnmark}}} -\long\def\@makefntext#1{ - \bgroup - \newbox\thu@tempboxa - \setbox\thu@tempboxa\hbox{% - \hb@xt@ 2em{\@thefnmark\hss}} - \leftmargin\wd\thu@tempboxa - \rightmargin\z@ - \linewidth \columnwidth - \advance \linewidth -\leftmargin - \parshape \@ne \leftmargin \linewidth - \footnotesize - \@setpar{{\@@par}}% - \leavevmode - \llap{\box\thu@tempboxa}% - #1 - \par\egroup} +\footnotemargin1.5em\relax +\let\thu@makefnmark\@makefnmark +\def\thu@@makefnmark{\hbox{{\normalfont\@thefnmark}}} +\pretocmd{\@makefntext}{\let\@makefnmark\thu@@makefnmark}{}{} +\apptocmd{\@makefntext}{\let\@makefnmark\thu@makefnmark}{}{} \allowdisplaybreaks[4] \renewcommand\theequation{\ifnum \c@chapter>\z@ \thechapter-\fi\@arabic\c@equation} \def\make@df@tag{\@ifstar\thu@make@df@tag@@\make@df@tag@@@} @@ -263,21 +261,6 @@ \renewcommand\theequation{\ifnum \c@chapter>\z@ \thechapter-\fi\@arabic\c@equation} \def\thu@maketag#1{\maketag@@@{(\ignorespaces #1\unskip\@@italiccorr)}} \def\tagform@#1{\maketag@@@{(\ignorespaces #1\unskip\@@italiccorr)\equcaption{#1}}} -\gdef\@endtrivlist#1{% % from \endtrivlist - \if@inlabel \indent\fi - \if@newlist \@noitemerr\fi - \ifhmode - \ifdim\lastskip >\z@ #1\unskip \par - \else #1\unskip \par \fi - \fi - \if@noparlist \else - \ifdim\lastskip >\z@ - \@tempskipa\lastskip \vskip -\lastskip - \advance\@tempskipa\parskip \advance\@tempskipa -\@outerparskip - \vskip\@tempskipa - \fi - \@endparenv - \fi #1} \theorembodyfont{\rmfamily\songti} \theoremheaderfont{\rmfamily\heiti} \setlength{\floatsep}{20bp \@plus4pt \@minus1pt} @@ -387,23 +370,11 @@ \ifthu@arialtoc \def\thu@toc@font{\sffamily} \fi -\def\@pnumwidth{2em} % 这个参数没用了 -\def\@tocrmarg{2em} -\def\@dotsep{1} % 目录点间的距离 -\def\@dottedtocline#1#2#3#4#5{% - \ifnum #1>\c@tocdepth \else - \vskip \z@ \@plus.2\p@ - {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip - \parindent #2\relax\@afterindenttrue - \interlinepenalty\@M - \leavevmode - \@tempdima #3\relax - \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip - {\csname thu@toc@font\endcsname #4}\nobreak - \leaders\hbox{$\m@th\mkern \@dotsep mu\hbox{.}\mkern \@dotsep mu$}\hfill - \nobreak{\normalfont \normalcolor #5}% - \par}% - \fi} +\def\@pnumwidth{2em} +\def\@tocrmarg{\@pnumwidth} +\def\@dotsep{1} +\patchcmd{\@dottedtocline}{#4}{\csname thu@toc@font\endcsname #4}{}{} +\patchcmd{\@dottedtocline}{\hb@xt@\@pnumwidth}{\hbox}{}{} \renewcommand*\l@chapter[2]{% \ifnum \c@tocdepth >\m@ne \addpenalty{-\@highpenalty}% @@ -433,58 +404,52 @@ \expandafter\gdef\csname #1\endcsname##1{% \expandafter\gdef\csname thu@#1\endcsname{##1}} \csname #1\endcsname{}} -\thu@def@term{id} -\thu@def@term{udc} -\thu@def@term{catalognumber} \thu@def@term{secretlevel} \thu@def@term{secretyear} \thu@def@term{ctitle} +\thu@def@term{etitle} +\thu@def@term{cauthor} +\thu@def@term{csupervisor} +\thu@def@term{cassosupervisor} +\thu@def@term{ccosupervisor} +\thu@def@term{eauthor} +\thu@def@term{esupervisor} +\thu@def@term{eassosupervisor} +\thu@def@term{ecosupervisor} \thu@def@term{cdegree} +\thu@def@term{edegree} \thu@def@term{cdepartment} \def\caffil{% for compatibility \ClassWarning{thuthesis} {'\string\caffil' is deprecated, please use '\string\cdepartment' instead.}{}% \cdepartment} -\thu@def@term{cmajor} -\def\csubject{% for compatibility - \ClassWarning{thuthesis} - {'\string\csubject' is deprecated, please use '\string\cmajor' instead.}{}% - \cmajor} -\thu@def@term{cfirstdiscipline} -\thu@def@term{cseconddiscipline} -\thu@def@term{cauthor} -\thu@def@term{csupervisor} -\thu@def@term{cassosupervisor} -\thu@def@term{ccosupervisor} -\thu@def@term{cdate} -\thu@def@term{postdoctordate} -\thu@def@term{etitle} -\thu@def@term{edegree} \thu@def@term{edepartment} \def\eaffil{% for compability \ClassWarning{thuthesis} {'\string\eaffil' is deprecated, please use '\string\edepartment' instead.}{}% \edepartment} +\thu@def@term{cmajor} +\def\csubject{% for compatibility + \ClassWarning{thuthesis} + {'\string\csubject' is deprecated, please use '\string\cmajor' instead.}{}% + \cmajor} \thu@def@term{emajor} \def\esubject{%for compability \ClassWarning{thuthesis} {'\string\esubject' is deprecated, please use '\string\emajor' instead.}{}% \emajor} -\thu@def@term{eauthor} -\thu@def@term{esupervisor} -\thu@def@term{eassosupervisor} -\thu@def@term{ecosupervisor} +\thu@def@term{cdate} \thu@def@term{edate} -\long\@xp\def\@xp\collect@@body\@xp#\@xp1\@xp\end\@xp#\@xp2\@xp{% - \collect@@body{#1}\end{#2}} -\long\@xp\def\@xp\push@begins\@xp#\@xp1\@xp\begin\@xp#\@xp2\@xp{% - \push@begins{#1}\begin{#2}} -\long\@xp\def\@xp\addto@envbody\@xp#\@xp1\@xp{% - \addto@envbody{#1}} +\thu@def@term{id} +\thu@def@term{udc} +\thu@def@term{catalognumber} +\thu@def@term{cfirstdiscipline} +\thu@def@term{cseconddiscipline} +\thu@def@term{postdoctordate} \newcommand{\thu@@cabstract}[1]{\long\gdef\thu@cabstract{#1}} -\newenvironment{cabstract}{\collect@body\thu@@cabstract}{} +\newenvironment{cabstract}{\Collect@Body\thu@@cabstract}{} \newcommand{\thu@@eabstract}[1]{\long\gdef\thu@eabstract{#1}} -\newenvironment{eabstract}{\collect@body\thu@@eabstract}{} +\newenvironment{eabstract}{\Collect@Body\thu@@eabstract}{} \def\thu@parse@keywords#1{ \define@key{thu}{#1}{\csname #1\endcsname{##1}} \expandafter\gdef\csname thu@#1\endcsname{} @@ -769,6 +734,13 @@ \normalsize \thu@makeabstract \let\@tabular\thu@tabular} +\newbox\thu@kw +\newcommand\thu@put@keywords[2]{% + \begingroup + \setbox\thu@kw=\hbox{#1} + \ifthu@bachelor\indent\else\noindent\hangindent\wd\thu@kw\hangafter1\fi% + \box\thu@kw#2\par + \endgroup} \newcommand{\thu@makeabstract}{% \ifthu@bachelor\clearpage\else\cleardoublepage\fi \thu@chapter*[]{\cabstractname} % no tocline @@ -780,15 +752,12 @@ \pagenumbering{Roman} \thu@cabstract \vskip12bp - \setbox0=\hbox{{\heiti\thu@ckeywords@title}} - \ifthu@bachelor\indent\else\noindent\hangindent\wd0\hangafter1\fi - \box0\thu@ckeywords + \thu@put@keywords{\heiti\thu@ckeywords@title}{\thu@ckeywords} \thu@chapter*[]{\eabstractname} % no tocline \thu@eabstract \vskip12bp - \setbox0=\hbox{\textbf{\ifthu@bachelor Keywords:\else Key words:\fi\enskip}} - \ifthu@bachelor\indent\else\noindent\hangindent\wd0\hangafter1\fi - \box0\thu@ekeywords} + \thu@put@keywords{% + \textbf{\ifthu@bachelor Keywords:\else Key words:\fi\enskip}}{\thu@ekeywords}} \newenvironment{denotation}[1][2.5cm]{% \thu@chapter*[]{\thu@denotation@name} % no tocline \vskip-30bp\xiaosi[1.6]\begin{thu@denotation}[labelwidth=#1] -- cgit v1.2.3