summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-12-19 00:05:45 +0000
committerKarl Berry <karl@freefriends.org>2017-12-19 00:05:45 +0000
commitd2ce88d73b5923b144961ab22dbb9198bcc761ce (patch)
tree5792553e857b12a7147f733961935b700c7619fe /Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx
parent6c0eec58b554bd6c0964707a3b464f45468edc69 (diff)
thuthesis (18dec17)
git-svn-id: svn://tug.org/texlive/trunk@46093 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.dtx74
1 files changed, 32 insertions, 42 deletions
diff --git a/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx b/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx
index 0c54176cb0b..9d33a81f578 100644
--- a/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx
+++ b/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx
@@ -16,7 +16,7 @@
%
% \iffalse
%<*driver>
-\ProvidesFile{thuthesis.dtx}[2017/12/4 5.4.1 Tsinghua University Thesis Template]
+\ProvidesFile{thuthesis.dtx}[2017/12/18 5.4.2 Tsinghua University Thesis Template]
\documentclass{ltxdoc}
\usepackage{dtx-style}
@@ -84,7 +84,7 @@
% 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 to 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}{Redefine footnote marks.}
@@ -148,6 +148,7 @@
% \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。}
+% \changes{v5.4.2}{2017/12/16}{删除 \cs{pozhehao}。}
%
% \def\indexname{索引}
% \def\glossaryname{修改记录}
@@ -391,16 +392,16 @@
% \subsection{论文选项}
% \label{sec:option}
%
-% \DescribeOption{type}
+% \DescribeOption{degree}
% 选择论文类型,当前支
% 持:\option{bachelor},\option{master},\option{doctor},\option{postdoctor}。
% 为必选项。
% \begin{latex}
% % 博士论文
-% \documentclass[type=doctor]{thuthesis}
+% \documentclass[degree=doctor]{thuthesis}
%
% % 硕士论文
-% \documentclass[type=master]{thuthesis}
+% \documentclass[degree=master]{thuthesis}
% \end{latex}
%
% \DescribeOption{secret}
@@ -1016,8 +1017,7 @@
% 否则,就要像例子里面那样做一些微调(参看模板自带的 \file{shuji.tex})。下面是一
% 个例子:
% \begin{latex}
-% \documentclass[type=master]{thuthesis}
-% % 此处 type 无所谓
+% \documentclass[degree=master]{thuthesis}
%
% \begin{document}
% \thuset{
@@ -1107,7 +1107,7 @@
%<cls>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<cls>\ProvidesClass{thuthesis}
%<cfg>\ProvidesFile{thuthesis.cfg}
-%<cls|cfg>[2017/12/4 5.4.1 Tsinghua University Thesis Template]
+%<cls|cfg>[2017/12/18 5.4.2 Tsinghua University Thesis Template]
% \end{macrocode}
%
% \subsection{定义选项}
@@ -1126,7 +1126,7 @@
%<*cls>
\hyphenation{Thu-Thesis}
\def\thuthesis{\textsc{ThuThesis}}
-\def\version{5.4.1}
+\def\version{5.4.2}
\RequirePackage{kvoptions}
\SetupKeyvalOptions{
@@ -1137,36 +1137,28 @@
%
% 用 \pkg{kvoptions} 的 \texttt{key=value} 方式来设置论文类型。
% \changes{v5.0.0}{2015/12/13}{使用 \pkg{kvoptions} 简化选项 type。}
+% \changes{v5.4.2}{2017/12/18}{使用 degree 取代 type 选项。}
% \begin{macrocode}
\newif\ifthu@bachelor
\newif\ifthu@master
\newif\ifthu@doctor
\newif\ifthu@postdoctor
-\define@key{thu}{type}{%
+\define@key{thu}{degree}{%
\thu@bachelorfalse
\thu@masterfalse
\thu@doctorfalse
\thu@postdoctorfalse
- \expandafter\csname thu@#1true\endcsname
- \ifthu@bachelor\relax\else
- \ifthu@master\relax\else
- \ifthu@doctor\relax\else
- \ifthu@postdoctor\relax\else
- \ClassError{thuthesis}%
- {Please specify thesis type in option: \MessageBreak
- type=[bachelor | master | doctor | postdoctor]}{}
- \fi
- \fi
- \fi
- \fi}
-\def\thu@deprecated@type@option{%
- \kvsetkeys{thu}{type=\CurrentOption} % for compatability.
+ \expandafter\csname thu@#1true\endcsname}
+\define@key{thu}{type}{%
+ \ClassError{thuthesis}{'type' is deprecated, \MessageBreak
+ please use 'degree=#1' instead}{}}
+\def\thu@deprecated@degree@option{%
\ClassError{thuthesis}{Option '\CurrentOption' is deprecated, \MessageBreak
- please use 'type=\CurrentOption' instead}{}}
-\DeclareVoidOption{bachelor}{\thu@deprecated@type@option}
-\DeclareVoidOption{master}{\thu@deprecated@type@option}
-\DeclareVoidOption{doctor}{\thu@deprecated@type@option}
-\DeclareVoidOption{postdoctor}{\thu@deprecated@type@option}
+ please use 'degree=\CurrentOption' instead}{}}
+\DeclareVoidOption{bachelor}{\thu@deprecated@degree@option}
+\DeclareVoidOption{master}{\thu@deprecated@degree@option}
+\DeclareVoidOption{doctor}{\thu@deprecated@degree@option}
+\DeclareVoidOption{postdoctor}{\thu@deprecated@degree@option}
% \end{macrocode}
%
% 论文是否保密。
@@ -1221,6 +1213,17 @@
% 解析用户传递过来的选项,并加载 \pkg{ctexbook}。
% \begin{macrocode}
\ProcessKeyvalOptions*
+\ifthu@bachelor\relax\else
+ \ifthu@master\relax\else
+ \ifthu@doctor\relax\else
+ \ifthu@postdoctor\relax\else
+ \ClassError{thuthesis}%
+ {Please specify thesis degree in option: \MessageBreak
+ degree=[bachelor | master | doctor | postdoctor]}{}
+ \fi
+ \fi
+ \fi
+\fi
% \end{macrocode}
%
% 使用 \XeTeX\ 引擎时,\pkg{fontspec} 宏包会被 \pkg{xeCJK} 自动调用。传递
@@ -3304,19 +3307,6 @@
% \end{macrocode}
% \end{macro}
%
-% \subsection{自定义命令和环境}
-% \label{sec:userdefine}
-%
-% \begin{macro}{\pozhehao}
-% 为了兼容性保留之,推荐直接输入“——”。
-% \changes{v2.1}{2006/01/12}{稍微加宽一点。同时把名字改为\textbf{破折号}:\cs{pozhehao}}
-% \begin{macrocode}
-%<*cfg>
-\newcommand{\pozhehao}{——}
-%</cfg>
-% \end{macrocode}
-% \end{macro}
-%
%
% \subsection{其它}
% \label{sec:other}