texlive[55712] Master/texmf-dist: shtthesis (30jun20)

commits+karl at tug.org commits+karl at tug.org
Tue Jun 30 23:29:43 CEST 2020


Revision: 55712
          http://tug.org/svn/texlive?view=revision&revision=55712
Author:   karl
Date:     2020-06-30 23:29:43 +0200 (Tue, 30 Jun 2020)
Log Message:
-----------
shtthesis (30jun20)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/shtthesis/CHANGELOG.md
    trunk/Master/texmf-dist/doc/latex/shtthesis/README.md
    trunk/Master/texmf-dist/doc/latex/shtthesis/shtthesis-user-guide.pdf
    trunk/Master/texmf-dist/doc/latex/shtthesis/shtthesis-user-guide.tex
    trunk/Master/texmf-dist/tex/latex/shtthesis/shtthesis.cls

Modified: trunk/Master/texmf-dist/doc/latex/shtthesis/CHANGELOG.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/shtthesis/CHANGELOG.md	2020-06-30 21:29:26 UTC (rev 55711)
+++ trunk/Master/texmf-dist/doc/latex/shtthesis/CHANGELOG.md	2020-06-30 21:29:43 UTC (rev 55712)
@@ -2,6 +2,14 @@
 
 `sht-thesis` 项目派生于 `ucasthesis`,一个在 GPLv3 License 下分发的项目。根据该许可证条款,`sht-thesis` 项目列出基于 `ucasthesis` (commit `faad94b` 之后) 的所有修改条目:
 
+## 2020-06-30
+> Release: v0.3.1
+
+1. 改进 Linux/UNIX 环境下 XeLaTeX 和 LuaLaTeX 引擎的中文字体回退机制;
+2. unicode-math 仅对 `\mathbf` 强制使用 `\symbf` 覆盖,其他命令保持原有语义;
+3. 确保 hyperref 宏包在导言区最后被导入;
+4. 从该版本开始,所有 release 同步发布至 Overleaf (真香)。
+
 ## 2020-06-23
 > Release: v0.3.0
 

Modified: trunk/Master/texmf-dist/doc/latex/shtthesis/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/shtthesis/README.md	2020-06-30 21:29:26 UTC (rev 55711)
+++ trunk/Master/texmf-dist/doc/latex/shtthesis/README.md	2020-06-30 21:29:43 UTC (rev 55712)
@@ -1,8 +1,8 @@
 # ShangHaiTech university THESIS (shtthesis)
