summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx')
-rw-r--r--Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx127
1 files changed, 47 insertions, 80 deletions
diff --git a/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx b/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx
index fe0c3556db4..1417c1de67c 100644
--- a/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx
+++ b/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx
@@ -16,9 +16,7 @@
%
% \iffalse
%<*driver>
-\def\thudate{\the\year/\the\month/\the\day}
-\def\thuversion{5.2.2}
-\ProvidesFile{thuthesis.dtx}[{\thudate} {\thuversion} Tsinghua University Thesis Template]
+\ProvidesFile{thuthesis.dtx}[2016/02/27 5.2.3 Tsinghua University Thesis Template]
\documentclass{ltxdoc}
\usepackage{dtx-style}
@@ -148,6 +146,7 @@
% \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}{2013/03/09}{reset baselinestretch after ctex's change.}
% \changes{v4.8}{2014/11/25}{好几年累积的一些更新,最重要的是切换到 \CTeX。}
%
% \def\indexname{索引}
@@ -231,8 +230,7 @@
% \subsection{模板的组成部分}
% 下表列出了 \thuthesis{} 的主要文件及其功能介绍:
%
-% \begin{center}
-% \begin{longtable}{l|p{8cm}}
+% \begin{longtable}{l|p{8cm}}
% \toprule
% {\heiti 文件(夹)} & {\heiti 功能描述}\\\midrule
% \endfirsthead
@@ -258,10 +256,8 @@
% zhfonts.py & 生成中文字体配置文件\\
% README.md & Readme\\
% \textbf{thuthesis.pdf} & 用户手册(本文档)\\\bottomrule
-% \end{longtable}
-% \end{center}
+% \end{longtable}
%
-% \vskip-1cm
% 几点说明:
% \begin{itemize}
% \item \file{thuthesis.cls} 和 \file{thuthesis.cfg} 可以由 \file{thuthesis.ins}
@@ -328,20 +324,6 @@
% 和幼圆字体,如果系统上没有它们,可以直接将 \file{ctex-fontset-thuthesis.def} 文
% 件以及论文中相应行删除。字体配置参考第~\ref{sec:font-config} 节。
%
-% \subsubsection{dvipdfmx}
-% \label{sec:dvipdfmx}
-% 如果使用 \texttt{dvipdfmx},那么需要先生成完整的 dvi 文件:
-% \begin{shell}%
-% $ latex main
-% $ bibtex main
-% $ latex main
-% $ latex main
-% \end{shell}
-% 在生成完整的 dvi 文件之后,可以用 dvipdfmx 直接得到 pdf 文件:
-% \begin{shell}%
-% $ dvipdfmx main
-% \end{shell}
-%
% \subsubsection{PDF\LaTeX}
% \label{sec:pdflatex}
% 如果使用 PDF\LaTeX,按照第~\ref{sec:xelatex} 节的顺序执行即可,只是将命令中
@@ -374,10 +356,9 @@
% $ make shuji # 生成书脊 shuji.pdf
% \end{shell}
%
-% \thuthesis{} 的 Makefile 默认用 \texttt{latexmk} 调用
-% \texttt{xelatex} 编译,此外还支持直接用 \texttt{xelatex}、\texttt{pdflatex} 和
-% \texttt{dvipdfmx} 方式编译,如有需要可以修
-% 改 \file{Makefile} 开头的参数设置或通过命令行传递参数(请参看 \file{README.md}),
+% \thuthesis{} 的 \file{Makefile} 默认用 \texttt{latexmk} 调用\texttt{xelatex} 编
+% 译,此外还支持直接用 \texttt{xelatex} 和\texttt{pdflatex} 编译。如有需要可修
+% 改 \file{Makefile} 开头的参数或通过命令行传递参数(请参看 \file{README.md}),
% 进一步还可以修改 \file{latexmkrc} 进行定制。
%
% \subsection{升级}
@@ -691,7 +672,6 @@
% \DescribeMacro{\edegree}
% 学位和专业的设置比想象的要复杂一些:
%
-% \begin{center}
% \begin{longtable}{p{2cm}p{8cm}p{4cm}}
% \toprule
% 学位类型 & edegree & emajor \\\midrule
@@ -707,9 +687,7 @@
% & 获得一级学科授权的学科填写一级学科名称,其它填写二级学科名称。\\\midrule
% 专业型博士 & 专业学位英文名称全称 & 不填写此项。\\\bottomrule
% \end{longtable}
-% \end{center}
%
-% \vskip-0.7cm
% \begin{latex}
% \thusetup{
% cdegree={您要申请什么学位},
@@ -896,7 +874,6 @@
% \DescribeMacro{\listoftables*}
% \DescribeMacro{\listofequations}
% \DescribeMacro{\listofequations*}
-% \begin{center}
% \begin{longtable}{ll}
% \toprule
% {\heiti 用途} & {\heiti 命令} \\\midrule
@@ -908,7 +885,6 @@
% 公式索引 & \cs{listofequations} \\
% & \cs{listofequations*}\\\bottomrule
% \end{longtable}
-% \end{center}
%
% \LaTeX{} 默认支持插图和表格索引,是通过 \cs{caption} 命令完成的,因此它们必须出
% 现在浮动环境中,否则不被计数。
@@ -1184,7 +1160,7 @@
% 感谢这些年来一直陪伴 \thuthesis{} 成长的新老同学,大家的需求是模板前进的动力,
% 大家的反馈是模板提高的机会。
%
-% 热烈欢迎各位到\href{http://github.com/xueruini/thuthesis/}{\thuthesis\ Github 主页}贡献!
+% 热烈欢迎各位到 \href{http://github.com/xueruini/thuthesis/}{\thuthesis\ Github 主页}贡献!
%
% \StopEventually{\PrintChanges\PrintIndex}
% \clearpage
@@ -1196,7 +1172,7 @@
%<cls>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<cls>\ProvidesClass{thuthesis}
%<cfg>\ProvidesFile{thuthesis.cfg}
-%<cls|cfg>[2016/01/18 5.2.1 Tsinghua University Thesis Template]
+%<cls|cfg>[2016/02/27 5.2.3 Tsinghua University Thesis Template]
% \end{macrocode}
%
% \subsection{定义选项}
@@ -1215,7 +1191,7 @@
%<*cls>
\hyphenation{Thu-Thesis}
\def\thuthesis{\textsc{ThuThesis}}
-\def\version{5.2.2}
+\def\version{5.2.3}
\RequirePackage{kvoptions}
\SetupKeyvalOptions{
@@ -1409,13 +1385,6 @@
\RequirePackage{CJKfntef}
% \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\ 环境下独立配置,包括零对应的圆圈符号和字体。
% \begin{macrocode}
\ifxetex
@@ -1590,6 +1559,19 @@
%
% \subsubsection{字体}
% \label{sec:font}
+% \begin{macro}{\normalsize}
+% 正文小四号 (12bp) 字,行距为固定值 20 bp。
+% \begin{macrocode}
+%<*cls>
+\renewcommand\normalsize{%
+ \@setfontsize\normalsize{12bp}{20bp}%
+ \abovedisplayskip=20bp \@plus 2bp \@minus 2bp
+ \abovedisplayshortskip=20bp \@plus 2bp \@minus 2bp
+ \belowdisplayskip=\abovedisplayskip
+ \belowdisplayshortskip=\abovedisplayshortskip}
+% \end{macrocode}
+% \end{macro}
+%
% WORD 中的字号对应该关系如下(1bp = 72.27/72 pt):
% \begin{center}
% \begin{tabular}{llll}
@@ -1620,15 +1602,11 @@
% \cs{thu@def@fontsize}\marg{字号名称}\marg{磅数}
%
% 避免了字号选择和行距的紧耦合。所有字号定义时为单倍行距,并提供选项指定行距倍数。
+% \changes{v5.2.3}{2016/02/13}{改写字体定义命令。}
% \begin{macrocode}
-%<*cls>
-\newlength\thu@linespace
-\newcommand{\thu@choosefont}[2]{%
- \setlength{\thu@linespace}{#2*\real{#1}}%
- \fontsize{#2}{\thu@linespace}\selectfont}
\def\thu@def@fontsize#1#2{%
- \expandafter\newcommand\csname #1\endcsname[1][\baselinestretch]{%
- \thu@choosefont{##1}{#2}}}
+ \expandafter\newcommand\csname #1\endcsname[1][1.3]{%
+ \fontsize{#2}{##1\dimexpr #2}\selectfont}}
% \end{macrocode}
% \end{macro}
%
@@ -1670,6 +1648,7 @@
\thu@def@fontsize{xiaoliu}{6.5bp}
\thu@def@fontsize{qihao}{5.5bp}
\thu@def@fontsize{bahao}{5bp}
+%</cls>
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1690,19 +1669,6 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\normalsize}
-% 正文小四号 (12bp) 字,行距为固定值 20 bp。
-% \begin{macrocode}
-\renewcommand\normalsize{%
- \@setfontsize\normalsize{12bp}{20bp}%
- \abovedisplayskip=20bp \@plus 2bp \@minus 2bp
- \abovedisplayshortskip=20bp \@plus 2bp \@minus 2bp
- \belowdisplayskip=\abovedisplayskip
- \belowdisplayshortskip=\abovedisplayshortskip}
-%</cls>
-% \end{macrocode}
-% \end{macro}
-%
%
% \subsubsection{页眉页脚}
% \label{sec:headerfooter}
@@ -1828,8 +1794,6 @@
%
% 公式距前后文的距离由 4 个参数控制,参见 \cs{normalsize} 的定义。
%
-% 公式改成 (1-1) 的形式,本科还要在前面加上\textbf{公式}二字,我不知道他们是怎么想的,这
-% 忒不好看了。
% \changes{v2.5.1}{2006/05/24}{本科公式编号前添加\textbf{公式}二字。需要修 \pkg{amsmath} 极其深的一个命令。}
% \changes{v2.5.1}{2006/05/24}{教务处居然要本科论文公式全文编号!}
% \changes{v2.5.2}{2006/05/29}{上一个版本忘了把研究生的公式编号排除。}
@@ -1847,21 +1811,24 @@
% \end{latex}
% \changes{v4.4}{2008/05/30}{本科论文终于去掉了\textbf{公式}二字。}
% \changes{v4.4.4}{2008/06/12}{修复了一个从 v4.3 升级到 v4.4 过程中的丢失公式索引的 bug,原修改代码保留备忘。}
+% \changes{v5.2.3}{2016/02/13}{安全注释本科公式部分。}
% \begin{macrocode}
\def\make@df@tag{\@ifstar\thu@make@df@tag@@\make@df@tag@@@}
\def\thu@make@df@tag@@#1{\gdef\df@tag{\thu@maketag{#1}\def\@currentlabel{#1}}}
-% redefinitation of tagform brokes eqref!
-\renewcommand{\eqref}[1]{\textup{(\ref{#1})}}
-\renewcommand\theequation{\ifnum \c@chapter>\z@ \thechapter-\fi\@arabic\c@equation}
-%\ifthu@bachelor
-% \def\thu@maketag#1{\maketag@@@{%
-% (\ignorespaces\text{\equationname\hskip0.5em}#1\unskip\@@italiccorr)}}
-% \def\tagform@#1{\maketag@@@{%
-% (\ignorespaces\text{\equationname\hskip0.5em}#1\unskip\@@italiccorr)\equcaption{#1}}}
-%\else
+\iffalse
+\ifthu@bachelor
+ \def\thu@maketag#1{\maketag@@@{%
+ (\ignorespaces\text{\equationname\hskip0.5em}#1\unskip\@@italiccorr)}}
+ \def\tagform@#1{\maketag@@@{%
+ (\ignorespaces\text{\equationname\hskip0.5em}#1\unskip\@@italiccorr)\equcaption{#1}}}
+\fi
+\fi
\def\thu@maketag#1{\maketag@@@{(\ignorespaces #1\unskip\@@italiccorr)}}
\def\tagform@#1{\maketag@@@{(\ignorespaces #1\unskip\@@italiccorr)\equcaption{#1}}}
-%\fi
+% \end{macrocode}
+% 修改 \cs{tagform} 会影响 \cs{eqref}。
+% \begin{macrocode}
+\renewcommand{\eqref}[1]{\textup{(\ref{#1})}}
% \end{macrocode}
%
% 定理标题使用黑体,正文使用宋体,冒号隔开。
@@ -2119,11 +2086,11 @@
%
% \begin{macro}{\thu@chapter*}
% \changes{v2.5.2}{2006/05/29}{定义自己的 \cs{thu@chapter*}。}
-% 默认的 \cs{chapter*} 很难同时满足研究生院和本科生的论文要求。本科论文要求所有
-% 的章都出现在目录里,比如摘要、Abstract、主要符号表等,所以可以简单的扩展默认
-% \cs{chapter*} 实现这个目的。但是研究生又不要这些出现在目录中,而且致谢和声明
-% 部分的章名、页眉和目录都不同,所以我想定义一个灵活的 \cs{thu@chapter*} 专
-% 门处理他们的这些要求。
+% 默认的 \cs{chapter*} 很难同时满足研究生院和本科生的论文要求。本科论文要求所有的
+% 章都出现在目录里,比如摘要、Abstract、主要符号表等,所以可以简单的扩展默
+% 认\cs{chapter*} 实现这个目的。但是研究生又不要这些出现在目录中,而且致谢和声明
+% 部分的章名、页眉和目录都不同,所以定义一个灵活的 \cs{thu@chapter*} 专门处理这些
+% 要求。
%
% \cs{thu@chapter*}\oarg{tocline}\marg{title}\oarg{header}: tocline 是出现在目录
% 中的条目,如果为空则此 chapter 不出现在目录中,如果省略表示目录出现 title;
@@ -2162,8 +2129,8 @@
%
% \subsubsection{目录}
% \label{sec:toc}
-% 最多涉及 4 层,即: x.x.x.x。\par
-% chapter(0), section(1), subsection(2), subsubsection(3)
+% 最多 4 层,即: x.x.x.x,对应的命令和层序号分别是:
+% \cs{chapter}(0), \cs{section}(1), \cs{subsection}(2), \cs{subsubsection}(3)。
% \changes{v3.1}{2007/10/09}{博士论文目录只出现到第 3 级标题即可。}
% \changes{v5.0.0}{2015/05/21}{硕士博士论文目录只出现到第 3 级标题即可。其他未明确要求。}
% \begin{macrocode}