summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-author-year.bst46
-rw-r--r--Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-bachelor.bst44
-rw-r--r--Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-numeric.bst46
-rw-r--r--Master/texmf-dist/doc/latex/thuthesis/CHANGELOG.md48
-rw-r--r--Master/texmf-dist/doc/latex/thuthesis/README.md6
-rw-r--r--Master/texmf-dist/doc/latex/thuthesis/data/appendix-survey.tex2
-rw-r--r--Master/texmf-dist/doc/latex/thuthesis/data/appendix-translation.tex2
-rw-r--r--Master/texmf-dist/doc/latex/thuthesis/data/appendix.tex4
-rw-r--r--Master/texmf-dist/doc/latex/thuthesis/data/chap01.tex2
-rw-r--r--Master/texmf-dist/doc/latex/thuthesis/data/chap02.tex70
-rw-r--r--Master/texmf-dist/doc/latex/thuthesis/data/chap03.tex29
-rw-r--r--Master/texmf-dist/doc/latex/thuthesis/data/comments.tex9
-rw-r--r--Master/texmf-dist/doc/latex/thuthesis/data/denotation.tex68
-rw-r--r--Master/texmf-dist/doc/latex/thuthesis/data/resolution.tex18
-rw-r--r--Master/texmf-dist/doc/latex/thuthesis/ref/refs.bib1
-rw-r--r--Master/texmf-dist/doc/latex/thuthesis/spine.pdfbin17199 -> 24091 bytes
-rw-r--r--Master/texmf-dist/doc/latex/thuthesis/thusetup.tex36
-rw-r--r--Master/texmf-dist/doc/latex/thuthesis/thuthesis-example.pdfbin449650 -> 395835 bytes
-rw-r--r--Master/texmf-dist/doc/latex/thuthesis/thuthesis-example.tex8
-rw-r--r--Master/texmf-dist/doc/latex/thuthesis/thuthesis.pdfbin1027021 -> 1128526 bytes
-rw-r--r--Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx2124
-rw-r--r--Master/texmf-dist/source/latex/thuthesis/thuthesis.ins21
-rw-r--r--Master/texmf-dist/tex/latex/thuthesis/thuthesis-author-year.bbx2
-rw-r--r--Master/texmf-dist/tex/latex/thuthesis/thuthesis-numeric.bbx2
-rw-r--r--Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls1530
25 files changed, 2839 insertions, 1279 deletions
diff --git a/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-author-year.bst b/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-author-year.bst
index 2a361a97c26..22126985c57 100644
--- a/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-author-year.bst
+++ b/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-author-year.bst
@@ -4,13 +4,13 @@
%%
%% The original source files were:
%%
-%% gbt7714.dtx (with options: `thu,2015,authoryear')
+%% gbt7714.dtx (with options: `2015,thu,authoryear')
%% -------------------------------------------------------------------
-%% GB/T 7714-2015 BibTeX Style
+%% GB/T 7714—2015 BibTeX Style
%% https://github.com/CTeX-org/gbt7714-bibtex-style
-%% Version: 2020/06/08 v2.0.2
+%% Version: 2020/12/17 v2.1
%% -------------------------------------------------------------------
-%% Copyright (C) 2016-2020 by Zeping Lee <zepinglee AT gmail.com>
+%% Copyright (C) 2016—2021 by Zeping Lee <zepinglee AT gmail.com>
%% -------------------------------------------------------------------
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
@@ -18,7 +18,7 @@
%% The latest version of this license is in
%% https://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of LaTeX
-%% version 2005/12/01 or later.
+%% version 2008 or later.
%% -------------------------------------------------------------------
INTEGERS {
citation.et.al.min
@@ -41,6 +41,7 @@ INTEGERS {
italic.journal
bold.journal.volume
show.missing.address.publisher
+ space.before.pages
only.start.page
show.urldate
show.url
@@ -77,6 +78,7 @@ FUNCTION {load.config}
#0 'italic.journal :=
#0 'bold.journal.volume :=
#0 'show.missing.address.publisher :=
+ #0 'space.before.pages :=
#0 'only.start.page :=
#1 'show.urldate :=
#1 'show.url :=
@@ -198,9 +200,16 @@ FUNCTION {citation.et.al}
FUNCTION {bbl.colon} { ": " }
+FUNCTION {bbl.pages.colon}
+{ space.before.pages
+ { ": " }
+ { ":\allowbreak " }
+ if$
+}
+
FUNCTION {bbl.wide.space} { "\quad " }
-FUNCTION {bbl.slash} { "// " }
+FUNCTION {bbl.slash} { "//\allowbreak " }
FUNCTION {bbl.sine.loco}
{ entry.lang lang.zh =
@@ -1032,9 +1041,10 @@ FUNCTION {format.mark}
if$
'entry.mark :=
space.before.mark
- { " [" entry.mark * "]" * }
- { "[" entry.mark * "]" * }
+ { " " }
+ { "\allowbreak" }
if$
+ "[" * entry.mark * "]" *
}
{ "" }
if$
@@ -1367,7 +1377,7 @@ FUNCTION {format.journal.volume}
FUNCTION {format.journal.number}
{ number empty$ not
- { "\penalty0 (" number * ")" * }
+ { "\allowbreak (" number * ")" * }
{ "" }
if$
}
@@ -1375,9 +1385,7 @@ FUNCTION {format.journal.number}
FUNCTION {format.journal.pages}
{ pages empty$
{ "" }
- { ": "
- format.extracted.pages *
- }
+ { format.extracted.pages }
if$
}
@@ -1391,7 +1399,7 @@ FUNCTION {format.periodical.year.volume.number}
'skip$
if$
number empty$ not
- { "\penalty0 (" * number extract.before.dash * ")" * }
+ { "\allowbreak (" * number extract.before.dash * ")" * }
'skip$
if$
"--" *
@@ -1407,7 +1415,7 @@ FUNCTION {format.periodical.year.volume.number}
'skip$
if$
number empty$ not
- { "\penalty0 (" * number extract.after.dash * ")" * }
+ { "\allowbreak (" * number extract.after.dash * ")" * }
'skip$
if$
}
@@ -1659,7 +1667,7 @@ FUNCTION {monograph}
{ format.year "year" output.check }
'skip$
if$
- format.pages bbl.colon output.after
+ format.pages bbl.pages.colon output.after
format.urldate "" output.after
output.url
output.doi
@@ -1700,7 +1708,7 @@ FUNCTION {incollection}
{ format.year "year" output.check }
'skip$
if$
- format.extracted.pages bbl.colon output.after
+ format.extracted.pages bbl.pages.colon output.after
format.urldate "" output.after
output.url
output.doi
@@ -1773,7 +1781,7 @@ FUNCTION {article}
if$
format.journal.volume output
format.journal.number "" output.after
- format.journal.pages "" output.after
+ format.journal.pages bbl.pages.colon output.after
format.urldate "" output.after
output.url
output.doi
@@ -1841,7 +1849,7 @@ FUNCTION {electronic}
}
'skip$
if$
- format.pages bbl.colon output.after
+ format.pages bbl.pages.colon output.after
format.editdate "" output.after
format.urldate "" output.after
output.url
@@ -1892,7 +1900,7 @@ FUNCTION {preprint}
{ format.year "year" output.check }
'skip$
if$
- format.pages bbl.colon output.after
+ format.pages bbl.pages.colon output.after
format.urldate "" output.after
output.url
new.block
diff --git a/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-bachelor.bst b/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-bachelor.bst
index 9094bc339bb..1dd06bb8871 100644
--- a/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-bachelor.bst
+++ b/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-bachelor.bst
@@ -6,11 +6,11 @@
%%
%% gbt7714.dtx (with options: `2015,numerical,noslsn')
%% -------------------------------------------------------------------
-%% GB/T 7714-2015 BibTeX Style
+%% GB/T 7714—2015 BibTeX Style
%% https://github.com/CTeX-org/gbt7714-bibtex-style
-%% Version: 2020/06/08 v2.0.2
+%% Version: 2020/12/17 v2.1
%% -------------------------------------------------------------------
-%% Copyright (C) 2016-2020 by Zeping Lee <zepinglee AT gmail.com>
+%% Copyright (C) 2016—2021 by Zeping Lee <zepinglee AT gmail.com>
%% -------------------------------------------------------------------
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
@@ -18,7 +18,7 @@
%% The latest version of this license is in
%% https://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of LaTeX
-%% version 2005/12/01 or later.
+%% version 2008 or later.
%% -------------------------------------------------------------------
INTEGERS {
citation.et.al.min
@@ -41,6 +41,7 @@ INTEGERS {
italic.journal
bold.journal.volume
show.missing.address.publisher
+ space.before.pages
only.start.page
show.urldate
show.url
@@ -64,7 +65,7 @@ FUNCTION {load.config}
#0 'link.title :=
#1 'title.in.journal :=
#1 'show.mark :=
- #1 'space.before.mark :=
+ #0 'space.before.mark :=
#1 'show.medium.type :=
#1 'slash.for.extraction :=
#0 'in.booktitle :=
@@ -72,6 +73,7 @@ FUNCTION {load.config}
#0 'italic.journal :=
#0 'bold.journal.volume :=
#0 'show.missing.address.publisher :=
+ #1 'space.before.pages :=
#0 'only.start.page :=
#1 'show.urldate :=
#1 'show.url :=
@@ -188,6 +190,13 @@ FUNCTION {citation.et.al}
FUNCTION {bbl.colon} { ": " }
+FUNCTION {bbl.pages.colon}
+{ space.before.pages
+ { ": " }
+ { ":\allowbreak " }
+ if$
+}
+
FUNCTION {bbl.wide.space} { "\quad " }
FUNCTION {bbl.slash} { "//\allowbreak " }
@@ -1022,9 +1031,10 @@ FUNCTION {format.mark}
if$
'entry.mark :=
space.before.mark
- { " [" entry.mark * "]" * }
- { "[" entry.mark * "]" * }
+ { " " }
+ { "\allowbreak" }
if$
+ "[" * entry.mark * "]" *
}
{ "" }
if$
@@ -1357,7 +1367,7 @@ FUNCTION {format.journal.volume}
FUNCTION {format.journal.number}
{ number empty$ not
- { "\penalty0 (" number * ")" * }
+ { "\allowbreak (" number * ")" * }
{ "" }
if$
}
@@ -1365,9 +1375,7 @@ FUNCTION {format.journal.number}
FUNCTION {format.journal.pages}
{ pages empty$
{ "" }
- { ": "
- format.extracted.pages *
- }
+ { format.extracted.pages }
if$
}
@@ -1381,7 +1389,7 @@ FUNCTION {format.periodical.year.volume.number}
'skip$
if$
number empty$ not
- { "\penalty0 (" * number extract.before.dash * ")" * }
+ { "\allowbreak (" * number extract.before.dash * ")" * }
'skip$
if$
"--" *
@@ -1397,7 +1405,7 @@ FUNCTION {format.periodical.year.volume.number}
'skip$
if$
number empty$ not
- { "\penalty0 (" * number extract.after.dash * ")" * }
+ { "\allowbreak (" * number extract.after.dash * ")" * }
'skip$
if$
}
@@ -1649,7 +1657,7 @@ FUNCTION {monograph}
{ format.year "year" output.check }
'skip$
if$
- format.pages bbl.colon output.after
+ format.pages bbl.pages.colon output.after
format.urldate "" output.after
output.url
output.doi
@@ -1690,7 +1698,7 @@ FUNCTION {incollection}
{ format.year "year" output.check }
'skip$
if$
- format.extracted.pages bbl.colon output.after
+ format.extracted.pages bbl.pages.colon output.after
format.urldate "" output.after
output.url
output.doi
@@ -1763,7 +1771,7 @@ FUNCTION {article}
if$
format.journal.volume output
format.journal.number "" output.after
- format.journal.pages "" output.after
+ format.journal.pages bbl.pages.colon output.after
format.urldate "" output.after
output.url
output.doi
@@ -1831,7 +1839,7 @@ FUNCTION {electronic}
}
'skip$
if$
- format.pages bbl.colon output.after
+ format.pages bbl.pages.colon output.after
format.editdate "" output.after
format.urldate "" output.after
output.url
@@ -1882,7 +1890,7 @@ FUNCTION {preprint}
{ format.year "year" output.check }
'skip$
if$
- format.pages bbl.colon output.after
+ format.pages bbl.pages.colon output.after
format.urldate "" output.after
output.url
new.block
diff --git a/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-numeric.bst b/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-numeric.bst
index 9bb0702e39e..6c1eaa63d78 100644
--- a/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-numeric.bst
+++ b/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-numeric.bst
@@ -4,13 +4,13 @@
%%
%% The original source files were:
%%
-%% gbt7714.dtx (with options: `thu,2015,numerical')
+%% gbt7714.dtx (with options: `2015,thu,numerical')
%% -------------------------------------------------------------------
-%% GB/T 7714-2015 BibTeX Style
+%% GB/T 7714—2015 BibTeX Style
%% https://github.com/CTeX-org/gbt7714-bibtex-style
-%% Version: 2020/06/08 v2.0.2
+%% Version: 2020/12/17 v2.1
%% -------------------------------------------------------------------
-%% Copyright (C) 2016-2020 by Zeping Lee <zepinglee AT gmail.com>
+%% Copyright (C) 2016—2021 by Zeping Lee <zepinglee AT gmail.com>
%% -------------------------------------------------------------------
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
@@ -18,7 +18,7 @@
%% The latest version of this license is in
%% https://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of LaTeX
-%% version 2005/12/01 or later.
+%% version 2008 or later.
%% -------------------------------------------------------------------
INTEGERS {
citation.et.al.min
@@ -41,6 +41,7 @@ INTEGERS {
italic.journal
bold.journal.volume
show.missing.address.publisher
+ space.before.pages
only.start.page
show.urldate
show.url
@@ -72,6 +73,7 @@ FUNCTION {load.config}
#0 'italic.journal :=
#0 'bold.journal.volume :=
#0 'show.missing.address.publisher :=
+ #0 'space.before.pages :=
#0 'only.start.page :=
#1 'show.urldate :=
#1 'show.url :=
@@ -188,9 +190,16 @@ FUNCTION {citation.et.al}
FUNCTION {bbl.colon} { ": " }
+FUNCTION {bbl.pages.colon}
+{ space.before.pages
+ { ": " }
+ { ":\allowbreak " }
+ if$
+}
+
FUNCTION {bbl.wide.space} { "\quad " }
-FUNCTION {bbl.slash} { "// " }
+FUNCTION {bbl.slash} { "//\allowbreak " }
FUNCTION {bbl.sine.loco}
{ entry.lang lang.zh =
@@ -1022,9 +1031,10 @@ FUNCTION {format.mark}
if$
'entry.mark :=
space.before.mark
- { " [" entry.mark * "]" * }
- { "[" entry.mark * "]" * }
+ { " " }
+ { "\allowbreak" }
if$
+ "[" * entry.mark * "]" *
}
{ "" }
if$
@@ -1357,7 +1367,7 @@ FUNCTION {format.journal.volume}
FUNCTION {format.journal.number}
{ number empty$ not
- { "\penalty0 (" number * ")" * }
+ { "\allowbreak (" number * ")" * }
{ "" }
if$
}
@@ -1365,9 +1375,7 @@ FUNCTION {format.journal.number}
FUNCTION {format.journal.pages}
{ pages empty$
{ "" }
- { ": "
- format.extracted.pages *
- }
+ { format.extracted.pages }
if$
}
@@ -1381,7 +1389,7 @@ FUNCTION {format.periodical.year.volume.number}
'skip$
if$
number empty$ not
- { "\penalty0 (" * number extract.before.dash * ")" * }
+ { "\allowbreak (" * number extract.before.dash * ")" * }
'skip$
if$
"--" *
@@ -1397,7 +1405,7 @@ FUNCTION {format.periodical.year.volume.number}
'skip$
if$
number empty$ not
- { "\penalty0 (" * number extract.after.dash * ")" * }
+ { "\allowbreak (" * number extract.after.dash * ")" * }
'skip$
if$
}
@@ -1649,7 +1657,7 @@ FUNCTION {monograph}
{ format.year "year" output.check }
'skip$
if$
- format.pages bbl.colon output.after
+ format.pages bbl.pages.colon output.after
format.urldate "" output.after
output.url
output.doi
@@ -1690,7 +1698,7 @@ FUNCTION {incollection}
{ format.year "year" output.check }
'skip$
if$
- format.extracted.pages bbl.colon output.after
+ format.extracted.pages bbl.pages.colon output.after
format.urldate "" output.after
output.url
output.doi
@@ -1763,7 +1771,7 @@ FUNCTION {article}
if$
format.journal.volume output
format.journal.number "" output.after
- format.journal.pages "" output.after
+ format.journal.pages bbl.pages.colon output.after
format.urldate "" output.after
output.url
output.doi
@@ -1831,7 +1839,7 @@ FUNCTION {electronic}
}
'skip$
if$
- format.pages bbl.colon output.after
+ format.pages bbl.pages.colon output.after
format.editdate "" output.after
format.urldate "" output.after
output.url
@@ -1882,7 +1890,7 @@ FUNCTION {preprint}
{ format.year "year" output.check }
'skip$
if$
- format.pages bbl.colon output.after
+ format.pages bbl.pages.colon output.after
format.urldate "" output.after
output.url
new.block
diff --git a/Master/texmf-dist/doc/latex/thuthesis/CHANGELOG.md b/Master/texmf-dist/doc/latex/thuthesis/CHANGELOG.md
index 05e7be0d81c..c4c4be0399c 100644
--- a/Master/texmf-dist/doc/latex/thuthesis/CHANGELOG.md
+++ b/Master/texmf-dist/doc/latex/thuthesis/CHANGELOG.md
@@ -6,6 +6,27 @@
## [Unreleased]
+## [v7.2.0] - 2021-03-12
+### Added
+- 新增英文版写作指南要求的格式。
+- 新增选题报告的格式(#579)。
+- 新增 `figure-number-sepatator` 等选项设置图表编号的连接符。
+- 新增数学符号字体风格选项 `math-style`。
+- 新增选项控制数学字体风格的细节:`uppercase-greek`、`less-than-or-equal`、`integral`、`integral-limits`、`partial` 和 `math-ellipsis`。
+- 新增数学字体试验性选项 `math-font = newtx`。
+
+### Changed
+- 研究生的声明页默认加上页眉和页码,不受 `page-style` 的控制(#574)。
+- 取消图表标题的悬挂缩进(#589)。
+- 英文封面的联合导师改为“Co-supervisor”。
+- 联合导师的 key 改为 `co-supervisor`,同英文版模板一致。
+
+### Fixed
+- 修正 `longtable` 宏包的配置(#584)。
+- 修正本科生的“目录”、“声明”和“致谢”等标题中的空白(#591)。
+- 修正参考文献的格式,取消页码与前面冒号之间的空格。
+- 修正中文封面的字距。
+
## [v7.1.0] - 2020-10-14
### Changed
- 更新摘要的标题格式(研究生 2020-09-18 版)。
@@ -118,7 +139,7 @@
## [v6.0.2] - 2020-02-23
### Fixed
-- 修复图表公式目录内容缺失 (#467)。
+- 修复图表公式目录内容缺失(#467)。
- 修复 Github Actions 执行 l3build check 问题。
- 文本模式使用 `\checkmark`。
@@ -135,8 +156,8 @@
- 更新 bib 测试用例。
### Fixed
-- 修复 PDF 目录层级问题 (#457)。
-- 修复 PDF 中章节连接问题 (#453)。
+- 修复 PDF 目录层级问题(#457)。
+- 修复 PDF 中章节连接问题(#453)。
## [v6.0.0] - 2020-01-06
### Added
@@ -271,17 +292,17 @@
- 不再将页面尺寸写入 dvi,因为已不支持 dvips, 而该方案会使得在使用 tikzexternalize 时外部 PDF 图片 BBox 不对。
- 用 `geometry` 简化设置。
- `\ps@thu@headings`: 利用 `fancyhdr` 设置页眉页脚。
-- 修正定理字样为黑体 (#104)。
+- 修正定理字样为黑体(#104)。
- 本科附录图表编号用-不用.(如图A-1,表A-2)。
- 用 `\ctexset` 来设置,替换复杂的 `\@startsection`。
-- 修正章节间距问题(#57)
+- 修正章节间距问题(#57)。
- 硕士博士论文目录只出现到第 3 级标题即可。其他未明确要求。
-- `\tableofcontents`: 修正学位论文中目录里节前缩进(#103)
-- `\makecover`: 使用 `pdfpages` 宏包支持本硕博论文授权说明扫描版(#36)。
-- `acknowledgement`: 使用 pdfpages 宏包支持本硕博论文声明扫描版(#36)。
+- `\tableofcontents`: 修正学位论文中目录里节前缩进(#103)。
+- `\makecover`: 使用 `pdfpages` 宏包支持本硕博论文授权说明扫描版(#36)。
+- `acknowledgement`: 使用 pdfpages 宏包支持本硕博论文声明扫描版(#36)。
- `\inlinecite`: 用 `\inlinecite` 替换 `\onlinecite`。为保证兼 容性,`\onlinecite` 会保留。
-- `achievements`: 博士后就不提在学期间了,不合适(#100)
-- `achievements`: 让简历部分更符合格式指南和示例文件(#122)
+- `achievements`: 博士后就不提在学期间了,不合适(#100)。
+- `achievements`: 让简历部分更符合格式指南和示例文件(#122)。
- `\shuji`: 扩展 `\shuji[<标题>][<作者>]`。
## [v4.8.1] - 2014-12-09
@@ -374,7 +395,7 @@
- 调整段前距为 -12bp 而不是原来的 -16bp。
- `\tableofcontents`: 本科生目录字号改回`\xiaosi[<1.8>]`。
- `\tableofcontents`: 本科生目录缩进要求不同。
-- `\tableofcontents`: 本科章目录项一直用黑体 (Arial)。
+- `\tableofcontents`: 本科章目录项一直用黑体(Arial)。
## [v4.3] - 2008-03-11
### Changed
@@ -542,7 +563,7 @@
### Changed
- Fill more pdf info. with `\hypersetup`.
- 自动隐藏密级为内部时后面的五角星。
-- 增加“注释 (Remark)”环境。
+- 增加“注释(Remark)”环境。
- 压缩 item 之间的距离。
- `thubib.bst` 文献标题取消自动小写。
- 中文参考文献取消 In: Proceedings。
@@ -642,7 +663,8 @@
-[Unreleased]: https://github.com/tuna/thuthesis/compare/v7.1.0...HEAD
+[Unreleased]: https://github.com/tuna/thuthesis/compare/v7.2.0...HEAD
+[v7.2.0]: https://github.com/tuna/thuthesis/compare/v7.1.0...v7.2.0
[v7.1.0]: https://github.com/tuna/thuthesis/compare/v7.0.0...v7.1.0
[v7.0.0]: https://github.com/tuna/thuthesis/compare/v6.1.3...v7.0.0
[v6.1.3]: https://github.com/tuna/thuthesis/compare/v6.1.2...v6.1.3
diff --git a/Master/texmf-dist/doc/latex/thuthesis/README.md b/Master/texmf-dist/doc/latex/thuthesis/README.md
index ed0788a5ad7..d922e5cc826 100644
--- a/Master/texmf-dist/doc/latex/thuthesis/README.md
+++ b/Master/texmf-dist/doc/latex/thuthesis/README.md
@@ -23,8 +23,8 @@ Scroll down for the English version of README.
推荐下载**发布版**模板,里面包括具体使用说明以及示例文档:
-* 模板使用说明 (thuthesis.pdf)
-* 示例文档 (thuthesis-example.pdf)
+* 模板使用说明(thuthesis.pdf)
+* 示例文档(thuthesis-example.pdf)
开发版中不提供预生成的 `cls` 文件和文档,仅包含源码。其仅供开发者与需要尚未发布的功能的有经验的 TeX 用户使用,不提供任何保证。
@@ -51,7 +51,7 @@ Scroll down for the English version of README.
下载发布版的的 zip 包,使用其中的 `thuthesis.cls` 等文件覆盖原有的即可,无须额外操作。
-#### 开发板
+#### 开发版
从 GitHub clone 项目源码或者下载源码 zip 包,执行命令(Windows 用户在文件夹空白处按 `Shift + 鼠标右键`,点击“在此处打开命令行窗口”):
diff --git a/Master/texmf-dist/doc/latex/thuthesis/data/appendix-survey.tex b/Master/texmf-dist/doc/latex/thuthesis/data/appendix-survey.tex
index 5dd97a7a084..76fe5b12f5e 100644
--- a/Master/texmf-dist/doc/latex/thuthesis/data/appendix-survey.tex
+++ b/Master/texmf-dist/doc/latex/thuthesis/data/appendix-survey.tex
@@ -53,7 +53,7 @@ An example table in appendix (Table~\ref{tab:appendix-survey-table}).
An example equation in appendix (Equation~\eqref{eq:appendix-survey-equation}).
\begin{equation}
- \frac{1}{2 \symup{\pi} \symup{i}} \int_\gamma f = \sum_{k=1}^m n(\gamma; a_k) \mathscr{R}(f; a_k)
+ \frac{1}{2 \uppi \symup{i}} \int_\gamma f = \sum_{k=1}^m n(\gamma; a_k) \mathscr{R}(f; a_k)
\label{eq:appendix-survey-equation}
\end{equation}
diff --git a/Master/texmf-dist/doc/latex/thuthesis/data/appendix-translation.tex b/Master/texmf-dist/doc/latex/thuthesis/data/appendix-translation.tex
index 891e416b064..d272480bf40 100644
--- a/Master/texmf-dist/doc/latex/thuthesis/data/appendix-translation.tex
+++ b/Master/texmf-dist/doc/latex/thuthesis/data/appendix-translation.tex
@@ -52,7 +52,7 @@
附录中的数学公式示例(公式~\eqref{eq:appendix-translation-equation})。
\begin{equation}
- \frac{1}{2 \symup{\pi} \symup{i}} \int_\gamma f = \sum_{k=1}^m n(\gamma; a_k) \mathscr{R}(f; a_k)
+ \frac{1}{2 \uppi \symup{i}} \int_\gamma f = \sum_{k=1}^m n(\gamma; a_k) \mathscr{R}(f; a_k)
\label{eq:appendix-translation-equation}
\end{equation}
diff --git a/Master/texmf-dist/doc/latex/thuthesis/data/appendix.tex b/Master/texmf-dist/doc/latex/thuthesis/data/appendix.tex
index 94b17439317..39ac664248b 100644
--- a/Master/texmf-dist/doc/latex/thuthesis/data/appendix.tex
+++ b/Master/texmf-dist/doc/latex/thuthesis/data/appendix.tex
@@ -1,3 +1,5 @@
+% !TeX root = ../thuthesis-example.tex
+
\chapter{补充内容}
附录是与论文内容密切相关、但编入正文又影响整篇论文编排的条理和逻辑性的资料,例如某些重要的数据表格、计算程序、统计表等,是论文主体的补充内容,可根据需要设置。
@@ -43,6 +45,6 @@
附录中的数学公式示例(公式~\eqref{eq:appendix-equation})。
\begin{equation}
- \frac{1}{2 \symup{\pi} \symup{i}} \int_\gamma f = \sum_{k=1}^m n(\gamma; a_k) \mathscr{R}(f; a_k)
+ \frac{1}{2 \uppi \symup{i}} \int_\gamma f = \sum_{k=1}^m n(\gamma; a_k) \mathscr{R}(f; a_k)
\label{eq:appendix-equation}
\end{equation}
diff --git a/Master/texmf-dist/doc/latex/thuthesis/data/chap01.tex b/Master/texmf-dist/doc/latex/thuthesis/data/chap01.tex
index a1ce9626fc8..b4f66417330 100644
--- a/Master/texmf-dist/doc/latex/thuthesis/data/chap01.tex
+++ b/Master/texmf-dist/doc/latex/thuthesis/data/chap01.tex
@@ -4,7 +4,7 @@
研究生学位论文撰写,除表达形式上需要符合一定的格式要求外,内容方面上也要遵循一些共性原则。
-通常研究生学位论文只能有一个主题(不能是几块工作拼凑在一起),该主题应针对某学科领域中的一个具体问题展开深入、系统的研究,并得出有价值的研究结论。
+通常研究生学位论文只能有一个主题(不能是几块工作拼凑在一起),该主题应针对某学科领域中的一个具体问题展开深入、系统的研究,并得出有价值的研究结论。
学位论文的研究主题切忌过大,例如,“中国国有企业改制问题研究”这样的研究主题过大,因为“国企改制”涉及的问题范围太广,很难在一本研究生学位论文中完全研究透彻。
diff --git a/Master/texmf-dist/doc/latex/thuthesis/data/chap02.tex b/Master/texmf-dist/doc/latex/thuthesis/data/chap02.tex
index 31f7032e1af..8d6c2b070ec 100644
--- a/Master/texmf-dist/doc/latex/thuthesis/data/chap02.tex
+++ b/Master/texmf-dist/doc/latex/thuthesis/data/chap02.tex
@@ -20,7 +20,7 @@
若图或表中有附注,采用英文小写字母顺序编号,附注写在图或表的下方。
% LaTeX 传统上一般将附注的内容同图表的标题写在一起,形成很长的一段文字。
-如果一个图由两个或两个以上分图组成时,各分图分别以(a)、(b)、(c)...... 作为图序,并须有分图题。
+如果一个图由两个或两个以上分图组成时,各分图分别以 (a)、(b)、(c)...... 作为图序,并须有分图题。
推荐使用 \pkg{subcaption} 宏包来处理, 比如图~\ref{fig:subfig-a} 和图~\ref{fig:subfig-b}。
\begin{figure}
@@ -83,3 +83,71 @@
\end{tablenotes}
\end{threeparttable}
\end{table}
+
+如某个表需要转页接排,可以使用 \pkg{longtable} 宏包,需要在随后的各页上重复表的编号。
+编号后跟表题(可省略)和“(续)”,置于表上方。续表均应重复表头。
+
+\begin{longtable}{cccc}
+ \caption{跨页长表格的表题} \\
+ \toprule
+ 表头 1 & 表头 2 & 表头 3 & 表头 4 \\
+ \midrule
+ \endfirsthead
+ \caption[]{跨页长表格的表题(续)} \\
+ \toprule
+ 表头 1 & 表头 2 & 表头 3 & 表头 4 \\
+ \midrule
+ \endhead
+ \bottomrule
+ \endfoot
+ Row 1 & & & \\
+ Row 2 & & & \\
+ Row 3 & & & \\
+ Row 4 & & & \\
+ Row 5 & & & \\
+ Row 6 & & & \\
+ Row 7 & & & \\
+ Row 8 & & & \\
+ Row 9 & & & \\
+ Row 10 & & & \\
+ Row 11 & & & \\
+ Row 12 & & & \\
+ Row 13 & & & \\
+ Row 14 & & & \\
+ Row 15 & & & \\
+ Row 16 & & & \\
+ Row 17 & & & \\
+ Row 18 & & & \\
+ Row 19 & & & \\
+ Row 20 & & & \\
+ Row 21 & & & \\
+ Row 22 & & & \\
+ Row 23 & & & \\
+ Row 24 & & & \\
+ Row 25 & & & \\
+ Row 26 & & & \\
+ Row 27 & & & \\
+ Row 28 & & & \\
+ Row 29 & & & \\
+ Row 30 & & & \\
+ Row 31 & & & \\
+ Row 32 & & & \\
+ Row 33 & & & \\
+ Row 34 & & & \\
+ Row 35 & & & \\
+ Row 36 & & & \\
+ Row 37 & & & \\
+ Row 38 & & & \\
+ Row 39 & & & \\
+ Row 40 & & & \\
+ Row 41 & & & \\
+ Row 42 & & & \\
+ Row 43 & & & \\
+ Row 44 & & & \\
+ Row 45 & & & \\
+ Row 46 & & & \\
+ Row 47 & & & \\
+ Row 48 & & & \\
+ Row 49 & & & \\
+ Row 50 & & & \\
+\end{longtable}
diff --git a/Master/texmf-dist/doc/latex/thuthesis/data/chap03.tex b/Master/texmf-dist/doc/latex/thuthesis/data/chap03.tex
index 2cb452b0be8..3725e1f0fc6 100644
--- a/Master/texmf-dist/doc/latex/thuthesis/data/chap03.tex
+++ b/Master/texmf-dist/doc/latex/thuthesis/data/chap03.tex
@@ -4,25 +4,20 @@
\section{数学符号}
-研究生《写作指南》要求量及其单位所使用的符号应符合国家标准《国际单位制及其应用》(GB 3100—1993)、《有关量、单位和符号的一般原则》(GB/T 3101—1993) 的规定。
-模板中使用 \pkg{unicode-math} 宏包来配置数学符号,
-与 \LaTeX{} 默认的英美国家的符号习惯有所差异:
+中文论文的数学符号默认采用 GB/T 3102.11—1993《物理科学和技术中使用的数学符号》。
+该标准参照采纳 ISO 31-11:1992(目前最新版为 ISO 80000-2:2019),
+但是与 \TeX{} 默认的英美国家的符号习惯有许多差异,主要有:
\begin{enumerate}
- \item 大写希腊字母默认为斜体,如 \cs{Delta}:$\Delta$。
- \item 有限增量符号 $\increment$(U+2206)应使用 \pkg{unicode-math} 宏包提供的
- \cs{increment} 命令。
- \item 向量、矩阵和张量要求粗斜体,应该使用 \pkg{unicode-math} 的 \cs{symbf} 命令,
- 如 \verb|\symbf{A}|、\verb|\symbf{\alpha}|。
- \item 数学常数和特殊函数要求用正体,应使用 \cs{symup} 命令,
- 如 $\symup{\pi} = 3.14\dots$; $\symup{e} = 2.718\dots$,
- \item 微分号和积分号使用使用正体,比如 $\int f(x) \dif x$。
+ \item 大写希腊字母默认为斜体,如 $\Delta$、$\Sigma$,
+ 有限增量符号 $\increment$(\cs{increment})固定使用正体。
+ \item 数学常数和特殊函数名用正体,如 $\uppi = 3.14\dots$;$\symup{e} = 2.718\dots$。
+ \item 微分号使用正体,比如 $\dif y / \dif x$。
+ \item 向量、矩阵和张量用粗斜体(\cs{symbf}),如 $\symbf{x}$、$\symbf{\Sigma}$。
+ \item 省略号按照中文的习惯固定居中,如 $1, 2, \dots, n$。
\end{enumerate}
-关于数学符号更多的用法,参考
-\href{http://mirrors.ctan.org/macros/latex/contrib/unicode-math/unicode-math.pdf}{\pkg{unicode-math}}
-宏包的使用说明,
-全部数学符号命的令参考
-\href{http://mirrors.ctan.org/macros/latex/contrib/unicode-math/unimath-symbols.pdf}{\pkg{unimath-symbols}}。
+英文论文的数学符号使用 \TeX{} 默认的样式。
+如果有必要,也可以通过设置 \verb|math-style| 选择数学符号样式。
关于量和单位推荐使用
\href{http://mirrors.ctan.org/macros/latex/contrib/siunitx/siunitx.pdf}{\pkg{siunitx}}
@@ -41,7 +36,7 @@
数学公式可以使用 \env{equation} 和 \env{equation*} 环境。
注意数学公式的引用应前后带括号,建议使用 \cs{eqref} 命令,比如式 \eqref{eq:example}。
\begin{equation}
- \frac{1}{2 \symup{\pi} \symup{i}} \int_\gamma f = \sum_{k=1}^m n(\gamma; a_k) \mathscr{R}(f; a_k)
+ \frac{1}{2 \uppi \symup{i}} \int_\gamma f = \sum_{k=1}^m n(\gamma; a_k) \mathscr{R}(f; a_k)
\label{eq:example}
\end{equation}
注意公式编号的引用应含有圆括号,可以使用 \cs{eqref} 命令。
diff --git a/Master/texmf-dist/doc/latex/thuthesis/data/comments.tex b/Master/texmf-dist/doc/latex/thuthesis/data/comments.tex
index a5e172a91bc..832d18dd0e3 100644
--- a/Master/texmf-dist/doc/latex/thuthesis/data/comments.tex
+++ b/Master/texmf-dist/doc/latex/thuthesis/data/comments.tex
@@ -1,5 +1,10 @@
% !TeX root = ../thuthesis-example.tex
-\chapter{指导小组学术评语}
+\begin{comments}
+% \begin{comments}[name = {指导小组学术评语}]
+% \begin{comments}[name = {Comments from Thesis Supervisor}]
+% \begin{comments}[name = {Comments from Thesis Supervision Committee}]
-论文提出了……
+ 论文提出了……
+
+\end{comments}
diff --git a/Master/texmf-dist/doc/latex/thuthesis/data/denotation.tex b/Master/texmf-dist/doc/latex/thuthesis/data/denotation.tex
index 914288e3eb5..868d7603bad 100644
--- a/Master/texmf-dist/doc/latex/thuthesis/data/denotation.tex
+++ b/Master/texmf-dist/doc/latex/thuthesis/data/denotation.tex
@@ -22,24 +22,24 @@
\item[HMSPPT] 聚苯基对称三嗪模型化合物的质子化产物
\item[HMPPQ] 聚苯基喹噁啉模型化合物的质子化产物
\item[PDT] 热分解温度
- \item[HPLC] 高效液相色谱 (High Performance Liquid Chromatography)
- \item[HPCE] 高效毛细管电泳色谱 (High Performance Capillary lectrophoresis)
- \item[LC-MS] 液相色谱-质谱联用 (Liquid chromatography-Mass Spectrum)
- \item[TIC] 总离子浓度 (Total Ion Content)
+ \item[HPLC] 高效液相色谱(High Performance Liquid Chromatography)
+ \item[HPCE] 高效毛细管电泳色谱(High Performance Capillary lectrophoresis)
+ \item[LC-MS] 液相色谱-质谱联用(Liquid chromatography-Mass Spectrum)
+ \item[TIC] 总离子浓度(Total Ion Content)
\item[\textit{ab initio}] 基于第一原理的量子化学计算方法,常称从头算法
- \item[DFT] 密度泛函理论 (Density Functional Theory)
- \item[$E_a$] 化学反应的活化能 (Activation Energy)
- \item[ZPE] 零点振动能 (Zero Vibration Energy)
- \item[PES] 势能面 (Potential Energy Surface)
- \item[TS] 过渡态 (Transition State)
- \item[TST] 过渡态理论 (Transition State Theory)
- \item[$\increment G^\neq$] 活化自由能(Activation Free Energy)
- \item[$\kappa$] 传输系数 (Transmission Coefficient)
- \item[IRC] 内禀反应坐标 (Intrinsic Reaction Coordinates)
- \item[$\nu_i$] 虚频 (Imaginary Frequency)
- \item[ONIOM] 分层算法 (Our own N-layered Integrated molecular Orbital and molecular Mechanics)
- \item[SCF] 自洽场 (Self-Consistent Field)
- \item[SCRF] 自洽反应场 (Self-Consistent Reaction Field)
+ \item[DFT] 密度泛函理论(Density Functional Theory)
+ \item[$E_a$] 化学反应的活化能(Activation Energy)
+ \item[ZPE] 零点振动能(Zero Vibration Energy)
+ \item[PES] 势能面(Potential Energy Surface)
+ \item[TS] 过渡态(Transition State)
+ \item[TST] 过渡态理论(Transition State Theory)
+ \item[$\increment G^\neq$] 活化自由能(Activation Free Energy)
+ \item[$\kappa$] 传输系数(Transmission Coefficient)
+ \item[IRC] 内禀反应坐标(Intrinsic Reaction Coordinates)
+ \item[$\nu_i$] 虚频(Imaginary Frequency)
+ \item[ONIOM] 分层算法(Our own N-layered Integrated molecular Orbital and molecular Mechanics)
+ \item[SCF] 自洽场(Self-Consistent Field)
+ \item[SCRF] 自洽反应场(Self-Consistent Reaction Field)
\end{denotation}
@@ -73,21 +73,21 @@
% \nomenclature{HMSPPT}{聚苯基对称三嗪模型化合物的质子化产物}
% \nomenclature{HMPPQ}{聚苯基喹噁啉模型化合物的质子化产物}
% \nomenclature{PDT}{热分解温度}
-% \nomenclature{HPLC}{高效液相色谱 (High Performance Liquid Chromatography)}
-% \nomenclature{HPCE}{高效毛细管电泳色谱 (High Performance Capillary lectrophoresis)}
-% \nomenclature{LC-MS}{液相色谱-质谱联用 (Liquid chromatography-Mass Spectrum)}
-% \nomenclature{TIC}{总离子浓度 (Total Ion Content)}
+% \nomenclature{HPLC}{高效液相色谱(High Performance Liquid Chromatography)}
+% \nomenclature{HPCE}{高效毛细管电泳色谱(High Performance Capillary lectrophoresis)}
+% \nomenclature{LC-MS}{液相色谱-质谱联用(Liquid chromatography-Mass Spectrum)}
+% \nomenclature{TIC}{总离子浓度(Total Ion Content)}
% \nomenclature{\textit{ab initio}}{基于第一原理的量子化学计算方法,常称从头算法}
-% \nomenclature{DFT}{密度泛函理论 (Density Functional Theory)}
-% \nomenclature{$E_a$}{化学反应的活化能 (Activation Energy)}
-% \nomenclature{ZPE}{零点振动能 (Zero Vibration Energy)}
-% \nomenclature{PES}{势能面 (Potential Energy Surface)}
-% \nomenclature{TS}{过渡态 (Transition State)}
-% \nomenclature{TST}{过渡态理论 (Transition State Theory)}
-% \nomenclature{$\increment G^\neq$}{活化自由能(Activation Free Energy)}
-% \nomenclature{$\kappa$}{传输系数 (Transmission Coefficient)}
-% \nomenclature{IRC}{内禀反应坐标 (Intrinsic Reaction Coordinates)}
-% \nomenclature{$\nu_i$}{虚频 (Imaginary Frequency)}
-% \nomenclature{ONIOM}{分层算法 (Our own N-layered Integrated molecular Orbital and molecular Mechanics)}
-% \nomenclature{SCF}{自洽场 (Self-Consistent Field)}
-% \nomenclature{SCRF}{自洽反应场 (Self-Consistent Reaction Field)}
+% \nomenclature{DFT}{密度泛函理论(Density Functional Theory)}
+% \nomenclature{$E_a$}{化学反应的活化能(Activation Energy)}
+% \nomenclature{ZPE}{零点振动能(Zero Vibration Energy)}
+% \nomenclature{PES}{势能面(Potential Energy Surface)}
+% \nomenclature{TS}{过渡态(Transition State)}
+% \nomenclature{TST}{过渡态理论(Transition State Theory)}
+% \nomenclature{$\increment G^\neq$}{活化自由能(Activation Free Energy)}
+% \nomenclature{$\kappa$}{传输系数(Transmission Coefficient)}
+% \nomenclature{IRC}{内禀反应坐标(Intrinsic Reaction Coordinates)}
+% \nomenclature{$\nu_i$}{虚频(Imaginary Frequency)}
+% \nomenclature{ONIOM}{分层算法(Our own N-layered Integrated molecular Orbital and molecular Mechanics)}
+% \nomenclature{SCF}{自洽场(Self-Consistent Field)}
+% \nomenclature{SCRF}{自洽反应场(Self-Consistent Reaction Field)}
diff --git a/Master/texmf-dist/doc/latex/thuthesis/data/resolution.tex b/Master/texmf-dist/doc/latex/thuthesis/data/resolution.tex
index 81091ea9a3d..49667e9abee 100644
--- a/Master/texmf-dist/doc/latex/thuthesis/data/resolution.tex
+++ b/Master/texmf-dist/doc/latex/thuthesis/data/resolution.tex
@@ -1,17 +1,19 @@
% !TeX root = ../thuthesis-example.tex
-\chapter{答辩委员会决议书}
+\begin{resolution}
-论文提出了……
+ 论文提出了……
-论文取得的主要创新性成果包括:
+ 论文取得的主要创新性成果包括:
-1. ……
+ 1. ……
-2. ……
+ 2. ……
-3. ……
+ 3. ……
-论文工作表明作者在×××××具有×××××知识,具有××××能力,论文××××,答辩××××。
+ 论文工作表明作者在×××××具有×××××知识,具有××××能力,论文××××,答辩××××。
-答辩委员会表决,(×票/一致)同意通过论文答辩,并建议授予×××(姓名)×××(门类)学博士/硕士学位。
+ 答辩委员会表决,(×票/一致)同意通过论文答辩,并建议授予×××(姓名)×××(门类)学博士/硕士学位。
+
+\end{resolution}
diff --git a/Master/texmf-dist/doc/latex/thuthesis/ref/refs.bib b/Master/texmf-dist/doc/latex/thuthesis/ref/refs.bib
index ff2b667a716..4ca6bccded1 100644
--- a/Master/texmf-dist/doc/latex/thuthesis/ref/refs.bib
+++ b/Master/texmf-dist/doc/latex/thuthesis/ref/refs.bib
@@ -194,6 +194,7 @@
address = {北京},
publisher = {中国标准出版社},
year = {2002},
+ pages = {1},
key = {quan2 guo2 xin4 xi1},
}
diff --git a/Master/texmf-dist/doc/latex/thuthesis/spine.pdf b/Master/texmf-dist/doc/latex/thuthesis/spine.pdf
index 8f0f80226e8..0786194e739 100644
--- a/Master/texmf-dist/doc/latex/thuthesis/spine.pdf
+++ b/Master/texmf-dist/doc/latex/thuthesis/spine.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/thuthesis/thusetup.tex b/Master/texmf-dist/doc/latex/thuthesis/thusetup.tex
index 26254e2325a..894762e1785 100644
--- a/Master/texmf-dist/doc/latex/thuthesis/thusetup.tex
+++ b/Master/texmf-dist/doc/latex/thuthesis/thusetup.tex
@@ -77,8 +77,8 @@
%
% 联合指导教师
%
- % joint-supervisor = {某某某, 教授},
- % joint-supervisor* = {Professor Mou Moumou},
+ % co-supervisor = {某某某, 教授},
+ % co-supervisor* = {Professor Mou Moumou},
%
% 日期
% 使用 ISO 格式;默认为当前时间
@@ -107,6 +107,18 @@
% 载入所需的宏包
+% 定理类环境宏包
+\usepackage{amsthm}
+% 也可以使用 ntheorem
+% \usepackage[amsmath,thmmarks,hyperref]{ntheorem}
+
+\thusetup{
+ %
+ % 数学字体
+ % math-style = GB,
+ math-font = xits,
+}
+
% 可以使用 nomencl 生成符号和缩略语说明
% \usepackage{nomencl}
% \makenomenclature
@@ -117,20 +129,15 @@
% 表格中支持跨行
\usepackage{multirow}
-% 固定宽度的表格。放在 hyperref 之前的话,tabularx 里的 footnote 显示不出来。
+% 固定宽度的表格。
% \usepackage{tabularx}
% 跨页表格
-% \usepackage{longtable}
+\usepackage{longtable}
% 量和单位
\usepackage{siunitx}
-% 定理类环境宏包
-\usepackage{amsthm}
-% 也可以使用 ntheorem
-% \usepackage[amsmath,thmmarks,hyperref]{ntheorem}
-
% 参考文献使用 BibTeX + natbib 宏包
% 顺序编码制
\usepackage[sort]{natbib}
@@ -156,7 +163,16 @@
\graphicspath{{figures/}}
% 数学命令
-\newcommand\dif{\mathop{}\!\mathrm{d}} % 微分符号
+\makeatletter
+\newcommand\dif{% % 微分符号
+ \mathop{}\!%
+ \ifthu@math@style@TeX
+ d%
+ \else
+ \mathrm{d}%
+ \fi
+}
+\makeatother
% hyperref 宏包在最后调用
\usepackage{hyperref}
diff --git a/Master/texmf-dist/doc/latex/thuthesis/thuthesis-example.pdf b/Master/texmf-dist/doc/latex/thuthesis/thuthesis-example.pdf
index 92704a73fc4..46923bf2c17 100644
--- a/Master/texmf-dist/doc/latex/thuthesis/thuthesis-example.pdf
+++ b/Master/texmf-dist/doc/latex/thuthesis/thuthesis-example.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/thuthesis/thuthesis-example.tex b/Master/texmf-dist/doc/latex/thuthesis/thuthesis-example.tex
index 4f71d6db490..1520898b4c6 100644
--- a/Master/texmf-dist/doc/latex/thuthesis/thuthesis-example.tex
+++ b/Master/texmf-dist/doc/latex/thuthesis/thuthesis-example.tex
@@ -7,6 +7,11 @@
% doctor | master | bachelor | postdoc
% 学位类型 degree-type:
% academic(默认)| professional
+ % 语言 language
+ % chinese(默认)| english
+ % 字体库 fontset
+ % windows | mac | fandol | ubuntu
+ % 研究生院建议终版使用 Windows 平台的字体编译
% 论文基本配置,加载宏包等全局配置
@@ -33,6 +38,7 @@
\tableofcontents
% 插图和附表清单
+% 本科生的插图索引和表格索引需要移至正文之后、参考文献前
\listoffiguresandtables % 插图和附表清单
% \listoffigures % 插图清单
% \listoftables % 附表清单
@@ -58,9 +64,9 @@
% 附录
\appendix
-\input{data/appendix}
% \input{data/appendix-survey} % 本科生:外文资料的调研阅读报告
% \input{data/appendix-translation} % 本科生:外文资料的书面翻译
+\input{data/appendix}
% 致谢
\input{data/acknowledgements}
diff --git a/Master/texmf-dist/doc/latex/thuthesis/thuthesis.pdf b/Master/texmf-dist/doc/latex/thuthesis/thuthesis.pdf
index 40ebbc9fe04..c32a334de23 100644
--- a/Master/texmf-dist/doc/latex/thuthesis/thuthesis.pdf
+++ b/Master/texmf-dist/doc/latex/thuthesis/thuthesis.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx b/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx
index 84c320323cf..b98322fd500 100644
--- a/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx
+++ b/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx
@@ -1,23 +1,20 @@
% \iffalse meta-comment
%
-% Copyright (C) 2005-2020 by Tsinghua University TUNA Association <tuna@tsinghua.edu.cn>
-%
+% Copyright (C) 2005-2021 by Tsinghua University TUNA Association <tuna@tsinghua.edu.cn>
%
% This work may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3
+% conditions of the LaTeX Project Public License, either version 1.3c
% of this license or (at your option) any later version.
% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3 or later is part of all distributions of LaTeX
-% version 2005/12/01 or later.
-%
-% This work has the LPPL maintenance status `maintained'.
+% https://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2008 or later.
%
% \fi
%
% \iffalse
%<*driver>
-\ProvidesFile{thuthesis.dtx}[2020/10/14 7.1.0 Tsinghua University Thesis Template]
+\ProvidesFile{thuthesis.dtx}[2021/03/12 7.2.0 Tsinghua University Thesis Template]
\documentclass{ltxdoc}
\usepackage{dtx-style}
@@ -75,13 +72,17 @@
% \item 本模板的发布遵守 \href{https://www.latex-project.org/lppl/lppl-1-3c.txt}{\LaTeX{} Project Public License (1.3.c)},使用前请认真阅读协议内
% 容。
% \item 本模板为作者根据
-% 清华大学研究生院颁发的
-% \href{http://yjsy.cic.tsinghua.edu.cn/docinfo/board/boarddetail.jsp?columnId=001050603&parentColumnId=0010506&itemSeq=5365}{%
-% 《研究生学位论文写作指南》}(仅限校内网络访问)、
-% 清华大学教务处颁发的《综合论文训练写作指南》和
-% 清华大学
+% 清华大学研究生院颁发的《
+% \href{http://yjsy.cic.tsinghua.edu.cn/docinfo/board/boarddetail.jsp?columnId=001050603&parentColumnId=0010506&itemSeq=5365}{%
+% 研究生学位论文写作指南}》(限校内网络访问)、
+% 英文版《Guide to Thesis Writing for Graduate Students》、
+% 清华大学教务处颁发的《
+% \href{https://lib.tsinghua.edu.cn/dra/news/annoucement/7963}{%
+% 综合论文训练写作指南}》、
+% 外文系的《英语专业本科生综合论文训练》和
+% 清华大学《
% \href{http://postdoctor.tsinghua.edu.cn/info/czxz/1283}{%
-% 《编写“清华大学博士后研究报告”参考意见》}
+% 编写“清华大学博士后研究报告”参考意见}》
% 编写而成,旨在供清华大学毕业生撰写学位论文使用。
% \item 任何个人或组织以本模板为基础进行修改、扩展而生成的新的专用模板,请严格遵
% 守 \LaTeX{} Project Public License 协议。由于违犯协议而引起的任何纠纷争端均与
@@ -100,8 +101,8 @@
% \clearpage
%
% \section{模板介绍}
-% \thuthesis{} (\textbf{T}sing\textbf{h}ua \textbf{U}niversity \LaTeX{}
-% \textbf{Thesis} Template) 是为了帮助清华大学毕业生撰写毕业论文而编写
+% \thuthesis{}(\textbf{T}sing\textbf{h}ua \textbf{U}niversity \LaTeX{}
+% \textbf{Thesis} Template)是为了帮助清华大学毕业生撰写毕业论文而编写
% 的 \LaTeX{} 论文模板。
%
% 本文档将尽量完整的介绍模板的使用方法,如有不清楚之处,或者想提出改进建议,
@@ -318,47 +319,41 @@
% \documentclass[degree=master, degree-type=professional]{thuthesis}
% \end{latex}
%
-% \subsection{字体配置}
+% \subsubsection{字体配置}
% \label{sec:font-config}
-% 模板默认可以自动检测操作系统,并配置改平台上合适的字体,
-% 具体的配置策略如表~\ref{tab:font}。
+% \DescribeOption{fontset}
+% 模板默认会自动根据操作系统配置合适的字体,
+% 用户也可以通过 \option{fontset} 时指定使用预设的字库,如:
+% \begin{latex}
+% \documentclass[fontset=windows]{thuthesis}
+% \end{latex}
+% 允许的选项有 \option{windows}、\option{mac}、\option{ubuntu} 和 \option{fandol},
+% 具体使用的字体见表~\ref{tab:fontset}。
+% 用户也可以设置为 \option{none} 并自行配置字体。
+%
% \begin{table}[htb]
% \centering
-% \caption{\thuthesis{} 自动配置字体策略}
-% \label{tab:font}
-% \begin{tabular}{ccc}
+% \caption{\thuthesis{} 预设的字体}
+% \label{tab:fontset}
+% \begin{tabular}{cccc}
% \toprule
-% Windows & macOS & 其他 \\
+% \option{windows} & \option{mac} & \option{ubuntu} & \option{fandol} \\
% \midrule
-% Times New Roman & Times New Roman & TeX Gyre Termes \\
-% Arial & Arial & TeX Gyre Heros \\
-% Courier & Menlo & TeX Gyre Cursor \\
-% 中易宋体 & 华文宋体 & Fandol 宋体 \\
-% 中易黑体 & 华文黑体 & Fandol 黑体 \\
+% Times New Roman & Times New Roman & TeX Gyre Termes & TeX Gyre Termes \\
+% Arial & Arial & TeX Gyre Heros & TeX Gyre Heros \\
+% Courier & Menlo & TeX Gyre Cursor & TeX Gyre Cursor \\
+% 中易宋体 & 华文宋体 & 思源宋体 & Fandol 宋体 \\
+% 中易黑体 & 华文黑体 & 思源黑体 & Fandol 黑体 \\
% \bottomrule
% \end{tabular}
% \end{table}
%
-% 然而自动配置的字体只能保证编译通过,但是还存在一些问题:
-% \begin{enumerate}
-% \item 在其他平台上配置的 TeX Gyre 系列字体,虽然在风格上比较接近 Times 和 Arial,
-% 但是毕竟跟《写作指南》要求的字体不完全一致;
-% \item Fandol 字库的字形较少,常常出现缺字的情况;
-% \item 华文字库和 Fandol 字库虽然不违反《写作指南》的要求,
-% 但是其字形跟中易字库有所差别,这导致封面、标题的视觉效果与学校的 Word 示例不一致,
-% 可能被审查老师认为格式不符合要求。
-% \end{enumerate}
+% 需要注意,研究生院建议中文字体同 Word 模板一致。
+% 也就是说,用户在提交终版前应使用 Windows 平台的字体进行编译。
%
-% 所以建议在提交最终版前使用 Windows 平台的字体进行编译。
+% 关于字体的配置,
+% 详见 \pkg{fontspec}、\pkg{xeCJK}、\pkg{ctex} 等宏包的使用说明和代码。
%
-% 用户也可以在调用 \thuthesis{} 时手动指定使用的字库,如:
-%
-% \begin{latex}
-% \documentclass[fontset=windows]{thuthesis}
-% \end{latex}
-%
-% 允许的选项有 \option{windows}、\option{mac}、\option{fandol},详
-% 见 \pkg{ctex}、\pkg{xeCJK}、\pkg{fontspec} 等宏包的使用说明。
%
% \subsection{论文设置}
% 论文的设置可以通过统一命令 \cs{thusetup} 设置 \emph{key=value} 形式完成。
@@ -412,11 +407,27 @@
% 论文的一些部分(如英文摘要、本科生的外文调研报告)要求使用特定的语言,
% 模板已经进行配置,并在这些部分结束后自动恢复为主要语言。
%
-% 注意,本科生《写作指南》要求“本科生(含国外来华留学本科生)非外语专业论文统一要求
+% 注意,本科生《写作指南》要求“本科生(含国外来华留学本科生)非外语专业论文统一要求
% 用中文书写。”研究生《写作指南》要求“外国人来华留学生可以用英文撰写学位论文,但
% 须采用中文封面”,“除留学生外,学位论文一律须用汉语书写”,用户须提前与导师和院系
% 的审查教师协商使用何种语言书写论文。
%
+% \subsubsection{开题报告}
+% \DescribeOption{thesis-type}
+% 模板还支持博士生论文开题报告的格式,可以通过设置 \option{thesis-type=proposal} 得到。
+%
+% 开题报告与学位论文有两点不同:
+% \begin{enumerate}
+% \item 封面的信息和格式有区别,尤其是增加了一行“学号”信息,需要通过 \option{student-id} 填写;
+% \item 开题报告不含英文标题页。
+% \end{enumerate}
+% \begin{latex}
+% \thusetup{
+% thesis-type = proposal,
+% student-id = {2000310000},
+% }
+% \end{latex}
+%
% \subsection{封面信息}
% \label{sec:titlepage}
% 封面信息可以通过统一设置命令 \cs{thusetup} 设置 \emph{key=value} 形式完成;
@@ -433,27 +444,31 @@
%
% \subsubsection{申请学位名称}
% \label{sec:degree-name}
-% 学位的设置要复杂一些:
-%
-% \begin{longtable}{p{2cm}p{6cm}p{6cm}}
-% \toprule
-% 学位类型 & degree-name & degree-name* \\
-% \midrule
-% 学术型博士 & 需注明所属的学科门类,例如:
-% 哲学、经济学、法学、教育学、文学、历史学、理学、工学、农学、医学、
-% 军事学、管理学、艺术学
-% & Doctor of Philosophy \\
-% \midrule
-% 学术型硕士 & 同上
-% & 哲学、文学、历史学、法学、教育学、艺术学门类,公共管理学科
-% 填写“Master of Arts“,其它填写“Master of Science” \\
-% \midrule
-% 专业型研究生学位 & 专业学位的名称,例如:教育博士、工程硕士
-% & 专业学位的名称,例如:Doctor of Education, Master of Engineering \\
-% \midrule
-% 本科生 & - & - \\
-% \bottomrule
-% \end{longtable}
+% 学位名称的设置比较复杂,见表~\ref{tab:degree-name}。
+%
+% \begin{table}[h]
+% \caption{学位名称的要求}
+% \label{tab:degree-name}
+% \begin{tabular}{p{2cm}p{6cm}p{6cm}}
+% \toprule
+% 学位类型 & degree-name & degree-name* \\
+% \midrule
+% 学术型博士 & 需注明所属的学科门类,例如:
+% 哲学、经济学、法学、教育学、文学、历史学、理学、工学、农学、医学、
+% 军事学、管理学、艺术学
+% & Doctor of Philosophy \\
+% \midrule
+% 学术型硕士 & 同上
+% & 哲学、文学、历史学、法学、教育学、艺术学门类,公共管理学科
+% 填写“Master of Arts“,其它填写“Master of Science” \\
+% \midrule
+% 专业型研究生学位 & 专业学位的名称,例如:教育博士、工程硕士
+% & 专业学位的名称,例如:Doctor of Education, Master of Engineering \\
+% \midrule
+% 本科生 & - & - \\
+% \bottomrule
+% \end{tabular}
+% \end{table}
%
% \begin{latex}
% \thusetup{
@@ -495,13 +510,21 @@
% }
% \end{latex}
%
+% \subsubsection{学号}
+% 学号,仅用于博士生论文开题报告。
+% \begin{latex}
+% \thusetup{
+% student-id = {20000310000},
+% }
+% \end{latex}
+%
% \subsubsection{导师}
% \myentry{导师}
% 导师的姓名与职称之间以“,”(西文逗号,U+002C)隔开,下同。
% \begin{latex}
% \thusetup{
% supervisor = {导师姓名, 教授},
-% supervisor* = {Supervisor Name, Professor},
+% supervisor* = {Professor Supervisor Name},
% }
% \end{latex}
%
@@ -510,7 +533,7 @@
% \begin{latex}
% \thusetup{
% associate-supervisor = {副导师姓名, 副教授},
-% associate-supervisor* = {Assoc-Supervisor Name, Professor},
+% associate-supervisor* = {Professor Assoc-Supervisor Name},
% }
% \end{latex}
%
@@ -518,8 +541,8 @@
% 硕士生、本科生联合指导教师,博士生联合导师。
% \begin{latex}
% \thusetup{
-% joint-supervisor = {联合导师姓名, 教授},
-% joint-supervisor* = {Join-Supervisor Name, Professor},
+% co-supervisor = {联合导师姓名, 教授},
+% co-supervisor* = {Professor Join-Supervisor Name},
% }
% \end{latex}
%
@@ -727,35 +750,118 @@
% 见 \pkg{nomencl} 宏包的文档。
%
% \subsection{正文部分}
+% \subsubsection{图表编号}
+% \DescribeOption{figure-number-separator}
+% \DescribeOption{table-number-separator}
+% \DescribeOption{equation-number-separator}
+% 研究生要求图表和公式的编号使用“.”或“-”连接,模板默认使用句点“.”。
+% 用户也可以通过 \option{figure-number-separator}、\option{table-number-separator}
+% 等选项分别设置:
+% \begin{latex}
+% \thusetup{
+% figure-number-separator = {-},
+% table-number-separator = {-},
+% equation-number-separator = {-},
+% }
+% \end{latex}
+% \DescribeOption{number-separator}
+% 也可以使用 \option{number-separator} 同时设置图、表、公式三项的编号连接符,
+% 比如 |\thusetup{number-separator = -}|。
+%
+% 本科生要求“附录中图、表、公式的编号,应与正文中的编号区分开”,
+% 应理解为将章号改变为附录对应的大写字母编号,连接符不宜改变。
%
% \subsubsection{数学符号}
% \label{sec:math}
-% 数学符号应遵循 GB/T 3102.11—1993《物理科学和技术中使用的数学符号》
-% 模板中使用 \pkg{unicode-math} 宏包来配置数学符号,
-% 与 \LaTeX{} 默认的英美国家的符号习惯有所差异:
+% 中文论文的数学符号默认遵循 GB/T 3102.11—1993《物理科学和技术中使用的数学符号》。
+% 该标准参照采纳 ISO 31-11:1992,
+% 但是与 \TeX{} 默认的美国数学学会(AMS)的习惯有许多差异。
+% 这将在下文详细论述。
+%
+% \DescribeOption{math-style}
+% 用户可以通过设置 \option{math-style} 选择数学符号样式(可选:
+% \option{GB}(中文默认),\option{TeX}(英文默认)和 \option{ISO}),比如:
+% \begin{latex}
+% \thusetup{
+% math-style = ISO,
+% }
+% \end{latex}
+%
+% 用户也可以逐项修改数学样式。
% \newcommand\dif{\mathop{}\!\mathrm{d}}
% \begin{enumerate}
-% \item 大写希腊字母默认为斜体,如 \cs{Delta}:$\Delta$。
-% \item 有限增量符号 $\increment$(U+2206)应使用 \pkg{unicode-math} 宏包提供的
-% \cs{increment} 命令。
-% \item 向量、矩阵和张量要求粗斜体,应使用 \cs{symbf} 命令,
-% 如 \verb|\symbf{A}|、\verb|\symbf{\alpha}|。
-% \item 数学常数和特殊函数要求用正体,应使用 \cs{symup} 命令,
-% 如 $\symup{\pi} = 3.14\dots$; $\symup{e} = 2.718\dots$,
-% \item 微分号和积分号使用使用正体,比如 $\int f(x) \dif x$。
+% \item \DescribeOption{uppercase-greek}
+% 大写希腊字母的正/斜体,可选:\option{italic}、\option{upright}。
+% 有限增量符号 $\increment x$ 固定使用正体,推荐使用 \cs{increment} 表示。
+% \item \DescribeOption{less-than-or-equal}
+% 小于等于号和大于等于号的字形,可选:\option{slanted}、\option{horizontal}。
+% 这将控制 \cs{le}、\cs{ge}、\cs{leq} 和 \cs{geq} 的符号
+% 是“$\leqslant$、$\geqslant$”还是“$\leq$、$\geq$”。
+% \item \DescribeOption{integral}
+% 积分号的正/斜体,可选:\option{upright}、\option{slanted}。
+% 该选项需要字体的支持,目前仅限 \option{xits}、\option{stix}、
+% \option{libertinus} 和 \option{newcm}。参考下文关于数学字体的选择。
+% \item \DescribeOption{integral-limits}
+% 积分号上下限的位置,可选:\option{true}(在上下)、\option{false}(在右侧)。
+% 这个设置只影响行间公式,行内公式统一居右侧,不受影响。
+% \item \DescribeOption{partial}
+% 偏微分符号的正/斜体,可选:\option{upright}、\option{slanted}。
+% \item \DescribeOption{math-ellipsis}
+% 省略号 \cs{dots} 的样式,可选:\option{centered}(按照中文的习惯固定居中)、
+% \option{lower} 和 \option{AMS}(取决于前后符号的位置)。
+% 其他的省略号命令如 \cs{lots}、\cs{cdots} 则不受影响。
+% \end{enumerate}
+%
+% 如果数学符号选择国标样式 |math-style = GB|,相当于设置了
+% \begin{latex}
+% \thusetup{
+% uppercase-greek = italic,
+% less-than-or-equal = slanted,
+% integral = upright,
+% integral-limits = true,
+% partial = upright,
+% math-ellipsis = centered,
+% }
+% \end{latex}
+%
+% 另外,国标的数学样式与 AMS 还有一些差异无法统一设置,需要用户在写作时进行处理。
+% \begin{enumerate}
+% \item 数学常数和特殊函数名用正体,如 $\uppi = 3.14\dots$;$\symup{i}^2 = -1$;
+% $\symup{e} = \lim_{n \to \infty} \left( 1 + \frac{1}{n} \right)^n$。
+% \item 微分号使用正体,比如 $\dif y / \dif x$。
+% \item 向量、矩阵和张量用粗斜体(\cs{symbf}),如 $\symbf{x}$、$\symbf{\Sigma}$、$\symbfsf{T}$。
% \end{enumerate}
%
-% 关于数学符号更多的用法,参考
+% 需要注意,上述关于数学符号风格的设置在设置数学字体(\option{math-font})时才会生效。
+%
+% \DescribeOption{math-font}
+% 模板使用默认使用 XITS Math 作为数学字体。
+% 用户也可以使用 \option{math-font} 选项切换其他数学字体,可选:
+% \option{stix}(STIX Two Math)、
+% \option{libertinus}(Libertinus Math)、
+% \option{newcm}(New Computer Modern Math)、
+% \option{lm}(Latin Modern Math)。
+%
+% 其中 \option{lm} 和 \option{newcm} 的字形比较搭配 TeX 原生的 Computer Modern 字体,
+% 但与《指南》要求的西文字体 Times New Roman 并不搭配。
+% 可能会造成正文和公式中的数字字体不一致,需要谨慎使用。
+%
+% 以上字体都是 OpenType 格式的字体,需要配合
% \href{http://mirrors.ctan.org/macros/latex/contrib/unicode-math/unicode-math.pdf}{\pkg{unicode-math}}
-% 宏包的使用说明,
-% 全部数学符号命的令参考
+% 宏包使用。
+% 全部数学符号的命令参考
% \href{http://mirrors.ctan.org/macros/latex/contrib/unicode-math/unimath-symbols.pdf}{\pkg{unimath-symbols}}。
-%
% 注意,\pkg{unicode-math} 宏包与 \pkg{amsfonts}、\pkg{amssymb}、\pkg{bm}、
% \pkg{mathrsfs}、\pkg{upgreek} 等宏包\emph{不}兼容。
% 模板作了处理,用户可以直接使用这些宏包的命令,如 \cs{bm}、\cs{mathscr}、
% \cs{uppi}。
%
+% 另外,模板还为 `math-font` 提供了传统的 Type 1 字体 \option{newtx}。
+% 该选项会调用 \pkg{newtxmath} 宏包。
+% 但是,如果西文字体已经使用了 OpenType 的 Times New Roman,
+% 混用 Type 1 字体可能会导致问题,尤其是使用 \pkg{siunitx} 宏包时。
+% 该选项还处于测试阶段,需要谨慎使用。
+%
% \subsubsection{定理环境}
% \label{sec:theorem}
% \thuthesis{} 定义了常用的数学环境:
@@ -958,22 +1064,26 @@
%
% \subsubsection{声明}
% \DescribeMacro{\statement}
-% 如果使用声明扫描页,将可选参数指定为扫描后的 PDF 文件名,例如:
+% 直接使用 \cs{statement} 命令可以编译生成声明页。
+% 如果要插入扫描后的声明页,将可选参数指定为扫描后的 PDF 文件名,例如:
%
% \begin{latex}
% \statement[file=scan-statement.pdf]
% \end{latex}
%
-% 由于打印版和电子版有空白页的差别,声明的页码可能不同。
-% 所以编译声明页时默认不加页眉和页脚(\texttt{page-style=empty}),
-% 在签字后插入扫描页时再补上页眉和页脚,防止页码冲突。
+% 由于本科生打印版和电子版有空白页的差别,声明的页码可能不同。
+% 所以编译声明页时默认不加页脚(\texttt{page-style=empty}),
+% 在签字后插入扫描页时再补上页脚,防止页码冲突。
%
% 如果需要编译时也加页码(如直接对电子版进行签名而不是插入扫描页),
% 可以使用在 \cs{statement} 命令设置
% \begin{latex}
% \statement[page-style=plain]
% \end{latex}
-% 注意,插入扫描页总是会加页码,不受该选项控制。
+% 注意,本科生插入扫描页时总是会加页码,不受该选项控制。
+%
+% 研究生不存在空白页的问题,所以在编译声明页时总是会加上页眉和页脚,
+% 而在插入扫描页时则不再添加,不受 \option{page-style} 的控制。
%
% \subsubsection{附录}
%
@@ -1133,7 +1243,7 @@
% \begin{macrocode}
%<cls>\NeedsTeXFormat{LaTeX2e}[2017/04/15]
%<cls>\ProvidesClass{thuthesis}
-%<cls>[2020/10/14 7.1.0 Tsinghua University Thesis Template]
+%<cls>[2021/03/12 7.2.0 Tsinghua University Thesis Template]
% \end{macrocode}
%
% 报错
@@ -1189,7 +1299,7 @@
%<*cls>
\hyphenation{Thu-Thesis}
\def\thuthesis{ThuThesis}
-\def\version{7.1.0}
+\def\version{7.2.0}
\RequirePackage{kvdefinekeys}
\RequirePackage{kvsetkeys}
\RequirePackage{kvoptions}
@@ -1202,8 +1312,12 @@
% \begin{macro}{\thusetup}
% 提供一个 \cs{thusetup} 命令支持 \emph{key-value} 的方式来设置。
% \begin{macrocode}
+\let\thu@setup@hook\@empty
\newcommand\thusetup[1]{%
+ \let\thu@setup@hook\@empty
\kvsetkeys{thu}{#1}%
+ \thu@setup@hook
+ \thu@setup@hook
}
% \end{macrocode}
% \end{macro}
@@ -1331,6 +1445,14 @@
%
% \begin{macrocode}
\thu@define@key{
+ thesis-type = {
+ name = thesis@type,
+ choices = {
+ thesis,
+ proposal,
+ },
+ default = thesis,
+ },
degree = {
choices = {
bachelor,
@@ -1372,33 +1494,37 @@
%
% 字体
% \begin{macrocode}
+ system = {
+ choices = {
+ auto,
+ mac,
+ unix,
+ windows,
+ },
+ default = auto,
+ },
fontset = {
choices = {
+ auto,
windows,
mac,
ubuntu,
fandol,
none,
},
- default = none,
- },
- system = {
- choices = {
- mac,
- unix,
- windows,
- auto,
- },
default = auto,
},
font = {
choices = {
+ auto,
times,
termes,
+ stix,
xits,
libertinus,
+ newcm,
lm,
- auto,
+ newtx,
none,
},
default = auto,
@@ -1406,11 +1532,11 @@
cjk-font = {
name = cjk@font,
choices = {
+ auto,
windows,
mac,
noto,
fandol,
- auto,
none,
},
default = auto,
@@ -1418,13 +1544,65 @@
math-font = {
name = math@font,
choices = {
+ auto,
xits,
stix,
libertinus,
+ newcm,
lm,
+ newtx,
none,
},
- default = xits,
+ default = auto,
+ },
+ math-style = {
+ name = math@style,
+ choices = {
+ GB,
+ ISO,
+ TeX,
+ },
+ },
+ uppercase-greek = {
+ name = uppercase@greek,
+ choices = {
+ italic,
+ upright,
+ },
+ },
+ less-than-or-equal = {
+ name = leq,
+ choices = {
+ slanted,
+ horizontal,
+ },
+ },
+ integral = {
+ choices = {
+ upright,
+ slanted,
+ },
+ },
+ integral-limits = {
+ name = integral@limits,
+ choices = {
+ true,
+ false,
+ },
+ },
+ partial = {
+ choices = {
+ upright,
+ italic,
+ },
+ },
+ math-ellipsis = {
+ name = math@ellipsis,
+ choices = {
+ centered,
+ lower,
+ AMS,
+ },
},
% \end{macrocode}
%
@@ -1484,9 +1662,13 @@
\fi
% \end{macrocode}
%
+% \pkg{unicode-math} 和 \pkg{newtx} 都不需要 \pkg{fontspec} 设置数学字体。
+% \begin{macrocode}
+\PassOptionsToPackage{no-math}{fontspec}
+% \end{macrocode}
+%
% 使用 \pkg{ctexbook} 类,优于调用 \pkg{ctex} 宏包。
% \begin{macrocode}
-\PassOptionsToPackage{quiet}{fontspec}
\LoadClass[a4paper,UTF8,zihao=-4,scheme=plain,fontset=none]{ctexbook}[2017/04/01]
% \end{macrocode}
%
@@ -1524,11 +1706,6 @@
\RequirePackage{amsmath}
% \end{macrocode}
%
-% 使用 \pkg{unicode-math} 处理数学字体。
-% \begin{macrocode}
-\RequirePackage{unicode-math}
-% \end{macrocode}
-%
% 图形支持宏包。
% \begin{macrocode}
\RequirePackage{graphicx}
@@ -1602,11 +1779,23 @@
%
% 对冲突的宏包报错。
% \begin{macrocode}
-\newcommand\thu@package@conflict[2]{
- \AtBeginOfPackageFile*{#2}{
- \thu@error{The "#2" package is incompatible with required "#1"}
+\newcommand\thu@package@conflict[2]{%
+ \AtEndOfPackageFile*{#1}{%
+ \AtBeginOfPackageFile*{#2}{%
+ \thu@error{The "#2" package is incompatible with "#1"}%
+ }%
+ }%
}
-}
+\thu@package@conflict{biblatex}{bibunits}
+\thu@package@conflict{biblatex}{chapterbib}
+\thu@package@conflict{biblatex}{cite}
+\thu@package@conflict{biblatex}{multibib}
+\thu@package@conflict{biblatex}{natbib}
+
+\thu@package@conflict{bibunits}{biblatex}
+\thu@package@conflict{bibunits}{chapterbib}
+\thu@package@conflict{bibunits}{multibib}
+
\thu@package@conflict{unicode-math}{amscd}
\thu@package@conflict{unicode-math}{amsfonts}
\thu@package@conflict{unicode-math}{amssymb}
@@ -1615,9 +1804,18 @@
\thu@package@conflict{unicode-math}{eucal}
\thu@package@conflict{unicode-math}{eufrak}
\thu@package@conflict{unicode-math}{mathrsfs}
+\thu@package@conflict{unicode-math}{newtxmath}
+\thu@package@conflict{unicode-math}{upgreek}
+
+\thu@package@conflict{natbib}{biblatex}
+\thu@package@conflict{natbib}{cite}
+
+\thu@package@conflict{newtxmath}{amsfonts}
+\thu@package@conflict{newtxmath}{amssymb}
+\thu@package@conflict{newtxmath}{unicode-math}
+\thu@package@conflict{newtxmath}{upgreek}
% \end{macrocode}
%
-%
% \subsection{页面设置}
% \label{sec:layout}
%
@@ -1671,96 +1869,200 @@
\thu@option@hook{output}{\thu@set@geometry}
% \end{macrocode}
%
-% \subsection{主文档格式}
-% \label{sec:mainbody}
%
-% \subsubsection{Three matters}
-% \begin{macro}{\cleardoublepage}
-% 对于 \textsl{openright} 选项,必须保证章首页右开,且如果前章末页无内容须
-% 清空其页眉页脚。
+% \subsection{语言设置}
+%
+% 定义 \cs{thu@main@language},当在导言区修改 \option{language} 时,
+% 保存为论文的主要语言;
+% \cs{thu@reset@main@language} 则用于正文中恢复为主要语言。
% \begin{macrocode}
-\def\cleardoublepage{%
- \clearpage
- \if@twoside
- \ifthu@output@print
- \ifodd\c@page
+\thusetup{main-language=\thu@language}%
+\let\thu@main@language\thu@language
+\thu@option@hook{language}{%
+ \ifx\@begindocumenthook\@undefined\else
+ \thusetup{main-language=\thu@language}%
+ \let\thu@main@language\thu@language
+ \fi
+}
+\newcommand\thu@reset@main@language{%
+ \thusetup{language = \thu@main@language}%
+ \let\thu@language\thu@main@language
+}
+% \end{macrocode}
+%
+% 根据语言设置各章节的名称,只有在导言区设置 \option{degree} 和
+% \option{language} 时会修改,而在正文局部切换语言时则不变。
+% \begin{macrocode}
+\newcommand\thu@set@chapter@names{%
+ \ifthu@main@language@chinese
+ \def\thu@comments@name{指导教师学术评语}%
+ \def\bibname{参考文献}%
+ \def\appendixname{附录}%
+ \def\indexname{索引}%
+ \def\thu@resolution@name{答辩委员会决议书}%
+ \ifthu@degree@bachelor
+ \def\contentsname{目\qquad 录}%
+ \def\listfigurename{插图索引}%
+ \def\listtablename{表格索引}%
+ \def\thu@list@figure@table@name{插图和附表索引}%
+ \def\thu@list@algorithm@name{算法索引}%
+ \def\thu@acknowledgements@name{致\qquad 谢}%
+ \def\listequationname{公式索引}%
+ \def\thu@denotation@name{主要符号对照表}%
+ \def\thu@resume@name{在学期间参加课题的研究成果}%
+ \else
+ \def\listfigurename{插图清单}%
+ \def\listtablename{附表清单}%
+ \def\thu@list@figure@table@name{插图和附表清单}%
+ \def\thu@list@algorithm@name{算法清单}%
+ \def\listequationname{公式清单}%
+ \def\thu@acknowledgements@name{致\quad 谢}%
+ \ifthu@degree@graduate
+ \def\contentsname{目\quad 录}%
+ \def\thu@denotation@name{符号和缩略语说明}%
+ \def\thu@resume@name{个人简历、在学期间完成的相关学术成果}%
+ \else % degree = postdoc
+ \def\contentsname{目\qquad 次}%
+ \def\thu@denotation@name{符号表}%
+ \def\thu@resume@name{个人简历、发表的学术论文与科研成果}%
+ \fi
+ \fi
+ \else
+ \ifthu@main@language@english
+ \def\thu@comments@name{Comments from Thesis Supervisor}%
+ \def\thu@resolution@name{Resolution of Thesis Defense Committee}%
+ \def\indexname{Index}%
+ \ifthu@degree@bachelor
+ \def\contentsname{CONTENTS}%
+ \def\listfigurename{FIGURES}%
+ \def\listtablename{TABLES}%
+ \def\thu@list@figure@table@name{FIGURES AND TABLES}%
+ \def\thu@list@algorithm@name{ALGORITHMS}%
+ \def\listequationname{EQUATIONS}%
+ \def\thu@denotation@name{ABBREVIATIONS}%
+ \def\bibname{REFERENCES}%
+ \def\appendixname{APPENDIX}%
+ \def\thu@acknowledgements@name{ACKNOWLEDGEMENTS}%
+ \def\thu@resume@name{PUBLICATIONS}%
\else
- \thispagestyle{empty}%
- \hbox{}%
- \newpage
- \if@twocolumn
- \hbox{}\newpage
- \fi
+ \def\contentsname{Table of Contents}%
+ \def\listfigurename{List of Figures}%
+ \def\listtablename{List of Tables}%
+ \def\thu@list@figure@table@name{List of Figures and Tables}%
+ \def\thu@list@algorithm@name{List of Algorithms}%
+ \def\listequationname{List of Equations}%
+ \def\thu@denotation@name{List of Symbols and Acronyms}%
+ \def\bibname{References}%
+ \def\appendixname{Appendix}%
+ \def\thu@acknowledgements@name{Acknowledgements}%
+ \def\thu@resume@name{Resume}%
\fi
\fi
\fi
}
+\thu@set@chapter@names
+\thu@option@hook{degree}{\thu@set@chapter@names}
+\thu@option@hook{main-language}{\thu@set@chapter@names}
% \end{macrocode}
-% \end{macro}
%
-% \begin{macro}{\frontmatter}
-% \begin{macro}{\mainmatter}
-% \begin{macro}{\backmatter}
-% 我们的单面和双面模式与常规的不太一样。
+% 这部分名称在正文中局部地修改语言时会发生变化,比如英文摘要、
+% 本科生附录的阅读报告。
% \begin{macrocode}
-\renewcommand\frontmatter{%
- \cleardoublepage
- \@mainmatterfalse
- \pagenumbering{Roman}%
-}
-\renewcommand\mainmatter{%
- \cleardoublepage
- \@mainmattertrue
- \pagenumbering{arabic}%
-}
-\renewcommand\backmatter{%
- \if@openright
- \cleardoublepage
+\newcommand\thu@set@names{%
+ \ifthu@language@chinese
+ \ctexset{
+ figurename = 图,
+ tablename = 表,
+ }%
+ \def\thu@algorithm@name{算法}%
+ \def\thu@equation@name{公式}%
+ \def\thu@assumption@name{假设}%
+ \def\thu@definition@name{定义}%
+ \def\thu@proposition@name{命题}%
+ \def\thu@lemma@name{引理}%
+ \def\thu@theorem@name{定理}%
+ \def\thu@axiom@name{公理}%
+ \def\thu@corollary@name{推论}%
+ \def\thu@exercise@name{练习}%
+ \def\thu@example@name{例}%
+ \def\thu@remark@name{注释}%
+ \def\thu@problem@name{问题}%
+ \def\thu@conjecture@name{猜想}%
+ \def\thu@proof@name{证明}%
+ \def\thu@theorem@separator{:}%
\else
- \clearpage
+ \ifthu@language@english
+ \ctexset{
+ figurename = {Figure},
+ tablename = {Table},
+ }%
+ \def\thu@algorithm@name{Algorithm}%
+ \def\thu@equation@name{Equation}%
+ \def\thu@assumption@name{Assumption}%
+ \def\thu@definition@name{Definition}%
+ \def\thu@proposition@name{Proposition}%
+ \def\thu@lemma@name{Lemma}%
+ \def\thu@theorem@name{Theorem}%
+ \def\thu@axiom@name{Axiom}%
+ \def\thu@corollary@name{Corollary}%
+ \def\thu@exercise@name{Exercise}%
+ \def\thu@example@name{Example}%
+ \def\thu@remark@name{Remark}%
+ \def\thu@problem@name{Problem}%
+ \def\thu@conjecture@name{Conjecture}%
+ \def\thu@proof@name{Proof}%
+ \def\thu@theorem@separator{: }%
+ \fi
\fi
- \@mainmatterfalse
- \thusetup{toc-depth = 0}%
}
+\thu@set@names
+\thu@option@hook{language}{\thu@set@names}
% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
%
-% \subsubsection{字体}
-% \label{sec:font}
-% 使用 \pkg{fontspec} 配置字体。
+% 带圈数字和星号使用中文字体。
% \begin{macrocode}
-\ifthu@fontset@mac
- \thusetup{
- font = times,
- cjk-font = mac,
- }
-\else
- \ifthu@fontset@windows
- \thusetup{
- font = times,
- cjk-font = windows,
- }
+\xeCJKDeclareCharClass{CJK}{"2460 -> "2473}
+\xeCJKDeclareCharClass{CJK}{"2605}
+% \end{macrocode}
+%
+% \newcommand\unicodechar[1]{U+#1(\symbol{"#1})}
+% 由于 Unicode 的一些标点符号是中西文混用的:
+% \unicodechar{00B7}、
+% \unicodechar{2013}、
+% \unicodechar{2014}、
+% \unicodechar{2018}、
+% \unicodechar{2019}、
+% \unicodechar{201C}、
+% \unicodechar{201D}、
+% \unicodechar{2025}、
+% \unicodechar{2026}、
+% \unicodechar{2E3A},
+% 所以要根据语言设置正确的字体。
+% \footnote{\url{https://github.com/CTeX-org/ctex-kit/issues/389}}
+% 此外切换语言时,有一部分名称是需要被重新定义的。
+% \begin{macrocode}
+\newcommand\thu@set@punctuations{%
+ \ifthu@language@chinese
+ \xeCJKDeclareCharClass{FullLeft}{"2018, "201C}%
+ \xeCJKDeclareCharClass{FullRight}{
+ "00B7, "2019, "201D, "2013, "2014, "2025, "2026, "2E3A,
+ }%
\else
- \ifthu@fontset@fandol
- \thusetup{
- font = termes,
- cjk-font = fandol,
- }
- \else
- \ifthu@fontset@ubuntu
- \thusetup{
- font = termes,
- cjk-font = noto,
- }
- \fi
+ \ifthu@language@english
+ \xeCJKDeclareCharClass{HalfLeft}{"2018, "201C}%
+ \xeCJKDeclareCharClass{HalfRight}{
+ "00B7, "2019, "201D, "2013, "2014, "2025, "2026, "2E3A,
+ }%
\fi
\fi
-\fi
+}
+\thu@set@punctuations
+\thu@option@hook{language}{\thu@set@punctuations}
% \end{macrocode}
%
-% 检测系统
+% \subsection{字体}
+% \label{sec:font}
+% 检测系统。
% \begin{macrocode}
\ifthu@system@auto
\IfFileExists{/System/Library/Fonts/Menlo.ttc}{
@@ -1779,12 +2081,72 @@
\fi
% \end{macrocode}
%
-% XITS 字体于 2018-10-03 更改了字体的文件名,所以需要判断。
-% 原文件名为 \file{xits-regular.otf}、\file{xits-math.otf} 等,
-% 后改为 \file{XITS-Regular.otf}、\file{XITSMath-Regular.otf} 等。
+% 使用 \pkg{fontspec} 配置字体。
+% \begin{macrocode}
+\ifthu@fontset@auto
+ \ifthu@system@windows
+ \thusetup{fontset = windows}
+ \else
+ \IfFontExistsTF{SimSun}{
+ \thusetup{fontset = windows}
+ }{
+ \ifthu@system@mac
+ \thusetup{fontset = mac}
+ \else
+ \IfFontExistsTF{Noto Serif CJK SC}{
+ \thusetup{fontset = ubuntu}
+ }{
+ \thusetup{fontset = fandol}
+ }
+ \fi
+ }
+ \fi
+\fi
+% \end{macrocode}
+%
+% \subsubsection{西文字体}
+%
+% 《指南》要求西文字体使用 Times New Roman 和 Arial,
+% 但是在 Linux 下没有这两个字体,所以使用它们的克隆版 TeX Gyre Termes 和
+% TeX Gyre Heros。
+% \begin{macrocode}
+\ifthu@font@auto
+ \ifthu@fontset@windows
+ \thusetup{font=times}
+ \else
+ \ifthu@fontset@mac
+ \thusetup{font=times}
+ \else
+ \thusetup{font=termes}
+ \fi
+ \fi
+\fi
+% \end{macrocode}
+%
+% STIX 字体的文件名在 v2.10 2020-12-19 从
+% \file{STIXTwoText-Regular.otf}、\file{STIX2Math.otf} 分别改为
+% \file{STIXTwoText-Regular.otf}、\file{STIXTwoMath-Regular.otf}。
+% 需要进行判断。
%
-% Libertinus 字体同样。
+% XITS 字体的文件名在 v1.109 2018-09-30
+% 从 \file{xits-regular.otf}、\file{xits-math.otf} 分别改为
+% \file{XITS-Regular.otf}、\file{XITSMath-Regular.otf}。
+%
+% Libertinus 的文件名在 v6.7 2019-04-03 从小写改为驼峰式,
+% 在大小写敏感的平台上需要进行判断。
% \begin{macrocode}
+\let\thu@font@family@stix\@empty
+\newcommand\thu@set@stix@names{%
+ \ifx\thu@font@family@stix\@empty
+ \IfFontExistsTF{STIXTwoText-Regular.otf}{%
+ \gdef\thu@font@family@stix{STIXTwoText}%
+ \gdef\thu@font@name@stix@math{STIXTwoMath-Regular}%
+ }{%
+ \gdef\thu@font@family@stix{STIX2Text}%
+ \gdef\thu@font@name@stix@math{STIX2Math}%
+ }%
+ \fi
+}
\let\thu@font@family@xits\@empty
\newcommand\thu@set@xits@names{%
\ifx\thu@font@family@xits\@empty
@@ -1794,16 +2156,14 @@
\gdef\thu@font@style@xits@bf{Bold}%
\gdef\thu@font@style@xits@it{Italic}%
\gdef\thu@font@style@xits@bfit{BoldItalic}%
- \gdef\thu@font@name@xits@math@rm{XITSMath-Regular}%
- \gdef\thu@font@name@xits@math@bf{XITSMath-Bold}%
+ \gdef\thu@font@name@xits@math{XITSMath-Regular}%
}{%
\gdef\thu@font@family@xits{xits}%
\gdef\thu@font@style@xits@rm{regular}%
\gdef\thu@font@style@xits@bf{bold}%
\gdef\thu@font@style@xits@it{italic}%
\gdef\thu@font@style@xits@bfit{bolditalic}%
- \gdef\thu@font@name@xits@math@rm{xits-math}%
- \gdef\thu@font@name@xits@math@bf{xits-mathbold}%
+ \gdef\thu@font@name@xits@math{xits-math}%
}%
\fi
}
@@ -1831,18 +2191,8 @@
}
% \end{macrocode}
%
-% 《撰写手册》要求西文字体使用 Times New Roman 和 Arial,
-% 但是在 Linux 下没有这两个字体,所以使用它们的克隆版 TeX Gyre Termes 和
-% TeX Gyre Heros。
% \begin{macrocode}
-\ifthu@font@auto
- \ifthu@system@unix
- \thusetup{font=termes}
- \else
- \thusetup{font=times}
- \fi
-\fi
-\newcommand\thu@load@font@times{%
+\newcommand\thu@set@font@times{%
\setmainfont{Times New Roman}%
\setsansfont{Arial}%
\ifthu@system@mac
@@ -1851,7 +2201,7 @@
\setmonofont{Courier New}[Scale = MatchLowercase]%
\fi
}
-\newcommand\thu@load@font@termes{%
+\newcommand\thu@set@font@termes{%
\setmainfont{texgyretermes}[
Extension = .otf,
UprightFont = *-regular,
@@ -1859,9 +2209,9 @@
ItalicFont = *-italic,
BoldItalicFont = *-bolditalic,
]%
- \thu@load@texgyre@sans@mono
+ \thu@set@texgyre@sans@mono
}
-\newcommand\thu@load@texgyre@sans@mono{%
+\newcommand\thu@set@texgyre@sans@mono{%
\setsansfont{texgyreheros}[
Extension = .otf,
UprightFont = *-regular,
@@ -1878,7 +2228,18 @@
Ligatures = CommonOff,
]%
}
-\newcommand\thu@load@font@xits{%
+\newcommand\thu@set@font@stix{%
+ \thu@set@stix@names
+ \setmainfont{\thu@font@family@stix}[
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Italic,
+ BoldItalicFont = *-BoldItalic,
+ ]%
+ \thu@set@texgyre@sans@mono
+}
+\newcommand\thu@set@font@xits{%
\thu@set@xits@names
\setmainfont{\thu@font@family@xits}[
Extension = .otf,
@@ -1887,9 +2248,9 @@
ItalicFont = *-\thu@font@style@xits@it,
BoldItalicFont = *-\thu@font@style@xits@bfit,
]%
- \thu@load@texgyre@sans@mono
+ \thu@set@texgyre@sans@mono
}
-\newcommand\thu@load@font@libertinus{%
+\newcommand\thu@set@font@libertinus{%
\thu@set@libertinus@names
\setmainfont{\thu@font@family@libertinus@serif}[
Extension = .otf,
@@ -1912,7 +2273,30 @@
BoldItalicFont = *-boldoblique,
]%
}
-\@namedef{thu@load@font@lm}{%
+\newcommand\thu@set@font@newcm{%
+ \setmathrm{NewCM10}[
+ Extension = .otf,
+ UprightFont = *-Book,
+ BoldFont = *-Bold,
+ ItalicFont = *-BookItalic,
+ BoldItalicFont = *-BoldItalic,
+ ]%
+ \setmathsf{NewCMSans10}[
+ Extension = .otf,
+ UprightFont = *-Book,
+ BoldFont = *-Bold,
+ ItalicFont = *-BookOblique,
+ BoldItalicFont = *-BoldOblique,
+ ]%
+ \setmathtt{NewCMMono10}[
+ Extension = .otf,
+ UprightFont = *-Book,
+ ItalicFont = *-BookItalic,
+ BoldFont = *-Bold,
+ BoldItalicFont = *-BoldOblique,
+ ]%
+}
+\newcommand\thu@set@font@lm{%
\setmainfont{lmroman10}[
Extension = .otf,
UprightFont = *-regular,
@@ -1935,77 +2319,36 @@
BoldItalicFont = *-boldoblique,
]%
}
-\newcommand\thu@load@font{%
- \@nameuse{thu@load@font@\thu@font}%
-}
-\thu@load@font
-\thu@option@hook{font}{\thu@load@font}
-% \end{macrocode}
-%
-% 使用 \pkg{unicode-math} 配置数学字体
-% \begin{macrocode}
-\unimathsetup{
- math-style = ISO,
- bold-style = ISO,
- nabla = upright,
- partial = upright,
-}
-\newcommand\thu@load@math@font@xits{%
- \thu@set@xits@names
- \setmathfont{\thu@font@name@xits@math@rm}[
- Extension = .otf,
- BoldFont = \thu@font@name@xits@math@bf,
- StylisticSet = 8,
- ]%
- \setmathfont{\thu@font@name@xits@math@rm}[
- Extension = .otf,
- StylisticSet = 1,
- range = {cal,bfcal},
- ]%
-}
-\newcommand\thu@load@math@font@stix{%
- \setmathfont{STIX2Math}[
- Extension = .otf,
- StylisticSet = 8,
- ]%
- \setmathfont{STIX2Math}[
- Extension = .otf,
- StylisticSet = 1,
- range = {cal,bfcal},
- ]%
-}
-\newcommand\thu@load@math@font@libertinus{%
- \thu@set@libertinus@names
- \setmathfont{\thu@font@name@libertinus@math .otf}%
+\newcommand\thu@set@font@newtx{%
+ \RequirePackage{newtxtext}%
}
-\newcommand\thu@load@math@font@lm{%
- \setmathfont{latinmodern-math.otf}%
+\newcommand\thu@set@font{%
+ \@nameuse{thu@set@font@\thu@font}%
}
-\newcommand\thu@load@math@font{%
- \@nameuse{thu@load@math@font@\thu@math@font}
-}
-\thu@load@math@font
-\thu@option@hook{math-font}{\thu@load@math@font}
+\thu@set@font
+\thu@option@hook{font}{\thu@set@font}
% \end{macrocode}
%
-% 中文字体
+% \subsubsection{中文字体}
+%
% \begin{macrocode}
\ifthu@cjk@font@auto
- \ifthu@system@mac
+ \ifthu@fontset@mac
\thusetup{cjk-font = mac}
\else
- \ifthu@system@windows
+ \ifthu@fontset@windows
\thusetup{cjk-font = windows}
\else
- \IfFontExistsTF{Noto Serif CJK SC}{
+ \ifthu@fontset@ubuntu
\thusetup{cjk-font = noto}
- }{
+ \else
\thusetup{cjk-font = fandol}
- }
+ \fi
\fi
\fi
\fi
-\newcommand\thu@load@cjk@font@windows{%
+\newcommand\thu@set@cjk@font@windows{%
+ \defaultCJKfontfeatures{Script=CJK}%
\xeCJKsetup{EmboldenFactor=3}%
\setCJKmainfont{SimSun}[
AutoFakeBold = true,
@@ -2018,7 +2361,8 @@
\setCJKfamilyfont{zhkai}{KaiTi}%
\setCJKfamilyfont{zhfs}{FangSong}%
}
-\newcommand\thu@load@cjk@font@mac{%
+\newcommand\thu@set@cjk@font@mac{%
+ \defaultCJKfontfeatures{}%
\setCJKmainfont{Songti SC}[
UprightFont = * Light,
BoldFont = * Bold,
@@ -2047,34 +2391,42 @@
%
% 注意 Noto CJK 的 regular 字重名字不带“Regular”。
% \begin{macrocode}
-\newcommand\thu@load@cjk@font@noto{%
+\newcommand\thu@set@cjk@font@noto{%
+ \defaultCJKfontfeatures{}%
\setCJKmainfont{Noto Serif CJK SC}[
UprightFont = * Light,
BoldFont = * Bold,
ItalicFont = FandolKai-Regular,
ItalicFeatures = {Extension = .otf},
+ Script = CJK,
]%
\setCJKsansfont{Noto Sans CJK SC}[
- BoldFont = * Medium,
+ BoldFont = * Medium,
+ Script = CJK,
+ ]%
+ \setCJKmonofont{Noto Sans Mono CJK SC}[
+ Script = CJK,
]%
- \setCJKmonofont{Noto Sans Mono CJK SC}%
\setCJKfamilyfont{zhsong}{Noto Serif CJK SC}[
- UprightFont = * Light,
- UprightFont = * Bold,
+ UprightFont = * Light,
+ UprightFont = * Bold,
+ Script = CJK,
]%
\setCJKfamilyfont{zhhei}{Noto Sans CJK SC}[
- BoldFont = * Medium,
+ BoldFont = * Medium,
+ Script = CJK,
]%
\setCJKfamilyfont{zhfs}{FandolFang}[
- Extension = .otf,
- UprightFont = *-Regular,
+ Extension = .otf,
+ UprightFont = *-Regular,
]%
\setCJKfamilyfont{zhkai}{FandolKai}[
- Extension = .otf,
- UprightFont = *-Regular,
+ Extension = .otf,
+ UprightFont = *-Regular,
]%
}
-\newcommand\thu@load@cjk@font@fandol{%
+\newcommand\thu@set@cjk@font@fandol{%
+ \defaultCJKfontfeatures{}%
\setCJKmainfont{FandolSong}[
Extension = .otf,
UprightFont = *-Regular,
@@ -2115,15 +2467,366 @@
\providecommand\fangsong{\CJKfamily{zhfs}}
\providecommand\kaishu{\CJKfamily{zhkai}}
\fi
-\newcommand\thu@load@cjk@font{%
- \@nameuse{thu@load@cjk@font@\thu@cjk@font}%
+\newcommand\thu@set@cjk@font{%
+ \@nameuse{thu@set@cjk@font@\thu@cjk@font}%
+}
+\thu@set@cjk@font
+\thu@option@hook{cjk-font}{\thu@set@cjk@font}
+% \end{macrocode}
+%
+% \subsubsection{数学字体}
+%
+% 使用 \pkg{unicode-math} 配置数学符号格式。
+% \begin{macrocode}
+\newcommand\thu@set@math@style{%
+ \ifthu@math@style@TeX
+ \thusetup{
+ uppercase-greek = upright,
+ less-than-or-equal = horizontal,
+ integral = slanted,
+ integral-limits = false,
+ partial = italic,
+ math-ellipsis = AMS,
+ }%
+ \else
+ \thusetup{
+ uppercase-greek = italic,
+ integral = upright,
+ integral-limits = true,
+ partial = upright,
+ }%
+ \ifthu@math@style@ISO
+ \thusetup{
+ less-than-or-equal = horizontal,
+ math-ellipsis = lower,
+ }%
+ \else
+ \ifthu@math@style@GB
+ \thusetup{
+ less-than-or-equal = slanted,
+ math-ellipsis = centered,
+ }%
+ \fi
+ \fi
+ \fi
+}
+\ifthu@main@language@chinese
+ \thusetup{math-style=GB}%
+\else
+ \thusetup{math-style=TeX}%
+\fi
+\thu@set@math@style
+\thu@option@hook{math-style}{\thu@set@math@style}
+\thu@option@hook{main-language}{%
+ \ifthu@main@language@chinese
+ \thusetup{math-style=GB}%
+ \else
+ \thusetup{math-style=TeX}%
+ \fi
+}
+% \end{macrocode}
+%
+% 针对 \pkg{unicode-math} 逐项配置数学符号。
+% \begin{macrocode}
+\newcommand\thu@set@unimath@leq{%
+ \ifthu@leq@horizontal
+ \ifx\@begindocumenthook\@undefined
+ \let\le\thu@save@leq
+ \let\ge\thu@save@geq
+ \let\leq\thu@save@leq
+ \let\geq\thu@save@geq
+ \else
+ \AtBeginDocument{%
+ \let\le\thu@save@leq
+ \let\ge\thu@save@geq
+ \let\leq\thu@save@leq
+ \let\geq\thu@save@geq
+ }%
+ \fi
+ \else
+ \ifthu@leq@slanted
+ \ifx\@begindocumenthook\@undefined
+ \let\le\leqslant
+ \let\ge\geqslant
+ \let\leq\leqslant
+ \let\geq\geqslant
+ \else
+ \AtBeginDocument{%
+ \let\le\leqslant
+ \let\ge\geqslant
+ \let\leq\leqslant
+ \let\geq\geqslant
+ }%
+ \fi
+ \fi
+ \fi
+}
+\newcommand\thu@set@unimath@integral@limits{%
+ \ifthu@integral@limits@true
+ \removenolimits{%
+ \int\iint\iiint\iiiint\oint\oiint\oiiint
+ \intclockwise\varointclockwise\ointctrclockwise\sumint
+ \intbar\intBar\fint\cirfnint\awint\rppolint
+ \scpolint\npolint\pointint\sqint\intlarhk\intx
+ \intcap\intcup\upint\lowint
+ }%
+ \else
+ \addnolimits{%
+ \int\iint\iiint\iiiint\oint\oiint\oiiint
+ \intclockwise\varointclockwise\ointctrclockwise\sumint
+ \intbar\intBar\fint\cirfnint\awint\rppolint
+ \scpolint\npolint\pointint\sqint\intlarhk\intx
+ \intcap\intcup\upint\lowint
+ }%
+ \fi
+}
+\newcommand\thu@set@unimath@ellipsis{%
+ \ifthu@math@ellipsis@centered
+ \DeclareRobustCommand\mathellipsis{\mathinner{\unicodecdots}}%
+ \else
+ \DeclareRobustCommand\mathellipsis{\mathinner{\unicodeellipsis}}%
+ \fi
+}
+\newcommand\thu@set@unimath@style{%
+ \ifthu@uppercase@greek@upright
+ \unimathsetup{math-style = TeX}%
+ \else
+ \ifthu@uppercase@greek@italic
+ \unimathsetup{math-style = ISO}%
+ \fi
+ \fi
+ \ifthu@math@style@TeX
+ \unimathsetup{bold-style = TeX}%
+ \else
+ \unimathsetup{bold-style = ISO}%
+ \fi
+ \thu@set@unimath@leq
+ \thu@set@unimath@integral@limits
+ \ifthu@partial@upright
+ \unimathsetup{partial = upright}%
+ \else
+ \ifthu@partial@italic
+ \unimathsetup{partial = italic}%
+ \fi
+ \fi
+ \thu@set@unimath@ellipsis
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newcommand\thu@qed{\rule{1ex}{1ex}}
+\newcommand\thu@load@unimath{%
+ \@ifpackageloaded{unicode-math}{}{%
+ \RequirePackage{unicode-math}%
+ \AtBeginDocument{%
+ \let\thu@save@leq\leq
+ \let\thu@save@geq\geq
+ }%
+% \end{macrocode}
+%
+% 兼容旧的粗体命令:\pkg{bm} 的 \cs{bm} 和 \pkg{amsmath} 的 \cs{boldsymbol}。
+% \begin{macrocode}
+ \DeclareRobustCommand\bm[1]{{\symbfit{##1}}}%
+ \DeclareRobustCommand\boldsymbol[1]{{\symbfit{##1}}}%
+% \end{macrocode}
+%
+% 兼容 \pkg{amsfonts} 和 \pkg{amssymb} 中的一些命令。
+% \begin{macrocode}
+ \newcommand\square{\mdlgwhtsquare}%
+ \newcommand\blacksquare{\mdlgblksquare}%
+ \AtBeginDocument{%
+ \renewcommand\checkmark{\ensuremath{✓}}%
+ }%
+% \end{macrocode}
+%
+% 兼容 \pkg{amsthm} 的 \cs{qedsymbol}。
+% \begin{macrocode}
+ \renewcommand\thu@qed{\ensuremath{\QED}}%
+ }%
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newcommand\thu@xits@integral@stylistic@set{%
+ \ifthu@integral@upright
+ 8%
+ \fi
+}
+\newcommand\thu@set@math@font@xits{%
+ \thu@set@xits@names
+ \setmathfont{\thu@font@name@xits@math}[
+ Extension = .otf,
+ StylisticSet = \thu@xits@integral@stylistic@set,
+ ]%
+ \setmathfont{\thu@font@name@xits@math}[
+ Extension = .otf,
+ StylisticSet = 1,
+ range = {cal,bfcal},
+ ]%
+}
+\newcommand\thu@set@math@font@stix{%
+ \thu@set@stix@names
+ \setmathfont{\thu@font@name@stix@math}[
+ Extension = .otf,
+ StylisticSet = \thu@xits@integral@stylistic@set,
+ ]%
+ \setmathfont{\thu@font@name@stix@math}[
+ Extension = .otf,
+ StylisticSet = 1,
+ range = {scr,bfscr},
+ ]%
+}
+\newcommand\thu@libertinus@integral@stylistic@set{%
+ \ifthu@integral@italic
+ 8%
+ \fi
+}
+\newcommand\thu@set@math@font@libertinus{%
+ \thu@set@libertinus@names
+ \setmathfont{\thu@font@name@libertinus@math .otf}%
}
-\thu@load@cjk@font
-\thu@option@hook{cjk-font}{\thu@load@cjk@font}
+\newcommand\thu@set@math@font@lm{%
+ \setmathfont{latinmodern-math}[Extension=.otf]%
+ \setmathrm{lmroman10}[
+ Extension = .otf,
+ UprightFont = *-regular,
+ BoldFont = *-bold,
+ ItalicFont = *-italic,
+ BoldItalicFont = *-bolditalic,
+ ]%
+ \setmathsf{lmsans10}[
+ Extension = .otf,
+ UprightFont = *-regular,
+ BoldFont = *-bold,
+ ItalicFont = *-oblique,
+ BoldItalicFont = *-boldoblique,
+ ]%
+ \setmathtt{lmmonolt10}[
+ Extension = .otf,
+ UprightFont = *-regular,
+ BoldFont = *-bold,
+ ItalicFont = *-oblique,
+ BoldItalicFont = *-boldoblique,
+ ]%
+}
+\newcommand\thu@newcm@integral@stylistic@set{%
+ \ifthu@integral@upright
+ 2%
+ \fi
+}
+\newcommand\thu@set@math@font@newcm{%
+ \setmathfont{NewCMMath-Book}[
+ Extension = .otf,
+ StylisticSet = \thu@newcm@integral@stylistic@set,
+ ]%
+ \setmathfont{NewCMMath-Book}[
+ Extension = .otf,
+ StylisticSet = 1,
+ range = {scr,bfscr},
+ ]%
+ \setmathrm{NewCM10}[
+ Extension = .otf,
+ UprightFont = *-Book,
+ BoldFont = *-Bold,
+ ItalicFont = *-BookItalic,
+ BoldItalicFont = *-BoldItalic,
+ ]%
+ \setmathsf{NewCMSans10}[
+ Extension = .otf,
+ UprightFont = *-Book,
+ BoldFont = *-Bold,
+ ItalicFont = *-BookOblique,
+ BoldItalicFont = *-BoldOblique,
+ ]%
+ \setmathtt{NewCMMono10}[
+ Extension = .otf,
+ UprightFont = *-Book,
+ ItalicFont = *-BookItalic,
+ BoldFont = *-Bold,
+ BoldItalicFont = *-BoldOblique,
+ ]%
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newcommand\thu@set@math@font@newtx{%
+ \ifthu@font@newtx\else
+ \let\thu@save@encodingdefault\encodingdefault
+ \let\thu@save@rmdefault\rmdefault
+ \let\thu@save@sfdefault\sfdefault
+ \let\thu@save@ttdefault\ttdefault
+ \RequirePackage[T1]{fontenc}%
+ \renewcommand{\rmdefault}{ntxtlf}%
+ \renewcommand{\sfdefault}{qhv}%
+ \renewcommand{\ttdefault}{ntxtt}%
+ \fi
+ \ifthu@uppercase@greek@italic
+ \PassOptionsToPackage{slantedGreek}{newtxmath}%
+ \fi
+ \ifthu@integral@upright
+ \PassOptionsToPackage{upint}{newtxmath}%
+ \fi
+ \RequirePackage{newtxmath}
+ \let\thu@save@leq\leq
+ \let\thu@save@geq\geq
+ \ifthu@leq@slanted
+ \let\le\leqslant
+ \let\ge\geqslant
+ \let\leq\leqslant
+ \let\geq\geqslant
+ \fi
+ \ifthu@integral@limits@true
+ \let\ilimits@\displaylimits
+ \fi
+ \let\thu@save@partial\partial
+ \ifthu@partial@upright
+ \let\partial\uppartial
+ \fi
+ \ifthu@math@ellipsis@centered
+ \DeclareRobustCommand\mathellipsis{\mathinner{\cdotp\cdotp\cdotp}}%
+ \else
+ \DeclareRobustCommand\mathellipsis{\mathinner{\ldotp\ldotp\ldotp}}%
+ \fi
+ \RequirePackage{bm}%
+ \ifthu@font@newtx\else
+ \let\encodingdefault\thu@save@encodingdefault
+ \let\rmdefault\thu@save@rmdefault
+ \let\sfdefault\thu@save@sfdefault
+ \let\ttdefault\thu@save@ttdefault
+ \fi
+ \DeclareRobustCommand\symup[1]{{\mathrm{##1}}}%
+ \DeclareRobustCommand\symbf[1]{{\bm{##1}}}%
+ \let\increment\upDelta%
+ \renewcommand\thu@qed{\openbox}%
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newcommand\thu@set@math@font{%
+ \ifthu@math@font@none\else
+ \ifthu@math@font@newtx
+ \thu@set@math@font@newtx
+ \else
+ \thu@load@unimath
+ \thu@set@unimath@style
+ \@nameuse{thu@set@math@font@\thu@math@font}%
+ \fi
+ \fi
+}
+\thu@option@hook{math-font}{\g@addto@macro\thu@setup@hook{\thu@set@math@font}}
+\newcommand\thu@set@math@font@auto{%
+ \ifthu@math@font@auto
+ \thusetup{math-font=xits}%
+ \fi
+}
+\AtBeginOfPackageFile*{siunitx}{\thu@set@math@font@auto}
+\AtEndPreamble{\thu@set@math@font@auto}
% \end{macrocode}
%
+% \subsubsection{字号}
+%
% \begin{macro}{\normalsize}
-% 正文小四号 (12bp) 字,行距为固定值 20 bp。
+% 正文小四号(12bp)字,行距为固定值 20 bp。
% 其他字号的行距按照相同的比例设置。
%
% 表达式行的行距为单倍行距,段前空 6 磅,段后空 6 磅。
@@ -2228,196 +2931,61 @@
% \end{macrocode}
%
%
-% \subsubsection{语言设置}
-%
-% 定义 \cs{thu@main@language},当在导言区修改 \option{language} 时,
-% 保存为论文的主要语言;
-% \cs{thu@reset@main@language} 则用于正文中恢复为主要语言。
-% \begin{macrocode}
-\thusetup{main-language=\thu@language}%
-\let\thu@main@language\thu@language
-\thu@option@hook{language}{%
- \ifx\@begindocumenthook\@undefined\else
- \thusetup{main-language=\thu@language}%
- \let\thu@main@language\thu@language
- \fi
-}
-\newcommand\thu@reset@main@language{%
- \thusetup{language = \thu@main@language}%
- \let\thu@language\thu@main@language
-}
-% \end{macrocode}
+% \subsection{主文档格式}
+% \label{sec:mainbody}
%
-% 根据语言设置各章节的名称,只有在导言区设置 \option{degree} 和
-% \option{language} 时会修改,而在正文局部切换语言时则不变。
+% \subsubsection{Three matters}
+% \begin{macro}{\cleardoublepage}
+% 对于 \textsl{openright} 选项,必须保证章首页右开,且如果前章末页无内容须
+% 清空其页眉页脚。
% \begin{macrocode}
-\newcommand\thu@set@chapter@names{%
- \ifthu@main@language@chinese
- \ctexset{
- chapter/name = {第,章},
- }%
- \def\bibname{参考文献}%
- \def\appendixname{附录}%
- \def\indexname{索引}%
- \def\thu@acknowledgements@name{致\quad 谢}%
- \ifthu@degree@bachelor
- \def\contentsname{目\quad 录}%
- \def\listfigurename{插图索引}%
- \def\listtablename{表格索引}%
- \def\thu@list@figure@table@name{插图和附表索引}%
- \def\thu@list@algorithm@name{算法索引}%
- \def\listequationname{公式索引}%
- \def\thu@denotation@name{主要符号对照表}%
- \def\thu@resume@name{在学期间参加课题的研究成果}%
- \else
- \def\listfigurename{插图清单}%
- \def\listtablename{附表清单}%
- \def\thu@list@figure@table@name{插图和附表清单}%
- \def\thu@list@algorithm@name{算法清单}%
- \def\listequationname{公式清单}%
- \ifthu@degree@graduate
- \def\contentsname{目\quad 录}%
- \def\thu@denotation@name{符号和缩略语说明}%
- \def\thu@resume@name{个人简历、在学期间完成的相关学术成果}%
- \else % degree = postdoc
- \def\contentsname{目\qquad 次}%
- \def\thu@denotation@name{符号表}%
- \def\thu@resume@name{个人简历、发表的学术论文与科研成果}%
- \fi
- \fi
- \else
- \ifthu@main@language@english
- \ctexset{
- chapter/name = \chaptername\space,
- }%
- \def\indexname{Index}%
- \ifthu@degree@bachelor
- \def\contentsname{CONTENTS}%
- \def\listfigurename{FIGURES}%
- \def\listtablename{TABLES}%
- \def\thu@list@figure@table@name{FIGURES AND TABLES}%
- \def\thu@list@algorithm@name{ALGORITHMS}%
- \def\listequationname{EQUATIONS}%
- \def\thu@denotation@name{ABBREVIATIONS}%
- \def\bibname{REFERENCES}%
- \def\appendixname{APPENDIX}%
- \def\thu@acknowledgements@name{ACKNOWLEDGEMENTS}%
- \def\thu@resume@name{PUBLICATIONS}%
+\def\cleardoublepage{%
+ \clearpage
+ \if@twoside
+ \ifthu@output@print
+ \ifodd\c@page
\else
- \def\contentsname{Contents}%
- \def\listfigurename{List of Figures}%
- \def\listtablename{List of Tables}%
- \def\thu@list@figure@table@name{List of Figures and Tables}%
- \def\thu@list@algorithm@name{List of Algorithms}%
- \def\listequationname{List of Equations}%
- \def\thu@denotation@name{Nomenclature}%
- \def\bibname{Bibliography}%
- \def\appendixname{Appendix}%
- \def\thu@acknowledgements@name{Acknowledgements}%
- \def\thu@resume@name{Resume and Academic Achievements}%
+ \thispagestyle{empty}%
+ \hbox{}%
+ \newpage
+ \if@twocolumn
+ \hbox{}\newpage
+ \fi
\fi
\fi
\fi
}
-\thu@set@chapter@names
-\thu@option@hook{degree}{\thu@set@chapter@names}
-\thu@option@hook{main-language}{\thu@set@chapter@names}
% \end{macrocode}
+% \end{macro}
%
-% 这部分名称在正文中局部地修改语言时会发生变化,比如英文摘要、
-% 本科生附录的阅读报告。
+% \begin{macro}{\frontmatter}
+% \begin{macro}{\mainmatter}
+% \begin{macro}{\backmatter}
+% 我们的单面和双面模式与常规的不太一样。
% \begin{macrocode}
-\newcommand\thu@set@names{%
- \ifthu@language@chinese
- \ctexset{
- figurename = 图,
- tablename = 表,
- }%
- \def\thu@algorithm@name{算法}%
- \def\thu@equation@name{公式}%
- \def\thu@assumption@name{假设}%
- \def\thu@definition@name{定义}%
- \def\thu@proposition@name{命题}%
- \def\thu@lemma@name{引理}%
- \def\thu@theorem@name{定理}%
- \def\thu@axiom@name{公理}%
- \def\thu@corollary@name{推论}%
- \def\thu@exercise@name{练习}%
- \def\thu@example@name{例}%
- \def\thu@remark@name{注释}%
- \def\thu@problem@name{问题}%
- \def\thu@conjecture@name{猜想}%
- \def\thu@proof@name{证明}%
- \def\thu@theorem@separator{:}%
- \else
- \ifthu@language@english
- \ctexset{
- figurename = {Figure},
- tablename = {Table},
- }%
- \def\thu@algorithm@name{Algorithm}%
- \def\thu@equation@name{Equation}%
- \def\thu@assumption@name{Assumption}%
- \def\thu@definition@name{Definition}%
- \def\thu@proposition@name{Proposition}%
- \def\thu@lemma@name{Lemma}%
- \def\thu@theorem@name{Theorem}%
- \def\thu@axiom@name{Axiom}%
- \def\thu@corollary@name{Corollary}%
- \def\thu@exercise@name{Exercise}%
- \def\thu@example@name{Example}%
- \def\thu@remark@name{Remark}%
- \def\thu@problem@name{Problem}%
- \def\thu@conjecture@name{Conjecture}%
- \def\thu@proof@name{Proof}%
- \def\thu@theorem@separator{: }%
- \fi
- \fi
+\renewcommand\frontmatter{%
+ \cleardoublepage
+ \@mainmatterfalse
+ \pagenumbering{Roman}%
}
-\thu@set@names
-\thu@option@hook{language}{\thu@set@names}
-% \end{macrocode}
-%
-% 带圈数字和星号使用中文字体。
-% \begin{macrocode}
-\xeCJKDeclareCharClass{CJK}{"2460 -> "2473}
-\xeCJKDeclareCharClass{CJK}{"2605}
-% \end{macrocode}
-%
-% \newcommand\unicodechar[1]{U+#1(\symbol{"#1})}
-% 由于 Unicode 的一些标点符号是中西文混用的:
-% \unicodechar{00B7}、
-% \unicodechar{2013}、
-% \unicodechar{2014}、
-% \unicodechar{2018}、
-% \unicodechar{2019}、
-% \unicodechar{201C}、
-% \unicodechar{201D}、
-% \unicodechar{2025}、
-% \unicodechar{2026}、
-% \unicodechar{2E3A},
-% 所以要根据语言设置正确的字体。
-% \footnote{\url{https://github.com/CTeX-org/ctex-kit/issues/389}}
-% 此外切换语言时,有一部分名称是需要被重新定义的。
-% \begin{macrocode}
-\newcommand\thu@set@punctuations{%
- \ifthu@language@chinese
- \xeCJKDeclareCharClass{FullLeft}{"2018, "201C}%
- \xeCJKDeclareCharClass{FullRight}{
- "00B7, "2019, "201D, "2013, "2014, "2025, "2026, "2E3A,
- }%
+\renewcommand\mainmatter{%
+ \cleardoublepage
+ \@mainmattertrue
+ \pagenumbering{arabic}%
+}
+\renewcommand\backmatter{%
+ \if@openright
+ \cleardoublepage
\else
- \ifthu@language@english
- \xeCJKDeclareCharClass{HalfLeft}{"2018, "201C}%
- \xeCJKDeclareCharClass{HalfRight}{
- "00B7, "2019, "201D, "2013, "2014, "2025, "2026, "2E3A,
- }%
- \fi
+ \clearpage
\fi
+ \@mainmatterfalse
+ \thusetup{toc-depth = 0}%
}
-\thu@set@punctuations
-\thu@option@hook{language}{\thu@set@punctuations}
% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \subsubsection{页眉页脚}
% \label{sec:headerfooter}
@@ -2459,11 +3027,27 @@
\let\chaptermark\@gobble
\else
\renewcommand\headrulewidth{0.75bp}%
- \fancyhead[C]{\wuhao\leftmark}%
+ \fancyhead[C]{%
+ \wuhao
+ \ifthu@main@language@chinese
+ \leftmark
+ \else
+ \MakeUppercase{\leftmark}%
+ \fi
+ }%
\fancyfoot[C]{\wuhao\thepage}%
\let\@mkboth\markboth
\def\chaptermark##1{%
- \markboth{\CTEXifname{\CTEXthechapter\quad}{}##1}{}%
+ \markboth{%
+ \CTEXifname{%
+ \CTEXthechapter
+ \ifthu@main@language@chinese
+ \quad
+ \else
+ \space
+ \fi
+ }{}##1%
+ }{}%
}%
\fi
\let\sectionmark\@gobble
@@ -2473,7 +3057,8 @@
%
% \cs{chapter} 会调用特殊的 page style。
% \begin{macrocode}
-\ctexset{chapter/pagestyle = plain}
+\def\ps@chapter{}
+\ctexset{chapter/pagestyle = chapter}
% \end{macrocode}
%
%
@@ -2487,14 +3072,14 @@
space=auto,
}
\newcommand\thu@set@indent{%
- \ifthu@main@language@english
+ \ifthu@main@language@chinese
+ \ctexset{autoindent=2}%
+ \else
\ifthu@degree@bachelor
\ctexset{autoindent=0.8cm}%
\else
- \ctexset{autoindent=2}%
+ \ctexset{autoindent=0.74cm}%
\fi
- \else
- \ctexset{autoindent=2}%
\fi
}
\thu@set@indent
@@ -2635,106 +3220,9 @@
%
% \subsubsection{数学相关}
% \label{sec:equation}
-% \begin{macro}{\ldots}
-% 省略号一律居中,所以 \cs{ldots} 不再居于底部。
-% \begin{macrocode}
-\newcommand\thu@set@math@ellipsis{%
- \ifthu@language@chinese
- \DeclareRobustCommand\mathellipsis{\mathinner{\unicodecdots}}%
- \else
- \ifthu@language@english
- \DeclareRobustCommand\mathellipsis{\mathinner{\unicodeellipsis}}%
- \fi
- \fi
-}
-\thu@set@math@ellipsis
-\thu@option@hook{language}{\thu@set@math@ellipsis}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\le}
-% \begin{macro}{\ge}
-% \begin{macro}{\leq}
-% \begin{macro}{\geq}
-% 小于等于号要使用倾斜的形式。
-% \begin{macrocode}
-\protected\def\le{\leqslant}
-\protected\def\ge{\geqslant}
-\AtBeginDocument{%
- \renewcommand\leq{\leqslant}%
- \renewcommand\geq{\geqslant}%
-}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\int}
-% 积分号 \cs{int} 使用正体,并且上下限默认置于积分号上下两侧。
-% \begin{macrocode}
-\removenolimits{%
- \int\iint\iiint\iiiint\oint\oiint\oiiint
- \intclockwise\varointclockwise\ointctrclockwise\sumint
- \intbar\intBar\fint\cirfnint\awint\rppolint
- \scpolint\npolint\pointint\sqint\intlarhk\intx
- \intcap\intcup\upint\lowint
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\Re}
-% \begin{macro}{\Im}
-% 实部、虚部操作符使用罗马体 $\mathrm{Re}$、$\mathrm{Im}$ 而不是 fraktur 体
-% $\Re$、$\Im$。
-% \begin{macrocode}
-\AtBeginDocument{%
- \renewcommand{\Re}{\operatorname{Re}}%
- \renewcommand{\Im}{\operatorname{Im}}%
-}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\nabla}
-% \cs{nabla} 使用粗正体。
-% \begin{macrocode}
-\AtBeginDocument{%
- \renewcommand\nabla{\mbfnabla}%
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\bm}
-% \begin{macro}{\boldsymbol}
-% 兼容旧的粗体命令:\pkg{bm} 的 \cs{bm} 和 \pkg{amsmath} 的 \cs{boldsymbol}。
-% \begin{macrocode}
-\DeclareRobustCommand\bm[1]{{\symbf{#1}}}
-\DeclareRobustCommand\boldsymbol[1]{{\symbf{#1}}}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\square}
-% 兼容 \pkg{amssymb} 中的命令。
-% \begin{macrocode}
-\newcommand\square{\mdlgwhtsquare}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\checkmark}
-% 允许在文本模式中使用 \cs{checkmark}。
-% \begin{macrocode}
-\AtBeginDocument{%
- \renewcommand\checkmark{\ensuremath{✓}}%
-}
-% \end{macrocode}
-% \end{macro}
-%
% 允许太长的公式断行、分页等。
% \begin{macrocode}
\allowdisplaybreaks[4]
-\renewcommand\theequation{\ifnum \c@chapter>\z@ \thechapter-\fi\@arabic\c@equation}
% \end{macrocode}
%
% 公式距前后文的距离由 4 个参数控制,参见 \cs{normalsize} 的定义。
@@ -2767,48 +3255,101 @@
\renewcommand{\floatpagefraction}{0.60}
% \end{macrocode}
%
-% 研究生要求表单元格中的文字采用 11pt 宋体字,单倍行距,段前空 3 磅,段后空 3 磅。
-% $(3 + 3) / (11 \times 1.3) \approx 0.4$
+% 允许用户设置图表编号的连接符。
+% \begin{macrocode}
+\thu@define@key{
+ figure-number-separator = {
+ name = figure@number@separator,
+ default = {.},
+ },
+ table-number-separator = {
+ name = table@number@separator,
+ default = {.},
+ },
+ equation-number-separator = {
+ name = equation@number@separator,
+ default = {.},
+ },
+ number-separator = {
+ name = number@separator,
+ default = {.},
+ },
+}
+\renewcommand\thefigure{%
+ \ifnum\c@chapter>\z@
+ \thechapter
+ \thu@figure@number@separator
+ \fi
+ \@arabic\c@figure
+}
+\renewcommand\thetable{%
+ \ifnum\c@chapter>\z@
+ \thechapter
+ \thu@table@number@separator
+ \fi
+ \@arabic\c@table
+}
+\renewcommand\theequation{%
+ \ifnum\c@chapter>\z@
+ \thechapter
+ \thu@equation@number@separator
+ \fi
+ \@arabic\c@equation
+}
+\newcommand\thu@set@number@separator{%
+ \let\thu@figure@number@separator\thu@number@separator
+ \let\thu@table@number@separator\thu@number@separator
+ \let\thu@equation@number@separator\thu@number@separator
+}
+\thu@option@hook{number-separator}{\thu@set@number@separator}
+% \end{macrocode}
+%
+% 研究生要求表单元格中的文字采用 11pt 宋体字,单倍行距。段前空 3 磅,段后空 3 磅。
+% 段前段后的高度直接加到行距上,对于中文,修正后的行距为
+% $11 \times 1.3 + 6 = 20.3$(pt),
+% 而英文版的行距为 $11 \times 1.3 + 6 = 18.65$(pt)。
+% 用户可以手动设置 \cs{arraystretch} 调整表格的行距 。
% \begin{macrocode}
\patchcmd\@floatboxreset{%
\normalsize
}{%
- \fontsize{11bp}{14.3bp}\selectfont
- \renewcommand\arraystretch{1.4}%
+ \ifthu@language@chinese
+ \fontsize{11bp}{20.3bp}\selectfont
+ \else
+ \fontsize{11bp}{18.65bp}\selectfont
+ \fi
}{}{\thu@patch@error{\@floatboxreset}}
% \end{macrocode}
%
+% 对 \pkg{longtable} 跨页表格进行相同的设置。
+% \begin{macrocode}
+\AtEndOfPackageFile*{longtable}{
+ \AtBeginEnvironment{longtable}{%
+ \ifthu@language@chinese
+ \fontsize{11bp}{20.3bp}\selectfont
+ \else
+ \fontsize{11bp}{18.65bp}\selectfont
+ \fi
+ }
+}
+% \end{macrocode}
+%
% 定制浮动图形和表格标题样式,以及改变附录中浮动体的编号规则:
% \begin{itemize}
-% \item 图表标题字体为 11pt, 这里写作大五号
+% \item 图表标题字体为 11pt
% \item 去掉图表号后面的冒号,图序与图名文字之间空一个汉字符宽度
-% \item 本科生附录中的各种浮动体需要编号为类似 A-1 的形式
% \item 图:caption 在下,段前空 6 磅,段后空 12 磅
% \item 表:caption 在上,段前空 12 磅,段后空 6 磅
% \end{itemize}
% \begin{macrocode}
-\ifthu@degree@bachelor
- \AtBeginDocument{% delay the check until all packages are loaded
- \g@addto@macro\appendix{\renewcommand*{\thefigure}{\thechapter-\arabic{figure}}}
- \g@addto@macro\appendix{\renewcommand*{\thetable}{\thechapter-\arabic{table}}}
- }
-\fi
-% \end{macrocode}
-%
-% \begin{macrocode}
-\newcommand\thu@caption@font{}
-\newcommand\thu@set@caption@font{%
+\DeclareCaptionFont{thu}{%
\ifthu@degree@bachelor
- \renewcommand\thu@caption@font{\fontsize{11bp}{15bp}\selectfont}%
+ \fontsize{11bp}{15bp}\selectfont
\else
- \renewcommand\thu@caption@font{\fontsize{11bp}{14.3bp}\selectfont}%
+ \fontsize{11bp}{14.3bp}\selectfont
\fi
}
-\thu@set@caption@font
-\thu@option@hook{degree}{\thu@set@caption@font}
-\DeclareCaptionFont{thu}{\thu@caption@font}
\captionsetup{
- format = hang,
font = thu,
labelsep = quad,
aboveskip = 6bp,
@@ -2855,8 +3396,8 @@
nameformat = {},
numberformat = {},
titleformat = {},
- aftername = \quad,
fixskip = true,
+ aftername = \quad,
afterindent = true,
lofskip = 0pt,
lotskip = 0pt,
@@ -2919,9 +3460,19 @@
},
}%
\ifthu@main@language@chinese
- \ctexset{chapter/number = \thechapter}%
+ \ctexset{
+ chapter = {
+ name = {第,章},
+ number = \thechapter,
+ },
+ }%
\else
- \ctexset{chapter/number = \thu@english@number{chapter}}%
+ \ctexset{
+ chapter = {
+ name = \chaptername\space,
+ number = \thu@english@number{chapter},
+ },
+ }%
\fi
% \end{macrocode}
%
@@ -2953,24 +3504,58 @@
% 由于 Word 的行距算法不同,这里进行了一些调整使得视觉上更接近。
% \begin{macrocode}
\else
+ \ifthu@main@language@chinese
+ \ctexset{%
+ chapter = {
+ format = \centering\sffamily\sanhao,
+ nameformat = {},
+ titleformat = {},
+ name = {第,章},
+ },
+ section = {
+ format = \sffamily\fontsize{14bp}{20bp}\selectfont,
+ },
+ subsection = {
+ format = \sffamily\fontsize{13bp}{20bp}\selectfont,
+ },
+ subsubsection = {
+ format = \sffamily\fontsize{12bp}{20bp}\selectfont,
+ },
+ }%
+ \else
+ \ctexset{%
+ chapter = {
+ format = \centering\sffamily\bfseries\fontsize{16bp}{20bp}\selectfont,
+ nameformat = \MakeUppercase,
+ titleformat = \MakeUppercase,
+ name = \chaptername\space,
+ },
+ section = {
+ format = \sffamily\bfseries\fontsize{14bp}{20bp}\selectfont,
+ },
+ subsection = {
+ format = \sffamily\bfseries\fontsize{13bp}{20bp}\selectfont,
+ },
+ subsubsection = {
+ format = \sffamily\bfseries\fontsize{12bp}{20bp}\selectfont,
+ },
+ }%
+ \fi
\ctexset{%
chapter = {
- format = \centering\sffamily\sanhao,
beforeskip = 27bp,
afterskip = 27bp,
+ number = \thechapter,
},
section = {
- format = \sffamily\fontsize{14bp}{20bp}\selectfont,
beforeskip = 24bp,
afterskip = 6bp,
},
subsection = {
- format = \sffamily\fontsize{13bp}{20bp}\selectfont,
beforeskip = 12bp,
afterskip = 6bp,
},
subsubsection = {
- format = \sffamily\fontsize{12bp}{20bp}\selectfont,
beforeskip = 12bp,
afterskip = 6bp,
},
@@ -2979,6 +3564,7 @@
}
\thu@set@section@format
\thu@option@hook{degree}{\thu@set@section@format}
+\thu@option@hook{main-language}{\thu@set@section@format}
% \end{macrocode}
%
% \begin{macrocode}
@@ -3155,22 +3741,38 @@
% 但是页码仍然用 \cs{rmfamily}。
% \begin{macrocode}
\else
- \titlecontents{chapter}
- [\z@]{\addvspace{6bp}\sffamily}
- {\contentspush{\thecontentslabel\quad}}{}
- {\rmfamily\thu@leaders\thecontentspage}%
- \titlecontents{section}
- [1em]{}
- {\contentspush{\thecontentslabel\quad}}{}
- {\thu@leaders\thecontentspage}%
- \titlecontents{subsection}
- [2em]{}
- {\contentspush{\thecontentslabel\quad}}{}
- {\thu@leaders\thecontentspage}%
+ \ifthu@main@language@chinese
+ \titlecontents{chapter}
+ [\z@]{\addvspace{6bp}\sffamily}
+ {\contentspush{\thecontentslabel\quad}}{}
+ {\rmfamily\thu@leaders\thecontentspage}%
+ \titlecontents{section}
+ [1em]{}
+ {\contentspush{\thecontentslabel\quad}}{}
+ {\thu@leaders\thecontentspage}%
+ \titlecontents{subsection}
+ [2em]{}
+ {\contentspush{\thecontentslabel\quad}}{}
+ {\thu@leaders\thecontentspage}%
+ \else
+ \titlecontents{chapter}
+ [\z@]{\addvspace{6bp}\heiti}
+ {\contentspush{\MakeUppercase{\thecontentslabel}\quad}\MakeUppercase}{\MakeUppercase}
+ {\rmfamily\thu@leaders\thecontentspage}%
+ \titlecontents{section}
+ [1em]{}
+ {\contentspush{\thecontentslabel\space}}{}
+ {\thu@leaders\thecontentspage}%
+ \titlecontents{subsection}
+ [2em]{}
+ {\contentspush{\thecontentslabel\space}}{}
+ {\thu@leaders\thecontentspage}%
+ \fi
\fi
}
\thu@set@toc@format
\thu@option@hook{degree}{\thu@set@toc@format}
+\thu@option@hook{main-language}{\thu@set@toc@format}
% \end{macrocode}
% \end{macro}
%
@@ -3208,6 +3810,9 @@
default = {Name of author},
name = author@en,
},
+ student-id = {
+ name = student@id,
+ },
supervisor = {
default = {导师姓名},
},
@@ -3221,11 +3826,18 @@
associate-supervisor* = {
name = associate@supervisor@en,
},
+ co-supervisor = {
+ name = co@supervisor,
+ },
+ co-supervisor* = {
+ name = co@supervisor@en,
+ },
+ % Reserved for compatibility
joint-supervisor = {
- name = joint@supervisor,
+ name = co@supervisor,
},
joint-supervisor* = {
- name = joint@supervisor@en,
+ name = co@supervisor@en,
},
% \end{macrocode}
%
@@ -3407,8 +4019,10 @@
\thu@spine
\fi
\ifthu@degree@graduate
- \cleardoublepage
- \thu@titlepage@en
+ \ifthu@thesis@type@thesis
+ \cleardoublepage
+ \thu@titlepage@en
+ \fi
\fi
\clearpage
}
@@ -3424,13 +4038,19 @@
\newcommand\thu@titlepage{%
\thusetup{language = chinese}%
\ifthu@degree@graduate
- \ifthu@degree@type@academic
- \thu@titlepage@graduate@academic
- \else
- \ifx\thu@discipline\@empty
- \thu@titlepage@graduate@professional
- \else
+ \ifthu@thesis@type@thesis
+ \ifthu@degree@type@academic
\thu@titlepage@graduate@academic
+ \else
+ \ifx\thu@discipline\@empty
+ \thu@titlepage@graduate@professional
+ \else
+ \thu@titlepage@graduate@academic
+ \fi
+ \fi
+ \else
+ \ifthu@thesis@type@proposal
+ \thu@titlepage@proposal
\fi
\fi
\else
@@ -3462,19 +4082,33 @@
hmargin = 3.5cm,
}%
\thispagestyle{empty}%
- \null\vskip 0.2cm%
+ \null\vskip 8.1pt%
\begingroup
\centering
\parbox[t][2cm][t]{\textwidth}{%
- \hskip -0.69cm%
+ \hskip -21.5pt%
\thu@titlepage@secret
}\par
- \vskip 1.5cm%
- {\thu@titlepage@title}%
- \vskip 0.85cm%
+ \vskip 40.5pt%
+ \begingroup
+ \sffamily\fontsize{26bp}{46.8bp}\selectfont
+ \thu@title\par
+ \endgroup
+ \ifthu@main@language@english
+ \vskip 5.4pt%
+ \begingroup
+ \sffamily\bfseries\fontsize{20bp}{31.2bp}\selectfont
+ \thu@title@en\par
+ \endgroup
+ \vskip -9.2pt%
+ \fi
+ \vskip 24.1pt%
\thu@titlepage@degree
\vfill
- \parbox[t][7.25cm][t]{\textwidth}{\centering\thu@titlepage@info}\par
+ \parbox[t][7.25cm][t]{\textwidth}{%
+ \centering\fangsong\fontsize{16bp}{31.2bp}\selectfont
+ \thu@titlepage@info
+ }\par
\parbox[t][1.03cm][t]{\textwidth}{\centering\thu@titlepage@date}\par
\endgroup
\clearpage
@@ -3499,11 +4133,26 @@
\thu@titlepage@secret
}\par
\vskip 1.5cm%
- {\sffamily\yihao[1.575]\thu@title\par}%
- \vskip 0.9cm%
+ \begingroup
+ % 1.21 倍行距,无网格
+ \sffamily\fontsize{26bp}{40.9bp}\selectfont
+ \thu@title\par
+ \endgroup
+ \ifthu@main@language@english
+ \vskip 5.4pt%
+ \begingroup
+ \sffamily\bfseries\fontsize{20bp}{31.2bp}\selectfont
+ \thu@title@en\par
+ \endgroup
+ \vskip -9.2pt%
+ \fi
+ \vskip 25.5pt%
\thu@titlepage@degree
\vfill
- \parbox[t][5.28cm][t]{\textwidth}{\centering\thu@titlepage@info}\par
+ \parbox[t][5.24cm][t]{\textwidth}{%
+ \centering\fangsong\fontsize{16bp}{1cm}\selectfont
+ \thu@titlepage@info
+ }\par
\parbox[t][1.25cm][t]{\textwidth}{\centering\thu@titlepage@date}\par
\endgroup
\clearpage
@@ -3511,6 +4160,49 @@
}
% \end{macrocode}
%
+% 选题报告封面
+% \begin{macrocode}
+\newcommand\thu@titlepage@proposal{%
+ \newgeometry{
+ top = 5cm,
+ bottom = 3.25cm,
+ hmargin = 3.17cm,
+ }%
+ \thispagestyle{empty}%
+ \begingroup
+ % \vspace*{0.1cm}%
+ \centering
+ % {\thu@titlepage@title}%
+ \parbox[t][3cm]{\textwidth}{%
+ \vskip 0.1cm%
+ \centering
+ \sffamily\fontsize{26bp}{46.8bp}\selectfont
+ \thu@title\par
+ }%
+ \vskip 0.85cm%
+ \thu@titlepage@degree
+ \vfill
+ \parbox[t][8.5cm][t]{\textwidth}{%
+ \centering\CJKfamily+{}%
+ \centering\fangsong\sanhao[1.95]%
+ \thu@titlepage@info
+ }\par
+ \parbox[t][2.5cm][t]{\textwidth}{\centering\thu@titlepage@date}\par
+ \endgroup
+ \clearpage
+ \restoregeometry
+}
+\newcommand\thu@set@student@id{%
+ \ifthu@thesis@type@proposal
+ \ifx\thu@student@id\@empty
+ \thusetup{student-id=2000310000}%
+ \fi
+ \fi
+}
+\thu@set@student@id
+\thu@option@hook{thesis-type}{\thu@set@student@id}
+% \end{macrocode}
+%
% \begin{macrocode}
\newcommand\thu@titlepage@secret{%
\sffamily\sanhao
@@ -3522,22 +4214,33 @@
}
% \end{macrocode}
%
-% 题名使用一号黑体字,一行写不下时可分两行写。
-% 由于 Word 模板这里设置了“对齐到网格”,所以实际行距不是 1.25 倍。
-% \begin{macrocode}
-\newcommand\thu@titlepage@title{%
- \sffamily\yihao[1.8]\thu@title\par
-}
-% \end{macrocode}
-%
% 申请学位的学科门类: 小二号宋体字,字距延伸 0.5bp,
% 所以 \cs{CJKglue} 应该设为 1 bp。
% \begin{macrocode}
\newcommand\thu@titlepage@degree{%
\begingroup
- \def\CJKglue{\hskip 1bp}%
\CJKfamily+{}\xiaoer
- (申请清华大学\thu@degree@name\ifthu@degree@type@professional 专业\fi 学位论文)\par
+ \def\CJKglue{\hskip 1bp}%
+ \ifthu@thesis@type@thesis
+ (申请清华大学\thu@degree@name
+ \ifthu@degree@type@professional
+ 专业%
+ \fi
+ 学位论文)%
+ \else
+ \ifthu@thesis@type@proposal
+ (清华大学%
+ \ifthu@degree@doctor
+ 博士%
+ \else
+ \ifthu@degree@master
+ 硕士%
+ \fi
+ \fi
+ 学位论文选题报告)%
+ \fi
+ \fi
+ \par
\endgroup
}
% \end{macrocode}
@@ -3575,8 +4278,8 @@
##2{##3}\\
\fi
}%
- \fangsong\sanhao[1.95]%
\begin{tabular}{l}%
+ \renewcommand\arraystretch{1}%
#4%
\end{tabular}%
}
@@ -3585,18 +4288,20 @@
\thu@info@item{培养单位}{}{\thu@department}%
\thu@info@item{学科}{}{\thu@discipline}%
\thu@info@item{研究生}{\thu@name@title}{\thu@author}%
+ \thu@info@item{学号}{}{\thu@student@id}%
\thu@info@item{指导教师}{\thu@name@title}{\thu@supervisor}%
\thu@info@item{副指导教师}{\thu@name@title}{\thu@associate@supervisor}%
- \thu@info@item{联合导师}{\thu@name@title}{\thu@joint@supervisor}%
+ \thu@info@item{联合导师}{\thu@name@title}{\thu@co@supervisor}%
}\par
}
\newcommand\thu@titlepage@info@doctor@professional{%
\thu@titlepage@info@tabular{3.03cm}{5em}{1.52cm}{%
\thu@info@item{培养单位}{}{\thu@department}%
\thu@info@item{申请人}{\thu@name@title}{\thu@author}%
+ \thu@info@item{学号}{}{\thu@student@id}%
\thu@info@item{指导教师}{\thu@name@title}{\thu@supervisor}%
\thu@info@item{副指导教师}{\thu@name@title}{\thu@associate@supervisor}%
- \thu@info@item{联合导师}{\thu@name@title}{\thu@joint@supervisor}%
+ \thu@info@item{联合导师}{\thu@name@title}{\thu@co@supervisor}%
}\par
}
\newcommand\thu@titlepage@info@master@academic{%
@@ -3604,9 +4309,10 @@
\thu@info@item{培养单位}{}{\thu@department}%
\thu@info@item{学科}{}{\thu@discipline}%
\thu@info@item{研究生}{\thu@name@title}{\thu@author}%
+ \thu@info@item{学号}{}{\thu@student@id}%
\thu@info@item{指导教师}{\thu@name@title}{\thu@supervisor}%
\thu@info@item{副指导教师}{\thu@name@title}{\thu@associate@supervisor}%
- \thu@info@item{联合指导教师}{\thu@name@title}{\thu@joint@supervisor}%
+ \thu@info@item{联合指导教师}{\thu@name@title}{\thu@co@supervisor}%
}\par
}
\newcommand\thu@titlepage@info@master@engineer{%
@@ -3614,18 +4320,20 @@
\thu@info@item{培养单位}{}{\thu@department}%
\thu@info@item{工程领域}{}{\thu@discipline}%
\thu@info@item{申请人}{\thu@name@title}{\thu@author}%
+ \thu@info@item{学号}{}{\thu@student@id}%
\thu@info@item{指导教师}{\thu@name@title}{\thu@supervisor}%
\thu@info@item{副指导教师}{\thu@name@title}{\thu@associate@supervisor}%
- \thu@info@item{联合指导教师}{\thu@name@title}{\thu@joint@supervisor}%
+ \thu@info@item{联合指导教师}{\thu@name@title}{\thu@co@supervisor}%
}\par
}
\newcommand\thu@titlepage@info@master@other{%
\thu@titlepage@info@tabular{3.28cm}{5em}{1.52cm}{%
\thu@info@item{培养单位}{}{\thu@department}%
\thu@info@item{申请人}{\thu@name@title}{\thu@author}%
+ \thu@info@item{学号}{}{\thu@student@id}%
\thu@info@item{指导教师}{\thu@name@title}{\thu@supervisor}%
\thu@info@item{副指导教师}{\thu@name@title}{\thu@associate@supervisor}%
- \thu@info@item{联合指导教师}{\thu@name@title}{\thu@joint@supervisor}%
+ \thu@info@item{联合指导教师}{\thu@name@title}{\thu@co@supervisor}%
}\par
}
% \end{macrocode}
@@ -3635,8 +4343,9 @@
% \begin{macrocode}
\newcommand\thu@titlepage@date{%
\begingroup
+ \sanhao
\def\CJKglue{\hskip 1bp}%
- \sanhao\thu@format@date{\thu@date@zh@short}{\thu@date}\par
+ \thu@format@date{\thu@date@zh@short}{\thu@date}\par
\endgroup
}
% \end{macrocode}
@@ -3739,12 +4448,13 @@
}
\newcommand\thu@titlepage@en@supervisor{%
\begin{tabular}{r@{\makebox[0.71cm][l]{:}}l}%
- \thu@thesis@name@en{} Supervisor & \thu@supervisor@en \\
+ \renewcommand\arraystretch{1}%
+ \thu@thesis@name@en{} Supervisor & \thu@supervisor@en \\
\ifx\thu@associate@supervisor@en\@empty\else
- Associate Supervisor & \thu@associate@supervisor@en \\
+ Associate Supervisor & \thu@associate@supervisor@en \\
\fi
- \ifx\thu@joint@supervisor@en\@empty\else
- Cooperate Supervisor & \thu@joint@supervisor@en \\
+ \ifx\thu@co@supervisor@en\@empty\else
+ Co-supervisor & \thu@co@supervisor@en \\
\fi
\end{tabular}%
}
@@ -3819,7 +4529,7 @@
\def\thu@info@item##1##2##3{%
\ifx##3\@empty\else
\thu@fixed@box{%
- \ifx\thu@joint@supervisor\@empty
+ \ifx\thu@co@supervisor\@empty
4em%
\else
5.5em%
@@ -3835,7 +4545,7 @@
\thu@info@item{姓名}{\thu@name@title}{\thu@author}%
\thu@info@item{指导教师}{\thu@name@title}{\thu@supervisor}%
\thu@info@item{辅导教师}{\thu@name@title}{\thu@associate@supervisor}%
- \thu@info@item{联合指导教师}{\thu@name@title}{\thu@joint@supervisor}%
+ \thu@info@item{联合指导教师}{\thu@name@title}{\thu@co@supervisor}%
\endgroup
\vskip 1.4cm%
\begingroup
@@ -3907,6 +4617,7 @@
\vskip 0.4cm%
{\xiaosi[2.6]%
\begin{tabular}{l@{\quad}l}%
+ \renewcommand\arraystretch{1}%
\thu@stretch{11em}{博士后姓名} & \thu@author \\
\thu@stretch{11em}{流动站(一级学科)名称} & \thu@discipline@level@i \\
\thu@stretch{11em}{专\quad{}业(二级学科)名称} & \thu@discipline@level@ii \\
@@ -3919,7 +4630,7 @@
研究工作期满时间\quad\thu@format@date{\thu@date@zh@digit}{\thu@end@date}\par
}%
\vskip 2.1cm%
- {\xiaosi[2.6]清华大学人事部(北京)\par}%
+ {\xiaosi[2.6]清华大学人事处(北京)\par}%
\vskip 0.6cm%
{\wuhao\thu@format@date{\thu@date@zh@digit@short}{\thu@date}\par}%
\end{center}%
@@ -3945,7 +4656,12 @@
}%
\kvsetkeys{thu@committee}{#1}%
\ifx\thu@committee@file\@empty
- \thu@chapter*[]{\thu@committee@name}%
+ \begingroup
+ \ifthu@main@language@english
+ \ctexset{chapter/format=\centering\sffamily\fontsize{16bp}{20bp}\selectfont}
+ \fi
+ \thu@chapter*[]{\thu@committee@name}%
+ \endgroup
\else
\thu@pdfbookmark{0}{\thu@committee@name}%
\includepdf{\thu@committee@file}%
@@ -3958,7 +4674,9 @@
afterindent = false,
},
}%
+ \thusetup{language=chinese}
}{%
+ \thu@reset@main@language
}
% \end{macrocode}
% \end{environment}
@@ -3968,18 +4686,20 @@
% 授权说明
% \begin{macrocode}
\newcommand\copyrightpage[1][]{%
+ \cleardoublepage
\ifthu@degree@postdoc\relax\else
\def\thu@@tmp{#1}
\ifx\thu@@tmp\@empty
+ \thusetup{language=chinese}%
\ifthu@degree@bachelor
\thu@copyright@page@bachelor
\else
\thu@copyright@page@graduate
\fi
+ \thu@reset@main@language
\else
- \cleardoublepage
\thispagestyle{empty}%
- \thu@pdfbookmark{0}{\thu@authorization@title}%
+ \thu@pdfbookmark{0}{关于学位论文使用授权的说明}%
\thu@phantomsection
\kv@define@key{thu@copyright}{file}{\includepdf{\kv@value}}%
\kv@set@family@handler{thu@copyright}{%
@@ -4000,7 +4720,6 @@
\newcommand{\thu@authorization@frontdate}{%
日\ifthu@degree@bachelor\hspace{1em}\else\hspace{2em}\fi 期:}
\newcommand\thu@copyright@page@graduate{%
- \cleardoublepage
\newgeometry{
vmargin = 3.8cm,
hmargin = 3.2cm,
@@ -4049,7 +4768,6 @@
\restoregeometry
}
\newcommand\thu@copyright@page@bachelor{%
- \cleardoublepage
\begingroup
\ctexset{
chapter = {
@@ -4118,7 +4836,14 @@
\fi
\thusetup{language = chinese}%
\ifthu@degree@graduate
- \thu@chapter*{\thu@abstract@name}%
+ \begingroup
+ \ifthu@main@language@english
+ \ctexset{%
+ chapter/format = \centering\sffamily\fontsize{16bp}{20bp}\selectfont,
+ }%
+ \fi
+ \thu@chapter*{\thu@abstract@name}%
+ \endgroup
\else
\thu@chapter*[]{\thu@abstract@name}%
\fi
@@ -4292,8 +5017,20 @@
}%
\kvsetkeys{thu@statement}{#1}%
\ifx\thu@statement@file\@empty
- \thu@chapter*{\thu@statement@name}%
- \thispagestyle{\thu@statement@page@style}%
+ \thusetup{language=chinese}%
+ \begingroup
+ \ifthu@degree@graduate
+ \ifthu@main@language@english
+ \ctexset{%
+ chapter/format = \centering\sffamily\fontsize{16bp}{20bp}\selectfont,
+ }%
+ \fi
+ \fi
+ \thu@chapter*{\thu@statement@name}%
+ \endgroup
+ \ifthu@degree@bachelor
+ \thispagestyle{\thu@statement@page@style}%
+ \fi
\thu@statement@text\par
\ifthu@degree@graduate
\vskip 2cm%
@@ -4302,11 +5039,15 @@
\fi
{\hfill\thu@signature\thu@underline[2.5cm]\relax
\thu@backdate\thu@underline[2.5cm]\relax}%
+ \thu@reset@main@language
\else
\includepdf[pagecommand={%
\markboth{\thu@statement@name}{}%
\thu@phantomsection
\addcontentsline{toc}{chapter}{\thu@statement@name}%
+ \ifthu@degree@bachelor\else
+ \thispagestyle{empty}%
+ \fi
}]{\thu@statement@file}%
\fi
\ifthu@degree@bachelor
@@ -4703,7 +5444,7 @@
% 行距采用固定值 16 磅,段前空 3 磅,段后空 0 磅。
%
% 本科生要求宋体五号/Times New Roman 10.5 pt,固定行距 17pt,段前后间距 3pt;
-% 英文专业要求悬挂缩进 0.5inch(1.27 厘米)。
+% 英文专业要求悬挂缩进 0.5inch(1.27 厘米)。
%
% 复用 \pkg{natbib} 的 \texttt{thebibliography} 环境,调整距离。
% \begin{macrocode}
@@ -4855,7 +5596,7 @@
% \end{macrocode}
%
% 这里不要使用 \cs{addcontentsline},
-% 避免写入 \pkg{titletoc} 的 (\file{.ptc}) 文件中,
+% 避免写入 \pkg{titletoc} 的 \file{.ptc} 文件中,
% 造成 \env{survey} 的子目录中 |tocdepth| 为 0。
% \begin{macrocode}
\thu@option@hook{toc-depth}{%
@@ -4987,7 +5728,7 @@
}
% \end{macrocode}
%
-% 调研阅读报告的参考文献(或书面翻译对应的外文资料的原文索引)标题用宋体小四号字,段前 20pt,段后 6pt,行距 20pt。
+% 调研阅读报告的参考文献(或书面翻译对应的外文资料的原文索引)标题用宋体小四号字,段前 20pt,段后 6pt,行距 20pt。
% \begin{macrocode}
\newcommand\thu@appendix@bibsection{%
\par
@@ -5076,6 +5817,36 @@
}
% \end{macrocode}
%
+% \subsection{指导教师/小组学术评语}
+% \begin{environment}{comments}
+% \begin{macrocode}
+\newenvironment{comments}[1][]{%
+ \@mainmatterfalse
+ \kv@define@key{thu@comments}{name}{\let\thu@comments@name\kv@value}%
+ \kv@set@family@handler{thu@comments}{%
+ \ifx\kv@value\relax
+ \let\thu@comments@name\kv@key
+ \else
+ \kv@handled@false
+ \fi
+ }%
+ \kvsetkeys{thu@comments}{#1}%
+ \chapter{\thu@comments@name}%
+}{%
+}
+% \end{macrocode}
+% \end{environment}
+%
+% \subsection{答辩委员会决议书}
+% \begin{environment}{resolution}
+% \begin{macrocode}
+\newenvironment{resolution}{%
+ \@mainmatterfalse
+ \chapter{\thu@resolution@name}%
+}{}
+% \end{macrocode}
+% \end{environment}
+%
% \subsection{综合论文训练记录表}
%
% \begin{macro}{\record}
@@ -5193,18 +5964,6 @@
}
% \end{macrocode}
%
-% \subsubsection{\pkg{longtable} 宏包}
-%
-% 我们采用 \pkg{longtable} 来处理跨页的表格。同样我们需要设置其默认字体为五号。
-% \begin{macrocode}
-\AtEndOfPackageFile*{longtable}{
- \pretocmd\LT@array{%
- \fontsize{11bp}{14.3bp}\selectfont
- \renewcommand\arraystretch{1.4}%
- }{}{\thu@patch@error{\LT@array}}
-}
-% \end{macrocode}
-%
% \subsubsection{\pkg{siunitx} 宏包}
%
% \begin{macrocode}
@@ -5224,7 +5983,7 @@
\else
\ifthu@language@english
\sisetup{
- list-final-separator = { and },
+ list-final-separator = {, and },
list-pair-separator = { and },
range-phrase = { to },
}%
@@ -5272,7 +6031,7 @@
}{%
\popQED\endtrivlist\@endpefalse
}
- \renewcommand\qedsymbol{\ensuremath{\QED}}
+ \renewcommand\qedsymbol{\thu@qed}
}
% \end{macrocode}
%
@@ -5283,7 +6042,7 @@
\AtEndOfPackageFile*{ntheorem}{%
\theorembodyfont{\normalfont}%
\theoremheaderfont{\normalfont\sffamily}%
- \theoremsymbol{\ensuremath{\QED}}%
+ \theoremsymbol{\thu@qed}%
\newtheorem*{proof}{\thu@proof@name}%
\theoremstyle{plain}%
\theoremsymbol{}%
@@ -5314,7 +6073,6 @@
\PassOptionsToPackage{chapter}{algorithm}
\AtEndOfPackageFile*{algorithm}{
\floatname{algorithm}{\thu@algorithm@name}
- \g@addto@macro\appendix{\renewcommand*{\thealgorithm}{\thechapter-\arabic{algorithm}}}
\renewcommand\listofalgorithms{%
\thu@listof{algorithm}%
}
@@ -5357,7 +6115,6 @@
%
% \begin{macrocode}
\AtEndOfPackageFile*{minted}{
- \g@addto@macro\appendix{\renewcommand*{\thelisting}{\thechapter-\arabic{listing}}}%
\newcommand\thu@set@listing@language{%
\ifthu@language@chinese
\floatname{listing}{代码}%
@@ -5541,7 +6298,6 @@
\setmainfont{Palatino}
\setsansfont[Scale=MatchLowercase]{Helvetica}
\setmonofont[Scale=MatchLowercase]{Menlo}
- \xeCJKsetwidth{‘’“”}{1em}
}{
\setmainfont[
Extension = .otf,
@@ -5571,6 +6327,7 @@
math-style=ISO,
bold-style=ISO,
}
+\DeclareRobustCommand\mathellipsis{\mathinner{\unicodecdots}}
\IfFontExistsTF{XITSMath-Regular.otf}{
\setmathfont[
Extension = .otf,
@@ -5679,6 +6436,15 @@
\newcommand{\note}[2][Note]{{%
\color{magenta}{\bfseries #1}\emph{#2}}}
+\g@addto@macro\UrlBreaks{%
+ \do0\do1\do2\do3\do4\do5\do6\do7\do8\do9%
+ \do\A\do\B\do\C\do\D\do\E\do\F\do\G\do\H\do\I\do\J\do\K\do\L\do\M
+ \do\N\do\O\do\P\do\Q\do\R\do\S\do\T\do\U\do\V\do\W\do\X\do\Y\do\Z
+ \do\a\do\b\do\c\do\d\do\e\do\f\do\g\do\h\do\i\do\j\do\k\do\l\do\m
+ \do\n\do\o\do\p\do\q\do\r\do\s\do\t\do\u\do\v\do\w\do\x\do\y\do\z
+}
+\Urlmuskip=0mu plus 0.1mu
+
\DeclareDocumentCommand{\githubuser}{m}{\href{https://github.com/#1}{@#1}}
\def\thuthesis{\textsc{Thu}\-\textsc{Thesis}}
diff --git a/Master/texmf-dist/source/latex/thuthesis/thuthesis.ins b/Master/texmf-dist/source/latex/thuthesis/thuthesis.ins
index 0dec4fcbdc3..05c5920b9e3 100644
--- a/Master/texmf-dist/source/latex/thuthesis/thuthesis.ins
+++ b/Master/texmf-dist/source/latex/thuthesis/thuthesis.ins
@@ -1,18 +1,17 @@
%%
-%% Copyright (C) 2005-2020 by Ruini Xue <xueruini@gmail.com>
+%% Copyright (C) 2005-2021 by Tsinghua University TUNA Association <tuna@tsinghua.edu.cn>
%%
%% This file is part of the ThuThesis package project.
%% ---------------------------------------------------
%%
%% This work may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either version 1.3
+%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%% The latest version of this license is in
-%% http://www.latex-project.org/lppl.txt
-%% and version 1.3 or later is part of all distributions of LaTeX
-%% version 2005/12/01 or later.
+%% https://www.latex-project.org/lppl.txt
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2008 or later.
%%
-%% This work has the LPPL maintenance status `maintained'.
\input docstrip
@@ -25,15 +24,15 @@
This is a generated file.
-Copyright (C) 2005-\the\year by Ruini Xue <xueruini@gmail.com>
+Copyright (C) 2005-\the\year by Tsinghua University TUNA Association <tuna@tsinghua.edu.cn>
This work may be distributed and/or modified under the
-conditions of the LaTeX Project Public License, either version 1.3
+conditions of the LaTeX Project Public License, either version 1.3c
of this license or (at your option) any later version.
The latest version of this license is in
- http://www.latex-project.org/lppl.txt
-and version 1.3 or later is part of all distributions of LaTeX
-version 2005/12/01 or later.
+ https://www.latex-project.org/lppl.txt
+and version 1.3c or later is part of all distributions of LaTeX
+version 2008 or later.
To produce the documentation run the original source files ending with `.dtx'
through LaTeX.
diff --git a/Master/texmf-dist/tex/latex/thuthesis/thuthesis-author-year.bbx b/Master/texmf-dist/tex/latex/thuthesis/thuthesis-author-year.bbx
index 47ec9ea8154..ebaa95d168e 100644
--- a/Master/texmf-dist/tex/latex/thuthesis/thuthesis-author-year.bbx
+++ b/Master/texmf-dist/tex/latex/thuthesis/thuthesis-author-year.bbx
@@ -18,3 +18,5 @@
\setlength{\parsep}{\bibparsep}}}
{\endlist}
{\item}
+
+\renewcommand*{\bibpagespunct}{\addcolon\addthinspace}
diff --git a/Master/texmf-dist/tex/latex/thuthesis/thuthesis-numeric.bbx b/Master/texmf-dist/tex/latex/thuthesis/thuthesis-numeric.bbx
index f0d6234effa..c732471bfed 100644
--- a/Master/texmf-dist/tex/latex/thuthesis/thuthesis-numeric.bbx
+++ b/Master/texmf-dist/tex/latex/thuthesis/thuthesis-numeric.bbx
@@ -25,3 +25,5 @@
\renewcommand*{\makelabel}[1]{\hss##1}}
{\endlist}
{\item}
+
+\renewcommand*{\bibpagespunct}{\addcolon}
diff --git a/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls b/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls
index ea7170ad6d1..ef40653f444 100644
--- a/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls
+++ b/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls
@@ -8,22 +8,22 @@
%%
%% This is a generated file.
%%
-%% Copyright (C) 2005-2020 by Ruini Xue <xueruini@gmail.com>
+%% Copyright (C) 2005-2021 by Tsinghua University TUNA Association <tuna@tsinghua.edu.cn>
%%
%% This work may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either version 1.3
+%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%% The latest version of this license is in
-%% http://www.latex-project.org/lppl.txt
-%% and version 1.3 or later is part of all distributions of LaTeX
-%% version 2005/12/01 or later.
+%% https://www.latex-project.org/lppl.txt
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2008 or later.
%%
%% To produce the documentation run the original source files ending with `.dtx'
%% through LaTeX.
%%
\NeedsTeXFormat{LaTeX2e}[2017/04/15]
\ProvidesClass{thuthesis}
-[2020/10/14 7.1.0 Tsinghua University Thesis Template]
+[2021/03/12 7.2.0 Tsinghua University Thesis Template]
\newcommand\thu@error[1]{%
\ClassError{thuthesis}{#1}{}%
}
@@ -56,7 +56,7 @@
}
\hyphenation{Thu-Thesis}
\def\thuthesis{ThuThesis}
-\def\version{7.1.0}
+\def\version{7.2.0}
\RequirePackage{kvdefinekeys}
\RequirePackage{kvsetkeys}
\RequirePackage{kvoptions}
@@ -64,8 +64,12 @@
family=thu,
prefix=thu@,
setkeys=\kvsetkeys}
+\let\thu@setup@hook\@empty
\newcommand\thusetup[1]{%
+ \let\thu@setup@hook\@empty
\kvsetkeys{thu}{#1}%
+ \thu@setup@hook
+ \thu@setup@hook
}
\newcommand\thu@define@key[1]{%
\kvsetkeys{thu@key}{#1}%
@@ -121,6 +125,14 @@
\expandafter\g@addto@macro\csname thu@#1@@code\endcsname{#2}%
}
\thu@define@key{
+ thesis-type = {
+ name = thesis@type,
+ choices = {
+ thesis,
+ proposal,
+ },
+ default = thesis,
+ },
degree = {
choices = {
bachelor,
@@ -150,33 +162,37 @@
english,
},
},
+ system = {
+ choices = {
+ auto,
+ mac,
+ unix,
+ windows,
+ },
+ default = auto,
+ },
fontset = {
choices = {
+ auto,
windows,
mac,
ubuntu,
fandol,
none,
},
- default = none,
- },
- system = {
- choices = {
- mac,
- unix,
- windows,
- auto,
- },
default = auto,
},
font = {
choices = {
+ auto,
times,
termes,
+ stix,
xits,
libertinus,
+ newcm,
lm,
- auto,
+ newtx,
none,
},
default = auto,
@@ -184,11 +200,11 @@
cjk-font = {
name = cjk@font,
choices = {
+ auto,
windows,
mac,
noto,
fandol,
- auto,
none,
},
default = auto,
@@ -196,13 +212,65 @@
math-font = {
name = math@font,
choices = {
+ auto,
xits,
stix,
libertinus,
+ newcm,
lm,
+ newtx,
none,
},
- default = xits,
+ default = auto,
+ },
+ math-style = {
+ name = math@style,
+ choices = {
+ GB,
+ ISO,
+ TeX,
+ },
+ },
+ uppercase-greek = {
+ name = uppercase@greek,
+ choices = {
+ italic,
+ upright,
+ },
+ },
+ less-than-or-equal = {
+ name = leq,
+ choices = {
+ slanted,
+ horizontal,
+ },
+ },
+ integral = {
+ choices = {
+ upright,
+ slanted,
+ },
+ },
+ integral-limits = {
+ name = integral@limits,
+ choices = {
+ true,
+ false,
+ },
+ },
+ partial = {
+ choices = {
+ upright,
+ italic,
+ },
+ },
+ math-ellipsis = {
+ name = math@ellipsis,
+ choices = {
+ centered,
+ lower,
+ AMS,
+ },
},
output = {
choices = {
@@ -236,7 +304,7 @@
\else
\PassOptionsToClass{openany}{book}
\fi
-\PassOptionsToPackage{quiet}{fontspec}
+\PassOptionsToPackage{no-math}{fontspec}
\LoadClass[a4paper,UTF8,zihao=-4,scheme=plain,fontset=none]{ctexbook}[2017/04/01]
\RequirePackage{etoolbox}
\RequirePackage{filehook}
@@ -246,7 +314,6 @@
\RequirePackage{titletoc}
\RequirePackage{notoccite}
\RequirePackage{amsmath}
-\RequirePackage{unicode-math}
\RequirePackage{graphicx}
\RequirePackage[labelformat=simple]{subcaption}
\RequirePackage{pdfpages}
@@ -276,11 +343,23 @@
\RequirePackage{bibunits}
}
}
-\newcommand\thu@package@conflict[2]{
- \AtBeginOfPackageFile*{#2}{
- \thu@error{The "#2" package is incompatible with required "#1"}
+\newcommand\thu@package@conflict[2]{%
+ \AtEndOfPackageFile*{#1}{%
+ \AtBeginOfPackageFile*{#2}{%
+ \thu@error{The "#2" package is incompatible with "#1"}%
+ }%
+ }%
}
-}
+\thu@package@conflict{biblatex}{bibunits}
+\thu@package@conflict{biblatex}{chapterbib}
+\thu@package@conflict{biblatex}{cite}
+\thu@package@conflict{biblatex}{multibib}
+\thu@package@conflict{biblatex}{natbib}
+
+\thu@package@conflict{bibunits}{biblatex}
+\thu@package@conflict{bibunits}{chapterbib}
+\thu@package@conflict{bibunits}{multibib}
+
\thu@package@conflict{unicode-math}{amscd}
\thu@package@conflict{unicode-math}{amsfonts}
\thu@package@conflict{unicode-math}{amssymb}
@@ -289,6 +368,16 @@
\thu@package@conflict{unicode-math}{eucal}
\thu@package@conflict{unicode-math}{eufrak}
\thu@package@conflict{unicode-math}{mathrsfs}
+\thu@package@conflict{unicode-math}{newtxmath}
+\thu@package@conflict{unicode-math}{upgreek}
+
+\thu@package@conflict{natbib}{biblatex}
+\thu@package@conflict{natbib}{cite}
+
+\thu@package@conflict{newtxmath}{amsfonts}
+\thu@package@conflict{newtxmath}{amssymb}
+\thu@package@conflict{newtxmath}{unicode-math}
+\thu@package@conflict{newtxmath}{upgreek}
\geometry{
paper = a4paper, % 210 * 297mm
marginparwidth = 2cm,
@@ -327,68 +416,156 @@
\thu@set@geometry
\thu@option@hook{degree}{\thu@set@geometry}
\thu@option@hook{output}{\thu@set@geometry}
-\def\cleardoublepage{%
- \clearpage
- \if@twoside
- \ifthu@output@print
- \ifodd\c@page
+\thusetup{main-language=\thu@language}%
+\let\thu@main@language\thu@language
+\thu@option@hook{language}{%
+ \ifx\@begindocumenthook\@undefined\else
+ \thusetup{main-language=\thu@language}%
+ \let\thu@main@language\thu@language
+ \fi
+}
+\newcommand\thu@reset@main@language{%
+ \thusetup{language = \thu@main@language}%
+ \let\thu@language\thu@main@language
+}
+\newcommand\thu@set@chapter@names{%
+ \ifthu@main@language@chinese
+ \def\thu@comments@name{指导教师学术评语}%
+ \def\bibname{参考文献}%
+ \def\appendixname{附录}%
+ \def\indexname{索引}%
+ \def\thu@resolution@name{答辩委员会决议书}%
+ \ifthu@degree@bachelor
+ \def\contentsname{目\qquad 录}%
+ \def\listfigurename{插图索引}%
+ \def\listtablename{表格索引}%
+ \def\thu@list@figure@table@name{插图和附表索引}%
+ \def\thu@list@algorithm@name{算法索引}%
+ \def\thu@acknowledgements@name{致\qquad 谢}%
+ \def\listequationname{公式索引}%
+ \def\thu@denotation@name{主要符号对照表}%
+ \def\thu@resume@name{在学期间参加课题的研究成果}%
+ \else
+ \def\listfigurename{插图清单}%
+ \def\listtablename{附表清单}%
+ \def\thu@list@figure@table@name{插图和附表清单}%
+ \def\thu@list@algorithm@name{算法清单}%
+ \def\listequationname{公式清单}%
+ \def\thu@acknowledgements@name{致\quad 谢}%
+ \ifthu@degree@graduate
+ \def\contentsname{目\quad 录}%
+ \def\thu@denotation@name{符号和缩略语说明}%
+ \def\thu@resume@name{个人简历、在学期间完成的相关学术成果}%
+ \else % degree = postdoc
+ \def\contentsname{目\qquad 次}%
+ \def\thu@denotation@name{符号表}%
+ \def\thu@resume@name{个人简历、发表的学术论文与科研成果}%
+ \fi
+ \fi
+ \else
+ \ifthu@main@language@english
+ \def\thu@comments@name{Comments from Thesis Supervisor}%
+ \def\thu@resolution@name{Resolution of Thesis Defense Committee}%
+ \def\indexname{Index}%
+ \ifthu@degree@bachelor
+ \def\contentsname{CONTENTS}%
+ \def\listfigurename{FIGURES}%
+ \def\listtablename{TABLES}%
+ \def\thu@list@figure@table@name{FIGURES AND TABLES}%
+ \def\thu@list@algorithm@name{ALGORITHMS}%
+ \def\listequationname{EQUATIONS}%
+ \def\thu@denotation@name{ABBREVIATIONS}%
+ \def\bibname{REFERENCES}%
+ \def\appendixname{APPENDIX}%
+ \def\thu@acknowledgements@name{ACKNOWLEDGEMENTS}%
+ \def\thu@resume@name{PUBLICATIONS}%
\else
- \thispagestyle{empty}%
- \hbox{}%
- \newpage
- \if@twocolumn
- \hbox{}\newpage
- \fi
+ \def\contentsname{Table of Contents}%
+ \def\listfigurename{List of Figures}%
+ \def\listtablename{List of Tables}%
+ \def\thu@list@figure@table@name{List of Figures and Tables}%
+ \def\thu@list@algorithm@name{List of Algorithms}%
+ \def\listequationname{List of Equations}%
+ \def\thu@denotation@name{List of Symbols and Acronyms}%
+ \def\bibname{References}%
+ \def\appendixname{Appendix}%
+ \def\thu@acknowledgements@name{Acknowledgements}%
+ \def\thu@resume@name{Resume}%
\fi
\fi
\fi
}
-\renewcommand\frontmatter{%
- \cleardoublepage
- \@mainmatterfalse
- \pagenumbering{Roman}%
-}
-\renewcommand\mainmatter{%
- \cleardoublepage
- \@mainmattertrue
- \pagenumbering{arabic}%
-}
-\renewcommand\backmatter{%
- \if@openright
- \cleardoublepage
+\thu@set@chapter@names
+\thu@option@hook{degree}{\thu@set@chapter@names}
+\thu@option@hook{main-language}{\thu@set@chapter@names}
+\newcommand\thu@set@names{%
+ \ifthu@language@chinese
+ \ctexset{
+ figurename = 图,
+ tablename = 表,
+ }%
+ \def\thu@algorithm@name{算法}%
+ \def\thu@equation@name{公式}%
+ \def\thu@assumption@name{假设}%
+ \def\thu@definition@name{定义}%
+ \def\thu@proposition@name{命题}%
+ \def\thu@lemma@name{引理}%
+ \def\thu@theorem@name{定理}%
+ \def\thu@axiom@name{公理}%
+ \def\thu@corollary@name{推论}%
+ \def\thu@exercise@name{练习}%
+ \def\thu@example@name{例}%
+ \def\thu@remark@name{注释}%
+ \def\thu@problem@name{问题}%
+ \def\thu@conjecture@name{猜想}%
+ \def\thu@proof@name{证明}%
+ \def\thu@theorem@separator{:}%
\else
- \clearpage
+ \ifthu@language@english
+ \ctexset{
+ figurename = {Figure},
+ tablename = {Table},
+ }%
+ \def\thu@algorithm@name{Algorithm}%
+ \def\thu@equation@name{Equation}%
+ \def\thu@assumption@name{Assumption}%
+ \def\thu@definition@name{Definition}%
+ \def\thu@proposition@name{Proposition}%
+ \def\thu@lemma@name{Lemma}%
+ \def\thu@theorem@name{Theorem}%
+ \def\thu@axiom@name{Axiom}%
+ \def\thu@corollary@name{Corollary}%
+ \def\thu@exercise@name{Exercise}%
+ \def\thu@example@name{Example}%
+ \def\thu@remark@name{Remark}%
+ \def\thu@problem@name{Problem}%
+ \def\thu@conjecture@name{Conjecture}%
+ \def\thu@proof@name{Proof}%
+ \def\thu@theorem@separator{: }%
+ \fi
\fi
- \@mainmatterfalse
- \thusetup{toc-depth = 0}%
}
-\ifthu@fontset@mac
- \thusetup{
- font = times,
- cjk-font = mac,
- }
-\else
- \ifthu@fontset@windows
- \thusetup{
- font = times,
- cjk-font = windows,
- }
+\thu@set@names
+\thu@option@hook{language}{\thu@set@names}
+\xeCJKDeclareCharClass{CJK}{"2460 -> "2473}
+\xeCJKDeclareCharClass{CJK}{"2605}
+\newcommand\thu@set@punctuations{%
+ \ifthu@language@chinese
+ \xeCJKDeclareCharClass{FullLeft}{"2018, "201C}%
+ \xeCJKDeclareCharClass{FullRight}{
+ "00B7, "2019, "201D, "2013, "2014, "2025, "2026, "2E3A,
+ }%
\else
- \ifthu@fontset@fandol
- \thusetup{
- font = termes,
- cjk-font = fandol,
- }
- \else
- \ifthu@fontset@ubuntu
- \thusetup{
- font = termes,
- cjk-font = noto,
- }
- \fi
+ \ifthu@language@english
+ \xeCJKDeclareCharClass{HalfLeft}{"2018, "201C}%
+ \xeCJKDeclareCharClass{HalfRight}{
+ "00B7, "2019, "201D, "2013, "2014, "2025, "2026, "2E3A,
+ }%
\fi
\fi
-\fi
+}
+\thu@set@punctuations
+\thu@option@hook{language}{\thu@set@punctuations}
\ifthu@system@auto
\IfFileExists{/System/Library/Fonts/Menlo.ttc}{
\thusetup{system = mac}
@@ -404,6 +581,48 @@
}
}
\fi
+\ifthu@fontset@auto
+ \ifthu@system@windows
+ \thusetup{fontset = windows}
+ \else
+ \IfFontExistsTF{SimSun}{
+ \thusetup{fontset = windows}
+ }{
+ \ifthu@system@mac
+ \thusetup{fontset = mac}
+ \else
+ \IfFontExistsTF{Noto Serif CJK SC}{
+ \thusetup{fontset = ubuntu}
+ }{
+ \thusetup{fontset = fandol}
+ }
+ \fi
+ }
+ \fi
+\fi
+\ifthu@font@auto
+ \ifthu@fontset@windows
+ \thusetup{font=times}
+ \else
+ \ifthu@fontset@mac
+ \thusetup{font=times}
+ \else
+ \thusetup{font=termes}
+ \fi
+ \fi
+\fi
+\let\thu@font@family@stix\@empty
+\newcommand\thu@set@stix@names{%
+ \ifx\thu@font@family@stix\@empty
+ \IfFontExistsTF{STIXTwoText-Regular.otf}{%
+ \gdef\thu@font@family@stix{STIXTwoText}%
+ \gdef\thu@font@name@stix@math{STIXTwoMath-Regular}%
+ }{%
+ \gdef\thu@font@family@stix{STIX2Text}%
+ \gdef\thu@font@name@stix@math{STIX2Math}%
+ }%
+ \fi
+}
\let\thu@font@family@xits\@empty
\newcommand\thu@set@xits@names{%
\ifx\thu@font@family@xits\@empty
@@ -413,16 +632,14 @@
\gdef\thu@font@style@xits@bf{Bold}%
\gdef\thu@font@style@xits@it{Italic}%
\gdef\thu@font@style@xits@bfit{BoldItalic}%
- \gdef\thu@font@name@xits@math@rm{XITSMath-Regular}%
- \gdef\thu@font@name@xits@math@bf{XITSMath-Bold}%
+ \gdef\thu@font@name@xits@math{XITSMath-Regular}%
}{%
\gdef\thu@font@family@xits{xits}%
\gdef\thu@font@style@xits@rm{regular}%
\gdef\thu@font@style@xits@bf{bold}%
\gdef\thu@font@style@xits@it{italic}%
\gdef\thu@font@style@xits@bfit{bolditalic}%
- \gdef\thu@font@name@xits@math@rm{xits-math}%
- \gdef\thu@font@name@xits@math@bf{xits-mathbold}%
+ \gdef\thu@font@name@xits@math{xits-math}%
}%
\fi
}
@@ -448,14 +665,7 @@
}%
\fi
}
-\ifthu@font@auto
- \ifthu@system@unix
- \thusetup{font=termes}
- \else
- \thusetup{font=times}
- \fi
-\fi
-\newcommand\thu@load@font@times{%
+\newcommand\thu@set@font@times{%
\setmainfont{Times New Roman}%
\setsansfont{Arial}%
\ifthu@system@mac
@@ -464,7 +674,7 @@
\setmonofont{Courier New}[Scale = MatchLowercase]%
\fi
}
-\newcommand\thu@load@font@termes{%
+\newcommand\thu@set@font@termes{%
\setmainfont{texgyretermes}[
Extension = .otf,
UprightFont = *-regular,
@@ -472,9 +682,9 @@
ItalicFont = *-italic,
BoldItalicFont = *-bolditalic,
]%
- \thu@load@texgyre@sans@mono
+ \thu@set@texgyre@sans@mono
}
-\newcommand\thu@load@texgyre@sans@mono{%
+\newcommand\thu@set@texgyre@sans@mono{%
\setsansfont{texgyreheros}[
Extension = .otf,
UprightFont = *-regular,
@@ -491,7 +701,18 @@
Ligatures = CommonOff,
]%
}
-\newcommand\thu@load@font@xits{%
+\newcommand\thu@set@font@stix{%
+ \thu@set@stix@names
+ \setmainfont{\thu@font@family@stix}[
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Italic,
+ BoldItalicFont = *-BoldItalic,
+ ]%
+ \thu@set@texgyre@sans@mono
+}
+\newcommand\thu@set@font@xits{%
\thu@set@xits@names
\setmainfont{\thu@font@family@xits}[
Extension = .otf,
@@ -500,9 +721,9 @@
ItalicFont = *-\thu@font@style@xits@it,
BoldItalicFont = *-\thu@font@style@xits@bfit,
]%
- \thu@load@texgyre@sans@mono
+ \thu@set@texgyre@sans@mono
}
-\newcommand\thu@load@font@libertinus{%
+\newcommand\thu@set@font@libertinus{%
\thu@set@libertinus@names
\setmainfont{\thu@font@family@libertinus@serif}[
Extension = .otf,
@@ -525,7 +746,30 @@
BoldItalicFont = *-boldoblique,
]%
}
-\@namedef{thu@load@font@lm}{%
+\newcommand\thu@set@font@newcm{%
+ \setmathrm{NewCM10}[
+ Extension = .otf,
+ UprightFont = *-Book,
+ BoldFont = *-Bold,
+ ItalicFont = *-BookItalic,
+ BoldItalicFont = *-BoldItalic,
+ ]%
+ \setmathsf{NewCMSans10}[
+ Extension = .otf,
+ UprightFont = *-Book,
+ BoldFont = *-Bold,
+ ItalicFont = *-BookOblique,
+ BoldItalicFont = *-BoldOblique,
+ ]%
+ \setmathtt{NewCMMono10}[
+ Extension = .otf,
+ UprightFont = *-Book,
+ ItalicFont = *-BookItalic,
+ BoldFont = *-Bold,
+ BoldItalicFont = *-BoldOblique,
+ ]%
+}
+\newcommand\thu@set@font@lm{%
\setmainfont{lmroman10}[
Extension = .otf,
UprightFont = *-regular,
@@ -548,69 +792,31 @@
BoldItalicFont = *-boldoblique,
]%
}
-\newcommand\thu@load@font{%
- \@nameuse{thu@load@font@\thu@font}%
-}
-\thu@load@font
-\thu@option@hook{font}{\thu@load@font}
-\unimathsetup{
- math-style = ISO,
- bold-style = ISO,
- nabla = upright,
- partial = upright,
-}
-\newcommand\thu@load@math@font@xits{%
- \thu@set@xits@names
- \setmathfont{\thu@font@name@xits@math@rm}[
- Extension = .otf,
- BoldFont = \thu@font@name@xits@math@bf,
- StylisticSet = 8,
- ]%
- \setmathfont{\thu@font@name@xits@math@rm}[
- Extension = .otf,
- StylisticSet = 1,
- range = {cal,bfcal},
- ]%
-}
-\newcommand\thu@load@math@font@stix{%
- \setmathfont{STIX2Math}[
- Extension = .otf,
- StylisticSet = 8,
- ]%
- \setmathfont{STIX2Math}[
- Extension = .otf,
- StylisticSet = 1,
- range = {cal,bfcal},
- ]%
-}
-\newcommand\thu@load@math@font@libertinus{%
- \thu@set@libertinus@names
- \setmathfont{\thu@font@name@libertinus@math .otf}%
-}
-\newcommand\thu@load@math@font@lm{%
- \setmathfont{latinmodern-math.otf}%
+\newcommand\thu@set@font@newtx{%
+ \RequirePackage{newtxtext}%
}
-\newcommand\thu@load@math@font{%
- \@nameuse{thu@load@math@font@\thu@math@font}
+\newcommand\thu@set@font{%
+ \@nameuse{thu@set@font@\thu@font}%
}
-\thu@load@math@font
-\thu@option@hook{math-font}{\thu@load@math@font}
+\thu@set@font
+\thu@option@hook{font}{\thu@set@font}
\ifthu@cjk@font@auto
- \ifthu@system@mac
+ \ifthu@fontset@mac
\thusetup{cjk-font = mac}
\else
- \ifthu@system@windows
+ \ifthu@fontset@windows
\thusetup{cjk-font = windows}
\else
- \IfFontExistsTF{Noto Serif CJK SC}{
+ \ifthu@fontset@ubuntu
\thusetup{cjk-font = noto}
- }{
+ \else
\thusetup{cjk-font = fandol}
- }
+ \fi
\fi
\fi
\fi
-\newcommand\thu@load@cjk@font@windows{%
+\newcommand\thu@set@cjk@font@windows{%
+ \defaultCJKfontfeatures{Script=CJK}%
\xeCJKsetup{EmboldenFactor=3}%
\setCJKmainfont{SimSun}[
AutoFakeBold = true,
@@ -623,7 +829,8 @@
\setCJKfamilyfont{zhkai}{KaiTi}%
\setCJKfamilyfont{zhfs}{FangSong}%
}
-\newcommand\thu@load@cjk@font@mac{%
+\newcommand\thu@set@cjk@font@mac{%
+ \defaultCJKfontfeatures{}%
\setCJKmainfont{Songti SC}[
UprightFont = * Light,
BoldFont = * Bold,
@@ -648,34 +855,42 @@
BoldFont = * Bold,
]%
}
-\newcommand\thu@load@cjk@font@noto{%
+\newcommand\thu@set@cjk@font@noto{%
+ \defaultCJKfontfeatures{}%
\setCJKmainfont{Noto Serif CJK SC}[
UprightFont = * Light,
BoldFont = * Bold,
ItalicFont = FandolKai-Regular,
ItalicFeatures = {Extension = .otf},
+ Script = CJK,
]%
\setCJKsansfont{Noto Sans CJK SC}[
- BoldFont = * Medium,
+ BoldFont = * Medium,
+ Script = CJK,
+ ]%
+ \setCJKmonofont{Noto Sans Mono CJK SC}[
+ Script = CJK,
]%
- \setCJKmonofont{Noto Sans Mono CJK SC}%
\setCJKfamilyfont{zhsong}{Noto Serif CJK SC}[
- UprightFont = * Light,
- UprightFont = * Bold,
+ UprightFont = * Light,
+ UprightFont = * Bold,
+ Script = CJK,
]%
\setCJKfamilyfont{zhhei}{Noto Sans CJK SC}[
- BoldFont = * Medium,
+ BoldFont = * Medium,
+ Script = CJK,
]%
\setCJKfamilyfont{zhfs}{FandolFang}[
- Extension = .otf,
- UprightFont = *-Regular,
+ Extension = .otf,
+ UprightFont = *-Regular,
]%
\setCJKfamilyfont{zhkai}{FandolKai}[
- Extension = .otf,
- UprightFont = *-Regular,
+ Extension = .otf,
+ UprightFont = *-Regular,
]%
}
-\newcommand\thu@load@cjk@font@fandol{%
+\newcommand\thu@set@cjk@font@fandol{%
+ \defaultCJKfontfeatures{}%
\setCJKmainfont{FandolSong}[
Extension = .otf,
UprightFont = *-Regular,
@@ -716,11 +931,326 @@
\providecommand\fangsong{\CJKfamily{zhfs}}
\providecommand\kaishu{\CJKfamily{zhkai}}
\fi
-\newcommand\thu@load@cjk@font{%
- \@nameuse{thu@load@cjk@font@\thu@cjk@font}%
+\newcommand\thu@set@cjk@font{%
+ \@nameuse{thu@set@cjk@font@\thu@cjk@font}%
+}
+\thu@set@cjk@font
+\thu@option@hook{cjk-font}{\thu@set@cjk@font}
+\newcommand\thu@set@math@style{%
+ \ifthu@math@style@TeX
+ \thusetup{
+ uppercase-greek = upright,
+ less-than-or-equal = horizontal,
+ integral = slanted,
+ integral-limits = false,
+ partial = italic,
+ math-ellipsis = AMS,
+ }%
+ \else
+ \thusetup{
+ uppercase-greek = italic,
+ integral = upright,
+ integral-limits = true,
+ partial = upright,
+ }%
+ \ifthu@math@style@ISO
+ \thusetup{
+ less-than-or-equal = horizontal,
+ math-ellipsis = lower,
+ }%
+ \else
+ \ifthu@math@style@GB
+ \thusetup{
+ less-than-or-equal = slanted,
+ math-ellipsis = centered,
+ }%
+ \fi
+ \fi
+ \fi
+}
+\ifthu@main@language@chinese
+ \thusetup{math-style=GB}%
+\else
+ \thusetup{math-style=TeX}%
+\fi
+\thu@set@math@style
+\thu@option@hook{math-style}{\thu@set@math@style}
+\thu@option@hook{main-language}{%
+ \ifthu@main@language@chinese
+ \thusetup{math-style=GB}%
+ \else
+ \thusetup{math-style=TeX}%
+ \fi
+}
+\newcommand\thu@set@unimath@leq{%
+ \ifthu@leq@horizontal
+ \ifx\@begindocumenthook\@undefined
+ \let\le\thu@save@leq
+ \let\ge\thu@save@geq
+ \let\leq\thu@save@leq
+ \let\geq\thu@save@geq
+ \else
+ \AtBeginDocument{%
+ \let\le\thu@save@leq
+ \let\ge\thu@save@geq
+ \let\leq\thu@save@leq
+ \let\geq\thu@save@geq
+ }%
+ \fi
+ \else
+ \ifthu@leq@slanted
+ \ifx\@begindocumenthook\@undefined
+ \let\le\leqslant
+ \let\ge\geqslant
+ \let\leq\leqslant
+ \let\geq\geqslant
+ \else
+ \AtBeginDocument{%
+ \let\le\leqslant
+ \let\ge\geqslant
+ \let\leq\leqslant
+ \let\geq\geqslant
+ }%
+ \fi
+ \fi
+ \fi
+}
+\newcommand\thu@set@unimath@integral@limits{%
+ \ifthu@integral@limits@true
+ \removenolimits{%
+ \int\iint\iiint\iiiint\oint\oiint\oiiint
+ \intclockwise\varointclockwise\ointctrclockwise\sumint
+ \intbar\intBar\fint\cirfnint\awint\rppolint
+ \scpolint\npolint\pointint\sqint\intlarhk\intx
+ \intcap\intcup\upint\lowint
+ }%
+ \else
+ \addnolimits{%
+ \int\iint\iiint\iiiint\oint\oiint\oiiint
+ \intclockwise\varointclockwise\ointctrclockwise\sumint
+ \intbar\intBar\fint\cirfnint\awint\rppolint
+ \scpolint\npolint\pointint\sqint\intlarhk\intx
+ \intcap\intcup\upint\lowint
+ }%
+ \fi
+}
+\newcommand\thu@set@unimath@ellipsis{%
+ \ifthu@math@ellipsis@centered
+ \DeclareRobustCommand\mathellipsis{\mathinner{\unicodecdots}}%
+ \else
+ \DeclareRobustCommand\mathellipsis{\mathinner{\unicodeellipsis}}%
+ \fi
+}
+\newcommand\thu@set@unimath@style{%
+ \ifthu@uppercase@greek@upright
+ \unimathsetup{math-style = TeX}%
+ \else
+ \ifthu@uppercase@greek@italic
+ \unimathsetup{math-style = ISO}%
+ \fi
+ \fi
+ \ifthu@math@style@TeX
+ \unimathsetup{bold-style = TeX}%
+ \else
+ \unimathsetup{bold-style = ISO}%
+ \fi
+ \thu@set@unimath@leq
+ \thu@set@unimath@integral@limits
+ \ifthu@partial@upright
+ \unimathsetup{partial = upright}%
+ \else
+ \ifthu@partial@italic
+ \unimathsetup{partial = italic}%
+ \fi
+ \fi
+ \thu@set@unimath@ellipsis
+}
+\newcommand\thu@qed{\rule{1ex}{1ex}}
+\newcommand\thu@load@unimath{%
+ \@ifpackageloaded{unicode-math}{}{%
+ \RequirePackage{unicode-math}%
+ \AtBeginDocument{%
+ \let\thu@save@leq\leq
+ \let\thu@save@geq\geq
+ }%
+ \DeclareRobustCommand\bm[1]{{\symbfit{##1}}}%
+ \DeclareRobustCommand\boldsymbol[1]{{\symbfit{##1}}}%
+ \newcommand\square{\mdlgwhtsquare}%
+ \newcommand\blacksquare{\mdlgblksquare}%
+ \AtBeginDocument{%
+ \renewcommand\checkmark{\ensuremath{✓}}%
+ }%
+ \renewcommand\thu@qed{\ensuremath{\QED}}%
+ }%
+}
+\newcommand\thu@xits@integral@stylistic@set{%
+ \ifthu@integral@upright
+ 8%
+ \fi
+}
+\newcommand\thu@set@math@font@xits{%
+ \thu@set@xits@names
+ \setmathfont{\thu@font@name@xits@math}[
+ Extension = .otf,
+ StylisticSet = \thu@xits@integral@stylistic@set,
+ ]%
+ \setmathfont{\thu@font@name@xits@math}[
+ Extension = .otf,
+ StylisticSet = 1,
+ range = {cal,bfcal},
+ ]%
+}
+\newcommand\thu@set@math@font@stix{%
+ \thu@set@stix@names
+ \setmathfont{\thu@font@name@stix@math}[
+ Extension = .otf,
+ StylisticSet = \thu@xits@integral@stylistic@set,
+ ]%
+ \setmathfont{\thu@font@name@stix@math}[
+ Extension = .otf,
+ StylisticSet = 1,
+ range = {scr,bfscr},
+ ]%
+}
+\newcommand\thu@libertinus@integral@stylistic@set{%
+ \ifthu@integral@italic
+ 8%
+ \fi
}
-\thu@load@cjk@font
-\thu@option@hook{cjk-font}{\thu@load@cjk@font}
+\newcommand\thu@set@math@font@libertinus{%
+ \thu@set@libertinus@names
+ \setmathfont{\thu@font@name@libertinus@math .otf}%
+}
+\newcommand\thu@set@math@font@lm{%
+ \setmathfont{latinmodern-math}[Extension=.otf]%
+ \setmathrm{lmroman10}[
+ Extension = .otf,
+ UprightFont = *-regular,
+ BoldFont = *-bold,
+ ItalicFont = *-italic,
+ BoldItalicFont = *-bolditalic,
+ ]%
+ \setmathsf{lmsans10}[
+ Extension = .otf,
+ UprightFont = *-regular,
+ BoldFont = *-bold,
+ ItalicFont = *-oblique,
+ BoldItalicFont = *-boldoblique,
+ ]%
+ \setmathtt{lmmonolt10}[
+ Extension = .otf,
+ UprightFont = *-regular,
+ BoldFont = *-bold,
+ ItalicFont = *-oblique,
+ BoldItalicFont = *-boldoblique,
+ ]%
+}
+\newcommand\thu@newcm@integral@stylistic@set{%
+ \ifthu@integral@upright
+ 2%
+ \fi
+}
+\newcommand\thu@set@math@font@newcm{%
+ \setmathfont{NewCMMath-Book}[
+ Extension = .otf,
+ StylisticSet = \thu@newcm@integral@stylistic@set,
+ ]%
+ \setmathfont{NewCMMath-Book}[
+ Extension = .otf,
+ StylisticSet = 1,
+ range = {scr,bfscr},
+ ]%
+ \setmathrm{NewCM10}[
+ Extension = .otf,
+ UprightFont = *-Book,
+ BoldFont = *-Bold,
+ ItalicFont = *-BookItalic,
+ BoldItalicFont = *-BoldItalic,
+ ]%
+ \setmathsf{NewCMSans10}[
+ Extension = .otf,
+ UprightFont = *-Book,
+ BoldFont = *-Bold,
+ ItalicFont = *-BookOblique,
+ BoldItalicFont = *-BoldOblique,
+ ]%
+ \setmathtt{NewCMMono10}[
+ Extension = .otf,
+ UprightFont = *-Book,
+ ItalicFont = *-BookItalic,
+ BoldFont = *-Bold,
+ BoldItalicFont = *-BoldOblique,
+ ]%
+}
+\newcommand\thu@set@math@font@newtx{%
+ \ifthu@font@newtx\else
+ \let\thu@save@encodingdefault\encodingdefault
+ \let\thu@save@rmdefault\rmdefault
+ \let\thu@save@sfdefault\sfdefault
+ \let\thu@save@ttdefault\ttdefault
+ \RequirePackage[T1]{fontenc}%
+ \renewcommand{\rmdefault}{ntxtlf}%
+ \renewcommand{\sfdefault}{qhv}%
+ \renewcommand{\ttdefault}{ntxtt}%
+ \fi
+ \ifthu@uppercase@greek@italic
+ \PassOptionsToPackage{slantedGreek}{newtxmath}%
+ \fi
+ \ifthu@integral@upright
+ \PassOptionsToPackage{upint}{newtxmath}%
+ \fi
+ \RequirePackage{newtxmath}
+ \let\thu@save@leq\leq
+ \let\thu@save@geq\geq
+ \ifthu@leq@slanted
+ \let\le\leqslant
+ \let\ge\geqslant
+ \let\leq\leqslant
+ \let\geq\geqslant
+ \fi
+ \ifthu@integral@limits@true
+ \let\ilimits@\displaylimits
+ \fi
+ \let\thu@save@partial\partial
+ \ifthu@partial@upright
+ \let\partial\uppartial
+ \fi
+ \ifthu@math@ellipsis@centered
+ \DeclareRobustCommand\mathellipsis{\mathinner{\cdotp\cdotp\cdotp}}%
+ \else
+ \DeclareRobustCommand\mathellipsis{\mathinner{\ldotp\ldotp\ldotp}}%
+ \fi
+ \RequirePackage{bm}%
+ \ifthu@font@newtx\else
+ \let\encodingdefault\thu@save@encodingdefault
+ \let\rmdefault\thu@save@rmdefault
+ \let\sfdefault\thu@save@sfdefault
+ \let\ttdefault\thu@save@ttdefault
+ \fi
+ \DeclareRobustCommand\symup[1]{{\mathrm{##1}}}%
+ \DeclareRobustCommand\symbf[1]{{\bm{##1}}}%
+ \let\increment\upDelta%
+ \renewcommand\thu@qed{\openbox}%
+}
+\newcommand\thu@set@math@font{%
+ \ifthu@math@font@none\else
+ \ifthu@math@font@newtx
+ \thu@set@math@font@newtx
+ \else
+ \thu@load@unimath
+ \thu@set@unimath@style
+ \@nameuse{thu@set@math@font@\thu@math@font}%
+ \fi
+ \fi
+}
+\thu@option@hook{math-font}{\g@addto@macro\thu@setup@hook{\thu@set@math@font}}
+\newcommand\thu@set@math@font@auto{%
+ \ifthu@math@font@auto
+ \thusetup{math-font=xits}%
+ \fi
+}
+\AtBeginOfPackageFile*{siunitx}{\thu@set@math@font@auto}
+\AtEndPreamble{\thu@set@math@font@auto}
\renewcommand\normalsize{%
\@setfontsize\normalsize{12bp}{20bp}%
\abovedisplayskip 6bp%
@@ -780,157 +1310,41 @@
\thu@def@fontsize{xiaoliu}{6.5bp}
\thu@def@fontsize{qihao}{5.5bp}
\thu@def@fontsize{bahao}{5bp}
-\thusetup{main-language=\thu@language}%
-\let\thu@main@language\thu@language
-\thu@option@hook{language}{%
- \ifx\@begindocumenthook\@undefined\else
- \thusetup{main-language=\thu@language}%
- \let\thu@main@language\thu@language
- \fi
-}
-\newcommand\thu@reset@main@language{%
- \thusetup{language = \thu@main@language}%
- \let\thu@language\thu@main@language
-}
-\newcommand\thu@set@chapter@names{%
- \ifthu@main@language@chinese
- \ctexset{
- chapter/name = {第,章},
- }%
- \def\bibname{参考文献}%
- \def\appendixname{附录}%
- \def\indexname{索引}%
- \def\thu@acknowledgements@name{致\quad 谢}%
- \ifthu@degree@bachelor
- \def\contentsname{目\quad 录}%
- \def\listfigurename{插图索引}%
- \def\listtablename{表格索引}%
- \def\thu@list@figure@table@name{插图和附表索引}%
- \def\thu@list@algorithm@name{算法索引}%
- \def\listequationname{公式索引}%
- \def\thu@denotation@name{主要符号对照表}%
- \def\thu@resume@name{在学期间参加课题的研究成果}%
- \else
- \def\listfigurename{插图清单}%
- \def\listtablename{附表清单}%
- \def\thu@list@figure@table@name{插图和附表清单}%
- \def\thu@list@algorithm@name{算法清单}%
- \def\listequationname{公式清单}%
- \ifthu@degree@graduate
- \def\contentsname{目\quad 录}%
- \def\thu@denotation@name{符号和缩略语说明}%
- \def\thu@resume@name{个人简历、在学期间完成的相关学术成果}%
- \else % degree = postdoc
- \def\contentsname{目\qquad 次}%
- \def\thu@denotation@name{符号表}%
- \def\thu@resume@name{个人简历、发表的学术论文与科研成果}%
- \fi
- \fi
- \else
- \ifthu@main@language@english
- \ctexset{
- chapter/name = \chaptername\space,
- }%
- \def\indexname{Index}%
- \ifthu@degree@bachelor
- \def\contentsname{CONTENTS}%
- \def\listfigurename{FIGURES}%
- \def\listtablename{TABLES}%
- \def\thu@list@figure@table@name{FIGURES AND TABLES}%
- \def\thu@list@algorithm@name{ALGORITHMS}%
- \def\listequationname{EQUATIONS}%
- \def\thu@denotation@name{ABBREVIATIONS}%
- \def\bibname{REFERENCES}%
- \def\appendixname{APPENDIX}%
- \def\thu@acknowledgements@name{ACKNOWLEDGEMENTS}%
- \def\thu@resume@name{PUBLICATIONS}%
+\def\cleardoublepage{%
+ \clearpage
+ \if@twoside
+ \ifthu@output@print
+ \ifodd\c@page
\else
- \def\contentsname{Contents}%
- \def\listfigurename{List of Figures}%
- \def\listtablename{List of Tables}%
- \def\thu@list@figure@table@name{List of Figures and Tables}%
- \def\thu@list@algorithm@name{List of Algorithms}%
- \def\listequationname{List of Equations}%
- \def\thu@denotation@name{Nomenclature}%
- \def\bibname{Bibliography}%
- \def\appendixname{Appendix}%
- \def\thu@acknowledgements@name{Acknowledgements}%
- \def\thu@resume@name{Resume and Academic Achievements}%
+ \thispagestyle{empty}%
+ \hbox{}%
+ \newpage
+ \if@twocolumn
+ \hbox{}\newpage
+ \fi
\fi
\fi
\fi
}
-\thu@set@chapter@names
-\thu@option@hook{degree}{\thu@set@chapter@names}
-\thu@option@hook{main-language}{\thu@set@chapter@names}
-\newcommand\thu@set@names{%
- \ifthu@language@chinese
- \ctexset{
- figurename = 图,
- tablename = 表,
- }%
- \def\thu@algorithm@name{算法}%
- \def\thu@equation@name{公式}%
- \def\thu@assumption@name{假设}%
- \def\thu@definition@name{定义}%
- \def\thu@proposition@name{命题}%
- \def\thu@lemma@name{引理}%
- \def\thu@theorem@name{定理}%
- \def\thu@axiom@name{公理}%
- \def\thu@corollary@name{推论}%
- \def\thu@exercise@name{练习}%
- \def\thu@example@name{例}%
- \def\thu@remark@name{注释}%
- \def\thu@problem@name{问题}%
- \def\thu@conjecture@name{猜想}%
- \def\thu@proof@name{证明}%
- \def\thu@theorem@separator{:}%
- \else
- \ifthu@language@english
- \ctexset{
- figurename = {Figure},
- tablename = {Table},
- }%
- \def\thu@algorithm@name{Algorithm}%
- \def\thu@equation@name{Equation}%
- \def\thu@assumption@name{Assumption}%
- \def\thu@definition@name{Definition}%
- \def\thu@proposition@name{Proposition}%
- \def\thu@lemma@name{Lemma}%
- \def\thu@theorem@name{Theorem}%
- \def\thu@axiom@name{Axiom}%
- \def\thu@corollary@name{Corollary}%
- \def\thu@exercise@name{Exercise}%
- \def\thu@example@name{Example}%
- \def\thu@remark@name{Remark}%
- \def\thu@problem@name{Problem}%
- \def\thu@conjecture@name{Conjecture}%
- \def\thu@proof@name{Proof}%
- \def\thu@theorem@separator{: }%
- \fi
- \fi
+\renewcommand\frontmatter{%
+ \cleardoublepage
+ \@mainmatterfalse
+ \pagenumbering{Roman}%
}
-\thu@set@names
-\thu@option@hook{language}{\thu@set@names}
-\xeCJKDeclareCharClass{CJK}{"2460 -> "2473}
-\xeCJKDeclareCharClass{CJK}{"2605}
-\newcommand\thu@set@punctuations{%
- \ifthu@language@chinese
- \xeCJKDeclareCharClass{FullLeft}{"2018, "201C}%
- \xeCJKDeclareCharClass{FullRight}{
- "00B7, "2019, "201D, "2013, "2014, "2025, "2026, "2E3A,
- }%
+\renewcommand\mainmatter{%
+ \cleardoublepage
+ \@mainmattertrue
+ \pagenumbering{arabic}%
+}
+\renewcommand\backmatter{%
+ \if@openright
+ \cleardoublepage
\else
- \ifthu@language@english
- \xeCJKDeclareCharClass{HalfLeft}{"2018, "201C}%
- \xeCJKDeclareCharClass{HalfRight}{
- "00B7, "2019, "201D, "2013, "2014, "2025, "2026, "2E3A,
- }%
- \fi
+ \clearpage
\fi
+ \@mainmatterfalse
+ \thusetup{toc-depth = 0}%
}
-\thu@set@punctuations
-\thu@option@hook{language}{\thu@set@punctuations}
\pagestyle{fancy}
\fancypagestyle{plain}{%
\fancyhf{}%
@@ -949,30 +1363,47 @@
\let\chaptermark\@gobble
\else
\renewcommand\headrulewidth{0.75bp}%
- \fancyhead[C]{\wuhao\leftmark}%
+ \fancyhead[C]{%
+ \wuhao
+ \ifthu@main@language@chinese
+ \leftmark
+ \else
+ \MakeUppercase{\leftmark}%
+ \fi
+ }%
\fancyfoot[C]{\wuhao\thepage}%
\let\@mkboth\markboth
\def\chaptermark##1{%
- \markboth{\CTEXifname{\CTEXthechapter\quad}{}##1}{}%
+ \markboth{%
+ \CTEXifname{%
+ \CTEXthechapter
+ \ifthu@main@language@chinese
+ \quad
+ \else
+ \space
+ \fi
+ }{}##1%
+ }{}%
}%
\fi
\let\sectionmark\@gobble
}
\pagestyle{plain}
-\ctexset{chapter/pagestyle = plain}
+\def\ps@chapter{}
+\ctexset{chapter/pagestyle = chapter}
\ctexset{%
punct=quanjiao,
space=auto,
}
\newcommand\thu@set@indent{%
- \ifthu@main@language@english
+ \ifthu@main@language@chinese
+ \ctexset{autoindent=2}%
+ \else
\ifthu@degree@bachelor
\ctexset{autoindent=0.8cm}%
\else
- \ctexset{autoindent=2}%
+ \ctexset{autoindent=0.74cm}%
\fi
- \else
- \ctexset{autoindent=2}%
\fi
}
\thu@set@indent
@@ -1066,45 +1497,7 @@
\fi
\endgroup
}
-\newcommand\thu@set@math@ellipsis{%
- \ifthu@language@chinese
- \DeclareRobustCommand\mathellipsis{\mathinner{\unicodecdots}}%
- \else
- \ifthu@language@english
- \DeclareRobustCommand\mathellipsis{\mathinner{\unicodeellipsis}}%
- \fi
- \fi
-}
-\thu@set@math@ellipsis
-\thu@option@hook{language}{\thu@set@math@ellipsis}
-\protected\def\le{\leqslant}
-\protected\def\ge{\geqslant}
-\AtBeginDocument{%
- \renewcommand\leq{\leqslant}%
- \renewcommand\geq{\geqslant}%
-}
-\removenolimits{%
- \int\iint\iiint\iiiint\oint\oiint\oiiint
- \intclockwise\varointclockwise\ointctrclockwise\sumint
- \intbar\intBar\fint\cirfnint\awint\rppolint
- \scpolint\npolint\pointint\sqint\intlarhk\intx
- \intcap\intcup\upint\lowint
-}
-\AtBeginDocument{%
- \renewcommand{\Re}{\operatorname{Re}}%
- \renewcommand{\Im}{\operatorname{Im}}%
-}
-\AtBeginDocument{%
- \renewcommand\nabla{\mbfnabla}%
-}
-\DeclareRobustCommand\bm[1]{{\symbf{#1}}}
-\DeclareRobustCommand\boldsymbol[1]{{\symbf{#1}}}
-\newcommand\square{\mdlgwhtsquare}
-\AtBeginDocument{%
- \renewcommand\checkmark{\ensuremath{✓}}%
-}
\allowdisplaybreaks[4]
-\renewcommand\theequation{\ifnum \c@chapter>\z@ \thechapter-\fi\@arabic\c@equation}
\def\fps@figure{h}
\def\fps@table{h}
\setlength{\floatsep}{6bp}
@@ -1117,31 +1510,77 @@
\renewcommand{\topfraction}{0.85}
\renewcommand{\bottomfraction}{0.65}
\renewcommand{\floatpagefraction}{0.60}
+\thu@define@key{
+ figure-number-separator = {
+ name = figure@number@separator,
+ default = {.},
+ },
+ table-number-separator = {
+ name = table@number@separator,
+ default = {.},
+ },
+ equation-number-separator = {
+ name = equation@number@separator,
+ default = {.},
+ },
+ number-separator = {
+ name = number@separator,
+ default = {.},
+ },
+}
+\renewcommand\thefigure{%
+ \ifnum\c@chapter>\z@
+ \thechapter
+ \thu@figure@number@separator
+ \fi
+ \@arabic\c@figure
+}
+\renewcommand\thetable{%
+ \ifnum\c@chapter>\z@
+ \thechapter
+ \thu@table@number@separator
+ \fi
+ \@arabic\c@table
+}
+\renewcommand\theequation{%
+ \ifnum\c@chapter>\z@
+ \thechapter
+ \thu@equation@number@separator
+ \fi
+ \@arabic\c@equation
+}
+\newcommand\thu@set@number@separator{%
+ \let\thu@figure@number@separator\thu@number@separator
+ \let\thu@table@number@separator\thu@number@separator
+ \let\thu@equation@number@separator\thu@number@separator
+}
+\thu@option@hook{number-separator}{\thu@set@number@separator}
\patchcmd\@floatboxreset{%
\normalsize
}{%
- \fontsize{11bp}{14.3bp}\selectfont
- \renewcommand\arraystretch{1.4}%
+ \ifthu@language@chinese
+ \fontsize{11bp}{20.3bp}\selectfont
+ \else
+ \fontsize{11bp}{18.65bp}\selectfont
+ \fi
}{}{\thu@patch@error{\@floatboxreset}}
-\ifthu@degree@bachelor
- \AtBeginDocument{% delay the check until all packages are loaded
- \g@addto@macro\appendix{\renewcommand*{\thefigure}{\thechapter-\arabic{figure}}}
- \g@addto@macro\appendix{\renewcommand*{\thetable}{\thechapter-\arabic{table}}}
+\AtEndOfPackageFile*{longtable}{
+ \AtBeginEnvironment{longtable}{%
+ \ifthu@language@chinese
+ \fontsize{11bp}{20.3bp}\selectfont
+ \else
+ \fontsize{11bp}{18.65bp}\selectfont
+ \fi
}
-\fi
-\newcommand\thu@caption@font{}
-\newcommand\thu@set@caption@font{%
+}
+\DeclareCaptionFont{thu}{%
\ifthu@degree@bachelor
- \renewcommand\thu@caption@font{\fontsize{11bp}{15bp}\selectfont}%
+ \fontsize{11bp}{15bp}\selectfont
\else
- \renewcommand\thu@caption@font{\fontsize{11bp}{14.3bp}\selectfont}%
+ \fontsize{11bp}{14.3bp}\selectfont
\fi
}
-\thu@set@caption@font
-\thu@option@hook{degree}{\thu@set@caption@font}
-\DeclareCaptionFont{thu}{\thu@caption@font}
\captionsetup{
- format = hang,
font = thu,
labelsep = quad,
aboveskip = 6bp,
@@ -1169,8 +1608,8 @@
nameformat = {},
numberformat = {},
titleformat = {},
- aftername = \quad,
fixskip = true,
+ aftername = \quad,
afterindent = true,
lofskip = 0pt,
lotskip = 0pt,
@@ -1215,29 +1654,73 @@
},
}%
\ifthu@main@language@chinese
- \ctexset{chapter/number = \thechapter}%
+ \ctexset{
+ chapter = {
+ name = {第,章},
+ number = \thechapter,
+ },
+ }%
\else
- \ctexset{chapter/number = \thu@english@number{chapter}}%
+ \ctexset{
+ chapter = {
+ name = \chaptername\space,
+ number = \thu@english@number{chapter},
+ },
+ }%
\fi
\else
+ \ifthu@main@language@chinese
+ \ctexset{%
+ chapter = {
+ format = \centering\sffamily\sanhao,
+ nameformat = {},
+ titleformat = {},
+ name = {第,章},
+ },
+ section = {
+ format = \sffamily\fontsize{14bp}{20bp}\selectfont,
+ },
+ subsection = {
+ format = \sffamily\fontsize{13bp}{20bp}\selectfont,
+ },
+ subsubsection = {
+ format = \sffamily\fontsize{12bp}{20bp}\selectfont,
+ },
+ }%
+ \else
+ \ctexset{%
+ chapter = {
+ format = \centering\sffamily\bfseries\fontsize{16bp}{20bp}\selectfont,
+ nameformat = \MakeUppercase,
+ titleformat = \MakeUppercase,
+ name = \chaptername\space,
+ },
+ section = {
+ format = \sffamily\bfseries\fontsize{14bp}{20bp}\selectfont,
+ },
+ subsection = {
+ format = \sffamily\bfseries\fontsize{13bp}{20bp}\selectfont,
+ },
+ subsubsection = {
+ format = \sffamily\bfseries\fontsize{12bp}{20bp}\selectfont,
+ },
+ }%
+ \fi
\ctexset{%
chapter = {
- format = \centering\sffamily\sanhao,
beforeskip = 27bp,
afterskip = 27bp,
+ number = \thechapter,
},
section = {
- format = \sffamily\fontsize{14bp}{20bp}\selectfont,
beforeskip = 24bp,
afterskip = 6bp,
},
subsection = {
- format = \sffamily\fontsize{13bp}{20bp}\selectfont,
beforeskip = 12bp,
afterskip = 6bp,
},
subsubsection = {
- format = \sffamily\fontsize{12bp}{20bp}\selectfont,
beforeskip = 12bp,
afterskip = 6bp,
},
@@ -1246,6 +1729,7 @@
}
\thu@set@section@format
\thu@option@hook{degree}{\thu@set@section@format}
+\thu@option@hook{main-language}{\thu@set@section@format}
\newcommand\thu@english@number[1]{%
\expandafter\ifcase\csname c@#1\endcsname
Zero\or
@@ -1363,22 +1847,38 @@
\fi
\fi
\else
- \titlecontents{chapter}
- [\z@]{\addvspace{6bp}\sffamily}
- {\contentspush{\thecontentslabel\quad}}{}
- {\rmfamily\thu@leaders\thecontentspage}%
- \titlecontents{section}
- [1em]{}
- {\contentspush{\thecontentslabel\quad}}{}
- {\thu@leaders\thecontentspage}%
- \titlecontents{subsection}
- [2em]{}
- {\contentspush{\thecontentslabel\quad}}{}
- {\thu@leaders\thecontentspage}%
+ \ifthu@main@language@chinese
+ \titlecontents{chapter}
+ [\z@]{\addvspace{6bp}\sffamily}
+ {\contentspush{\thecontentslabel\quad}}{}
+ {\rmfamily\thu@leaders\thecontentspage}%
+ \titlecontents{section}
+ [1em]{}
+ {\contentspush{\thecontentslabel\quad}}{}
+ {\thu@leaders\thecontentspage}%
+ \titlecontents{subsection}
+ [2em]{}
+ {\contentspush{\thecontentslabel\quad}}{}
+ {\thu@leaders\thecontentspage}%
+ \else
+ \titlecontents{chapter}
+ [\z@]{\addvspace{6bp}\heiti}
+ {\contentspush{\MakeUppercase{\thecontentslabel}\quad}\MakeUppercase}{\MakeUppercase}
+ {\rmfamily\thu@leaders\thecontentspage}%
+ \titlecontents{section}
+ [1em]{}
+ {\contentspush{\thecontentslabel\space}}{}
+ {\thu@leaders\thecontentspage}%
+ \titlecontents{subsection}
+ [2em]{}
+ {\contentspush{\thecontentslabel\space}}{}
+ {\thu@leaders\thecontentspage}%
+ \fi
\fi
}
\thu@set@toc@format
\thu@option@hook{degree}{\thu@set@toc@format}
+\thu@option@hook{main-language}{\thu@set@toc@format}
\thu@define@key{
secret-level = {
name = secret@level,
@@ -1400,6 +1900,9 @@
default = {Name of author},
name = author@en,
},
+ student-id = {
+ name = student@id,
+ },
supervisor = {
default = {导师姓名},
},
@@ -1413,11 +1916,18 @@
associate-supervisor* = {
name = associate@supervisor@en,
},
+ co-supervisor = {
+ name = co@supervisor,
+ },
+ co-supervisor* = {
+ name = co@supervisor@en,
+ },
+ % Reserved for compatibility
joint-supervisor = {
- name = joint@supervisor,
+ name = co@supervisor,
},
joint-supervisor* = {
- name = joint@supervisor@en,
+ name = co@supervisor@en,
},
degree-name = {
default = {工学博士},
@@ -1543,21 +2053,29 @@
\thu@spine
\fi
\ifthu@degree@graduate
- \cleardoublepage
- \thu@titlepage@en
+ \ifthu@thesis@type@thesis
+ \cleardoublepage
+ \thu@titlepage@en
+ \fi
\fi
\clearpage
}
\newcommand\thu@titlepage{%
\thusetup{language = chinese}%
\ifthu@degree@graduate
- \ifthu@degree@type@academic
- \thu@titlepage@graduate@academic
- \else
- \ifx\thu@discipline\@empty
- \thu@titlepage@graduate@professional
- \else
+ \ifthu@thesis@type@thesis
+ \ifthu@degree@type@academic
\thu@titlepage@graduate@academic
+ \else
+ \ifx\thu@discipline\@empty
+ \thu@titlepage@graduate@professional
+ \else
+ \thu@titlepage@graduate@academic
+ \fi
+ \fi
+ \else
+ \ifthu@thesis@type@proposal
+ \thu@titlepage@proposal
\fi
\fi
\else
@@ -1580,19 +2098,33 @@
hmargin = 3.5cm,
}%
\thispagestyle{empty}%
- \null\vskip 0.2cm%
+ \null\vskip 8.1pt%
\begingroup
\centering
\parbox[t][2cm][t]{\textwidth}{%
- \hskip -0.69cm%
+ \hskip -21.5pt%
\thu@titlepage@secret
}\par
- \vskip 1.5cm%
- {\thu@titlepage@title}%
- \vskip 0.85cm%
+ \vskip 40.5pt%
+ \begingroup
+ \sffamily\fontsize{26bp}{46.8bp}\selectfont
+ \thu@title\par
+ \endgroup
+ \ifthu@main@language@english
+ \vskip 5.4pt%
+ \begingroup
+ \sffamily\bfseries\fontsize{20bp}{31.2bp}\selectfont
+ \thu@title@en\par
+ \endgroup
+ \vskip -9.2pt%
+ \fi
+ \vskip 24.1pt%
\thu@titlepage@degree
\vfill
- \parbox[t][7.25cm][t]{\textwidth}{\centering\thu@titlepage@info}\par
+ \parbox[t][7.25cm][t]{\textwidth}{%
+ \centering\fangsong\fontsize{16bp}{31.2bp}\selectfont
+ \thu@titlepage@info
+ }\par
\parbox[t][1.03cm][t]{\textwidth}{\centering\thu@titlepage@date}\par
\endgroup
\clearpage
@@ -1613,16 +2145,70 @@
\thu@titlepage@secret
}\par
\vskip 1.5cm%
- {\sffamily\yihao[1.575]\thu@title\par}%
- \vskip 0.9cm%
+ \begingroup
+ % 1.21 倍行距,无网格
+ \sffamily\fontsize{26bp}{40.9bp}\selectfont
+ \thu@title\par
+ \endgroup
+ \ifthu@main@language@english
+ \vskip 5.4pt%
+ \begingroup
+ \sffamily\bfseries\fontsize{20bp}{31.2bp}\selectfont
+ \thu@title@en\par
+ \endgroup
+ \vskip -9.2pt%
+ \fi
+ \vskip 25.5pt%
\thu@titlepage@degree
\vfill
- \parbox[t][5.28cm][t]{\textwidth}{\centering\thu@titlepage@info}\par
+ \parbox[t][5.24cm][t]{\textwidth}{%
+ \centering\fangsong\fontsize{16bp}{1cm}\selectfont
+ \thu@titlepage@info
+ }\par
\parbox[t][1.25cm][t]{\textwidth}{\centering\thu@titlepage@date}\par
\endgroup
\clearpage
\restoregeometry
}
+\newcommand\thu@titlepage@proposal{%
+ \newgeometry{
+ top = 5cm,
+ bottom = 3.25cm,
+ hmargin = 3.17cm,
+ }%
+ \thispagestyle{empty}%
+ \begingroup
+ % \vspace*{0.1cm}%
+ \centering
+ % {\thu@titlepage@title}%
+ \parbox[t][3cm]{\textwidth}{%
+ \vskip 0.1cm%
+ \centering
+ \sffamily\fontsize{26bp}{46.8bp}\selectfont
+ \thu@title\par
+ }%
+ \vskip 0.85cm%
+ \thu@titlepage@degree
+ \vfill
+ \parbox[t][8.5cm][t]{\textwidth}{%
+ \centering\CJKfamily+{}%
+ \centering\fangsong\sanhao[1.95]%
+ \thu@titlepage@info
+ }\par
+ \parbox[t][2.5cm][t]{\textwidth}{\centering\thu@titlepage@date}\par
+ \endgroup
+ \clearpage
+ \restoregeometry
+}
+\newcommand\thu@set@student@id{%
+ \ifthu@thesis@type@proposal
+ \ifx\thu@student@id\@empty
+ \thusetup{student-id=2000310000}%
+ \fi
+ \fi
+}
+\thu@set@student@id
+\thu@option@hook{thesis-type}{\thu@set@student@id}
\newcommand\thu@titlepage@secret{%
\sffamily\sanhao
\ifx\thu@secret@level\@empty
@@ -1631,14 +2217,30 @@
\thu@secret@level★\makebox[3em][c]{\thu@secret@year}年%
\fi\par
}
-\newcommand\thu@titlepage@title{%
- \sffamily\yihao[1.8]\thu@title\par
-}
\newcommand\thu@titlepage@degree{%
\begingroup
- \def\CJKglue{\hskip 1bp}%
\CJKfamily+{}\xiaoer
- (申请清华大学\thu@degree@name\ifthu@degree@type@professional 专业\fi 学位论文)\par
+ \def\CJKglue{\hskip 1bp}%
+ \ifthu@thesis@type@thesis
+ (申请清华大学\thu@degree@name
+ \ifthu@degree@type@professional
+ 专业%
+ \fi
+ 学位论文)%
+ \else
+ \ifthu@thesis@type@proposal
+ (清华大学%
+ \ifthu@degree@doctor
+ 博士%
+ \else
+ \ifthu@degree@master
+ 硕士%
+ \fi
+ \fi
+ 学位论文选题报告)%
+ \fi
+ \fi
+ \par
\endgroup
}
\newcommand\thu@titlepage@info{%
@@ -1668,8 +2270,8 @@
##2{##3}\\
\fi
}%
- \fangsong\sanhao[1.95]%
\begin{tabular}{l}%
+ \renewcommand\arraystretch{1}%
#4%
\end{tabular}%
}
@@ -1678,18 +2280,20 @@
\thu@info@item{培养单位}{}{\thu@department}%
\thu@info@item{学科}{}{\thu@discipline}%
\thu@info@item{研究生}{\thu@name@title}{\thu@author}%
+ \thu@info@item{学号}{}{\thu@student@id}%
\thu@info@item{指导教师}{\thu@name@title}{\thu@supervisor}%
\thu@info@item{副指导教师}{\thu@name@title}{\thu@associate@supervisor}%
- \thu@info@item{联合导师}{\thu@name@title}{\thu@joint@supervisor}%
+ \thu@info@item{联合导师}{\thu@name@title}{\thu@co@supervisor}%
}\par
}
\newcommand\thu@titlepage@info@doctor@professional{%
\thu@titlepage@info@tabular{3.03cm}{5em}{1.52cm}{%
\thu@info@item{培养单位}{}{\thu@department}%
\thu@info@item{申请人}{\thu@name@title}{\thu@author}%
+ \thu@info@item{学号}{}{\thu@student@id}%
\thu@info@item{指导教师}{\thu@name@title}{\thu@supervisor}%
\thu@info@item{副指导教师}{\thu@name@title}{\thu@associate@supervisor}%
- \thu@info@item{联合导师}{\thu@name@title}{\thu@joint@supervisor}%
+ \thu@info@item{联合导师}{\thu@name@title}{\thu@co@supervisor}%
}\par
}
\newcommand\thu@titlepage@info@master@academic{%
@@ -1697,9 +2301,10 @@
\thu@info@item{培养单位}{}{\thu@department}%
\thu@info@item{学科}{}{\thu@discipline}%
\thu@info@item{研究生}{\thu@name@title}{\thu@author}%
+ \thu@info@item{学号}{}{\thu@student@id}%
\thu@info@item{指导教师}{\thu@name@title}{\thu@supervisor}%
\thu@info@item{副指导教师}{\thu@name@title}{\thu@associate@supervisor}%
- \thu@info@item{联合指导教师}{\thu@name@title}{\thu@joint@supervisor}%
+ \thu@info@item{联合指导教师}{\thu@name@title}{\thu@co@supervisor}%
}\par
}
\newcommand\thu@titlepage@info@master@engineer{%
@@ -1707,24 +2312,27 @@
\thu@info@item{培养单位}{}{\thu@department}%
\thu@info@item{工程领域}{}{\thu@discipline}%
\thu@info@item{申请人}{\thu@name@title}{\thu@author}%
+ \thu@info@item{学号}{}{\thu@student@id}%
\thu@info@item{指导教师}{\thu@name@title}{\thu@supervisor}%
\thu@info@item{副指导教师}{\thu@name@title}{\thu@associate@supervisor}%
- \thu@info@item{联合指导教师}{\thu@name@title}{\thu@joint@supervisor}%
+ \thu@info@item{联合指导教师}{\thu@name@title}{\thu@co@supervisor}%
}\par
}
\newcommand\thu@titlepage@info@master@other{%
\thu@titlepage@info@tabular{3.28cm}{5em}{1.52cm}{%
\thu@info@item{培养单位}{}{\thu@department}%
\thu@info@item{申请人}{\thu@name@title}{\thu@author}%
+ \thu@info@item{学号}{}{\thu@student@id}%
\thu@info@item{指导教师}{\thu@name@title}{\thu@supervisor}%
\thu@info@item{副指导教师}{\thu@name@title}{\thu@associate@supervisor}%
- \thu@info@item{联合指导教师}{\thu@name@title}{\thu@joint@supervisor}%
+ \thu@info@item{联合指导教师}{\thu@name@title}{\thu@co@supervisor}%
}\par
}
\newcommand\thu@titlepage@date{%
\begingroup
+ \sanhao
\def\CJKglue{\hskip 1bp}%
- \sanhao\thu@format@date{\thu@date@zh@short}{\thu@date}\par
+ \thu@format@date{\thu@date@zh@short}{\thu@date}\par
\endgroup
}
\newcommand{\thu@titlepage@en}{%
@@ -1822,12 +2430,13 @@
}
\newcommand\thu@titlepage@en@supervisor{%
\begin{tabular}{r@{\makebox[0.71cm][l]{:}}l}%
- \thu@thesis@name@en{} Supervisor & \thu@supervisor@en \\
+ \renewcommand\arraystretch{1}%
+ \thu@thesis@name@en{} Supervisor & \thu@supervisor@en \\
\ifx\thu@associate@supervisor@en\@empty\else
- Associate Supervisor & \thu@associate@supervisor@en \\
+ Associate Supervisor & \thu@associate@supervisor@en \\
\fi
- \ifx\thu@joint@supervisor@en\@empty\else
- Cooperate Supervisor & \thu@joint@supervisor@en \\
+ \ifx\thu@co@supervisor@en\@empty\else
+ Co-supervisor & \thu@co@supervisor@en \\
\fi
\end{tabular}%
}
@@ -1888,7 +2497,7 @@
\def\thu@info@item##1##2##3{%
\ifx##3\@empty\else
\thu@fixed@box{%
- \ifx\thu@joint@supervisor\@empty
+ \ifx\thu@co@supervisor\@empty
4em%
\else
5.5em%
@@ -1904,7 +2513,7 @@
\thu@info@item{姓名}{\thu@name@title}{\thu@author}%
\thu@info@item{指导教师}{\thu@name@title}{\thu@supervisor}%
\thu@info@item{辅导教师}{\thu@name@title}{\thu@associate@supervisor}%
- \thu@info@item{联合指导教师}{\thu@name@title}{\thu@joint@supervisor}%
+ \thu@info@item{联合指导教师}{\thu@name@title}{\thu@co@supervisor}%
\endgroup
\vskip 1.4cm%
\begingroup
@@ -1968,6 +2577,7 @@
\vskip 0.4cm%
{\xiaosi[2.6]%
\begin{tabular}{l@{\quad}l}%
+ \renewcommand\arraystretch{1}%
\thu@stretch{11em}{博士后姓名} & \thu@author \\
\thu@stretch{11em}{流动站(一级学科)名称} & \thu@discipline@level@i \\
\thu@stretch{11em}{专\quad{}业(二级学科)名称} & \thu@discipline@level@ii \\
@@ -1980,7 +2590,7 @@
研究工作期满时间\quad\thu@format@date{\thu@date@zh@digit}{\thu@end@date}\par
}%
\vskip 2.1cm%
- {\xiaosi[2.6]清华大学人事部(北京)\par}%
+ {\xiaosi[2.6]清华大学人事处(北京)\par}%
\vskip 0.6cm%
{\wuhao\thu@format@date{\thu@date@zh@digit@short}{\thu@date}\par}%
\end{center}%
@@ -2000,7 +2610,12 @@
}%
\kvsetkeys{thu@committee}{#1}%
\ifx\thu@committee@file\@empty
- \thu@chapter*[]{\thu@committee@name}%
+ \begingroup
+ \ifthu@main@language@english
+ \ctexset{chapter/format=\centering\sffamily\fontsize{16bp}{20bp}\selectfont}
+ \fi
+ \thu@chapter*[]{\thu@committee@name}%
+ \endgroup
\else
\thu@pdfbookmark{0}{\thu@committee@name}%
\includepdf{\thu@committee@file}%
@@ -2013,21 +2628,25 @@
afterindent = false,
},
}%
+ \thusetup{language=chinese}
}{%
+ \thu@reset@main@language
}
\newcommand\copyrightpage[1][]{%
+ \cleardoublepage
\ifthu@degree@postdoc\relax\else
\def\thu@@tmp{#1}
\ifx\thu@@tmp\@empty
+ \thusetup{language=chinese}%
\ifthu@degree@bachelor
\thu@copyright@page@bachelor
\else
\thu@copyright@page@graduate
\fi
+ \thu@reset@main@language
\else
- \cleardoublepage
\thispagestyle{empty}%
- \thu@pdfbookmark{0}{\thu@authorization@title}%
+ \thu@pdfbookmark{0}{关于学位论文使用授权的说明}%
\thu@phantomsection
\kv@define@key{thu@copyright}{file}{\includepdf{\kv@value}}%
\kv@set@family@handler{thu@copyright}{%
@@ -2044,7 +2663,6 @@
\newcommand{\thu@authorization@frontdate}{%
日\ifthu@degree@bachelor\hspace{1em}\else\hspace{2em}\fi 期:}
\newcommand\thu@copyright@page@graduate{%
- \cleardoublepage
\newgeometry{
vmargin = 3.8cm,
hmargin = 3.2cm,
@@ -2093,7 +2711,6 @@
\restoregeometry
}
\newcommand\thu@copyright@page@bachelor{%
- \cleardoublepage
\begingroup
\ctexset{
chapter = {
@@ -2143,7 +2760,14 @@
\fi
\thusetup{language = chinese}%
\ifthu@degree@graduate
- \thu@chapter*{\thu@abstract@name}%
+ \begingroup
+ \ifthu@main@language@english
+ \ctexset{%
+ chapter/format = \centering\sffamily\fontsize{16bp}{20bp}\selectfont,
+ }%
+ \fi
+ \thu@chapter*{\thu@abstract@name}%
+ \endgroup
\else
\thu@chapter*[]{\thu@abstract@name}%
\fi
@@ -2278,8 +2902,20 @@
}%
\kvsetkeys{thu@statement}{#1}%
\ifx\thu@statement@file\@empty
- \thu@chapter*{\thu@statement@name}%
- \thispagestyle{\thu@statement@page@style}%
+ \thusetup{language=chinese}%
+ \begingroup
+ \ifthu@degree@graduate
+ \ifthu@main@language@english
+ \ctexset{%
+ chapter/format = \centering\sffamily\fontsize{16bp}{20bp}\selectfont,
+ }%
+ \fi
+ \fi
+ \thu@chapter*{\thu@statement@name}%
+ \endgroup
+ \ifthu@degree@bachelor
+ \thispagestyle{\thu@statement@page@style}%
+ \fi
\thu@statement@text\par
\ifthu@degree@graduate
\vskip 2cm%
@@ -2288,11 +2924,15 @@
\fi
{\hfill\thu@signature\thu@underline[2.5cm]\relax
\thu@backdate\thu@underline[2.5cm]\relax}%
+ \thu@reset@main@language
\else
\includepdf[pagecommand={%
\markboth{\thu@statement@name}{}%
\thu@phantomsection
\addcontentsline{toc}{chapter}{\thu@statement@name}%
+ \ifthu@degree@bachelor\else
+ \thispagestyle{empty}%
+ \fi
}]{\thu@statement@file}%
\fi
\ifthu@degree@bachelor
@@ -2822,6 +3462,24 @@
\newcommand\publicationskip{%
\thu@error{The "\protect\publicationskip" is obsolete. Do not use it}%
}
+\newenvironment{comments}[1][]{%
+ \@mainmatterfalse
+ \kv@define@key{thu@comments}{name}{\let\thu@comments@name\kv@value}%
+ \kv@set@family@handler{thu@comments}{%
+ \ifx\kv@value\relax
+ \let\thu@comments@name\kv@key
+ \else
+ \kv@handled@false
+ \fi
+ }%
+ \kvsetkeys{thu@comments}{#1}%
+ \chapter{\thu@comments@name}%
+}{%
+}
+\newenvironment{resolution}{%
+ \@mainmatterfalse
+ \chapter{\thu@resolution@name}%
+}{}
\newcommand{\record}[1]{%
\let\thu@record@file\@empty
\kv@define@key{thu@record}{file}{\let\thu@record@file\kv@value}%
@@ -2906,12 +3564,6 @@
\def\thenomenclature{\begin{denotation}[\nom@tempdim]}
\def\endthenomenclature{\end{denotation}}
}
-\AtEndOfPackageFile*{longtable}{
- \pretocmd\LT@array{%
- \fontsize{11bp}{14.3bp}\selectfont
- \renewcommand\arraystretch{1.4}%
- }{}{\thu@patch@error{\LT@array}}
-}
\AtEndOfPackageFile*{siunitx}{%
\sisetup{
group-minimum-digits = 4,
@@ -2928,7 +3580,7 @@
\else
\ifthu@language@english
\sisetup{
- list-final-separator = { and },
+ list-final-separator = {, and },
list-pair-separator = { and },
range-phrase = { to },
}%
@@ -2970,12 +3622,12 @@
}{%
\popQED\endtrivlist\@endpefalse
}
- \renewcommand\qedsymbol{\ensuremath{\QED}}
+ \renewcommand\qedsymbol{\thu@qed}
}
\AtEndOfPackageFile*{ntheorem}{%
\theorembodyfont{\normalfont}%
\theoremheaderfont{\normalfont\sffamily}%
- \theoremsymbol{\ensuremath{\QED}}%
+ \theoremsymbol{\thu@qed}%
\newtheorem*{proof}{\thu@proof@name}%
\theoremstyle{plain}%
\theoremsymbol{}%
@@ -2996,7 +3648,6 @@
\PassOptionsToPackage{chapter}{algorithm}
\AtEndOfPackageFile*{algorithm}{
\floatname{algorithm}{\thu@algorithm@name}
- \g@addto@macro\appendix{\renewcommand*{\thealgorithm}{\thechapter-\arabic{algorithm}}}
\renewcommand\listofalgorithms{%
\thu@listof{algorithm}%
}
@@ -3027,7 +3678,6 @@
{\thu@leaders\thecontentspage}
}
\AtEndOfPackageFile*{minted}{
- \g@addto@macro\appendix{\renewcommand*{\thelisting}{\thechapter-\arabic{listing}}}%
\newcommand\thu@set@listing@language{%
\ifthu@language@chinese
\floatname{listing}{代码}%