-[![Action status](https://github.com/lirundong/sht-thesis/workflows/Build/badge.svg)](https://github.com/lirundong/shtthesis/actions)
-[![CTAN version](https://img.shields.io/ctan/v/shtthesis)](https://ctan.org/pkg/shtthesis)
-[![GitHub release](https://img.shields.io/github/v/release/lirundong/shtthesis)](https://github.com/lirundong/shtthesis/releases/latest)
-[![GitHub downloads](https://img.shields.io/github/downloads/lirundong/shtthesis/total)](https://github.com/lirundong/shtthesis/releases)
+[![Action status](https://github.com/lirundong/sht-thesis/workflows/build/badge.svg)](https://github.com/lirundong/shtthesis/actions)
+[![GitHub release](https://img.shields.io/github/v/release/lirundong/shtthesis?style=flat&logo=GitHub)](https://github.com/lirundong/shtthesis/releases/latest)
+[![CTAN version](https://img.shields.io/ctan/v/shtthesis?style=flat&logo=LaTeX)](https://ctan.org/pkg/shtthesis)
+[![Overleaf](https://img.shields.io/badge/overleaf-shtthesis-green?style=flat&logo=Overleaf&color=1C890F)](https://www.overleaf.com/latex/templates/shanghaitech-university-thesis-template/mskbxkmfxqpt)
 
 `shtthesis` project, forked from [`ucasthesis`](https://github.com/mohuangrui/ucasthesis), is an **unofficial** LaTeX thesis template for ShanghaiTech University and satisfies all format requirements of graduate/undergraduate thesis. The user just need to set `\documentclass{shtthesis}` and to setup mandatory information via `\shtsetup`, then his or her thesis document will be typeset properly:
 ```latex
@@ -21,17 +21,22 @@
 ```
 
 ## Get the Template
-- Stable version:
+- Stable version: Install or download with any of following methods
   - CTAN (**strongly recommended**): [`shtthesis`](https://ctan.org/pkg/shtthesis) package on CTAN can be installed via `tlmgr` for TeX Live and MacTeX users:
     ```bash
     tlmgr install shtthesis
     ```
+    If your distribution has already installed `shtthesis`, please update it to the latest version:
+    ```bash
+    tlmgr update shtthesis
+    ```
 
     **Note**: `shtthesis` package on CTAN does not include the university logo file. Please download [`shanghaitech-logo.pdf`](https://github.com/lirundong/shtthesis/raw/master/shanghaitech-logo.pdf) from this repository and put it in the root of your project directory.
-  - GitHub Release: please refer to [release](https://github.com/lirundong/sht-thesis/releases) page, and download required files based on release information
-- Develop version: directly clone the GitHub repo
+  - [Overleaf](https://www.overleaf.com/latex/templates/shanghaitech-university-thesis-template/mskbxkmfxqpt): Please compile with XeLaTeX. Since compilation time for Overleaf free-plan is limited to *1 minute*, you might encounter with timeout issue if compiling with LuaLaTeX
+  - GitHub Release: Please refer to the [release](https://github.com/lirundong/sht-thesis/releases) page and download required files based on release information
+- Develop version: Directly clone the GitHub repo
   ```bash
-  git clone https://github.com/lirundong/sht-thesis.git
+  git clone https://github.com/lirundong/shtthesis.git
   ```
 
 Please, read through [the user's guide](shtthesis-user-guide.pdf) before continuing.

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

Modified: trunk/Master/texmf-dist/doc/latex/shtthesis/shtthesis-user-guide.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/shtthesis/shtthesis-user-guide.tex	2020-06-30 21:29:26 UTC (rev 55711)
+++ trunk/Master/texmf-dist/doc/latex/shtthesis/shtthesis-user-guide.tex	2020-06-30 21:29:43 UTC (rev 55712)
@@ -206,6 +206,13 @@
   url = {http://oaa.shanghaitech.edu.cn/2019/0321/c4666a41070/page.htm},
   urldate = {2020-06-17}
 }
+ at online{clerkma2013unicode,
+  author = {Clerk Ma},
+  title = {如何在{XeTeX}中单独设置数学字体,为什么{STIX}的数学字体很牛?},
+  year = 2013,
+  url = {https://www.zhihu.com/question/20592491/answer/15577847},
+  urldate = {2020-06-30}
+}
 \end{filecontents}
 
 \begin{document}
@@ -230,14 +237,14 @@
 \ifgraduate
 \begin{nomenclatures}
   \header[单位]{符号}{说明}
-  \item[${m^{2} \cdot s^{-2} \cdot K^{-1}}$]{$R$}{the gas constant}
-  \item[${m^{2} \cdot s^{-2} \cdot K^{-1}}$]{$C_v$}{specific heat capacity at constant volume}
-  \item[${m^{2} \cdot s^{-2} \cdot K^{-1}}$]{$C_p$}{specific heat capacity at constant pressure}
-  \item[${m^{2} \cdot s^{-2}}$]{$E$}{specific total energy}
-  \item[${kg \cdot m \cdot s^{-3} \cdot K^{-1}}$]{$k$}{thermal conductivity}
-  \item[${kg \cdot m^{-1} \cdot s^{-2}}$]{$S_{ij}$}{deviatoric stress tensor}
-  \item[${kg \cdot m^{-1} \cdot s^{-2}}$]{$\tau_{ij}$}{viscous stress tensor}
-  \item[${1}$]{$\delta_{ij}$}{Kronecker tensor}
+  \item[$\symup{{m^{2} \cdot s^{-2} \cdot K^{-1}}}$]{$R$}{the gas constant}
+  \item[$\symup{{m^{2} \cdot s^{-2} \cdot K^{-1}}}$]{$C_v$}{specific heat capacity at constant volume}
+  \item[$\symup{{m^{2} \cdot s^{-2} \cdot K^{-1}}}$]{$C_p$}{specific heat capacity at constant pressure}
+  \item[$\symup{{m^{2} \cdot s^{-2}}}$]{$E$}{specific total energy}
+  \item[$\symup{{kg \cdot m \cdot s^{-3} \cdot K^{-1}}}$]{$k$}{thermal conductivity}
+  \item[$\symup{{kg \cdot m^{-1} \cdot s^{-2}}}$]{$S_{ij}$}{deviatoric stress tensor}
+  \item[$\symup{{kg \cdot m^{-1} \cdot s^{-2}}}$]{$\tau_{ij}$}{viscous stress tensor}
+  \item[$\symup{{1}}$]{$\delta_{ij}$}{Kronecker tensor}
 \end{nomenclatures}
 
 \begin{nomenclatures}[缩写]
@@ -597,6 +604,16 @@
 \end{align}
 同时重载了 \verb|\eqref|,使得公式编号格式修改后,其引用格式仍与 \textsf{amsmath} 无异:贝叶斯定理~\eqref{eq::bayesian}。排版本科生论文时不修改公式编号格式。
 
+\shtthesis{} 使用 \textsf{unicode-math} 宏包进行公式排版,因此在数学环境内既可以用标准 \LaTeX{} 宏,也可以直接输入 Unicode 符号。例如 $\oiint$ 符号可以通过 \verb|\oiint| 宏录入,也可以通过 Unicode 符号 $∯$ (对应 \verb|U+0222F| 码点) 录入。以下测试公式来自 \citet{clerkma2013unicode},其中所有字符均直接使用对应 Unicode 符号录入。
+\begin{align}
+& ⊢ ∀x[(Fx ∨ Gx) → \mathord{∼}Hx] \\
+& ⊨ ¬∃y∀x[x∈y ↔ x∉x]  \\
+& ⊭ x ∩ (y ∪ z) ≠ (x ∩ y) ∪ (x ∩ z) \\
+& ⊢ ⟦α⟧ = ℵ₀ → α ≇ ℘(α) \\
+& ⌜ψ[(℩x)φx]⌝ ≝ ⌜(∃x)[φx ∧ (∀z)(φz ⊃ x=z) ∧ ψx]⌝ \\
+& ⊢ (P ⥽ Q) ⥽ (□P ⥽ ◇Q)
+\end{align}
+
 \subsection{数学环境}
 \shtthesis 通过 \textsf{amsthm} 宏包定义了常用的数学环境和证明环境,如表~\ref{tab::math_envs} 所列。其中,英文表示 tex 文档内调用的环境名称,中文表示排版后论文中显示的环境名称。
 
@@ -779,8 +796,8 @@
 本章中的测试材料,数学公式部分来自 \textsf{ucasthesis} 附录 B\footnote{\url{https://github.com/mohuangrui/ucasthesis/blob/master/Tex/Appendix.tex}},生僻字部分来自《生僻字大全(按部首分类)》\footnote{\url{http://xh.5156edu.com/page/z4745m2559j18770.html}}。
 
 \section{排版数学公式}
-\providecommand{\Vector}[1]{\ensuremath{\mathbf{ #1 }}}
-\providecommand{\Tensor}[1]{\ensuremath{\mathbf{\mathsf{ #1 }}}}
+\providecommand{\Vector}[1]{\ensuremath{\symbf{ #1 }}}
+\providecommand{\Tensor}[1]{\ensuremath{\symbfsf{ #1 }}}
 \begin{equation}
   \begin{cases}
       \frac{\partial \rho}{\partial t} + \nabla\cdot(\rho\Vector{V}) = 0 \\
@@ -789,27 +806,29 @@
   \end{cases}
 \end{equation}
 \begin{equation}
-  \frac{\partial }{\partial t}\int\limits_{\Omega} u \, \mathrm{d}\Omega + \int\limits_{S} \Vector{n}\cdot(u\Vector{V}) \, \mathrm{d}S = \dot{\phi}
+  \frac{\partial }{\partial t}\int\limits_{\Omega} u \, \symup{d}\Omega + \int\limits_{S} \Vector{n}\cdot(u\Vector{V}) \, \symup{d}S = \dot{\phi}
 \end{equation}
-\[
+\begin{equation*}
   \begin{split}
-      \mathcal{L} \{f\}(s) &= \int _{0^{-}}^{\infty} f(t) e^{-st} \, \mathrm{d}t, \ 
-      \mathscr{L} \{f\}(s) = \int _{0^{-}}^{\infty} f(t) e^{-st} \, \mathrm{d}t\\
-      \mathcal{F} {\bigl (} f(x+x_{0}) {\bigr )} &= \mathcal{F} {\bigl (} f(x) {\bigr )} e^{2\pi i\xi x_{0}}, \ 
-      \mathscr{F} {\bigl (} f(x+x_{0}) {\bigr )} = \mathscr{F} {\bigl (} f(x) {\bigr )} e^{2\pi i\xi x_{0}}
+      \symcal{L} \{f\}(s) &= \int _{0^{-}}^{\infty} f(t) e^{-st} \, \symup{d}t, \ 
+      \symscr{L} \{f\}(s) = \int _{0^{-}}^{\infty} f(t) e^{-st} \, \symup{d}t\\
+      \symcal{F} {\bigl (} f(x+x_{0}) {\bigr )} &= \symcal{F} {\bigl (} f(x) {\bigr )} e^{2\pi i\xi x_{0}}, \ 
+      \symscr{F} {\bigl (} f(x+x_{0}) {\bigr )} = \symscr{F} {\bigl (} f(x) {\bigr )} e^{2\pi i\xi x_{0}}
   \end{split}
-\]
+\end{equation*}
 
-Ordinary math: $A,F,L,2,3,5,\sigma$. \verb|\mathrm|: $\mathrm{A,F,L,2,3,5,\sigma}$.
+\begin{center}
+\begin{tabular}{*{4}{l}}
+  \toprule
+  Ordinary math& $A,F,L,2,3,5,\sigma$& \verb|\symup|& $\symup{A,F,L,2,3,5,\sigma}$ \\
+  \verb|\symbf|& $\symbf{A,F,L,2,3,5,\sigma}$& \verb|\symit|& $\symit{A,F,L,2,3,5,\sigma}$ \\
+  \verb|\symsf|& $\symsf{A,F,L,2,3,5,\sigma}$& \verb|\symtt|& $\symtt{A,F,L,2,3,5,\sigma}$ \\
+  \verb|\symfrak|& $\symfrak{A,F,L,2,3,5,\sigma}$& \verb|\symbb|& $\symbb{A,F,L,2,3,5,\sigma}$ \\
+  \verb|\symcal|& $\symcal{A,F,L,2,3,5,\sigma}$& \verb|\symscr|& $\symscr{A,F,L,2,3,5,\sigma}$ \\
+  \bottomrule
+\end{tabular}
+\end{center}
 
-\verb|\mathbf|: $\mathbf{A,F,L,2,3,5,\sigma}$. \verb|\mathit|: $\mathit{A,F,L,2,3,5,\sigma}$.
-
-\verb|\mathsf|: $\mathsf{A,F,L,2,3,5,\sigma}$. \verb|\mathtt|: $\mathtt{A,F,L,2,3,5,\sigma}$.
-
-\verb|\mathfrak|: $\mathfrak{A,F,L,2,3,5,\sigma}$. \verb|\mathbb|: $\mathbb{A,F,L,2,3,5,\sigma}$.
-
-\verb|\mathcal|: $\mathcal{A,F,L,2,3,5,\sigma}$. \verb|\mathscr|: $\mathscr{A,F,L,2,3,5,\sigma}$.
-
 \section{排版生僻字} \label{sec::chs_rare}
 {\songti 叧叨叭叱叴叵叺叻叼叽叾卟叿吀吁吂吅吆吇吋吒吔吖吘吙吚吜吡吢吣吤吥吧吩吪吭吮吰吱吲呐吷吺吽呁呃呄呅呇呉呋呋呌呍呎呏呐呒呓呔呕呗呙呚呛呜呝呞呟呠呡呢呣呤呥呦呧周呩呪呫呬呭呮呯呰呱呲呴呶呵呷呸呹呺呻呾呿咀咁咂咃咄咅咇咈咉咊咋咍咎咐咑咓咔咕咖咗咘咙咚咛咜咝咞咟咠咡咢咣咤咥咦咧咨咩咪咫咬咭咮咯咰咲咳咴咵咶啕咹咺咻呙咽咾咿哂哃哅哆哇哈哊哋哌哎哏哐哑哒哓哔哕哖哗哘哙哚哛哜哝哞哟哠咔哣哤哦哧哩哪哫哬哯哰唝哵哶哷哸哹哻哼哽哾哿唀唁唂唃呗唅唆唈唉唊唋唌唍唎唏唑唒唓唔唣唖唗唘唙吣唛唜唝唞唟唠唡唢唣唤唥唦唧唨唩唪唫唬唭唯唰唲唳唴唵唶唷念唹唺唻唼唽唾唿啀啁啃啄啅啇啈啉啋啌啍啎问啐啑啒启啔啕啖啖啘啙啚啛啜啝哑启啠啡唡衔啥啦啧啨啩啪啫啬啭啮啯啰啱啲啳啴啵啶啷啹啺啻啼啽啾啿喀喁喂喃善喅喆喇喈喉喊喋喌喍喎喏喐喑喒喓喔喕喖喗喙喛喞喟喠喡喢喣喤喥喦喨喩喯喭喯喰喱哟喳喴喵営喷喸喹喺喼喽喾喿嗀嗁嗂嗃嗄嗅呛啬嗈嗉唝嗋嗌嗍吗嗏嗐嗑嗒嗓嗕嗖嗗嗘嗙呜嗛嗜嗝嗞嗟嗠嗡嗢嗧嗨唢嗪嗫嗬嗭嗮嗰嗱嗲嗳嗴嗵哔嗷嗸嗹嗺嗻嗼嗽嗾嗿嘀嘁嘂嘃嘄嘅嘅嘇嘈嘉嘊嘋嘌喽嘎嘏嘐嘑嘒嘓呕嘕啧嘘嘙嘚嘛唛嘝嘞嘞嘟嘠嘡嘢嘣嘤嘥嘦嘧嘨哗嘪嘫嘬嘭唠啸囍嘴哓嘶嘷呒嘹嘺嘻嘼啴嘾嘿噀噂噃噄咴噆噇噈噉噊噋噌噍噎噏噐噑噒嘘噔噕噖噗噘噙噚噛噜咝噞噟哒噡噢噣噤哝哕噧噩噪噫噬噭噮嗳噰噱哙噳喷噵噶噷吨噺噻噼噽噾噿咛嚁嚂嚃嚄嚅嚆吓嚈嚉嚊嚋哜嚍嚎嚏尝嚑嚒嚓嚔噜嚖嚗嚘啮嚚嚛嚜嚝嚞嚟嚠嚡嚢嚣嚤呖嚧咙嚩咙嚧嚪嚫嚬嚭嚯嚰嚱亸喾嚵嘤嚷嚸嚹嚺嚻嚼嚽嚾嚿啭嗫嚣囃囄冁囆囇呓囊囋囍囎囏囐嘱囒啮囔囕囖}
 

Modified: trunk/Master/texmf-dist/tex/latex/shtthesis/shtthesis.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/shtthesis/shtthesis.cls	2020-06-30 21:29:26 UTC (rev 55711)
+++ trunk/Master/texmf-dist/tex/latex/shtthesis/shtthesis.cls	2020-06-30 21:29:43 UTC (rev 55712)
@@ -17,8 +17,8 @@
 % Identification
 % ==============================================================================
 \NeedsTeXFormat{LaTeX2e}
-\newcommand\version{0.3.0}
-\newcommand\versiondate{2020/06/23}
+\newcommand\version{0.3.1}
+\newcommand\versiondate{2020/06/30}
 \ProvidesClass{shtthesis}[%
   \versiondate\space%
   v\version\space%
@@ -295,6 +295,7 @@
 }{ctexbook}
 \PassOptionsToPackage{
   natbib = true,
+  hyperref = manual,
   backend = biber,
   gbpub = false,
   gbcitelocal = chinese,
@@ -320,15 +321,12 @@
 \RequirePackage[shortlabels, inline]{enumitem}
 \RequirePackage{mathtools}
 \RequirePackage{amsthm}
-\RequirePackage[
-  mathrm = sym,
-  mathit = sym,
-  mathbf = sym,
-  mathtt = sym,
-]{unicode-math}
-\RequirePackage{hyperref}
+\RequirePackage[mathbf=sym]{unicode-math}
 \RequirePackage{biblatex}
 \AtEndPreamble{
+  \RequirePackage{hyperref}
+  \addbibresource{\sht at bib@resource}
+  \BiblatexManualHyperrefOn
   \hypersetup{
     pdfencoding = auto,
     psdextra = true,
@@ -346,14 +344,6 @@
     \definecolor{fdu at link}{HTML}{990000}
     \definecolor{fdu at url}{HTML}{0000B2}
     \definecolor{fdu at cite}{HTML}{007F00}
-    % `classic' color scheme from `fduthesis'
-    \definecolor{classic at link}{HTML}{FF0000}
-    \definecolor{classic at url}{HTML}{0000FF}
-    \definecolor{classic at cite}{HTML}{00FF00}
-    % `science' color scheme from `fduthesis'
-    \definecolor{science at link}{HTML}{CA0619}
-    \definecolor{science at url}{HTML}{389F9D}
-    \definecolor{science at cite}{HTML}{FF8920}
     \hypersetup{
       colorlinks = true,
       linkcolor = fdu at link,
@@ -362,7 +352,6 @@
     }
   \fi
   \urlstyle{tt}
-  \addbibresource{\sht at bib@resource}
 }
 % ==============================================================================
 % Format Specifications
@@ -382,7 +371,10 @@
 \def\tablename{表}
 \def\figurename{图}
 \definecolor{ShtRed}{RGB}{146,46,23}
-\def\school at logo@missing{校徽文件缺失,请至\href{https://github.com/lirundong/shtthesis/raw/master/shanghaitech-logo.pdf}{项目主页}下载!}
+\def\school at logo@missing{%
+  校徽文件缺失,请至\href{https://github.com/lirundong/shtthesis/raw/master/%
+  shanghaitech-logo.pdf}{项目主页}下载!%
+}
 % ------------------------------------------------------------------------------
 %   Geometry and layouts
 % ------------------------------------------------------------------------------
@@ -550,61 +542,61 @@
 % ------------------------------------------------------------------------------
 \ifthenelse{\equal{\sht at fontset}{windows}}{
   \def\fake at bold@factor{2.5}
-  \setCJKmainfont[
-      AutoFakeBold = \fake at bold@factor,
-        ItalicFont = KaiTi,
-    ]{SimSun}
-  \setCJKsansfont[
-      AutoFakeBold = \fake at bold@factor,
-    ]{SimHei}
-  \setCJKfamilyfont{zhsong}[
-      AutoFakeBold = \fake at bold@factor,
-    ]{SimSun}
-  \setCJKfamilyfont{zhhei}[
-      AutoFakeBold = \fake at bold@factor,
-    ]{SimHei}
-  \setCJKfamilyfont{zhkai}[
-      AutoFakeBold = \fake at bold@factor,
-    ]{KaiTi}
+  \setCJKmainfont{SimSun}[
+    AutoFakeBold = \fake at bold@factor,
+      ItalicFont = KaiTi,
+  ]
+  \setCJKsansfont{SimHei}[
+    AutoFakeBold = \fake at bold@factor,
+  ]
+  \setCJKfamilyfont{zhsong}{SimSun}[
+    AutoFakeBold = \fake at bold@factor,
+  ]
+  \setCJKfamilyfont{zhhei}{SimHei}[
+    AutoFakeBold = \fake at bold@factor,
+  ]
+  \setCJKfamilyfont{zhkai}{KaiTi}[
+    AutoFakeBold = \fake at bold@factor,
+  ]
 }{
   \ifthenelse{\equal{\sht at fontset}{mac}}{
-    \setCJKmainfont[
-           UprightFont = * Regular,
-              BoldFont = * Bold,
-            ItalicFont = Kaiti SC Regular,
-        BoldItalicFont = Kaiti SC Bold,
-      ]{Songti SC}
-    \setCJKsansfont[
-        UprightFont = * Light,
-           BoldFont = * Medium,
-      ]{Heiti SC}
-    \setCJKfamilyfont{zhsong}[
-        UprightFont = * Regular,
-           BoldFont = * Bold,
-      ]{Songti SC}
-    \setCJKfamilyfont{zhhei}[
-        UprightFont = * Light,
-           BoldFont = * Medium,
-      ]{Heiti SC}
-    \setCJKfamilyfont{zhkai}[
-        UprightFont = * Regular,
-           BoldFont = * Bold,
-      ]{Kaiti SC}
+    \setCJKmainfont{Songti SC}[
+         UprightFont = * Regular,
+            BoldFont = * Bold,
+          ItalicFont = Kaiti SC Regular,
+      BoldItalicFont = Kaiti SC Bold,
+    ]
+    \setCJKsansfont{Heiti SC}[
+      UprightFont = * Light,
+         BoldFont = * Medium,
+    ]
+    \setCJKfamilyfont{zhsong}{Songti SC}[
+      UprightFont = * Regular,
+         BoldFont = * Bold,
+    ]
+    \setCJKfamilyfont{zhhei}{Heiti SC}[
+      UprightFont = * Light,
+         BoldFont = * Medium,
+    ]
+    \setCJKfamilyfont{zhkai}{Kaiti SC}[
+      UprightFont = * Regular,
+         BoldFont = * Bold,
+    ]
   }{
-    \IfFontExistsTF{Source Han Serif SC}{
-      \def\unix at songti{Source Han Serif SC}
+    \IfFontExistsTF{Noto Serif CJK SC}{
+      \def\unix at songti{Noto Serif CJK SC}
     }{
-      \IfFontExistsTF{Noto Serif CJK SC}{
-        \def\unix at songti{Noto Serif CJK SC}
+      \IfFontExistsTF{Source Han Serif SC}{
+        \def\unix at songti{Source Han Serif SC}
       }{
         \def\unix at songti{FandolSong}
       }
     }
-    \IfFontExistsTF{Source Han Sans SC}{
-      \def\unix at heiti{Source Han Sans SC}
+    \IfFontExistsTF{Noto Sans CJK SC}{
+      \def\unix at heiti{Noto Sans CJK SC}
     }{
-      \IfFontExistsTF{Noto Sans CJK SC}{
-        \def\unix at heiti{Noto Sans CJK SC}
+      \IfFontExistsTF{Source Han Sans SC}{
+        \def\unix at heiti{Source Han Sans SC}
       }{
         \def\unix at heiti{FandolHei}
       }
@@ -626,13 +618,75 @@
     }{
       \def\unix at fangsong{FandolFang}
     }
-    \setCJKmainfont[ItalicFont=\unix at kaiti]{\unix at songti}
-    \setCJKsansfont[BoldFont=\unix at heiti@bold]{\unix at heiti}
-    \setCJKmonofont{\unix at fangsong}
-    \setCJKfamilyfont{zhsong}{\unix at songti}
-    \setCJKfamilyfont{zhhei}{\unix at heiti}
-    \setCJKfamilyfont{zhkai}{\unix at kaiti}
-    \setCJKfamilyfont{zhfs}{\unix at fangsong}
+    \ifluatex
+      \setCJKmainfont{\unix at songti}[ItalicFont=\unix at kaiti]
+      \setCJKsansfont{\unix at heiti}[BoldFont=\unix at heiti@bold]
+      \setCJKmonofont{\unix at fangsong}
+      \setCJKfamilyfont{zhsong}{\unix at songti}
+      \setCJKfamilyfont{zhhei}{\unix at heiti}[BoldFont=\unix at heiti@bold]
+      \setCJKfamilyfont{zhkai}{\unix at kaiti}
+      \setCJKfamilyfont{zhfs}{\unix at fangsong}
+    \else
+      \ifthenelse{\equal{\unix at songti}{FandolSong}}{
+        \setCJKmainfont{FandolSong}[
+          Extension   = .otf,
+          UprightFont = *-Regular,
+          BoldFont    = *-Bold,
+          ItalicFont  = FandolKai-Regular,
+        ]
+        \setCJKfamilyfont{zhsong}{FandolSong}[
+          Extension   = .otf,
+          UprightFont = *-Regular,
+          BoldFont    = *-Bold,
+        ]
+      }{
+        \ifthenelse{\equal{\unix at kaiti}{FandolKai}}{
+          \setCJKmainfont{\unix at songti}[
+            ItalicFont  = FandolKai-Regular,
+            ItalicFeatures = {Extension = .otf},
+          ]
+        }{
+          \setCJKmainfont{\unix at songti}[ItalicFont=\unix at kaiti]
+        }
+        \setCJKfamilyfont{zhsong}{\unix at songti}
+      }
+      \ifthenelse{\equal{\unix at heiti}{FandolHei}}{
+        \setCJKsansfont{FandolHei}[
+          Extension   = .otf,
+          UprightFont = *-Regular,
+          BoldFont    = *-Bold,
+        ]
+        \setCJKfamilyfont{zhhei}{FandolHei}[
+          Extension   = .otf,
+          UprightFont = *-Regular,
+          BoldFont    = *-Bold,
+        ]
+      }{
+        \setCJKsansfont{\unix at heiti}[BoldFont=\unix at heiti@bold]
+        \setCJKfamilyfont{zhhei}{\unix at heiti}[BoldFont=\unix at heiti@bold]
+      }
+      \ifthenelse{\equal{\unix at kaiti}{FandolKai}}{
+        \setCJKfamilyfont{zhkai}{FandolKai}[
+          Extension   = .otf,
+          UprightFont = *-Regular,
+        ]
+      }{
+        \setCJKfamilyfont{zhkai}{\unix at kaiti}
+      }
+      \ifthenelse{\equal{\unix at fangsong}{FandolFang}}{
+        \setCJKfamilyfont{zhfs}{FandolFang}[
+          Extension   = .otf,
+          UprightFont = *-Regular,
+        ]
+        \setCJKmonofont{FandolFang}[
+          Extension   = .otf,
+          UprightFont = *-Regular,
+        ]
+      }{
+        \setCJKmonofont{\unix at fangsong}
+        \setCJKfamilyfont{zhfs}{\unix at fangsong}
+      }
+    \fi
     \providecommand{\songti}{\CJKfamily{zhsong}}
     \providecommand{\heiti}{\CJKfamily{zhhei}}
     \providecommand{\kaishu}{\CJKfamily{zhkai}}
@@ -683,37 +737,22 @@
 %   Math fonts
 % ------------------------------------------------------------------------------
 \IfFontExistsTF{XITSMath-Regular.otf}{
-  \setmathfont{XITSMath-Regular} [
-    Extension    = .otf,
-    BoldFont     = XITSMath-Bold,
-    StylisticSet = 8,
-  ]
-  \setmathfont{XITSMath-Regular.otf} [
-    range        = {cal, bfcal},
-    StylisticSet = 1,
-  ]
-  \setmathfont{XITSMath-Regular.otf} [
-    range        = {scr, bfscr},
-    StylisticSet = 2,
-  ]
+  \def\sht at math@font{XITSMath-Regular.otf}
 }{
-  \setmathfont{xits-math} [
-    Extension    = .otf,
-    BoldFont     = *bold,
-    StylisticSet = 8,
-  ]
-  \setmathfont{xits-math.otf} [
-    range        = {cal, bfcal},
-    StylisticSet = 1,
-  ]
-  \setmathfont{xits-math.otf} [
-    range        = {scr, bfscr},
-    StylisticSet = 2,
-  ]
+  \def\sht at math@font{xits-math.otf}
 }
-\IfFontExistsTF{FiraMath-Regular.otf}{
-  \setmathfontface\mathsf{FiraMath-Regular.otf}
-}{}
+\setmathfont{\sht at math@font}[
+  StylisticSet = 8, % upright integral variants, please refer to stix2-otf doc
+]
+% please refer to "Caligraphic vs. Script variants" section of unicode-math doc
+\setmathfont{\sht at math@font}[
+  range        = {cal, bfcal},
+  StylisticSet = 1,
+]
+\setmathfont{\sht at math@font}[
+  range        = {scr, bfscr},
+  StylisticSet = 2,
+]
 % ------------------------------------------------------------------------------
 %   Math environmrnts
 % ------------------------------------------------------------------------------
@@ -732,7 +771,8 @@
 \theoremstyle{remark}
 \newtheorem{remark}{注}[chapter]
 \renewcommand*{\proofname}{证明}
-\expandafter\patchcmd\csname\string\proof\endcsname{\@addpunct{.}}{\@addpunct{\emph{:}}}{}{}
+\expandafter\patchcmd\csname\string\proof\endcsname{\@addpunct{.}}%
+  {\@addpunct{\emph{:}}}{}{}
 % ------------------------------------------------------------------------------
 %   Utility functions for ToC and bookmarks
 % ------------------------------------------------------------------------------
@@ -1158,14 +1198,17 @@
             \fi%
           }}} \\
         \ifdefempty{\sht at supervisor@institution}{}{ &
-          \multicolumn{2}{c}{\shifted at uline{\shifted at box{\sht at supervisor@institution}}} \\
+          \multicolumn{2}{c}{\shifted at uline{%
+            \shifted at box{\sht at supervisor@institution}}} \\
         }
         学位类别:&
           \multicolumn{2}{c}{\shifted at uline{\shifted at box{\sht at degree@name}}} \\
         一级学科:&
-          \multicolumn{2}{c}{\shifted at uline{\shifted at box{\sht at discipline@level at i}}} \\
+          \multicolumn{2}{c}{\shifted at uline{%
+            \shifted at box{\sht at discipline@level at i}}} \\
         \multicolumn{2}{l}{学校/学院名称:} &
-          \shifted at uline{\shifted at box[\cover at tab@last at entry@width]{\sht at institution}} \\
+          \shifted at uline{\shifted at box[\cover at tab@last at entry@width]{%
+            \sht at institution}} \\
       \end{tabular}
     }
 
@@ -1263,22 +1306,28 @@
             [\cover at tab@entry at width@undergraduate]{\sht at title} \\
         学生姓名:&
           \shifted at uline[\cover at tab@uline at thick@undergraduate]%
-            {\shifted at box[\cover at tab@entry at width@undergraduate]{\sht at author}} \\
+            {\shifted at box[\cover at tab@entry at width@undergraduate]{%
+              \sht at author}} \\
         学\hspace{2\ccwd}号:&
           \shifted at uline[\cover at tab@uline at thick@undergraduate]%
-            {\shifted at box[\cover at tab@entry at width@undergraduate]{\sht at author@id}} \\
+            {\shifted at box[\cover at tab@entry at width@undergraduate]{%
+              \sht at author@id}} \\
         入学年份:&
           \shifted at uline[\cover at tab@uline at thick@undergraduate]%
-            {\shifted at box[\cover at tab@entry at width@undergraduate]{\sht at entrance@year}} \\
+            {\shifted at box[\cover at tab@entry at width@undergraduate]{%
+              \sht at entrance@year}} \\
         所在学院:&
           \shifted at uline[\cover at tab@uline at thick@undergraduate]%
-            {\shifted at box[\cover at tab@entry at width@undergraduate]{\sht at institution}} \\
+            {\shifted at box[\cover at tab@entry at width@undergraduate]{%
+              \sht at institution}} \\
         攻读专业:&
           \shifted at uline[\cover at tab@uline at thick@undergraduate]%
-            {\shifted at box[\cover at tab@entry at width@undergraduate]{\sht at discipline}} \\
+            {\shifted at box[\cover at tab@entry at width@undergraduate]{%
+              \sht at discipline}} \\
         指导教师:&
           \shifted at uline[\cover at tab@uline at thick@undergraduate]%
-            {\shifted at box[\cover at tab@entry at width@undergraduate]{\sht at supervisor}} \\
+            {\shifted at box[\cover at tab@entry at width@undergraduate]{%
+              \sht at supervisor}} \\
       \end{tabular}
     }
 
@@ -1316,25 +1365,32 @@
       \begin{tabular}{lc}
         Subject: &
           \sht at lines@to at tab[\cover at tab@uline at thick@undergraduate]%
-            [\cover at tab@entry at width@undergraduate][\content at left@shift at en]{\sht at title@en} \\
+            [\cover at tab@entry at width@undergraduate][\content at left@shift at en]{%
+              \sht at title@en} \\
         Student Name: &
           \shifted at uline[\cover at tab@uline at thick@undergraduate]%
-            {\shifted at box[\cover at tab@entry at width@undergraduate][\content at left@shift at en]{\sht at author@en}} \\
+            {\shifted at box[\cover at tab@entry at width@undergraduate]%
+              [\content at left@shift at en]{\sht at author@en}} \\
         Student ID: &
           \shifted at uline[\cover at tab@uline at thick@undergraduate]%
-            {\shifted at box[\cover at tab@entry at width@undergraduate][\content at left@shift at en]{\sht at author@id}} \\
+            {\shifted at box[\cover at tab@entry at width@undergraduate]%
+              [\content at left@shift at en]{\sht at author@id}} \\
         Year of Entrance: &
           \shifted at uline[\cover at tab@uline at thick@undergraduate]%
-            {\shifted at box[\cover at tab@entry at width@undergraduate][\content at left@shift at en]{\sht at entrance@year}} \\
+            {\shifted at box[\cover at tab@entry at width@undergraduate]%
+              [\content at left@shift at en]{\sht at entrance@year}} \\
         School: &
           \shifted at uline[\cover at tab@uline at thick@undergraduate]%
-            {\shifted at box[\cover at tab@entry at width@undergraduate][\content at left@shift at en]{\sht at institution@en}} \\
+            {\shifted at box[\cover at tab@entry at width@undergraduate]%
+              [\content at left@shift at en]{\sht at institution@en}} \\
         Major: &
           \shifted at uline[\cover at tab@uline at thick@undergraduate]%
-            {\shifted at box[\cover at tab@entry at width@undergraduate][\content at left@shift at en]{\sht at discipline@en}} \\
+            {\shifted at box[\cover at tab@entry at width@undergraduate]%
+              [\content at left@shift at en]{\sht at discipline@en}} \\
         Advisor: &
           \shifted at uline[\cover at tab@uline at thick@undergraduate]%
-            {\shifted at box[\cover at tab@entry at width@undergraduate][\content at left@shift at en]{\sht at supervisor@en}} \\
+            {\shifted at box[\cover at tab@entry at width@undergraduate]%
+              [\content at left@shift at en]{\sht at supervisor@en}} \\
       \end{tabular}
     }
 
@@ -1395,7 +1451,8 @@
 
     {\hfill{}作者签名:\hspace*{10em}导师签名:\hspace*{9em}}
 
-    {\hfill{}日\hspace*{2\ccwd}期:\hspace*{10em}日\hspace*{2\ccwd}期:\hspace*{9em}}
+    \hfill{}日\hspace*{2\ccwd}期:%
+    \hspace*{10em}日\hspace*{2\ccwd}期:\hspace*{9em}%
 
     \vspace{3ex}
   }
@@ -1593,7 +1650,9 @@
 \providecommand{\makebiblio}{%
   \renewcommand{\bibfont}{\zihao{5}}%
   \intotoc*{\cleardoublepage}{\bibname}%
+  \urlstyle{same}%
   \printbibliography%
+  \urlstyle{tt}%
 }
 % ------------------------------------------------------------------------------
 %   Appendix



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