summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/thuthesis
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-05-31 20:25:04 +0000
committerKarl Berry <karl@freefriends.org>2021-05-31 20:25:04 +0000
commit4097645cbd7310530600defdf864a7db4c8d8ba0 (patch)
tree433612a435fb9e8f196a10110d0151d7add83982 /Master/texmf-dist/tex/latex/thuthesis
parent43f5ef960aa5e3a6ed8845d7577deab29d0baff4 (diff)
thuthesis (31may21)
git-svn-id: svn://tug.org/texlive/trunk@59411 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/thuthesis')
-rw-r--r--Master/texmf-dist/tex/latex/thuthesis/thuthesis-inline.cbx12
-rw-r--r--Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls87
2 files changed, 78 insertions, 21 deletions
diff --git a/Master/texmf-dist/tex/latex/thuthesis/thuthesis-inline.cbx b/Master/texmf-dist/tex/latex/thuthesis/thuthesis-inline.cbx
index bec04d1d44e..d268a5b96aa 100644
--- a/Master/texmf-dist/tex/latex/thuthesis/thuthesis-inline.cbx
+++ b/Master/texmf-dist/tex/latex/thuthesis/thuthesis-inline.cbx
@@ -7,6 +7,16 @@
autocite = inline ,
}
+% 修改 \mkbibsuperscript 宏在最后加上一个空白使得 xeCJK 不会自动在引用标签后面加上中英文之间的空白
+\DeclareRobustCommand{\mkbibsuperscriptusp}[1]{%
+ \unspace\allowhyphens\textsuperscript{%
+ \begingroup
+ \protected\long\def\mkbibsuperscriptusp##1{%
+ \blx@warning{Nested superscript}%
+ \mkbibbrackets{##1}}%
+ #1\endgroup}}
+
+% 这里把 gb7714-2015.cbx 中 \parencite 定义借鉴过来
\DeclareCiteCommand{\cite}%[\mkbibbrackets]
{[\usebibmacro{cite:init}%]
\usebibmacro{prenote}}%
@@ -15,4 +25,4 @@
{}
{%[
\usebibmacro{cite:dump}]%
- \mkbibsuperscript{\printfield{postnote}}}
+ \mkbibsuperscriptusp{\printfield{postnote}}}
diff --git a/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls b/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls
index e0169b3c931..96b60b1381b 100644
--- a/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls
+++ b/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls
@@ -23,7 +23,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2017/04/15]
\ProvidesClass{thuthesis}
-[2021/04/03 7.2.2 Tsinghua University Thesis Template]
+[2021/05/31 7.2.3 Tsinghua University Thesis Template]
\newcommand\thu@error[1]{%
\ClassError{thuthesis}{#1}{}%
}
@@ -56,7 +56,7 @@
}
\hyphenation{Thu-Thesis}
\def\thuthesis{ThuThesis}
-\def\version{7.2.2}
+\def\version{7.2.3}
\RequirePackage{kvdefinekeys}
\RequirePackage{kvsetkeys}
\RequirePackage{kvoptions}
@@ -459,7 +459,7 @@
\def\thu@list@algorithm@name{算法索引}%
\def\thu@acknowledgements@name{致\qquad 谢}%
\def\listequationname{公式索引}%
- \def\thu@denotation@name{主要符号对照表}%
+ \def\thu@denotation@name{主要符号表}%
\def\thu@resume@name{在学期间参加课题的研究成果}%
\else
\def\listfigurename{插图清单}%
@@ -646,17 +646,26 @@
}
\fi
\fi
-\ifthu@font@auto
- \ifthu@fontset@windows
- \thusetup{font=times}
- \else
- \ifthu@fontset@mac
- \thusetup{font=times}
+\newcommand\thu@set@font{%
+ \@nameuse{thu@set@font@\thu@font}%
+}
+\thu@option@hook{font}{\thu@set@font}
+\newcommand\thu@set@font@auto{%
+ \ifthu@font@auto
+ \ifthu@fontset@windows
+ \thusetup{font=times}%
\else
- \thusetup{font=termes}
+ \ifthu@fontset@mac
+ \thusetup{font=times}%
+ \else
+ \thusetup{font=termes}%
+ \fi
\fi
\fi
-\fi
+}
+\thu@option@hook{math-font}{\g@addto@macro\thu@setup@hook{\thu@set@font@auto}}
+\AtBeginOfPackageFile*{siunitx}{\thu@set@font@auto}
+\AtEndPreamble{\thu@set@font@auto}
\newcommand\thu@set@font@times{%
\setmainfont{Times New Roman}%
\setsansfont{Arial}%
@@ -842,11 +851,6 @@
\newcommand\thu@set@font@newtx{%
\RequirePackage{newtxtext}%
}
-\newcommand\thu@set@font{%
- \@nameuse{thu@set@font@\thu@font}%
-}
-\thu@set@font
-\thu@option@hook{font}{\thu@set@font}
\ifthu@cjk@font@auto
\ifthu@fontset@mac
\thusetup{cjk-font = mac}
@@ -1309,6 +1313,7 @@
\fi
\DeclareRobustCommand\symup[1]{{\mathrm{##1}}}%
\DeclareRobustCommand\symbf[1]{{\bm{##1}}}%
+ \DeclareRobustCommand\symbfsf[1]{{\bm{\mathsf{##1}}}}%
\let\increment\upDelta%
\renewcommand\thu@qed{\openbox}%
}
@@ -1519,6 +1524,22 @@
\endgroup
}
\allowdisplaybreaks[4]
+\newcommand\thu@put@parentheses[1]{%
+ \ifthu@language@chinese
+ \unskip
+ (#1)%
+ \else
+ (#1)%
+ \fi
+}
+\def\tagform@#1{\maketag@@@{\thu@put@parentheses{\ignorespaces#1\unskip\@@italiccorr}}}
+\renewcommand{\eqref}[1]{%
+ \textup{%
+ \normalfont\thu@put@parentheses{%
+ \ignorespaces\ref{#1}\unskip\@@italiccorr
+ }%
+ }%
+}
\def\fps@figure{h}
\def\fps@table{h}
\setlength{\floatsep}{12\p@ \@plus 2\p@ \@minus 2\p@}
@@ -3065,7 +3086,6 @@
\@namedef{bibstyle@thuthesis-numeric}{\citestyle{super}}
\@namedef{bibstyle@thuthesis-author-year}{\citestyle{author-year}}
\@namedef{bibstyle@thuthesis-bachelor}{\citestyle{super}}
- \@namedef{bibstyle@thuthesis-inline}{\citestyle{inline}}
\renewcommand\NAT@citesuper[3]{%
\ifNAT@swa
\if*#2*\else
@@ -3406,6 +3426,15 @@
toc-depth = 0,
}%
}
+\@ifpackagelater{titletoc}{2019/07/14}{
+ \newcommand\thu@print@contents[5]{%
+ \printcontents[#1]{#2}{#3}[#4]{}%
+ }
+}{
+ \newcommand\thu@print@contents[5]{%
+ \printcontents[#1]{#2}{#3}{\setcounter{tocdepth}{#4}#5}%
+ }
+}
\newenvironment{survey}{%
\chapter{外文资料的调研阅读报告}%
\thusetup{language = english}%
@@ -3415,7 +3444,7 @@
\renewcommand\tableofcontents{%
\section*{Contents}%
\thu@pdfbookmark{1}{Contents}%
- \printcontents[survey]{l}{1}[2]{}%
+ \thu@print@contents{survey}{l}{1}{2}{}%
\vskip 20bp%
}%
\renewcommand\bibname{参考文献}%
@@ -3435,11 +3464,23 @@
\thusetup{language = chinese}%
\let\title\thu@appendix@title
\let\maketitle\thu@appendix@maketitle
+ \renewenvironment{abstract}{%
+ \ctexset{
+ section = {
+ format += \centering,
+ numbering = false,
+ },
+ }%
+ \section{摘要}%
+ \quotation
+ }{%
+ \endquotation
+ }%
\thu@set@partial@toc@format
\renewcommand\tableofcontents{%
\section*{目录}%
\thu@pdfbookmark{1}{目录}%
- \printcontents[translation]{l}{1}[2]{}%
+ \thu@print@contents{translation}{l}{1}{2}{}%
\vskip 20bp%
}%
\def\bibsection{%
@@ -3780,7 +3821,6 @@
\thu@define@key{
spine-font = {
name = spine@font,
- default = {\sanhao},
},
spine-title = {
name = spine@title,
@@ -3789,6 +3829,13 @@
name = spine@author,
},
}
+\renewcommand\thu@spine@font{%
+ \ifthu@degree@doctor
+ \fontsize{16bp}{20.8bp}\selectfont
+ \else
+ \fontsize{15bp}{19.5bp}\selectfont
+ \fi
+}
\newcommand*\CJKmovesymbol[1]{\raise.3em\hbox{#1}}
\newcommand*\CJKmove{%
\punctstyle{plain}%