texlive[58594] Master/texmf-dist: thuthesis (21mar21)

commits+karl at tug.org commits+karl at tug.org
Sun Mar 21 22:42:58 CET 2021


Revision: 58594
          http://tug.org/svn/texlive?view=revision&revision=58594
Author:   karl
Date:     2021-03-21 22:42:58 +0100 (Sun, 21 Mar 2021)
Log Message:
-----------
thuthesis (21mar21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/thuthesis/CHANGELOG.md
    trunk/Master/texmf-dist/doc/latex/thuthesis/README.md
    trunk/Master/texmf-dist/doc/latex/thuthesis/data/chap03.tex
    trunk/Master/texmf-dist/doc/latex/thuthesis/spine.pdf
    trunk/Master/texmf-dist/doc/latex/thuthesis/thusetup.tex
    trunk/Master/texmf-dist/doc/latex/thuthesis/thuthesis-example.pdf
    trunk/Master/texmf-dist/doc/latex/thuthesis/thuthesis.pdf
    trunk/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx
    trunk/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls

Modified: trunk/Master/texmf-dist/doc/latex/thuthesis/CHANGELOG.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/thuthesis/CHANGELOG.md	2021-03-21 21:42:35 UTC (rev 58593)
+++ trunk/Master/texmf-dist/doc/latex/thuthesis/CHANGELOG.md	2021-03-21 21:42:58 UTC (rev 58594)
@@ -6,6 +6,17 @@
 
 ## [Unreleased]
 
+## [v7.2.1] - 2021-03-21
+### Added
+- 在文档中添加更多关于数学公式样式的说明。
+
+### Changed
+- 允许控制研究生的声明页是否添加页眉页脚。
+
+### Fixed
+- 调整文字与图表等浮动体之间的距离(#614)。
+- 修复一些字体选择相关的问题。
+
 ## [v7.2.0] - 2021-03-12
 ### Added
 - 新增英文版写作指南要求的格式。
@@ -663,7 +674,8 @@
 
 
 
-[Unreleased]: https://github.com/tuna/thuthesis/compare/v7.2.0...HEAD
+[Unreleased]: https://github.com/tuna/thuthesis/compare/v7.2.1...HEAD
+[v7.2.1]:     https://github.com/tuna/thuthesis/compare/v7.2.0...v7.2.1
 [v7.2.0]:     https://github.com/tuna/thuthesis/compare/v7.1.0...v7.2.0
 [v7.1.0]:     https://github.com/tuna/thuthesis/compare/v7.0.0...v7.1.0
 [v7.0.0]:     https://github.com/tuna/thuthesis/compare/v6.1.3...v7.0.0

Modified: trunk/Master/texmf-dist/doc/latex/thuthesis/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/thuthesis/README.md	2021-03-21 21:42:35 UTC (rev 58593)
+++ trunk/Master/texmf-dist/doc/latex/thuthesis/README.md	2021-03-21 21:42:58 UTC (rev 58594)
@@ -84,7 +84,8 @@
 
 ---
 
-# ThuThesis?
+# ThuThesis
+
 **ThuThesis** is an abbreviation of **T**sing**h**ua **U**niversity **Thesis** LaTeX Template.
 
 This package establishes a simple and easy-to-use LaTeX template for Tsinghua dissertations, including general undergraduate research papers, masters theses, doctoral dissertations, and postdoctoral reports. An English translation of this README follows the Chinese below.

Modified: trunk/Master/texmf-dist/doc/latex/thuthesis/data/chap03.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/thuthesis/data/chap03.tex	2021-03-21 21:42:35 UTC (rev 58593)
+++ trunk/Master/texmf-dist/doc/latex/thuthesis/data/chap03.tex	2021-03-21 21:42:58 UTC (rev 58594)
@@ -4,18 +4,50 @@
 
 \section{数学符号}
 
-中文论文的数学符号默认采用 GB/T 3102.11—1993《物理科学和技术中使用的数学符号》。
-该标准参照采纳 ISO 31-11:1992(目前最新版为 ISO 80000-2:2019),
-但是与 \TeX{} 默认的英美国家的符号习惯有许多差异,主要有:
+中文论文的数学符号默认遵循 GB/T 3102.11—1993《物理科学和技术中使用的数学符号》
+\footnote{原 GB 3102.11—1993,自 2017 年 3 月 23 日起,该标准转为推荐性标准。}。
+该标准参照采纳 ISO 31-11:1992 \footnote{目前已更新为 ISO 80000-2:2019。},
+但是与 \TeX{} 默认的美国数学学会(AMS)的符号习惯有所区别。
+具体地来说主要有以下差异:
 \begin{enumerate}
-  \item 大写希腊字母默认为斜体,如 $\Delta$、$\Sigma$,
-    有限增量符号 $\increment$(\cs{increment})固定使用正体。
-  \item 数学常数和特殊函数名用正体,如 $\uppi = 3.14\dots$;$\symup{e} = 2.718\dots$。
+  \item 大写希腊字母默认为斜体,如
+    \begin{equation*}
+      \Gamma \Delta \Theta \Lambda \Xi \Pi \Sigma \Upsilon \Phi \Psi \Omega.
+    \end{equation*}
+    注意有限增量符号 $\increment$ 固定使用正体,模板提供了 \cs{increment} 命令。
+  \item 小于等于号和大于等于号使用倾斜的字形 $\le$、$\ge$。
+  \item 积分号使用正体,比如 $\int$、$\oint$。
+  \item 行间公式积分号的上下限位于积分号的上下两端,比如
+    \begin{equation*}
+      \int_a^b f(x) \dif x.
+    \end{equation*}
+    行内公式为了版面的美观,统一居右侧,如 $\int_a^b f(x) \dif x$ 。
+  \item
+    偏微分符号 $\partial$ 使用正体。
+  \item
+    省略号 \cs{dots} 按照中文的习惯固定居中,比如
+    \begin{equation*}
+      1, 2, \dots, n \quad 1 + 2 + \dots + n.
+    \end{equation*}
+  \item
+    实部 $\Re$ 和虚部 $\Im$ 的字体使用罗马体。
+\end{enumerate}
+
+以上数学符号样式的差异可以在模板中统一设置。
+另外国标还有一些与 AMS 不同的符号使用习惯,需要用户在写作时进行处理:
+\begin{enumerate}
+  \item 数学常数和特殊函数名用正体,如
+    \begin{equation*}
+      \uppi = 3.14\dots; \quad
+      \symup{i}^2 = -1; \quad
+      \symup{e} = \lim_{n \to \infty} \left( 1 + \frac{1}{n} \right)^n.
+    \end{equation*}
   \item 微分号使用正体,比如 $\dif y / \dif x$。
-  \item 向量、矩阵和张量用粗斜体(\cs{symbf}),如 $\symbf{x}$、$\symbf{\Sigma}$。
-  \item 省略号按照中文的习惯固定居中,如 $1, 2, \dots, n$。
+  \item 向量、矩阵和张量用粗斜体(\cs{symbf}),如 $\symbf{x}$、$\symbf{\Sigma}$、$\symbfsf{T}$。
+  \item 自然对数用 $\ln x$ 不用 $\log x$。
 \end{enumerate}
 
+
 英文论文的数学符号使用 \TeX{} 默认的样式。
 如果有必要,也可以通过设置 \verb|math-style| 选择数学符号样式。
 

Modified: trunk/Master/texmf-dist/doc/latex/thuthesis/spine.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/thuthesis/thusetup.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/thuthesis/thusetup.tex	2021-03-21 21:42:35 UTC (rev 58593)
+++ trunk/Master/texmf-dist/doc/latex/thuthesis/thusetup.tex	2021-03-21 21:42:58 UTC (rev 58594)
@@ -115,8 +115,8 @@
 \thusetup{
   %
   % 数学字体
-  % math-style = GB,
-  math-font  = xits,
+  % math-style = GB,  % GB | ISO | TeX
+  math-font  = xits,  % sitx | xits | libertinus
 }
 
 % 可以使用 nomencl 生成符号和缩略语说明

Modified: trunk/Master/texmf-dist/doc/latex/thuthesis/thuthesis-example.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/thuthesis/thuthesis.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx	2021-03-21 21:42:35 UTC (rev 58593)
+++ trunk/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx	2021-03-21 21:42:58 UTC (rev 58594)
@@ -14,7 +14,7 @@
 %
 % \iffalse
 %<*driver>
-\ProvidesFile{thuthesis.dtx}[2021/03/12 7.2.0 Tsinghua University Thesis Template]
+\ProvidesFile{thuthesis.dtx}[2021/03/21 7.2.1 Tsinghua University Thesis Template]
 \documentclass{ltxdoc}
 \usepackage{dtx-style}
 
@@ -773,8 +773,9 @@
 %
 % \subsubsection{数学符号}
 % \label{sec:math}
-% 中文论文的数学符号默认遵循 GB/T 3102.11—1993《物理科学和技术中使用的数学符号》。
-% 该标准参照采纳 ISO 31-11:1992,
+% 中文论文的数学符号默认遵循 GB/T 3102.11—1993《物理科学和技术中使用的数学符号》
+% \footnote{原 GB 3102.11—1993,自 2017 年 3 月 23 日起,该标准转为推荐性标准。}。
+% 该标准参照采纳 ISO 31-11:1992 \footnote{目前已更新为 ISO 80000-2:2019。},
 % 但是与 \TeX{} 默认的美国数学学会(AMS)的习惯有许多差异。
 % 这将在下文详细论述。
 %
@@ -810,6 +811,8 @@
 %     省略号 \cs{dots} 的样式,可选:\option{centered}(按照中文的习惯固定居中)、
 %     \option{lower} 和 \option{AMS}(取决于前后符号的位置)。
 %     其他的省略号命令如 \cs{lots}、\cs{cdots} 则不受影响。
+%   \item \DescribeOption{real-part}
+%     实部 \cs{Re} 和虚部 \cs{Im} 的字体,可选:\option{roman} 和 \option{fraktur}。
 % \end{enumerate}
 %
 % 如果数学符号选择国标样式 |math-style = GB|,相当于设置了
@@ -821,6 +824,7 @@
 %     integral-limits    = true,
 %     partial            = upright,
 %     math-ellipsis      = centered,
+%     real-part          = roman,
 %   }
 % \end{latex}
 %
@@ -1082,8 +1086,7 @@
 % \end{latex}
 % 注意,本科生插入扫描页时总是会加页码,不受该选项控制。
 %
-% 研究生不存在空白页的问题,所以在编译声明页时总是会加上页眉和页脚,
-% 而在插入扫描页时则不再添加,不受 \option{page-style} 的控制。
+% 研究生不存在空白页的问题,但是为了灵活性也允许用户选择是否添加页眉和页脚。
 %
 % \subsubsection{附录}
 %
@@ -1243,7 +1246,7 @@
 %    \begin{macrocode}
 %<cls>\NeedsTeXFormat{LaTeX2e}[2017/04/15]
 %<cls>\ProvidesClass{thuthesis}
-%<cls>[2021/03/12 7.2.0 Tsinghua University Thesis Template]
+%<cls>[2021/03/21 7.2.1 Tsinghua University Thesis Template]
 %    \end{macrocode}
 %
 % 报错
@@ -1299,7 +1302,7 @@
 %<*cls>
 \hyphenation{Thu-Thesis}
 \def\thuthesis{ThuThesis}
-\def\version{7.2.0}
+\def\version{7.2.1}
 \RequirePackage{kvdefinekeys}
 \RequirePackage{kvsetkeys}
 \RequirePackage{kvoptions}
@@ -1317,7 +1320,6 @@
   \let\thu at setup@hook\@empty
   \kvsetkeys{thu}{#1}%
   \thu at setup@hook
-  \thu at setup@hook
 }
 %    \end{macrocode}
 % \end{macro}
@@ -1545,8 +1547,8 @@
     name = math at font,
     choices = {
       auto,
+      stix,
       xits,
-      stix,
       libertinus,
       newcm,
       lm,
@@ -1604,6 +1606,13 @@
       AMS,
     },
   },
