summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/thuthesis
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-12-24 23:08:08 +0000
committerKarl Berry <karl@freefriends.org>2015-12-24 23:08:08 +0000
commit21c374dac3e9da7af20b033b1356184556c0cb89 (patch)
tree006bb1542cfc82912d2d05613def55bec556145a /Master/texmf-dist/tex/latex/thuthesis
parentb0887a408058ad36d79cda138316ce8840398c8f (diff)
thuthesis (24dec15)
git-svn-id: svn://tug.org/texlive/trunk@39192 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/thuthesis')
-rw-r--r--Master/texmf-dist/tex/latex/thuthesis/ctex-fontset-thuthesis.def (renamed from Master/texmf-dist/tex/latex/thuthesis/thufonts.def)15
-rw-r--r--Master/texmf-dist/tex/latex/thuthesis/thuthesis.cfg50
-rw-r--r--Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls577
-rw-r--r--Master/texmf-dist/tex/latex/thuthesis/thuthesis.sty (renamed from Master/texmf-dist/tex/latex/thuthesis/thutils.sty)2
4 files changed, 321 insertions, 323 deletions
diff --git a/Master/texmf-dist/tex/latex/thuthesis/thufonts.def b/Master/texmf-dist/tex/latex/thuthesis/ctex-fontset-thuthesis.def
index c7a619ed07a..5f7b4c59cee 100644
--- a/Master/texmf-dist/tex/latex/thuthesis/thufonts.def
+++ b/Master/texmf-dist/tex/latex/thuthesis/ctex-fontset-thuthesis.def
@@ -1,17 +1,16 @@
-% vim: set ft=tex:
-% This file is modified from ctex's ctex-xecjk-winfonts.def.
+% This file is auto-generated by zhfonts.py script
+
+\ProvidesFile{ctex-fontset-thuthesis.def}
-\ProvidesFile{thufonts.def}
\setCJKmainfont[BoldFont={SimHei},ItalicFont={KaiTi}]{SimSun}
\setCJKsansfont{SimHei}
-\setCJKmonofont{FangSong}
-
+\setCJKmonofont{KaiTi}
\setCJKfamilyfont{zhsong}{SimSun}
\setCJKfamilyfont{zhhei}{SimHei}
\setCJKfamilyfont{zhkai}{KaiTi}
\setCJKfamilyfont{zhfs}{FangSong}
-\setCJKfamilyfont{zhli}{LiSu}
-\setCJKfamilyfont{zhyou}{YouYuan}
+\setCJKfamilyfont{zhli}{STLiti}
+\setCJKfamilyfont{zhyou}{Yuanti SC}
\newcommand*{\songti}{\CJKfamily{zhsong}}
\newcommand*{\heiti}{\CJKfamily{zhhei}}
@@ -19,3 +18,5 @@
\newcommand*{\fangsong}{\CJKfamily{zhfs}}
\newcommand*{\lishu}{\CJKfamily{zhli}}
\newcommand*{\youyuan}{\CJKfamily{zhyou}}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cfg b/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cfg
index f5477c83dac..2de98c9384f 100644
--- a/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cfg
+++ b/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cfg
@@ -8,7 +8,7 @@
%%
%% This is a generated file.
%%
-%% Copyright (C) 2005-2014 by Xue Ruini <xueruini@gmail.com>
+%% Copyright (C) 2005-2015 by Xue Ruini <xueruini@gmail.com>
%%
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3a
@@ -20,12 +20,10 @@
%% and version 1.3a or later is part of all distributions of LaTeX
%% version 2004/10/01 or later.
%%
-%%
%% This is the configuration file of the thuthesis package with LaTeX2e.
%%
-
\ProvidesFile{thuthesis.cfg}
-[2014/12/09 4.8.1 Tsinghua University Thesis Template]
+[2015/12/24 5.0 Tsinghua University Thesis Template]
\theoremsymbol{\ensuremath{\square}}
\newtheorem*{proof}{证明}
\theoremstyle{plain}
@@ -43,39 +41,31 @@
\newtheorem{remark}{注释}[chapter]
\newtheorem{problem}{问题}[chapter]
\newtheorem{conjecture}{猜想}[chapter]
-\renewcommand\contentsname{目\hspace{1em}录}
-\renewcommand\listfigurename{插图索引}
-\renewcommand\listtablename{表格索引}
+\ctexset{%
+ chapter/name={第,章},
+ appendixname=附录,
+ contentsname={目\hspace{\ccwd}录},
+ listfigurename=插图索引,
+ listtablename=表格索引,
+ figurename=图,
+ tablename=表,
+ bibname=参考文献,
+ indexname=索引,
+}
\newcommand\listequationname{公式索引}
\newcommand\equationname{公式}
-\renewcommand\bibname{参考文献}
-\renewcommand\indexname{索引}
-\renewcommand\figurename{图}
-\renewcommand\tablename{表}
-\newcommand\CJKprepartname{第}
-\newcommand\CJKpartname{部分}
-\CTEXnumber{\thu@thepart}{\@arabic\c@part}
-\newcommand\CJKthepart{\thu@thepart}
-\newcommand\CJKprechaptername{第}
-\newcommand\CJKchaptername{章}
-\newcommand\CJKthechapter{\@arabic\c@chapter}
-\renewcommand\chaptername{\CJKprechaptername~\CJKthechapter~\CJKchaptername}
-\renewcommand\appendixname{附录}
\ifthu@bachelor
\newcommand{\cabstractname}{中文摘要}
\newcommand{\eabstractname}{ABSTRACT}
\else
- \newcommand{\cabstractname}{摘\hspace{1em}要}
+ \newcommand{\cabstractname}{摘\hspace{\ccwd}要}
\newcommand{\eabstractname}{Abstract}
\fi
\let\CJK@todaysave=\today
\def\CJK@todaysmall@short{\the\year 年 \the\month 月}
-\def\CJK@todaysmall{\CJK@todaysmall@short \the\day 日}
-\CTEXdigits{\thu@CJK@year}{\the\year}
-\CTEXnumber{\thu@CJK@month}{\the\month}
-\CTEXnumber{\thu@CJK@day}{\the\day}
-\def\CJK@todaybig@short{\thu@CJK@year{}年\thu@CJK@month{}月}
-\def\CJK@todaybig{\CJK@todaybig@short{}\thu@CJK@day{}日}
+\def\CJK@todaysmall{\the\year 年 \the\month 月 \the\day 日}
+\def\CJK@todaybig@short{\zhdigits{\the\year}年\zhnumber{\the\month}月}
+\def\CJK@todaybig{\zhdigits{\the\year}年\zhnumber{\the\month}月\zhnumber{\the\day}日}
\def\CJK@today{\CJK@todaysmall}
\renewcommand\today{\CJK@today}
\newcommand\CJKtoday[1][1]{%
@@ -175,7 +165,11 @@
\ifthu@bachelor
\newcommand{\thu@resume@title}{在学期间参加课题的研究成果}
\else
- \newcommand{\thu@resume@title}{个人简历、在学期间发表的学术论文与研究成果}
+ \ifthu@postdoctor
+ \newcommand{\thu@resume@title}{个人简历、发表的学术论文与科研成果}
+ \else
+ \newcommand{\thu@resume@title}{个人简历、在学期间发表的学术论文与研究成果}
+ \fi
\fi
\endinput
%%
diff --git a/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls b/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls
index a9382e445bd..ff65bda19c3 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-2014 by Ruini Xue <xueruini@gmail.com>
+%% Copyright (C) 2005-2015 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
@@ -23,69 +23,90 @@
%% To produce the documentation run the original source files ending with `.dtx'
%% through LaTeX.
%%
-
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesClass{thuthesis}
-[2014/12/09 4.8.1 Tsinghua University Thesis Template]
+[2015/12/24 5.0 Tsinghua University Thesis Template]
\hyphenation{Thu-Thesis}
\def\thuthesis{\textsc{ThuThesis}}
\def\version{4.8.1}
-\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@arial
-\DeclareOption{arial}{\thu@arialtrue}
-\newif\ifthu@arialtoc
-\DeclareOption{arialtoc}{\thu@arialtoctrue}
-\newif\ifthu@arialtitle
-\DeclareOption{arialtitle}{\thu@arialtitletrue}
-\newif\ifthu@raggedbottom\thu@raggedbottomtrue
-\DeclareOption{noraggedbottom}{\thu@raggedbottomfalse}
-\DeclareOption*{\PassOptionsToClass{\CurrentOption}{ctexbook}}
-\ExecuteOptions{utf,arialtitle}
-\ProcessOptions\relax
-\LoadClass[cs4size,a4paper,openany,nocap,UTF8]{ctexbook}
+
+\RequirePackage{kvoptions}
+\SetupKeyvalOptions{
+ family=thu,
+ prefix=thu@,
+ setkeys=\kvsetkeys}
+\newif\ifthu@bachelor
+\newif\ifthu@master
+\newif\ifthu@doctor
+\newif\ifthu@postdoctor
+\define@key{thu}{type}{%
+ \thu@bachelorfalse
+ \thu@masterfalse
+ \thu@doctorfalse
+ \thu@postdoctorfalse
+ \expandafter\csname thu@#1true\endcsname}
+
+\def\thu@deprecated@type@option{%
+ \setkeys{thu}{type=\CurrentOption} % for compatability.
+ \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}
+
+\DeclareBoolOption{secret}
+\DeclareBoolOption{arial}
+\DeclareBoolOption{arialtoc}
+\DeclareBoolOption{arialtitle}
+\DeclareBoolOption{raggedbottom}
+\DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{ctexbook}}
+\setkeys{thu}{%
+ type=bachelor,
+ raggedbottom,
+ arial,
+ arialtitle}
+
+\ProcessKeyvalOptions*
+\PassOptionsToPackage{no-math}{fontspec}
+\LoadClass[a4paper,openany,UTF8,zihao=-4,scheme=plain,fontset=none]{ctexbook}
\ifthu@bachelor\relax\else
\ifthu@master\relax\else
\ifthu@doctor\relax\else
\ifthu@postdoctor\relax\else
\ClassError{thuthesis}%
- {You have to specify one of thesis options: bachelor, master or doctor.}{}
+ {Please specify thesis type in option: \MessageBreak
+ type=[bachelor | master | doctor | postdoctor]}{}
\fi
\fi
\fi
\fi
\RequirePackage{ifxetex}
-\RequirePackage{ifthen,calc}
+\RequirePackage{xparse}
\RequirePackage{amsmath}
\RequirePackage{txfonts}
\RequirePackage{graphicx}
\RequirePackage[labelformat=simple]{subcaption}
-\RequirePackage[neverdecrease]{paralist}
+\RequirePackage{pdfpages}
+\includepdfset{fitpaper=true}
+\RequirePackage[shortlabels]{enumitem}
\ifthu@raggedbottom
- \RequirePackage[bottom]{footmisc}
+ \RequirePackage[bottom,perpage]{footmisc}
\raggedbottom
+\else
+ \RequirePackage[perpage]{footmisc}
\fi
\ifthu@bachelor
\RequirePackage{CJKfntef}
\fi
-\renewcommand{\baselinestretch}{1.0}
+\renewcommand{\baselinestretch}{1.0} % todo:?
\ifxetex
- \xeCJKsetup{AutoFakeBold=true,AutoFakeSlant=true}
- \punctstyle{quanjiao}
% todo: minor fix of CJKnumb
\def\CJK@null{\kern\CJKnullspace\Unicode{48}{7}\kern\CJKnullspace}
\defaultfontfeatures{Mapping=tex-text} % use TeX --
- \ifCTEX@nofonts
- \input{thufonts.def}
- \fi
+ \IfFileExists{ctex-fontset-thuthesis.def}%
+ {\ctexset{fontset=thuthesis}}%
+ {\ctexset{fontset=windows}}
\setmainfont{Times New Roman}
\setsansfont{Arial}
@@ -119,9 +140,34 @@
breaklinks=true,
colorlinks=false,
plainpages=false,
- pdfpagelabels,
pdfborder=0 0 0}
\urlstyle{same}
+\RequirePackage{geometry}
+\geometry{
+ a4paper, % 210 * 297mm
+ hcentering,
+ ignoreall,
+ nomarginpar}
+\ifthu@bachelor
+ \geometry{
+ left=32mm,
+ headsep=5mm,
+ textheight=220mm,
+ bottom=37mm,
+ footskip=17mm}
+\else
+ \geometry{
+ left=30mm,
+ headsep=5mm,
+ textheight=237mm,
+ bottom=29mm,
+ footskip=6mm}
+\fi
+\RequirePackage{fancyhdr}
+\let\thu@cleardoublepage\cleardoublepage
+\newcommand{\thu@clearemptydoublepage}{%
+ \clearpage{\pagestyle{empty}\thu@cleardoublepage}}
+\let\cleardoublepage\thu@clearemptydoublepage
\renewcommand\frontmatter{%
\if@openright\cleardoublepage\else\clearpage\fi
\@mainmatterfalse
@@ -139,110 +185,54 @@
\newcommand{\thu@choosefont}[2]{%
\setlength{\thu@linespace}{#2*\real{#1}}%
\fontsize{#2}{\thu@linespace}\selectfont}
-\def\thu@define@fontsize#1#2{%
+\def\thu@def@fontsize#1#2{%
\expandafter\newcommand\csname #1\endcsname[1][\baselinestretch]{%
\thu@choosefont{##1}{#2}}}
-\thu@define@fontsize{chuhao}{42bp}
-\thu@define@fontsize{xiaochu}{36bp}
-\thu@define@fontsize{yihao}{26bp}
-\thu@define@fontsize{xiaoyi}{24bp}
-\thu@define@fontsize{erhao}{22bp}
-\thu@define@fontsize{xiaoer}{18bp}
-\thu@define@fontsize{sanhao}{16bp}
-\thu@define@fontsize{xiaosan}{15bp}
-\thu@define@fontsize{sihao}{14bp}
-\thu@define@fontsize{banxiaosi}{13bp}
-\thu@define@fontsize{xiaosi}{12bp}
-\thu@define@fontsize{dawu}{11bp}
-\thu@define@fontsize{wuhao}{10.5bp}
-\thu@define@fontsize{xiaowu}{9bp}
-\thu@define@fontsize{liuhao}{7.5bp}
-\thu@define@fontsize{xiaoliu}{6.5bp}
-\thu@define@fontsize{qihao}{5.5bp}
-\thu@define@fontsize{bahao}{5bp}
+\thu@def@fontsize{chuhao}{42bp}
+\thu@def@fontsize{xiaochu}{36bp}
+\thu@def@fontsize{yihao}{26bp}
+\thu@def@fontsize{xiaoyi}{24bp}
+\thu@def@fontsize{erhao}{22bp}
+\thu@def@fontsize{xiaoer}{18bp}
+\thu@def@fontsize{sanhao}{16bp}
+\thu@def@fontsize{xiaosan}{15bp}
+\thu@def@fontsize{sihao}{14bp}
+\thu@def@fontsize{banxiaosi}{13bp}
+\thu@def@fontsize{xiaosi}{12bp}
+\thu@def@fontsize{dawu}{11bp}
+\thu@def@fontsize{wuhao}{10.5bp}
+\thu@def@fontsize{xiaowu}{9bp}
+\thu@def@fontsize{liuhao}{7.5bp}
+\thu@def@fontsize{xiaoliu}{6.5bp}
+\thu@def@fontsize{qihao}{5.5bp}
+\thu@def@fontsize{bahao}{5bp}
\renewcommand\normalsize{%
\@setfontsize\normalsize{12bp}{20bp}
- \abovedisplayskip=10bp \@plus 2bp \@minus 2bp
- \abovedisplayshortskip=10bp \@plus 2bp \@minus 2bp
+ \abovedisplayskip=20bp \@plus 2bp \@minus 2bp
+ \abovedisplayshortskip=20bp \@plus 2bp \@minus 2bp
\belowdisplayskip=\abovedisplayskip
\belowdisplayshortskip=\abovedisplayshortskip}
-\AtBeginDvi{\special{papersize=\the\paperwidth,\the\paperheight}}
-\AtBeginDvi{\special{!%
- \@percentchar\@percentchar BeginPaperSize: a4
- ^^Ja4^^J\@percentchar\@percentchar EndPaperSize}}
-\setlength{\textwidth}{\paperwidth}
-\setlength{\textheight}{\paperheight}
-\setlength\marginparwidth{0cm}
-\setlength\marginparsep{0cm}
-\ifthu@bachelor
- \addtolength{\textwidth}{-6.4cm}
- \setlength{\topmargin}{2.8cm-1in}
- \setlength{\oddsidemargin}{3.2cm-1in}
- \setlength{\footskip}{1.78cm}
- \setlength{\headsep}{0.6cm}
- \addtolength{\textheight}{-7.8cm}
-\else
- \addtolength{\textwidth}{-6cm}
- \setlength{\topmargin}{2.2cm-1in}
- \setlength{\oddsidemargin}{3cm-1in}
- \setlength{\footskip}{0.6cm}
- \setlength{\headsep}{0.2cm}
- \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}}
-\let\cleardoublepage\thu@clearemptydoublepage
-\def\ps@thu@empty{%
- \let\@oddhead\@empty%
- \let\@evenhead\@empty%
- \let\@oddfoot\@empty%
- \let\@evenfoot\@empty}
-\def\ps@thu@plain{%
- \let\@oddhead\@empty%
- \let\@evenhead\@empty%
- \def\@oddfoot{\hfil\xiaowu\thepage\hfil}%
- \let\@evenfoot=\@oddfoot}
-\def\ps@thu@headings{%
- \def\@oddhead{\vbox to\headheight{%
- \hb@xt@\textwidth{\hfill\wuhao\songti\leftmark\ifthu@bachelor\relax\else\hfill\fi}%
- \vskip2pt\hbox{\vrule width\textwidth height0.4pt depth0pt}}}
- \def\@evenhead{\vbox to\headheight{%
- \hb@xt@\textwidth{\wuhao\songti%
- \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}
- \let\@evenfoot=\@oddfoot}
-\renewcommand{\chaptermark}[1]{\@mkboth{\@chapapp\ ~~#1}{}}
-\setlength{\parskip}{0pt \@plus2pt \@minus0pt}
-\def\thu@item@space{%
- \let\itemize\compactitem
- \let\enditemize\endcompactitem
- \let\enumerate\compactenum
- \let\endenumerate\endcompactenum
- \let\description\compactdesc
- \let\enddescription\endcompactdesc}
-\newcommand*\MakePerPage[2][\@ne]{%
- \expandafter\def\csname c@pchk@#2\endcsname{\c@pchk@{#2}{#1}}%
- \newcounter{pcabs@#2}%
- \@addtoreset{pchk@#2}{#2}}
-\def\new@pagectr#1{\@newl@bel{pchk@#1}}
-\def\c@pchk@#1#2{\z@=\z@
- \begingroup
- \expandafter\let\expandafter\next\csname pchk@#1@\arabic{pcabs@#1}\endcsname
- \addtocounter{pcabs@#1}\@ne
- \expandafter\ifx\csname pchk@#1@\arabic{pcabs@#1}\endcsname\next
- \else \setcounter{#1}{#2}\fi
- \protected@edef\next{%
- \string\new@pagectr{#1}{\arabic{pcabs@#1}}{\noexpand\thepage}}%
- \protected@write\@auxout{}{\next}%
- \endgroup\global\z@}
-\MakePerPage{footnote}
+\fancypagestyle{thu@empty}{%
+ \fancyhf{}
+ \renewcommand{\headrulewidth}{0pt}
+ \renewcommand{\footrulewidth}{0pt}}
+\fancypagestyle{thu@plain}{%
+ \fancyhead{}
+ \fancyfoot[C]{\xiaowu\thepage}
+ \renewcommand{\headrulewidth}{0pt}
+ \renewcommand{\footrulewidth}{0pt}}
+\fancypagestyle{thu@headings}{%
+ \fancyhead{}
+ \fancyhead[C]{\wuhao\songti\leftmark}
+ \fancyfoot{}
+ \fancyfoot[C]{\wuhao\thepage}
+ \renewcommand{\headrulewidth}{0.4pt}
+ \renewcommand{\footrulewidth}{0pt}}
+\ctexset{%
+ punct=quanjiao,
+ space=auto,
+ autoindent=true}
+\setlist{nosep}
\def\thu@textcircled#1{%
\ifnum \value{#1} <10 \textcircled{\xiaoliu\arabic{#1}}
\else\ifnum \value{#1} <100 \textcircled{\qihao\arabic{#1}}\fi
@@ -292,11 +282,11 @@
\fi
\@endparenv
\fi #1}
-\theorembodyfont{\songti\rmfamily}
-\theoremheaderfont{\heiti\rmfamily}
-\setlength{\floatsep}{12bp \@plus4pt \@minus1pt}
-\setlength{\intextsep}{12bp \@plus4pt \@minus2pt}
-\setlength{\textfloatsep}{12bp \@plus4pt \@minus2pt}
+\theorembodyfont{\rmfamily\songti}
+\theoremheaderfont{\rmfamily\heiti}
+\setlength{\floatsep}{20bp \@plus4pt \@minus1pt}
+\setlength{\intextsep}{20bp \@plus4pt \@minus2pt}
+\setlength{\textfloatsep}{20bp \@plus4pt \@minus2pt}
\setlength{\@fptop}{0bp \@plus1.0fil}
\setlength{\@fpsep}{12bp \@plus2.0fil}
\setlength{\@fpbot}{0bp \@plus1.0fil}
@@ -304,6 +294,10 @@
\renewcommand{\topfraction}{0.85}
\renewcommand{\bottomfraction}{0.65}
\renewcommand{\floatpagefraction}{0.60}
+\ifthu@bachelor
+ \g@addto@macro\appendix{\renewcommand*{\thefigure}{\thechapter-\arabic{figure}}}
+ \g@addto@macro\appendix{\renewcommand*{\thetable}{\thechapter-\arabic{table}}}
+\fi
\let\old@tabular\@tabular
\def\thu@tabular{\dawu[1.5]\old@tabular}
\DeclareCaptionLabelFormat{thu}{{\dawu[1.5]\songti #1~\rmfamily #2}}
@@ -320,98 +314,86 @@
\def\hlinewd#1{%
\noalign{\ifnum0=`}\fi\hrule \@height #1 \futurelet
\reserved@a\@xhline}
-\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}
-\def\@chapter[#1]#2{%
- \ifnum \c@secnumdepth >\m@ne
- \if@mainmatter
- \refstepcounter{chapter}%
- \addcontentsline{toc}{chapter}{\protect\numberline{\@chapapp}#1}%TODO: shit
- \else
- \addcontentsline{toc}{chapter}{#1}%
- \fi
- \else
- \addcontentsline{toc}{chapter}{#1}%
- \fi
- \chaptermark{#1}%
- \@makechapterhead{#2}}
-\def\@makechapterhead#1{%
- \ifthu@bachelor\vspace*{24bp}\else\vspace*{20bp}\fi%
- {\parindent \z@ \centering
- \csname thu@title@font\endcsname\heiti\ifthu@bachelor\xiaosan\else\sanhao[1]\fi
- \ifnum \c@secnumdepth >\m@ne
- \@chapapp\hskip1em
- \fi
- #1\par\nobreak
- \ifthu@bachelor\vskip 20bp\else\vskip 24bp\fi}}
-\def\@schapter#1{%
- \@makeschapterhead{#1}
- \@afterheading}
-\def\@makeschapterhead#1{%
- \ifthu@bachelor\vspace*{30bp}\else\vspace*{20bp}\fi%
- {\parindent \z@ \centering
- \csname thu@title@font\endcsname\heiti\sanhao[1]
- \ifthu@bachelor\xiaosan\else
- \def\@tempa{#1}
- \def\@tempb{\eabstractname}
- \ifx\@tempa\@tempb\bfseries\fi
- \fi
- \interlinepenalty\@M
- #1\par\nobreak
- \ifthu@bachelor\vskip 20bp\else\vskip 24bp\fi}}
+\def\thu@title@font{%
+ \ifthu@arialtitle\sffamily\else\relax\fi}
+\AtBeginDocument{%
+ \pagestyle{thu@empty}
+ \renewcommand{\chaptermark}[1]{\@mkboth{\CTEXthechapter\hskip\ccwd#1}{}}}
+\newcommand\thu@chapter@titleformat[1]{%
+ \ifthu@bachelor #1\else%
+ \ifthenelse%
+ {\equal{#1}{\eabstractname}}%
+ {\bfseries #1}%
+ {#1}%
+ \fi}
+\ctexset{%
+ chapter={
+ afterindent=true,
+ pagestyle={\ifthu@bachelor thu@plain\else thu@headings\fi},
+ beforeskip={\ifthu@bachelor 13bp\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},
+ nameformat=\relax,
+ numberformat=\relax,
+ titleformat=\thu@chapter@titleformat,
+ },
+ 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]},
+ },
+ 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},
+ },
+ 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]},
+ },
+ paragraph/afterindent=true,
+ subparagraph/afterindent=true}
\newcounter{thu@bookmark}
-\def\thu@chapter*{%
- \@ifnextchar [ % ]
- {\thu@@chapter}
- {\thu@@chapter@}}
-\def\thu@@chapter@#1{\thu@@chapter[#1]{#1}}
-\def\thu@@chapter[#1]#2{%
- \@ifnextchar [ % ]
- {\thu@@@chapter[#1]{#2}}
- {\thu@@@chapter[#1]{#2}[]}}
-\def\thu@@@chapter[#1]#2[#3]{%
- \if@openright\cleardoublepage\else\clearpage\fi
- \phantomsection
- \def\@tmpa{#1}
- \def\@tmpb{#3}
- \ifx\@tmpa\@empty
- \addtocounter{thu@bookmark}\@ne
- \pdfbookmark[0]{#2}{thuchapter.\thethu@bookmark}
- \else
- \addcontentsline{toc}{chapter}{#1}
- \fi
- \chapter*{#2}
- \ifx\@tmpb\@empty
- \@mkboth{#2}{#2}
- \else
+\NewDocumentCommand\thu@chapter{s o m o}{
+ \IfBooleanF{#1}
+ {%
+ \ClassError{thuthesis}{You have to use the star form: \string\thu@chapter*}{}
+ }
+
+ \IfValueTF{#2}
+ {%
+ \ifthenelse{\equal{#2}{}}
+ {%
+ \addtocounter{thu@bookmark}\@ne
+ \pdfbookmark[0]{#3}{thuchapter.\thethu@bookmark}
+ }
+ {%
+ \addcontentsline{toc}{chapter}{#3}
+ }
+ }
+ {%
+ \addcontentsline{toc}{chapter}{#3}
+ }
+
+ \chapter*{#3}%\phantomsection
+
+ \IfValueTF{#4}
+ {%
+ \ifthenelse{\equal{#4}{}}
+ {\@mkboth{}{}}
+ {\@mkboth{#4}{#4}}
+ }
+ {%
\@mkboth{#3}{#3}
- \fi}
-\renewcommand\section{\@startsection {section}{1}{\z@}%
- {\ifthu@bachelor -25bp\else -24bp\fi\@plus -1ex \@minus -.2ex}%
- {\ifthu@bachelor 12bp\else 6bp\fi \@plus .2ex}%
- {\csname thu@title@font\endcsname\heiti\sihao[1.429]}}
-\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
- {\ifthu@bachelor -12bp\else -16bp\fi\@plus -1ex \@minus -.2ex}%
- {6bp \@plus .2ex}%
- {\csname thu@title@font\endcsname\heiti\ifthu@bachelor\xiaosi[1.667]\else\banxiaosi[1.538]\fi}}
-\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
- {\ifthu@bachelor -12bp\else -16bp\fi\@plus -1ex \@minus -.2ex}%
- {6bp \@plus .2ex}%
- {\csname thu@title@font\endcsname\heiti\xiaosi[1.667]}}
+ }
+}
\setcounter{secnumdepth}{3}
-\ifthu@doctor
- \setcounter{tocdepth}{2}
-\else
- \setcounter{tocdepth}{3}
-\fi
+\setcounter{tocdepth}{2}
\renewcommand\tableofcontents{%
\thu@chapter*[]{\contentsname}
\ifthu@bachelor\xiaosi[1.8]\else\xiaosi[1.65]\fi\@starttoc{toc}\normalsize}
@@ -452,45 +434,45 @@
\penalty\@highpenalty
\endgroup
\fi}
-\renewcommand*\l@section{\@dottedtocline{1}{\ifthu@bachelor 1.0em\else 1.2em\fi}{2.1em}}
-\renewcommand*\l@subsection{\@dottedtocline{2}{\ifthu@bachelor 1.6em\else 2em\fi}{3em}}
+\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@define@term#1{
+\def\thu@def@term#1{
\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}
-\thu@define@term{cdegree}
+\thu@def@term{catalognumber}
+\thu@def@term{udc}
+\thu@def@term{id}
+\thu@def@term{secretlevel}
+\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
\def\thu@cdepartment@short{}
\def\thu@cdepartment{}
-\thu@define@term{cmajor}
+\thu@def@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}
+\thu@def@term{cfirstdiscipline}
+\thu@def@term{cseconddiscipline}
+\thu@def@term{cauthor}
+\thu@def@term{csupervisor}
+\thu@def@term{cassosupervisor}
+\thu@def@term{ccosupervisor}
+\thu@def@term{cdate}
+\thu@def@term{postdoctordate}
+\thu@def@term{etitle}
+\thu@def@term{edegree}
+\thu@def@term{edepartment}
\def\eaffil{\edepartment} % todo: for compability
-\thu@define@term{emajor}
+\thu@def@term{emajor}
\def\esubject{\emajor} % todo: for compability
-\thu@define@term{eauthor}
-\thu@define@term{esupervisor}
-\thu@define@term{eassosupervisor}
-\thu@define@term{ecosupervisor}
-\thu@define@term{edate}
+\thu@def@term{eauthor}
+\thu@def@term{esupervisor}
+\thu@def@term{eassosupervisor}
+\thu@def@term{ecosupervisor}
+\thu@def@term{edate}
\long\@xp\def\@xp\collect@@body\@xp#\@xp1\@xp\end\@xp#\@xp2\@xp{%
\collect@@body{#1}\end{#2}}
\long\@xp\def\@xp\push@begins\@xp#\@xp1\@xp\begin\@xp#\@xp2\@xp{%
@@ -520,7 +502,7 @@
\newcommand{\thu@first@titlepage@postdoctor}{
\begin{center}
\setlength{\thu@title@width}{3em}
- \vspace*{1cm}
+ \vspace*{0.7cm}
\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
@@ -558,7 +540,7 @@
\newcommand*{\getcmlength}[1]{\strip@pt\dimexpr0.035146\dimexpr#1\relax\relax}
\newcommand{\thu@first@titlepage@other}{
\begin{center}
- \vspace*{-1.3cm}
+ \vspace*{-1.6cm}
\parbox[b][2.4cm][t]{\textwidth}{%
\ifthu@secret\hfill{\sihao\thu@secretlevel\thu@secret@content}\else\rule{1cm}{0cm}\fi}
\ifthu@bachelor
@@ -572,8 +554,12 @@
\ignorespaces\yihao[1.55]%
\renewcommand{\CJKunderlinebasesep}{0.25cm}%
\renewcommand{\ULthickness}{1.3pt}%
- \def\CJKunderlinecolor{}%
- \CJKunderline*{\thu@ctitle}}
+ \ifxetex
+ \xeCJKsetup{underline/format=\color{black}}%
+ \else
+ \def\CJKunderlinecolor{\color{black}}%
+ \fi
+ \CJKunderline*{\thu@ctitle}}%
\vskip1.3cm
\else
\vskip0.8cm
@@ -647,7 +633,7 @@
\ifx\thu@edegree\thu@doctor@phi\relax\else
\thu@professionaltrue\fi\fi
\begin{center}
- \vspace*{0.2cm}
+ \vspace*{-5pt}
\parbox[t][5.2cm][t]{\paperwidth-7.2cm}{
\renewcommand{\baselinestretch}{1.5}
\begin{center}
@@ -696,7 +682,7 @@
\end{center}}
\end{center}}
\newcommand{\thu@authorization@mk}{%
- \ifthu@bachelor\vspace*{0.5cm}\else\vspace*{0.72cm}\fi % shit code!
+ \ifthu@bachelor\vspace*{0.2cm}\else\vspace*{0.42cm}\fi % shit code!
\begin{center}\erhao\heiti\thu@authtitle\end{center}
\ifthu@bachelor\vskip5pt\else\vskip40pt\sihao[2.03]\fi\par
\thu@authorization\par
@@ -714,7 +700,7 @@
\thu@frontdate\thu@underline[7em]\relax\hspace*{1cm}
\endgroup
\fi}
-\newcommand{\makecover}{
+\NewDocumentCommand{\makecover}{o}{
\phantomsection
\pdfbookmark[-1]{\thu@ctitle}{ctitle}
\normalsize%
@@ -726,15 +712,20 @@
\fi\fi
\ifthu@postdoctor\relax\else%
\ifthu@bachelor\clearpage\else\cleardoublepage\fi%
- \ifthu@bachelor\thu@authorization@mk\else%
- \begin{list}{}{%
- \topsep\z@%
- \listparindent\parindent%
- \parsep\parskip%
- \setlength{\leftmargin}{0.9mm}%
- \setlength{\rightmargin}{0.9mm}}%
- \item[]\thu@authorization@mk%
- \end{list}\fi%
+ \IfNoValueTF{#1}{%
+ \ifthu@bachelor\thu@authorization@mk\else%
+ \begin{list}{}{%
+ \topsep\z@%
+ \listparindent\parindent%
+ \parsep\parskip%
+ \setlength{\leftmargin}{0.9mm}%
+ \setlength{\rightmargin}{0.9mm}}%
+ \item[]\thu@authorization@mk%
+ \end{list}%
+ \fi%
+ }{%
+ \includepdf{#1}%
+ }%
\fi
\end{titlepage}
\normalsize
@@ -775,15 +766,21 @@
\setlength{\listparindent}{0cm} % 段落缩进量
\setlength{\topsep}{0pt} % 标签与上文的间距
}}{\end{list}}
-\newenvironment{ack}{%
+\NewDocumentEnvironment{ack}{o}{%
\thu@chapter*{\thu@ackname}
}
{
\ifthu@postdoctor\relax\else%
- \thu@chapter*{\thu@declarename}
- \par{\xiaosi\parindent2em\thu@declaretext}\vskip2cm
- {\xiaosi\hfill\thu@signature\thu@underline[2.5cm]\relax%
- \thu@backdate\thu@underline[2.5cm]\relax}%
+ \IfNoValueTF{#1}{%
+ \thu@chapter*{\thu@declarename}
+ \par{\xiaosi\parindent2em\thu@declaretext}\vskip2cm
+ {\xiaosi\hfill\thu@signature\thu@underline[2.5cm]\relax%
+ \thu@backdate\thu@underline[2.5cm]\relax}%
+ }{%
+ \includepdf[pagecommand={\thispagestyle{thu@empty}%
+ \phantomsection\addcontentsline{toc}{chapter}{\thu@declarename}%
+ }]{#1}%
+ }%
\fi
}
\def\thu@starttoc#1{% #1: float type, prepend type name in \listof*** entry.
@@ -796,7 +793,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{\@dottedtocline{1}{0em}{4em}}
+\renewcommand*\l@figure{\addvspace{6bp}\@dottedtocline{1}{0em}{4em}}
\renewcommand\listoftables{\thu@listof{table}}
\let\l@table\l@figure
\def\ext@equation{loe}
@@ -809,8 +806,9 @@
\renewcommand\NAT@citesuper[3]{\ifNAT@swa%
\unskip\kern\p@\textsuperscript{\NAT@@open #1\NAT@@close}%
\if*#3*\else\ (#3)\fi\else #1\fi\endgroup}
-\DeclareRobustCommand\onlinecite{\@onlinecite}
-\def\@onlinecite#1{\begingroup\let\@cite\NAT@citenum\citep{#1}\endgroup}
+\DeclareRobustCommand\inlinecite{\@inlinecite}
+\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}
@@ -839,15 +837,20 @@
\let\thu@appendix\appendix
\renewenvironment{appendix}{%
\thu@appendix
- \gdef\@chapapp{\appendixname~\thechapter}
- %\renewcommand\theequation{\ifnum \c@chapter>\z@ \thechapter-\fi\@arabic\c@equation}
}{}
\newenvironment{resume}[1][\thu@resume@title]{%
\thu@chapter*{#1}}{}
-\newcommand{\resumeitem}[1]{\vspace{24pt}{\sihao\heiti\centerline{#1}}\par\vspace{6pt}}
-\newcommand{\shuji}[1][\thu@ctitle]{
- \newpage\thispagestyle{empty}\fangsong\xiaosan\ziju{0.4}
- \hfill\rotatebox{-90}{\hb@xt@ \textheight{#1\hfill\thu@cauthor}}}
+\newcommand{\resumeitem}[1]{\vspace{24bp}{\sihao\heiti\centerline{#1}}\par\vspace{6bp}}
+\newcommand{\researchitem}[1]{\vspace{32bp}{\sihao\heiti\centerline{#1}}\par\vspace{14bp}}
+\newlist{publications}{enumerate}{1}
+\setlist[publications]{label=[\arabic*],align=left,nosep,itemsep=8bp,
+leftmargin=10mm,labelsep=!,before*=\xiaosi[1.26],after*=\vspace{29bp},resume}
+\newlist{achievements}{enumerate}{1}
+\setlist[achievements]{label=[\arabic*],align=left,nosep,itemsep=8bp,
+leftmargin=10mm,labelsep=!,before*=\xiaosi[1.26]}
+\NewDocumentCommand{\shuji}{O{\thu@ctitle} O{\thu@cauthor}}{%
+ \newpage\thispagestyle{empty}\fangsong\xiaosan\ziju{0.4}%
+ \noindent\hfill\rotatebox[origin=lt]{-90}{\makebox[\textheight]{#1\hfill#2}}}
\iffalse
\newcommand{\bs}{\symbol{'134}}%Print backslash
\newcommand{\cih}[1]{%
@@ -874,7 +877,7 @@
pdfkeywords={\thu@ckeywords},
pdfcreator={\thu@cauthor},
pdfproducer={\thuthesis}}}
-\AtEndOfClass{\sloppy\thu@item@space}
+\AtEndOfClass{\sloppy}
\endinput
%%
%% End of file `thuthesis.cls'.
diff --git a/Master/texmf-dist/tex/latex/thuthesis/thutils.sty b/Master/texmf-dist/tex/latex/thuthesis/thuthesis.sty
index 62a3229d0fb..2ac69daec37 100644
--- a/Master/texmf-dist/tex/latex/thuthesis/thutils.sty
+++ b/Master/texmf-dist/tex/latex/thuthesis/thuthesis.sty
@@ -1,4 +1,4 @@
-\ProvidesPackage{thutils}[2007/11/30 4.1 put any packages you would like to use here]
+\ProvidesPackage{thuthesis}[2007/11/30 4.1 put any packages you would like to use here]
% 处理数学公式中的黑斜体的宏包
%\RequirePackage{bm}