summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-12-03 22:18:07 +0000
committerKarl Berry <karl@freefriends.org>2017-12-03 22:18:07 +0000
commit7ce31410d12b842b9c2e0ef079bab8d7191eeb76 (patch)
treea4db180a11af70df6cdc20f2383dd2fc4fb9271c /Master/texmf-dist/tex
parentcde3e211202b8db560c86ff3ebc5f22cdf2271da (diff)
thuthesis (3dec17)
git-svn-id: svn://tug.org/texlive/trunk@45976 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/thuthesis/thuthesis.cfg8
-rw-r--r--Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls169
2 files changed, 98 insertions, 79 deletions
diff --git a/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cfg b/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cfg
index 1749d21b188..48412d43d45 100644
--- a/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cfg
+++ b/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cfg
@@ -23,7 +23,9 @@
%% This is the configuration file of the thuthesis package with LaTeX2e.
%%
\ProvidesFile{thuthesis.cfg}
-[2017/03/26 5.3.2 Tsinghua University Thesis Template]
+[2017/12/3 5.4.0 Tsinghua University Thesis Template]
+\theorembodyfont{\normalfont}
+\theoremheaderfont{\normalfont\heiti}
\theoremsymbol{\ensuremath{\square}}
\newtheorem*{proof}{证明}
\theoremstyle{plain}
@@ -165,8 +167,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}
+\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 48d4cb72131..dd9e397ed41 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}
-[2017/03/26 5.3.2 Tsinghua University Thesis Template]
+[2017/12/3 5.4.0 Tsinghua University Thesis Template]
\hyphenation{Thu-Thesis}
\def\thuthesis{\textsc{ThuThesis}}
-\def\version{5.3.2}
+\def\version{5.4.0}
\RequirePackage{kvoptions}
\SetupKeyvalOptions{
@@ -44,7 +44,18 @@
\thu@masterfalse
\thu@doctorfalse
\thu@postdoctorfalse
- \expandafter\csname thu@#1true\endcsname}
+ \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.
\ClassError{thuthesis}{Option '\CurrentOption' is deprecated, \MessageBreak
@@ -56,6 +67,7 @@
\DeclareBoolOption{secret}
\DeclareBoolOption{arialtoc}
\DeclareBoolOption{arialtitle}
+\IfFileExists{/dev/null}{}{\PassOptionsToClass{fontset=windowsold}{ctexbook}}
\DeclareBoolOption{raggedbottom}
\DeclareBoolOption{pifootnote}
\DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{ctexbook}}
@@ -65,17 +77,6 @@
\ProcessKeyvalOptions*
\PassOptionsToPackage{no-math}{fontspec}
\LoadClass[a4paper,openany,UTF8,zihao=-4,scheme=plain]{ctexbook}
-\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
\RequirePackage{etoolbox}
\RequirePackage{ifxetex}
\RequirePackage{xparse}
@@ -103,9 +104,7 @@
\RequirePackage{array}
\RequirePackage{longtable}
\RequirePackage{booktabs}
-\RequirePackage[numbers,super,sort&compress]{natbib}
-\patchcmd{\@chapter}{\addtocontents{lof}{\protect\addvspace{10\p@}}}{}{}{} % lof
-\patchcmd{\@chapter}{\addtocontents{lot}{\protect\addvspace{10\p@}}}{}{}{} % lot
+\RequirePackage[sort&compress]{natbib}
\RequirePackage{hyperref}
\ifxetex
\hypersetup{%
@@ -136,9 +135,9 @@
left=32mm,
headheight=5mm,
headsep=5mm,
- textheight=220mm,
- bottom=37mm,
- footskip=17mm}
+ textheight=227mm,
+ bottom=32mm,
+ footskip=12mm}
\else
\geometry{
left=30mm,
@@ -204,7 +203,7 @@
\renewcommand{\footrulewidth}{0pt}}
\fancypagestyle{thu@headings}{%
\fancyhead{}
- \fancyhead[C]{\wuhao\songti\leftmark}
+ \fancyhead[C]{\wuhao\normalfont\leftmark}
\fancyfoot{}
\fancyfoot[C]{\wuhao\thepage}
\renewcommand{\headrulewidth}{0.4pt}
@@ -249,8 +248,6 @@
\def\thu@maketag#1{\maketag@@@{(\ignorespaces #1\unskip\@@italiccorr)}}
\def\tagform@#1{\maketag@@@{(\ignorespaces #1\unskip\@@italiccorr)\equcaption{#1}}}
\renewcommand{\eqref}[1]{\textup{(\ref{#1})}}
-\theorembodyfont{\rmfamily\songti}
-\theoremheaderfont{\rmfamily\heiti}
\setlength{\floatsep}{20bp \@plus4pt \@minus1pt}
\setlength{\intextsep}{20bp \@plus4pt \@minus2pt}
\setlength{\textfloatsep}{20bp \@plus4pt \@minus2pt}
@@ -267,7 +264,7 @@
\fi
\let\old@tabular\@tabular
\def\thu@tabular{\dawu[1.5]\old@tabular}
-\DeclareCaptionLabelFormat{thu}{{\dawu[1.5]\songti #1~\rmfamily #2}}
+\DeclareCaptionLabelFormat{thu}{{\dawu[1.5]\normalfont #1~#2}}
\DeclareCaptionLabelSeparator{thu}{\hspace{1em}}
\DeclareCaptionFont{thu}{\dawu[1.5]}
\captionsetup{labelformat=thu,labelsep=thu,font=thu}
@@ -282,7 +279,7 @@
\noalign{\ifnum0=`}\fi\hrule \@height #1 \futurelet
\reserved@a\@xhline}
\def\thu@title@font{%
- \ifthu@arialtitle\sffamily\else\relax\fi}
+ \ifthu@arialtitle\sffamily\else\heiti\fi}
\AtBeginDocument{%
\pagestyle{thu@empty}
\renewcommand{\chaptermark}[1]{\@mkboth{\CTEXthechapter\hskip\ccwd#1}{}}}
@@ -297,31 +294,34 @@
chapter={
afterindent=true,
pagestyle={\ifthu@bachelor thu@plain\else thu@headings\fi},
- beforeskip={\ifthu@bachelor 13bp\else 9bp\fi},
+ beforeskip={\ifthu@bachelor 15bp\else 9bp\fi},
aftername=\hskip\ccwd,
afterskip={\ifthu@bachelor 20bp\else 24bp\fi},
- format={\centering\thu@title@font\heiti\ifthu@bachelor\xiaosan\else\sanhao[1]\fi},
+ format={\centering\thu@title@font\ifthu@bachelor\xiaosan[1.333]\else\sanhao[1]\fi},
nameformat=\relax,
numberformat=\relax,
titleformat=\thu@chapter@titleformat,
+ lofskip=0pt,
+ lotskip=0pt,
},
section={
afterindent=true,
beforeskip={\ifthu@bachelor 25bp\else 24bp\fi\@plus 1ex \@minus .2ex},
afterskip={\ifthu@bachelor 12bp\else 6bp\fi \@plus .2ex},
- format={\thu@title@font\heiti\sihao[1.429]},
+ format={\thu@title@font\ifthu@bachelor\sihao[1.286]\else\sihao[1.429]\fi},
},
subsection={
afterindent=true,
beforeskip={\ifthu@bachelor 12bp\else 16bp\fi\@plus 1ex \@minus .2ex},
afterskip={6bp \@plus .2ex},
- format={\thu@title@font\heiti\ifthu@bachelor\xiaosi[1.667]\else\banxiaosi[1.538]\fi},
+ format={\thu@title@font\ifthu@bachelor\xiaosi[1.25]\else\banxiaosi[1.538]\fi},
+ numberformat={\thu@title@font\ifthu@bachelor\banxiaosi[1.154]\else\banxiaosi[1.538]\fi},
},
subsubsection={
afterindent=true,
beforeskip={\ifthu@bachelor 12bp\else 16bp\fi\@plus 1ex \@minus .2ex},
afterskip={6bp \@plus .2ex},
- format={\csname thu@title@font\endcsname\heiti\xiaosi[1.667]},
+ format={\thu@title@font\ifthu@bachelor\xiaosi[1.25]\else\xiaosi[1.667]\fi},
},
paragraph/afterindent=true,
subparagraph/afterindent=true}
@@ -341,7 +341,9 @@
}{%
\addcontentsline{toc}{chapter}{#3}
}%
+ \ifthu@bachelor \ctexset{chapter/beforeskip=25bp} \fi
\chapter*{#3}%
+ \ifthu@bachelor \ctexset{chapter/beforeskip=15bp} \fi
\IfValueTF{#4}{%
\ifthenelse{\equal{#4}{}}
{\@mkboth{}{}}
@@ -354,7 +356,7 @@
\setcounter{tocdepth}{2}
\renewcommand\tableofcontents{%
\thu@chapter*[]{\contentsname}
- \ifthu@bachelor\xiaosi[1.8]\else\xiaosi[1.65]\fi\@starttoc{toc}\normalsize}
+ \ifthu@bachelor\xiaosi[1.667]\else\xiaosi[1.65]\fi\@starttoc{toc}\normalsize}
\ifthu@arialtoc
\def\thu@toc@font{\sffamily}
\fi
@@ -366,7 +368,7 @@
\renewcommand*\l@chapter[2]{%
\ifnum \c@tocdepth >\m@ne
\addpenalty{-\@highpenalty}%
- \vskip 4bp \@plus\p@
+ \ifthu@bachelor \vskip 6bp \else \vskip 4bp \fi \@plus\p@
\setlength\@tempdima{4em}%
\begingroup
\parindent \z@ \rightskip \@pnumwidth
@@ -454,8 +456,13 @@
\def\thusetup{\kvsetkeys{thu}}
\newcommand\thu@underline[2][6em]{\hskip1pt\underline{\hb@xt@ #1{\hss#2\hss}}\hskip3pt}
\newlength{\thu@title@width}
-\newcommand{\thu@put@title}[2][\thu@title@width]{%
+\ifxetex % todo: ugly codes
+ \newcommand{\thu@put@title}[2][\thu@title@width]{%
\begin{CJKfilltwosides}[b]{#1}#2\end{CJKfilltwosides}}
+\else
+ \newcommand{\thu@put@title}[2][\thu@title@width]{%
+ \begin{CJKfilltwosides}{#1}#2\end{CJKfilltwosides}}
+\fi
\def\thu@first@titlepage{%
\ifthu@postdoctor\thu@first@titlepage@postdoctor\else\thu@first@titlepage@other\fi}
\newcommand{\thu@first@titlepage@postdoctor}{
@@ -511,14 +518,14 @@
\parbox[b][2.4cm][t]{\textwidth}{%
\ifthu@secret{\heiti\sanhao\thu@secretlevel\thu@secret@content}\else\rule{1cm}{0cm}\fi}
\ifthu@bachelor
- \vskip0.45cm
- {\includegraphics{tsinghua}}
+ \vskip0.65cm
+ {\yihao\lishu\ziju{0.5}\thu@schoolname}
\par\vskip1.5cm
- {\xiaochu\heiti\ziju{0.5}\thu@bachelor@subtitle}
- \vskip2.2cm
+ {\xiaochu\heiti\ziju{0.5}\textbf\thu@bachelor@subtitle}
+ \vskip2.2cm\hskip0.8cm
\noindent\heiti\xiaoer\thu@bachelor@title@pre\thu@title@sep
\parbox[t]{12cm}{%
- \ignorespaces\yihao[1.55]%
+ \ignorespaces\yihao[1.51]%
\renewcommand{\CJKunderlinebasesep}{0.25cm}%
\renewcommand{\ULthickness}{1.3pt}%
\ifxetex
@@ -533,21 +540,21 @@
\parbox[t][9cm][t]{\paperwidth-8cm}{
\renewcommand{\baselinestretch}{1.3}
\begin{center}
- \yihao[1.2]{\sffamily\heiti\thu@ctitle}\par%
+ \yihao[1.2]{\sffamily\thu@ctitle}\par%
\par\vskip 18bp%
\xiaoer[1]\textrm{\thu@apply}%
\end{center}}
\fi
\ifthu@bachelor
- \vskip1cm
+ \vskip0.75cm
\ifx\thu@cassosupervisor\@empty%
- \def\thu@tempa{7.0cm}
+ \def\thu@tempa{7.15cm}
\else%
- \def\thu@tempa{8.0cm}
+ \def\thu@tempa{8.15cm}
\fi%
\parbox[t][\thu@tempa][t]{\textwidth}{%
- {\fangsong\sanhao[1.8]%
- \hspace*{1.65cm}
+ {\fangsong\sanhao[1.95]%
+ \hspace*{1.9cm}
\setlength{\thu@title@width}{4em}
\setlength{\extrarowheight}{6pt}
\ifxetex % todo: ugly codes
@@ -600,7 +607,7 @@
\end{center}}}
\fi
\begin{center}
- {\ifthu@bachelor\vskip-1.0cm\hskip-1.2cm\xiaosi\else%
+ {\ifthu@bachelor\vskip-1.0cm\xiaosi\else%
\vskip-0.5cm\sanhao\fi%
\songti\thu@cdate}
\end{center}
@@ -746,7 +753,7 @@
\pagenumbering{Roman}
\thu@cabstract
\vskip12bp
- \thu@put@keywords{\heiti\thu@ckeywords@title}{\thu@ckeywords}
+ \thu@put@keywords{\textbf\thu@ckeywords@title}{\thu@ckeywords}
\thu@chapter*[]{\eabstractname} % no tocline
\thu@eabstract
\vskip12bp
@@ -798,7 +805,7 @@
{\thu@chapter*[]{\csname list#1name\endcsname}\thu@starttoc{#1}}
{\thu@chapter*{\csname list#1name\endcsname}\thu@starttoc{#1}}}
\renewcommand\listoffigures{\thu@listof{figure}}
-\renewcommand*\l@figure{\addvspace{6bp}\@dottedtocline{1}{0em}{4em}}
+\renewcommand*\l@figure{\ifthu@bachelor\relax\else\addvspace{6bp}\fi\@dottedtocline{1}{0em}{4em}}
\renewcommand\listoftables{\thu@listof{table}}
\let\l@table\l@figure
\def\ext@equation{loe}
@@ -807,36 +814,44 @@
{\protect\numberline{#1}}}
\newcommand\listofequations{\thu@listof{equation}}
\let\l@equation\l@figure
-\bibpunct{[}{]}{,}{s}{}{,}
-\renewcommand\NAT@citesuper[3]{\ifNAT@swa%
- \unskip\kern\p@\textsuperscript{\NAT@@open #1\NAT@@close}%
- \if*#3*\else\ (#3)\fi\else #1\fi\endgroup}
+\newcommand\bibstyle@inline{\bibpunct{[}{]}{,}{n}{,}{,}}
\DeclareRobustCommand\inlinecite{\@inlinecite}
\def\@inlinecite#1{\begingroup\let\@cite\NAT@citenum\citep{#1}\endgroup}
\let\onlinecite\inlinecite
-\def\thudot{\ifthu@bachelor\else\unskip.\fi}
-\renewenvironment{thebibliography}[1]{%
- \thu@chapter*{\bibname}%
- \wuhao[1.5]
- \list{\@biblabel{\@arabic\c@enumiv}}%
- {\renewcommand{\makelabel}[1]{##1\hfill}
- \settowidth\labelwidth{1.1cm}
- \setlength{\labelsep}{0.4em}
- \setlength{\itemindent}{0pt}
- \setlength{\leftmargin}{\labelwidth+\labelsep}
- \addtolength{\itemsep}{-0.7em}
- \usecounter{enumiv}%
- \let\p@enumiv\@empty
- \renewcommand\theenumiv{\@arabic\c@enumiv}}%
- \sloppy\frenchspacing
- \clubpenalty4000
- \@clubpenalty \clubpenalty
- \widowpenalty4000%
- \interlinepenalty4000%
- \sfcode`\.\@m}
- {\def\@noitemerr
- {\@latex@warning{Empty `thebibliography' environment}}%
- \endlist\frenchspacing}
+\renewcommand\bibsection{\thu@chapter*{\bibname}}
+\renewcommand\bibfont{\ifthu@bachelor\wuhao[1.619]\else\wuhao[1.5]\fi}
+\setlength\bibhang{2\ccwd}
+\addtolength{\bibsep}{-0.7em}
+\setlength{\labelsep}{0.4em}
+\expandafter\newcommand\csname bibstyle@numeric\endcsname{%
+ \bibpunct{[}{]}{,}{s}{,}{\textsuperscript{,}}}
+\expandafter\newcommand\csname bibstyle@author-year\endcsname{%
+ \bibpunct{(}{)}{;}{a}{,}{,}}
+\patchcmd\NAT@citexnum{%
+ \@ifnum{\NAT@ctype=\z@}{%
+ \if*#2*\else\NAT@cmt#2\fi
+ }{}%
+ \NAT@mbox{\NAT@@close}%
+}{%
+ \NAT@mbox{\NAT@@close}%
+ \@ifnum{\NAT@ctype=\z@}{%
+ \if*#2*\else\textsuperscript{#2}\fi
+ }{}%
+}{}{}
+\renewcommand\NAT@citesuper[3]{\ifNAT@swa
+ \if*#2*\else#2\NAT@spacechar\fi
+\unskip\kern\p@\textsuperscript{\NAT@@open#1\NAT@@close\if*#3*\else#3\fi}%
+ \else #1\fi\endgroup}
+\patchcmd{\NAT@citex}{%
+ \if*#2*\else\NAT@cmt#2\fi
+ \if\relax\NAT@date\relax\else\NAT@@close\fi
+}{%
+ \if\relax\NAT@date\relax\else\NAT@@close\fi
+ \if*#2*\else\textsuperscript{#2}\fi
+}{}{}
+\renewcommand\NAT@cite%
+ [3]{\ifNAT@swa\NAT@@open\if*#2*\else#2\NAT@spacechar\fi
+ #1\NAT@@close\if*#3*\else\textsuperscript{#3}\fi\else#1\fi\endgroup}
\let\thu@appendix\appendix
\renewenvironment{appendix}{%
\let\title\thu@appendix@title
@@ -845,7 +860,7 @@
\let\title\@gobble
\newcommand{\thu@appendix@title}[1]{%
\begin{center}
- \bfseries\xiaosi #1
+ \xiaosi[1.667] #1
\end{center}}
\newlist{translationbib}{enumerate}{1}
\setlist[translationbib]{label=[\arabic*],align=left,nosep,itemsep=6bp,
@@ -864,7 +879,9 @@
leftmargin=10mm,labelsep=!,before=\xiaosi[1.26]}
\def\publicationskip{\bigskip\bigskip}
\NewDocumentCommand{\shuji}{O{\thu@ctitle} O{\thu@cauthor}}{%
- \newpage\thispagestyle{empty}\fangsong\xiaosan\ziju{0.4}%
+ \newpage\thispagestyle{empty}%
+ \fangsong\ifxetex\addCJKfontfeatures*{RawFeature={vertical:}}\fi
+ \xiaosan\ziju{0.4}%
\noindent\hfill\rotatebox[origin=lt]{-90}{\makebox[\textheight]{#1\hfill#2}}}
\AtEndOfClass{\input{thuthesis.cfg}}
\AtEndOfClass{\sloppy}