+  real-part = {
+    name = real at part,
+    choices = {
+      roman,
+      fraktur,
+    },
+  },
 %    \end{macrocode}
 %
 % 选择打印版还是用于上传的电子版。
@@ -1785,7 +1794,7 @@
       \thu at error{The "#2" package is incompatible with "#1"}%
     }%
   }%
-  }
+}
 \thu at package@conflict{biblatex}{bibunits}
 \thu at package@conflict{biblatex}{chapterbib}
 \thu at package@conflict{biblatex}{cite}
@@ -1816,6 +1825,25 @@
 \thu at package@conflict{newtxmath}{upgreek}
 %    \end{macrocode}
 %
+% \pkg{mathtools} 需要在 \pkg{unicode-math} 前载入,
+% 参考 \url{https://tex.stackexchange.com/q/521394/82731}。
+%    \begin{macrocode}
+\AtBeginOfPackageFile*{mathtools}{
+  \@ifpackageloaded{unicode-math}{
+    \thu at error{The "mathtools" package should be loaded before setting "math-font"}
+  }{}
+}%
+%    \end{macrocode}
+%
+% \pkg{amsthm} 需要在 \pkg{newtx} 前载入,参考 \pkg{newtx} 的文档。
+%    \begin{macrocode}
+\AtBeginOfPackageFile*{amsthm}{
+  \@ifpackageloaded{newtxmath}{
+    \thu at error{The "amsthm" package should be loaded before setting "newtxmath"}
+  }{}
+}%
+%    \end{macrocode}
+%
 % \subsection{页面设置}
 % \label{sec:layout}
 %
@@ -2062,6 +2090,116 @@
 %
 % \subsection{字体}
 % \label{sec:font}
+%
+% \subsubsection{字号}
+%
+% \begin{macro}{\normalsize}
+% 正文小四号(12bp)字,行距为固定值 20 bp。
+% 其他字号的行距按照相同的比例设置。
+%
+% 注意重定义 \cs{normalsize} 应在 \pkg{unicode-math} 的 \cs{setmathfont} 前。
+%
+% 表达式行的行距为单倍行距,段前空 6 磅,段后空 6 磅。
+%    \begin{macrocode}
+\renewcommand\normalsize{%
+  \@setfontsize\normalsize{12bp}{20bp}%
+  \abovedisplayskip 6bp%
+  \abovedisplayshortskip 6bp%
+  \belowdisplayshortskip 6bp%
+  \belowdisplayskip \abovedisplayskip
+}
+\normalsize
+\ifx\MakeRobust\@undefined \else
+    \MakeRobust\normalsize
+\fi
+\DeclareRobustCommand\small{%
+   \@setfontsize\small{10.5bp}{17.5bp}%
+   \abovedisplayskip 6bp%
+   \abovedisplayshortskip 6bp%
+   \belowdisplayshortskip 6bp%
+   \def\@listi{\leftmargin\leftmargini
+               \topsep \z at skip
+               \parsep \z at skip
+               \itemsep \z at skip}%
+   \belowdisplayskip \abovedisplayskip
+}
+\DeclareRobustCommand\footnotesize{%
+   \@setfontsize\footnotesize{9bp}{15bp}%
+   \abovedisplayskip 6bp%
+   \abovedisplayshortskip 6bp%
+   \belowdisplayshortskip 6bp%
+   \def\@listi{\leftmargin\leftmargini
+               \topsep \z at skip
+               \parsep \z at skip
+               \itemsep \z at skip}%
+   \belowdisplayskip \abovedisplayskip
+}
+\DeclareRobustCommand\scriptsize{\@setfontsize\scriptsize{7.5bp}{12.5bp}}
+\DeclareRobustCommand\tiny{\@setfontsize\tiny{6.5bp}{10.83bp}}
+\DeclareRobustCommand\large{\@setfontsize\large{15bp}{25bp}}
+\DeclareRobustCommand\Large{\@setfontsize\Large{18bp}{30bp}}
+\DeclareRobustCommand\LARGE{\@setfontsize\LARGE{22bp}{36.67bp}}
+\DeclareRobustCommand\huge{\@setfontsize\huge{24bp}{40bp}}
+\DeclareRobustCommand\Huge{\@setfontsize\Huge{26bp}{43.33bp}}
+%    \end{macrocode}
+% \end{macro}
+%
+% WORD 中的字号对应该关系如下(1bp = 72.27/72 pt):
+% \begin{center}
+% \begin{longtable}{llll}
+% \toprule
+% 初号 & 42bp & 14.82mm & 42.1575pt \\
+% 小初 & 36bp & 12.70mm & 36.135 pt \\
+% 一号 & 26bp & 9.17mm & 26.0975pt \\
+% 小一 & 24bp & 8.47mm & 24.09pt \\
+% 二号 & 22bp & 7.76mm & 22.0825pt \\
+% 小二 & 18bp & 6.35mm & 18.0675pt \\
+% 三号 & 16bp & 5.64mm & 16.06pt \\
+% 小三 & 15bp & 5.29mm & 15.05625pt \\
+% 四号 & 14bp & 4.94mm & 14.0525pt \\
+% 小四 & 12bp & 4.23mm & 12.045pt \\
+% 五号 & 10.5bp & 3.70mm & 10.59375pt \\
+% 小五 & 9bp & 3.18mm & 9.03375pt \\
+% 六号 & 7.5bp & 2.56mm & \\
+% 小六 & 6.5bp & 2.29mm & \\
+% 七号 & 5.5bp & 1.94mm & \\
+% 八号 & 5bp & 1.76mm & \\\bottomrule
+% \end{longtable}
+% \end{center}
+%
+% \begin{macro}{\thu at def@fontsize}
+% 根据习惯定义字号。用法:
+%
+% \cs{thu at def@fontsize}\marg{字号名称}\marg{磅数}
+%
+% 避免了字号选择和行距的紧耦合。所有字号定义时为单倍行距,并提供选项指定行距倍数。
+%    \begin{macrocode}
+\def\thu at def@fontsize#1#2{%
+  \expandafter\newcommand\csname #1\endcsname[1][1.3]{%
+    \fontsize{#2}{##1\dimexpr #2}\selectfont}}
+%    \end{macrocode}
+% \end{macro}
+%
+% 一组字号定义。
+%    \begin{macrocode}
+\thu at def@fontsize{chuhao}{42bp}
+\thu at def@fontsize{xiaochu}{36bp}
+\thu at def@fontsize{yihao}{26bp}
+\thu at def@fontsize{xiaoyi}{24bp}
+\thu at def@fontsize{erhao}{22bp}
+\thu at def@fontsize{xiaoer}{18bp}
+\thu at def@fontsize{sanhao}{16bp}
+\thu at def@fontsize{xiaosan}{15bp}
+\thu at def@fontsize{sihao}{14bp}
+\thu at def@fontsize{xiaosi}{12bp}
+\thu at def@fontsize{wuhao}{10.5bp}
+\thu at def@fontsize{xiaowu}{9bp}
+\thu at def@fontsize{liuhao}{7.5bp}
+\thu at def@fontsize{xiaoliu}{6.5bp}
+\thu at def@fontsize{qihao}{5.5bp}
+\thu at def@fontsize{bahao}{5bp}
+%    \end{macrocode}
+%
 % 检测系统。
 %    \begin{macrocode}
 \ifthu at system@auto
@@ -2123,75 +2261,8 @@
 \fi
 %    \end{macrocode}
 %
-% STIX 字体的文件名在 v2.10 2020-12-19 从
-% \file{STIXTwoText-Regular.otf}、\file{STIX2Math.otf} 分别改为
-% \file{STIXTwoText-Regular.otf}、\file{STIXTwoMath-Regular.otf}。
-% 需要进行判断。
-%
-% XITS 字体的文件名在 v1.109 2018-09-30
-% 从 \file{xits-regular.otf}、\file{xits-math.otf} 分别改为
-% \file{XITS-Regular.otf}、\file{XITSMath-Regular.otf}。
-%
-% Libertinus 的文件名在 v6.7 2019-04-03 从小写改为驼峰式,
-% 在大小写敏感的平台上需要进行判断。
+% Times New Roman + Arial
 %    \begin{macrocode}
-\let\thu at font@family at stix\@empty
-\newcommand\thu at set@stix at names{%
-  \ifx\thu at font@family at stix\@empty
-    \IfFontExistsTF{STIXTwoText-Regular.otf}{%
-      \gdef\thu at font@family at stix{STIXTwoText}%
-      \gdef\thu at font@name at stix@math{STIXTwoMath-Regular}%
-    }{%
-      \gdef\thu at font@family at stix{STIX2Text}%
-      \gdef\thu at font@name at stix@math{STIX2Math}%
-    }%
-  \fi
-}
-\let\thu at font@family at xits\@empty
-\newcommand\thu at set@xits at names{%
-  \ifx\thu at font@family at xits\@empty
-    \IfFontExistsTF{XITSMath-Regular.otf}{%
-      \gdef\thu at font@family at xits{XITS}%
-      \gdef\thu at font@style at xits@rm{Regular}%
-      \gdef\thu at font@style at xits@bf{Bold}%
-      \gdef\thu at font@style at xits@it{Italic}%
-      \gdef\thu at font@style at xits@bfit{BoldItalic}%
-      \gdef\thu at font@name at xits@math{XITSMath-Regular}%
-    }{%
-      \gdef\thu at font@family at xits{xits}%
-      \gdef\thu at font@style at xits@rm{regular}%
-      \gdef\thu at font@style at xits@bf{bold}%
-      \gdef\thu at font@style at xits@it{italic}%
-      \gdef\thu at font@style at xits@bfit{bolditalic}%
-      \gdef\thu at font@name at xits@math{xits-math}%
-    }%
-  \fi
-}
-\let\thu at font@family at libertinus\@empty
-\newcommand\thu at set@libertinus at names{%
-  \ifx\thu at font@family at libertinus\@empty
-    \IfFontExistsTF{LibertinusSerif-Regular.otf}{%
-      \gdef\thu at font@family at libertinus@serif{LibertinusSerif}%
-      \gdef\thu at font@family at libertinus@sans{LibertinusSans}%
-      \gdef\thu at font@name at libertinus@math{LibertinusMath-Regular}%
-      \gdef\thu at font@style at libertinus@rm{Regular}%
-      \gdef\thu at font@style at libertinus@bf{Bold}%
-      \gdef\thu at font@style at libertinus@it{Italic}%
-      \gdef\thu at font@style at libertinus@bfit{BoldItalic}%
-    }{%
-      \gdef\thu at font@family at libertinus@serif{libertinusserif}%
-      \gdef\thu at font@family at libertinus@sans{libertinussans}%
-      \gdef\thu at font@name at libertinus@math{libertinusmath-regular}%
-      \gdef\thu at font@style at libertinus@rm{regular}%
-      \gdef\thu at font@style at libertinus@bf{bold}%
-      \gdef\thu at font@style at libertinus@it{italic}%
-      \gdef\thu at font@style at libertinus@bfit{bolditalic}%
-    }%
-  \fi
-}
-%    \end{macrocode}
-%
-%    \begin{macrocode}
 \newcommand\thu at set@font at times{%
   \setmainfont{Times New Roman}%
   \setsansfont{Arial}%
@@ -2201,6 +2272,10 @@
     \setmonofont{Courier New}[Scale = MatchLowercase]%
   \fi
 }
+%    \end{macrocode}
+%
+% TeX Gyre Termes
+%    \begin{macrocode}
 \newcommand\thu at set@font at termes{%
   \setmainfont{texgyretermes}[
     Extension      = .otf,
@@ -2225,9 +2300,29 @@
     BoldFont       = *-bold,
     ItalicFont     = *-italic,
     BoldItalicFont = *-bolditalic,
+    Scale          = MatchLowercase,
     Ligatures      = CommonOff,
   ]%
 }
+%    \end{macrocode}
+%
+% STIX Two 字体。
+% STIX 文件名在 v2.10 2020-12-19 从
+% \file{STIX2Text-Regular.otf}、\file{STIX2Math.otf} 分别改为
+% \file{STIXTwoText-Regular.otf}、\file{STIXTwoMath-Regular.otf}。
+%    \begin{macrocode}
+\let\thu at font@family at stix\@empty
+\newcommand\thu at set@stix at names{%
+  \ifx\thu at font@family at stix\@empty
+    \IfFontExistsTF{STIXTwoText-Regular.otf}{%
+      \gdef\thu at font@family at stix{STIXTwoText}%
+      \gdef\thu at font@name at stix@math{STIXTwoMath-Regular}%
+    }{%
+      \gdef\thu at font@family at stix{STIX2Text}%
+      \gdef\thu at font@name at stix@math{STIX2Math}%
+    }%
+  \fi
+}
 \newcommand\thu at set@font at stix{%
   \thu at set@stix at names
   \setmainfont{\thu at font@family at stix}[
@@ -2239,6 +2334,33 @@
   ]%
   \thu at set@texgyre at sans@mono
 }
+%    \end{macrocode}
+%
+% XITS 字体。
+% XITS 的文件名在 v1.109 2018-09-30
+% 从 \file{xits-regular.otf}、\file{xits-math.otf} 分别改为
+% \file{XITS-Regular.otf}、\file{XITSMath-Regular.otf}。
+%    \begin{macrocode}
+\let\thu at font@family at xits\@empty
+\newcommand\thu at set@xits at names{%
+  \ifx\thu at font@family at xits\@empty
+    \IfFontExistsTF{XITSMath-Regular.otf}{%
+      \gdef\thu at font@family at xits{XITS}%
+      \gdef\thu at font@style at xits@rm{Regular}%
+      \gdef\thu at font@style at xits@bf{Bold}%
+      \gdef\thu at font@style at xits@it{Italic}%
+      \gdef\thu at font@style at xits@bfit{BoldItalic}%
+      \gdef\thu at font@name at xits@math{XITSMath-Regular}%
+    }{%
+      \gdef\thu at font@family at xits{xits}%
+      \gdef\thu at font@style at xits@rm{regular}%
+      \gdef\thu at font@style at xits@bf{bold}%
+      \gdef\thu at font@style at xits@it{italic}%
+      \gdef\thu at font@style at xits@bfit{bolditalic}%
+      \gdef\thu at font@name at xits@math{xits-math}%
+    }%
+  \fi
+}
 \newcommand\thu at set@font at xits{%
   \thu at set@xits at names
   \setmainfont{\thu at font@family at xits}[
@@ -2250,6 +2372,34 @@
   ]%
   \thu at set@texgyre at sans@mono
 }
+%    \end{macrocode}
+%
+% Libertinus 字体。
+% Libertinus 的文件名在 v6.7 2019-04-03 从小写改为驼峰式,
+% 在大小写敏感的平台上需要进行判断。
+%    \begin{macrocode}
+\let\thu at font@family at libertinus\@empty
+\newcommand\thu at set@libertinus at names{%
+  \ifx\thu at font@family at libertinus\@empty
+    \IfFontExistsTF{LibertinusSerif-Regular.otf}{%
+      \gdef\thu at font@family at libertinus@serif{LibertinusSerif}%
+      \gdef\thu at font@family at libertinus@sans{LibertinusSans}%
+      \gdef\thu at font@name at libertinus@math{LibertinusMath-Regular}%
+      \gdef\thu at font@style at libertinus@rm{Regular}%
+      \gdef\thu at font@style at libertinus@bf{Bold}%
+      \gdef\thu at font@style at libertinus@it{Italic}%
+      \gdef\thu at font@style at libertinus@bfit{BoldItalic}%
+    }{%
+      \gdef\thu at font@family at libertinus@serif{libertinusserif}%
+      \gdef\thu at font@family at libertinus@sans{libertinussans}%
+      \gdef\thu at font@name at libertinus@math{libertinusmath-regular}%
+      \gdef\thu at font@style at libertinus@rm{regular}%
+      \gdef\thu at font@style at libertinus@bf{bold}%
+      \gdef\thu at font@style at libertinus@it{italic}%
+      \gdef\thu at font@style at libertinus@bfit{bolditalic}%
+    }%
+  \fi
+}
 \newcommand\thu at set@font at libertinus{%
   \thu at set@libertinus at names
   \setmainfont{\thu at font@family at libertinus@serif}[
@@ -2273,8 +2423,12 @@
     BoldItalicFont = *-boldoblique,
   ]%
 }
+%    \end{macrocode}
+%
+% New Computer Modern
+%    \begin{macrocode}
 \newcommand\thu at set@font at newcm{%
-  \setmathrm{NewCM10}[
+  \setmainfont{NewCM10}[
     Extension      = .otf,
     UprightFont    = *-Book,
     BoldFont       = *-Bold,
@@ -2281,7 +2435,7 @@
     ItalicFont     = *-BookItalic,
     BoldItalicFont = *-BoldItalic,
   ]%
-  \setmathsf{NewCMSans10}[
+  \setsansfont{NewCMSans10}[
     Extension         = .otf,
     UprightFont       = *-Book,
     BoldFont          = *-Bold,
@@ -2288,7 +2442,7 @@
     ItalicFont        = *-BookOblique,
     BoldItalicFont    = *-BoldOblique,
   ]%
-  \setmathtt{NewCMMono10}[
+  \setmonofont{NewCMMono10}[
     Extension           = .otf,
     UprightFont         = *-Book,
     ItalicFont          = *-BookItalic,
@@ -2296,6 +2450,10 @@
     BoldItalicFont      = *-BoldOblique,
   ]%
 }
+%    \end{macrocode}
+%
+% Latin Modern
+%    \begin{macrocode}
 \newcommand\thu at set@font at lm{%
   \setmainfont{lmroman10}[
     Extension      = .otf,
@@ -2347,8 +2505,11 @@
     \fi
   \fi
 \fi
+%    \end{macrocode}
+%
+% Windows 的中易字体。
+%    \begin{macrocode}
 \newcommand\thu at set@cjk at font@windows{%
-  \defaultCJKfontfeatures{Script=CJK}%
   \xeCJKsetup{EmboldenFactor=3}%
   \setCJKmainfont{SimSun}[
     AutoFakeBold = true,
@@ -2361,34 +2522,45 @@
   \setCJKfamilyfont{zhkai}{KaiTi}%
   \setCJKfamilyfont{zhfs}{FangSong}%
 }
+%    \end{macrocode}
+%
+% macOS 的华文字体。
+%    \begin{macrocode}
 \newcommand\thu at set@cjk at font@mac{%
   \defaultCJKfontfeatures{}%
   \setCJKmainfont{Songti SC}[
     UprightFont    = * Light,
     BoldFont       = * Bold,
-    ItalicFont     = Kaiti SC,
+    ItalicFont     = Kaiti SC Regular,
     BoldItalicFont = Kaiti SC Bold,
   ]%
-  \setCJKsansfont{Heiti SC}[BoldFont=* Medium]%
+  \setCJKsansfont{Heiti SC}[
+    UprightFont    = * Light,
+    BoldFont       = * Medium,
+  ]%
   \setCJKmonofont{STFangsong}
   \setCJKfamilyfont{zhsong}{Songti SC}[
-    UprightFont = * Light,
-      BoldFont  = * Bold,
+    UprightFont    = * Light,
+    BoldFont       = * Bold,
   ]%
   \setCJKfamilyfont{zhhei}{Heiti SC}[
-    UprightFont = * Light,
-    BoldFont    = * Medium,
+    UprightFont    = * Light,
+    BoldFont       = * Medium,
   ]%
   \setCJKfamilyfont{zhfs}{STFangsong}%
-  \setCJKfamilyfont{zhkai}{Kaiti SC}[BoldFont = * Bold]%
+  \setCJKfamilyfont{zhkai}{Kaiti SC}[
+    UprightFont    = * Regular,
+    BoldFont       = * Bold,
+  ]%
   \setCJKfamilyfont{zhli}{Baoli SC}%
   \setCJKfamilyfont{zhyuan}{Yuanyi SC}[
-    UprightFont = * Light,
-    BoldFont    = * Bold,
+    UprightFont    = * Light,
+    BoldFont       = * Bold,
   ]%
 }
 %    \end{macrocode}
 %
+% 思源字体。
 % 注意 Noto CJK 的 regular 字重名字不带“Regular”。
 %    \begin{macrocode}
 \newcommand\thu at set@cjk at font@noto{%
@@ -2425,6 +2597,10 @@
     UprightFont    = *-Regular,
   ]%
 }
+%    \end{macrocode}
+%
+% Fandol 字体。
+%    \begin{macrocode}
 \newcommand\thu at set@cjk at font@fandol{%
   \defaultCJKfontfeatures{}%
   \setCJKmainfont{FandolSong}[
@@ -2432,6 +2608,7 @@
     UprightFont = *-Regular,
     BoldFont    = *-Bold,
     ItalicFont  = FandolKai-Regular,
+    ItalicFeatures = {Extension = .otf},
   ]%
   \setCJKsansfont{FandolHei}[
     Extension   = .otf,
@@ -2487,6 +2664,7 @@
       integral-limits    = false,
       partial            = italic,
       math-ellipsis      = AMS,
+      real-part          = fraktur,
     }%
   \else
     \thusetup{
@@ -2494,19 +2672,20 @@
       integral        = upright,
       integral-limits = true,
       partial         = upright,
+      real-part       = roman,
     }%
     \ifthu at math@style at ISO
       \thusetup{
         less-than-or-equal = horizontal,
         math-ellipsis      = lower,
-    }%
-  \else
+      }%
+    \else
       \ifthu at math@style at GB
         \thusetup{
           less-than-or-equal = slanted,
           math-ellipsis      = centered,
-    }%
-  \fi
+        }%
+      \fi
     \fi
   \fi
 }
@@ -2587,6 +2766,19 @@
     \DeclareRobustCommand\mathellipsis{\mathinner{\unicodeellipsis}}%
   \fi
 }
+\newcommand\thu at set@unimath at real@part{%
+  \ifthu at real@part at roman
+    \AtBeginDocument{%
+      \def\Re{\operatorname{Re}}%
+      \def\Im{\operatorname{Im}}%
+    }%
+  \else
+    \AtBeginDocument{%
+      \let\Re\thu at save@Re
+      \let\Im\thu at save@Im
+    }%
+  \fi
+}
 \newcommand\thu at set@unimath at style{%
   \ifthu at uppercase@greek at upright
     \unimathsetup{math-style = TeX}%
@@ -2610,6 +2802,7 @@
     \fi
   \fi
   \thu at set@unimath at ellipsis
+  \thu at set@unimath at real@part
 }
 %    \end{macrocode}
 %
@@ -2621,6 +2814,8 @@
     \AtBeginDocument{%
       \let\thu at save@leq\leq
       \let\thu at save@geq\geq
+      \let\thu at save@Re\Re
+      \let\thu at save@Im\Im
     }%
 %    \end{macrocode}
 %
@@ -2646,7 +2841,24 @@
 }
 %    \end{macrocode}
 %
+% STIX Two Math
 %    \begin{macrocode}
+\newcommand\thu at set@math at font@stix{%
+  \thu at set@stix at names
+  \setmathfont{\thu at font@name at stix@math}[
+    Extension    = .otf,
+    StylisticSet = \thu at xits@integral at stylistic@set,
+  ]%
+  \setmathfont{\thu at font@name at stix@math}[
+    Extension    = .otf,
+    StylisticSet = 1,
+    range        = {scr,bfscr},
+  ]%
+}
+%    \end{macrocode}
+%
+% XITS Math
+%    \begin{macrocode}
 \newcommand\thu at xits@integral at stylistic@set{%
   \ifthu at integral@upright
     8%
@@ -2664,51 +2876,26 @@
     range        = {cal,bfcal},
   ]%
 }
-\newcommand\thu at set@math at font@stix{%
-  \thu at set@stix at names
-  \setmathfont{\thu at font@name at stix@math}[
-    Extension    = .otf,
-    StylisticSet = \thu at xits@integral at stylistic@set,
-  ]%
-  \setmathfont{\thu at font@name at stix@math}[
-    Extension    = .otf,
-    StylisticSet = 1,
-    range        = {scr,bfscr},
-  ]%
-}
+%    \end{macrocode}
+%
+% Libertinus Math
+%    \begin{macrocode}
 \newcommand\thu at libertinus@integral at stylistic@set{%
-  \ifthu at integral@italic
+  \ifthu at integral@slanted
     8%
   \fi
 }
 \newcommand\thu at set@math at font@libertinus{%
   \thu at set@libertinus at names
-  \setmathfont{\thu at font@name at libertinus@math .otf}%
-}
-\newcommand\thu at set@math at font@lm{%
-  \setmathfont{latinmodern-math}[Extension=.otf]%
-  \setmathrm{lmroman10}[
-    Extension      = .otf,
-    UprightFont    = *-regular,
-    BoldFont       = *-bold,
-    ItalicFont     = *-italic,
-    BoldItalicFont = *-bolditalic,
+  \setmathfont{\thu at font@name at libertinus@math}[
+    Extension    = .otf,
+    StylisticSet = \thu at libertinus@integral at stylistic@set,
   ]%
-  \setmathsf{lmsans10}[
-    Extension      = .otf,
-    UprightFont    = *-regular,
-    BoldFont       = *-bold,
-    ItalicFont     = *-oblique,
-    BoldItalicFont = *-boldoblique,
-  ]%
-  \setmathtt{lmmonolt10}[
-    Extension      = .otf,
-    UprightFont    = *-regular,
-    BoldFont       = *-bold,
-    ItalicFont     = *-oblique,
-    BoldItalicFont = *-boldoblique,
-  ]%
 }
+%    \end{macrocode}
+%
+% New Computer Modern Math
+%    \begin{macrocode}
 \newcommand\thu at newcm@integral at stylistic@set{%
   \ifthu at integral@upright
     2%
@@ -2748,7 +2935,36 @@
 }
 %    \end{macrocode}
 %
+% Latin Modern Math
 %    \begin{macrocode}
+\newcommand\thu at set@math at font@lm{%
+  \setmathfont{latinmodern-math}[Extension=.otf]%
+  \setmathrm{lmroman10}[
+    Extension      = .otf,
+    UprightFont    = *-regular,
+    BoldFont       = *-bold,
+    ItalicFont     = *-italic,
+    BoldItalicFont = *-bolditalic,
+  ]%
+  \setmathsf{lmsans10}[
+    Extension      = .otf,
+    UprightFont    = *-regular,
+    BoldFont       = *-bold,
+    ItalicFont     = *-oblique,
+    BoldItalicFont = *-boldoblique,
+  ]%
+  \setmathtt{lmmonolt10}[
+    Extension      = .otf,
+    UprightFont    = *-regular,
+    BoldFont       = *-bold,
+    ItalicFont     = *-oblique,
+    BoldItalicFont = *-boldoblique,
+  ]%
+}
+%    \end{macrocode}
+%
+% NewTX Math
+%    \begin{macrocode}
 \newcommand\thu at set@math at font@newtx{%
   \ifthu at font@newtx\else
     \let\thu at save@encodingdefault\encodingdefault
@@ -2787,6 +3003,12 @@
   \else
     \DeclareRobustCommand\mathellipsis{\mathinner{\ldotp\ldotp\ldotp}}%
   \fi
+  \let\thu at save@Re\Re
+  \let\thu at save@Im\Im
+  \ifthu at real@part at roman
+    \def\Re{\operatorname{Re}}%
+    \def\Im{\operatorname{Im}}%
+  \fi
   \RequirePackage{bm}%
   \ifthu at font@newtx\else
     \let\encodingdefault\thu at save@encodingdefault
@@ -2823,114 +3045,7 @@
 \AtEndPreamble{\thu at set@math at font@auto}
 %    \end{macrocode}
 %
-% \subsubsection{字号}
 %
-% \begin{macro}{\normalsize}
-% 正文小四号(12bp)字,行距为固定值 20 bp。
-% 其他字号的行距按照相同的比例设置。
-%
-% 表达式行的行距为单倍行距,段前空 6 磅,段后空 6 磅。
-%    \begin{macrocode}
-\renewcommand\normalsize{%
-  \@setfontsize\normalsize{12bp}{20bp}%
-  \abovedisplayskip 6bp%
-  \abovedisplayshortskip 6bp%
-  \belowdisplayshortskip 6bp%
-  \belowdisplayskip \abovedisplayskip
-}
-\normalsize
-\ifx\MakeRobust\@undefined \else
-    \MakeRobust\normalsize
-\fi
-\DeclareRobustCommand\small{%
-   \@setfontsize\small{10.5bp}{17.5bp}%
-   \abovedisplayskip 6bp%
-   \abovedisplayshortskip 6bp%
-   \belowdisplayshortskip 6bp%
-   \def\@listi{\leftmargin\leftmargini
-               \topsep \z at skip
-               \parsep \z at skip
-               \itemsep \z at skip}%
-   \belowdisplayskip \abovedisplayskip
-}
-\DeclareRobustCommand\footnotesize{%
-   \@setfontsize\footnotesize{9bp}{15bp}%
-   \abovedisplayskip 6bp%
-   \abovedisplayshortskip 6bp%
-   \belowdisplayshortskip 6bp%
-   \def\@listi{\leftmargin\leftmargini
-               \topsep \z at skip
-               \parsep \z at skip
-               \itemsep \z at skip}%
-   \belowdisplayskip \abovedisplayskip
-}
-\DeclareRobustCommand\scriptsize{\@setfontsize\scriptsize{7.5bp}{12.5bp}}
-\DeclareRobustCommand\tiny{\@setfontsize\tiny{6.5bp}{10.83bp}}
-\DeclareRobustCommand\large{\@setfontsize\large{15bp}{25bp}}
-\DeclareRobustCommand\Large{\@setfontsize\Large{18bp}{30bp}}
-\DeclareRobustCommand\LARGE{\@setfontsize\LARGE{22bp}{36.67bp}}
-\DeclareRobustCommand\huge{\@setfontsize\huge{24bp}{40bp}}
-\DeclareRobustCommand\Huge{\@setfontsize\Huge{26bp}{43.33bp}}
-%    \end{macrocode}
-% \end{macro}
-%
-% WORD 中的字号对应该关系如下(1bp = 72.27/72 pt):
-% \begin{center}
-% \begin{longtable}{llll}
-% \toprule
-% 初号 & 42bp & 14.82mm & 42.1575pt \\
-% 小初 & 36bp & 12.70mm & 36.135 pt \\
-% 一号 & 26bp & 9.17mm & 26.0975pt \\
-% 小一 & 24bp & 8.47mm & 24.09pt \\
-% 二号 & 22bp & 7.76mm & 22.0825pt \\
-% 小二 & 18bp & 6.35mm & 18.0675pt \\
-% 三号 & 16bp & 5.64mm & 16.06pt \\
-% 小三 & 15bp & 5.29mm & 15.05625pt \\
-% 四号 & 14bp & 4.94mm & 14.0525pt \\
-% 小四 & 12bp & 4.23mm & 12.045pt \\
-% 五号 & 10.5bp & 3.70mm & 10.59375pt \\
-% 小五 & 9bp & 3.18mm & 9.03375pt \\
-% 六号 & 7.5bp & 2.56mm & \\
-% 小六 & 6.5bp & 2.29mm & \\
-% 七号 & 5.5bp & 1.94mm & \\
-% 八号 & 5bp & 1.76mm & \\\bottomrule
-% \end{longtable}
-% \end{center}
-%
-% \begin{macro}{\thu at def@fontsize}
-% 根据习惯定义字号。用法:
-%
-% \cs{thu at def@fontsize}\marg{字号名称}\marg{磅数}
-%
-% 避免了字号选择和行距的紧耦合。所有字号定义时为单倍行距,并提供选项指定行距倍数。
-%    \begin{macrocode}
-\def\thu at def@fontsize#1#2{%
-  \expandafter\newcommand\csname #1\endcsname[1][1.3]{%
-    \fontsize{#2}{##1\dimexpr #2}\selectfont}}
-%    \end{macrocode}
-% \end{macro}
-%
-% 一组字号定义。
-%    \begin{macrocode}
-\thu at def@fontsize{chuhao}{42bp}
-\thu at def@fontsize{xiaochu}{36bp}
-\thu at def@fontsize{yihao}{26bp}
-\thu at def@fontsize{xiaoyi}{24bp}
-\thu at def@fontsize{erhao}{22bp}
-\thu at def@fontsize{xiaoer}{18bp}
-\thu at def@fontsize{sanhao}{16bp}
-\thu at def@fontsize{xiaosan}{15bp}
-\thu at def@fontsize{sihao}{14bp}
-\thu at def@fontsize{xiaosi}{12bp}
-\thu at def@fontsize{wuhao}{10.5bp}
-\thu at def@fontsize{xiaowu}{9bp}
-\thu at def@fontsize{liuhao}{7.5bp}
-\thu at def@fontsize{xiaoliu}{6.5bp}
-\thu at def@fontsize{qihao}{5.5bp}
-\thu at def@fontsize{bahao}{5bp}
-%    \end{macrocode}
-%
-%
 % \subsection{主文档格式}
 % \label{sec:mainbody}
 %
@@ -3238,9 +3353,9 @@
 %
 % 设置浮动对象和文字之间的距离
 %    \begin{macrocode}
-\setlength{\floatsep}{6bp}
-\setlength{\textfloatsep}{6bp}
-\setlength{\intextsep}{6bp}
+\setlength{\floatsep}{12\p@ \@plus 2\p@ \@minus 2\p@}
+\setlength{\textfloatsep}{12\p@ \@plus 2\p@ \@minus 2\p@}
+\setlength{\intextsep}{12\p@ \@plus 2\p@ \@minus 2\p@}
 \setlength{\@fptop}{0bp \@plus1.0fil}
 \setlength{\@fpsep}{12bp \@plus2.0fil}
 \setlength{\@fpbot}{0bp \@plus1.0fil}
@@ -3353,7 +3468,7 @@
   font           = thu,
   labelsep       = quad,
   aboveskip      = 6bp,
-  belowskip      = 6bp,
+  belowskip      = 0bp,
   figureposition = bottom,
   tableposition  = top,
 }
@@ -4972,10 +5087,11 @@
   statement-page-style = {
     name = statement at page@style,
     choices = {
+      auto,
       empty,
       plain,
     },
-    default = empty,
+    default = auto,
   },
   statement-page-number = {
     name = statement at page@number,
@@ -5016,6 +5132,21 @@
     \fi
   }%
   \kvsetkeys{thu at statement}{#1}%
+  \ifthu at statement@page at style@auto
+    \ifx\thu at statement@file\@empty
+      \ifthu at degree@bachelor
+        \thusetup{statement-page-style = empty}%
+      \else
+        \thusetup{statement-page-style = plain}%
+      \fi
+    \else
+      \ifthu at degree@bachelor
+        \thusetup{statement-page-style = plain}%
+      \else
+        \thusetup{statement-page-style = empty}%
+      \fi
+    \fi
+  \fi
   \ifx\thu at statement@file\@empty
     \thusetup{language=chinese}%
     \begingroup
@@ -5028,9 +5159,7 @@
       \fi
       \thu at chapter*{\thu at statement@name}%
     \endgroup
-    \ifthu at degree@bachelor
-      \thispagestyle{\thu at statement@page at style}%
-    \fi
+    \thispagestyle{\thu at statement@page at style}%
     \thu at statement@text\par
     \ifthu at degree@graduate
       \vskip 2cm%
@@ -5045,9 +5174,7 @@
       \markboth{\thu at statement@name}{}%
       \thu at phantomsection
       \addcontentsline{toc}{chapter}{\thu at statement@name}%
-      \ifthu at degree@bachelor\else
-        \thispagestyle{empty}%
-      \fi
+      \thispagestyle{\thu at statement@page at style}%
     }]{\thu at statement@file}%
   \fi
   \ifthu at degree@bachelor

Modified: trunk/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls	2021-03-21 21:42:35 UTC (rev 58593)
+++ trunk/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls	2021-03-21 21:42:58 UTC (rev 58594)
@@ -23,7 +23,7 @@
 %% 
 \NeedsTeXFormat{LaTeX2e}[2017/04/15]
 \ProvidesClass{thuthesis}
-[2021/03/12 7.2.0 Tsinghua University Thesis Template]
+[2021/03/21 7.2.1 Tsinghua University Thesis Template]
 \newcommand\thu at error[1]{%
   \ClassError{thuthesis}{#1}{}%
 }
@@ -56,7 +56,7 @@
 }
 \hyphenation{Thu-Thesis}
 \def\thuthesis{ThuThesis}
-\def\version{7.2.0}
+\def\version{7.2.1}
 \RequirePackage{kvdefinekeys}
 \RequirePackage{kvsetkeys}
 \RequirePackage{kvoptions}
@@ -69,7 +69,6 @@
   \let\thu at setup@hook\@empty
   \kvsetkeys{thu}{#1}%
   \thu at setup@hook
-  \thu at setup@hook
 }
 \newcommand\thu at define@key[1]{%
   \kvsetkeys{thu at key}{#1}%
@@ -213,8 +212,8 @@
     name = math at font,
     choices = {
       auto,
+      stix,
       xits,
-      stix,
       libertinus,
       newcm,
       lm,
@@ -272,6 +271,13 @@
       AMS,
     },
   },
+  real-part = {
+    name = real at part,
+    choices = {
+      roman,
+      fraktur,
+    },
+  },
   output = {
     choices = {
       print,
@@ -349,7 +355,7 @@
       \thu at error{The "#2" package is incompatible with "#1"}%
     }%
   }%
-  }
+}
 \thu at package@conflict{biblatex}{bibunits}
 \thu at package@conflict{biblatex}{chapterbib}
 \thu at package@conflict{biblatex}{cite}
@@ -378,6 +384,16 @@
 \thu at package@conflict{newtxmath}{amssymb}
 \thu at package@conflict{newtxmath}{unicode-math}
 \thu at package@conflict{newtxmath}{upgreek}
+\AtBeginOfPackageFile*{mathtools}{
+  \@ifpackageloaded{unicode-math}{
+    \thu at error{The "mathtools" package should be loaded before setting "math-font"}
+  }{}
+}%
+\AtBeginOfPackageFile*{amsthm}{
+  \@ifpackageloaded{newtxmath}{
+    \thu at error{The "amsthm" package should be loaded before setting "newtxmath"}
+  }{}
+}%
 \geometry{
   paper          = a4paper,  % 210 * 297mm
   marginparwidth = 2cm,
@@ -566,6 +582,65 @@
 }
 \thu at set@punctuations
 \thu at option@hook{language}{\thu at set@punctuations}
+\renewcommand\normalsize{%
+  \@setfontsize\normalsize{12bp}{20bp}%
+  \abovedisplayskip 6bp%
+  \abovedisplayshortskip 6bp%
+  \belowdisplayshortskip 6bp%
+  \belowdisplayskip \abovedisplayskip
+}
+\normalsize
+\ifx\MakeRobust\@undefined \else
+    \MakeRobust\normalsize
+\fi
+\DeclareRobustCommand\small{%
+   \@setfontsize\small{10.5bp}{17.5bp}%
+   \abovedisplayskip 6bp%
+   \abovedisplayshortskip 6bp%
+   \belowdisplayshortskip 6bp%
+   \def\@listi{\leftmargin\leftmargini
+               \topsep \z at skip
+               \parsep \z at skip
+               \itemsep \z at skip}%
+   \belowdisplayskip \abovedisplayskip
+}
+\DeclareRobustCommand\footnotesize{%
+   \@setfontsize\footnotesize{9bp}{15bp}%
+   \abovedisplayskip 6bp%
+   \abovedisplayshortskip 6bp%
+   \belowdisplayshortskip 6bp%
+   \def\@listi{\leftmargin\leftmargini
+               \topsep \z at skip
+               \parsep \z at skip
+               \itemsep \z at skip}%
+   \belowdisplayskip \abovedisplayskip
+}
+\DeclareRobustCommand\scriptsize{\@setfontsize\scriptsize{7.5bp}{12.5bp}}
+\DeclareRobustCommand\tiny{\@setfontsize\tiny{6.5bp}{10.83bp}}
+\DeclareRobustCommand\large{\@setfontsize\large{15bp}{25bp}}
+\DeclareRobustCommand\Large{\@setfontsize\Large{18bp}{30bp}}
+\DeclareRobustCommand\LARGE{\@setfontsize\LARGE{22bp}{36.67bp}}
+\DeclareRobustCommand\huge{\@setfontsize\huge{24bp}{40bp}}
+\DeclareRobustCommand\Huge{\@setfontsize\Huge{26bp}{43.33bp}}
+\def\thu at def@fontsize#1#2{%
+  \expandafter\newcommand\csname #1\endcsname[1][1.3]{%
+    \fontsize{#2}{##1\dimexpr #2}\selectfont}}
+\thu at def@fontsize{chuhao}{42bp}
+\thu at def@fontsize{xiaochu}{36bp}
+\thu at def@fontsize{yihao}{26bp}
+\thu at def@fontsize{xiaoyi}{24bp}
+\thu at def@fontsize{erhao}{22bp}
+\thu at def@fontsize{xiaoer}{18bp}
+\thu at def@fontsize{sanhao}{16bp}
+\thu at def@fontsize{xiaosan}{15bp}
+\thu at def@fontsize{sihao}{14bp}
+\thu at def@fontsize{xiaosi}{12bp}
+\thu at def@fontsize{wuhao}{10.5bp}
+\thu at def@fontsize{xiaowu}{9bp}
+\thu at def@fontsize{liuhao}{7.5bp}
+\thu at def@fontsize{xiaoliu}{6.5bp}
+\thu at def@fontsize{qihao}{5.5bp}
+\thu at def@fontsize{bahao}{5bp}
 \ifthu at system@auto
   \IfFileExists{/System/Library/Fonts/Menlo.ttc}{
     \thusetup{system = mac}
@@ -611,60 +686,6 @@
     \fi
   \fi
 \fi
-\let\thu at font@family at stix\@empty
-\newcommand\thu at set@stix at names{%
-  \ifx\thu at font@family at stix\@empty
-    \IfFontExistsTF{STIXTwoText-Regular.otf}{%
-      \gdef\thu at font@family at stix{STIXTwoText}%
-      \gdef\thu at font@name at stix@math{STIXTwoMath-Regular}%
-    }{%
-      \gdef\thu at font@family at stix{STIX2Text}%
-      \gdef\thu at font@name at stix@math{STIX2Math}%
-    }%
-  \fi
-}
-\let\thu at font@family at xits\@empty
-\newcommand\thu at set@xits at names{%
-  \ifx\thu at font@family at xits\@empty
-    \IfFontExistsTF{XITSMath-Regular.otf}{%
-      \gdef\thu at font@family at xits{XITS}%
-      \gdef\thu at font@style at xits@rm{Regular}%
-      \gdef\thu at font@style at xits@bf{Bold}%
-      \gdef\thu at font@style at xits@it{Italic}%
-      \gdef\thu at font@style at xits@bfit{BoldItalic}%
-      \gdef\thu at font@name at xits@math{XITSMath-Regular}%
-    }{%
-      \gdef\thu at font@family at xits{xits}%
-      \gdef\thu at font@style at xits@rm{regular}%
-      \gdef\thu at font@style at xits@bf{bold}%
-      \gdef\thu at font@style at xits@it{italic}%
-      \gdef\thu at font@style at xits@bfit{bolditalic}%
-      \gdef\thu at font@name at xits@math{xits-math}%
-    }%
-  \fi
-}
-\let\thu at font@family at libertinus\@empty
-\newcommand\thu at set@libertinus at names{%
-  \ifx\thu at font@family at libertinus\@empty
-    \IfFontExistsTF{LibertinusSerif-Regular.otf}{%
-      \gdef\thu at font@family at libertinus@serif{LibertinusSerif}%
-      \gdef\thu at font@family at libertinus@sans{LibertinusSans}%
-      \gdef\thu at font@name at libertinus@math{LibertinusMath-Regular}%
-      \gdef\thu at font@style at libertinus@rm{Regular}%
-      \gdef\thu at font@style at libertinus@bf{Bold}%
-      \gdef\thu at font@style at libertinus@it{Italic}%
-      \gdef\thu at font@style at libertinus@bfit{BoldItalic}%
-    }{%
-      \gdef\thu at font@family at libertinus@serif{libertinusserif}%
-      \gdef\thu at font@family at libertinus@sans{libertinussans}%
-      \gdef\thu at font@name at libertinus@math{libertinusmath-regular}%
-      \gdef\thu at font@style at libertinus@rm{regular}%
-      \gdef\thu at font@style at libertinus@bf{bold}%
-      \gdef\thu at font@style at libertinus@it{italic}%
-      \gdef\thu at font@style at libertinus@bfit{bolditalic}%
-    }%
-  \fi
-}
 \newcommand\thu at set@font at times{%
   \setmainfont{Times New Roman}%
   \setsansfont{Arial}%
@@ -698,9 +719,22 @@
     BoldFont       = *-bold,
     ItalicFont     = *-italic,
     BoldItalicFont = *-bolditalic,
+    Scale          = MatchLowercase,
     Ligatures      = CommonOff,
   ]%
 }
+\let\thu at font@family at stix\@empty
+\newcommand\thu at set@stix at names{%
+  \ifx\thu at font@family at stix\@empty
+    \IfFontExistsTF{STIXTwoText-Regular.otf}{%
+      \gdef\thu at font@family at stix{STIXTwoText}%
+      \gdef\thu at font@name at stix@math{STIXTwoMath-Regular}%
+    }{%
+      \gdef\thu at font@family at stix{STIX2Text}%
+      \gdef\thu at font@name at stix@math{STIX2Math}%
+    }%
+  \fi
+}
 \newcommand\thu at set@font at stix{%
   \thu at set@stix at names
   \setmainfont{\thu at font@family at stix}[
@@ -712,6 +746,26 @@
   ]%
   \thu at set@texgyre at sans@mono
 }
+\let\thu at font@family at xits\@empty
+\newcommand\thu at set@xits at names{%
+  \ifx\thu at font@family at xits\@empty
+    \IfFontExistsTF{XITSMath-Regular.otf}{%
+      \gdef\thu at font@family at xits{XITS}%
+      \gdef\thu at font@style at xits@rm{Regular}%
+      \gdef\thu at font@style at xits@bf{Bold}%
+      \gdef\thu at font@style at xits@it{Italic}%
+      \gdef\thu at font@style at xits@bfit{BoldItalic}%
+      \gdef\thu at font@name at xits@math{XITSMath-Regular}%
+    }{%
+      \gdef\thu at font@family at xits{xits}%
+      \gdef\thu at font@style at xits@rm{regular}%
+      \gdef\thu at font@style at xits@bf{bold}%
+      \gdef\thu at font@style at xits@it{italic}%
+      \gdef\thu at font@style at xits@bfit{bolditalic}%
+      \gdef\thu at font@name at xits@math{xits-math}%
+    }%
+  \fi
+}
 \newcommand\thu at set@font at xits{%
   \thu at set@xits at names
   \setmainfont{\thu at font@family at xits}[
@@ -723,6 +777,28 @@
   ]%
   \thu at set@texgyre at sans@mono
 }
+\let\thu at font@family at libertinus\@empty
+\newcommand\thu at set@libertinus at names{%
+  \ifx\thu at font@family at libertinus\@empty
+    \IfFontExistsTF{LibertinusSerif-Regular.otf}{%
+      \gdef\thu at font@family at libertinus@serif{LibertinusSerif}%
+      \gdef\thu at font@family at libertinus@sans{LibertinusSans}%
+      \gdef\thu at font@name at libertinus@math{LibertinusMath-Regular}%
+      \gdef\thu at font@style at libertinus@rm{Regular}%
+      \gdef\thu at font@style at libertinus@bf{Bold}%
+      \gdef\thu at font@style at libertinus@it{Italic}%
+      \gdef\thu at font@style at libertinus@bfit{BoldItalic}%
+    }{%
+      \gdef\thu at font@family at libertinus@serif{libertinusserif}%
+      \gdef\thu at font@family at libertinus@sans{libertinussans}%
+      \gdef\thu at font@name at libertinus@math{libertinusmath-regular}%
+      \gdef\thu at font@style at libertinus@rm{regular}%
+      \gdef\thu at font@style at libertinus@bf{bold}%
+      \gdef\thu at font@style at libertinus@it{italic}%
+      \gdef\thu at font@style at libertinus@bfit{bolditalic}%
+    }%
+  \fi
+}
 \newcommand\thu at set@font at libertinus{%
   \thu at set@libertinus at names
   \setmainfont{\thu at font@family at libertinus@serif}[
@@ -747,7 +823,7 @@
   ]%
 }
 \newcommand\thu at set@font at newcm{%
-  \setmathrm{NewCM10}[
+  \setmainfont{NewCM10}[
     Extension      = .otf,
     UprightFont    = *-Book,
     BoldFont       = *-Bold,
@@ -754,7 +830,7 @@
     ItalicFont     = *-BookItalic,
     BoldItalicFont = *-BoldItalic,
   ]%
-  \setmathsf{NewCMSans10}[
+  \setsansfont{NewCMSans10}[
     Extension         = .otf,
     UprightFont       = *-Book,
     BoldFont          = *-Bold,
@@ -761,7 +837,7 @@
     ItalicFont        = *-BookOblique,
     BoldItalicFont    = *-BoldOblique,
   ]%
-  \setmathtt{NewCMMono10}[
+  \setmonofont{NewCMMono10}[
     Extension           = .otf,
     UprightFont         = *-Book,
     ItalicFont          = *-BookItalic,
@@ -816,7 +892,6 @@
   \fi
 \fi
 \newcommand\thu at set@cjk at font@windows{%
-  \defaultCJKfontfeatures{Script=CJK}%
   \xeCJKsetup{EmboldenFactor=3}%
   \setCJKmainfont{SimSun}[
     AutoFakeBold = true,
@@ -834,25 +909,31 @@
   \setCJKmainfont{Songti SC}[
     UprightFont    = * Light,
     BoldFont       = * Bold,
-    ItalicFont     = Kaiti SC,
+    ItalicFont     = Kaiti SC Regular,
     BoldItalicFont = Kaiti SC Bold,
   ]%
-  \setCJKsansfont{Heiti SC}[BoldFont=* Medium]%
+  \setCJKsansfont{Heiti SC}[
+    UprightFont    = * Light,
+    BoldFont       = * Medium,
+  ]%
   \setCJKmonofont{STFangsong}
   \setCJKfamilyfont{zhsong}{Songti SC}[
-    UprightFont = * Light,
-      BoldFont  = * Bold,
+    UprightFont    = * Light,
+    BoldFont       = * Bold,
   ]%
   \setCJKfamilyfont{zhhei}{Heiti SC}[
-    UprightFont = * Light,
-    BoldFont    = * Medium,
+    UprightFont    = * Light,
+    BoldFont       = * Medium,
   ]%
   \setCJKfamilyfont{zhfs}{STFangsong}%
-  \setCJKfamilyfont{zhkai}{Kaiti SC}[BoldFont = * Bold]%
+  \setCJKfamilyfont{zhkai}{Kaiti SC}[
+    UprightFont    = * Regular,
+    BoldFont       = * Bold,
+  ]%
   \setCJKfamilyfont{zhli}{Baoli SC}%
   \setCJKfamilyfont{zhyuan}{Yuanyi SC}[
-    UprightFont = * Light,
-    BoldFont    = * Bold,
+    UprightFont    = * Light,
+    BoldFont       = * Bold,
   ]%
 }
 \newcommand\thu at set@cjk at font@noto{%
@@ -896,6 +977,7 @@
     UprightFont = *-Regular,
     BoldFont    = *-Bold,
     ItalicFont  = FandolKai-Regular,
+    ItalicFeatures = {Extension = .otf},
   ]%
   \setCJKsansfont{FandolHei}[
     Extension   = .otf,
@@ -945,6 +1027,7 @@
       integral-limits    = false,
       partial            = italic,
       math-ellipsis      = AMS,
+      real-part          = fraktur,
     }%
   \else
     \thusetup{
@@ -952,19 +1035,20 @@
       integral        = upright,
       integral-limits = true,
       partial         = upright,
+      real-part       = roman,
     }%
     \ifthu at math@style at ISO
       \thusetup{
         less-than-or-equal = horizontal,
         math-ellipsis      = lower,
-    }%
-  \else
+      }%
+    \else
       \ifthu at math@style at GB
         \thusetup{
           less-than-or-equal = slanted,
           math-ellipsis      = centered,
-    }%
-  \fi
+        }%
+      \fi
     \fi
   \fi
 }
@@ -1041,6 +1125,19 @@
     \DeclareRobustCommand\mathellipsis{\mathinner{\unicodeellipsis}}%
   \fi
 }
+\newcommand\thu at set@unimath at real@part{%
+  \ifthu at real@part at roman
+    \AtBeginDocument{%
+      \def\Re{\operatorname{Re}}%
+      \def\Im{\operatorname{Im}}%
+    }%
+  \else
+    \AtBeginDocument{%
+      \let\Re\thu at save@Re
+      \let\Im\thu at save@Im
+    }%
+  \fi
+}
 \newcommand\thu at set@unimath at style{%
   \ifthu at uppercase@greek at upright
     \unimathsetup{math-style = TeX}%
@@ -1064,6 +1161,7 @@
     \fi
   \fi
   \thu at set@unimath at ellipsis
+  \thu at set@unimath at real@part
 }
 \newcommand\thu at qed{\rule{1ex}{1ex}}
 \newcommand\thu at load@unimath{%
@@ -1072,6 +1170,8 @@
     \AtBeginDocument{%
       \let\thu at save@leq\leq
       \let\thu at save@geq\geq
+      \let\thu at save@Re\Re
+      \let\thu at save@Im\Im
     }%
     \DeclareRobustCommand\bm[1]{{\symbfit{##1}}}%
     \DeclareRobustCommand\boldsymbol[1]{{\symbfit{##1}}}%
@@ -1083,6 +1183,18 @@
     \renewcommand\thu at qed{\ensuremath{\QED}}%
   }%
 }
+\newcommand\thu at set@math at font@stix{%
+  \thu at set@stix at names
+  \setmathfont{\thu at font@name at stix@math}[
+    Extension    = .otf,
+    StylisticSet = \thu at xits@integral at stylistic@set,
+  ]%
+  \setmathfont{\thu at font@name at stix@math}[
+    Extension    = .otf,
+    StylisticSet = 1,
+    range        = {scr,bfscr},
+  ]%
+}
 \newcommand\thu at xits@integral at stylistic@set{%
   \ifthu at integral@upright
     8%
@@ -1100,50 +1212,17 @@
     range        = {cal,bfcal},
   ]%
 }
-\newcommand\thu at set@math at font@stix{%
-  \thu at set@stix at names
-  \setmathfont{\thu at font@name at stix@math}[
-    Extension    = .otf,
-    StylisticSet = \thu at xits@integral at stylistic@set,
-  ]%
-  \setmathfont{\thu at font@name at stix@math}[
-    Extension    = .otf,
-    StylisticSet = 1,
-    range        = {scr,bfscr},
-  ]%
-}
 \newcommand\thu at libertinus@integral at stylistic@set{%
-  \ifthu at integral@italic
+  \ifthu at integral@slanted
     8%
   \fi
 }
 \newcommand\thu at set@math at font@libertinus{%
   \thu at set@libertinus at names
-  \setmathfont{\thu at font@name at libertinus@math .otf}%
-}
-\newcommand\thu at set@math at font@lm{%
-  \setmathfont{latinmodern-math}[Extension=.otf]%
-  \setmathrm{lmroman10}[
-    Extension      = .otf,
-    UprightFont    = *-regular,
-    BoldFont       = *-bold,
-    ItalicFont     = *-italic,
-    BoldItalicFont = *-bolditalic,
+  \setmathfont{\thu at font@name at libertinus@math}[
+    Extension    = .otf,
+    StylisticSet = \thu at libertinus@integral at stylistic@set,
   ]%
-  \setmathsf{lmsans10}[
-    Extension      = .otf,
-    UprightFont    = *-regular,
-    BoldFont       = *-bold,
-    ItalicFont     = *-oblique,
-    BoldItalicFont = *-boldoblique,
-  ]%
-  \setmathtt{lmmonolt10}[
-    Extension      = .otf,
-    UprightFont    = *-regular,
-    BoldFont       = *-bold,
-    ItalicFont     = *-oblique,
-    BoldItalicFont = *-boldoblique,
-  ]%
 }
 \newcommand\thu at newcm@integral at stylistic@set{%
   \ifthu at integral@upright
@@ -1182,6 +1261,30 @@
     BoldItalicFont      = *-BoldOblique,
   ]%
 }
+\newcommand\thu at set@math at font@lm{%
+  \setmathfont{latinmodern-math}[Extension=.otf]%
+  \setmathrm{lmroman10}[
+    Extension      = .otf,
+    UprightFont    = *-regular,
+    BoldFont       = *-bold,
+    ItalicFont     = *-italic,
+    BoldItalicFont = *-bolditalic,
+  ]%
+  \setmathsf{lmsans10}[
+    Extension      = .otf,
+    UprightFont    = *-regular,
+    BoldFont       = *-bold,
+    ItalicFont     = *-oblique,
+    BoldItalicFont = *-boldoblique,
+  ]%
+  \setmathtt{lmmonolt10}[
+    Extension      = .otf,
+    UprightFont    = *-regular,
+    BoldFont       = *-bold,
+    ItalicFont     = *-oblique,
+    BoldItalicFont = *-boldoblique,
+  ]%
+}
 \newcommand\thu at set@math at font@newtx{%
   \ifthu at font@newtx\else
     \let\thu at save@encodingdefault\encodingdefault
@@ -1220,6 +1323,12 @@
   \else
     \DeclareRobustCommand\mathellipsis{\mathinner{\ldotp\ldotp\ldotp}}%
   \fi
+  \let\thu at save@Re\Re
+  \let\thu at save@Im\Im
+  \ifthu at real@part at roman
+    \def\Re{\operatorname{Re}}%
+    \def\Im{\operatorname{Im}}%
+  \fi
   \RequirePackage{bm}%
   \ifthu at font@newtx\else
     \let\encodingdefault\thu at save@encodingdefault
@@ -1251,65 +1360,6 @@
 }
 \AtBeginOfPackageFile*{siunitx}{\thu at set@math at font@auto}
 \AtEndPreamble{\thu at set@math at font@auto}
-\renewcommand\normalsize{%
-  \@setfontsize\normalsize{12bp}{20bp}%
-  \abovedisplayskip 6bp%
-  \abovedisplayshortskip 6bp%
-  \belowdisplayshortskip 6bp%
-  \belowdisplayskip \abovedisplayskip
-}
-\normalsize
-\ifx\MakeRobust\@undefined \else
-    \MakeRobust\normalsize
-\fi
-\DeclareRobustCommand\small{%
-   \@setfontsize\small{10.5bp}{17.5bp}%
-   \abovedisplayskip 6bp%
-   \abovedisplayshortskip 6bp%
-   \belowdisplayshortskip 6bp%
-   \def\@listi{\leftmargin\leftmargini
-               \topsep \z at skip
-               \parsep \z at skip
-               \itemsep \z at skip}%
-   \belowdisplayskip \abovedisplayskip
-}
-\DeclareRobustCommand\footnotesize{%
-   \@setfontsize\footnotesize{9bp}{15bp}%
-   \abovedisplayskip 6bp%
-   \abovedisplayshortskip 6bp%
-   \belowdisplayshortskip 6bp%
-   \def\@listi{\leftmargin\leftmargini
-               \topsep \z at skip
-               \parsep \z at skip
-               \itemsep \z at skip}%
-   \belowdisplayskip \abovedisplayskip
-}
-\DeclareRobustCommand\scriptsize{\@setfontsize\scriptsize{7.5bp}{12.5bp}}
-\DeclareRobustCommand\tiny{\@setfontsize\tiny{6.5bp}{10.83bp}}
-\DeclareRobustCommand\large{\@setfontsize\large{15bp}{25bp}}
-\DeclareRobustCommand\Large{\@setfontsize\Large{18bp}{30bp}}
-\DeclareRobustCommand\LARGE{\@setfontsize\LARGE{22bp}{36.67bp}}
-\DeclareRobustCommand\huge{\@setfontsize\huge{24bp}{40bp}}
-\DeclareRobustCommand\Huge{\@setfontsize\Huge{26bp}{43.33bp}}
-\def\thu at def@fontsize#1#2{%
-  \expandafter\newcommand\csname #1\endcsname[1][1.3]{%
-    \fontsize{#2}{##1\dimexpr #2}\selectfont}}
-\thu at def@fontsize{chuhao}{42bp}
-\thu at def@fontsize{xiaochu}{36bp}
-\thu at def@fontsize{yihao}{26bp}
-\thu at def@fontsize{xiaoyi}{24bp}
-\thu at def@fontsize{erhao}{22bp}
-\thu at def@fontsize{xiaoer}{18bp}
-\thu at def@fontsize{sanhao}{16bp}
-\thu at def@fontsize{xiaosan}{15bp}
-\thu at def@fontsize{sihao}{14bp}
-\thu at def@fontsize{xiaosi}{12bp}
-\thu at def@fontsize{wuhao}{10.5bp}
-\thu at def@fontsize{xiaowu}{9bp}
-\thu at def@fontsize{liuhao}{7.5bp}
-\thu at def@fontsize{xiaoliu}{6.5bp}
-\thu at def@fontsize{qihao}{5.5bp}
-\thu at def@fontsize{bahao}{5bp}
 \def\cleardoublepage{%
   \clearpage
   \if at twoside
@@ -1500,9 +1550,9 @@
 \allowdisplaybreaks[4]
 \def\fps at figure{h}
 \def\fps at table{h}
-\setlength{\floatsep}{6bp}
-\setlength{\textfloatsep}{6bp}
-\setlength{\intextsep}{6bp}
+\setlength{\floatsep}{12\p@ \@plus 2\p@ \@minus 2\p@}
+\setlength{\textfloatsep}{12\p@ \@plus 2\p@ \@minus 2\p@}
+\setlength{\intextsep}{12\p@ \@plus 2\p@ \@minus 2\p@}
 \setlength{\@fptop}{0bp \@plus1.0fil}
 \setlength{\@fpsep}{12bp \@plus2.0fil}
 \setlength{\@fpbot}{0bp \@plus1.0fil}
@@ -1584,7 +1634,7 @@
   font           = thu,
   labelsep       = quad,
   aboveskip      = 6bp,
-  belowskip      = 6bp,
+  belowskip      = 0bp,
   figureposition = bottom,
   tableposition  = top,
 }
@@ -2857,10 +2907,11 @@
   statement-page-style = {
     name = statement at page@style,
     choices = {
+      auto,
       empty,
       plain,
     },
-    default = empty,
+    default = auto,
   },
   statement-page-number = {
     name = statement at page@number,
@@ -2901,6 +2952,21 @@
     \fi
   }%
   \kvsetkeys{thu at statement}{#1}%
+  \ifthu at statement@page at style@auto
+    \ifx\thu at statement@file\@empty
+      \ifthu at degree@bachelor
+        \thusetup{statement-page-style = empty}%
+      \else
+        \thusetup{statement-page-style = plain}%
+      \fi
+    \else
+      \ifthu at degree@bachelor
+        \thusetup{statement-page-style = plain}%
+      \else
+        \thusetup{statement-page-style = empty}%
+      \fi
+    \fi
+  \fi
   \ifx\thu at statement@file\@empty
     \thusetup{language=chinese}%
     \begingroup
@@ -2913,9 +2979,7 @@
       \fi
       \thu at chapter*{\thu at statement@name}%
     \endgroup
-    \ifthu at degree@bachelor
-      \thispagestyle{\thu at statement@page at style}%
-    \fi
+    \thispagestyle{\thu at statement@page at style}%
     \thu at statement@text\par
     \ifthu at degree@graduate
       \vskip 2cm%
@@ -2930,9 +2994,7 @@
       \markboth{\thu at statement@name}{}%
       \thu at phantomsection
       \addcontentsline{toc}{chapter}{\thu at statement@name}%
-      \ifthu at degree@bachelor\else
-        \thispagestyle{empty}%
-      \fi
+      \thispagestyle{\thu at statement@page at style}%
     }]{\thu at statement@file}%
   \fi
   \ifthu at degree@bachelor



More information about the tex-live-commits mailing list.