summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-10-22 22:57:41 +0000
committerKarl Berry <karl@freefriends.org>2011-10-22 22:57:41 +0000
commita2b557e7d2c3387ce36891f50c32974c80287978 (patch)
treeb6f9b245d57784c0d2a413115e6ca4ac484d5be9 /Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls
parent075c26e33536dcb9ad942abec953b9c06fed1cde (diff)
thuthesis (22oct11)
git-svn-id: svn://tug.org/texlive/trunk@24361 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls')
-rw-r--r--Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls207
1 files changed, 124 insertions, 83 deletions
diff --git a/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls b/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls
index e64755b4337..daa79c63602 100644
--- a/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls
+++ b/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls
@@ -8,7 +8,7 @@
%%
%% This is a generated file.
%%
-%% Copyright (C) 2005-2009 by Ruini Xue <xueruini@gmail.com>
+%% Copyright (C) 2005-2011 by Ruini Xue <xueruini@gmail.com>
%%
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3a
@@ -26,21 +26,23 @@
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesClass{thuthesis}
-[2008/02/28 4.5.1 Tsinghua University Thesis Template]
+[2011/05/02 4.6 Tsinghua University Thesis Template]
\newif\ifthu@UTF
\newif\ifthu@GBK
\DeclareOption{utf}{\thu@UTFtrue\thu@GBKfalse}
\DeclareOption{gbk}{\thu@GBKtrue\thu@UTFfalse}
\hyphenation{Thu-Thesis}
\def\thuthesis{\textsc{ThuThesis}}
-\def\version{4.5}
+\def\version{4.6}
\newif\ifthu@bachelor\thu@bachelorfalse
\newif\ifthu@master\thu@masterfalse
\newif\ifthu@doctor\thu@doctorfalse
+\newif\ifthu@postdoctor\thu@postdoctorfalse
\newif\ifthu@secret\thu@secretfalse
\DeclareOption{bachelor}{\thu@bachelortrue}
\DeclareOption{master}{\thu@mastertrue}
\DeclareOption{doctor}{\thu@doctortrue}
+\DeclareOption{postdoctor}{\thu@postdoctortrue}
\DeclareOption{secret}{\thu@secrettrue}
\newif\ifthu@dvips
\newif\ifthu@dvipdfm
@@ -63,8 +65,10 @@
\ifthu@bachelor\relax\else
\ifthu@master\relax\else
\ifthu@doctor\relax\else
- \ClassError{thuthesis}%
- {You have to specify one of thesis options: bachelor, master or doctor.}{}
+ \ifthu@postdoctor\relax\else
+ \ClassError{thuthesis}%
+ {You have to specify one of thesis options: bachelor, master or doctor.}{}
+ \fi
\fi
\fi
\fi
@@ -92,12 +96,13 @@
\RequirePackage{indentfirst}
\RequirePackage[neverdecrease]{paralist}
\ifthu@xetex
- \RequirePackage{xunicode,xltxtra}
- \RequirePackage[CJKnumber,CJKtextspaces,CJKmathspaces]{xeCJK}
- \punctstyle{kaiming}
+ \RequirePackage{mathptmx} % fontspec conflicts with txfonts now, so we have to load other times-math fonts.
+ \RequirePackage{xltxtra}
+ \RequirePackage[CJKnumber,BoldFont,ItalicFont,normalindentfirst]{xeCJK}
+ \punctstyle{quanjiao}
% todo: minor fix of CJKnumb
\def\CJK@null{\kern\CJKnullspace\Unicode{48}{7}\kern\CJKnullspace}
- \defaultfontfeatures{Mapping=tex-text} % after fontspec
+ \defaultfontfeatures{Mapping=tex-text} % use TeX --
\setCJKmainfont[BoldFont={Adobe Heiti Std}, ItalicFont={Adobe Kaiti Std}]{Adobe Song Std}
\setCJKsansfont{Adobe Heiti Std}
\setCJKmonofont{Adobe Kaiti Std}
@@ -223,22 +228,25 @@
\setlength{\textheight}{\paperheight}
\setlength\marginparwidth{0cm}
\setlength\marginparsep{0cm}
-\addtolength{\textwidth}{-6.4cm}
-\setlength{\oddsidemargin}{3.2cm-1in}
-\setlength{\evensidemargin}{\oddsidemargin}
-\setlength{\headheight}{20pt}
-\setlength{\topskip}{0pt}
-\setlength{\skip\footins}{15pt}
-\setlength{\topmargin}{2.8cm-1in}
\ifthu@bachelor
+ \addtolength{\textwidth}{-6.4cm}
+ \setlength{\topmargin}{2.8cm-1in}
+ \setlength{\oddsidemargin}{3.2cm-1in}
\setlength{\footskip}{1.3cm}
\setlength{\headsep}{0.6cm}
\addtolength{\textheight}{-7.8cm}
\else
+ \addtolength{\textwidth}{-6cm}
+ \setlength{\topmargin}{2.2cm-1in}
+ \setlength{\oddsidemargin}{3cm-1in}
\setlength{\footskip}{1.5cm}
\setlength{\headsep}{0.5cm}
- \addtolength{\textheight}{-8.6cm}
+ \addtolength{\textheight}{-6cm}
\fi
+\setlength{\evensidemargin}{\oddsidemargin}
+\setlength{\headheight}{20pt}
+\setlength{\topskip}{0pt}
+\setlength{\skip\footins}{15pt}
\let\thu@cleardoublepage\cleardoublepage
\newcommand{\thu@clearemptydoublepage}{%
\clearpage{\pagestyle{empty}\thu@cleardoublepage}}
@@ -255,11 +263,11 @@
\let\@evenfoot=\@oddfoot}
\def\ps@thu@headings{%
\def\@oddhead{\vbox to\headheight{%
- \hb@xt@\textwidth{\hfill\wuhao\song\leftmark\ifthu@bachelor\relax\else\hfill\fi}%
+ \hb@xt@\textwidth{\hfill\wuhao\song\leftmark\ifthu@bachelor\relax\else\hfill\fi}%
\vskip2pt\hbox{\vrule width\textwidth height0.4pt depth0pt}}}
\def\@evenhead{\vbox to\headheight{%
\hb@xt@\textwidth{\wuhao\song%
- \ifthu@bachelor\thu@schoolename\thu@bachelor@subtitle%
+ \ifthu@bachelor\thu@schoolname\thu@bachelor@subtitle%
\else\hfill\leftmark\fi\hfill}%
\vskip2pt\hbox{\vrule width\textwidth height0.4pt depth0pt}}}
\def\@oddfoot{\hfil\wuhao\thepage\hfil}
@@ -314,20 +322,20 @@
\renewcommand\footnotesize{\thu@footnotesize\xiaowu[1.5]}
\def\@makefnmark{\textsuperscript{\hbox{\normalfont\@thefnmark}}}
\long\def\@makefntext#1{
- \bgroup
- \setbox\@tempboxa\hbox{%
- \hb@xt@ 2em{\@thefnmark\hss}}
- \leftmargin\wd\@tempboxa
- \rightmargin\z@
- \linewidth \columnwidth
- \advance \linewidth -\leftmargin
- \parshape \@ne \leftmargin \linewidth
- \footnotesize
- \@setpar{{\@@par}}%
- \leavevmode
- \llap{\box\@tempboxa}%
- #1
- \par\egroup}
+ \bgroup
+ \setbox\@tempboxa\hbox{%
+ \hb@xt@ 2em{\@thefnmark\hss}}
+ \leftmargin\wd\@tempboxa
+ \rightmargin\z@
+ \linewidth \columnwidth
+ \advance \linewidth -\leftmargin
+ \parshape \@ne \leftmargin \linewidth
+ \footnotesize
+ \@setpar{{\@@par}}%
+ \leavevmode
+ \llap{\box\@tempboxa}%
+ #1
+ \par\egroup}
\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@@@}
@@ -340,7 +348,7 @@
\if@inlabel \indent\fi
\if@newlist \@noitemerr\fi
\ifhmode
- \ifdim\lastskip >\z@ #1\unskip \par %<<<<<<<<<<<<<<<<<<<<<<
+ \ifdim\lastskip >\z@ #1\unskip \par
\else #1\unskip \par \fi
\fi
\if@noparlist \else
@@ -382,12 +390,13 @@
\ifthu@arialtitle
\def\thu@title@font{\sffamily}
\fi
-\renewcommand\chapter{\if@openright\cleardoublepage\else\clearpage\fi\phantomsection%
- \ifthu@bachelor\thispagestyle{thu@plain}%
- \else\thispagestyle{thu@headings}\fi%
- \global\@topnum\z@%
- \@afterindenttrue%
- \secdef\@chapter\@schapter}
+\renewcommand\chapter{%
+ \if@openright\cleardoublepage\else\clearpage\fi\phantomsection%
+ \ifthu@bachelor\thispagestyle{thu@plain}%
+ \else\thispagestyle{thu@headings}\fi%
+ \global\@topnum\z@%
+ \@afterindenttrue%
+ \secdef\@chapter\@schapter}
\def\@chapter[#1]#2{%
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
@@ -517,6 +526,9 @@
\expandafter\gdef\csname #1\endcsname##1{%
\expandafter\gdef\csname thu@#1\endcsname{##1}}
\csname #1\endcsname{}}
+\thu@define@term{catalognumber}
+\thu@define@term{udc}
+\thu@define@term{id}
\thu@define@term{secretlevel}
\thu@define@term{secretyear}
\thu@define@term{ctitle}
@@ -527,11 +539,14 @@
\def\thu@cdepartment{}
\thu@define@term{cmajor}
\def\csubject{\cmajor} % todo: for compatibility
+\thu@define@term{cfirstdiscipline}
+\thu@define@term{cseconddiscipline}
\thu@define@term{cauthor}
\thu@define@term{csupervisor}
\thu@define@term{cassosupervisor}
\thu@define@term{ccosupervisor}
\thu@define@term{cdate}
+\thu@define@term{postdoctordate}
\thu@define@term{etitle}
\thu@define@term{edegree}
\thu@define@term{edepartment}
@@ -564,16 +579,57 @@
\expandafter\csname thu@#1\expandafter\endcsname\expandafter{\reserved@a}}}}
\thu@parse@keywords{ckeywords}
\thu@parse@keywords{ekeywords}
+\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@first@titlepage}{
+\def\thu@put@title#1{\makebox{\hb@xt@\thu@title@width{#1}}}
+\def\thu@first@titlepage{%
+ \ifthu@postdoctor\thu@first@titlepage@postdoctor\else\thu@first@titlepage@other\fi}
+\newcommand{\thu@first@titlepage@postdoctor}{
+ \begin{center}
+ \setlength{\thu@title@width}{3em}
+ \vspace*{1cm}
+ \begingroup\wuhao[1.5]%
+ \thu@put@title{\thu@catalog@number@title}\thu@underline\thu@catalognumber\hfill%
+ \thu@put@title{\thu@secretlevel}\expandafter\thu@underline\ifthu@secret\thu@secret@content\else\relax\fi\par
+ \thu@put@title{U D C}\thu@underline\thu@udc\hfill%
+ \thu@put@title{\thu@id@title}\thu@underline\thu@id\par\vskip3cm\endgroup
+ \begingroup\hei
+ {\xiaochu\ziju{1em}\thu@schoolname}\par\vskip2cm
+ {\xiaoyi\ziju{1em}\thu@postdoctor@report@title}\par\vskip3cm
+ {\sanhao[1.5]\thu@ctitle}\par\vskip2cm
+ {\xiaoer\thu@cauthor}
+ \endgroup
+ \par\vskip3cm
+ {\xiaosan[1.5]\ziju{1em}\thu@schoolname\par\vskip0.5em\CJK@todaysmall@short}
+ \end{center}
+ \cleardoublepage
+ \begin{center}
+ \vspace*{2cm}
+ {\sihao\hei\thu@ctitle\par\thu@etitle}\par
+ \parbox[t][7cm][b]{\textwidth-6cm}{\sihao[1.5]%
+ \setlength{\thu@title@width}{11em}
+ \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@author@title} & \thu@title@sep & \thu@cauthor \\
+ \thu@put@title{\thu@postdoctor@first@discipline@title} & \thu@title@sep & \thu@cfirstdiscipline\\
+ \thu@put@title{\thu@postdoctor@second@discipline@title} & \thu@title@sep & \thu@cseconddiscipline\\
+ \thu@put@title{\thu@supervisor@title} & \thu@title@sep & \thu@csupervisor\\
+ \end{tabular}}
+ \vskip2cm
+ {\sihao\thu@postdoctor@date@title\hskip1em\underline\thu@postdoctordate}
+ \end{center}}
+\newcommand{\thu@first@titlepage@other}{
\begin{center}
\vspace*{-1.3cm}
\parbox[b][2.4cm][t]{\textwidth}{%
- \ifthu@secret\hfill{\sihao\thu@secret@title}\else\rule{1cm}{0cm}\fi}
+ \ifthu@secret\hfill{\sihao\thu@secretlevel\thu@secret@content}\else\rule{1cm}{0cm}\fi}
\ifthu@bachelor
\vskip0.2cm
- {\ziju{10bp}\yihao\li\thu@schoolename}
+ {\ziju{10bp}\yihao\li\thu@schoolname}
\par\vskip1.2cm
{\ziju{18bp}\xiaochu\hei\thu@bachelor@subtitle}
\vskip2.5cm
@@ -614,12 +670,12 @@
\else
\begin{tabular}{p{\thu@title@width}l@{}l}
\fi
- \thu@put@title{\thu@bachelor@departmenttitle} & \thu@title@sep & \thu@cdepartment\\
- \thu@put@title{\thu@bachelor@majortitle} & \thu@title@sep & \thu@cmajor\\
- \thu@put@title{\thu@bachelor@authortitle} & \thu@title@sep & \thu@cauthor \\
- \thu@put@title{\thu@csupervisortitle} & \thu@title@sep & \thu@csupervisor\\
+ \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@cassosupertitle} & \thu@title@sep & \thu@cassosupervisor\\
+ \thu@put@title{\thu@assosuper@title} & \thu@title@sep & \thu@cassosupervisor\\
\fi
\end{tabular}
}}
@@ -633,15 +689,15 @@
\else
\begin{tabular}{p{\thu@title@width}c@{\extracolsep{4pt}}l}
\fi
- \thu@put@title{\thu@cdepartmenttitle} & \thu@title@sep & {\ziju{3bp}\thu@cdepartment}\\
- \thu@put@title{\thu@cmajortitle} & \thu@title@sep & {\ziju{3bp}\thu@cmajor}\\
- \thu@put@title{\thu@cauthortitle} & \thu@title@sep & {\ziju{11bp}\thu@cauthor}\\
- \thu@put@title{\thu@csupervisortitle} & \thu@title@sep & {\ziju{11bp}\thu@csupervisor}\\
+ \thu@put@title{\thu@department@title} & \thu@title@sep & {\ziju{3bp}\thu@cdepartment}\\
+ \thu@put@title{\thu@major@title} & \thu@title@sep & {\ziju{3bp}\thu@cmajor}\\
+ \thu@put@title{\thu@author@title} & \thu@title@sep & {\ziju{11bp}\thu@cauthor}\\
+ \thu@put@title{\thu@supervisor@title} & \thu@title@sep & {\ziju{11bp}\thu@csupervisor}\\
\ifx\thu@cassosupervisor\@empty\else
- \thu@put@title{\thu@cassosupertitle} & \thu@title@sep & {\ziju{11bp}\thu@cassosupervisor}\\
+ \thu@put@title{\thu@assosuper@title} & \thu@title@sep & {\ziju{11bp}\thu@cassosupervisor}\\
\fi
\ifx\thu@ccosupervisor\@empty\else
- \thu@put@title{\thu@ccosupertitle} & \thu@title@sep & {\ziju{11bp}\thu@ccosupervisor}\\
+ \thu@put@title{\thu@cosuper@title} & \thu@title@sep & {\ziju{11bp}\thu@ccosupervisor}\\
\fi
\end{tabular}
\end{center}}}
@@ -688,7 +744,6 @@
\sanhao\bfseries\sffamily\thu@edate
\end{center}}
\end{center}}
-\newcommand\thu@underline[2][6em]{\hskip1pt\underline{\hb@xt@ #1{\hss#2\hss}}\hskip3pt}
\newcommand{\thu@authorization@mk}{%
\ifthu@bachelor\vspace*{-0.6cm}\else\vspace*{-0.1cm}\fi % shit code!
\begin{center}\erhao\hei\thu@authtitle\end{center}
@@ -717,13 +772,15 @@
\ifthu@doctor
\cleardoublepage\thu@doctor@engcover
\fi
- \cleardoublepage\thu@authorization@mk
+ \ifthu@postdoctor\relax\else%
+ \ifthu@bachelor\clearpage\else\cleardoublepage\fi%
+ \thu@authorization@mk\fi
\end{titlepage}
\normalsize
\thu@makeabstract
\let\@tabular\thu@tabular}
\newcommand{\thu@makeabstract}{%
- \cleardoublepage % always openright for Abstract
+ \ifthu@bachelor\clearpage\else\cleardoublepage\fi
\thu@chapter*[]{\cabstractname} % no tocline
\ifthu@bachelor
\pagestyle{thu@plain}
@@ -758,30 +815,15 @@
\setlength{\topsep}{0pt} % 标签与上文的间距
}}{\end{list}}
\newenvironment{ack}{%
- \ifthu@bachelor
\thu@chapter*{\thu@ackname}
- \else
- % \cleardoublepage
- \thu@chapter*[\thu@acklongname]{\thu@ackname}[\thu@acklongname]
- \fi}
- {%
- \ifthu@bachelor\relax\else %TAG 1
- \par\vfill%
- \noindent
- {\setlength{\unitlength}{0.1\textwidth}
- \begin{picture}(10, 0.1)
- \multiput(0,0)(1, 0){10}{\rule{0.8\unitlength}{1.2pt}}
- \multiput(0,0.08)(1, 0){10}{\rule{0.8\unitlength}{1.2pt}}
- \end{picture}}
- \fi % END TAG 1
- \ifthu@bachelor
+ }
+ {
+ \ifthu@postdoctor\relax\else%
\thu@chapter*{\thu@declarename}
- \else
- \parbox[t][4cm][c]{\textwidth}{{\sanhao\hei\centerline{\thu@declarename}}}
- \fi
- \par{\xiaosi\parindent2em\thu@declaretext}\vskip2cm
- {\xiaosi\hfill\thu@signature\thu@underline[2.5cm]\relax%
- \thu@backdate\thu@underline[2.5cm]\relax}%
+ \par{\xiaosi\parindent2em\thu@declaretext}\vskip2cm
+ {\xiaosi\hfill\thu@signature\thu@underline[2.5cm]\relax%
+ \thu@backdate\thu@underline[2.5cm]\relax}%
+ \fi
}
\def\thu@starttoc#1{% #1: float type, prepend type name in \listof*** entry.
\let\oldnumberline\numberline
@@ -839,9 +881,8 @@
\gdef\@chapapp{\appendixname~\thechapter}
%\renewcommand\theequation{\ifnum \c@chapter>\z@ \thechapter-\fi\@arabic\c@equation}
}{}
-\newenvironment{resume}{%
- % \cleardoublepage
- \thu@chapter*{\thu@resume@title}}{}
+\newenvironment{resume}[1][\thu@resume@title]{%
+ \thu@chapter*{#1}}{}
\newcommand{\resumeitem}[1]{\vspace{2.5em}{\sihao\hei\centerline{#1}}\par}
\newcommand{\shuji}[1][\thu@ctitle]{
\newpage\thispagestyle{empty}\ziju{0.4em}\fs\xiaosan