texlive[55635] Master/texmf-dist: shtthesis (23jun20)

commits+karl at tug.org commits+karl at tug.org
Tue Jun 23 23:18:46 CEST 2020


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

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/shtthesis/CHANGELOG.md
    trunk/Master/texmf-dist/doc/latex/shtthesis/LICENSE
    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

Removed Paths:
-------------
    trunk/Master/texmf-dist/bibtex/bst/shtthesis/
    trunk/Master/texmf-dist/doc/latex/shtthesis/reference.bib

Modified: trunk/Master/texmf-dist/doc/latex/shtthesis/CHANGELOG.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/shtthesis/CHANGELOG.md	2020-06-23 21:18:28 UTC (rev 55634)
+++ trunk/Master/texmf-dist/doc/latex/shtthesis/CHANGELOG.md	2020-06-23 21:18:46 UTC (rev 55635)
@@ -2,6 +2,14 @@
 
 `sht-thesis` 项目派生于 `ucasthesis`,一个在 GPLv3 License 下分发的项目。根据该许可证条款,`sht-thesis` 项目列出基于 `ucasthesis` (commit `faad94b` 之后) 的所有修改条目:
 
+## 2020-06-23
+> Release: v0.3.0
+
+1. (试验性地)支持本科论文排版;
+2. 将参考文献后端改为 biblatex;
+3. 添加编号定理、证明等常用数学环境;
+4. 将学位指定从 `\shtsetup` 移至类选项;
+
 ## 2020-06-05
 
 项目名称改为 shtthesis,并完全重构项目结构。

Modified: trunk/Master/texmf-dist/doc/latex/shtthesis/LICENSE
===================================================================
--- trunk/Master/texmf-dist/doc/latex/shtthesis/LICENSE	2020-06-23 21:18:28 UTC (rev 55634)
+++ trunk/Master/texmf-dist/doc/latex/shtthesis/LICENSE	2020-06-23 21:18:46 UTC (rev 55635)
@@ -631,7 +631,7 @@
 state the exclusion of warranty; and each file should have at least
 the "copyright" line and a pointer to where the full notice is found.
 
-    sht-thesis, a LaTeX template for thesis writing in ShanghaiTech University.
+    shtthesis, an unofficial LaTeX thesis template for ShanghaiTech University.
     Copyright (C) 2020 Li Rundong <rundong.001 at gmail.com>
 
     This program is free software: you can redistribute it and/or modify
@@ -652,7 +652,7 @@
   If the program does terminal interaction, make it output a short
 notice like this when it starts in an interactive mode:
 
