summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/thuthesis
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/tex/latex/thuthesis
parent32a3f4d6e166863d0c93ddc1bb3f8ef7a9bf18cd (diff)
thuthesis (27dec15)
git-svn-id: svn://tug.org/texlive/trunk@39220 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/thuthesis')
-rw-r--r--Master/texmf-dist/tex/latex/thuthesis/thuthesis.cfg7
-rw-r--r--Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls125
-rw-r--r--Master/texmf-dist/tex/latex/thuthesis/thuthesis.sty14
3 files changed, 86 insertions, 60 deletions
diff --git a/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cfg b/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cfg
index 2de98c9384f..8d657ce0bfa 100644
--- a/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cfg
+++ b/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cfg
@@ -23,7 +23,7 @@
%% This is the configuration file of the thuthesis package with LaTeX2e.
%%
\ProvidesFile{thuthesis.cfg}
-[2015/12/24 5.0 Tsinghua University Thesis Template]
+[2015/12/27 5.1.0 Tsinghua University Thesis Template]
\theoremsymbol{\ensuremath{\square}}
\newtheorem*{proof}{证明}
\theoremstyle{plain}
@@ -153,6 +153,9 @@
\newcommand{\thu@frontdate}{%
日\ifthu@bachelor\hspace{1em}\else\hspace{2em}\fi 期:}
\newcommand{\thu@ckeywords@title}{关键词:}
+\def\thu@master@art{Master of Arts}
+\def\thu@master@sci{Master of Science}
+\def\thu@doctor@phi{Doctor of Philosophy}
\newcommand{\thu@denotation@name}{主要符号对照表}
\newcommand{\thu@ackname}{致\hspace{1em}谢}
\newcommand{\thu@declarename}{声\hspace{1em}明}
@@ -162,6 +165,8 @@
其他个人和集体,均已在文中以明确方式标明。}
\newcommand{\thu@signature}{签\hspace{1em}名:}
\newcommand{\thu@backdate}{日\hspace{1em}期:}
+\def\thumasterbib{\ifthu@bachelor [D]\else [硕士学位论文]\fi}
+\def\thuphdbib{\ifthu@bachelor [D]\else [博士学位论文]\fi}
\ifthu@bachelor
\newcommand{\thu@resume@title}{在学期间参加课题的研究成果}
\else
diff --git a/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls b/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls
index ff65bda19c3..35320b4a26c 100644
--- a/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls
+++ b/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls
@@ -25,10 +25,10 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesClass{thuthesis}
-[2015/12/24 5.0 Tsinghua University Thesis Template]
+[2015/12/27 5.1.0 Tsinghua University Thesis Template]
\hyphenation{Thu-Thesis}
\def\thuthesis{\textsc{ThuThesis}}
-\def\version{4.8.1}
+\def\version{5.1.0}
\RequirePackage{kvoptions}
\SetupKeyvalOptions{
@@ -47,7 +47,7 @@
\expandafter\csname thu@#1true\endcsname}
\def\thu@deprecated@type@option{%
- \setkeys{thu}{type=\CurrentOption} % for compatability.
+ \kvsetkeys{thu}{type=\CurrentOption} % for compatability.
\ClassError{thuthesis}{Option '\CurrentOption' is deprecated, \MessageBreak
please use 'type=\CurrentOption' instead}{}}
\DeclareVoidOption{bachelor}{\thu@deprecated@type@option}
@@ -61,8 +61,7 @@
\DeclareBoolOption{arialtitle}
\DeclareBoolOption{raggedbottom}
\DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{ctexbook}}
-\setkeys{thu}{%
- type=bachelor,
+\kvsetkeys{thu}{%
raggedbottom,
arial,
arialtitle}
@@ -96,9 +95,7 @@
\else
\RequirePackage[perpage]{footmisc}
\fi
-\ifthu@bachelor
- \RequirePackage{CJKfntef}
-\fi
+\RequirePackage{CJKfntef}
\renewcommand{\baselinestretch}{1.0} % todo:?
\ifxetex
% todo: minor fix of CJKnumb
@@ -151,6 +148,7 @@
\ifthu@bachelor
\geometry{
left=32mm,
+ headheight=5mm,
headsep=5mm,
textheight=220mm,
bottom=37mm,
@@ -158,6 +156,7 @@
\else
\geometry{
left=30mm,
+ headheight=5mm,
headsep=5mm,
textheight=237mm,
bottom=29mm,
@@ -166,7 +165,7 @@
\RequirePackage{fancyhdr}
\let\thu@cleardoublepage\cleardoublepage
\newcommand{\thu@clearemptydoublepage}{%
- \clearpage{\pagestyle{empty}\thu@cleardoublepage}}
+ \clearpage{\pagestyle{thu@empty}\thu@cleardoublepage}}
\let\cleardoublepage\thu@clearemptydoublepage
\renewcommand\frontmatter{%
\if@openright\cleardoublepage\else\clearpage\fi
@@ -207,7 +206,7 @@
\thu@def@fontsize{qihao}{5.5bp}
\thu@def@fontsize{bahao}{5bp}
\renewcommand\normalsize{%
- \@setfontsize\normalsize{12bp}{20bp}
+ \@setfontsize\normalsize{12bp}{20bp}%
\abovedisplayskip=20bp \@plus 2bp \@minus 2bp
\abovedisplayshortskip=20bp \@plus 2bp \@minus 2bp
\belowdisplayskip=\abovedisplayskip
@@ -437,7 +436,8 @@
\renewcommand*\l@section{\@dottedtocline{1}{\ccwd}{2.1em}}
\renewcommand*\l@subsection{\@dottedtocline{2}{\ifthu@bachelor 1.5\ccwd\else 2\ccwd\fi}{3em}}
\renewcommand*\l@subsubsection{\@dottedtocline{3}{\ifthu@bachelor 2.4em\else 3.5em\fi}{3.8em}}
-\def\thu@def@term#1{
+\def\thu@def@term#1{%
+ \define@key{thu}{#1}{\csname #1\endcsname{##1}}
\expandafter\gdef\csname #1\endcsname##1{%
\expandafter\gdef\csname thu@#1\endcsname{##1}}
\csname #1\endcsname{}}
@@ -448,12 +448,16 @@
\thu@def@term{secretyear}
\thu@def@term{ctitle}
\thu@def@term{cdegree}
-\newcommand\cdepartment[2][]{\def\thu@cdepartment@short{#1}\def\thu@cdepartment{#2}}
-\def\caffil{\cdepartment} % todo: for compatibility
+\newcommand\cdepartment[2][]{% todo: for definekeys
+ \def\thu@cdepartment@short{#1}
+ \def\thu@cdepartment{#2}}
+\define@key{thu}{cdepartment}{%
+ \expandafter\cdepartment#1}
+\def\caffil{\cdepartment} % for compatibility
\def\thu@cdepartment@short{}
\def\thu@cdepartment{}
\thu@def@term{cmajor}
-\def\csubject{\cmajor} % todo: for compatibility
+\def\csubject{\cmajor} % for compatibility
\thu@def@term{cfirstdiscipline}
\thu@def@term{cseconddiscipline}
\thu@def@term{cauthor}
@@ -465,9 +469,9 @@
\thu@def@term{etitle}
\thu@def@term{edegree}
\thu@def@term{edepartment}
-\def\eaffil{\edepartment} % todo: for compability
+\def\eaffil{\edepartment} % for compability
\thu@def@term{emajor}
-\def\esubject{\emajor} % todo: for compability
+\def\esubject{\emajor} %for compability
\thu@def@term{eauthor}
\thu@def@term{esupervisor}
\thu@def@term{eassosupervisor}
@@ -484,7 +488,8 @@
\newcommand{\thu@@eabstract}[1]{\long\gdef\thu@eabstract{#1}}
\newenvironment{eabstract}{\collect@body\thu@@eabstract}{}
\def\thu@parse@keywords#1{
- \expandafter\gdef\csname thu@#1\endcsname{} % todo: need or not?
+ \define@key{thu}{#1}{\csname #1\endcsname{##1}}
+ \expandafter\gdef\csname thu@#1\endcsname{}
\expandafter\gdef\csname #1\endcsname##1{
\@for\reserved@a:=##1\do{
\expandafter\ifx\csname thu@#1\endcsname\@empty\else
@@ -494,9 +499,11 @@
\expandafter\csname thu@#1\expandafter\endcsname\expandafter{\reserved@a}}}}
\thu@parse@keywords{ckeywords}
\thu@parse@keywords{ekeywords}
+\def\thusetup{\kvsetkeys{thu}}
\newcommand\thu@underline[2][6em]{\hskip1pt\underline{\hb@xt@ #1{\hss#2\hss}}\hskip3pt}
\newlength{\thu@title@width}
-\def\thu@put@title#1{\makebox{\hb@xt@\thu@title@width{#1}}}
+\newcommand{\thu@put@title}[2][\thu@title@width]{%
+ \begin{CJKfilltwosides}{#1}#2\end{CJKfilltwosides}}
\def\thu@first@titlepage{%
\ifthu@postdoctor\thu@first@titlepage@postdoctor\else\thu@first@titlepage@other\fi}
\newcommand{\thu@first@titlepage@postdoctor}{
@@ -537,7 +544,6 @@
\vskip2cm
{\sihao\thu@postdoctor@date@title\hskip1em\underline\thu@postdoctordate}
\end{center}}
-\newcommand*{\getcmlength}[1]{\strip@pt\dimexpr0.035146\dimexpr#1\relax\relax}
\newcommand{\thu@first@titlepage@other}{
\begin{center}
\vspace*{-1.6cm}
@@ -573,23 +579,24 @@
\fi
\ifthu@bachelor
\vskip1cm
- \parbox[t][7.0cm][t]{\textwidth}{{\sanhao[1.8]
- \hspace*{1.65cm}\fangsong
- \setlength{\thu@title@width}{4em}
- \setlength{\extrarowheight}{6pt}
- \ifxetex % todo: ugly codes
- \begin{tabular}{p{\thu@title@width}@{}l@{\extracolsep{8pt}}l}
- \else
- \begin{tabular}{p{\thu@title@width}l@{}l}
- \fi
- \thu@put@title{\thu@department@title} & \thu@title@sep & \thu@cdepartment\\
- \thu@put@title{\thu@major@title} & \thu@title@sep & \thu@cmajor\\
- \thu@put@title{\thu@author@title} & \thu@title@sep & \thu@cauthor \\
- \thu@put@title{\thu@supervisor@title} & \thu@title@sep & \thu@csupervisor\\
- \ifx\thu@cassosupervisor\@empty\else
- \thu@put@title{\thu@assosuper@title} & \thu@title@sep & \thu@cassosupervisor\\
- \fi
- \end{tabular}
+ \parbox[t][7.0cm][t]{\textwidth}{%
+ {\fangsong\sanhao[1.8]%
+ \hspace*{1.65cm}
+ \setlength{\thu@title@width}{4em}
+ \setlength{\extrarowheight}{6pt}
+ \ifxetex % todo: ugly codes
+ \begin{tabular}{p{\thu@title@width}@{}l@{\extracolsep{8pt}}l}
+ \else
+ \begin{tabular}{p{\thu@title@width}l@{}l}
+ \fi
+ \thu@put@title{\thu@department@title} & \thu@title@sep & \thu@cdepartment\\
+ \thu@put@title{\thu@major@title} & \thu@title@sep & \thu@cmajor\\
+ \thu@put@title{\thu@author@title} & \thu@title@sep & \thu@cauthor \\
+ \thu@put@title{\thu@supervisor@title} & \thu@title@sep & \thu@csupervisor\\
+ \ifx\thu@cassosupervisor\@empty\else%
+ \thu@put@title{\thu@assosuper@title} & \thu@title@sep & \thu@cassosupervisor\\
+ \fi
+ \end{tabular}
}}
\else
\vskip 5bp
@@ -610,7 +617,7 @@
\thu@put@title{\thu@assosuper@title} & \thu@title@sep & {\ziju{0.6875}\thu@cassosupervisor}\\
\fi
\ifx\thu@ccosupervisor\@empty\else
- \thu@put@title{\thu@cosuper@title} & \thu@title@sep & {\ziju{0.6875}\thu@ccosupervisor}\\
+ \hfill\makebox[0pt][r]{\thu@cosuper@title} & \thu@title@sep & {\ziju{0.6875}\thu@ccosupervisor}\\
\fi
\end{tabular}
\end{center}}}
@@ -620,18 +627,19 @@
\end{center}
\end{center}} % end of titlepage
\newcommand{\thu@engcover}{%
- \def\thu@master@art{Master of Arts}
- \def\thu@master@sci{Master of Science}
- \def\thu@doctor@phi{Doctor of Philosophy}
- \newif\ifthu@professional
- \thu@professionalfalse
+ \newif\ifthu@professional\thu@professionalfalse
\ifthu@master
- \ifx\thu@edegree\thu@master@art\relax\else
- \ifx\thu@edegree\thu@master@sci\relax\else
- \thu@professionaltrue\fi\fi\fi
+ \ifthenelse{\equal{\thu@edegree}{\thu@master@art}}
+ {\relax}
+ {\ifthenelse{\equal{\thu@edegree}{\thu@master@sci}}
+ {\relax}
+ {\thu@professionaltrue}}
+ \fi
\ifthu@doctor
- \ifx\thu@edegree\thu@doctor@phi\relax\else
- \thu@professionaltrue\fi\fi
+ \ifthenelse{\equal{\thu@edegree}{\thu@doctor@phi}}
+ {\relax}
+ {\thu@professionaltrue}
+ \fi
\begin{center}
\vspace*{-5pt}
\parbox[t][5.2cm][t]{\paperwidth-7.2cm}{
@@ -700,7 +708,16 @@
\thu@frontdate\thu@underline[7em]\relax\hspace*{1cm}
\endgroup
\fi}
-\NewDocumentCommand{\makecover}{o}{
+\def\makecover{%
+ \thu@setup@pdfinfo\thu@makecover}
+\def\thu@setup@pdfinfo{%
+ \hypersetup{%
+ pdftitle={\thu@ctitle},
+ pdfauthor={\thu@cauthor},
+ pdfsubject={\thu@cdegree},
+ pdfkeywords={\thu@ckeywords},
+ pdfcreator={\thuthesis-v\version}}}
+\NewDocumentCommand{\thu@makecover}{o}{
\phantomsection
\pdfbookmark[-1]{\thu@ctitle}{ctitle}
\normalsize%
@@ -810,8 +827,6 @@
\def\@inlinecite#1{\begingroup\let\@cite\NAT@citenum\citep{#1}\endgroup}
\let\onlinecite\inlinecite
\def\thudot{\ifthu@bachelor\else\unskip.\fi}
-\def\thumasterbib{\ifthu@bachelor [D]\else [硕士学位论文]\fi}
-\def\thuphdbib{\ifthu@bachelor [D]\else [博士学位论文]\fi}
\renewenvironment{thebibliography}[1]{%
\thu@chapter*{\bibname}%
\wuhao[1.5]
@@ -867,16 +882,8 @@ leftmargin=10mm,labelsep=!,before*=\xiaosi[1.26]}
\texttt{#1}}
\newcommand{\wi}[1]{\index{#1}#1}
\fi
-\newcommand{\pozhehao}{\kern0.3ex\rule[0.8ex]{2em}{0.1ex}\kern0.3ex}
+\newcommand{\pozhehao}{——}
\AtEndOfClass{\input{thuthesis.cfg}}
-\def\thu@setup@pdfinfo{%
- \hypersetup{%
- pdftitle={\thu@ctitle},
- pdfauthor={\thu@cauthor},
- pdfsubject={\thu@cdegree},
- pdfkeywords={\thu@ckeywords},
- pdfcreator={\thu@cauthor},
- pdfproducer={\thuthesis}}}
\AtEndOfClass{\sloppy}
\endinput
%%
diff --git a/Master/texmf-dist/tex/latex/thuthesis/thuthesis.sty b/Master/texmf-dist/tex/latex/thuthesis/thuthesis.sty
index 2ac69daec37..4b5940223b1 100644
--- a/Master/texmf-dist/tex/latex/thuthesis/thuthesis.sty
+++ b/Master/texmf-dist/tex/latex/thuthesis/thuthesis.sty
@@ -33,6 +33,20 @@
% 给自定义的宏后面自动加空白
% \RequirePackage{xspace}
+% 借用 ltxdoc 里面的几个命令。
+\def\cmd#1{\cs{\expandafter\cmd@to@cs\string#1}}
+\def\cmd@to@cs#1#2{\char\number`#2\relax}
+\DeclareRobustCommand\cs[1]{\texttt{\char`\\#1}}
+
+\newcommand*{\meta}[1]{{%
+ \ensuremath{\langle}\rmfamily\itshape#1\/\ensuremath{\rangle}}}
+\providecommand\marg[1]{%
+ {\ttfamily\char`\{}\meta{#1}{\ttfamily\char`\}}}
+\providecommand\oarg[1]{%
+ {\ttfamily[}\meta{#1}{\ttfamily]}}
+\providecommand\parg[1]{%
+ {\ttfamily(}\meta{#1}{\ttfamily)}}
+\providecommand\pkg[1]{{\sffamily#1}}
% 定义自己常用的东西
\newcommand{\china}{中华人民共和国}