summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-09-09 20:57:31 +0000
committerKarl Berry <karl@freefriends.org>2020-09-09 20:57:31 +0000
commit4a264bf091040319f9bc0a0564729de3a3bfdb11 (patch)
tree02bc05d3a123693f37f4ae758d7c16aa330edeef /Master/texmf-dist/tex
parent736754172b88861049bf28a4e4b381af4f42a4af (diff)
thuthesis (9sep20)
git-svn-id: svn://tug.org/texlive/trunk@56305 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/thuthesis/thuthesis-author-year.bbx20
-rw-r--r--Master/texmf-dist/tex/latex/thuthesis/thuthesis-author-year.cbx4
-rw-r--r--Master/texmf-dist/tex/latex/thuthesis/thuthesis-bachelor.bbx26
-rw-r--r--Master/texmf-dist/tex/latex/thuthesis/thuthesis-bachelor.cbx4
-rw-r--r--Master/texmf-dist/tex/latex/thuthesis/thuthesis-inline.cbx18
-rw-r--r--Master/texmf-dist/tex/latex/thuthesis/thuthesis-numeric.bbx27
-rw-r--r--Master/texmf-dist/tex/latex/thuthesis/thuthesis-numeric.cbx4
-rw-r--r--Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls1086
8 files changed, 907 insertions, 282 deletions
diff --git a/Master/texmf-dist/tex/latex/thuthesis/thuthesis-author-year.bbx b/Master/texmf-dist/tex/latex/thuthesis/thuthesis-author-year.bbx
new file mode 100644
index 00000000000..47ec9ea8154
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/thuthesis/thuthesis-author-year.bbx
@@ -0,0 +1,20 @@
+\ProvidesFile{thuthesis-author-year.bbx}[2020/08/01 v1.0 ThuThesis biblatex
+ bibliography style]
+
+\RequireBibliographyStyle{gb7714-2015ay}
+
+\ExecuteBibliographyOptions{
+ gbnamefmt = lowercase,
+ gbpub = false,
+ gbalign = left,
+}
+
+\defbibenvironment{bibliography}
+ {\list
+ {}
+ {\setlength{\leftmargin}{\bibhang}%
+ \setlength{\itemindent}{-\leftmargin}%
+ \setlength{\itemsep}{\bibitemsep}%
+ \setlength{\parsep}{\bibparsep}}}
+ {\endlist}
+ {\item}
diff --git a/Master/texmf-dist/tex/latex/thuthesis/thuthesis-author-year.cbx b/Master/texmf-dist/tex/latex/thuthesis/thuthesis-author-year.cbx
new file mode 100644
index 00000000000..ae664e64eb6
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/thuthesis/thuthesis-author-year.cbx
@@ -0,0 +1,4 @@
+\ProvidesFile{thuthesis-author-year.cbx}[2020/08/01 v1.0 ThuThesis biblatex
+ citation style]
+
+\RequireCitationStyle{gb7714-2015ay}
diff --git a/Master/texmf-dist/tex/latex/thuthesis/thuthesis-bachelor.bbx b/Master/texmf-dist/tex/latex/thuthesis/thuthesis-bachelor.bbx
new file mode 100644
index 00000000000..88bb38a8b59
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/thuthesis/thuthesis-bachelor.bbx
@@ -0,0 +1,26 @@
+\ProvidesFile{thuthesis-bachelor.bbx}[2020/08/01 v1.0 ThuThesis biblatex
+ bibliography style]
+
+\RequireBibliographyStyle{gb7714-2015}
+
+\ExecuteBibliographyOptions{
+ gbpub = false,
+ gbalign = left,
+}
+
+\defbibenvironment{bibliography}
+ {\list
+ {\printtext[labelnumberwidth]{%
+ \printfield{labelprefix}%
+ \printfield{labelnumber}}}
+ {\addtolength{\labelnumberwidth}{\biblabelextend}%
+ \setlength{\labelwidth}{0.9cm}%
+ \setlength{\labelsep}{\biblabelsep}%
+ \setlength{\leftmargin}{\labelwidth}%
+ \addtolength{\leftmargin}{\labelsep}%
+ \setlength{\itemindent}{\bibitemindent}%
+ \setlength{\itemsep}{\bibitemsep}%
+ \setlength{\parsep}{\bibparsep}}%
+ \renewcommand*{\makelabel}[1]{\hss##1}}
+ {\endlist}
+ {\item}
diff --git a/Master/texmf-dist/tex/latex/thuthesis/thuthesis-bachelor.cbx b/Master/texmf-dist/tex/latex/thuthesis/thuthesis-bachelor.cbx
new file mode 100644
index 00000000000..acb8a10c949
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/thuthesis/thuthesis-bachelor.cbx
@@ -0,0 +1,4 @@
+\ProvidesFile{thuthesis-bachelor.cbx}[2020/08/01 v1.0 ThuThesis biblatex
+ citation style]
+
+\RequireCitationStyle{gb7714-2015}
diff --git a/Master/texmf-dist/tex/latex/thuthesis/thuthesis-inline.cbx b/Master/texmf-dist/tex/latex/thuthesis/thuthesis-inline.cbx
new file mode 100644
index 00000000000..bec04d1d44e
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/thuthesis/thuthesis-inline.cbx
@@ -0,0 +1,18 @@
+\ProvidesFile{thuthesis-inline.cbx}[2020/08/01 v1.0 ThuThesis biblatex
+ citation style]
+
+\RequireCitationStyle{gb7714-2015}
+
+\ExecuteBibliographyOptions{
+ autocite = inline ,
+}
+
+\DeclareCiteCommand{\cite}%[\mkbibbrackets]
+ {[\usebibmacro{cite:init}%]
+ \usebibmacro{prenote}}%
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite:comp}}
+ {}
+ {%[
+ \usebibmacro{cite:dump}]%
+ \mkbibsuperscript{\printfield{postnote}}}
diff --git a/Master/texmf-dist/tex/latex/thuthesis/thuthesis-numeric.bbx b/Master/texmf-dist/tex/latex/thuthesis/thuthesis-numeric.bbx
new file mode 100644
index 00000000000..f0d6234effa
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/thuthesis/thuthesis-numeric.bbx
@@ -0,0 +1,27 @@
+\ProvidesFile{thuthesis-numeric.bbx}[2020/08/01 v1.0 ThuThesis biblatex
+ bibliography style]
+
+\RequireBibliographyStyle{gb7714-2015}
+
+\ExecuteBibliographyOptions{
+ gbnamefmt = lowercase,
+ gbpub = false,
+ gbalign = left,
+}
+
+\defbibenvironment{bibliography}
+ {\list
+ {\printtext[labelnumberwidth]{%
+ \printfield{labelprefix}%
+ \printfield{labelnumber}}}
+ {\addtolength{\labelnumberwidth}{\biblabelextend}%
+ \setlength{\labelwidth}{0.9cm}%
+ \setlength{\labelsep}{\biblabelsep}%
+ \setlength{\leftmargin}{\labelwidth}%
+ \addtolength{\leftmargin}{\labelsep}%
+ \setlength{\itemindent}{\bibitemindent}%
+ \setlength{\itemsep}{\bibitemsep}%
+ \setlength{\parsep}{\bibparsep}}%
+ \renewcommand*{\makelabel}[1]{\hss##1}}
+ {\endlist}
+ {\item}
diff --git a/Master/texmf-dist/tex/latex/thuthesis/thuthesis-numeric.cbx b/Master/texmf-dist/tex/latex/thuthesis/thuthesis-numeric.cbx
new file mode 100644
index 00000000000..d13887bf262
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/thuthesis/thuthesis-numeric.cbx
@@ -0,0 +1,4 @@
+\ProvidesFile{thuthesis-numeric.cbx}[2020/08/01 v1.0 ThuThesis biblatex
+ citation style]
+
+\RequireCitationStyle{gb7714-2015}
diff --git a/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls b/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls
index 57ae1d27078..0c9a916bb9d 100644
--- a/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls
+++ b/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls
@@ -23,13 +23,16 @@
%%
\NeedsTeXFormat{LaTeX2e}[2017/04/15]
\ProvidesClass{thuthesis}
-[2020/07/09 6.1.3 Tsinghua University Thesis Template]
+[2020/09/09 7.0.0 Tsinghua University Thesis Template]
\newcommand\thu@error[1]{%
\ClassError{thuthesis}{#1}{}%
}
\newcommand\thu@warning[1]{%
\ClassWarning{thuthesis}{#1}%
}
+\newcommand\thu@patch@error[1]{%
+ \thu@error{Failed to patch command \protect#1}%
+}
\@ifl@t@r\fmtversion{2017/04/15}{}{
\thu@error{%
TeX Live 2017 or later version is required to compile this document%
@@ -39,9 +42,12 @@
\ifXeTeX\else
\thu@error{XeLaTeX is required to compile this document}
\fi
+\InputIfFileExists{thuthesis-pdf-test-config.tex}{}{
+ \InputIfFileExists{thuthesis-log-test-config.tex}{}{}
+}
\hyphenation{Thu-Thesis}
\def\thuthesis{ThuThesis}
-\def\version{6.1.3}
+\def\version{7.0.0}
\RequirePackage{kvdefinekeys}
\RequirePackage{kvsetkeys}
\RequirePackage{kvoptions}
@@ -122,6 +128,13 @@
},
name = degree@type,
},
+ main-language = {
+ name = main@language,
+ choices = {
+ chinese,
+ english,
+ },
+ },
language = {
choices = {
chinese,
@@ -217,6 +230,7 @@
\PassOptionsToPackage{quiet}{fontspec}
\LoadClass[a4paper,UTF8,zihao=-4,scheme=plain,fontset=none]{ctexbook}[2017/04/01]
\RequirePackage{etoolbox}
+\RequirePackage{filehook}
\RequirePackage{xparse}
\RequirePackage{geometry}%
\RequirePackage{fancyhdr}
@@ -237,12 +251,22 @@
\RequirePackage[perpage,hang]{footmisc}
\fi
\RequirePackage{xeCJKfntef}
+\RequirePackage{soul}
\RequirePackage{array}
\RequirePackage{booktabs}
-\RequirePackage[sort&compress]{natbib}
-\RequirePackage{bibunits}
\RequirePackage{url}
-\RequirePackage{filehook}
+\AtEndPreamble{
+ \@ifpackageloaded{biblatex}{}{
+ \@ifpackageloaded{apacite}{}{
+ \RequirePackage{natbib}
+ }
+ }
+}
+\AtEndOfPackageFile*{natbib}{
+ \@ifpackageloaded{apacite}{}{
+ \RequirePackage{bibunits}
+ }
+}
\newcommand\thu@package@conflict[2]{
\AtBeginOfPackageFile*{#2}{
\thu@error{The "#2" package is incompatible with required "#1"}
@@ -257,9 +281,9 @@
\thu@package@conflict{unicode-math}{eufrak}
\thu@package@conflict{unicode-math}{mathrsfs}
\geometry{
- a4paper, % 210 * 297mm
+ paper = a4paper, % 210 * 297mm
marginparwidth = 2cm,
- marginparsep = 0.5cm
+ marginparsep = 0.5cm,
}
\newcommand\thu@set@geometry{%
\ifthu@degree@bachelor
@@ -314,7 +338,6 @@
\cleardoublepage
\@mainmatterfalse
\pagenumbering{Roman}%
- \let\@tabular\thu@tabular
}
\renewcommand\mainmatter{%
\cleardoublepage
@@ -327,7 +350,8 @@
\else
\clearpage
\fi
- \@mainmattertrue}
+ \@mainmatterfalse
+}
\ifthu@fontset@mac
\thusetup{
font = times,
@@ -715,69 +739,91 @@
\thu@def@fontsize{xiaoliu}{6.5bp}
\thu@def@fontsize{qihao}{5.5bp}
\thu@def@fontsize{bahao}{5bp}
+\thusetup{main-language=\thu@language}%
\let\thu@main@language\thu@language
\thu@option@hook{language}{%
\ifx\@begindocumenthook\@undefined\else
+ \thusetup{main-language=\thu@language}%
\let\thu@main@language\thu@language
\fi
}
-\newcommand\thu@reset@main@language{
- \thusetup{language = \thu@main@language}
+\newcommand\thu@reset@main@language{%
+ \thusetup{language = \thu@main@language}%
+ \let\thu@language\thu@main@language
}
\newcommand\thu@set@chapter@names{%
- \ifthu@language@chinese
+ \ifthu@main@language@chinese
\ctexset{
chapter/name = {第,章},
- appendixname = 附录,
- contentsname = 目\hspace{\ccwd}录,
- listfigurename = 插图索引,
- listtablename = 表格索引,
- bibname = 参考文献,
- indexname = 索引,
}%
- \def\thu@denotation@name{主要符号对照表}%
- \def\thu@list@algorithm@name{算法索引}%
- \def\listequationname{公式索引}%
+ \def\bibname{参考文献}%
+ \def\appendixname{附录}%
+ \def\indexname{索引}%
\def\thu@acknowledgements@name{致\hspace{\ccwd}谢}%
\ifthu@degree@bachelor
+ \def\contentsname{目\hspace{\ccwd}录}%
+ \def\listfigurename{插图索引}%
+ \def\listtablename{表格索引}%
+ \def\thu@list@figure@table@name{插图和附表索引}%
+ \def\thu@list@algorithm@name{算法索引}%
+ \def\listequationname{公式索引}%
+ \def\thu@denotation@name{主要符号对照表}%
\def\thu@resume@name{在学期间参加课题的研究成果}%
\else
- \ifthu@degree@postdoc
+ \def\listfigurename{插图清单}%
+ \def\listtablename{附表清单}%
+ \def\thu@list@figure@table@name{插图和附表清单}%
+ \def\thu@list@algorithm@name{算法清单}%
+ \def\listequationname{公式清单}%
+ \ifthu@degree@graduate
+ \def\contentsname{目\hspace{\ccwd}录}%
+ \def\thu@toc@contents@name{目录}%
+ \def\thu@denotation@name{符号和缩略语说明}%
+ \def\thu@resume@name{个人简历、在学期间完成的相关学术成果}%
+ \else % degree = postdoc
+ \def\contentsname{目\hspace{2\ccwd}次}%
+ \def\thu@denotation@name{符号表}%
\def\thu@resume@name{个人简历、发表的学术论文与科研成果}%
- \else
- \def\thu@resume@name{个人简历、在学期间发表的学术论文与研究成果}%
\fi
\fi
\else
- \ifthu@language@english
+ \ifthu@main@language@english
\ctexset{
chapter/name = \chaptername\space,
- appendixname = Appendix,
- contentsname = Contents,
- listfigurename = List of Figures,
- listtablename = List of Tables,
- bibname = Bibliography,
- indexname = Index,
}%
- \def\thu@denotation@name{Nomenclature}%
- \def\thu@list@algorithm@name{List of Algorithms}%
- \def\listequationname{List of Equations}%
- \def\thu@acknowledgements@name{Acknowledgements}%
+ \def\indexname{Index}%
\ifthu@degree@bachelor
- \def\thu@resume@name{Research Achievements}%
+ \def\contentsname{CONTENTS}%
+ \def\listfigurename{FIGURES}%
+ \def\listtablename{TABLES}%
+ \def\thu@list@figure@table@name{FIGURES AND TABLES}%
+ \def\thu@list@algorithm@name{ALGORITHMS}%
+ \def\listequationname{EQUATIONS}%
+ \def\thu@denotation@name{ABBREVIATIONS}%
+ \def\bibname{REFERENCES}%
+ \def\appendixname{APPENDIX}%
+ \def\thu@acknowledgements@name{ACKNOWLEDGEMENTS}%
+ \def\thu@resume@name{PUBLICATIONS}%
\else
- \def\thu@resume@name{Resume, Publications and Research Achievements}%
+ \def\contentsname{Contents}%
+ \def\thu@toc@contents@name{Contents}%
+ \def\listfigurename{List of Figures}%
+ \def\listtablename{List of Tables}%
+ \def\thu@list@figure@table@name{List of Figures and Tables}%
+ \def\thu@list@algorithm@name{List of Algorithms}%
+ \def\listequationname{List of Equations}%
+ \def\thu@denotation@name{Nomenclature}%
+ \def\bibname{Bibliography}%
+ \def\appendixname{Appendix}%
+ \def\thu@acknowledgements@name{Acknowledgements}%
+ \def\thu@resume@name{Resume and Academic Achievements}%
\fi
\fi
\fi
}
\thu@set@chapter@names
\thu@option@hook{degree}{\thu@set@chapter@names}
-\thu@option@hook{language}{%
- \ifx\@begindocumenthook\@undefined\else
- \thu@set@chapter@names
- \fi
-}
+\thu@option@hook{main-language}{\thu@set@chapter@names}
\newcommand\thu@set@names{%
\ifthu@language@chinese
\ctexset{
@@ -850,24 +896,47 @@
\renewcommand\footrulewidth{0pt}%
\ifthu@degree@bachelor
\renewcommand\headrulewidth{0pt}%
- \fancyfoot[C]{\xiaowu\thepage}%
+ \fancyfoot[C]{
+ \ifthu@main@language@chinese
+ \xiaowu
+ \else
+ \normalsize
+ \fi
+ \thepage
+ }%
\let\@mkboth\@gobbletwo
+ \let\chaptermark\@gobble
\else
\renewcommand\headrulewidth{0.75bp}%
\fancyhead[C]{\wuhao\leftmark}%
\fancyfoot[C]{\wuhao\thepage}%
\let\@mkboth\markboth
+ \def\chaptermark##1{%
+ \markboth{\CTEXifname{\CTEXthechapter\hskip\ccwd}{}##1}{}%
+ }%
\fi
- \def\chaptermark##1{%
- \markboth{\CTEXifname{\CTEXthechapter\hskip\ccwd}{}##1}{}%
- }%
+ \let\sectionmark\@gobble
}
\pagestyle{plain}
\ctexset{chapter/pagestyle = plain}
\ctexset{%
punct=quanjiao,
space=auto,
- autoindent=true}
+}
+\newcommand\thu@set@indent{%
+ \ifthu@main@language@english
+ \ifthu@degree@bachelor
+ \ctexset{autoindent=0.8cm}%
+ \else
+ \ctexset{autoindent=2}%
+ \fi
+ \else
+ \ctexset{autoindent=2}%
+ \fi
+}
+\thu@set@indent
+\thu@option@hook{degree}{\thu@set@indent}
+\thu@option@hook{main-language}{\thu@set@indent}
\setlist{nosep}
\def\thu@textcircled#1{%
\ifnum\value{#1} >10\relax
@@ -959,14 +1028,18 @@
\renewcommand{\topfraction}{0.85}
\renewcommand{\bottomfraction}{0.65}
\renewcommand{\floatpagefraction}{0.60}
+\patchcmd\@floatboxreset{%
+ \normalsize
+}{%
+ \fontsize{11bp}{14.3bp}\selectfont
+ \renewcommand\arraystretch{1.2}%
+}{}{\thu@patch@error{\@floatboxreset}}
\ifthu@degree@bachelor
\AtBeginDocument{% delay the check until all packages are loaded
\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}
\DeclareCaptionFont{thu}{\dawu}
\DeclareCaptionLabelSeparator{thu}{\hspace{\ccwd}}
\captionsetup{
@@ -993,50 +1066,117 @@
\newcommand{\thu@abstract@name}{摘\hspace{\ccwd}要}
\newcommand{\thu@abstract@name@en}{Abstract}
\fi
-\newcommand\thu@chapter@titleformat[1]{%
- \ifthu@degree@bachelor #1\else%
- \ifthenelse%
- {\equal{#1}{\thu@abstract@name@en}}%
- {\bfseries #1}%
- {#1}%
- \fi}
\ctexset{%
- chapter={
- afterindent=true,
- beforeskip={\ifthu@degree@bachelor 15bp\else 9bp\fi},
- aftername=\hskip\ccwd,
- afterskip={\ifthu@degree@bachelor 20bp\else 24bp\fi},
- format={\centering\sffamily\ifthu@degree@bachelor\xiaosan[1.333]\else\sanhao[1]\fi},
- nameformat=\relax,
- numberformat=\relax,
- titleformat=\thu@chapter@titleformat,
- lofskip=0pt,
- lotskip=0pt,
+ chapter = {
+ nameformat = {},
+ numberformat = {},
+ titleformat = {},
+ aftername = \quad,
+ fixskip = true,
+ afterindent = true,
+ lofskip = 0pt,
+ lotskip = 0pt,
},
- section={
- afterindent=true,
- beforeskip={\ifthu@degree@bachelor 25bp\else 24bp\fi\@plus 1ex \@minus .2ex},
- afterskip={\ifthu@degree@bachelor 12bp\else 6bp\fi \@plus .2ex},
- format={\sffamily\ifthu@degree@bachelor\sihao[1.286]\else\sihao[1.429]\fi},
+ section = {
+ aftername = \quad,
+ afterindent = true,
},
- subsection={
- afterindent=true,
- beforeskip={\ifthu@degree@bachelor 12bp\else 16bp\fi\@plus 1ex \@minus .2ex},
- afterskip={6bp \@plus .2ex},
- format={\sffamily\ifthu@degree@bachelor\xiaosi[1.25]\else\banxiaosi[1.538]\fi},
- numberformat={\sffamily\ifthu@degree@bachelor\banxiaosi[1.154]\else\banxiaosi[1.538]\fi},
+ subsection = {
+ aftername = \quad,
+ afterindent = true,
},
- subsubsection={
- afterindent=true,
- beforeskip={\ifthu@degree@bachelor 12bp\else 16bp\fi\@plus 1ex \@minus .2ex},
- afterskip={6bp \@plus .2ex},
- format={\sffamily\ifthu@degree@bachelor\xiaosi[1.25]\else\xiaosi[1.667]\fi},
+ subsubsection = {
+ aftername = \quad,
+ afterindent = true,
},
- paragraph/afterindent=true,
- subparagraph/afterindent=true}
+ paragraph/afterindent = true,
+ subparagraph/afterindent = true,
+}
+\newcommand\thu@set@section@format{%
+ \ifthu@degree@bachelor
+ \ctexset{%
+ chapter = {
+ format = \centering\sffamily\fontsize{15bp}{20bp}\selectfont,
+ beforeskip = 30bp,
+ afterskip = 20bp,
+ },
+ section = {
+ format = \sffamily\fontsize{14bp}{18bp}\selectfont,
+ beforeskip = 25bp,
+ afterskip = 12bp,
+ },
+ subsection = {
+ format = \sffamily\fontsize{13bp}{15bp}\selectfont,
+ beforeskip = 12bp,
+ afterskip = 6bp,
+ },
+ subsubsection = {
+ format = \sffamily\fontsize{12bp}{14bp}\selectfont,
+ beforeskip = 12bp,
+ afterskip = 6bp,
+ },
+ }%
+ \ifthu@main@language@chinese
+ \ctexset{chapter/number = \thechapter}%
+ \else
+ \ctexset{chapter/number = \thu@english@number{chapter}}%
+ \fi
+ \else
+ \ctexset{%
+ chapter = {
+ format = \centering\sffamily\sanhao,
+ beforeskip = 32bp,
+ afterskip = 32bp,
+ },
+ section = {
+ format = \sffamily\fontsize{14bp}{20bp}\selectfont,
+ beforeskip = 24bp,
+ afterskip = 6bp,
+ },
+ subsection = {
+ format = \sffamily\fontsize{13bp}{20bp}\selectfont,
+ beforeskip = 12bp,
+ afterskip = 6bp,
+ },
+ subsubsection = {
+ format = \sffamily\fontsize{12bp}{20bp}\selectfont,
+ beforeskip = 12bp,
+ afterskip = 6bp,
+ },
+ }%
+ \fi
+}
+\thu@set@section@format
+\thu@option@hook{degree}{\thu@set@section@format}
+\newcommand\thu@english@number[1]{%
+ \expandafter\ifcase\csname c@#1\endcsname
+ Zero\or
+ One\or
+ Two\or
+ Three\or
+ Four\or
+ Five\or
+ Six\or
+ Seven\or
+ Eight\or
+ Nine\or
+ Ten\or
+ Eleven\or
+ Twelve\or
+ Thirteen\or
+ Fourteen\or
+ Fifteen\or
+ Sixteen\or
+ Seventeen\or
+ Eighteen\or
+ Nineteen\or
+ Twenty\or
+ \thu@error{You are genius}%
+ \fi
+}
\newcommand\thu@pdfbookmark[2]{}
\newcommand\thu@phantomsection{}
-\NewDocumentCommand\thu@chapter{s o m o}{
+\NewDocumentCommand\thu@chapter{s o m o}{%
\IfBooleanF{#1}{%
\thu@error{You have to use the star form: \string\thu@chapter*}%
}%
@@ -1046,15 +1186,15 @@
\thu@pdfbookmark{0}{#3}%
}{%
\thu@phantomsection
- \addcontentsline{toc}{chapter}{#3}%
+ \addcontentsline{toc}{chapter}{#2}%
}%
}{%
\thu@phantomsection
\addcontentsline{toc}{chapter}{#3}%
}%
- \ifthu@degree@bachelor\ctexset{chapter/beforeskip=25bp}\fi
+ \ifthu@degree@bachelor\ctexset{chapter/beforeskip=40bp}\fi
\chapter*{#3}%
- \ifthu@degree@bachelor\ctexset{chapter/beforeskip=15bp}\fi
+ \ifthu@degree@bachelor\ctexset{chapter/beforeskip=30bp}\fi
\IfValueTF{#4}{%
\ifthenelse{\equal{#4}{}}{%
\@mkboth{}{}%
@@ -1068,7 +1208,11 @@
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{2}
\renewcommand\tableofcontents{%
- \thu@chapter*[]{\contentsname}%
+ \ifthu@degree@graduate
+ \thu@chapter*[\thu@toc@contents@name]{\contentsname}%
+ \else
+ \thu@chapter*[]{\contentsname}%
+ \fi
\@starttoc{toc}%
}
\thu@define@key{
@@ -1085,36 +1229,59 @@
\newcommand\thu@set@toc@format{%
\contentsmargin{\z@}%
\ifthu@degree@bachelor
+ \ifthu@main@language@chinese
+ \titlecontents{chapter}
+ [\z@]{\addvspace{6bp}
+ \ifthu@toc@chapter@style@arial
+ \sffamily
+ \else
+ \heiti
+ \fi
+ }
+ {\contentspush{\thecontentslabel\quad}}{}
+ {\rmfamily\thu@leaders\thecontentspage}%
+ \titlecontents{section}
+ [1em]{}
+ {\contentspush{\thecontentslabel\quad}}{}
+ {\thu@leaders\thecontentspage}%
+ \titlecontents{subsection}
+ [1.5em]{}
+ {\contentspush{\thecontentslabel\quad}}{}
+ {\thu@leaders\thecontentspage}%
+ \else
+ \ifthu@main@language@english
+ \titlecontents{chapter}
+ [\z@]{\addvspace{6bp}\sffamily}
+ {\contentspush{\thecontentslabel\quad}}{}
+ {\rmfamily\thu@leaders\thecontentspage}%
+ \titlecontents{section}
+ [0.5cm]{}
+ {\contentspush{\thecontentslabel\quad}}{}
+ {\thu@leaders\thecontentspage}%
+ \titlecontents{subsection}
+ [1cm]{}
+ {\contentspush{\thecontentslabel\quad}}{}
+ {\thu@leaders\thecontentspage}%
+ \fi
+ \fi
+ \else
\titlecontents{chapter}
[\z@]{\addvspace{6bp}
- \ifthu@toc@chapter@style@arial
- \sffamily
- \else
+ \ifthu@main@language@chinese
\heiti
+ \else
+ \sffamily
\fi
}
- {\contentspush{\thecontentslabel\hspace{\ccwd}}}{}
- {\rmfamily\thu@leaders\thecontentspage}%
- \titlecontents{section}
- [1\ccwd]{}
- {\contentspush{\thecontentslabel\hspace{\ccwd}}}{}
- {\thu@leaders\thecontentspage}%
- \titlecontents{subsection}
- [1.5\ccwd]{}
- {\contentspush{\thecontentslabel\hspace{\ccwd}}}{}
- {\thu@leaders\thecontentspage}%
- \else
- \titlecontents{chapter}
- [\z@]{\addvspace{6bp}\sffamily}
- {\contentspush{\thecontentslabel\hspace{\ccwd}}}{}
+ {\contentspush{\thecontentslabel\quad}}{}
{\rmfamily\thu@leaders\thecontentspage}%
\titlecontents{section}
- [1\ccwd]{}
- {\contentspush{\thecontentslabel\hspace{\ccwd}}}{}
+ [1em]{}
+ {\contentspush{\thecontentslabel\quad}}{}
{\thu@leaders\thecontentspage}%
\titlecontents{subsection}
- [2\ccwd]{}
- {\contentspush{\thecontentslabel\hspace{\ccwd}}}{}
+ [2em]{}
+ {\contentspush{\thecontentslabel\quad}}{}
{\thu@leaders\thecontentspage}%
\fi
}
@@ -1290,6 +1457,7 @@
\clearpage
}
\newcommand\thu@titlepage{%
+ \thusetup{language = chinese}%
\ifthu@degree@graduate
\ifthu@degree@type@academic
\thu@titlepage@graduate@academic
@@ -1311,6 +1479,7 @@
\fi
\fi
\fi
+ \thu@reset@main@language
}
\newcommand\thu@titlepage@graduate@academic{%
\newgeometry{
@@ -1473,11 +1642,13 @@
hmargin = 3.6cm,
}%
\thispagestyle{empty}%
+ \thusetup{language = english}%
\ifthu@degree@type@academic
\thu@titlepage@en@graduate@academic
\else
\thu@titlepage@en@graduate@professional
\fi
+ \thu@reset@main@language
\clearpage
\restoregeometry
}
@@ -1580,63 +1751,75 @@
hmargin = 3.17cm,
}%
\thispagestyle{empty}%
- \null\vskip 0.44cm%
\begingroup
\centering
- \parbox[t][2cm][t]{\textwidth}{%
+ \parbox[t][0cm][t]{\textwidth}{%
\hfill
- \sffamily\CJKfamily+{}\xiaosi
- \ifx\thu@secret@level\@empty
- \phantom{秘密}%
- \else
- \thu@secret@level\makebox[3em][c]{\thu@secret@year}年%
- \fi\par
- }\par
- \begingroup
- \includegraphics{tsinghua-name-bachelor.pdf}%
- \par
- \endgroup
+ \CJKfamily+{}\xiaosi
+ \ifx\thu@secret@level\@empty\else
+ \thu@secret@level\space\thu@secret@year 年\par
+ \fi
+ }%
+ \endgroup
+ \vfill
+ \begingroup
+ \centering
+ \includegraphics{tsinghua-name-bachelor.pdf}%
\vskip 0.94cm%
{\sffamily\bfseries\xiaochu\ziju{0.5}综合论文训练\par}%
- \vskip 2.3cm%
- \parbox[t][2.4cm][t]{\textwidth}{%
- \heiti\xiaoer[1.56]%
- \parindent=2em%
- \hangindent=5em%
- \makebox[3em][l]{题目:}%
+ \endgroup
+ \vskip 1.8cm%
+ \begingroup
+ \heiti
+ \ifthu@main@language@chinese
\yihao[1.56]%
- \CJKunderline[skip=false, thickness=0.05em, depth=0.12em]{\thu@title}\par
- }\par
- \vskip 2.5cm%
- \begingroup
- \fangsong\sanhao[2.3]%
- \leftskip=2.5cm%
- \parindent=\z@
- \def\thu@info@item##1##2##3{%
- \ifx##3\@empty\else
- \thu@fixed@box{%
- \ifx\thu@joint@supervisor\@empty
- 4em%
- \else
- 5.5em%
- \fi
- }{##1}:##2{##3}\\
- \fi
- }%
- \def\thu@name@title@format##1##2{%
- \thu@stretch{3em}{##1}\quad ##2%
- }
- \thu@info@item{系别}{}{\thu@department}%
- \thu@info@item{专业}{}{\thu@discipline}%
- \thu@info@item{姓名}{\thu@name@title}{\thu@author}%
- \thu@info@item{指导教师}{\thu@name@title}{\thu@supervisor}%
- \thu@info@item{辅导教师}{\thu@name@title}{\thu@associate@supervisor}%
- \thu@info@item{联合指导教师}{\thu@name@title}{\thu@joint@supervisor}%
- \par
- \endgroup
- \vskip 1.5cm%
+ \else
+ \fontsize{26bp}{32bp}\selectfont
+ \fi
+ \parindent=18bp%
+ \hangindent=72bp%
+ \makebox[54bp]{\xiaoer[1.2]题目:}%
+ \CJKunderline*[skip=false, thickness=0.05em, depth=0.12em]{\thu@title}%
+ \ifthu@main@language@english
+ \\
+ \thusetup{language=english}%
+ \ul\thu@title@en
+ \thusetup{language=chinese}%
+ \fi
+ \par
+ \endgroup
+ \vskip 1.9cm%
+ \begingroup
+ \fangsong\sanhao[2.32]%
+ \leftskip=2.5cm%
+ \parindent=\z@
+ \def\thu@info@item##1##2##3{%
+ \ifx##3\@empty\else
+ \thu@fixed@box{%
+ \ifx\thu@joint@supervisor\@empty
+ 4em%
+ \else
+ 5.5em%
+ \fi
+ }{##1}:##2{##3}\par
+ \fi
+ }%
+ \def\thu@name@title@format##1##2{%
+ \thu@stretch{3em}{##1}\quad ##2%
+ }%
+ \thu@info@item{系别}{}{\thu@department}%
+ \thu@info@item{专业}{}{\thu@discipline}%
+ \thu@info@item{姓名}{\thu@name@title}{\thu@author}%
+ \thu@info@item{指导教师}{\thu@name@title}{\thu@supervisor}%
+ \thu@info@item{辅导教师}{\thu@name@title}{\thu@associate@supervisor}%
+ \thu@info@item{联合指导教师}{\thu@name@title}{\thu@joint@supervisor}%
+ \endgroup
+ \vskip 1.4cm%
+ \begingroup
+ \centering
{\CJKfamily+{}\xiaosi\thu@format@date{\thu@date@zh@digit}{\thu@date}\par}%
\endgroup
+ \vfill
\clearpage
\restoregeometry
}
@@ -1710,26 +1893,60 @@
{\wuhao\thu@format@date{\thu@date@zh@digit@short}{\thu@date}\par}%
\end{center}%
}
+\def\thu@committee@name{学位论文指导小组、公开评阅人和答辩委员会名单}
+\newenvironment{committee}[1][]{%
+ \cleardoublepage
+ \let\thu@committee@file\@empty
+ \kv@define@key{thu@committee}{name}{\let\thu@committee@name\kv@value}%
+ \kv@define@key{thu@committee}{file}{\let\thu@committee@file\kv@value}%
+ \kv@set@family@handler{thu@committee}{%
+ \ifx\kv@value\relax
+ \let\thu@committee@file\kv@key
+ \else
+ \kv@handled@false
+ \fi
+ }%
+ \kvsetkeys{thu@committee}{#1}%
+ \ifx\thu@committee@file\@empty
+ \thu@chapter*[]{\thu@committee@name}%
+ \else
+ \thu@pdfbookmark{0}{\thu@committee@name}%
+ \includepdf{\thu@committee@file}%
+ \fi
+ \thispagestyle{empty}%
+ \ctexset{
+ section = {
+ format += {\centering},
+ numbering = false,
+ afterindent = false,
+ },
+ }%
+}{%
+}
\newcommand{\thu@authorization@title}{关于学位论文使用授权的说明}
\newcommand{\thu@authorization@content}{%
\ifthu@degree@bachelor
-本人完全了解清华大学有关保留、使用学位论文的规定,即:学校有权保留学位
-论文的复印件,允许该论文被查阅和借阅;学校可以公布该论文的全部或部分内
-容,可以采用影印、缩印或其他复制手段保存该论文。
+ 本人完全了解清华大学有关保留、使用学位论文的规定,%
+ 即:学校有权保留学位论文的复印件,允许该论文被查阅和借阅;%
+ 学校可以公布该论文的全部或部分内容,可以采用影印、缩印或其他复制手段保存该论文。%
\else
-本人完全了解清华大学有关保留、使用学位论文的规定,即:
-
-清华大学拥有在著作权法规定范围内学位论文的使用权,其中包括:(1)已获学位的研究生
-必须按学校规定提交学位论文,学校可以采用影印、缩印或其他复制手段保存研究生上交的
-学位论文;(2)为教学和科研目的,学校可以将公开的学位论文作为资料在图书馆、资料
-室等场所供校内师生阅读,或在校园网上供校内师生浏览部分内容\ifthu@degree@master 。\else ;
-(3)根据《中华人民共和国学位条例暂行实施办法》,向国家图书馆报送可以公开的学位
-论文。\fi
-
-本人保证遵守上述规定。
-\fi}
+ 本人完全了解清华大学有关保留、使用学位论文的规定,即:\par
+ 清华大学拥有在著作权法规定范围内学位论文的使用权,其中包括:%
+ (1)已获学位的研究生必须按学校规定提交学位论文,%
+ 学校可以采用影印、缩印或其他复制手段保存研究生上交的学位论文;%
+ (2)为教学和科研目的,学校可以将公开的学位论文作为资料在图书馆、资料室等场所供校内师生阅读,%
+ 或在校园网上供校内师生浏览部分内容;%
+ \ifthu@degree@doctor
+ (3)根据《中华人民共和国学位条例暂行实施办法》及相关部门具体要求,向国家图书馆报送相应的学位论文。%
+ \else
+ (3)按照相关部门督导、抽查等要求,报送相应的学位论文。%
+ \fi
+ \par
+ 本人保证遵守上述规定。%
+ \fi
+}
\newcommand{\thu@authorization@addon}{%
- \ifthu@degree@bachelor(涉密的学位论文在解密后应遵守此规定)\else (保密的论文在解密后应遵守此规定)\fi}
+ \ifthu@degree@bachelor(涉密的学位论文在解密后应遵守此规定)\else (保密的论文在解密后遵守此规定)\fi}
\newcommand{\thu@authorization@authorsig}{\ifthu@degree@bachelor 签\hskip1em名:\else 作者签名:\fi}
\newcommand{\thu@authorization@teachersig}{导师签名:}
\newcommand{\thu@authorization@frontdate}{%
@@ -1753,7 +1970,15 @@
\fi%
\else
\thu@phantomsection
- \includepdf{#1}%
+ \kv@define@key{thu@copyright}{file}{\includepdf{\kv@value}}%
+ \kv@set@family@handler{thu@copyright}{%
+ \ifx\kv@value\relax
+ \includepdf{\kv@key}%
+ \else
+ \kv@handled@false
+ \fi
+ }%
+ \kvsetkeys{thu@copyright}{#1}%
\fi
\fi
}
@@ -1794,24 +2019,30 @@
}%
\expandafter\comma@parse\expandafter{#1}{\thu@clist@processor}%
}
-\newbox\thu@kw
-\newcommand\thu@put@keywords[2]{%
- \begingroup
- \setbox\thu@kw=\hbox{#1}
- \ifthu@degree@bachelor\indent\else\noindent\hangindent\wd\thu@kw\hangafter1\fi%
- \box\thu@kw#2\par
- \endgroup}
\newenvironment{abstract}{%
\ifthu@degree@bachelor
\cleardoublepage
\fi
\thusetup{language = chinese}%
- \thu@chapter*[]{\thu@abstract@name}% %no tocline
+ \ifthu@degree@graduate
+ \thu@chapter*{\thu@abstract@name}%
+ \else
+ \thu@chapter*[]{\thu@abstract@name}%
+ \fi
}{%
- \ifthu@degree@doctor\vfill\else\vskip12bp\fi
- \thu@put@keywords{\textbf{关键词:}}{%
- \thu@clist@use{\thu@keywords}{;}%
- }%
+ \par
+ \ifthu@degree@graduate
+ \vspace*{\stretch{4}}%
+ \noindent
+ \textsf{关键词:}%
+ \else
+ \null\par
+ \textbf{关键词:}%
+ \fi
+ \thu@clist@use{\thu@keywords}{;}%
+ \ifthu@degree@graduate
+ \vspace*{\stretch{1}}%
+ \fi
\ifthu@degree@bachelor
\cleardoublepage
\fi
@@ -1822,14 +2053,28 @@
\cleardoublepage
\fi
\thusetup{language = english}%
- \thu@chapter*[]{\thu@abstract@name@en}% no tocline
+ \ifthu@degree@graduate
+ \begingroup
+ \ctexset{chapter/format+=\bfseries}%
+ \thu@chapter*[\sffamily\bfseries\thu@abstract@name@en]{\thu@abstract@name@en}%
+ \endgroup
+ \else
+ \thu@chapter*[]{\thu@abstract@name@en}%
+ \fi
}{%
- \ifthu@degree@doctor\vfill\else\vskip12bp\fi
- \thu@put@keywords{%
- \textbf{\ifthu@degree@bachelor Keywords:\else Key Words:\fi\enskip}%
- }{%
- \thu@clist@use{\thu@keywords@en}{; }%
- }%
+ \par
+ \ifthu@degree@graduate
+ \vspace*{\stretch{4}}%
+ \noindent
+ \textbf{Key Words:}\space
+ \else
+ \null\par
+ \textbf{Keywords:}\space
+ \fi
+ \thu@clist@use{\thu@keywords@en}{; }%
+ \ifthu@degree@graduate
+ \vspace*{\stretch{1}}%
+ \fi
\ifthu@degree@bachelor
\cleardoublepage
\fi
@@ -1839,7 +2084,11 @@
\ifthu@degree@bachelor
\cleardoublepage
\fi
- \thu@chapter*[]{\thu@denotation@name} % no tocline
+ \ifthu@degree@graduate
+ \thu@chapter*{\thu@denotation@name}%
+ \else
+ \thu@chapter*[]{\thu@denotation@name}%
+ \fi
\vskip-30bp\xiaosi[1.6]\begin{thu@denotation}[labelwidth=#1]
}{%
\end{thu@denotation}
@@ -1855,7 +2104,6 @@
labelsep*=0.5cm,
itemindent=0pt,
}
-\newcommand\thu@statement@name{声\hspace{\ccwd}明}
\newcommand{\thu@statement@text}{本人郑重声明:所呈交的学位论文,是本人在导师指导下
,独立进行研究工作所取得的成果。尽我所知,除文中已经注明引用的内容外,本学位论
文的研究成果不包含任何他人享有著作权的内容。对本论文所涉及的研究工作做出贡献的
@@ -1863,6 +2111,7 @@
\newcommand{\thu@signature}{签\hspace{1em}名:}
\newcommand{\thu@backdate}{日\hspace{1em}期:}
\newenvironment{acknowledgements}{%
+ \@mainmatterfalse
\ifthu@degree@bachelor
\cleardoublepage
\fi
@@ -1891,21 +2140,38 @@
},
}
\thu@option@hook{statement-page-number}{%
+ \ifthu@statement@page@number@false
+ \thusetup{statement-page-style=empty}%
+ \else
+ \thusetup{statement-page-style=plain}%
+ \fi
\thu@warning{%
The "statement-page-number" option is deprecated.
- Use "statement-page-style" instead%
+ Use "page-style" option of \protect\statement command instead%
}%
}
\newcommand\statement[1][]{%
+ \@mainmatterfalse
\ifthu@degree@bachelor
\cleardoublepage
+ \def\thu@statement@name{声\hspace{2em}明}%
+ \else
+ \def\thu@statement@name{声\hspace{1em}明}%
\fi
- \def\thu@@tmp{#1}%
- \ifx\thu@@tmp\@empty
- \thu@chapter*{\thu@statement@name}%
- \ifthu@statement@page@number@false
- \thispagestyle{\thu@statement@page@style}%
+ \let\thu@statement@file\@empty
+ \kv@define@key{thu@statement}{page-style}{\thusetup{statement-page-style=##1}}%
+ \kv@define@key{thu@statement}{file}{\let\thu@statement@file\kv@value}%
+ \kv@set@family@handler{thu@statement}{%
+ \ifx\kv@value\relax
+ \let\thu@statement@file\kv@key
+ \else
+ \kv@handled@false
\fi
+ }%
+ \kvsetkeys{thu@statement}{#1}%
+ \ifx\thu@statement@file\@empty
+ \thu@chapter*{\thu@statement@name}%
+ \thispagestyle{\thu@statement@page@style}%
\thu@statement@text\par
\ifthu@degree@graduate
\vskip 2cm%
@@ -1919,7 +2185,7 @@
\markboth{\thu@statement@name}{}%
\thu@phantomsection
\addcontentsline{toc}{chapter}{\thu@statement@name}%
- }]{#1}%
+ }]{\thu@statement@file}%
\fi
\ifthu@degree@bachelor
\cleardoublepage
@@ -1934,26 +2200,26 @@
{\thu@chapter*{\csname list#1name\endcsname}\@starttoc{\csname ext@#1\endcsname}}%
}
\renewcommand\listoffigures{%
- \thu@set@list@label@width{\figurename}%
\thu@listof{figure}%
}
-\newlength{\thu@list@label@width}
-\newcommand\thu@set@list@label@width[1]{%
- \settowidth{\thu@list@label@width}{#1~8.8}%
- \addtolength{\thu@list@label@width}{1em}%
-}
\titlecontents{figure}
- [\thu@list@label@width]{\addvspace{6bp}}
- {\contentslabel[\figurename~\thecontentslabel]{\thu@list@label@width}}{}
- {\thu@leaders\thecontentspage}
+ [\z@]{}
+ {\contentspush{\figurename~\thecontentslabel\hspace{\ccwd}}}{}
+ {\nobreak\thu@leaders\nobreak\hfil\thecontentspage}
\renewcommand\listoftables{%
- \thu@set@list@label@width{\tablename}%
\thu@listof{table}%
}
\titlecontents{table}
- [\thu@list@label@width]{\addvspace{6bp}}
- {\contentslabel[\tablename~\thecontentslabel]{\thu@list@label@width}}{}
+ [\z@]{}
+ {\contentspush{\tablename~\thecontentslabel\hspace{\ccwd}}}{}
{\thu@leaders\thecontentspage}
+\newcommand\listoffiguresandtables{%
+ \thu@chapter*{\thu@list@figure@table@name}%
+ \@starttoc{lof}%
+ \par
+ \null\par
+ \@starttoc{lot}%
+}
\def\ext@equation{loe}
\def\equcaption#1{%
\addcontentsline{\ext@equation}{equation}%
@@ -1962,64 +2228,308 @@
\titlecontents{equation}
[0pt]{\addvspace{6bp}}
{\thu@equation@name~\thecontentslabel}{}
- {\thu@leaders\thecontentspage}
+ {\nobreak\thu@leaders\nobreak\thecontentspage}
\contentsuse{equation}{loe}
-\DeclareRobustCommand\inlinecite{\@inlinecite}
-\def\@inlinecite#1{\begingroup\let\@cite\NAT@citenum\citep{#1}\endgroup}
-\let\onlinecite\inlinecite
-\renewcommand\bibsection{\thu@chapter*{\bibname}}
-\renewcommand\bibfont{\ifthu@degree@bachelor\wuhao[1.619]\else\wuhao[1.5]\fi}
-\setlength\bibhang{2\ccwd}
-\addtolength{\bibsep}{-0.7em}
-\setlength{\labelsep}{0.4em}
-\def\@biblabel#1{[#1]\hfill}
-\expandafter\newcommand\csname bibstyle@thuthesis-numeric\endcsname{%
- \bibpunct{[}{]}{,}{s}{,}{\textsuperscript{,}}}
-\expandafter\newcommand\csname bibstyle@thuthesis-author-year\endcsname{%
- \bibpunct{(}{)}{;}{a}{,}{,}}
-\expandafter\newcommand\csname bibstyle@thuthesis-bachelor\endcsname{%
- \bibpunct{[}{]}{,}{s}{,}{\textsuperscript{,}}}
-\@namedef{bibstyle@thuthesis-inline}{\bibpunct{[}{]}{,}{n}{,}{,}}
-\thu@define@key{
- cite-style = {
- name = cite@style,
+ \thu@define@key{
+ cite-style = {
+ name = cite@style,
+ }
+ }
+\PassOptionsToPackage{compress}{natbib}
+\AtEndOfPackageFile*{natbib}{
+ \DeclareRobustCommand\inlinecite{\@inlinecite}
+ \def\@inlinecite#1{\begingroup\let\@cite\NAT@citenum\citep{#1}\endgroup}
+ \let\onlinecite\inlinecite
+ \expandafter\newcommand\csname bibstyle@thuthesis-numeric\endcsname{%
+ \bibpunct{[}{]}{,}{s}{,}{\textsuperscript{,}}}
+ \expandafter\newcommand\csname bibstyle@thuthesis-author-year\endcsname{%
+ \bibpunct{(}{)}{;}{a}{,}{,}}
+ \expandafter\newcommand\csname bibstyle@thuthesis-bachelor\endcsname{%
+ \bibpunct{[}{]}{,}{s}{,}{\textsuperscript{,}}}
+ \@namedef{bibstyle@thuthesis-inline}{\bibpunct{[}{]}{,}{n}{,}{,}}
+ \thu@option@hook{cite-style}{\@nameuse{bibstyle@thuthesis-\thu@cite@style}}
+ \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\NAT@spacechar#3\fi\else #1\fi\endgroup}
+ \unskip\kern\p@\textsuperscript{\NAT@@open#1\NAT@@close\if*#3*\else#3\fi}%
+ \else #1\fi\endgroup}
+ \renewcommand\NAT@citenum%
+ [3]{\ifNAT@swa\NAT@@open\if*#2*\else#2\NAT@spacechar\fi
+ % #1\if*#3*\else\NAT@cmt#3\fi\NAT@@close\else#1\fi\endgroup}
+ #1\NAT@@close\textsuperscript{\if*#3*\else#3\fi}\else#1\fi\endgroup}
+ \def\NAT@citexnum[#1][#2]#3{%
+ \NAT@reset@parser
+ \NAT@sort@cites{#3}%
+ \NAT@reset@citea
+ \@cite{\def\NAT@num{-1}\let\NAT@last@yr\relax\let\NAT@nm\@empty
+ \@for\@citeb:=\NAT@cite@list\do
+ {\@safe@activestrue
+ \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%
+ \@safe@activesfalse
+ \@ifundefined{b@\@citeb\@extra@b@citeb}{%
+ {\reset@font\bfseries?}
+ \NAT@citeundefined\PackageWarning{natbib}%
+ {Citation `\@citeb' on page \thepage \space undefined}}%
+ {\let\NAT@last@num\NAT@num\let\NAT@last@nm\NAT@nm
+ \NAT@parse{\@citeb}%
+ \ifNAT@longnames\@ifundefined{bv@\@citeb\@extra@b@citeb}{%
+ \let\NAT@name=\NAT@all@names
+ \global\@namedef{bv@\@citeb\@extra@b@citeb}{}}{}%
+ \fi
+ \ifNAT@full\let\NAT@nm\NAT@all@names\else
+ \let\NAT@nm\NAT@name\fi
+ \ifNAT@swa
+ \@ifnum{\NAT@ctype>\@ne}{%
+ \@citea
+ \NAT@hyper@{\@ifnum{\NAT@ctype=\tw@}{\NAT@test{\NAT@ctype}}{\NAT@alias}}%
+ }{%
+ \@ifnum{\NAT@cmprs>\z@}{%
+ \NAT@ifcat@num\NAT@num
+ {\let\NAT@nm=\NAT@num}%
+ {\def\NAT@nm{-2}}%
+ \NAT@ifcat@num\NAT@last@num
+ {\@tempcnta=\NAT@last@num\relax}%
+ {\@tempcnta\m@ne}%
+ \@ifnum{\NAT@nm=\@tempcnta}{%
+ \@ifnum{\NAT@merge>\@ne}{}{\NAT@last@yr@mbox}%
+ }{%
+ \advance\@tempcnta by\@ne
+ \@ifnum{\NAT@nm=\@tempcnta}{%
+ % \ifx\NAT@last@yr\relax
+ % \def@NAT@last@yr{\@citea}%
+ % \else
+ % \def@NAT@last@yr{--\NAT@penalty}%
+ % \fi
+ \def@NAT@last@yr{-\NAT@penalty}%
+ }{%
+ \NAT@last@yr@mbox
+ }%
+ }%
+ }{%
+ \@tempswatrue
+ \@ifnum{\NAT@merge>\@ne}{\@ifnum{\NAT@last@num=\NAT@num\relax}{\@tempswafalse}{}}{}%
+ \if@tempswa\NAT@citea@mbox\fi
+ }%
+ }%
+ \NAT@def@citea
+ \else
+ \ifcase\NAT@ctype
+ \ifx\NAT@last@nm\NAT@nm \NAT@yrsep\NAT@penalty\NAT@space\else
+ \@citea \NAT@test{\@ne}\NAT@spacechar\NAT@mbox{\NAT@super@kern\NAT@@open}%
+ \fi
+ \if*#1*\else#1\NAT@spacechar\fi
+ \NAT@mbox{\NAT@hyper@{{\citenumfont{\NAT@num}}}}%
+ \NAT@def@citea@box
+ \or
+ \NAT@hyper@citea@space{\NAT@test{\NAT@ctype}}%
+ \or
+ \NAT@hyper@citea@space{\NAT@test{\NAT@ctype}}%
+ \or
+ \NAT@hyper@citea@space\NAT@alias
+ \fi
+ \fi
+ }%
+ }%
+ \@ifnum{\NAT@cmprs>\z@}{\NAT@last@yr}{}%
+ \ifNAT@swa\else
+ % \@ifnum{\NAT@ctype=\z@}{%
+ % \if*#2*\else\NAT@cmt#2\fi
+ % }{}%
+ \NAT@mbox{\NAT@@close}%
+ \@ifnum{\NAT@ctype=\z@}{%
+ \if*#2*\else\textsuperscript{#2}\fi
+ }{}%
+ \fi
+ }{#1}{#2}%
+ }%
+ \renewcommand\NAT@cite%
+ [3]{\ifNAT@swa\NAT@@open\if*#2*\else#2\NAT@spacechar\fi
+ % #1\if*#3*\else\NAT@cmt#3\fi\NAT@@close\else#1\fi\endgroup}
+ #1\NAT@@close\if*#3*\else\textsuperscript{#3}\fi\else#1\fi\endgroup}
+ \def\NAT@citex%
+ [#1][#2]#3{%
+ \NAT@reset@parser
+ \NAT@sort@cites{#3}%
+ \NAT@reset@citea
+ \@cite{\let\NAT@nm\@empty\let\NAT@year\@empty
+ \@for\@citeb:=\NAT@cite@list\do
+ {\@safe@activestrue
+ \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%
+ \@safe@activesfalse
+ \@ifundefined{b@\@citeb\@extra@b@citeb}{\@citea%
+ {\reset@font\bfseries ?}\NAT@citeundefined
+ \PackageWarning{natbib}%
+ {Citation `\@citeb' on page \thepage \space undefined}\def\NAT@date{}}%
+ {\let\NAT@last@nm=\NAT@nm\let\NAT@last@yr=\NAT@year
+ \NAT@parse{\@citeb}%
+ \ifNAT@longnames\@ifundefined{bv@\@citeb\@extra@b@citeb}{%
+ \let\NAT@name=\NAT@all@names
+ \global\@namedef{bv@\@citeb\@extra@b@citeb}{}}{}%
+ \fi
+ \ifNAT@full\let\NAT@nm\NAT@all@names\else
+ \let\NAT@nm\NAT@name\fi
+ \ifNAT@swa\ifcase\NAT@ctype
+ \if\relax\NAT@date\relax
+ \@citea\NAT@hyper@{\NAT@nmfmt{\NAT@nm}\NAT@date}%
+ \else
+ \ifx\NAT@last@nm\NAT@nm\NAT@yrsep
+ \ifx\NAT@last@yr\NAT@year
+ \def\NAT@temp{{?}}%
+ \ifx\NAT@temp\NAT@exlab\PackageWarningNoLine{natbib}%
+ {Multiple citation on page \thepage: same authors and
+ year\MessageBreak without distinguishing extra
+ letter,\MessageBreak appears as question mark}\fi
+ \NAT@hyper@{\NAT@exlab}%
+ \else\unskip\NAT@spacechar
+ \NAT@hyper@{\NAT@date}%
+ \fi
+ \else
+ \@citea\NAT@hyper@{%
+ \NAT@nmfmt{\NAT@nm}%
+ \hyper@natlinkbreak{%
+ \NAT@aysep\NAT@spacechar}{\@citeb\@extra@b@citeb
+ }%
+ \NAT@date
+ }%
+ \fi
+ \fi
+ \or\@citea\NAT@hyper@{\NAT@nmfmt{\NAT@nm}}%
+ \or\@citea\NAT@hyper@{\NAT@date}%
+ \or\@citea\NAT@hyper@{\NAT@alias}%
+ \fi \NAT@def@citea
+ \else
+ \ifcase\NAT@ctype
+ \if\relax\NAT@date\relax
+ \@citea\NAT@hyper@{\NAT@nmfmt{\NAT@nm}}%
+ \else
+ \ifx\NAT@last@nm\NAT@nm\NAT@yrsep
+ \ifx\NAT@last@yr\NAT@year
+ \def\NAT@temp{{?}}%
+ \ifx\NAT@temp\NAT@exlab\PackageWarningNoLine{natbib}%
+ {Multiple citation on page \thepage: same authors and
+ year\MessageBreak without distinguishing extra
+ letter,\MessageBreak appears as question mark}\fi
+ \NAT@hyper@{\NAT@exlab}%
+ \else
+ \unskip\NAT@spacechar
+ \NAT@hyper@{\NAT@date}%
+ \fi
+ \else
+ \@citea\NAT@hyper@{%
+ \NAT@nmfmt{\NAT@nm}%
+ \hyper@natlinkbreak{\NAT@spacechar\NAT@@open\if*#1*\else#1\NAT@spacechar\fi}%
+ {\@citeb\@extra@b@citeb}%
+ \NAT@date
+ }%
+ \fi
+ \fi
+ \or\@citea\NAT@hyper@{\NAT@nmfmt{\NAT@nm}}%
+ \or\@citea\NAT@hyper@{\NAT@date}%
+ \or\@citea\NAT@hyper@{\NAT@alias}%
+ \fi
+ \if\relax\NAT@date\relax
+ \NAT@def@citea
+ \else
+ \NAT@def@citea@close
+ \fi
+ \fi
+ }}\ifNAT@swa\else
+ % \if*#2*\else\NAT@cmt#2\fi
+ \if\relax\NAT@date\relax\else\NAT@@close\fi
+ \if*#2*\else\textsuperscript{#2}\fi
+ \fi}{#1}{#2}}
+ \renewcommand\bibsection{\thu@chapter*{\bibname}}
+ \newcommand\thu@set@bibliography@format{%
+ \ifthu@degree@bachelor
+ \renewcommand\bibfont{\fontsize{10.5bp}{17bp}\selectfont}%
+ \setlength{\bibsep}{6bp}%
+ \ifthu@main@language@chinese
+ \setlength{\bibhang}{21bp}%
+ \else
+ \setlength{\bibhang}{0.5in}%
+ \fi
+ \else
+ \renewcommand\bibfont{\fontsize{10.5bp}{16bp}\selectfont}%
+ \setlength{\bibsep}{3bp}%
+ \setlength{\bibhang}{21bp}%
+ \fi
+ }
+ \thu@set@bibliography@format
+ \thu@option@hook{degree}{\thu@set@bibliography@format}
+ \thu@option@hook{main-language}{\thu@set@bibliography@format}
+ \def\@biblabel#1{[#1]\hfill}
+ \renewcommand\NAT@bibsetnum[1]{%
+ % \settowidth\labelwidth{\@biblabel{#1}}%
+ % \setlength{\leftmargin}{\labelwidth}%
+ % \addtolength{\leftmargin}{\labelsep}%
+ \setlength{\leftmargin}{1cm}%
+ \setlength{\itemindent}{\z@}%
+ \setlength{\labelsep}{0.1cm}%
+ \setlength{\labelwidth}{0.9cm}%
+ \setlength{\itemsep}{\bibsep}
+ \setlength{\parsep}{\z@}%
+ \ifNAT@openbib
+ \addtolength{\leftmargin}{\bibindent}%
+ \setlength{\itemindent}{-\bibindent}%
+ \setlength{\listparindent}{\itemindent}%
+ \setlength{\parsep}{0pt}%
+ \fi
}
}
-\thu@option@hook{cite-style}{\@nameuse{bibstyle@thuthesis-\thu@cite@style}}
-\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}
-\patchcmd{\NAT@citexnum}{%
- \ifx\NAT@last@yr\relax
- \def@NAT@last@yr{\@citea}%
+\AtEndOfPackageFile*{biblatex}{
+ \AtBeginDocument{
+ \ifthenelse{\equal{\blx@bbxfile}{apa}}{\def\bibname{REFERENCES}}{}
+ \ifthenelse{\equal{\blx@bbxfile}{apa6}}{\def\bibname{REFERENCES}}{}
+ \ifthenelse{\equal{\blx@bbxfile}{mla}}{\def\bibname{WORKS CITED}}{}
+ \ifthenelse{\equal{\blx@bbxfile}{mla-new}}{\def\bibname{WORKS CITED}}{}
+ }
+ \DeclareRobustCommand\inlinecite{\parencite}
+ \defbibheading{bibliography}[\bibname]{\thu@chapter*{\bibname}}
+ \newcommand\thu@set@bibliography@format{%
+ \ifthu@degree@bachelor
+ \renewcommand\bibfont{\fontsize{10.5bp}{17bp}\selectfont}%
+ \setlength{\bibitemsep}{6bp}%
+ \ifthu@main@language@chinese
+ \setlength{\bibhang}{21bp}%
+ \else
+ \setlength{\bibhang}{0.5in}%
+ \fi
+ \else
+ \renewcommand\bibfont{\fontsize{10.5bp}{16bp}\selectfont}%
+ \setlength{\bibitemsep}{3bp}%
+ \setlength{\biblabelsep}{0.1cm}%
+ \setlength{\bibhang}{21bp}%
+ \fi
+ }
+ \thu@set@bibliography@format
+ \thu@option@hook{degree}{\thu@set@bibliography@format}
+ \thu@option@hook{main-language}{\thu@set@bibliography@format}
+}
+\AtEndOfPackageFile*{apacite}{
+ \AtBeginDocument{
+ \thu@set@chapter@names
+ }
+ \renewcommand\bibliographytypesize{\fontsize{10.5bp}{17bp}\selectfont}
+ \setlength{\bibitemsep}{6bp}
+ \ifthu@main@language@chinese
+ \setlength{\bibleftmargin}{21bp}
+ \setlength{\bibindent}{-\bibleftmargin}
\else
- \def@NAT@last@yr{--\NAT@penalty}%
+ \setlength{\bibleftmargin}{0.5in}
+ \setlength{\bibindent}{-\bibleftmargin}
\fi
-}{%
- \def@NAT@last@yr{-\NAT@penalty}%
-}{}{}
+ \def\st@rtbibchapter{%
+ \if@numberedbib%
+ \chapter{\bibname}% e.g., 6. References
+ \else%
+ \thu@chapter*{\bibname}% e.g., References
+ \fi%
+ }%
+}
+\g@addto@macro\appendix{%
+ \@mainmattertrue
+}
\thu@define@key{
toc-depth = {
name = toc@depth,
@@ -2053,7 +2563,7 @@
}%
\renewcommand\bibname{参考文献}%
\let\bibsection\thu@appendix@bibsection
- \renewcommand\@bibunitname{main-survey}%
+ \renewcommand\@bibunitname{\jobname-survey}%
\let\bibliographystyle\defaultbibliographystyle
\let\bibliography\thu@appendix@bibliography
\begin{bibunit}%
@@ -2080,7 +2590,7 @@
\section{\bibname}%
\endgroup
}%
- \renewcommand\@bibunitname{main-translation}%
+ \renewcommand\@bibunitname{\jobname-translation}%
\let\bibliographystyle\defaultbibliographystyle
\let\bibliography\thu@appendix@bibliography
\begin{bibunit}%
@@ -2092,7 +2602,7 @@
}
\newenvironment{translation-index}{%
\begin{bibunit}%
- \renewcommand\@bibunitname{main-index}%
+ \renewcommand\@bibunitname{\jobname-index}%
\renewcommand\bibname{书面翻译对应的原文索引}%
\let\bibsection\thu@appendix@bibsection
}{%
@@ -2132,6 +2642,7 @@
}%
\newcommand\thu@appendix@bibliography[1]{\putbib[#1]}
\newenvironment{resume}[1][\thu@resume@name]{%
+ \@mainmatterfalse
\thu@chapter*{#1}}{}
\newcommand{\resumeitem}[1]{%
\vspace{24bp}{\sihao\heiti\centerline{#1}}\par\vspace{6bp}}
@@ -2145,9 +2656,22 @@
leftmargin=10mm,labelsep=!,before=\xiaosi[1.26]}
\def\publicationskip{\bigskip\bigskip}
\newcommand{\record}[1]{%
+ \let\thu@record@file\@empty
+ \kv@define@key{thu@record}{file}{\let\thu@record@file\kv@value}%
+ \kv@set@family@handler{thu@record}{%
+ \ifx\kv@value\relax
+ \let\thu@record@file\kv@key
+ \else
+ \kv@handled@false
+ \fi
+ }%
+ \kvsetkeys{thu@record}{#1}%
+ \ifx\thu@record@file\@empty
+ \thu@error{File path of \protect\record\space is required}
+ \fi
\cleardoublepage
\thu@pdfbookmark{0}{综合论文训练记录表}%
- \includepdf[pages=-]{#1}%
+ \includepdf[pages=-]{\thu@record@file}%
}
\AtEndOfPackageFile*{hyperref}{
\hypersetup{
@@ -2180,7 +2704,7 @@
\@ifpackagelater{hyperref}{2019/04/27}{}{%
\g@addto@macro\psdmapshortnames{\let\mu\textmu}
}%
- \ifthu@language@chinese
+ \ifthu@main@language@chinese
\hypersetup{
pdflang = zh-CN,
}%
@@ -2190,7 +2714,7 @@
}%
\fi
\AtBeginDocument{%
- \ifthu@language@chinese
+ \ifthu@main@language@chinese
\hypersetup{
pdftitle = \thu@title,
pdfauthor = \thu@author,
@@ -2304,15 +2828,14 @@
\floatname{algorithm}{\thu@algorithm@name}
\g@addto@macro\appendix{\renewcommand*{\thealgorithm}{\thechapter-\arabic{algorithm}}}
\renewcommand\listofalgorithms{%
- \thu@set@list@label@width{\fname@algorithm}%
\thu@listof{algorithm}%
}
\renewcommand\listalgorithmname{\thu@list@algorithm@name}
\def\ext@algorithm{loa}
\contentsuse{algorithm}{loa}
\titlecontents{algorithm}
- [\thu@list@label@width]{\addvspace{6bp}}
- {\contentslabel[\fname@algorithm~\thecontentslabel]{\thu@list@label@width}}{}
+ [\z@]{}
+ {\contentspush{\fname@algorithm~\thecontentslabel\hspace{\ccwd}}}{}
{\thu@leaders\thecontentspage}
}
\PassOptionsToPackage{algochapter}{algorithm2e}
@@ -2323,15 +2846,14 @@
\SetAlgoCaptionSeparator{\hspace*{1em}}
\SetAlFnt{\dawu}
\renewcommand\listofalgorithms{%
- \thu@set@list@label@width{\algorithmcfname}%
\thu@listof{algorithmcf}%
}
\renewcommand\listalgorithmcfname{\thu@list@algorithm@name}
\def\ext@algorithmcf{loa}
\contentsuse{algocf}{loa}
\titlecontents{algocf}
- [\thu@list@label@width]{\addvspace{6bp}}
- {\contentslabel[\algorithmcfname~\thecontentslabel]{\thu@list@label@width}}{}
+ [\z@]{}
+ {\contentspush{\algorithmcfname~\thecontentslabel\hspace{\ccwd}}}{}
{\thu@leaders\thecontentspage}
}
\AtEndOfPackageFile*{minted}{
@@ -2392,7 +2914,7 @@
}%
\fi
\thispagestyle{empty}%
- \ifthu@language@chinese
+ \ifthu@main@language@chinese
\thu@pdfbookmark{0}{书脊}%
\else
\thu@pdfbookmark{0}{Spine}%