-    sht-thesis Copyright (C) 2020 Li Rundong <rundong.001 at gmail.com>
+    shtthesis Copyright (C) 2020 Li Rundong <rundong.001 at gmail.com>
     This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
     This is free software, and you are welcome to redistribute it
     under certain conditions; type `show c' for details.

Modified: trunk/Master/texmf-dist/doc/latex/shtthesis/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/shtthesis/README.md	2020-06-23 21:18:28 UTC (rev 55634)
+++ trunk/Master/texmf-dist/doc/latex/shtthesis/README.md	2020-06-23 21:18:46 UTC (rev 55635)
@@ -1,9 +1,12 @@
 # ShangHaiTech university THESIS (shtthesis)
-![Build](https://github.com/lirundong/sht-thesis/workflows/Build/badge.svg)
+[![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)
 
-`shtthesis` project, forked from [`ucasthesis`](https://github.com/mohuangrui/ucasthesis), is an **unofficial** LaTeX thesis template for ShanghaiTech University and satisfies all format requirements in 《上海科技大学研究生学位论文撰写规范(初稿)》. 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:
+`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
-\documentclass{shtthesis}
+\documentclass[master]{shtthesis}
 
 \shtsetup{
   title = {论文标题},
@@ -19,10 +22,13 @@
 
 ## Get the Template
 - Stable version:
+  - 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
+    ```
+
+    **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
-  - CTAN: TODO
-
-    Note that `shtthesis` package in CTAN does not include the university logo file. Please download [`shanghaitech-logo.pdf`](shanghaitech-logo.pdf) from this repository and put it in the root of your project folder.
 - Develop version: directly clone the GitHub repo
   ```bash
   git clone https://github.com/lirundong/sht-thesis.git
@@ -47,5 +53,4 @@
 
 ## License
 - The copyright of ShanghaiTech University logo (`shanghaitech-logo.pdf`) is owned by ShanghaiTech University
-- `shtthesis-gbt7714-plain.bst` is modified from [gbt7714](https://github.com/CTeX-org/gbt7714-bibtex-style) project and is licensed under LaTeX Project Public License v1.3c, see [lppl-1.3c](https://www.latex-project.org/lppl/lppl-1-3c.txt) for details
 - The rest of `shtthesis` project is licensed under GNU Public License v3, see [LICENSE](LICENSE) for details

Deleted: trunk/Master/texmf-dist/doc/latex/shtthesis/reference.bib
===================================================================
--- trunk/Master/texmf-dist/doc/latex/shtthesis/reference.bib	2020-06-23 21:18:28 UTC (rev 55634)
+++ trunk/Master/texmf-dist/doc/latex/shtthesis/reference.bib	2020-06-23 21:18:46 UTC (rev 55635)
@@ -1,159 +0,0 @@
- at book{wikibook2014latex,
-    title={http://en.wikibooks.org/wiki/LaTeX},
-    author={Wikibook},
-    year={2014},
-    publisher={On-line Resources}
-}
- at book{lamport1986document,
-    title={Document Preparation System},
-    author={Lamport, Leslie},
-    year={1986},
-    publisher={Addison-Wesley Reading, MA}
-}
- at article{chen2005zhulu,
-    title={著录文后参考文献的规则及注意事项},
-    author={陈浩元},
-    key={Chen Hao Yuan},
-    journal={编辑学报},
-    volume={17},
-    number={6},
-    pages={413--415},
-    year={2005}
-}
- at book{chu2004tushu,
-    title={图书馆数字参考咨询服务研究},
-    author={初景利},
-    key={Chu Jing Li},
-    year={2004},
-    address={北京},
-    publisher={北京图书馆出版社}
-}
- at article{stamerjohanns2009mathml,
-    title={{MathML}-aware article conversion from {LaTeX}},
-    author={Stamerjohanns, Heinrich and Ginev, Deyan and David, Catalin and Misev, Dimitar and Zamdzhiev, Vladimir and Kohlhase, Michael},
-    journal={Towards a Digital Mathematics Library},
-    volume={16},
-    number={2},
-    pages={109--120},
-    year={2009},
-    publisher={Masaryk University Press}
-}
- at article{betts2005aging,
-    title={Aging reduces center-surround antagonism in visual motion processing},
-    author={Betts, Lisa R and Taylor, Christopher P},
-    journal={Neuron},
-    volume={45},
-    number={3},
-    pages={361--366},
-    year={2005},
-    publisher={Elsevier}
-}
-
- at article{bravo1990comparative,
-    title={Comparative study of visual inter and intrahemispheric cortico-cortical connections in five native Chilean rodents},
-    author={Bravo, Hermes and Olavarria, Jaime},
-    journal={Anatomy and embryology},
-    volume={181},
-    number={1},
-    pages={67--73},
-    year={1990},
-    publisher={Springer}
-}
- at book{hls2012jinji,
-    author       = {哈里森·沃尔德伦},
-    key          = {Haliseng Woerdelun},
-    translator   = {谢远涛},
-    title        = {经济数学与金融数学},
-    address      = {北京},
-    publisher    = {中国人民大学出版社},
-    year         = {2012},
-    pages        = {235--236},
-}
- at proceedings{niu2013zonghe,
-    editor       = {牛志明 and 斯温兰德 and 雷光春},
-    key          = {Niu Zhi Ming Siwenlande Lei Guang Chun},
-    title        = {综合湿地管理国际研讨会论文集},
-    address      = {北京},
-    publisher    = {海洋出版社},
-    year         = {2013},
-}
- at incollection{chen1980zhongguo,
-    author       = {陈晋镳 and 张惠民 and 朱士兴 and 赵震 and
-        王振刚},
-    key          = {Chen Jing Ao Zhang Hui Ming Zhu Shi Xing Zhao Zhen Wang Zhen Gang},
-    title        = {蓟县震旦亚界研究},
-    editor       = {中国地质科学院天津地质矿产研究所},
-    booktitle    = {中国震旦亚界},
-    address      = {天津},
-    publisher    = {天津科学技术出版社},
-    year         = {1980},
-    pages        = {56--114},
-}
- at article{yuan2012lana,
-    author       = {袁训来 and 陈哲 and 肖书海},
-    key          = {Yuan xun lai Chen zhe Xiao shu Hai},
-    title        = {蓝田生物群: 一个认识多细胞生物起源和早期演化的新窗口 -- 篇一},
-    journal      = {科学通报},
-    year         = {2012},
-    volume       = {57},
-    number       = {34},
-    pages        = {3219},
-}
- at article{yuan2012lanb,
-    author       = {袁训来 and 陈哲 and 肖书海},
-    key          = {Yuan xun lai Chen zhe Xiao shu Hai},
-    title        = {蓝田生物群: 一个认识多细胞生物起源和早期演化的新窗口 -- 篇二},
-    journal      = {科学通报},
-    year         = {2012},
-    volume       = {57},
-    number       = {34},
-    pages        = {3219},
-}
- at article{yuan2012lanc,
-    author       = {袁训来 and 陈哲 and 肖书海},
-    key          = {Yuan xun lai Chen zhe Xiao shu Hai},
-    title        = {蓝田生物群: 一个认识多细胞生物起源和早期演化的新窗口 -- 篇三},
-    journal      = {科学通报},
-    year         = {2012},
-    volume       = {57},
-    number       = {34},
-    pages        = {3219},
-}
- at article{walls2013drought,
-    author       = {Walls, Susan C. and Barichivich, William J. and Brown, Mary
-        E.},
-    title        = {Drought, deluge and declines: the impact of precipitation
-        extremes on amphibians in a changing climate},
-    journal      = {Biology},
-    year         = {2013},
-    volume       = {2},
-    number       = {1},
-    pages        = {399--418},
-    urldate      = {2013-11-04},
-    url          = {http://www.mdpi.com/2079-7737/2/1/399},
-    doi          = {10.3390/biology2010399},
-}
- at article{Bohan1928,
-    author = { ボハン, デ},
-    title = { 過去及び現在に於ける英国と会 },
-    journal = { 日本時報 },
-    year = { 1928 },
-    volume = { 17 },
-    pages = { 5-9 },
-    edition = { 9 },
-    hyphenation = { japanese },
-    language = { japanese }
-}
-
- at article{Dubrovin1906,
-    author = { Дубровин, А. И },
-    title = { Открытое письмо Председателя Главного Совета Союза Русского Народа Санкт-Петербургскому Антонию, Первенствующему члену Священного Синода },
-    journal = { Вече },
-    year = { 1906 },
-    volume = {  },
-    edition = { 97 },
-    month = { 7 дек. 1906 },
-    pages = { 1-3 },
-    hyphenation = { russian },
-    language = { russian }
-}

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-23 21:18:28 UTC (rev 55634)
+++ trunk/Master/texmf-dist/doc/latex/shtthesis/shtthesis-user-guide.tex	2020-06-23 21:18:46 UTC (rev 55635)
@@ -1,12 +1,27 @@
-\documentclass{shtthesis}
+% shtthesis, an unofficial LaTeX thesis template for ShanghaiTech University.
+% Copyright (C) 2020 Li Rundong <rundong.001 at gmail.com>
+%
+% This program is free software: you can redistribute it and/or modify
+% it under the terms of the GNU General Public License as published by
+% the Free Software Foundation, either version 3 of the License, or
+% (at your option) any later version.
+%
+% This program is distributed in the hope that it will be useful,
+% but WITHOUT ANY WARRANTY; without even the implied warranty of
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+% GNU General Public License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with this program.  If not, see <https://www.gnu.org/licenses/>
 
+% graduate setup
+\documentclass[master]{shtthesis}
 \shtsetup{
-  degree = {master},
   degree-name = {工学硕士},
   degree-name* = {Master~of~Science~in~Engineering},
   secret-level = {白给},
-  title = {\ShtThesis~v\version~使用说明},
-  title* = {A~User's~Guide\\to\\\ShtThesis~v\version},
+  title = {\ShtThesis{}~v\version{}~使用说明},
+  title* = {A~User's~Guide\\to\\\ShtThesis{}~v\version{}},
   keywords = {上海科技大学,学位论文,\LaTeX{}},
   keywords* = {ShanghaiTech~University, Thesis, \LaTeX{}},
   author = {李润东},
@@ -19,9 +34,31 @@
   supervisor-institution = {上海科技大学信息科学与技术学院},
   discipline-level-1 = {计算机科学与技术},
   discipline-level-1* = {Computer~Science~and~Technology},
+  bib-resource = {reference.bib},
 }
 
-\definecolor{shtred}{RGB}{146,46,23}
+% undergraduate setup
+% \documentclass[bachelor, comfort]{shtthesis}
+% \shtsetup{
+%   title = {\ShtThesis{}~v\version{}\\使用说明},
+%   title* = {A~User's~Guide~to\\\ShtThesis{}~v\version{}},
+%   keywords = {上海科技大学,学位论文,\LaTeX{}},
+%   keywords* = {ShanghaiTech~University, Thesis, \LaTeX{}},
+%   date = {2020~年~06~月},
+%   date* = {06~/~2020},
+%   author = {李润东},
+%   author* = {Rundong~Li},
+%   author-id = {36273800},
+%   entrance-year = {2017},
+%   institution = {信息科学与技术学院},
+%   institution* = {School~of~Information~Science~and~Technology},
+%   supervisor = {范睿},
+%   supervisor* = {Rui~Fan},
+%   discipline = {计算机科学与技术},
+%   discipline* = {Computer~Science~and~Technology},
+%   bib-resource = {reference.bib},
+% }
+
 % `latex' and `shell' environments are adapted from `thuthesis'
 \usepackage{listings}
 \newcommand\prompt{\textup{\$}}
@@ -53,6 +90,8 @@
   framesep=3pt,
   rulesep=1pt,
   framerule=1pt,
+  frame=l,
+  rulecolor=\color{ShtRed},
   backgroundcolor=\color{gray!5},
   stringstyle=\color{green!40!black!100},
   keywordstyle=\bfseries\color{blue!50!black},
@@ -61,82 +100,134 @@
 }
 \lstdefinestyle{lstStyleShell}{%
   style=lstStyleBase,
-  frame=l,
-  rulecolor=\color{shtred},
   language=bash}
 \lstdefinestyle{lstStyleLaTeX}{%
   style=lstStyleBase,
-  frame=l,
-  rulecolor=\color{shtred},
   language=[LaTeX]TeX}
 \lstnewenvironment{latex}{\lstset{style=lstStyleLaTeX}}{}
 \lstnewenvironment{shell}{\lstset{style=lstStyleShell}}{}
 
 \usepackage{hologo}
-\usepackage{ifluatex}
-\ifluatex
-  \ifthenelse{\equal{\currentfontset}{windows}}{
-    \newfontface\EmojiFont{Segoe UI Emoji}[Renderer=HarfBuzz]
-  }{
-    \ifthenelse{\equal{\currentfontset}{mac}}{
-      \newfontface\EmojiFont{Apple Color Emoji}[Renderer=HarfBuzz]
-    }{
-      \newfontface\EmojiFont{Noto Color Emoji}[Renderer=HarfBuzz]
-    }
-  }
+\ifluahbtex
+  \usepackage{emoji}
 \else
-  \providecommand{\EmojiFont}{\emph{Current \LaTeX{} engine does not support Emoji}}
+  \providecommand{\emoji}[1]{ \fbox{\emph{#1}} }
 \fi
-\providecommand{\emoji}[1]{%
-  \begingroup%
-  \ifluatex%
-    \EmojiFont #1%
-  \else%
-    \EmojiFont%
-  \fi%
-  \endgroup%
-}
-\IfFontExistsTF{Times New Roman}{
-  \providefontfamily\timesnewroman{Times New Roman}
-}{
-  \providecommand{\timesnewroman}{\emph{Times New Roman missing}}
-}
-\IfFontExistsTF{Times}{
-  \providefontfamily\timesfamily{Times}
-}{
-  \providecommand{\timesfamily}{\emph{Times missing}}
-}
-\IfFontExistsTF{XITS-Regular.otf}{
-  \providefontfamily\xitsfamily{XITS-Regular.otf}
-}{
-  \providecommand{\xitsfamily}{\emph{XITS missing}}
-}
 
 \usepackage{subcaption}
 \usepackage{ctable}
-\usepackage{bicaption}
+\usepackage[list=off]{bicaption}
 \captionsetup[figure][bi-second]{name=Figure}
 \captionsetup[table][bi-second]{name=Table}
 
+\makeatletter
+  \def\ifundergraduate{\ifsht at undergraduate}
+  \def\ifgraduate{\ifsht at graduate}
+\makeatother
+
+\begin{filecontents}{reference.bib}
+ at article{stamerjohanns2009mathml,
+    title={{MathML}-aware article conversion from {LaTeX}},
+    author={Stamerjohanns, Heinrich and Ginev, Deyan and David, Catalin and Misev, Dimitar and Zamdzhiev, Vladimir and Kohlhase, Michael},
+    journal={Towards a Digital Mathematics Library},
+    volume={16},
+    number={2},
+    pages={109--120},
+    year={2009},
+    publisher={Masaryk University Press}
+}
+ at article{bravo1990comparative,
+    title={Comparative study of visual inter and intrahemispheric cortico-cortical connections in five native Chilean rodents},
+    author={Bravo, Hermes and Olavarria, Jaime},
+    journal={Anatomy and embryology},
+    volume={181},
+    number={1},
+    pages={67--73},
+    year={1990},
+    publisher={Springer}
+}
+ at proceedings{niu2013zonghe,
+    editor       = {牛志明 and 斯温兰德 and 雷光春},
+    key          = {Niu Zhi Ming Siwenlande Lei Guang Chun},
+    title        = {综合湿地管理国际研讨会论文集},
+    address      = {北京},
+    publisher    = {海洋出版社},
+    year         = {2013},
+}
+ at incollection{chen1980zhongguo,
+    author       = {陈晋镳 and 张惠民 and 朱士兴 and 赵震 and 王振刚},
+    key          = {Chen Jing Ao Zhang Hui Ming Zhu Shi Xing Zhao Zhen Wang Zhen Gang},
+    title        = {蓟县震旦亚界研究},
+    editor       = {中国地质科学院天津地质矿产研究所},
+    booktitle    = {中国震旦亚界},
+    address      = {天津},
+    publisher    = {天津科学技术出版社},
+    year         = {1980},
+    pages        = {56--114},
+}
+ at article{yuan2012lana,
+    author       = {袁训来 and 陈哲 and 肖书海},
+    key          = {Yuan xun lai Chen zhe Xiao shu Hai},
+    title        = {蓝田生物群: 一个认识多细胞生物起源和早期演化的新窗口 -- 篇一},
+    journal      = {科学通报},
+    year         = {2012},
+    volume       = {57},
+    number       = {34},
+    pages        = {3219},
+}
+ at article{walls2013drought,
+    author       = {Walls, Susan C. and Barichivich, William J. and Brown, Mary E.},
+    title        = {Drought, deluge and declines: the impact of precipitation extremes on amphibians in a changin climate},
+    journal      = {Biology},
+    year         = {2013},
+    volume       = {2},
+    number       = {1},
+    pages        = {399--418},
+    urldate      = {2013-11-04},
+    url          = {http://www.mdpi.com/2079-7737/2/1/399},
+    doi          = {10.3390/biology2010399},
+}
+ at article{Bohan1928,
+    author = { ボハン, デ},
+    title = { 過去及び現在に於ける英国と会 },
+    journal = { 日本時報 },
+    year = { 1928 },
+    volume = { 17 },
+    pages = { 5-9 },
+    edition = { 9 },
+    hyphenation = { japanese },
+    language = { japanese }
+}
+ at online{bachelor2019,
+  author = {上海科技大学教学事务处},
+  key = {shang hai ke ji da xue jiao xue shi wu chu},
+  title = {本科毕业论文(设计)表格模板下载(任务书、封面、撰写模板等)},
+  year = 2019,
+  url = {http://oaa.shanghaitech.edu.cn/2019/0321/c4666a41070/page.htm},
+  urldate = {2020-06-17}
+}
+\end{filecontents}
+
 \begin{document}
 
 \maketitle
 
 \frontmatter
-\begin{abstract}
-  本文档阐述 \shtthesis 的使用方法,包括其编译方式、文档类选项、文档类提供的功能及其他便于用户(\emph{也就是正在阅读这篇文档的您})快速撰写符合上海科技大学要求的学位论文的技术要点。
+\begin{abstract}[flattitle]
+  本文档阐述 \shtthesis{} v\version{} 的使用方法,包括其编译方式、文档类选项以及提供的功能。希望能够帮助读者快速便捷地完成学位论文排版。
 
-  \shtthesis 旨在以最简实现和最小依赖完整覆盖《上海科技大学研究生学位论文撰写规范(初稿)》的所有格式要求,且不为用户额外设限。从 v\version 起,仅需指定 documentclass 为 \shtthesis 即可满足基本排版要求。文档通过 \verb|\shtsetup| 命令统一设定学位论文信息,且仅提供满足格式需求的最少额外命令以保证兼容性。用户可根据自身撰文习惯,引入额外的宏包和命令完成学位论文撰写。
+  \shtthesis{} 旨在以最简实现和最小依赖完整覆盖上海科技大学本科及研究生学位论文的所有格式要求,且不为用户额外设限。使用时仅需指定 documentclass 为 \shtthesis{} 即可满足基本排版要求。文档通过 \verb|\shtsetup| 命令统一设定学位论文信息,且仅提供满足格式需求的最少额外命令以保证兼容性。用户可根据自身撰文习惯,引入额外的宏包和命令完成学位论文撰写。
 \end{abstract}
 
-\begin{abstract*}
-  We elaborate on the usage of document class \shtthesis, including its compiling process, class options, provided functionalities, and other technical points to facilitate the user (that is, \emph{you}) to quickly develop their thesis to meet the format requirements of ShanghaiTech University. 
+\begin{abstract*}[flattitle]
+  We elaborate on the usage of document class \shtthesis{} v\version{}, including its compiling process, class options and provided functionalities. We hope this document can help the reader to quickly typeset his or her thesis. 
 
-  \shtthesis is intended to cover all requirements in 《上海科技大学研究生学位论文撰写规范(初稿)》with minimal function set and introduce no restriction to the user. Beginning with v\version, specifying documentclass to \shtthesis is sufficient for the basic thesis typesetting requirements. This document class uses \verb|\shtsetup| to uniformly set up thesis information and only provides minimum auxiliary commands to meet all format requirements. The user can import other packages and functionalities according to their writing habits. 
+  \shtthesis{} is intended to cover all format requirements of ShanghaiTech graduate/undergraduate thesis with minimal function set and introduce no restriction to the user. Specifying documentclass to \shtthesis{} is sufficient for the basic typesetting requirements. This document class uses \verb|\shtsetup| to uniformly set up mandatory information and only provides minimum auxiliary commands to meet all format requirements. Users can import other packages and functionalities according to their writing habits. 
 \end{abstract*}
 
 \makeindices
 
+\ifgraduate
 \begin{nomenclatures}
   \header[单位]{符号}{说明}
   \item[${m^{2} \cdot s^{-2} \cdot K^{-1}}$]{$R$}{the gas constant}
@@ -162,64 +253,96 @@
   \item{$\nabla$}{gradient operator}
   \item{$\delta^{\pm}$}{upwind-biased interpolation scheme}
 \end{nomenclatures}
+\fi
 
 \mainmatter
 \chapter{模板介绍}
-\shtthesis (\textbf{S}hang\textbf{h}ai\textbf{T}ech University \textbf{THESIS}) 是根据《上海科技大学研究生学位论文撰写规范(初稿)》(下文简称《规范》)编写的、适用于上海科技大学学位论文写作的\emph{非官方} \LaTeX 模板。目前版本(v\version)提供了博士、硕士学位论文排版选项,且能够自动生成用于盲审的匿名版以及最终提交的打印版论文。
+\shtthesis{} (\textbf{S}hang\textbf{h}ai\textbf{T}ech University \textbf{THESIS}) 是根据《上海科技大学研究生学位论文撰写规范(初稿)》和《上海科技大学本科毕业论文(设计)工作条例(试行)》(下文统一简称《规范》)编写的、适用于上海科技大学学位论文写作的\emph{非官方} \LaTeX 模板。目前版本(v\version{})提供了本科、硕士和博士学位论文排版选项,且能够自动生成用于盲审的匿名版以及最终提交的打印版论文。
 
-这篇文档将尽量详细地阐释 \shtthesis 的使用方法和技巧。由于这篇文档直接使用 \shtthesis 排版,所以其源代码文件 \texttt{\jobname.tex} 也可以作为一个实际样例以供读者参考使用。
+本文档将尽量详细地阐释 \shtthesis{} 的使用方法和技巧。同时本文档直接使用 \shtthesis{} 排版,其源代码文件 \jobname.tex 也可以作为一个实际样例以供读者参考使用。
 
-我们计划在 \shtthesis 后续版本中加入本科学位论文的排版选项,因此亟需有上海科技大学本科论文排版经验的同学参与到 \shtthesis 项目中。我们也计划将该使用说明和模板文件 \verb|shtthesis.cls| 统一重构为 \verb|.dtx| 文件。同时,我们也非常希望得到用户宝贵的反馈和建议。若您有意为 \shtthesis 贡献 issues 和 pull requests,请移步至项目主页 \url{https://github.com/lirundong/sht-thesis}。
+我们计划在 \shtthesis{} 后续版本中加入本科学位论文的排版选项,因此亟需有上海科技大学本科论文排版经验的同学参与到 \shtthesis{} 项目中。我们也计划将该使用说明和模板文件 shtthesis.cls 使用 \textsf{DocStrip} 统一重构,并逐步向 \LaTeX3 迁移。我们非常希望得到用户宝贵的反馈和建议,若您有意为 \shtthesis{} 贡献 issues 和 pull requests,请移步至项目主页 \url{https://github.com/lirundong/shtthesis}。
 
+\section*{文档排版样式说明}
+本文档针对各部分不同内容使用不同的排版样式:文档正文使用宋体和英文衬线体(serif),\emph{强调部分}使用\emph{楷体}和英文意大利体(\emph{italic}),宏包名称使用英文无衬线体(\textsf{sans serif},例如 \textsf{hyperref}),代码及选项使用英文等宽体(\texttt{typewriter})和\texttt{仿宋体}排版。
+
+对于文中出现的命令说明,例如:
+\begin{latex}
+\foo[<bar>]{<baz>}
+\end{latex}
+其中,由 \verb|[]| 包裹的为命令的\emph{可选参数},由 \verb|{}| 包裹的为命令的\emph{必选参数},由 \verb|<>| 包裹的为\emph{参数名称}。在为某一参数赋值时,不必输入前后的尖括号\verb|<>|。例如,欲对 \verb|\foo| 命令设定参数 \verb|bar=this-arg|、\verb|baz=另一参数|:
+\begin{latex}
+\foo[this-arg]{另一参数}
+\end{latex}
+
 \chapter{模板使用}
 \section{模板安装}
-\shtthesis 提供的文档类型文件为 \verb|shtthesis.cls|,封面所需的上海科技大学校徽文件为 \verb|shanghaitech-logo.pdf|,参考文献 GBT-7714 格式文件为 \verb|shtthesis-gbt7714-plain.bst|,用户仅需将这三个文件拷贝至自己论文的工作目录下即可完成安装。假设用户的论文文件为 \verb|thesis.tex|,则工作目录中必要的文件包括:
+\shtthesis{} 已经发布至 CTAN\footnote{\url{https://www.ctan.org/pkg/shtthesis}} 并已收录至 \TeX{} Live 中,推荐使用 \TeX{} Live 的包管理器 \verb|tlmgr| 直接安装:
+\begin{shell}
+`\prompt' tlmgr install shtthesis
+\end{shell}
+若当前发行版已包含 \shtthesis{},建议在使用前更新至 CTAN 上的最新版:
+\begin{shell}
+`\prompt' tlmgr update shtthesis
+\end{shell}
+
+为避免版权问题,上传至 CTAN 的 \shtthesis{} 并不包含校徽文件,需要至项目主页下载 shanghaitech-logo.pdf\footnote{\url{https://github.com/lirundong/shtthesis/raw/master/shanghaitech-logo.pdf}}。假设用户的论文文档为 thesis.tex,参考文献数据库为 reference.bib (本文档的 bib 数据库由 \jobname.tex 自动生成),则需要将下载的校徽文件与它们放在同一目录下,下文称为\emph{工作目录}。工作目录中必要的文件包括:
 \begin{center}
   \begin{tabular}{ll}
     \toprule
     文件名称 & 说明 \\
     \midrule 
-    \verb|shtthesis.cls| & 模板文档类文件 \\
-    \verb|shanghaitech-logo.pdf| & 上海科技大学校徽 \\
-    \verb|shtthesis-gbt7714-plain.bst| & 参考文献格式文件 \\
-    \verb|thesis.tex| & 论文文件 \\
-    \verb|reference.bib| & 参考文献默认文件名 \\
+    thesis.tex & 论文文档 \\
+    reference.bib & 参考文献数据库 \\
+    shanghaitech-logo.pdf & 上海科技大学校徽 \\
     \bottomrule
   \end{tabular}
 \end{center}
 
-\paragraph{注意}
-为避免版权问题,上传至 CTAN 的 \shtthesis 并不包含校徽文件。如果用户直接使用 \TeX{} Live 分发的 \shtthesis,则需要至项目主页下载校徽文件\footnote{校徽文件在 GitHub 项目下的链接为 \url{https://github.com/lirundong/shtthesis/raw/master/shanghaitech-logo.pdf}},并将 \verb|shanghaitech-logo.pdf| 与 \verb|thesis.tex| 放置在同一目录下。
-
 \section{文档编译}
-\shtthesis 支持使用 \hologo{XeLaTeX} 和 \hologo{LuaLaTeX} 编译(注意,\emph{不支持} \hologo{pdfLaTeX})。尝试编译本文档的源代码 \texttt{\jobname.tex} 至 PDF 文件是了解 \shtthesis 编译流程最直观的方法。我们推荐在最新的 \hologo{TeX} Live 环境下,使用 \verb|latexmk| 工具进行编译。Windows 及 Linux 用户请下载安装 \hologo{TeX} Live (\url{https://www.tug.org/texlive/}),macOS 用户请下载安装 Mac\hologo{TeX} (\url{https://www.tug.org/mactex/})。不推荐在 overleaf 等在线平台编译使用 \shtthesis,项目主页不接受与 overleaf 相关的 issues。
+\shtthesis{} 支持使用 \hologo{XeLaTeX} 和 \hologo{LuaLaTeX} 编译(注意,\emph{不支持} \hologo{pdfLaTeX})。推荐在最新的 \hologo{TeX} Live 环境下,使用 \verb|latexmk| 工具进行编译。Windows 及 Linux 用户请下载安装 \hologo{TeX} Live (\url{https://www.tug.org/texlive/}),macOS 用户请下载安装 Mac\hologo{TeX} (\url{https://www.tug.org/mactex/})。\emph{非常不推荐}使用 $\mathbb{C}$\TeX 发行版(大人,时代变了\emoji{unamused}),也不推荐在 overleaf 等在线平台编译使用 \shtthesis{} (免费版用户编译时长被限制在 1 分钟,不一定能够编译完上百页的大论文)。项目主页不接受与 $\mathbb{C}$\TeX、overleaf 相关的 issues。
 
-在完成环境配置后,即可使用 \verb|latexmk| 工具完成编译。使用 \hologo{XeLaTeX} 引擎进行编译的命令为:
+在完成环境配置后,即可使用 \verb|latexmk| 工具完成编译。打开终端(Windows 用户打开 CMD)切换至工作目录,使用 \hologo{XeLaTeX} 引擎进行编译:
 \begin{shell}
 `\prompt' latexmk -pdfxe
 \end{shell}
-若使用 \hologo{LuaLaTeX} 引擎,则编译命令为:
+若偏好使用 \hologo{LuaLaTeX} 引擎,则编译命令为:
 \begin{shell}
 `\prompt' latexmk -pdflua
 \end{shell}
-一般来说,\hologo{XeLaTeX} 引擎的编译速度较快且占用资源较少,而 \hologo{LuaLaTeX} 引擎的编译结果似乎有更好的跨平台规范性。在 \shtthesis 开发过程中,曾出现过在 macOS 下 \hologo{XeLaTeX} 编译的 PDF 在 Windows 下无法打开,而 \hologo{LuaLaTeX} 编译结果正常的情况。若使用 LuaHB\hologo{TeX} 引擎编译,还可进一步使用 emoji 等特殊功能。例如:\emoji{ 👴🏻👴🏼👴🏽👴🏾👴🏿👴👨🏻‍🦳🎅🏻🦹🏻‍♂️🕵🏼‍♂️👨🏼‍⚕️👨🏼‍🌾👨🏼‍🍳👨🏼‍💼👨🏼‍🔧👨🏼‍🔬👨🏼‍🎨👨🏼‍🚒👨🏼‍✈️👨🏼‍⚖️🧔🏼🤵🏼🧙🏻‍♂️🧖🏼‍♂️👨🏼‍🌾👮🏼‍♂️👨🏼‍🏫👨🏼‍🚀}。LuaHB\hologo{TeX} 引擎是 \hologo{TeX} Live 2020 中 \hologo{LuaLaTeX} 的默认实现,在 \hologo{TeX} Live 2019 下使用 LuaHB\hologo{TeX} 的方法为:
+
+一般来说,\hologo{XeLaTeX} 引擎的编译速度较快且占用资源较少,而 \hologo{LuaLaTeX} 引擎的编译结果似乎有更好的跨平台规范性。在 \shtthesis{} 开发过程中,曾出现过在 macOS 下 \hologo{XeLaTeX} 编译的 PDF 在 Windows 下无法打开,而 \hologo{LuaLaTeX} 编译结果正常的情况。若使用 LuaHB\hologo{TeX} 引擎编译,还可进一步使用 Emoji 等功能。例如:\emoji{hot-pepper}\emoji{pear}\emoji{keycap-ten}\emoji{syringe}\emoji{sweat-drops}\emoji{cow-face}\emoji{beer-mug}\footnote{如果使用非 LuaHB\hologo{TeX} 引擎编译,您只能看到一堆方框……}。LuaHB\hologo{TeX} 引擎是 \hologo{TeX} Live 2020 中 \hologo{LuaLaTeX} 的默认实现,在 \hologo{TeX} Live 2019 下使用 LuaHB\hologo{TeX} 的方法为:
 \begin{shell}
 `\prompt' latexmk -pdflua -pdflualatex=lualatex-dev
 \end{shell}
 
 \section{载入模板类}
-模板安装完成后,在论文文件 \verb|thesis.tex| 开头使用
+模板安装完成后,在论文文件 thesis.tex 开头使用
 \begin{latex}
-\documentclass{shtthesis}
+\documentclass[<类参数>]{shtthesis}
 \end{latex}
-即可载入模板。\shtthesis 接受的类参数包括:用于生成盲审论文的 \verb|anonymous| 选项,用于生成打印版论文的 \verb|print| 选项,以及传递给 \textsf{cexbook} 的其他选项。
+即可载入模板。\shtthesis{} 接受的类参数包括:用于指定学位类型的 \texttt{\{bachelor | master | doctor\}} 选项、用于生成盲审论文的 \verb|anonymous| 选项,用于生成打印版论文的 \verb|print| 选项,以及传递给 \textsf{cexbook} 的其他选项。多个选项间以英文逗号“,”隔开。
 
+\subsection{指定学位类型}
+\shtthesis{} v\version{} 接受的学位类型包括学士(bachelor)、硕士(master)和博士(doctor),学位类型必须指定且不能同时指定多种学位。指定学位类型后,\shtthesis{} 会按照相应排版规则,生成不同的封面和正文格式。
+
+需要注意的是,教务处给出的本科生论文排版规范~\citep{bachelor2019} 中包含一些非常费解的内容,且一并发布的 Word 和 \LaTeX{} 模板有相当多相互矛盾的格式规范,\shtthesis{} v\version{} 中本科生论文的排版默认以教务处 Word 模板为准。
+
+2020 年学位申请时,本科生收到过包含下述内容的通知:
+\begin{quotation}
+“如果是使用Latex版模板,保证封面与学校的word版要求完全一致,正文中的格式不要求在字号等细节方面与Word版要求严格一致,但要做到自己的论文自统一并且符合常用规范。”
+\end{quotation}
+因此 \shtthesis{} 为本科生论文额外提供了 \verb|comfort| 选项,在保证封面符合规范的同时优化正文的排版细节,使最终论文视觉上更为舒适统一且正式。推荐排版本科论文时使用:
+\begin{latex}
+\documentclass[bachelor, comfort]{shtthesis}
+\end{latex}
+
 \subsection{\texttt{anonymous} 选项} \label{sec::option_anonymous}
-为方便生成盲审所需的匿名版论文,在文档类传入 \verb|anonymous| 即可将论文中英文封面的作者信息、导师信息,以及附录中的作者简历替换为匿名字符串,将作者论文发表、专利申请记录替换为匿名版本,并隐去文末的致谢部分:
+为方便生成研究生论文盲审时所需的匿名版论文,传入 \verb|anonymous| 类参数即可将论文中英文封面的作者信息、导师信息,以及附录中的作者简历替换为匿名字符串,将作者论文发表、专利申请记录替换为匿名版本,并隐去文末的致谢部分:
 \begin{latex}
 \documentclass[anonymous]{shtthesis}
 \end{latex}
-\shtthesis 默认的匿名字符串为连续的三个英文星号“***”,该字符串可使通过 \verb|\shtsetup| 的 anonymous-str 选项修改:
+\shtthesis{} 默认的匿名字符串为连续的三个英文星号“***”,该字符串可使通过 \verb|\shtsetup| 的 \verb|anonymous-str| 选项修改:
 \begin{latex}
 \shtsetup{
   anonymous-str = XXX, % 作者、导师姓名在匿名环境下显示为 XXX
@@ -234,28 +357,28 @@
 \end{latex}
 
 \subsection{传递给 \textsf{ctexbook} 的其他选项}
-\shtthesis 实际使用 \CTeX 宏包提供的 \textsf{ctexbook} 文档类排版,除 \verb|anonymous| 和 \verb|print| 外的其余类参数会传递给 \textsf{ctexbook}。其中需要注意的选项为 fontset,即设定论文所用的字体集。\CTeX 宏包自身能够根据编译平台选择合适的字体集,但有时会出现平台识别失败从而回退至 \TeX Live 提供的最基础的 Fandol 字体集导致缺字的情况。此时可以手动设置相应的 fontset,例如在 Windows 平台下设置 \verb|fontset=windows|,在 macOS 平台下设置 \verb|fontset=mac|:
+\shtthesis{} 实际使用 \CTeX 宏包提供的 \textsf{ctexbook} 文档类排版,除上述选项外的类参数会传递给 \textsf{ctexbook}。其中需要注意的选项为 \verb|fontset|,即设定论文所用的字体集。\CTeX 宏包自身能够根据编译平台选择合适的字体集,也可以手动设置相应的 fontset,例如在 Windows 平台下设置 \verb|fontset=windows|,在 macOS 平台下设置 \verb|fontset=mac|:
 \begin{latex}
 \documentclass[fontset=windows]{shtthesis}
 \end{latex}
-不同字符集所用字体见表~\ref{tab::fonts}。
+不同字体集所用字体见表~\ref{tab::fonts}。在 Linux/UNIX 环境下对于宋体和黑体,会首先检测思源宋体/黑体(Source Han 字体或 Noto CJK 字体)是否安装,若未检测到则回退至 Fandol 宋体/黑体;对于楷体和仿宋,则会依次检测方正楷体/仿宋-GBK 是否安装,若未检测到则退回至 Fandol 楷体/仿宋。
 
 \begin{table}[htb]
   \centering
-  \caption{不同字符集下 \shtthesis 所用字体}
+  \caption{不同字符集下 \shtthesis{} 所用字体}
   \label{tab::fonts}
   \begin{subtable}{\columnwidth}
     \centering
-    \caption{\shtthesis 所用中文字体}
+    \caption{\shtthesis{} 所用中文字体}
     \label{tab::chs_fonts}
-    \begin{tabular}{l *{3}{c}}
+    \begin{tabular}{*{3}{c}}
       \toprule
-       & Windows & Mac & Fandol \\
+      Windows & macOS & Linux/UNIX \\
       \midrule
-      \songti   宋体 & \songti   中易宋体 & \songti   华文宋体简体 & \songti   Fandol 宋体 \\
-      \heiti    黑体 & \heiti    中易黑体 & \heiti    华文黑体简体 & \heiti    Fandol 黑体 \\
-      \kaishu   楷书 & \kaishu   中易楷体 & \kaishu   华文楷体简体 & \kaishu   Fandol 楷体 \\
-      \fangsong 仿宋 & \fangsong 中易仿宋 & \fangsong 华文仿宋简体 & \fangsong Fandol 仿宋 \\
+      \songti   中易宋体 & \songti   华文宋体简体 & \songti   思源宋体 $\to$ Fandol 宋体 \\
+      \heiti    中易黑体 & \heiti    华文黑体简体 & \heiti    思源黑体 $\to$ Fandol 黑体 \\
+      \kaishu   中易楷体 & \kaishu   华文楷体简体 & \kaishu   方正楷体-GBK $\to$ Fandol 楷体 \\
+      \fangsong 中易仿宋 & \fangsong 华文仿宋简体 & \fangsong 方正仿宋-GBK $\to$ Fandol 仿宋 \\
       \bottomrule
     \end{tabular}
   \end{subtable}
@@ -264,7 +387,7 @@
   \newline
   \begin{subtable}{\columnwidth}
     \centering
-    \caption{\shtthesis 所用英文字体(全平台一致)}
+    \caption{\shtthesis{} 所用英文字体(全平台一致)}
     \label{tab::eng_fonts}
     \begin{tabular}{*{3}{c}}
       \toprule
@@ -276,34 +399,19 @@
   \end{subtable}
 \end{table}
 
-用户可以在不显著违反《规范》的前提下按照自身需求自定义字符集(例如在排版正文英文字体时,{\rmfamily \TeX{} Gyre Termes}、{\xitsfamily XITS}、{\timesfamily Times} 和 {\timesnewroman Times New Roman} 几种字体几乎没有明显区别,见表~\ref{tab::serif_fonts}),或通过其他设置调整 \textsf{ctexbook} 的排版行为。\textsf{ctexbook} 使用方法详见 \CTeX 文档。\footnote{\url{http://mirrors.ctan.org/language/chinese/ctex/ctex.pdf}}
+需要注意 Fandol 系列字体虽然为 \TeX{} Live 自带,但其字符覆盖有限,对于生僻字可能出现缺字情况。可以通过查看附录~\ref{sec::chs_rare} 确认当前编译环境所用的字体库是否有缺字风险。思源宋体\footnote{\url{https://source.typekit.com/source-han-serif/cn/}}、思源黑体\footnote{\url{https://github.com/adobe-fonts/source-han-sans}}、方正楷体-GBK\footnote{\url{https://www.foundertype.com/index.php/FontInfo/index/id/137}}和方正仿宋-GBK\footnote{\url{https://www.foundertype.com/index.php/FontInfo/index/id/128}} 均为免费字体且完整覆盖简繁扩展 (GBK) 字符集,非常推荐 Linux/UNIX 用户安装使用。
 
-\begin{table}[htb]
-  \centering
-  \caption{不同英文衬线字体测试}
-  \label{tab::serif_fonts}
-  \begin{tabular}{ll}
-    \toprule
-    Font Name & Content \\
-    \midrule
-    \rmfamily \TeX{} Gyre Termes & \rmfamily The quick brown fox jumps over the lazy dog. \\
-    \xitsfamily XITS & \xitsfamily The quick brown fox jumps over the lazy dog. \\
-    \timesfamily Times & \timesfamily The quick brown fox jumps over the lazy dog. \\
-    \timesnewroman Times New Roman & \timesnewroman The quick brown fox jumps over the lazy dog. \\
-    \bottomrule
-  \end{tabular}
-\end{table}
+\section{设定论文必要信息} \label{sec::setup_info}
+知晓学位类型后,\shtthesis{} 还需其他必要信息才能进行进一步排版:根据《规范》,博士学位论文和硕士学位论文需要在中英文封面中,依次列出论文密级、论文标题、作者姓名、导师信息、学位类别、一级学科、学校/学院名称及论文完成时间;根据\citet{bachelor2019},本科生学位论文需要在中英文封面中依次列出论文题目、学生姓名、学号、入学年份、学院、专业、指导教师及论文完成时间。以上信息均可通过 \verb|\shtsetup| 命令,在论文导言区(即 \verb|\documentclass| 之后、\verb|\begin{document}| 之前)以 key=value 方式统一设定。用户可以一次性调用 \verb|\shtsetup| 设定所有信息,也可分多次设定。
 
-\section{学位及封面信息} \label{sec::setup_info}
-\shtthesis 需要知晓学位类型(v\version 支持 master 和 doctor)才能进行进一步排版;其次根据《规范》,博士学位论文和硕士学位论文需要在中英文封面中,依次列出论文密级、论文标题、作者姓名、导师信息、学位类别、一级学科、学校/学院名称及论文完成时间,并在中英文摘要之后列出论文关键词。以上信息均可通过 \verb|\shtsetup| 命令,在论文导言区(即 \verb|\documentclass| 之后、\verb|\begin{document}| 之前)以 key=value 方式统一设定。用户可以一次性调用 \verb|\shtsetup| 设定所有信息,也可分多次设定。例如:
+研究生论文信息设定样例为:
 \begin{latex}
 \shtsetup{
-  degree = {master},
   degree-name = {工学硕士},
   degree-name* = {Master~of~Science~in~Engineering},
   secret-level = {白给},
-  title = {\ShtThesis~v\version~使用说明},
-  title* = {A~User's~Guide\\to\\\ShtThesis~v\version},
+  title = {\ShtThesis{}~v\version{}~使用说明},
+  title* = {A~User's~Guide\\to\\\ShtThesis{}~v\version{}},
   keywords = {上海科技大学,学位论文,\LaTeX{}},
   keywords* = {ShanghaiTech~University, Thesis, \LaTeX{}},
   author = {李润东},
@@ -318,41 +426,76 @@
   discipline-level-1* = {Computer~Science~and~Technology},
   date = {2020~年~6~月},
   date* = {June,~2020},
+  bib-resource = {reference.bib},
 }
 \end{latex}
-其中,表示中文信息条目的 key 为 \verb|-| 连接的小写单词(例如 \verb|degree-name|),由 \verb|*| 结尾的 key 一般表示对应的英文条目(例如 \verb|degree-name*|);value 可以在前后添加大括号,也可以不添加。特别需要注意 \verb|\shtsetup| 命令内\emph{不能有空行}。
 
+本科生论文信息设定样例为:
+\begin{latex}
+\shtsetup{
+  title = {\ShtThesis{}~v\version{}\\使用说明},
+  title* = {A~User's~Guide~to\\\ShtThesis{}~v\version{}},
+  keywords = {上海科技大学,学位论文,\LaTeX{}},
+  keywords* = {ShanghaiTech~University, Thesis, \LaTeX{}},
+  date = {2020~年~06~月},
+  date* = {06~/~2020},
+  author = {李润东},
+  author* = {Rundong~Li},
+  author-id = {36273800},
+  entrance-year = {2017},
+  institution = {信息科学与技术学院},
+  institution* = {School~of~Information~Science~and~Technology},
+  supervisor = {范睿},
+  supervisor* = {Rui~Fan},
+  discipline = {计算机科学与技术},
+  discipline* = {Computer~Science~and~Technology},
+  bib-resource = {reference.bib},
+}
+\end{latex}
+
+在 \verb|\shtsetup| 的 key=value 设定机制中,表示中文信息条目的 key 为 \verb|-| 连接的小写单词(例如研究生学位中文名称 \verb|degree-name|),由 \verb|*| 结尾的 key 一般表示对应的英文条目(例如研究生学位英文名称 \verb|degree-name*|);value 可以在前后添加大括号,也可以不添加。特别需要注意 \verb|\shtsetup| 命令内\emph{不能有空行}。
+
 \subsection{学位信息}
-需要设定的学位信息包括:学位类型(degree)、学位名称(degree-name)和英文学位名称(degree-name*),具体见表~\ref{tab::degree_info}。学位类型会影响 \shtthesis 的中英文封面内容。
+研究生学位论文需要额外设定的学位信息包括:学位名称(degree-name)和英文学位名称(degree-name*),具体见表~\ref{tab::degree_info}。学位类型会影响 \shtthesis{} 的中英文封面内容。
 \begin{table}[htb]
 \centering
 \caption{通过\texttt{shtsetup}设定的学位信息} \label{tab::degree_info}
-\small
 \begin{tabular}{llp{0.5\columnwidth}}
   \toprule
   key & value 样例 & 说明 \\
   \midrule
-  degree & doctor & v\version 目前支持硕士(master)和博士(doctor)论文排版 \\
-  degree-name & 学术型博士 & 中文学位名称,《规范》中学术型学位中文名称包括:学术型博士、理学硕士、工学硕士 \\
-  degree-name* & Doctor~of~Philosophy & 英文学位名称,《规范》中上述学位对应的英文名称为:Doctor~of~Philosophy、Master~of~Natural~Science、Master~of~Science~in~Engineering \\
+  degree-name & 学术型博士 & 中文学位名称,《规范》中学术型学位中文名称包括:\emph{学术型博士}、\emph{理学硕士}、\emph{工学硕士} \\
+  degree-name* & Doctor~of~Philosophy & 英文学位名称,《规范》中上述学位对应的英文名称为:\emph{Doctor~of~Philosophy}、\emph{Master~of~Natural~Science}、\emph{Master~of~Science~in~Engineering} \\
   \bottomrule
 \end{tabular}
 \end{table}
 
 \subsection{论文标题信息}
-设定论文中英文标题和涉密等级。中文标题(title)和英文标题(title*)中可以包含换行符。涉密等级(secret-level)会以“密级:\uline{XXX}”显示在中文封面右上角,未设定涉密等级则不显示相关信息。
+设定论文中英文标题和涉密等级。中文标题(title)和英文标题(title*)中可以包含换行符。研究生学位论文的涉密等级(secret-level)会以“密级:\uline{XXX}”显示在中文封面右上角,未设定涉密等级则不显示相关信息。
 
 \subsection{作者信息}
-需要设定的作者信息包括:作者中英文姓名(author 和 author*)、一级学科中英文名称(discipline-level-1 和 discipline-level-1*)和学校/学院中英文名称(institution 和 institution*)。注意《规范》要求以姓氏拼音在前、名字拼音在后、中间以半角空格分隔的格式书写英文姓名。
+需要设定的作者信息包括:作者中英文姓名(author 和 author*)和学校/学院中英文名称(institution 和 institution*),研究生需要设定一级学科中英文名称(discipline-level-1 和 discipline-level-1*),本科生需要设定攻读专业中英文名称(discipline 和 discipline*)。
+
+特别注意研究生和本科生的英文名格式要求不一致:研究生要求以姓氏拼音在前、名字拼音在后、中间以半角空格分隔的格式书写英文姓名:
 \begin{latex}
 \shtsetup{
+  % 研究生中英文姓名格式要求
   author = 李润东,
   author* = {Li~Rundong}, % 正确写法
   % author* = {Rundong~Li}, % 错误写法
 }
 \end{latex}
+而本科生要求以名字拼音在前、姓氏拼音在后、中间以半角空格分隔的格式书写英文姓名:
+\begin{latex}
+\shtsetup{
+  % 本科生中英文姓名格式要求
+  author = 李润东,
+  author* = {Rundong~Li}, % 正确写法
+  % author* = {Li~Rundong}, % 错误写法
+}
+\end{latex}
 
-在设定学校/学院名称时,中文名称(institution)不可带换行符,英文名称(institution*)应在学院、学校名称间加入换行符,否则封面排版会出现错误。
+研究生需要设定完整的学校、学院名称,中文名称(institution)不可带换行符,英文名称(institution*)应在学院、学校名称间加入换行符,否则封面排版会出现错误:
 \begin{latex}
 \shtsetup{
   institution = 上海科技大学信息科学与技术学院,
@@ -360,6 +503,13 @@
                   ShanghaiTech~University},
 }
 \end{latex}
+本科生则不必包含学校名称,直接设定学院名称即可,注意中英文名称中均不能包含换行符:
+\begin{latex}
+\shtsetup{
+  institution = 信息科学与技术学院,
+  institution* = {School~of~Information~Science~and~Technology},
+}
+\end{latex}
 
 \subsection{导师信息}
 需要设定的导师信息包括:导师中英文姓名(supervisor 和 supervisor*)和导师单位中文名称(supervisor-institution)。注意在中文封面中,导师姓名和单位分两行显示在“指导教师”条目下。根据《规范》,导师中文姓名(supervisor)应包含导师职称,如教授、副教授、助理教授、研究员、副研究员,以一个半角空格跟随在姓名之后;导师英文姓名(supervisor*)则统一以“Professor”开头,与英文姓名以一个半角空格隔开。导师单位中文名称(supervisor-institution)不可包含换行符。
@@ -372,7 +522,7 @@
 \end{latex}
 
 \subsection{成文日期}
-通过 date 和 date* 分别设置中英文成文日期,日期内容请参考《规范》,日期格式为:
+通过 date 和 date* 分别设置中英文成文日期,日期内容应按照申请学位的时间节点填写,具体请参考当年《规范》。研究生成文日期格式为:
 \begin{latex}
 \shtsetup{
   date = {2020~年~6~月},
@@ -379,12 +529,19 @@
   date* = {June,~2020},
 }
 \end{latex}
+本科生成文日期格式为:
+\begin{latex}
+\shtsetup{
+  date = {2020~年~06~月},
+  date* = {06~/~2020},
+}
+\end{latex}
 
 \section{前言部分}
-《规范》规定论文前言部分应包含论文原创性声明和授权使用声明、中英文摘要、目录及图形、表格列表。若有需要,可加入符号列表。\shtthesis 会自动生成目录和图表列表,在不设置 \verb|anonymous| 选项时会自动生成声明页。\shtthesis 提供了摘要和符号列表环境,以便于用户生成中英文摘要和符号列表。
+《规范》规定论文前言部分应包含论文原创性声明和授权使用声明、中英文摘要、目录,研究生论文还需包含图形、表格列表。若有需要,可加入符号列表。\shtthesis{} 会自动生成目录和图表列表,在不设置 \verb|anonymous| 选项时会自动生成声明页。\shtthesis{} 提供了摘要和符号列表环境,以便于用户生成中英文摘要和符号列表。
 
 \subsection{论文摘要及关键词}
-论文中英文摘要在正文部分 \verb|\frontmatter| 之后、\verb|\makeindices| 之前,分别在 \verb|abstract| 和 \verb|abstract*| 环境中输入。摘要环境对内容没有限制。
+论文中英文摘要在正文部分 \verb|\frontmatter| 之后、\verb|\makeindices| 之前,分别在 abstract 和 abstract* 环境中输入。摘要环境对内容没有限制:
 \begin{latex}
 \begin{abstract}
   中文摘要内容...
@@ -395,8 +552,16 @@
 \end{abstract*}
 \end{latex}
 
-论文中英文关键词在 \verb|\shtsetup| 命令中分别以 keywords 和 keywords* 设定。注意 \shtthesis v\version 中尚未实现分词处理,此处输入的 value 会不经任何预处理,直接插入至正文中排版。因此,中文关键词(keywords)之间应该以中文逗号“,”隔开且不包含空格;英文关键词(keywords*)之间应该以半角逗号“,”隔开,并在每一半角逗号后跟随一个半角空格。
+需要注意,本科生论文要求在中英文摘要中包含论文标题。默认情况下,\shtthesis 的 abstract 和 abstract* 环境会按照 \verb|\shtsetup| 中指定的标题及其中的换行符进行排版。如果希望在摘要中显示的标题不换行,则可以向摘要环境传入 \verb|flattitle| 选项,排版时会将 title 和 title* 中的换行符替换为空格:
 \begin{latex}
+\begin{abstract}[flattitle]
+  % 摘要标题排版时不换行
+  中文摘要内容...
+\end{abstract}
+\end{latex}
+
+论文中英文关键词在 \verb|\shtsetup| 命令中分别以 keywords 和 keywords* 设定。注意 \shtthesis{} v\version{} 中尚未实现分词处理,此处输入的 value 将不经任何预处理,直接插入至正文中排版。因此,中文关键词(keywords)之间应该以中文逗号“,”隔开且不包含空格;英文关键词(keywords*)之间应该以半角逗号“,”隔开,并在每一半角逗号后跟随一个半角空格。
+\begin{latex}
 \shtsetup{
   keywords = {上海科技大学,学位论文,\LaTeX{}},
   keywords* = {ShanghaiTech~University, Thesis, \LaTeX{}},
@@ -404,7 +569,7 @@
 \end{latex}
 
 \subsection{目录及图形、表格、符号列表}
-\shtthesis 重载了 \verb|\makeindices| 命令,可一次生成目录、图形列表和表格列表。默认目录中正文标题列出至第 3 级(即 subsection),若包含附录则目录中只列出“附录”一项(附录各级标题仍会生成 PDF 书签),图形、表格列表中列出图表标题的全部内容。对于特别长的图形、表格标题,可以在 \verb|\caption| 命令中指定短标题,从而使列表条目更为简明:
+\shtthesis{} 重载了 \verb|\makeindices| 命令,可一次生成目录、图形列表和表格列表。默认目录中正文标题列出至第 3 级(即 subsection),若包含附录则目录中只列出“附录”一项(附录各级标题仍会生成 PDF 书签),图形、表格列表中列出图表标题的全部内容。对于特别长的图形、表格标题,可以在 \verb|\caption| 命令中指定短标题,从而使列表条目更为简明:
 \begin{latex}
 \begin{figure}
   \caption[出现在图形列表内的短标题]{出现在正文中的长标题}
@@ -412,33 +577,95 @@
 \end{figure}
 \end{latex}
 
-\shtthesis 提供了 \verb|nomenclatures| 环境用于生成符号列表,使用方法为:
+\shtthesis{} 提供了 nomenclatures 环境用于在研究生论文中生成符号列表,其使用方法为:
 \begin{latex}
-\begin{nomenclatures}[`\emph{caption}']
-  \head[`\emph{unitCap}']{`\emph{symbCap}'}{`\emph{descriptionCap}'}
-  \item[`\emph{unit}']{`\emph{symb}'}{`\emph{description}'}
+\begin{nomenclatures}[<标题>]
+  \head[<单位表头>]{<符号表头>}{<描述表头>}
+  \item[<单位>]{<符号>}{<描述>}
   % ...
 \end{nomenclatures}
 \end{latex}
-每次 \verb|nomenclatures| 调用会分别生成一组符号列表,每一 \verb|\item| 会生成一行符号描述。若 caption 不为空则会为当前组生成一个不编号的 section 级的标题。\verb|\head| 为可选指令,会为当前组生成一个“表头”,但必须在 \verb|\item| 之前列出。\verb|\item| 接受一个可选参数 unit 作为符号的单位,若其不为空则在当前行右对齐出现。\verb|nomenclatures| 的使用样例可以参考 \texttt{\jobname.tex} 中“符号列表”部分。注意在 \shtthesis v\version 中 \verb|\item| 的 description 折行后会出现排版错误,故暂时不支持较长的符号描述。
+每次 nomenclatures 调用会分别生成一组符号列表,每一 \verb|\item| 会生成一行符号描述。若 \verb|<标题>| 不为空则会为当前组生成一个不编号的 section 级的标题。\verb|\head| 为可选指令,会为当前组生成一个“表头”,但必须在 \verb|\item| 之前列出。\verb|\item| 接受一个可选参数 \verb|<单位>| 作为符号的单位,若其不为空则在当前行右对齐出现。nomenclatures 的使用样例可以参考 \jobname.tex 中“符号列表”部分。注意在 \shtthesis{} v\version{} 中各 \verb|\item| 的 \verb|<描述>| 在折行后会出现排版错误,故暂时不支持较长的符号描述。
 
 \section{正文部分}
-\shtthesis 正文部分的书写与一般 \LaTeX 项目无异。为保证兼容性,\shtthesis 除修改公式编号格式以符合《规范》要求外,不提供证明、定理等任何额外环境。文献引用目前只支持“著者——出版年”格式。
+\shtthesis{} 正文部分的书写与一般 \LaTeX 项目无异。\shtthesis{} 为研究生论文修改公式编号格式以符合《规范》要求,并提供编号定理、证明等常用数学环境。文献引用遵循 GB/T 7714-2015 《信息与文献 参考文献著录规则》标准,其中本科论文使用顺序编码制,研究生论文使用“著者-出版年”制。
 
 \subsection{编号公式}
-\shtthesis 通过 \textsf{mathtools} 宏包在公式编号前添加 $\ldots$ 以符合《规范》对公式编号的格式要求,如:
+在排版研究生论文时,\shtthesis{} 通过 \textsf{mathtools} 宏包在公式编号前添加 $\ldots$ 以符合《规范》对公式编号的格式要求,如:
 \begin{align}
 P(A|B) &= \frac{P(A)P(B|A)}{P(B)} \label{eq::bayesian}
 \end{align}
-同时重载了 \verb|\eqref|,使得公式编号格式修改后,其引用仍与 \textsf{amsmath} 无异:贝叶斯定理~\eqref{eq::bayesian}。
+同时重载了 \verb|\eqref|,使得公式编号格式修改后,其引用格式仍与 \textsf{amsmath} 无异:贝叶斯定理~\eqref{eq::bayesian}。排版本科生论文时不修改公式编号格式。
 
+\subsection{数学环境}
+\shtthesis 通过 \textsf{amsthm} 宏包定义了常用的数学环境和证明环境,如表~\ref{tab::math_envs} 所列。其中,英文表示 tex 文档内调用的环境名称,中文表示排版后论文中显示的环境名称。
+
+\begin{table}[htb]
+\centering
+\caption{\shtthesis 提供的数学环境}
+\label{tab::math_envs}
+\begin{tabular}{*{5}{c}}
+  \toprule
+  theorem & lemma & corollary & proposition & conjecture \\
+  定理    & 引理  & 推论       & 命题        & 猜想       \\
+  \midrule
+  definition & axiom & example & problem & exercise \\
+  定义       & 公理  & 例       & 问题    & 练习     \\
+  \midrule
+  remark & & & & \\
+  注 & & & & \\
+  \bottomrule
+\end{tabular}
+\end{table}
+
+\begin{theorem}[Unicode-CJK 覆盖定理]
+  Unicode 能够编码绝大多数东亚文字和符号。
+\end{theorem}
+
+\begin{corollary}
+  Unicode 能够编码我国《汉字内码扩展规范》中的所有字符。
+\end{corollary}
+
+\begin{corollary}
+  Unicode 也能够编码韩文和日文字符。
+\end{corollary}
+
+\begin{example}
+  “你好”在 Unicode 中的编码 (codepoints) 为 \verb|U+4F60| 和 \verb|U+597D|。
+\end{example}
+
+\begin{example}
+  「こんにちは」在 Unicode 中的编码 (codepoints) 为 \verb|U+3053|、 \verb|U+3093|、 \verb|U+306B|、 \verb|U+3061| 和 \verb|U+306F|。
+\end{example}
+
+\begin{proof}
+  留作练习。
+\end{proof}
+
+\begin{remark}
+  有兴趣的读者可以查阅 Unicode 规范 (\url{https://home.unicode.org/})。
+\end{remark}
+
 \subsection{文献引用} \label{sec::citation}
-\shtthesis 目前仅通过 \textsf{natbib} 支持“著者——出版年”格式的引用,可以使用 \verb|\citet| 进行文本形式的引用 \citet{Bohan1928},使用 \verb|\citep| 进行括号形式的引用 \citep{yuan2012lanc},以及使用 \verb|\citeyear| 进行年份引用 \citeyear{walls2013drought}。当引用内容是组成正文的一部分时,应使用文本形式的引用,否则使用括号形式的引用。一个实用的区分技巧是,如果你在做口头介绍时会说出引用内容,就应使用文本形式的引用,否则使用括号形式的引用。
+\shtthesis{} 通过 \textsf{biblatex} 宏包及 \textsf{biblatex-gb7714-2015} 格式支持符合 GB/T 7714-2015 标准的文献引用。本科生论文使用顺序编码制,研究生论文使用“著者-出版年”制。
 
-\shtthesis 默认使用的参考文献文件为 reference.bib,若使用其他文件则需在 \verb|\makebiblio| 命令后指明
+\paragraph{顺序编码制}
+使用一般引用 \verb|\cite| 的编码显示为上标,例如~\cite{stamerjohanns2009mathml, yuan2012lana}。也可以使用行内引用 \verb|\inlinecite| 将引用编码排版至正文,例如 \inlinecite{Bohan1928}。参考文献列表按照各条目在正文中被引用顺序排列。
+
+\paragraph{“著者-出版年”制}
+使用 \verb|\citet| 进行文本形式的引用 \citet{Bohan1928},使用 \verb|\citep| 进行括号形式的引用 \citep{yuan2012lana},使用 \verb|\citeauthor| 进行作者引用 \citeauthor{niu2013zonghe},以及使用 \verb|\citeyear| 进行年份引用 \citeyear{walls2013drought}。参考文献列表各条目按照语言分组后,按照字母序排列。
+
+\shtthesis{} 通过 \verb|\shtsetup| 的 bib-resource 选项指定参考文献数据库,例如载入 reference.bib 文件:
 \begin{latex}
-\makebiblio[mybiblio] % 读取 mybiblio.bib 文件
+\shtsetup{
+  bib-resource = {reference.bib},
+}
+% ...
+\begin{document}
+  % ...
+  \makebiblio
 \end{latex}
+
 需要注意若文献条目的作者姓名非英文,则需额外增加 key 字段指定作者英文姓名,并在姓氏拼英后加注音调,以确保文献条目在文末的参考文献中正确排列。例如 \citet{bravo1990comparative} 无需额外处理,而 \citet{chen1980zhongguo} 对应的 bib 条目需修改为
 \begin{latex}
 @incollection{chen1980zhongguo,
@@ -455,7 +682,7 @@
 \end{latex}
 
 \subsection{列表环境}
-\shtthesis 微调了编号列表(\verb|enumerate|)和非编号列表(\verb|itemize|)环境,以适应中文排版惯例。编号列表默认使用数字编号:
+\shtthesis{} 微调了编号列表(enumerate)和非编号列表(itemize)环境,以适应中文排版惯例。编号列表默认使用数字编号:
 \begin{enumerate}
   \item 起来,饥寒交迫的奴隶!
   \item 起来,全世界受苦的人!
@@ -477,7 +704,7 @@
   \item 就一定要实现!
 \end{enumerate}
 
-关键字(\verb|description|)环境在每一条目关键字后增加了加粗全角冒号“\textbf{:}”以适应中文排版惯例。例如:《中华人民共和国劳动法》
+关键字(description)环境在每一条目关键字后增加了加粗全角冒号“\textbf{:}”以适应中文排版惯例。例如:《中华人民共和国劳动法》
 \begin{description}
   \item[第一章第三条] 劳动者享有平等就业和选择职业的权利、取得劳动报酬的权利、休息休假的权利、获得劳动安全卫生保护的权利、接受职业技能培训的权利、享受社会保险和福利的权利、提请劳动争议处理的权利以及法律规定的其他劳动权利。
   \item[第四章第三十六条] 国家实行劳动者每日工作时间不超过八小时、平均每周工作时间不超过四十四小时的工时制度。
@@ -492,15 +719,20 @@
   \IfFileExists{shanghaitech-logo.pdf}{%
     \includegraphics[width=0.5\columnwidth]{shanghaitech-logo.pdf}%
   }{%
-    \missingfigure{\small 校徽文件 \texttt{shanghaitech-logo.pdf} 缺失}%
+    \fbox{%
+      \begin{minipage}[b][2.5cm][c]{0.75\columnwidth}%
+        \centering\zihao{-5}\bfseries\sffamily\color{ShtRed}%
+        校徽文件 \texttt{shanghaitech-logo.pdf} 缺失%
+      \end{minipage}%
+    }%
   }%
   \bicaption{上海科技大学校徽}{School logo of ShanghaiTech University}
   \label{img::sht_logo}
 \end{figure}
 
-由于在排版较长的、自包含的图表标题时,使用双语图表标题会导致可读性下降,\shtthesis 默认不载入 \textsf{bicaption} 宏包。( \shtthesis 作者在 2020 年学位申请时并未使用双语标题。)若确实需要双语标题,可在导言区内手动载入并设定 \textsf{bicaption}:
+由于在排版较长的、自包含的图表标题时,使用双语图表标题会导致可读性下降,\shtthesis{} 默认不载入 \textsf{bicaption} 宏包。( \shtthesis{} 作者在 2020 年学位申请时并未使用双语标题。)若确实需要双语标题,可在导言区内手动载入 \textsf{bicaption}。注意需要设定 \verb|list=off| 以确保英文标题不出现在图表列表中:
 \begin{latex}
-\usepackage{bicaption}
+\usepackage[list=off]{bicaption}
 \captionsetup[figure][bi-second]{name=Figure}
 \captionsetup[table][bi-second]{name=Table}
 \end{latex}
@@ -513,10 +745,10 @@
 % ...
 \end{latex}
 
-《规范》要求在文末依此列出致谢、作者简历、攻读学位期间发表的论文与研究成果。用户可使用 \shtthesis 提供的相应环境 \verb|acknowledgement|、\verb|resume|、\verb|publications|、\verb|patterns| 和 \verb|projects| 进行排版。同时为了生成符合盲审要求的论文,\shtthesis 也提供了对应的\emph{匿名环境} \verb|publications*|、\verb|patterns*| 和 \verb|projects*|。在打开 \verb|anonymous| 选项(第~\ref{sec::option_anonymous} 节)后,论文中不出现“致谢”一节,作者简历内容替换为匿名字符串,其他小节使用匿名环境内容排版。注意在第一次使用任一上述环境前,需要使用 \verb|\backmatter| 切换至后记模式。
+《规范》要求在文末依此列出致谢、作者简历、攻读学位期间发表的论文与研究成果。用户可使用 \shtthesis{} 提供的相应环境 acknowledgement、resume、publications、patterns 和 projects 进行排版。同时为了生成符合盲审要求的论文,\shtthesis{} 也提供了对应的\emph{匿名环境} publications*、patterns* 和 projects*。在打开 \verb|anonymous| 选项(第~\ref{sec::option_anonymous} 节)后,论文中不出现“致谢”一节,作者简历内容替换为匿名字符串,其他小节使用匿名环境内容排版。注意在第一次使用任一上述环境前,需要使用 \verb|\backmatter| 切换至后记模式。
 
 \subsection{致谢}
-在 \verb|acknowledgement| 环境内书写致谢,致谢内容在匿名模式下不显示。
+在 acknowledgement 环境内书写致谢,致谢内容在匿名模式下不显示。
 \begin{latex}
 \begin{acknowledgement}
   致谢信息……
@@ -524,7 +756,7 @@
 \end{latex}
 
 \subsection{简历及科研成果}
-此部分需要依此书写个人简历(\verb|resume| 环境)、已发表(或正式接受)的学术论文(\verb|publications| 和 \verb|publications*| 环境)、申请或已获得的专利(\verb|patterns| 和 \verb|patterns*| 环境)、参加的研究项目及获奖情况(\verb|projects| 和 \verb|projects*|)。根据是否匿名分别显示非匿名环境内容和匿名环境内容。
+此部分需要依此书写个人简历(resume 环境)、已发表(或正式接受)的学术论文(publications 和 publications* 环境)、申请或已获得的专利(patterns 和 patterns* 环境)、参加的研究项目及获奖情况(projects 和 projects*)。根据是否匿名分别显示非匿名环境内容和匿名环境内容。
 \begin{latex}
 \begin{resume}
   个人简历…… (仅非匿名环境显示)
@@ -578,7 +810,7 @@
 
 \verb|\mathcal|: $\mathcal{A,F,L,2,3,5,\sigma}$. \verb|\mathscr|: $\mathscr{A,F,L,2,3,5,\sigma}$.
 
-\section{排版生僻字}
+\section{排版生僻字} \label{sec::chs_rare}
 {\songti 叧叨叭叱叴叵叺叻叼叽叾卟叿吀吁吂吅吆吇吋吒吔吖吘吙吚吜吡吢吣吤吥吧吩吪吭吮吰吱吲呐吷吺吽呁呃呄呅呇呉呋呋呌呍呎呏呐呒呓呔呕呗呙呚呛呜呝呞呟呠呡呢呣呤呥呦呧周呩呪呫呬呭呮呯呰呱呲呴呶呵呷呸呹呺呻呾呿咀咁咂咃咄咅咇咈咉咊咋咍咎咐咑咓咔咕咖咗咘咙咚咛咜咝咞咟咠咡咢咣咤咥咦咧咨咩咪咫咬咭咮咯咰咲咳咴咵咶啕咹咺咻呙咽咾咿哂哃哅哆哇哈哊哋哌哎哏哐哑哒哓哔哕哖哗哘哙哚哛哜哝哞哟哠咔哣哤哦哧哩哪哫哬哯哰唝哵哶哷哸哹哻哼哽哾哿唀唁唂唃呗唅唆唈唉唊唋唌唍唎唏唑唒唓唔唣唖唗唘唙吣唛唜唝唞唟唠唡唢唣唤唥唦唧唨唩唪唫唬唭唯唰唲唳唴唵唶唷念唹唺唻唼唽唾唿啀啁啃啄啅啇啈啉啋啌啍啎问啐啑啒启啔啕啖啖啘啙啚啛啜啝哑启啠啡唡衔啥啦啧啨啩啪啫啬啭啮啯啰啱啲啳啴啵啶啷啹啺啻啼啽啾啿喀喁喂喃善喅喆喇喈喉喊喋喌喍喎喏喐喑喒喓喔喕喖喗喙喛喞喟喠喡喢喣喤喥喦喨喩喯喭喯喰喱哟喳喴喵営喷喸喹喺喼喽喾喿嗀嗁嗂嗃嗄嗅呛啬嗈嗉唝嗋嗌嗍吗嗏嗐嗑嗒嗓嗕嗖嗗嗘嗙呜嗛嗜嗝嗞嗟嗠嗡嗢嗧嗨唢嗪嗫嗬嗭嗮嗰嗱嗲嗳嗴嗵哔嗷嗸嗹嗺嗻嗼嗽嗾嗿嘀嘁嘂嘃嘄嘅嘅嘇嘈嘉嘊嘋嘌喽嘎嘏嘐嘑嘒嘓呕嘕啧嘘嘙嘚嘛唛嘝嘞嘞嘟嘠嘡嘢嘣嘤嘥嘦嘧嘨哗嘪嘫嘬嘭唠啸囍嘴哓嘶嘷呒嘹嘺嘻嘼啴嘾嘿噀噂噃噄咴噆噇噈噉噊噋噌噍噎噏噐噑噒嘘噔噕噖噗噘噙噚噛噜咝噞噟哒噡噢噣噤哝哕噧噩噪噫噬噭噮嗳噰噱哙噳喷噵噶噷吨噺噻噼噽噾噿咛嚁嚂嚃嚄嚅嚆吓嚈嚉嚊嚋哜嚍嚎嚏尝嚑嚒嚓嚔噜嚖嚗嚘啮嚚嚛嚜嚝嚞嚟嚠嚡嚢嚣嚤呖嚧咙嚩咙嚧嚪嚫嚬嚭嚯嚰嚱亸喾嚵嘤嚷嚸嚹嚺嚻嚼嚽嚾嚿啭嗫嚣囃囄冁囆囇呓囊囋囍囎囏囐嘱囒啮囔囕囖}
 
 {\heiti 圠圡圢圤圥圦圧圩圪圫圬圮圯地圱圲圳圴圵圶圷圸圹圻圼埢鴪址坁坂坃坄坅坆坈坉坊坋坌坍坒坓坔坕坖坘坙坜坞坢坣坥坧坨坩坪坫坬坭坮坯垧坱坲坳坴坶坸坹坺坻坼坽坾坿垀垁垃垅垆垇垈垉垊垌垍垎垏垐垑垓垔垕垖垗垘垙垚垛垜垝垞垟垠垡垤垥垧垨垩垪垫垬垭垮垯垰垱垲垲垳垴埯垶垷垸垹垺垺垻垼垽垾垽垿埀埁埂埃埄埅埆埇埈埉埊埋埌埍城埏埐埑埒埓埔埕埖埗埘埙埚埛野埝埞域埠垭埢埣埤埥埦埧埨埩埪埫埬埭埮埯埰埱埲埳埴埵埶执埸培基埻崎埽埾埿堀堁堃堄坚堆堇堈堉垩堋堌堍堎堏堐堑堒堓堔堕垴堗堘堙堚堛堜埚堞堟堠堢堣堥堦堧堨堩堫堬堭堮尧堰报堲堳场堶堷堸堹堺堻堼堽堾堼堾碱塀塁塂塃塄塅塇塆塈塉块茔塌塍塎垲塐塑埘塓塕塖涂塘塙冢塛塜塝塟塠墘塣墘塥塦塧塨塩塪填塬塭塮塯塰塱塲塳塴尘塶塷塸堑塺塻塼塽塾塿墀墁墂墄墅墆墇墈墉垫墋墌墍墎墏墐墒墒墓墔墕墖墘墖墚墛坠墝增墠墡墢墣墤墥墦墧墨墩墪樽墬墭堕墯墰墱墲坟墴墵垯墷墸墹墺墙墼墽垦墿壀壁壂壃壄壅壆坛壈壉壊垱壌壍埙壏壐壑壒压壔壕壖壗垒圹垆壛壜壝垄壠壡坜壣壤壥壦壧壨坝塆圭}
@@ -589,11 +821,12 @@
 
 \backmatter
 \begin{acknowledgement}
-\shtthesis 派生于中国科学院大学论文模板 \textsf{ucasthesis}\footnote{\url{https://github.com/mohuangrui/ucasthesis},使用 GPLv3 许可证分发。},v0.2.0 开发过程中参考了清华大学论文模板 \textsf{thuthesis}\footnote{\url{https://github.com/tuna/thuthesis},使用 LPPL-1.3c 许可证分发},特别是 \verb|\thusetup| 命令的设计和实现。这些项目中流淌的智慧,以及项目作者们的专业态度和共享精神使得 \shtthesis 的开发及完善成为可能。
+\shtthesis{} 派生于中国科学院大学论文模板 \textsf{ucasthesis}\footnote{\url{https://github.com/mohuangrui/ucasthesis},使用 GPLv3 许可证分发。};v0.2.0 开发过程中参考了清华大学论文模板 \textsf{thuthesis}\footnote{\url{https://www.ctan.org/pkg/thuthesis},使用 LPPL-1.3c 许可证分发。},特别是 \verb|\thusetup| 命令的设计和实现;v0.3.0 及后续版本开发过程中参考了复旦大学论文模板 \textsf{fduthesis}\footnote{\url{https://www.ctan.org/pkg/fduthesis},使用 LPPL-1.3c 许可证分发。},以及其超链接配色方案。这些项目中流淌的智慧,以及项目作者们的专业态度和共享精神使得 \shtthesis{} 的开发及完善成为可能。
 \end{acknowledgement}
 
+\ifgraduate
 \begin{resume}
-  李润东,\shtthesis 项目初版作者及维护者,热爱摸鱼。
+  李润东,\shtthesis{} 项目初版作者及维护者,热爱摸鱼。
 \end{resume}
 
 \begin{publications}
@@ -615,5 +848,6 @@
 \begin{projects}
   个人参与的科研项目、获奖情况…… (仅非匿名环境显示)
 \end{projects}
+\fi
 
 \end{document}

Modified: trunk/Master/texmf-dist/tex/latex/shtthesis/shtthesis.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/shtthesis/shtthesis.cls	2020-06-23 21:18:28 UTC (rev 55634)
+++ trunk/Master/texmf-dist/tex/latex/shtthesis/shtthesis.cls	2020-06-23 21:18:46 UTC (rev 55635)
@@ -1,19 +1,42 @@
+% shtthesis, an unofficial LaTeX thesis template for ShanghaiTech University.
+% Copyright (C) 2020 Li Rundong <rundong.001 at gmail.com>
+%
+% This program is free software: you can redistribute it and/or modify
+% it under the terms of the GNU General Public License as published by
+% the Free Software Foundation, either version 3 of the License, or
+% (at your option) any later version.
+%
+% This program is distributed in the hope that it will be useful,
+% but WITHOUT ANY WARRANTY; without even the implied warranty of
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+% GNU General Public License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with this program.  If not, see <https://www.gnu.org/licenses/>
 % ==============================================================================
 % Identification
 % ==============================================================================
 \NeedsTeXFormat{LaTeX2e}
+\newcommand\version{0.3.0}
+\newcommand\versiondate{2020/06/23}
 \ProvidesClass{shtthesis}[%
-  2020/06/05 %
-  v0.2.0 %
+  \versiondate\space%
+  v\version\space%
   An Unofficial Thesis Template for ShanghaiTech University%
 ]
 \hyphenation{sht-thesis}
 \hyphenation{Sht-Thesis}
-\RequirePackage{xspace}
-\newcommand\shtthesis{\textup{\sffamily shtthesis}\xspace}
-\newcommand\ShtThesis{\textup{\sffamily ShtThesis}\xspace}
-\newcommand\version{0.2.0\xspace}
-\newcommand\versiondate{2020/06/05\xspace}
+\newcommand\shtthesis{\textup{\sffamily shtthesis}}
+\newcommand\ShtThesis{\textup{\sffamily ShtThesis}}
+\def\sht at compile@err at help{%
+  Pass `-pdflua' or `-pdfxe' option to `latexmk' on compilation.%
+}
+\newcommand\sht at error[2][\sht at compile@err at help]{\ClassError{shtthesis}{#2}{#1}}
+\newcommand\sht at warning[1]{\ClassWarning{shtthesis}{#1}}
+\RequirePackage{iftex}
+\ifluatex\else\ifxetex\else%
+  \sht at error{shtthesis only works with LuaLaTeX or XeLaTeX}%
+\fi\fi
 % ==============================================================================
 % Options and Declarations
 % ==============================================================================
@@ -28,14 +51,6 @@
 %   thuthesis (https://github.com/xueruini/thuthesis) is licensed under the
 %   conditions of the LaTeX Project Public License, either version 1.3. 
 % ------------------------------------------------------------------------------
-\SetupKeyvalOptions{
-  family = sht,
-  prefix = {sht@},
-  setkeys = \kvsetkeys,
-}
-\newcommand\sht at error[1]{%
-  \ClassError{shtthesis}{#1}{}%
-}
 \newcommand\shtsetup{%
   \kvsetkeys{sht}%
 }
@@ -106,22 +121,6 @@
 %   Options for \shtsetup
 % ------------------------------------------------------------------------------
 \sht at define@key{
-  degree = {
-    choices = {
-      bachelor,
-      master,
-      doctor,
-      postdoc,
-    },
-    default = doctor,
-  },
-  degree-type = {
-    choices = {
-      academic,
-      professional,
-    },
-    name = degree at type,
-  },
   degree-name = {
     default = {工学博士},
     name    = degree at name,
@@ -160,6 +159,14 @@
     default = {Name of author},
     name    = author at en,
   },
+  author-id = {
+    default = {Id of author},
+    name    = author at id,
+  },
+  entrance-year = {
+    default = {Year of entrance},
+    name    = entrance at year,
+  },
   supervisor = {
     default = {导师姓名},
   },
@@ -173,30 +180,6 @@
   supervisor-institution* = {
     name = supervisor at institution@en,
   },
-  associate-supervisor = {
-    name = associate at supervisor,
-  },
-  associate-supervisor* = {
-    name = associate at supervisor@en,
-  },
-  associate-supervisor-institution = {
-    name = associate at supervisor@institution,
-  },
-  associate-supervisor-institution* = {
-    name = associate at supervisor@institution at en,
-  },
-  joint-supervisor = {
-    name = joint at supervisor,
-  },
-  joint-supervisor* = {
-    name = joint at supervisor@en,
-  },
-  joint-supervisor-institution = {
-    name = joint at supervisor@institution,
-  },
-  joint-supervisor-institution* = {
-    name = joint at supervisor@institution at en,
-  },
   institution = {
     % default = {上海科技大学信息科学与技术学院},
   },
@@ -214,16 +197,6 @@
     % default = {Computer Science and Technology},
     name = discipline at en,
   },
-  date = {
-    default = {\the\year~年~\the\month~月},
-  },
-  date* = {
-    default = {\monthname,~\the\year},
-    name = date at en,
-  },
-  clc,
-  udc,
-  id,
   discipline-level-1 = {
     default = {一级学科名称},
     name    = discipline at level@i,
@@ -240,42 +213,95 @@
     default = {Name of Level-two Discipline},
     name    = discipline at level@ii at en,
   },
-  start-date = {
-    name    = start at date,
-    default = {\the\year-\two at digits{\month}-\two at digits{\day}},
+  date = {
+    default = {\the\year~年~\the\month~月},
   },
-  end-date = {
-    name    = end at date,
-    default = {\the\year-\two at digits{\month}-\two at digits{\day}},
+  date* = {
+    default = {\monthname,~\the\year},
+    name = date at en,
   },
+  clc,
+  udc,
+  id,
   anonymous-str = {
     name = anonymous at str,
     default = {***},
+  },
+  bib-resource = {
+    name = bib at resource,
   }
 }
 % ------------------------------------------------------------------------------
 %   Class options
 % ------------------------------------------------------------------------------
-\PassOptionsToClass{
-  UTF8,
-  a4paper,
-  twoside, 
-  openany, 
-  zihao = -4, 
-  scheme = plain,
-}{ctexbook}
 \SetupKeyvalOptions{
   family = sht,
   prefix = sht@,
 }
-\DeclareBoolOption[false]{anonymous}
-\DeclareBoolOption[false]{print}
+\newif\ifsht at undergraduate
+\newif\ifsht at graduate
+\newif\ifsht at degree@set
+\sht at degree@setfalse
+\newcommand\sht at check@degree at set{%
+  \ifsht at degree@set%
+    \sht at error{you can only set degree once}%
+  \else%
+    \sht at degree@settrue%
+  \fi%
+}
+\DeclareVoidOption{bachelor}{%
+  \sht at check@degree at set%
+  \sht at undergraduatetrue%
+  \sht at graduatefalse%
+  \def\sht at degree{bachelor}%
+}
+\DeclareVoidOption{master}{%
+  \sht at check@degree at set%
+  \sht at undergraduatefalse%
+  \sht at graduatetrue%
+  \def\sht at degree{master}%
+}
+\DeclareVoidOption{doctor}{%
+  \sht at check@degree at set%
+  \sht at undergraduatefalse%
+  \sht at graduatetrue%
+  \def\sht at degree{doctor}%
+}
+\DeclareBoolOption{anonymous}
+\DeclareBoolOption{print}
+\DeclareBoolOption{comfort}
 \DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{ctexbook}}
 \ProcessKeyvalOptions*
+\ifsht at degree@set%
+\else%
+  \sht at error{you have not set degree (bachelor, master or doctor) yet}%
+\fi%
 % ------------------------------------------------------------------------------
 %   Load minimum mandatory packages
 % ------------------------------------------------------------------------------
+\ifsht at undergraduate
+  \PassOptionsToClass{zihao = 5}{ctexbook}
+  \PassOptionsToPackage{style = gb7714-2015}{biblatex}
+\else
+  \PassOptionsToClass{zihao = -4}{ctexbook}
+  \PassOptionsToPackage{style = gb7714-2015ay}{biblatex}
+\fi
+\PassOptionsToClass{
+  UTF8,
+  a4paper,
+  twoside, 
+  openany, 
+  scheme = plain,
+}{ctexbook}
+\PassOptionsToPackage{
+  natbib = true,
+  backend = biber,
+  gbpub = false,
+  gbcitelocal = chinese,
+}{biblatex}
 \LoadClass{ctexbook}
+\RequirePackage{expl3}
+\RequirePackage{xparse}
 \RequirePackage[hyperref, table]{xcolor}
 \RequirePackage{geometry}
 \RequirePackage{calc}
@@ -283,18 +309,17 @@
 \RequirePackage{etoolbox}
 \RequirePackage{ifthen}
 \RequirePackage{graphicx}
-\RequirePackage{todonotes}
 \RequirePackage{indentfirst}
 \RequirePackage[normalem]{ulem}
 \RequirePackage{fancyhdr}
+\RequirePackage{pageslts}
 \RequirePackage{tocvsec2}
 \RequirePackage{letltxmacro}
-\RequirePackage{fontspec}[2016/12/27]
+\RequirePackage{fontspec}
 \RequirePackage{caption}
-\RequirePackage{natbib}
 \RequirePackage[shortlabels, inline]{enumitem}
-\RequirePackage{amsmath}
 \RequirePackage{mathtools}
+\RequirePackage{amsthm}
 \RequirePackage[
   mathrm = sym,
   mathit = sym,
@@ -301,13 +326,14 @@
   mathbf = sym,
   mathtt = sym,
 ]{unicode-math}
+\RequirePackage{hyperref}
+\RequirePackage{biblatex}
 \AtEndPreamble{
-  \RequirePackage{hyperref}
   \hypersetup{
     pdfencoding = auto,
     psdextra = true,
     bookmarksnumbered = true,
-    pdftitle = {\sht at title},
+    pdftitle = {\sht at flat@title},
     pdfauthor = {\sht at author},
   }
   \ifsht at print
@@ -316,13 +342,27 @@
       colorlinks = false,
     }
   \else
+    % `default' color scheme from `fduthesis'
+    \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 = black,
-      citecolor = blue,
-      urlcolor = blue,
+      linkcolor = fdu at link,
+      urlcolor = fdu at url,
+      citecolor = fdu at cite,
     }
   \fi
+  \urlstyle{tt}
+  \addbibresource{\sht at bib@resource}
 }
 % ==============================================================================
 % Format Specifications
@@ -341,130 +381,138 @@
 \def\bibname{参考文献}
 \def\tablename{表}
 \def\figurename{图}
-\def\bibetal{等}
-\def\biband{和}
+\definecolor{ShtRed}{RGB}{146,46,23}
+\def\school at logo@missing{校徽文件缺失,请至\href{https://github.com/lirundong/shtthesis/raw/master/shanghaitech-logo.pdf}{项目主页}下载!}
 % ------------------------------------------------------------------------------
 %   Geometry and layouts
 % ------------------------------------------------------------------------------
-\geometry{
-  top = 2.54cm,
-  bottom = 2.54cm,
-  headheight = 12pt, % 9bp,
-  headsep = 17.5pt, % 2.54cm - 9bp,
-  footskip = 2.54cm - 1.75cm,
-}
+\def\binding at width{0.63cm}
+\def\horizontal at margin{3.17cm}
+\def\sht at head@logo at height{1.17cm}
 \ifsht at print
-  \def\binding at width{0.63cm}
   \geometry{
-    inner = 3.17cm + \binding at width,
-    outer = 3.17cm - \binding at width,
+    inner = \horizontal at margin + \binding at width,
+    outer = \horizontal at margin - \binding at width,
   }
 \else
   \geometry{
-    inner = 3.17cm,
-    outer = 3.17cm,
+    inner = \horizontal at margin,
+    outer = \horizontal at margin,
   }
 \fi
 \setlength{\parskip}{0.5ex plus 0.25ex minus 0.25ex}
 \setlength{\parindent}{2\ccwd}
-\linespread{1.6}
+\ifsht at undergraduate
+  \linespread{1.3}
+  \geometry{
+    includeheadfoot,
+    top = 1.5cm,
+    bottom = 1.75cm,
+    headheight = \sht at head@logo at height,
+    headsep = \baselineskip,
+    footskip = 2.54cm - 1.75cm,
+  }
+\else
+  \linespread{1.6}
+  \geometry{
+    top = 2.54cm,
+    bottom = 2.54cm,
+    headheight = 12pt,
+    headsep = 17.5pt,
+    footskip = 2.54cm - 1.75cm,
+  }
+\fi
 \raggedbottom
 % ------------------------------------------------------------------------------
 %   Headers and footers
 % ------------------------------------------------------------------------------
+\def\sht at flat@title{\renewcommand\\{\space} \@title}
+\def\sht at flat@title at en{\renewcommand\\{\space} \sht at title@en}
+\newcommand\sht at head@logo{%
+  \IfFileExists{shanghaitech-logo.pdf}{%
+    \includegraphics[height=\sht at head@logo at height]{shanghaitech-logo.pdf}%
+  }{%
+    \fbox{%
+      \begin{minipage}[b][\sht at head@logo at height][c]{0.4\columnwidth}%
+        \zihao{-5}\bfseries\sffamily\color{ShtRed} \school at logo@missing%
+      \end{minipage}%
+    }%
+  }
+}
 \pagestyle{fancy}
-\fancypagestyle{CenteralPageNumbered}{
+\fancypagestyle{Plain}{}
+\fancypagestyle{RomanNumbered}{
   \fancyhf{}
   \pagenumbering{Roman}
-  \fancyhead[C]{
-    \footnotesize
-    \ifnumodd{\value{page}}{
-      \nouppercase\leftmark
-    }{
-      \nouppercase\@title
-    }
-  }
-  \fancyfoot[C]{
-    \footnotesize
-    \thepage
-  }
+  \fancyhead[OC]{\footnotesize\nouppercase\leftmark}
+  \fancyhead[EC]{\footnotesize\nouppercase\sht at flat@title}
+  \fancyfoot[C]{\footnotesize\thepage}
   \renewcommand{\headrulewidth}{0.8pt}
   \renewcommand{\footrulewidth}{0pt}
 }
-\fancypagestyle{LRPageNumbered}{
+\fancypagestyle{LRNumbered}{
   \fancyhf{}
-  \fancyhead[C]{
-    \footnotesize
-    \ifnumodd{\value{page}}{
-      \nouppercase\leftmark
-    }{
-      \nouppercase\@title
-    }
-  }
-  \fancyfoot[C]{
-    \footnotesize
-    \ifnumodd{\value{page}}{
-      \hspace*{\fill}
-      \thepage
-    }{
-      \thepage
-      \hspace*{\fill}
-    }
-  }
+  \fancyhead[OC]{\footnotesize\nouppercase\leftmark}
+  \fancyhead[EC]{\footnotesize\nouppercase\sht at flat@title}
+  \fancyfoot[OR]{\footnotesize\thepage}
+  \fancyfoot[EL]{\footnotesize\thepage}
   \renewcommand{\headrulewidth}{0.8pt}
   \renewcommand{\footrulewidth}{0pt}
 }
-\fancypagestyle{LRPageNumberedAppendix}{
+\fancypagestyle{LRNumberedAppendix}{
   \fancyhf{}
-  \fancyhead[C]{
-    \footnotesize
-    \ifnumodd{\value{page}}{%
-      附\hspace{1\ccwd}录%
-    }{
-      \nouppercase\@title
-    }
-  }
-  \fancyfoot[C]{
-    \footnotesize
-    \ifnumodd{\value{page}}{
-      \hspace*{\fill}
-      \thepage
-    }{
-      \thepage
-      \hspace*{\fill}
-    }
-  }
+  \fancyhead[OC]{\footnotesize 附\hspace*{1\ccwd}录}
+  \fancyhead[EC]{\footnotesize\nouppercase\sht at flat@title}
+  \fancyfoot[OR]{\footnotesize\thepage}
+  \fancyfoot[EL]{\footnotesize\thepage}
   \renewcommand{\headrulewidth}{0.8pt}
   \renewcommand{\footrulewidth}{0pt}
 }
-\fancypagestyle{LRPageNumberedWithoutHead}{
+\fancypagestyle{RomanNumberedWithLogo}{
   \fancyhf{}
-  \fancyfoot[C]{
-    \footnotesize
-    \ifnumodd{\value{page}}{
-      \hspace*{\fill}
-      \thepage
-    }{
-      \thepage
-      \hspace*{\fill}
-    }
+  \pagenumbering{Roman}
+  \fancyhead[L]{\sht at head@logo}
+  \fancyhead[R]{\zihao{-5}\sffamily\sht at flat@title}
+  \fancyfoot[C]{\footnotesize\thepage}
+  \renewcommand{\headrulewidth}{0.8pt}
+  \renewcommand{\footrulewidth}{0pt}
+}
+\fancypagestyle{MNNumberedWithLogo}{
+  \fancyhf{}
+  \fancyhead[L]{\sht at head@logo}
+  \fancyhead[R]{\zihao{-5}\sffamily\sht at flat@title}
+  \fancyfoot[C]{%
+    \footnotesize%
+    第~\thepage~页\hspace*{1\ccwd}共~\lastpageref*{VeryLastPage}~页%
   }
-  \renewcommand{\headrulewidth}{0pt}
+  \renewcommand{\headrulewidth}{0.8pt}
   \renewcommand{\footrulewidth}{0pt}
 }
-\fancypagestyle{Plain}{}
 \providecommand{\frontmatter}{}
 \LetLtxMacro{\TmpFrontmatter}{\frontmatter}
 \renewcommand{\frontmatter}{%
   \TmpFrontmatter%
-  \pagestyle{CenteralPageNumbered}%
+  \ifsht at undergraduate%
+    \pagestyle{RomanNumberedWithLogo}%
+  \else%
+    \pagestyle{RomanNumbered}%
+  \fi%
 }
 \providecommand{\mainmatter}{}
 \LetLtxMacro{\TmpMainmatter}{\mainmatter}
 \renewcommand{\mainmatter}{%
   \TmpMainmatter%
-  \pagestyle{LRPageNumbered}%
+  \ifsht at undergraduate%
+    \pagestyle{MNNumberedWithLogo}%
+  \else%
+    \pagestyle{LRNumbered}%
+  \fi%
+  \pagenumbering{arabic}%
+  \setcounter{page}{1}%
 }
+\AtBeginDocument{%
+  \pagenumbering{arabic}%
+}
 % ------------------------------------------------------------------------------
 %   Font utilities
 % ------------------------------------------------------------------------------
@@ -502,14 +550,9 @@
 % ------------------------------------------------------------------------------
 \ifthenelse{\equal{\sht at fontset}{windows}}{
   \def\fake at bold@factor{2.5}
-  \IfFileExists{C:/bootfont.bin}{
-    \def\windows at kaiti{KaiTi_GB2312}
-  }{
-    \def\windows at kaiti{KaiTi}
-  }
   \setCJKmainfont[
       AutoFakeBold = \fake at bold@factor,
-        ItalicFont = \windows at kaiti,
+        ItalicFont = KaiTi,
     ]{SimSun}
   \setCJKsansfont[
       AutoFakeBold = \fake at bold@factor,
@@ -522,7 +565,7 @@
     ]{SimHei}
   \setCJKfamilyfont{zhkai}[
       AutoFakeBold = \fake at bold@factor,
-    ]{\windows at kaiti}
+    ]{KaiTi}
 }{
   \ifthenelse{\equal{\sht at fontset}{mac}}{
     \setCJKmainfont[
@@ -550,60 +593,44 @@
   }{
     \IfFontExistsTF{Source Han Serif SC}{
       \def\unix at songti{Source Han Serif SC}
-      \def\unix at songti@bold{Source Han Serif SC Bold}
     }{
       \IfFontExistsTF{Noto Serif CJK SC}{
         \def\unix at songti{Noto Serif CJK SC}
-        \def\unix at songti@bold{Noto Serif CJK SC Bold}
       }{
-        \def\unix at songti{FandolSong-Regular.otf}
-        \def\unix at songti@bold{FandolSong-Bold.otf}
+        \def\unix at songti{FandolSong}
       }
     }
     \IfFontExistsTF{Source Han Sans SC}{
       \def\unix at heiti{Source Han Sans SC}
-      \def\unix at heiti@bold{Source Han Sans SC Bold}
     }{
       \IfFontExistsTF{Noto Sans CJK SC}{
         \def\unix at heiti{Noto Sans CJK SC}
-        \def\unix at heiti@bold{Noto Sans CJK SC Bold}
       }{
-        \def\unix at heiti{FandolHei-Regular.otf}
-        \def\unix at heiti@bold{FandolHei-Bold.otf}
+        \def\unix at heiti{FandolHei}
       }
     }
-    \IfFontExistsTF{STKaiti}{
-      \def\unix at kaiti{STKaiti}
+    \edef\unix at heiti@medium at impl{\unix at heiti\space Medium}
+    \edef\unix at heiti@bold at impl{\unix at heiti\space Bold}
+    \IfFontExistsTF{\unix at heiti@medium at impl}{
+      \def\unix at heiti@bold{\unix at heiti@medium at impl}
     }{
-      \IfFontExistsTF{Kaiti}{
-        \def\unix at kaiti{Kaiti}
-      }{
-        \def\unix at kaiti{FandolKai-Regular.otf}
-      }
+      \def\unix at heiti@bold{\unix at heiti@bold at impl}
     }
-    \IfFontExistsTF{STFangsong}{
-      \def\unix at fangsong{STFangsong}
+    \IfFontExistsTF{FZKai-Z03}{
+      \def\unix at kaiti{FZKai-Z03}
     }{
-      \IfFontExistsTF{FangSong}{
-        \def\unix at fangsong{FangSong}
-      }{
-        \def\unix at fangsong{FandolFang-Regular.otf}
-      }
+      \def\unix at kaiti{FandolKai}
     }
-    \setCJKmainfont[
-          BoldFont = \unix at songti@bold,
-        ItalicFont = \unix at kaiti,
-      ]{\unix at songti}
-    \setCJKsansfont[
-        BoldFont = \unix at heiti@bold,
-      ]{\unix at heiti}
+    \IfFontExistsTF{FZFangSong-Z02}{
+      \def\unix at fangsong{FZFangSong-Z02}
+    }{
+      \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}[
-        BoldFont = \unix at songti@bold,
-      ]{\unix at songti}
-    \setCJKfamilyfont{zhhei}[
-        BoldFont = \unix at heiti@bold,
-      ]{\unix at heiti}
+    \setCJKfamilyfont{zhsong}{\unix at songti}
+    \setCJKfamilyfont{zhhei}{\unix at heiti}
     \setCJKfamilyfont{zhkai}{\unix at kaiti}
     \setCJKfamilyfont{zhfs}{\unix at fangsong}
     \providecommand{\songti}{\CJKfamily{zhsong}}
@@ -647,9 +674,11 @@
   \renewcommand\checkmark{\ensuremath{✓}}%
 }
 \allowdisplaybreaks[4]
-\newtagform{dots}{\ldots\ (}{)}
-\usetagform{dots}
-\renewcommand{\eqref}[1]{\textup{(\ref{#1})}}
+\ifsht at graduate
+  \newtagform{dots}{\ldots\ (}{)}
+  \usetagform{dots}
+  \renewcommand{\eqref}[1]{\textup{(\ref{#1})}}
+\fi
 % ------------------------------------------------------------------------------
 %   Math fonts
 % ------------------------------------------------------------------------------
@@ -686,6 +715,25 @@
   \setmathfontface\mathsf{FiraMath-Regular.otf}
 }{}
 % ------------------------------------------------------------------------------
+%   Math environmrnts
+% ------------------------------------------------------------------------------
+\theoremstyle{plain}
+\newtheorem{theorem}{定理}[chapter]
+\newtheorem{lemma}{引理}[chapter]
+\newtheorem{corollary}{推论}[theorem]
+\newtheorem{proposition}{命题}[chapter]
+\newtheorem{conjecture}{猜想}[chapter]
+\theoremstyle{definition}
+\newtheorem{definition}{定义}[chapter]
+\newtheorem{axiom}{公理}[chapter]
+\newtheorem{example}{例}[chapter]
+\newtheorem{exercise}{练习}[chapter]
+\newtheorem{problem}{问题}[chapter]
+\theoremstyle{remark}
+\newtheorem{remark}{注}[chapter]
+\renewcommand*{\proofname}{证明}
+\expandafter\patchcmd\csname\string\proof\endcsname{\@addpunct{.}}{\@addpunct{\emph{:}}}{}{}
+% ------------------------------------------------------------------------------
 %   Utility functions for ToC and bookmarks
 % ------------------------------------------------------------------------------
 \newcommand{\artxmaincnt}{%
@@ -740,6 +788,15 @@
   \markboth{\MakeUppercase{#3}}{}%
 }
 \newcommand{\intobmk}{\@ifstar{\intobmkstar}{\intobmknostar}}
+% \cleardoublepage only works on graduate or undergraduate print mode
+\LetLtxMacro{\OriginCleardoublepage}{\cleardoublepage}
+\renewcommand{\cleardoublepage}{%
+  \ifthenelse{\boolean{sht at undergraduate} \AND \NOT\boolean{sht at print}}{%
+    \relax\clearpage%
+  }{%
+    \OriginCleardoublepage%
+  }%
+}
 % ------------------------------------------------------------------------------
 %   Table of contents, figures and tables
 % ------------------------------------------------------------------------------
@@ -747,10 +804,22 @@
 \captionsetup{
   format = plain,
   hangindent = 2.0em,
-  skip = 8pt,
   labelsep = quad,
   font = {wuhaocuti},
 }
+\ifsht at undergraduate
+  \captionsetup{
+    skip = 6pt,
+  }
+  \def\sht at toc@chapter at fmt{\zihao{5}\rmfamily}
+  \def\sht at toc@section at fmt{\zihao{5}\rmfamily}
+\else
+  \captionsetup{
+    skip = 8pt,
+  }
+  \def\sht at toc@chapter at fmt{\zihao{4}\heiti}
+  \def\sht at toc@section at fmt{\zihao{-4}\heiti}
+\fi
 \def\@dotsep{1.5mu}
 \def\@pnumwidth{2em}
 \def\@tocrmarg{2em}
@@ -762,7 +831,7 @@
     {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
     \parindent #2\relax\@afterindenttrue
     \interlinepenalty\@M
-    \leavevmode \zihao{-4}\heiti
+    \leavevmode \sht at toc@section at fmt
     \@tempdima #3\relax
     \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
     {#4}\nobreak
@@ -782,7 +851,7 @@
       \parindent \z@ \rightskip \@pnumwidth
       \parfillskip -\@pnumwidth
       {\leavevmode
-      \zihao{4}\heiti #1
+      \sht at toc@chapter at fmt #1
       \leaders\hbox{$\m at th\mkern \@dotsep \cdot\mkern \@dotsep$}
       \hfil \hb at xt@\@pnumwidth{\hss #2}}\par
       \nobreak
@@ -795,12 +864,15 @@
 \renewcommand*{\l at chapter}[2]{
   \ifnum \c at tocdepth >\m at ne
     \addpenalty{-\@highpenalty}%
-    \vskip \@chaptervspace \@plus\p@
+    \ifsht at undergraduate%
+    \else%
+      \vskip \@chaptervspace \@plus\p@%
+    \fi%
     \setlength\@tempdima{1.5em}%
     \begingroup
       \parindent \z@ \rightskip \@pnumwidth
       \parfillskip -\@pnumwidth
-      \leavevmode \zihao{4}\heiti
+      \leavevmode \sht at toc@chapter at fmt
       \advance\leftskip\@tempdima
       \hskip -\leftskip
       #1\nobreak
@@ -822,12 +894,15 @@
 \newcommand{\makeindices}{%
   \begingroup%
   \linespread{1.2}%
+  \hypersetup{linkcolor=black}%
   \intobmk*{\cleardoublepage}{\contentsname}%
   \tableofcontents%
-  \intobmk*{\cleardoublepage}{\listfigurename}%
-  \listoffigures%
-  \intobmk*{\cleardoublepage}{\listtablename}%
-  \listoftables%
+  \ifsht at graduate%
+    \intobmk*{\cleardoublepage}{\listfigurename}%
+    \listoffigures%
+    \intobmk*{\cleardoublepage}{\listtablename}%
+    \listoftables%
+  \fi%
   \endgroup%
 }
 % ------------------------------------------------------------------------------
@@ -841,7 +916,7 @@
     titleformat = {},
     name = {第, 章},
     number = \arabic{chapter},
-    aftername = \hspace{1\ccwd},
+    aftername = \hspace{0.75\ccwd},
     beforeskip = {7pt},
     afterskip = {18pt},
     pagestyle = Plain,
@@ -851,7 +926,7 @@
     nameformat = {},
     numberformat = \rmfamily,
     titleformat = {},
-    aftername = \hspace{1\ccwd},
+    aftername = \hspace{0.75\ccwd},
     beforeskip = {24pt},
     afterskip = {6pt},
   },
@@ -860,7 +935,7 @@
     nameformat = {},
     numberformat = \rmfamily,
     titleformat = {},
-    aftername = \hspace{1\ccwd},
+    aftername = \hspace{0.75\ccwd},
     beforeskip = {12pt},
     afterskip = {6pt},
   },
@@ -867,12 +942,44 @@
   paragraph = {
     indent = 2\ccwd,
     beforeskip = {0pt},
-    afterskip = {1\ccwd},
+    afterskip = {0.75\ccwd},
   },
   punct = quanjiao,
   space = auto,
   autoindent = true,
 }
+\ifsht at undergraduate
+  \newlength{\sht at section@indent}
+  \ifsht at comfort
+    \def\sht at chapter@fmt{\bfseries\sffamily\zihao{4}\linespread{1.0}\centering}
+    \def\sht at section@fmt{\sffamily\zihao{-4}\linespread{1.0}\raggedright}
+    \def\sht at subsection@fmt{\sffamily\zihao{5}\linespread{1.0}\raggedright}
+    \setlength{\sht at section@indent}{0pt}
+  \else
+    \def\sht at chapter@fmt{\bfseries\sffamily\zihao{3}\linespread{1.0}\centering}
+    \def\sht at section@fmt{\sffamily\zihao{4}\linespread{1.0}\raggedright}
+    \def\sht at subsection@fmt{\rmfamily\zihao{-4}\linespread{1.0}\raggedright}
+    \setlength{\sht at section@indent}{2\ccwd}
+  \fi
+  \ctexset{
+    chapter = {
+      format = \sht at chapter@fmt,
+      number = \chinese{chapter},
+      numberformat = {},
+    },
+    section = {
+      format = \sht at section@fmt,
+      numberformat = {},
+      indent = \sht at section@indent,
+      beforeskip = {18pt},
+    },
+    subsection = {
+      format = \sht at subsection@fmt,
+      numberformat = {},
+      indent = \sht at section@indent,
+    }
+  }
+\fi
 % ------------------------------------------------------------------------------
 %   List environments
 % ------------------------------------------------------------------------------
@@ -890,42 +997,111 @@
   labelsep = 0em,
   format = \normalfont\textbf at with@colon,
 }
+% ------------------------------------------------------------------------------
+%   Quotation environments
+% ------------------------------------------------------------------------------
+\ExplSyntaxOn
+\ctex_patch_cmd:Nnn \quotation { 1.5em } { 2 \ccwd }
+\ExplSyntaxOff
+\BeforeBeginEnvironment{quotation}{%
+  \begingroup%
+  \setlength\leftmargini{2\ccwd}%
+}
+\AtBeginEnvironment{quotation}{%
+  \itshape%
+}
+\AfterEndEnvironment{quotation}{%
+  \endgroup%
+}
 % ==============================================================================
 % Cover Generation
 % ==============================================================================
-\def\ulhshift{-4em}
-\newcommand{\ulunify}[1]{\uline{#1}}
-\newcommand{\ulenhance}[2][1pt]{%
+\def\ubox at right@shift{0.5\ccwd}
+\def\content at left@shift{2.75\ccwd}
+\def\cover at tab@entry at width{350pt}
+\def\cover at tab@last at entry@width{\cover at tab@entry at width - 2\ccwd - 0.5\ccwd}
+\def\cover at tab@uline at thick{1.2pt}
+\ExplSyntaxOn
+\ProvideDocumentCommand{\shifted at uline}{%
+    O{\cover at tab@uline at thick} %
+    O{\ubox at right@shift} %
+    m}{%
   \def\ULthickness{#1}%
   \setlength{\ULdepth}{0.3em}%
-  \expandafter\ulunify\expandafter{#2}%
+  \hspace*{#2}%
+  \uline{#3}%
 }
-\newcommand{\ulextend}[2][350pt]{%
-  \hbox to #1 {\hfill \hspace*{\ulhshift} #2 \hfill}%
+\ProvideDocumentCommand{\shifted at box}{%
+    O{\cover at tab@entry at width} %
+    O{\content at left@shift} %
+    m}{%
+  \makebox[#1][c]{\hspace*{-#2} #3 }%
 }
+\ProvideDocumentCommand{\sht at lines@to at tab}{%
+    O{\cover at tab@uline at thick} %
+    O{\cover at tab@entry at width} %
+    O{\content at left@shift} %
+    m}{%
+  % convert lines into table lines, adapted from `ucasthesis'
+  \seq_set_split:NnV \l_tmpa_seq {\\} {#4}
+  \clist_set_from_seq:NN \l_tmpa_clist \l_tmpa_seq
+  \clist_clear:N \l_tmpb_clist
+  \clist_map_inline:Nn \l_tmpa_clist
+    {%
+      \clist_put_right:Nn \l_tmpb_clist 
+        { \shifted at uline[#1]{\shifted at box[#2][#3]{##1}} }
+    }
+  \clist_use:Nn \l_tmpb_clist { \\ & }
+}
+\ExplSyntaxOff
 \newcommand\sht at schoollogo{%
   \IfFileExists{shanghaitech-logo.pdf}{%
     \includegraphics[width=10.48cm]{shanghaitech-logo.pdf}%
   }{%
-    \missingfigure[figwidth=10.48cm, figheight=2.79cm]{%
-      \small 校徽文件 \texttt{shanghaitech-logo.pdf} 缺失,请至\href{https://github.com/lirundong/shtthesis/raw/master/shanghaitech-logo.pdf}{项目主页}下载!%
+    \begin{center}%
+      \fbox{%
+        \begin{minipage}[t][2.79cm][c]{10.48cm}%
+          \centering\bfseries\color{ShtRed} \school at logo@missing%
+        \end{minipage}%
+      }%
+    \end{center}%
+  }%
+}
+\newcommand\sht at schoollogo@undergraduate{%
+  \noindent%
+  \IfFileExists{shanghaitech-logo.pdf}{%
+    \includegraphics[width=5.39cm]{shanghaitech-logo.pdf}%
+  }{%
+    \fbox{%
+      \begin{minipage}[t][1.45cm][c]{0.75\columnwidth}%
+        \bfseries\color{ShtRed} \school at logo@missing%
+      \end{minipage}%
     }%
   }%
 }
 \renewcommand{\maketitle}{%
-  \ifthenelse{\equal{\sht at degree}{doctor}}{
-    \sht at maketitle@graduate{博士}
-    \sht at maketitle@graduate at en{dissertation}
-  }{
-    \ifthenelse{\equal{\sht at degree}{master}}{
-      \sht at maketitle@graduate{硕士}
-      \sht at maketitle@graduate at en{thesis}
+  \ifsht at undergraduate
+    \sht at maketitle@undergraduate
+    \sht at maketitle@undergraduate at en
+  \else
+    \ifthenelse{\equal{\sht at degree}{doctor}}{
+      \sht at maketitle@graduate{博士}
+      \sht at maketitle@graduate at en{dissertation}
     }{
-      \sht at error{Degree type `\sht at degree' is not supported yet}
+      \ifthenelse{\equal{\sht at degree}{master}}{
+        \sht at maketitle@graduate{硕士}
+        \sht at maketitle@graduate at en{thesis}
+      }{
+        \sht at error{Degree type `\sht at degree' is not supported yet}
+      }
     }
-  }
+  \fi
   \ifthenelse{\not \boolean{sht at anonymous}}{%
-    \makedeclarations%
+    \ifsht at undergraduate%
+      \makedeclarations at undergraduate%
+    \else%
+      \makedeclarations%
+    \fi
   }{}
 }
 % ------------------------------------------------------------------------------
@@ -939,9 +1115,9 @@
     \hfill{}
     \ifdefempty{\sht at secret@level}{}{%
       密级:%
-      \ulenhance{%
-        \ulextend[50pt]{%
-          \hspace*{-\ulhshift} \zihao{5} \sht at secret@level%
+      \shifted at uline[1pt][0pt]{%
+        \shifted at box[50pt][0pt]{%
+          \zihao{5} \sht at secret@level%
         }%
       }%
     }
@@ -956,7 +1132,7 @@
 
     \vspace*{\stretch{3}}
 
-    {\zihao{-3}\heiti \ulenhance[1.5pt]{\sht at title}}
+    {\zihao{-3}\heiti \shifted at uline[1.5pt][0pt]{\sht at title}}
 
     \vspace*{\stretch{3}}
 
@@ -966,7 +1142,7 @@
       \def\arraystretch{1.3}
       \begin{tabular}{llc}
         作者姓名:&
-          \multicolumn{2}{c}{\ulenhance[1.2pt]{\ulextend{%
+          \multicolumn{2}{c}{\shifted at uline{\shifted at box{%
             \ifsht at anonymous%
               \sht at anonymous@str%
             \else%
@@ -974,7 +1150,7 @@
             \fi%
           }}} \\
         指导教师:&
-          \multicolumn{2}{c}{\ulenhance[1.2pt]{\ulextend{%
+          \multicolumn{2}{c}{\shifted at uline{\shifted at box{%
             \ifsht at anonymous%
               \sht at anonymous@str%
             \else%
@@ -982,14 +1158,14 @@
             \fi%
           }}} \\
         \ifdefempty{\sht at supervisor@institution}{}{ &
-          \multicolumn{2}{c}{\ulenhance[1.2pt]{\ulextend{\sht at supervisor@institution}}} \\
+          \multicolumn{2}{c}{\shifted at uline{\shifted at box{\sht at supervisor@institution}}} \\
         }
         学位类别:&
-          \multicolumn{2}{c}{\ulenhance[1.2pt]{\ulextend{\sht at degree@name}}} \\
+          \multicolumn{2}{c}{\shifted at uline{\shifted at box{\sht at degree@name}}} \\
         一级学科:&
-          \multicolumn{2}{c}{\ulenhance[1.2pt]{\ulextend{\sht at discipline@level at i}}} \\
+          \multicolumn{2}{c}{\shifted at uline{\shifted at box{\sht at discipline@level at i}}} \\
         \multicolumn{2}{l}{学校/学院名称:} &
-          \ulenhance[1.2pt]{\ulextend[318pt]{\sht at institution}} \\
+          \shifted at uline{\shifted at box[\cover at tab@last at entry@width]{\sht at institution}} \\
       \end{tabular}
     }
 
@@ -1012,7 +1188,7 @@
 
     \vspace*{50pt}
 
-    {\zihao{-3}\bfseries \ulenhance[1.5pt]{\sht at title@en}}
+    {\zihao{-3}\bfseries \shifted at uline[1.5pt][0pt]{\sht at title@en}}
 
     \vspace*{\stretch{3}}
 
@@ -1059,6 +1235,124 @@
   \cleardoublepage
 }
 % ------------------------------------------------------------------------------
+%   Bachelor covers
+% ------------------------------------------------------------------------------
+\def\cover at tab@entry at width@undergraduate{300pt}
+\def\cover at tab@uline at thick@undergraduate{1pt}
+\def\content at left@shift at en{2.5\ccwd}
+\newcommand{\sht at maketitle@undergraduate}{%
+  \intobmk*{\cleardoublepage}{封面}
+  \thispagestyle{empty}
+  \sht at schoollogo@undergraduate
+  \begin{center}
+    \linespread{1.6}
+
+    \vspace*{\stretch{20}}
+
+    {\zihao{2}\bfseries 本科毕业论文(设计)}
+
+    \vspace*{\stretch{54}}
+
+    {
+      \zihao{4}
+      \def\tabcolsep{1pt}
+      \def\arraystretch{1.3}
+      \begin{tabular}{cc}
+        题\hspace{2\ccwd}目:&
+          \sht at lines@to at tab[\cover at tab@uline at thick@undergraduate]%
+            [\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}} \\
+        学\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 uline[\cover at tab@uline at thick@undergraduate]%
+            {\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 uline[\cover at tab@uline at thick@undergraduate]%
+            {\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}} \\
+      \end{tabular}
+    }
+
+    \vspace*{\stretch{70}}
+
+    {
+      \zihao{-4}
+      上海科技大学
+      \par\sht at date
+    }
+
+    \vspace{\stretch{11}}
+  \end{center}
+  \clearpage
+  \thispagestyle{empty}
+  \cleardoublepage
+}
+\newcommand{\sht at maketitle@undergraduate at en}{%
+  \intobmk*{\cleardoublepage}{Cover}
+  \thispagestyle{empty}
+  \sht at schoollogo@undergraduate
+  \begin{center}
+    \linespread{1.6}
+
+    \vspace*{\stretch{20}}
+
+    {\zihao{2}\bfseries\sffamily THESIS}
+
+    \vspace*{\stretch{54}}
+
+    {
+      \zihao{4}
+      \def\tabcolsep{1pt}
+      \def\arraystretch{1.3}
+      \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} \\
+        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}} \\
+        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}} \\
+        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}} \\
+        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}} \\
+        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}} \\
+        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}} \\
+      \end{tabular}
+    }
+
+    \vspace*{\stretch{70}}
+
+    {
+      \zihao{-4}
+      ShanghaiTech University
+      \par Date:~\sht at date@en
+    }
+
+    \vspace{\stretch{11}}
+  \end{center}
+  \clearpage
+  \thispagestyle{empty}
+  \cleardoublepage
+}
+% ------------------------------------------------------------------------------
 %   Declarations
 % ------------------------------------------------------------------------------
 \newcommand{\makedeclarations}{%
@@ -1070,7 +1364,7 @@
     \vspace*{2ex}
 
     \begin{center}
-      {\zihao{4}\bfseries\sffamily 上海科技大学\\研究生学位论文原创性声明}
+      \zihao{4}\bfseries\sffamily 上海科技大学\\研究生学位论文原创性声明
     \end{center}
 
     本人郑重声明:所呈交的学位论文是本人在导师的指导下独立进行研究工作所取得的成果。%
@@ -1080,14 +1374,14 @@
 
     \vspace*{3ex}
 
-    {\hfill{} {作者签名:\hspace*{14em}}}
+    {\hfill{}作者签名:\hspace*{14em}}
 
-    {\hfill{} {日\quad\quad 期:\hspace*{14em}}}
+    {\hfill{}日\hspace*{2\ccwd}期:\hspace*{14em}}
 
     \vspace*{6ex}
 
     \begin{center}
-      {\zihao{4}\bfseries\sffamily 上海科技大学\\学位论文授权使用声明}
+      \zihao{4}\bfseries\sffamily 上海科技大学\\学位论文授权使用声明
     \end{center}
 
     本人完全了解并同意遵守上海科技大学有关保存和使用学位论文的规定,即上海科技大学有权%
@@ -1099,9 +1393,9 @@
 
     \vspace*{3ex}
 
-    {\hfill{} {作者签名:\hspace*{10em} 导师签名:\hspace*{9em}}}
+    {\hfill{}作者签名:\hspace*{10em}导师签名:\hspace*{9em}}
 
-    {\hfill{} {日\quad\quad 期:\hspace*{10em} 日\quad\quad 期:\hspace*{9em}}}
+    {\hfill{}日\hspace*{2\ccwd}期:\hspace*{10em}日\hspace*{2\ccwd}期:\hspace*{9em}}
 
     \vspace{3ex}
   }
@@ -1109,22 +1403,153 @@
   \thispagestyle{empty}
   \cleardoublepage
 }
+\newcommand{\makedeclarations at undergraduate}{%
+  \intobmk*{\cleardoublepage}{声明}
+  % P1: 学术诚信声明
+  \thispagestyle{empty}
+  {
+    \linespread{1.6}\zihao{4}
+
+    \vspace*{\stretch{1}}
+
+    \begin{center}
+      \zihao{-2}\bfseries\sffamily 上海科技大学\\毕业论文(设计)学术诚信声明
+    \end{center}
+
+    \vspace*{\stretch{1}}
+
+    本人郑重声明:所呈交的毕业论文(设计),是本人在导师的指导下,独立进行研究工作%
+    所取得的成果。除文中已经注明引用的内容外,本论文不包含任何其他个人或集体已经发表%
+    或撰写过的作品成果。对本文的研究做出重要贡献的个人和集体,均已在文中以明确方式%
+    标明。本人完全意识到本声明的法律结果由本人承担。
+
+    \vspace*{\stretch{3}}
+
+    \hfill{}作者签名:\hspace*{9.5\ccwd}
+
+    \vspace*{\stretch{1}}
+
+    \hfill{}日\hspace*{2\ccwd}期:%
+    \hspace*{2.5\ccwd}年%
+    \hspace*{1.5\ccwd}月%
+    \hspace*{1.5\ccwd}日%
+    \hspace*{1\ccwd}
+
+    \vspace{\stretch{6}}
+  }
+  \clearpage
+  % P2: empty
+  \thispagestyle{empty}
+  \cleardoublepage
+  % P3: 版权使用授权书
+  \thispagestyle{empty}
+  {
+    \linespread{1.6}\zihao{4}
+
+    \vspace*{\stretch{1}}
+
+    \begin{center}
+      \zihao{-2}\bfseries\sffamily 上海科技大学\\毕业论文(设计)版权使用授权书
+    \end{center}
+
+    \vspace*{\stretch{1}}
+
+    本毕业论文(设计)作者同意学校保留并向国家有关部门或机构送交论文的复印件和电子版,%
+    允许论文被查阅和借阅。本人授权上海科技大学可以将本毕业论文(设计)的全部或部分内容%
+    编入有关数据库进行检索,可以采用影印、缩印或扫描等复制手段保存和汇编本%
+    毕业论文(设计)。
+
+    \hspace*{6\ccwd}\textbf{保\hspace*{1\ccwd}密}$\square$,%
+    在\uline{\hspace*{2\ccwd}}年解密后适用本授权书。
+
+    本论文属于
+
+    \hspace*{6\ccwd}\textbf{不保密}$\square$。
+
+    (请在以上方框内打“\checkmark”)
+
+    \vspace*{\stretch{3}}
+
+    \noindent 作者签名:\hspace{12.5\ccwd}指导教师签名:
+
+    \vspace*{\stretch{1}}
+
+    \noindent 日期:%
+    \hspace*{2.5\ccwd}年%
+    \hspace*{1.5\ccwd}月%
+    \hspace*{1.5\ccwd}日%
+    \hspace*{6\ccwd}日期:%
+    \hspace*{2.5\ccwd}年%
+    \hspace*{1.5\ccwd}月%
+    \hspace*{1.5\ccwd}日
+
+    \vspace{\stretch{4}}
+  }
+  \clearpage
+  % P4: empty
+  \thispagestyle{empty}
+  \cleardoublepage
+}
 % ------------------------------------------------------------------------------
 %   Abstract
 % ------------------------------------------------------------------------------
-\newenvironment{abstract}{%
+\newenvironment{abstract}[1][\sht at null@arg]{%
   \cleardoublepage%
+  \ifthenelse{\equal{#1}{flattitle}}{%
+    \def\sht at abs@title{\sht at flat@title}%
+  }{%
+    \def\sht at abs@title{\sht at title}%
+  }%
+  \ifsht at undergraduate
+    \let\clearpage\relax%
+    \vspace*{\baselineskip}%
+    \begin{center}%
+      \zihao{3}\bfseries\sffamily\sht at abs@title%
+    \end{center}%
+    \vspace*{\baselineskip}%
+    \ctexset{chapter/format += \zihao{4}, chapter/beforeskip = 0pt}%
+  \fi
   \intobmk\chapter*{摘\hspace{1\ccwd}要}%
 }{%
   \vspace{\baselineskip}%
-  \par\noindent{\bfseries 关键词:} \sht at keywords%
+  \ifsht at undergraduate%
+    \ifsht at comfort%
+      \par\noindent{\bfseries\sffamily 关键词:} \sht at keywords%
+    \else%
+      \par\noindent{\zihao{-4}\bfseries\sffamily 关键词:} \sht at keywords%
+    \fi%
+  \else%
+    \par\noindent{\bfseries 关键词:} \sht at keywords%
+  \fi%
 }
-\newenvironment{abstract*}{%
+\newenvironment{abstract*}[1][\sht at null@arg]{%
   \cleardoublepage%
+  \ifthenelse{\equal{#1}{flattitle}}{%
+    \def\sht at abs@title at en{\sht at flat@title at en}%
+  }{%
+    \def\sht at abs@title at en{\sht at title@en}%
+  }%
+  \ifsht at undergraduate
+    \let\clearpage\relax%
+    \vspace*{\baselineskip}%
+    \begin{center}%
+      \zihao{3}\bfseries\sht at abs@title at en%
+    \end{center}%
+    \vspace*{\baselineskip}%
+    \ctexset{chapter/format += \zihao{4}\rmfamily, chapter/beforeskip = 0pt}%
+  \fi
   \intobmk\chapter*{Abstract}%
 }{%
   \vspace{\baselineskip}%
-  \par\noindent{\bfseries Key Words:} \sht at keywords@en%
+  \ifsht at undergraduate%
+    \ifsht at comfort%
+      \par\noindent{\bfseries Key words:} \sht at keywords@en%
+    \else%
+      \par\noindent{\zihao{-4}\bfseries Key words:} \sht at keywords@en%
+    \fi%
+  \else%
+    \par\noindent{\bfseries Key Words:} \sht at keywords@en%
+  \fi%
 }
 % ------------------------------------------------------------------------------
 %   Nomenclatures
@@ -1138,10 +1563,17 @@
     \intobmk\chapter*{符号列表}%
   \fi
   \stepcounter{sht at nomenclature@cnt}
-  \ifthenelse{\not \equal{#1}{\sht at null@arg}}{
-    \section*{#1}
+  \ifthenelse{\not \equal{#1}{\sht at null@arg}}{%
+    \ifsht at undergraduate%
+      \ctexset{section/format += \zihao{-4}, section/indent = 0pt}%
+    \fi%
+    \section*{#1}%
   }{
-    \par\vspace{24pt}
+    \ifsht at undergraduate%
+      \par\vspace{18pt}%
+    \else%
+      \par\vspace{24pt}%
+    \fi%
   }
   \renewcommand{\item}[3][\sht at null@arg]{
     \ifthenelse{\not \equal{##1}{\sht at null@arg}}{
@@ -1158,14 +1590,10 @@
 % ------------------------------------------------------------------------------
 %   Bibliography
 % ------------------------------------------------------------------------------
-\providecommand{\bibstyle at authoryear}{\bibpunct{(}{)}{;}{a}{,}{,}}
-\citestyle{authoryear}
-\bibliographystyle{shtthesis-gbt7714-plain}
-\setlength{\bibsep}{0.0ex plus 0.2ex minus 0.2ex}
-\renewcommand*{\bibfont}{\small}
-\providecommand{\makebiblio}[1][reference]{%
+\providecommand{\makebiblio}{%
+  \renewcommand{\bibfont}{\zihao{5}}%
   \intotoc*{\cleardoublepage}{\bibname}%
-  \bibliography{#1}%
+  \printbibliography%
 }
 % ------------------------------------------------------------------------------
 %   Appendix
@@ -1172,10 +1600,14 @@
 % ------------------------------------------------------------------------------
 \LetLtxMacro{\origin at appendix}{\appendix}
 \renewcommand{\appendix}{%
-  \origin at appendix
+  \origin at appendix%
   \intotoc*{\cleardoublepage}{\appendixname}%
   \settocdepth{part}%
-  \pagestyle{LRPageNumberedAppendix}%
+  \ifsht at undergraduate%
+    \pagestyle{MNNumberedWithLogo}%
+  \else%
+    \pagestyle{LRNumberedAppendix}%
+  \fi%
 }
 % ------------------------------------------------------------------------------
 %   Backmatter
@@ -1185,7 +1617,14 @@
 \renewcommand{\backmatter}{%
   \origin at backmatter%
   \settocdepth{chapter}%
-  \pagestyle{LRPageNumbered}%
+  \ifsht at undergraduate%
+    \pagestyle{MNNumberedWithLogo}%
+  \else%
+    \pagestyle{LRNumbered}%
+  \fi%
+  \ifsht at undergraduate%
+    \ctexset{section/format += \zihao{-4}, section/indent = 0pt}%
+  \fi%
 }
 \newcounter{sht at resume@cnt}
 \setcounter{sht at resume@cnt}{0}



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