diff options
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/thuthesis/CHANGELOG.md | 26 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/thuthesis/README.md | 24 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/thuthesis/data/appendix.tex | 23 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/thuthesis/data/chap04.tex | 5 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/thuthesis/spine.pdf | bin | 12704 -> 12629 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/thuthesis/thusetup.tex | 23 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/thuthesis/thuthesis-example.pdf | bin | 460041 -> 462474 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/thuthesis/thuthesis.pdf | bin | 1165492 -> 1198841 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx | 699 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls | 556 |
10 files changed, 1054 insertions, 302 deletions
diff --git a/Master/texmf-dist/doc/latex/thuthesis/CHANGELOG.md b/Master/texmf-dist/doc/latex/thuthesis/CHANGELOG.md index 1f706f09b97..8989e48b9fd 100644 --- a/Master/texmf-dist/doc/latex/thuthesis/CHANGELOG.md +++ b/Master/texmf-dist/doc/latex/thuthesis/CHANGELOG.md @@ -6,6 +6,29 @@ ## [Unreleased] +## [v7.4.0] - 2023-05-15 + +### Added + +- 允许本科生附录翻译的摘要中使用 `\thusetup{keywords = *}` 设置关键词([#865](https://github.com/tuna/thuthesis/issues/865))。 +- 添加选项 `degree-category` 和 `degree-category*` 设置学科门类([#840](https://github.com/tuna/thuthesis/issues/840))。 +- 添加选项 `professional-field` 和 `professional-field*` 设置专业领域([#840](https://github.com/tuna/thuthesis/issues/840))。 +- 添加选项 `engineering-field` 和 `engineering-field*` 设置工业领域([#840](https://github.com/tuna/thuthesis/issues/840))。 + +### Changed + +- 专业学位的“工程领域”改为“专业领域”,同步《指南》2023 年 3 月版的更改([#862](https://github.com/tuna/thuthesis/issues/862))。 +- 附录中的参考文献另行编号([#837](https://github.com/tuna/thuthesis/issues/837),感谢 [@hushidong](https://github.com/hushidong) 和 [@atxy-blip](https://github.com/atxy-blip))。 + +### Deprecated + +- 选项 `degree-name` 和 `degree-name*` 已经过时([#840](https://github.com/tuna/thuthesis/issues/840))。 + +### Fixed + +- 修正研究生“学术成果”列表的行距([#850](https://github.com/tuna/thuthesis/issues/850))。 +- 修正封面的布局,同步《指南》2023 年 3 月版的更改([#861](https://github.com/tuna/thuthesis/issues/861))。 + ## [v7.3.2] - 2023-04-06 ### Fixed @@ -928,7 +951,8 @@ -[Unreleased]: https://github.com/tuna/thuthesis/compare/v7.3.2...HEAD +[Unreleased]: https://github.com/tuna/thuthesis/compare/v7.4.0...HEAD +[v7.4.0]: https://github.com/tuna/thuthesis/compare/v7.3.2...v7.4.0 [v7.3.2]: https://github.com/tuna/thuthesis/compare/v7.3.1...v7.3.2 [v7.3.1]: https://github.com/tuna/thuthesis/compare/v7.3.0...v7.3.1 [v7.3.0]: https://github.com/tuna/thuthesis/compare/v7.2.4...v7.3.0 diff --git a/Master/texmf-dist/doc/latex/thuthesis/README.md b/Master/texmf-dist/doc/latex/thuthesis/README.md index cb9653dfe6e..653ebffd56a 100644 --- a/Master/texmf-dist/doc/latex/thuthesis/README.md +++ b/Master/texmf-dist/doc/latex/thuthesis/README.md @@ -29,10 +29,13 @@ Scroll down for the English version of README. 下载途径: * 发布版: - * [CTAN](https://www.ctan.org/pkg/thuthesis):可能滞后正式发布少许时间。 - * [GitHub Releases](https://github.com/tuna/thuthesis/releases):最新版的及时发布途径。 - * [TUNA 镜像站](https://mirrors.tuna.tsinghua.edu.cn/github-release/tuna/thuthesis/):GitHub Releases 的镜像。 - * [Overleaf](https://www.overleaf.com/latex/templates/thuthesis-tsinghua-university-thesis-latex-template/wddqnwbyhtnk):Overleaf 的模板。 + * 仅下载: + * [CTAN](https://www.ctan.org/pkg/thuthesis):可能滞后正式发布少许时间。 + * [GitHub Releases](https://github.com/tuna/thuthesis/releases):最新版的及时发布途径。 + * [TUNA 镜像站](https://mirrors.tuna.tsinghua.edu.cn/github-release/tuna/thuthesis/):GitHub Releases 的镜像。 + * 在线编辑: + * [TeXPage 模板](https://www.texpage.com/template/72b580ca-51fa-4ecc-82b3-0509bc1d6a07)(提供 Windows 中文字体) + * [Overleaf 模板](https://www.overleaf.com/latex/templates/thuthesis-tsinghua-university-thesis-latex-template/wddqnwbyhtnk) * 开发版:[GitHub](https://github.com/tuna/thuthesis) **任何在其他途径分发的 ThuThesis(包含其变体或衍生物)均不是官方版本,请谨慎使用。** @@ -103,11 +106,14 @@ Any use of ThuThesis in violation of [The LaTeX project public license v1.3c](ht Developer versions contain only source code but no pre-compiled `cls` file and documentations. They are only for the usage of developers and experienced TeX users in need of unpublished features. No warranties are provided. -* Published versions: - * [CTAN](https://www.ctan.org/pkg/thuthesis) - * [GitHub Releases](https://github.com/tuna/thuthesis/releases) - * [TUNA Mirrors](https://mirrors.tuna.tsinghua.edu.cn/github-release/tuna/thuthesis/): mirror of GitHub Releases - * [Overleaf Template](https://www.overleaf.com/latex/templates/thuthesis-tsinghua-university-thesis-latex-template/wddqnwbyhtnk) +* Published versions: + * Download only: + * [CTAN](https://www.ctan.org/pkg/thuthesis) + * [GitHub Releases](https://github.com/tuna/thuthesis/releases) + * [TUNA Mirrors](https://mirrors.tuna.tsinghua.edu.cn/github-release/tuna/thuthesis/): mirror of GitHub Releases + * Online editor: + * [TeXPage template](https://www.texpage.com/template/72b580ca-51fa-4ecc-82b3-0509bc1d6a07) (providing Chinese fonts of Windows) + * [Overleaf template](https://www.overleaf.com/latex/templates/thuthesis-tsinghua-university-thesis-latex-template/wddqnwbyhtnk) * Developer versions: [GitHub](https://github.com/tuna/thuthesis) **ThuThesis (including its variants / derivatives) distributed in any other way is NOT an official version. Use at your own risk.** diff --git a/Master/texmf-dist/doc/latex/thuthesis/data/appendix.tex b/Master/texmf-dist/doc/latex/thuthesis/data/appendix.tex index 85b9ea6e556..a955b4e5596 100644 --- a/Master/texmf-dist/doc/latex/thuthesis/data/appendix.tex +++ b/Master/texmf-dist/doc/latex/thuthesis/data/appendix.tex @@ -4,12 +4,14 @@ 附录是与论文内容密切相关、但编入正文又影响整篇论文编排的条理和逻辑性的资料,例如某些重要的数据表格、计算程序、统计表等,是论文主体的补充内容,可根据需要设置。 +附录中的图、表、数学表达式、参考文献等另行编序号,与正文分开,一律用阿拉伯数字编码, +但在数码前冠以附录的序号,例如“图~\ref{fig:appendix-figure}”, +“表~\ref{tab:appendix-table}”,“式\eqref{eq:appendix-equation}”等。 -\section{图表示例} -\subsection{图} +\section{插图} -附录中的图片示例(图~\ref{fig:appendix-figure})。 +% 附录中的插图示例(图~\ref{fig:appendix-figure})。 \begin{figure} \centering @@ -19,9 +21,9 @@ \end{figure} -\subsection{表格} +\section{表格} -附录中的表格示例(表~\ref{tab:appendix-table})。 +% 附录中的表格示例(表~\ref{tab:appendix-table})。 \begin{table} \centering @@ -41,10 +43,17 @@ \end{table} -\section{数学公式} +\section{数学表达式} -附录中的数学公式示例(公式\eqref{eq:appendix-equation})。 +% 附录中的数学表达式示例(式\eqref{eq:appendix-equation})。 \begin{equation} \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} + + +\section{参考文献} + +附录中的参考文献示例(\cite{carlson1981two} 和 \cite{carlson1981two,taylor1983scanning,taylor1981study})。 + +\printbibliography diff --git a/Master/texmf-dist/doc/latex/thuthesis/data/chap04.tex b/Master/texmf-dist/doc/latex/thuthesis/data/chap04.tex index b07ce4dc96c..0b87d099d92 100644 --- a/Master/texmf-dist/doc/latex/thuthesis/data/chap04.tex +++ b/Master/texmf-dist/doc/latex/thuthesis/data/chap04.tex @@ -15,6 +15,7 @@ \thusetup{ cite-style = super, } +\noindent \begin{tabular}{l@{\quad$\Rightarrow$\quad}l} \verb|\cite{zhangkun1994}| & \cite{zhangkun1994} \\ \verb|\citet{zhangkun1994}| & \citet{zhangkun1994} \\ @@ -30,6 +31,7 @@ \thusetup{ cite-style = inline, } +\noindent \begin{tabular}{l@{\quad$\Rightarrow$\quad}l} \verb|\cite{zhangkun1994}| & \cite{zhangkun1994} \\ \verb|\citet{zhangkun1994}| & \citet{zhangkun1994} \\ @@ -47,7 +49,8 @@ \thusetup{ cite-style = author-year, } -\begin{tabular}{l@{\space$\Rightarrow$\space}l} +\noindent +\begin{tabular}{@{}l@{$\Rightarrow$}l@{}} \verb|\cite{zhangkun1994}| & \cite{zhangkun1994} \\ \verb|\citet{zhangkun1994}| & \citet{zhangkun1994} \\ \verb|\citep{zhangkun1994}| & \citep{zhangkun1994} \\ diff --git a/Master/texmf-dist/doc/latex/thuthesis/spine.pdf b/Master/texmf-dist/doc/latex/thuthesis/spine.pdf Binary files differindex 3506909140b..7aff0d70d69 100644 --- a/Master/texmf-dist/doc/latex/thuthesis/spine.pdf +++ b/Master/texmf-dist/doc/latex/thuthesis/spine.pdf diff --git a/Master/texmf-dist/doc/latex/thuthesis/thusetup.tex b/Master/texmf-dist/doc/latex/thuthesis/thusetup.tex index 6a21d8c1a0c..4eb5ae54b8e 100644 --- a/Master/texmf-dist/doc/latex/thuthesis/thusetup.tex +++ b/Master/texmf-dist/doc/latex/thuthesis/thusetup.tex @@ -22,7 +22,7 @@ title* = {An Introduction to \LaTeX{} Thesis Template of Tsinghua University v\version}, % - % 学位 + % 学科门类 % 1. 学术型 % - 中文 % 需注明所属的学科门类,例如: @@ -39,8 +39,8 @@ % Doctor of Education, Master of Engineering % 3. 本科生不需要填写 % - degree-name = {工学硕士}, - degree-name* = {Master of Science}, + degree-category = {工学硕士}, + degree-category* = {Master of Science}, % % 培养单位 % 填写所属院系的全名 @@ -48,17 +48,20 @@ department = {计算机科学与技术系}, % % 学科 - % 1. 学术型学位 - % 获得一级学科授权的学科填写一级学科名称,其他填写二级学科名称 - % 2. 工程硕士 - % 工程领域名称 - % 3. 其他专业型学位 - % 不填写此项 - % 4. 本科生填写专业名称,第二学位论文需标注“(第二学位)” + % 1. 研究生学术型学位,获得一级学科授权的学科填写一级学科名称,其他填写二级学科名称 + % 2. 本科生填写专业名称,第二学位论文需标注“(第二学位)” % discipline = {计算机科学与技术}, discipline* = {Computer Science and Technology}, % + % 专业领域 + % 1. 设置专业领域的专业学位类别,填写相应专业领域名称 + % 2. 2019 级及之前工程硕士学位论文,在 `engineering-field` 填写相应工程领域名称 + % 3. 其他专业学位类别的学位论文无需此信息 + % + % professional-field = {计算机技术}, + % professional-field* = {Computer Technology}, + % % 姓名 % author = {薛瑞尼}, diff --git a/Master/texmf-dist/doc/latex/thuthesis/thuthesis-example.pdf b/Master/texmf-dist/doc/latex/thuthesis/thuthesis-example.pdf Binary files differindex 57ca13d9bf6..6f37010a21c 100644 --- a/Master/texmf-dist/doc/latex/thuthesis/thuthesis-example.pdf +++ b/Master/texmf-dist/doc/latex/thuthesis/thuthesis-example.pdf diff --git a/Master/texmf-dist/doc/latex/thuthesis/thuthesis.pdf b/Master/texmf-dist/doc/latex/thuthesis/thuthesis.pdf Binary files differindex f6dafe3a680..b1fe7510f5b 100644 --- a/Master/texmf-dist/doc/latex/thuthesis/thuthesis.pdf +++ b/Master/texmf-dist/doc/latex/thuthesis/thuthesis.pdf diff --git a/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx b/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx index 08aeecd9b88..d88e3d23772 100644 --- a/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx +++ b/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx @@ -14,7 +14,7 @@ % % \iffalse %<*driver> -\ProvidesFile{thuthesis.dtx}[2023/04/06 7.3.2 Tsinghua University Thesis Template] +\ProvidesFile{thuthesis.dtx}[2023/05/15 7.4.0 Tsinghua University Thesis Template] \documentclass{ltxdoc} \usepackage{dtx-style} @@ -105,7 +105,7 @@ % \textbf{Thesis} Template)是为了帮助清华大学毕业生撰写毕业论文而编写 % 的 \LaTeX{} 论文模板。 % -% 本文档将尽量完整的介绍模板的使用方法,如有不清楚之处,或者想提出改进建议, +% 本文档将尽量完整地介绍模板的使用方法,如有不清楚之处,或者想提出改进建议, % 可以在 \href{https://github.com/tuna/thuthesis/issues/}{GitHub Issues} % 参与讨论或提问。 % 有兴趣者都可以参与完善此手册,也非常欢迎对代码的贡献。 @@ -444,15 +444,15 @@ % \end{latex} % % \subsubsection{申请学位名称} -% \label{sec:degree-name} -% 学位名称的设置比较复杂,见表~\ref{tab:degree-name}。 +% \label{sec:degree-category} +% 学位名称的设置比较复杂,见表~\ref{tab:degree-category}。 % % \begin{table}[h] % \caption{学位名称的要求} -% \label{tab:degree-name} +% \label{tab:degree-category} % \begin{tabular}{p{2cm}p{6cm}p{6cm}} % \toprule -% 学位类型 & degree-name & degree-name* \\ +% 学位类型 & degree-category & degree-category* \\ % \midrule % 学术型博士 & 需注明所属的学科门类,例如: % 哲学、经济学、法学、教育学、文学、历史学、理学、工学、农学、医学、 @@ -473,8 +473,8 @@ % % \begin{latex} % \thusetup{ -% degree-name = {您要申请什么学位}, -% degree-name* = {Degree in English}, +% degree-category = {您要申请什么学位}, +% degree-category* = {Degree in English}, % } % \end{latex} % @@ -489,11 +489,8 @@ % \subsubsection{学科名称} % % \begin{itemize} -% \item 学术型学位:获得一级学科授权的学科填写一级学科名称,其他填写二级学科名称; -% \item 2019级及之前工程硕士:工程领域名称; -% \item 有专业领域的专业型学位:专业领域名称; -% \item 无专业领域的专业型学位:无需设置; -% \item 本科生:专业名称,第二学位论文需标注“(第二学位)” +% \item 研究生学术型学位:获得一级学科授权的学科填写一级学科名称,其他填写二级学科名称; +% \item 本科生:专业名称,第二学位论文需标注“(第二学位)”。 % \end{itemize} % % \begin{latex} @@ -503,6 +500,24 @@ % } % \end{latex} % +% \subsubsection{专业领域} +% +% 仅用于研究生专业型学位。 +% +% \begin{itemize} +% \item 设置专业领域的专业学位类别,填写相应专业领域名称; +% \item 2019 级及之前工程硕士学位论文,在 \option{engineering-field} 填写相应工程领域名称; +% \item 其他专业学位类别的学位论文无需此信息。 +% \end{itemize} +% +% \begin{latex} +% \thusetup{ +% professional-field = {专业领域}, +% professional-field* = {Professional field}, +% } +% \end{latex} +% +% % \subsubsection{作者姓名} % 作者姓名。 % \begin{latex} @@ -1249,7 +1264,7 @@ % \begin{macrocode} %<cls>\NeedsTeXFormat{LaTeX2e}[2017/04/15] %<cls>\ProvidesClass{thuthesis} -%<cls>[2023/04/06 7.3.2 Tsinghua University Thesis Template] +%<cls>[2023/05/15 7.4.0 Tsinghua University Thesis Template] % \end{macrocode} % % 报错 @@ -1307,7 +1322,7 @@ %<*cls> \hyphenation{Thu-Thesis} \def\thuthesis{ThuThesis} -\def\version{7.3.2} +\def\version{7.4.0} \RequirePackage{kvdefinekeys} \RequirePackage{kvsetkeys} \RequirePackage{kvoptions} @@ -1800,11 +1815,9 @@ } } \AtEndOfPackageFile*{natbib}{ - \ifthu@degree@bachelor - \@ifpackageloaded{apacite}{}{ - \RequirePackage{bibunits} - } - \fi + \@ifpackageloaded{apacite}{}{ + \RequirePackage{bibunits} + } } % \end{macrocode} % @@ -2301,7 +2314,7 @@ \newcommand\thu@set@font@times{% \setmainfont{Times New Roman}% \setsansfont{Arial}% - \ifthu@system@mac + \ifthu@fontset@mac \setmonofont{Menlo}[Scale = MatchLowercase]% \else \setmonofont{Courier New}[Scale = MatchLowercase]% @@ -2894,7 +2907,7 @@ \newcommand\square{\mdlgwhtsquare}% \newcommand\blacksquare{\mdlgblksquare}% \AtBeginDocument{% - \renewcommand\checkmark{\ensuremath{✓}}% + \renewcommand\checkmark{\ensuremath{\symbol{"2713}}}% }% % \end{macrocode} % @@ -4119,24 +4132,39 @@ % % 学位中英文。 % \begin{macrocode} - degree-name = { + degree-category = { default = {工学博士}, - name = degree@name, + name = degree@category, }, - degree-name* = { + degree-category* = { default = {Doctor of Philosophy}, - name = degree@name@en, + name = degree@category@en, + }, + % 为了向后兼容 + degree-name = { + name = degree@category, + }, + degree-name* = { + name = degree@category@en, }, +} +\thu@option@hook{degree-name}{% + \thu@warning{`degree-name' is deprecated. Use `degree-category' instead.} +} +\thu@option@hook{degree-name*}{% + \thu@warning{`degree-name*' is deprecated. Use `degree-category*' instead.} +} % \end{macrocode} % % 院系中英文名称。 % \begin{macrocode} +\thu@define@key{ department = { default = {计算机科学与技术系}, }, % \end{macrocode} % -% 专业中英文名称。 +% 学科中英文名称。 % \begin{macrocode} discipline = { % default = {计算机科学与技术}, @@ -4145,6 +4173,42 @@ % default = {Computer Science and Technology}, name = discipline@en, }, +} +\thu@option@hook{discipline}{% + \ifthu@degree@type@professional + \thu@warning{`discipline' for professional degree is deprecated. Use `professional-field' instead.} + \let\thu@professional@field\thu@discipline + \let\thu@discipline\@empty + \fi +} +\thu@option@hook{discipline*}{% + \ifthu@degree@type@professional + \thu@warning{`discipline*' for professional degree is deprecated. Use `professional-field*' instead.} + \let\thu@professional@field@en\thu@discipline@en + \let\thu@discipline@en\@empty + \fi +} +% \end{macrocode} +% +% 专业领域。 +% \begin{macrocode} +\thu@define@key{ + professional-field = { + name = professional@field, + }, + professional-field* = { + name = professional@field@en, + }, +% \end{macrocode} +% +% 工程领域。 +% \begin{macrocode} + engineering-field = { + name = engineering@field, + }, + engineering-field* = { + name = engineering@field@en, + }, % \end{macrocode} % % 论文成文日期。 @@ -4279,8 +4343,19 @@ \stepcounter{thu@csl@count}% } \newcommand\thu@name@title@format[2]{% - \thu@pad{3cm}{\thu@stretch{4em}{#1}}% - \thu@stretch{3em}{#2}% + \ifthu@degree@type@professional + % 字距 9.8bp,共 16bp * 3 + 9.8bp * 2 = 67.5bp + \thu@stretch{67.6bp}{#1}% + \hspace{9.8bp}% + % 字距 6bp + \begingroup + \renewcommand\CJKglue{\hspace{9.8bp}}% + #2% + \endgroup + \else + \thu@pad{3cm}{\thu@stretch{4em}{#1}}% + \thu@stretch{3em}{#2}% + \fi } \newcommand\thu@name@title[1]{% \setcounter{thu@csl@count}{0}% @@ -4325,12 +4400,24 @@ \ifthu@degree@graduate \ifthu@thesis@type@thesis \ifthu@degree@type@academic - \thu@titlepage@graduate@academic + \ifthu@degree@doctor + \thu@titlepage@doctor@academic + \else + \thu@titlepage@master@academic + \fi \else - \ifx\thu@discipline\@empty - \thu@titlepage@graduate@professional + \ifthu@degree@doctor + \thu@titlepage@doctor@professional \else - \thu@titlepage@graduate@academic + \ifx\thu@professional@field\@empty + \ifx\thu@engineering@field\@empty + \thu@titlepage@master@professional@without@field + \else + \thu@titlepage@master@professional@with@field + \fi + \else + \thu@titlepage@master@professional@with@field + \fi \fi \fi \else @@ -4360,7 +4447,7 @@ % 然而作为事实标准的 Word 模板的页边距是上下 6.0 厘米,左右 4.0 厘米。 % 这里缩小上边距以方便排版保密信息。 % \begin{macrocode} -\newcommand\thu@titlepage@graduate@academic{% +\newcommand\thu@titlepage@doctor@academic{% \newgeometry{ top = 2cm, bottom = 6cm, @@ -4388,10 +4475,10 @@ \vskip -9.2pt% \fi \vskip 24.1pt% - \thu@titlepage@degree + \thu@titlepage@degree\par \vfill \parbox[t][7.25cm][t]{\textwidth}{% - \centering\fangsong\fontsize{16bp}{31.2bp}\selectfont + \fangsong\fontsize{16bp}{31.2bp}\selectfont \thu@titlepage@info }\par \parbox[t][1.03cm][t]{\textwidth}{\centering\thu@titlepage@date}\par @@ -4403,7 +4490,7 @@ % % 专业型学位论文中文封面 % \begin{macrocode} -\newcommand\thu@titlepage@graduate@professional{% +\newcommand\thu@titlepage@doctor@professional{% \newgeometry{ top = 2cm, bottom = 6cm, @@ -4434,11 +4521,172 @@ \vskip 25.5pt% \thu@titlepage@degree \vfill - \parbox[t][5.24cm][t]{\textwidth}{% - \centering\fangsong\fontsize{16bp}{1cm}\selectfont + \parbox[b][5.24cm][b]{\textwidth}{% + \fangsong\fontsize{16bp}{1cm}\selectfont + \thu@titlepage@info + }\par + \vskip 2.22cm% + \parbox[t][1.0cm][t]{\textwidth}{\centering\thu@titlepage@date}\par + \endgroup + \clearpage + \restoregeometry +} +% \end{macrocode} +% +% 学术型硕士 +% \begin{macrocode} +\newcommand\thu@titlepage@master@academic{% + \newgeometry{ + top = 2cm, + bottom = 6cm, + hmargin = 3.5cm, + }% + \thispagestyle{empty}% + \null\vskip 10bp% + \begingroup + \centering + \parbox[t][55bp][t]{\textwidth}{% + \hskip -23bp% + \thu@titlepage@secret + }\par + \vskip 34pt% + \begingroup + % 1.21 倍行距 + \sffamily\fontsize{26bp}{40.898bp}\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 18pt% + \thu@titlepage@degree\par + \vfill + \parbox[t][7.05cm][t]{\textwidth}{% + % 表格行高 1cm = 28.35bp + \fangsong\fontsize{16bp}{28.35bp}\selectfont + \thu@titlepage@info + }\par + \parbox[t][37bp][t]{\textwidth}{\centering\thu@titlepage@date}\par + \endgroup + \clearpage + \restoregeometry +} +% \end{macrocode} +% +% 专业型硕士 +% \begin{macrocode} +\newcommand\thu@titlepage@master@professional@without@field{% + \newgeometry{ + top = 2cm, + bottom = 6cm, + hmargin = 3.5cm, + }% + \thispagestyle{empty}% + \null\vskip 15bp% + \begingroup + \centering + \parbox[t][41bp][t]{\textwidth}{% + \hskip -23bp% + \thu@titlepage@secret + }\par + \vskip 1.5cm% + \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[b][5.24cm][b]{\textwidth}{% + \fangsong\fontsize{16bp}{1cm}\selectfont \thu@titlepage@info }\par - \parbox[t][1.25cm][t]{\textwidth}{\centering\thu@titlepage@date}\par + \vskip 2.22cm% + \parbox[t][35.5bp][t]{\textwidth}{\centering\thu@titlepage@date}\par + \endgroup + \clearpage + \restoregeometry +} +% \end{macrocode} +% +% 专业型硕士(有专业领域) +% \begin{macrocode} +\newcommand\thu@titlepage@master@professional@with@field{% + \newgeometry{ + top = 2cm, + bottom = 6cm, + hmargin = 3.5cm, + }% + \thispagestyle{empty}% + \null\vskip 10bp% + \begingroup + \centering + \parbox[t][46bp][t]{\textwidth}{% + \hskip -23bp% + \thu@titlepage@secret + }\par + \vskip 1.5cm% + \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 + \vskip 119bp% + \parbox[b][5.24cm][b]{\textwidth}{% + \fangsong\fontsize{16bp}{31bp}\selectfont + \renewcommand\thu@info@item@format[2]{% + \begingroup + \renewcommand\CJKglue{\hspace{##1}}% + ##2% + \endgroup + }% + \renewcommand\thu@name@title@format[2]{% + % 字距 9bp,共 16bp * 3 + 9bp * 2 = 66bp + \thu@stretch{66bp}{##1}% + \hspace{22bp}% + % 字距 6bp + \begingroup + \renewcommand\CJKglue{\hspace{16bp}}% + ##2% + \endgroup + }% + \thu@titlepage@info@tabular{65bp}{86.5bp}{81bp}{30.5bp}{% + \thu@info@item{培养单位}{\thu@info@item@format{1bp}}{\thu@department}% + \thu@info@item{专业领域}{\thu@info@item@format{2bp}}{\thu@professional@field}% + \thu@info@item{工程领域}{\thu@info@item@format{2bp}}{\thu@engineering@field}% + \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@co@supervisor}% + }\par + }\par + \vfill + \parbox[t][33.5bp][t]{\textwidth}{\centering\thu@titlepage@date}\par \endgroup \clearpage \restoregeometry @@ -4500,7 +4748,7 @@ \ifx\thu@secret@level\@empty \phantom{秘密}% \else - \thu@secret@level★\makebox[3em][c]{\thu@secret@year}年% + \thu@secret@level\symbol{"2605}\makebox[3em][c]{\thu@secret@year}年% \fi\par } % \end{macrocode} @@ -4519,7 +4767,7 @@ \renewcommand\CJKglue{\hspace{1bp}}% \fi \ifthu@thesis@type@thesis - (申请清华大学\thu@degree@name + (申请清华大学\thu@degree@category \ifthu@degree@type@professional 专业% \fi @@ -4555,10 +4803,14 @@ \ifthu@degree@type@academic \thu@titlepage@info@master@academic \else - \ifx\thu@discipline\@empty - \thu@titlepage@info@master@other + \ifx\thu@professional@field\@empty + \ifx\thu@engineering@field\@empty + \thu@titlepage@info@master@professional@without@field + \else + \thu@titlepage@info@master@professional@with@field + \fi \else - \thu@titlepage@info@master@engineer + \thu@titlepage@info@master@professional@with@field \fi \fi \fi @@ -4566,22 +4818,29 @@ % \end{macrocode} % % 标题页作者信息表 +% \texttt{\#1}: 表格左侧至版心的距离;\\ +% \texttt{\#2}: “培养方案”的边框宽度;\\ +% \texttt{\#3}: “培养方案”的文字宽度;\\ +% \texttt{\#4}: 冒号的边框;\\ +% \texttt{\#5}: 表格内容。 % \begin{macrocode} -\newcommand\thu@titlepage@info@tabular[4]{% +\newcommand\thu@titlepage@info@tabular[5]{% \def\thu@info@item##1##2##3{% \ifx##3\@empty\else - \thu@pad{#1}{\thu@fixed@box{#2}{##1}}% - \thu@pad{#3}{:}% + \thu@pad{#2}{\thu@fixed@box{#3}{##1}}% + \thu@pad{#4}{:}% ##2{##3}\\ \fi }% + \hspace{#1}% \begin{tabular}{l}% \renewcommand\arraystretch{1}% - #4% + #5% \end{tabular}% } +\newcommand\thu@info@item@format[1]{#1} \newcommand\thu@titlepage@info@doctor@academic{% - \thu@titlepage@info@tabular{2.8cm}{2.8cm}{0.82cm}{% + \thu@titlepage@info@tabular{2.3cm}{2.85cm}{2.75cm}{0.77cm}{% \thu@info@item{培养单位}{}{\thu@department}% \thu@info@item{学科}{}{\thu@discipline}% \thu@info@item{研究生}{\thu@name@title}{\thu@author}% @@ -4592,19 +4851,35 @@ }\par } \newcommand\thu@titlepage@info@doctor@professional{% - \thu@titlepage@info@tabular{3.03cm}{5em}{1.52cm}{% - \thu@info@item{培养单位}{}{\thu@department}% + \thu@titlepage@info@tabular{2.3cm}{3.1cm}{5em}{1.42cm}{% + \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@co@supervisor}% + \thu@info@item{联合指导教师}{\thu@name@title}{\thu@co@supervisor}% }\par } \newcommand\thu@titlepage@info@master@academic{% - \thu@titlepage@info@tabular{3.59cm}{5.5em}{0.82cm}{% - \thu@info@item{培养单位}{}{\thu@department}% - \thu@info@item{学科}{}{\thu@discipline}% + \renewcommand\thu@info@item@format[2]{% + \begingroup + \renewcommand\CJKglue{\hspace{##1}}% + ##2% + \endgroup + } + \renewcommand\thu@name@title@format[2]{% + % 字距 9.8bp,共 16bp * 3 + 9.8bp * 2 = 67.5bp + \thu@stretch{67.6bp}{##1}% + \hspace{9.8bp}% + % 字距 6bp + \begingroup + \renewcommand\CJKglue{\hspace{6bp}}% + ##2% + \endgroup + }% + \thu@titlepage@info@tabular{58bp}{3.59cm}{5.5em}{0.82cm}{% + \thu@info@item{培养单位}{\thu@info@item@format{1bp}}{\thu@department}% + \thu@info@item{学科}{\thu@info@item@format{2bp}}{\thu@discipline}% \thu@info@item{研究生}{\thu@name@title}{\thu@author}% \thu@info@item{学号}{}{\thu@student@id}% \thu@info@item{指导教师}{\thu@name@title}{\thu@supervisor}% @@ -4612,10 +4887,26 @@ \thu@info@item{联合指导教师}{\thu@name@title}{\thu@co@supervisor}% }\par } -\newcommand\thu@titlepage@info@master@engineer{% - \thu@titlepage@info@tabular{2.8cm}{2.8cm}{1.34cm}{% - \thu@info@item{培养单位}{}{\thu@department}% - \thu@info@item{工程领域}{}{\thu@discipline}% +% 无专业领域 +\newcommand\thu@titlepage@info@master@professional@without@field{% + \renewcommand\thu@info@item@format[2]{% + \begingroup + \renewcommand\CJKglue{\hspace{##1}}% + ##2% + \endgroup + } + \renewcommand\thu@name@title@format[2]{% + % 字距 9.8bp,共 16bp * 3 + 9.8bp * 2 = 67.5bp + \thu@stretch{67.6bp}{##1}% + \hspace{9.8bp}% + % 字距 6bp + \begingroup + \renewcommand\CJKglue{\hspace{6bp}}% + ##2% + \endgroup + }% + \thu@titlepage@info@tabular{58bp}{3.28cm}{5em}{1.52cm}{% + \thu@info@item{培养单位}{\thu@info@item@format{1bp}}{\thu@department}% \thu@info@item{申请人}{\thu@name@title}{\thu@author}% \thu@info@item{学号}{}{\thu@student@id}% \thu@info@item{指导教师}{\thu@name@title}{\thu@supervisor}% @@ -4623,15 +4914,8 @@ \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@co@supervisor}% - }\par +% 有专业领域 +\newcommand\thu@titlepage@info@master@professional@with@field{% } % \end{macrocode} % @@ -4658,7 +4942,7 @@ \newgeometry{ top = 5.5cm, bottom = 5cm, - hmargin = 3.6cm, + hmargin = 3.4cm, }% \thispagestyle{empty}% \thusetup{language = english}% @@ -4674,49 +4958,51 @@ \newcommand\thu@titlepage@en@graduate@academic{% \begingroup \centering - \null\vskip -0.7cm% - \thu@titlepage@en@title - \vfill + \null\vskip -0.31cm% + \parbox[t][143bp][t]{\textwidth}{% + \centering\thu@titlepage@en@title + }\par \sanhao[1.725]% \thu@titlepage@en@degree - \vskip 0.13cm% + \vskip 3bp% in\par - \vskip 0.1cm% + \vskip 3.5bp% {\bfseries\sffamily\thu@discipline@en\par} - \vskip 0.7cm% + \vfill {\sffamily by\par} \vskip 0.24cm% {\sffamily\bfseries\thu@author@en\par}% - \vskip 0.14cm% - \parbox[t][3.07cm][t]{\textwidth}{% - \centering\xiaosan[2.1]% + \vskip 0.18cm% + \parbox[t][3.0cm][t]{\textwidth}{% + \xiaosan[2.1]% \thu@titlepage@en@supervisor }\par \thu@titlepage@en@date - \vskip 0.65cm% + \vskip 0.7cm% \endgroup } \newcommand\thu@titlepage@en@graduate@professional{% \begingroup \centering - \null\vskip -0.7cm% - \thu@titlepage@en@title - \vfill + \null\vskip -0.31cm% + \parbox[t][143bp][t]{\textwidth}{% + \centering\thu@titlepage@en@title + }\par \sanhao[1.725]% \thu@titlepage@en@degree - \vskip 1.1cm% + \vfill {\sffamily by\par} \vskip 0.24cm% {\sffamily\bfseries\thu@author@en\par}% - \ifx\thu@discipline@en\empty + \ifx\thu@professional@field@en\empty \vskip 1.95cm% \else \vskip -0.1cm% - {\sffamily\bfseries(\thu@discipline@en)\par}% + {\sffamily\bfseries(\thu@professional@field@en)\par}% \vskip 1.1cm% \fi \parbox[t][3.37cm][t]{\textwidth}{% - \centering\xiaosan[1.82]% + \xiaosan[1.82]% \thu@titlepage@en@supervisor }\par \thu@titlepage@en@date @@ -4725,7 +5011,8 @@ } \newcommand\thu@titlepage@en@title{% \begingroup - \sffamily\bfseries\fontsize{20bp}{31bp}\selectfont + % 对齐到网格,每行 15.6bp + \sffamily\bfseries\fontsize{20bp}{31.2bp}\selectfont \thu@title@en\par \endgroup } @@ -4745,10 +5032,11 @@ professional \fi degree of\par - {\sffamily\bfseries\thu@degree@name@en\par}% + {\sffamily\bfseries\thu@degree@category@en\par}% } \newcommand\thu@titlepage@en@supervisor{% - \begin{tabular}{r@{\makebox[0.71cm][l]{:}}l}% + \hspace{1.27cm}% + \begin{tabular}{r@{\makebox[20.5bp][l]{\hspace{2bp}:}}l}% \renewcommand\arraystretch{1}% \thu@thesis@name@en{} Supervisor & \thu@supervisor@en \\ \ifx\thu@associate@supervisor@en\@empty\else @@ -5169,6 +5457,7 @@ \textbf{关键词:}% \fi \thu@clist@use{\thu@keywords}{;}% + \gdef\thu@keywords{}% \ifthu@degree@bachelor \cleardoublepage \fi @@ -5261,6 +5550,7 @@ % \begin{macrocode} \newenvironment{acknowledgements}{% \@mainmatterfalse + \thu@end@appendix@ref@section \ifthu@degree@bachelor \cleardoublepage \fi @@ -5309,6 +5599,7 @@ \newif\ifthu@statement@exists \newcommand\statement[1][]{% \@mainmatterfalse + \thu@end@appendix@ref@section \thu@statement@existstrue \ifthu@degree@bachelor \cleardoublepage @@ -5499,20 +5790,40 @@ % % 设置 \option{cite-style} 的接口,只对 \BibTeX{} 的编译方式有效。 % \begin{macrocode} - \thu@define@key{ - cite-style = { - name = cite@style, - choices = { - super, - inline, - author-year, - } +\thu@define@key{ + cite-style = { + name = cite@style, + choices = { + super, + inline, + author-year, } } +} % \end{macrocode} % % \subsubsection{BibTeX + \pkg{natbib} 宏包} % +% \begin{macrocode} +\def\bibliographystyle#1{% + \gdef\bu@bibstyle{#1}% + \ifx\@begindocumenthook\@undefined\else + \expandafter\AtBeginDocument + \fi + {\if@filesw + \immediate\write\@auxout{\string\bibstyle{#1}}% + \immediate\write\@auxout{\string\gdef\string\bu@bibstyle{#1}}% + \fi}% +} +\def\bibliography#1{% + \if@filesw + \immediate\write\@auxout{\string\bibdata{\zap@space#1 \@empty}}% + \immediate\write\@auxout{\string\gdef\string\bu@bibdata{#1}}% + \fi + \gdef\bu@bibdata{#1}% + \@input@{\jobname.bbl}} +% \end{macrocode} +% % \BibTeX{} 和 \pkg{natbib} 宏包的配置。 % \begin{macrocode} \PassOptionsToPackage{compress}{natbib} @@ -6016,6 +6327,68 @@ } % \end{macrocode} % +% 附录中的参考文献等另行编序号。 +% \begin{macrocode} +\newcommand\thu@end@appendix@ref@section{} +% \end{macrocode} +% +% 如果正文和附录引用了同一文献,\pkg{bibunits} 会给出无意义的警告,这里消除警告。 +% \begin{macrocode} +\AtEndOfPackageFile*{bibunits}{ + \ifthu@degree@graduate + \newcommand\thu@appendix@bib@num@format[1]{[\@Alph\c@chapter.#1]\hfill} + \g@addto@macro\appendix{% + \renewcommand\@bibunitname{\jobname-appendix-\@alph\c@chapter}% + \bibliographyunit[\chapter]% + \renewcommand\citenumfont{\@Alph\c@chapter.}% + \renewcommand\bibsection{% + \ctexset{section/numbering = false}% + \section{\bibname}% + \ctexset{section/numbering = true}% + }% + \renewcommand\@extra@binfo{@-\@alph\c@chapter}% + \renewcommand\@extra@b@citeb{@-\@alph\c@chapter}% + \let\bibnumfmt\thu@appendix@bib@num@format + \let\bibliographystyle\defaultbibliographystyle + \let\bibliography\thu@appendix@bibliography + } + \renewcommand\thu@end@appendix@ref@section{% + \bibliographyunit\relax + } + \providecommand\printbibliography{\putbib\relax}% + \AtEndDocument{\thu@end@appendix@ref@section} +% \end{macrocode} +% +% 如果正文和附录引用了同一文献,\pkg{bibunits} 会给出无意义的警告,这里消除警告。 +% \begin{macrocode} + % \let\@xtestdef\@gobbletwo % This doesn't work + \def\bibunits@rerun@warning{\relax} + \fi +} +\PassOptionsToPackage{defernumbers = true}{biblatex} +\AtEndOfPackageFile*{biblatex}{ + \ifthu@degree@graduate + \DeclareRefcontext{appendix}{} + \g@addto@macro\appendix{% + \pretocmd\chapter{% + \newrefsection + \@tempcnta=\c@chapter + \advance\@tempcnta\@ne + \newrefcontext[labelprefix = {\@Alph\@tempcnta.}]{appendix}% + }{}{\thu@patch@error{\chapter}}% + \defbibheading{bibliography}[\bibname]{% + \ctexset{section/numbering = false}% + \section{#1}% + \ctexset{section/numbering = true}% + }% + } + % \renewcommand\thu@end@appendix@ref@section{% + % \endrefsection + % } + \fi +} +% \end{macrocode} +% % 本科生《写作指南》有独特的要求:附录 A 为外文资料的调研阅读报告或书面翻译, % 并且要分别附上独立的参考文献和外文资料的原文索引。 % 所以这里定义 \env{survey} 和 \env{translation} 专门处理这两种情况, @@ -6082,9 +6455,11 @@ }, }% \section{摘要}% - \quotation }{% - \endquotation + \par + \ifx\thu@keywords\@empty\else + \textbf{关键词:}\thu@clist@use{\thu@keywords}{;}\par + \fi }% \thu@set@partial@toc@format \renewcommand\tableofcontents{% @@ -6189,6 +6564,7 @@ % \begin{macrocode} \newenvironment{resume}{% \@mainmatterfalse + \thu@end@appendix@ref@section \thu@chapter*{\thu@resume@name}% \ctexset{ section = { @@ -6205,13 +6581,18 @@ }, }% \setlist[achievements]{ - topsep = 6bp, - itemsep = 6bp, - leftmargin = 1cm, - labelwidth = 1cm, - labelsep = 0pt, - align = left, - label = [\arabic*], + topsep = 6bp, + itemsep = 6bp, + leftmargin = 1cm, + labelwidth = 1cm, + labelsep = 0pt, + first = { + \ifthu@degree@graduate + \fontsize{12bp}{16bp}\selectfont + \fi + }, + align = left, + label = [\arabic*], resume = achievements, }% \else @@ -6229,12 +6610,12 @@ \sffamily\fontsize{15bp}{20bp}\selectfont \fi \setlist[achievements]{ - topsep = 0bp, - itemsep = 0bp, - leftmargin = 1.75cm, - labelsep = 0.5cm, - align = right, - label = [\arabic*], + topsep = 0bp, + itemsep = 0bp, + leftmargin = 1.75cm, + labelsep = 0.5cm, + align = right, + label = [\arabic*], resume = achievements, }% \fi @@ -6286,6 +6667,7 @@ % \begin{environment}{comments} % \begin{macrocode} \NewEnviron{comments}[1][]{% + \thu@end@appendix@ref@section \ifthu@degree@graduate \@mainmatterfalse \kv@define@key{thu@comments}{name}{\let\thu@comments@name\kv@value}% @@ -6308,6 +6690,7 @@ % \begin{environment}{resolution} % \begin{macrocode} \NewEnviron{resolution}{% + \thu@end@appendix@ref@section \ifthu@degree@graduate \@mainmatterfalse \chapter{\thu@resolution@name}% @@ -6351,22 +6734,25 @@ % % \subsubsection{\pkg{hyperref} 宏包} % -% \begin{macrocode} +% 使用 \cs{PassOptionsToPackage} 的方式进行配置,允许用户在 \cs{usepackage} +% 覆盖配置(\href{https://github.com/tuna/thuthesis/issues/863}{tuna/thuthesis\#863})。 +% +% \begin{macrocode} +\PassOptionsToPackage{ + linktoc = all, + bookmarksdepth = 2, + bookmarksnumbered = true, + bookmarksopen = true, + bookmarksopenlevel = 1, + bookmarksdepth = 3, + unicode = true, + psdextra = true, + breaklinks = true, + plainpages = false, + pdfdisplaydoctitle = true, + hidelinks, +}{hyperref} \AtEndOfPackageFile*{hyperref}{ - \hypersetup{ - linktoc = all, - bookmarksdepth = 2, - bookmarksnumbered = true, - bookmarksopen = true, - bookmarksopenlevel = 1, - bookmarksdepth = 3, - unicode = true, - psdextra = true, - breaklinks = true, - plainpages = false, - pdfdisplaydoctitle = true, - hidelinks, - }% \newcounter{thu@bookmark} \renewcommand\thu@pdfbookmark[2]{% \phantomsection @@ -6408,14 +6794,14 @@ \hypersetup{ pdftitle = \thu@title, pdfauthor = \thu@author, - pdfsubject = \thu@degree@name, + pdfsubject = \thu@degree@category, pdfkeywords = \thu@keywords, }% \else \hypersetup{ pdftitle = \thu@title@en, pdfauthor = \thu@author@en, - pdfsubject = \thu@degree@name@en, + pdfsubject = \thu@degree@category@en, pdfkeywords = \thu@keywords@en, }% \fi @@ -6787,35 +7173,30 @@ pdfdisplaydoctitle = true }% -\ifthenelse{\equal{\@nameuse{g__ctex_fontset_tl}}{mac}}{ - \setmainfont{Palatino} - \setsansfont[Scale=MatchLowercase]{Helvetica} - \setmonofont[Scale=MatchLowercase]{Menlo} -}{ - \setmainfont[ - Extension = .otf, - UprightFont = *-regular, - BoldFont = *-bold, - ItalicFont = *-italic, - BoldItalicFont = *-bolditalic, - ]{texgyrepagella} - \setsansfont[ - Extension = .otf, - UprightFont = *-regular, - BoldFont = *-bold, - ItalicFont = *-italic, - BoldItalicFont = *-bolditalic, - ]{texgyreheros} - \setmonofont[ - Extension = .otf, - UprightFont = *-regular, - BoldFont = *-bold, - ItalicFont = *-italic, - BoldItalicFont = *-bolditalic, - Scale = MatchLowercase, - Ligatures = CommonOff, - ]{texgyrecursor} -} +\setmainfont[ + Extension = .otf, + UprightFont = *-regular, + BoldFont = *-bold, + ItalicFont = *-italic, + BoldItalicFont = *-bolditalic, +]{texgyrepagella} +\setsansfont[ + Extension = .otf, + UprightFont = *-regular, + BoldFont = *-bold, + ItalicFont = *-italic, + BoldItalicFont = *-bolditalic, +]{texgyreheros} +\setmonofont[ + Extension = .otf, + UprightFont = *-regular, + BoldFont = *-bold, + ItalicFont = *-italic, + BoldItalicFont = *-bolditalic, + Scale = MatchLowercase, + Ligatures = CommonOff, +]{texgyrecursor} + \unimathsetup{ math-style=ISO, bold-style=ISO, diff --git a/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls b/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls index 7a9eaf988b0..35614ddded8 100644 --- a/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls +++ b/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls @@ -23,7 +23,7 @@ %% \NeedsTeXFormat{LaTeX2e}[2017/04/15] \ProvidesClass{thuthesis} -[2023/04/06 7.3.2 Tsinghua University Thesis Template] +[2023/05/15 7.4.0 Tsinghua University Thesis Template] \newcommand\thu@error[1]{% \ClassError{thuthesis}{#1}{}% } @@ -58,7 +58,7 @@ } \hyphenation{Thu-Thesis} \def\thuthesis{ThuThesis} -\def\version{7.3.2} +\def\version{7.4.0} \RequirePackage{kvdefinekeys} \RequirePackage{kvsetkeys} \RequirePackage{kvoptions} @@ -358,11 +358,9 @@ } } \AtEndOfPackageFile*{natbib}{ - \ifthu@degree@bachelor - \@ifpackageloaded{apacite}{}{ - \RequirePackage{bibunits} - } - \fi + \@ifpackageloaded{apacite}{}{ + \RequirePackage{bibunits} + } } \newcommand\thu@package@conflict[2]{% \AtEndOfPackageFile*{#1}{% @@ -710,7 +708,7 @@ \newcommand\thu@set@font@times{% \setmainfont{Times New Roman}% \setsansfont{Arial}% - \ifthu@system@mac + \ifthu@fontset@mac \setmonofont{Menlo}[Scale = MatchLowercase]% \else \setmonofont{Courier New}[Scale = MatchLowercase]% @@ -1216,7 +1214,7 @@ \newcommand\square{\mdlgwhtsquare}% \newcommand\blacksquare{\mdlgblksquare}% \AtBeginDocument{% - \renewcommand\checkmark{\ensuremath{✓}}% + \renewcommand\checkmark{\ensuremath{\symbol{"2713}}}% }% \renewcommand\thu@qed{\ensuremath{\QED}}% }% @@ -2082,14 +2080,29 @@ joint-supervisor* = { name = co@supervisor@en, }, - degree-name = { + degree-category = { default = {工学博士}, - name = degree@name, + name = degree@category, }, - degree-name* = { + degree-category* = { default = {Doctor of Philosophy}, - name = degree@name@en, + name = degree@category@en, + }, + % 为了向后兼容 + degree-name = { + name = degree@category, }, + degree-name* = { + name = degree@category@en, + }, +} +\thu@option@hook{degree-name}{% + \thu@warning{`degree-name' is deprecated. Use `degree-category' instead.} +} +\thu@option@hook{degree-name*}{% + \thu@warning{`degree-name*' is deprecated. Use `degree-category*' instead.} +} +\thu@define@key{ department = { default = {计算机科学与技术系}, }, @@ -2100,6 +2113,34 @@ % default = {Computer Science and Technology}, name = discipline@en, }, +} +\thu@option@hook{discipline}{% + \ifthu@degree@type@professional + \thu@warning{`discipline' for professional degree is deprecated. Use `professional-field' instead.} + \let\thu@professional@field\thu@discipline + \let\thu@discipline\@empty + \fi +} +\thu@option@hook{discipline*}{% + \ifthu@degree@type@professional + \thu@warning{`discipline*' for professional degree is deprecated. Use `professional-field*' instead.} + \let\thu@professional@field@en\thu@discipline@en + \let\thu@discipline@en\@empty + \fi +} +\thu@define@key{ + professional-field = { + name = professional@field, + }, + professional-field* = { + name = professional@field@en, + }, + engineering-field = { + name = engineering@field, + }, + engineering-field* = { + name = engineering@field@en, + }, date = { default = {\the\year-\two@digits{\month}-\two@digits{\day}}, }, @@ -2195,8 +2236,19 @@ \stepcounter{thu@csl@count}% } \newcommand\thu@name@title@format[2]{% - \thu@pad{3cm}{\thu@stretch{4em}{#1}}% - \thu@stretch{3em}{#2}% + \ifthu@degree@type@professional + % 字距 9.8bp,共 16bp * 3 + 9.8bp * 2 = 67.5bp + \thu@stretch{67.6bp}{#1}% + \hspace{9.8bp}% + % 字距 6bp + \begingroup + \renewcommand\CJKglue{\hspace{9.8bp}}% + #2% + \endgroup + \else + \thu@pad{3cm}{\thu@stretch{4em}{#1}}% + \thu@stretch{3em}{#2}% + \fi } \newcommand\thu@name@title[1]{% \setcounter{thu@csl@count}{0}% @@ -2226,12 +2278,24 @@ \ifthu@degree@graduate \ifthu@thesis@type@thesis \ifthu@degree@type@academic - \thu@titlepage@graduate@academic + \ifthu@degree@doctor + \thu@titlepage@doctor@academic + \else + \thu@titlepage@master@academic + \fi \else - \ifx\thu@discipline\@empty - \thu@titlepage@graduate@professional + \ifthu@degree@doctor + \thu@titlepage@doctor@professional \else - \thu@titlepage@graduate@academic + \ifx\thu@professional@field\@empty + \ifx\thu@engineering@field\@empty + \thu@titlepage@master@professional@without@field + \else + \thu@titlepage@master@professional@with@field + \fi + \else + \thu@titlepage@master@professional@with@field + \fi \fi \fi \else @@ -2252,7 +2316,7 @@ \fi \thu@reset@main@language } -\newcommand\thu@titlepage@graduate@academic{% +\newcommand\thu@titlepage@doctor@academic{% \newgeometry{ top = 2cm, bottom = 6cm, @@ -2280,10 +2344,10 @@ \vskip -9.2pt% \fi \vskip 24.1pt% - \thu@titlepage@degree + \thu@titlepage@degree\par \vfill \parbox[t][7.25cm][t]{\textwidth}{% - \centering\fangsong\fontsize{16bp}{31.2bp}\selectfont + \fangsong\fontsize{16bp}{31.2bp}\selectfont \thu@titlepage@info }\par \parbox[t][1.03cm][t]{\textwidth}{\centering\thu@titlepage@date}\par @@ -2291,7 +2355,7 @@ \clearpage \restoregeometry } -\newcommand\thu@titlepage@graduate@professional{% +\newcommand\thu@titlepage@doctor@professional{% \newgeometry{ top = 2cm, bottom = 6cm, @@ -2322,11 +2386,160 @@ \vskip 25.5pt% \thu@titlepage@degree \vfill - \parbox[t][5.24cm][t]{\textwidth}{% - \centering\fangsong\fontsize{16bp}{1cm}\selectfont + \parbox[b][5.24cm][b]{\textwidth}{% + \fangsong\fontsize{16bp}{1cm}\selectfont \thu@titlepage@info }\par - \parbox[t][1.25cm][t]{\textwidth}{\centering\thu@titlepage@date}\par + \vskip 2.22cm% + \parbox[t][1.0cm][t]{\textwidth}{\centering\thu@titlepage@date}\par + \endgroup + \clearpage + \restoregeometry +} +\newcommand\thu@titlepage@master@academic{% + \newgeometry{ + top = 2cm, + bottom = 6cm, + hmargin = 3.5cm, + }% + \thispagestyle{empty}% + \null\vskip 10bp% + \begingroup + \centering + \parbox[t][55bp][t]{\textwidth}{% + \hskip -23bp% + \thu@titlepage@secret + }\par + \vskip 34pt% + \begingroup + % 1.21 倍行距 + \sffamily\fontsize{26bp}{40.898bp}\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 18pt% + \thu@titlepage@degree\par + \vfill + \parbox[t][7.05cm][t]{\textwidth}{% + % 表格行高 1cm = 28.35bp + \fangsong\fontsize{16bp}{28.35bp}\selectfont + \thu@titlepage@info + }\par + \parbox[t][37bp][t]{\textwidth}{\centering\thu@titlepage@date}\par + \endgroup + \clearpage + \restoregeometry +} +\newcommand\thu@titlepage@master@professional@without@field{% + \newgeometry{ + top = 2cm, + bottom = 6cm, + hmargin = 3.5cm, + }% + \thispagestyle{empty}% + \null\vskip 15bp% + \begingroup + \centering + \parbox[t][41bp][t]{\textwidth}{% + \hskip -23bp% + \thu@titlepage@secret + }\par + \vskip 1.5cm% + \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[b][5.24cm][b]{\textwidth}{% + \fangsong\fontsize{16bp}{1cm}\selectfont + \thu@titlepage@info + }\par + \vskip 2.22cm% + \parbox[t][35.5bp][t]{\textwidth}{\centering\thu@titlepage@date}\par + \endgroup + \clearpage + \restoregeometry +} +\newcommand\thu@titlepage@master@professional@with@field{% + \newgeometry{ + top = 2cm, + bottom = 6cm, + hmargin = 3.5cm, + }% + \thispagestyle{empty}% + \null\vskip 10bp% + \begingroup + \centering + \parbox[t][46bp][t]{\textwidth}{% + \hskip -23bp% + \thu@titlepage@secret + }\par + \vskip 1.5cm% + \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 + \vskip 119bp% + \parbox[b][5.24cm][b]{\textwidth}{% + \fangsong\fontsize{16bp}{31bp}\selectfont + \renewcommand\thu@info@item@format[2]{% + \begingroup + \renewcommand\CJKglue{\hspace{##1}}% + ##2% + \endgroup + }% + \renewcommand\thu@name@title@format[2]{% + % 字距 9bp,共 16bp * 3 + 9bp * 2 = 66bp + \thu@stretch{66bp}{##1}% + \hspace{22bp}% + % 字距 6bp + \begingroup + \renewcommand\CJKglue{\hspace{16bp}}% + ##2% + \endgroup + }% + \thu@titlepage@info@tabular{65bp}{86.5bp}{81bp}{30.5bp}{% + \thu@info@item{培养单位}{\thu@info@item@format{1bp}}{\thu@department}% + \thu@info@item{专业领域}{\thu@info@item@format{2bp}}{\thu@professional@field}% + \thu@info@item{工程领域}{\thu@info@item@format{2bp}}{\thu@engineering@field}% + \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@co@supervisor}% + }\par + }\par + \vfill + \parbox[t][33.5bp][t]{\textwidth}{\centering\thu@titlepage@date}\par \endgroup \clearpage \restoregeometry @@ -2381,7 +2594,7 @@ \ifx\thu@secret@level\@empty \phantom{秘密}% \else - \thu@secret@level★\makebox[3em][c]{\thu@secret@year}年% + \thu@secret@level\symbol{"2605}\makebox[3em][c]{\thu@secret@year}年% \fi\par } \newcommand\thu@titlepage@degree{% @@ -2395,7 +2608,7 @@ \renewcommand\CJKglue{\hspace{1bp}}% \fi \ifthu@thesis@type@thesis - (申请清华大学\thu@degree@name + (申请清华大学\thu@degree@category \ifthu@degree@type@professional 专业% \fi @@ -2427,29 +2640,35 @@ \ifthu@degree@type@academic \thu@titlepage@info@master@academic \else - \ifx\thu@discipline\@empty - \thu@titlepage@info@master@other + \ifx\thu@professional@field\@empty + \ifx\thu@engineering@field\@empty + \thu@titlepage@info@master@professional@without@field + \else + \thu@titlepage@info@master@professional@with@field + \fi \else - \thu@titlepage@info@master@engineer + \thu@titlepage@info@master@professional@with@field \fi \fi \fi } -\newcommand\thu@titlepage@info@tabular[4]{% +\newcommand\thu@titlepage@info@tabular[5]{% \def\thu@info@item##1##2##3{% \ifx##3\@empty\else - \thu@pad{#1}{\thu@fixed@box{#2}{##1}}% - \thu@pad{#3}{:}% + \thu@pad{#2}{\thu@fixed@box{#3}{##1}}% + \thu@pad{#4}{:}% ##2{##3}\\ \fi }% + \hspace{#1}% \begin{tabular}{l}% \renewcommand\arraystretch{1}% - #4% + #5% \end{tabular}% } +\newcommand\thu@info@item@format[1]{#1} \newcommand\thu@titlepage@info@doctor@academic{% - \thu@titlepage@info@tabular{2.8cm}{2.8cm}{0.82cm}{% + \thu@titlepage@info@tabular{2.3cm}{2.85cm}{2.75cm}{0.77cm}{% \thu@info@item{培养单位}{}{\thu@department}% \thu@info@item{学科}{}{\thu@discipline}% \thu@info@item{研究生}{\thu@name@title}{\thu@author}% @@ -2460,19 +2679,35 @@ }\par } \newcommand\thu@titlepage@info@doctor@professional{% - \thu@titlepage@info@tabular{3.03cm}{5em}{1.52cm}{% - \thu@info@item{培养单位}{}{\thu@department}% + \thu@titlepage@info@tabular{2.3cm}{3.1cm}{5em}{1.42cm}{% + \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@co@supervisor}% + \thu@info@item{联合指导教师}{\thu@name@title}{\thu@co@supervisor}% }\par } \newcommand\thu@titlepage@info@master@academic{% - \thu@titlepage@info@tabular{3.59cm}{5.5em}{0.82cm}{% - \thu@info@item{培养单位}{}{\thu@department}% - \thu@info@item{学科}{}{\thu@discipline}% + \renewcommand\thu@info@item@format[2]{% + \begingroup + \renewcommand\CJKglue{\hspace{##1}}% + ##2% + \endgroup + } + \renewcommand\thu@name@title@format[2]{% + % 字距 9.8bp,共 16bp * 3 + 9.8bp * 2 = 67.5bp + \thu@stretch{67.6bp}{##1}% + \hspace{9.8bp}% + % 字距 6bp + \begingroup + \renewcommand\CJKglue{\hspace{6bp}}% + ##2% + \endgroup + }% + \thu@titlepage@info@tabular{58bp}{3.59cm}{5.5em}{0.82cm}{% + \thu@info@item{培养单位}{\thu@info@item@format{1bp}}{\thu@department}% + \thu@info@item{学科}{\thu@info@item@format{2bp}}{\thu@discipline}% \thu@info@item{研究生}{\thu@name@title}{\thu@author}% \thu@info@item{学号}{}{\thu@student@id}% \thu@info@item{指导教师}{\thu@name@title}{\thu@supervisor}% @@ -2480,10 +2715,25 @@ \thu@info@item{联合指导教师}{\thu@name@title}{\thu@co@supervisor}% }\par } -\newcommand\thu@titlepage@info@master@engineer{% - \thu@titlepage@info@tabular{2.8cm}{2.8cm}{1.34cm}{% - \thu@info@item{培养单位}{}{\thu@department}% - \thu@info@item{工程领域}{}{\thu@discipline}% +\newcommand\thu@titlepage@info@master@professional@without@field{% + \renewcommand\thu@info@item@format[2]{% + \begingroup + \renewcommand\CJKglue{\hspace{##1}}% + ##2% + \endgroup + } + \renewcommand\thu@name@title@format[2]{% + % 字距 9.8bp,共 16bp * 3 + 9.8bp * 2 = 67.5bp + \thu@stretch{67.6bp}{##1}% + \hspace{9.8bp}% + % 字距 6bp + \begingroup + \renewcommand\CJKglue{\hspace{6bp}}% + ##2% + \endgroup + }% + \thu@titlepage@info@tabular{58bp}{3.28cm}{5em}{1.52cm}{% + \thu@info@item{培养单位}{\thu@info@item@format{1bp}}{\thu@department}% \thu@info@item{申请人}{\thu@name@title}{\thu@author}% \thu@info@item{学号}{}{\thu@student@id}% \thu@info@item{指导教师}{\thu@name@title}{\thu@supervisor}% @@ -2491,15 +2741,7 @@ \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@co@supervisor}% - }\par +\newcommand\thu@titlepage@info@master@professional@with@field{% } \newcommand\thu@titlepage@date{% \begingroup @@ -2516,7 +2758,7 @@ \newgeometry{ top = 5.5cm, bottom = 5cm, - hmargin = 3.6cm, + hmargin = 3.4cm, }% \thispagestyle{empty}% \thusetup{language = english}% @@ -2532,49 +2774,51 @@ \newcommand\thu@titlepage@en@graduate@academic{% \begingroup \centering - \null\vskip -0.7cm% - \thu@titlepage@en@title - \vfill + \null\vskip -0.31cm% + \parbox[t][143bp][t]{\textwidth}{% + \centering\thu@titlepage@en@title + }\par \sanhao[1.725]% \thu@titlepage@en@degree - \vskip 0.13cm% + \vskip 3bp% in\par - \vskip 0.1cm% + \vskip 3.5bp% {\bfseries\sffamily\thu@discipline@en\par} - \vskip 0.7cm% + \vfill {\sffamily by\par} \vskip 0.24cm% {\sffamily\bfseries\thu@author@en\par}% - \vskip 0.14cm% - \parbox[t][3.07cm][t]{\textwidth}{% - \centering\xiaosan[2.1]% + \vskip 0.18cm% + \parbox[t][3.0cm][t]{\textwidth}{% + \xiaosan[2.1]% \thu@titlepage@en@supervisor }\par \thu@titlepage@en@date - \vskip 0.65cm% + \vskip 0.7cm% \endgroup } \newcommand\thu@titlepage@en@graduate@professional{% \begingroup \centering - \null\vskip -0.7cm% - \thu@titlepage@en@title - \vfill + \null\vskip -0.31cm% + \parbox[t][143bp][t]{\textwidth}{% + \centering\thu@titlepage@en@title + }\par \sanhao[1.725]% \thu@titlepage@en@degree - \vskip 1.1cm% + \vfill {\sffamily by\par} \vskip 0.24cm% {\sffamily\bfseries\thu@author@en\par}% - \ifx\thu@discipline@en\empty + \ifx\thu@professional@field@en\empty \vskip 1.95cm% \else \vskip -0.1cm% - {\sffamily\bfseries(\thu@discipline@en)\par}% + {\sffamily\bfseries(\thu@professional@field@en)\par}% \vskip 1.1cm% \fi \parbox[t][3.37cm][t]{\textwidth}{% - \centering\xiaosan[1.82]% + \xiaosan[1.82]% \thu@titlepage@en@supervisor }\par \thu@titlepage@en@date @@ -2583,7 +2827,8 @@ } \newcommand\thu@titlepage@en@title{% \begingroup - \sffamily\bfseries\fontsize{20bp}{31bp}\selectfont + % 对齐到网格,每行 15.6bp + \sffamily\bfseries\fontsize{20bp}{31.2bp}\selectfont \thu@title@en\par \endgroup } @@ -2603,10 +2848,11 @@ professional \fi degree of\par - {\sffamily\bfseries\thu@degree@name@en\par}% + {\sffamily\bfseries\thu@degree@category@en\par}% } \newcommand\thu@titlepage@en@supervisor{% - \begin{tabular}{r@{\makebox[0.71cm][l]{:}}l}% + \hspace{1.27cm}% + \begin{tabular}{r@{\makebox[20.5bp][l]{\hspace{2bp}:}}l}% \renewcommand\arraystretch{1}% \thu@thesis@name@en{} Supervisor & \thu@supervisor@en \\ \ifx\thu@associate@supervisor@en\@empty\else @@ -2965,6 +3211,7 @@ \textbf{关键词:}% \fi \thu@clist@use{\thu@keywords}{;}% + \gdef\thu@keywords{}% \ifthu@degree@bachelor \cleardoublepage \fi @@ -3028,6 +3275,7 @@ \newcommand{\thu@backdate}{日\hspace{1em}期:} \newenvironment{acknowledgements}{% \@mainmatterfalse + \thu@end@appendix@ref@section \ifthu@degree@bachelor \cleardoublepage \fi @@ -3070,6 +3318,7 @@ \newif\ifthu@statement@exists \newcommand\statement[1][]{% \@mainmatterfalse + \thu@end@appendix@ref@section \thu@statement@existstrue \ifthu@degree@bachelor \cleardoublepage @@ -3192,16 +3441,33 @@ {\thu@equation@name~\thecontentslabel}{} {\nobreak\thu@leaders\nobreak\thecontentspage} \contentsuse{equation}{loe} - \thu@define@key{ - cite-style = { - name = cite@style, - choices = { - super, - inline, - author-year, - } +\thu@define@key{ + cite-style = { + name = cite@style, + choices = { + super, + inline, + author-year, } } +} +\def\bibliographystyle#1{% + \gdef\bu@bibstyle{#1}% + \ifx\@begindocumenthook\@undefined\else + \expandafter\AtBeginDocument + \fi + {\if@filesw + \immediate\write\@auxout{\string\bibstyle{#1}}% + \immediate\write\@auxout{\string\gdef\string\bu@bibstyle{#1}}% + \fi}% +} +\def\bibliography#1{% + \if@filesw + \immediate\write\@auxout{\string\bibdata{\zap@space#1 \@empty}}% + \immediate\write\@auxout{\string\gdef\string\bu@bibdata{#1}}% + \fi + \gdef\bu@bibdata{#1}% + \@input@{\jobname.bbl}} \PassOptionsToPackage{compress}{natbib} \AtEndOfPackageFile*{natbib}{ \DeclareRobustCommand\inlinecite{\@inlinecite} @@ -3589,6 +3855,56 @@ appendix-figure-in-lof = false, }% } +\newcommand\thu@end@appendix@ref@section{} +\AtEndOfPackageFile*{bibunits}{ + \ifthu@degree@graduate + \newcommand\thu@appendix@bib@num@format[1]{[\@Alph\c@chapter.#1]\hfill} + \g@addto@macro\appendix{% + \renewcommand\@bibunitname{\jobname-appendix-\@alph\c@chapter}% + \bibliographyunit[\chapter]% + \renewcommand\citenumfont{\@Alph\c@chapter.}% + \renewcommand\bibsection{% + \ctexset{section/numbering = false}% + \section{\bibname}% + \ctexset{section/numbering = true}% + }% + \renewcommand\@extra@binfo{@-\@alph\c@chapter}% + \renewcommand\@extra@b@citeb{@-\@alph\c@chapter}% + \let\bibnumfmt\thu@appendix@bib@num@format + \let\bibliographystyle\defaultbibliographystyle + \let\bibliography\thu@appendix@bibliography + } + \renewcommand\thu@end@appendix@ref@section{% + \bibliographyunit\relax + } + \providecommand\printbibliography{\putbib\relax}% + \AtEndDocument{\thu@end@appendix@ref@section} + % \let\@xtestdef\@gobbletwo % This doesn't work + \def\bibunits@rerun@warning{\relax} + \fi +} +\PassOptionsToPackage{defernumbers = true}{biblatex} +\AtEndOfPackageFile*{biblatex}{ + \ifthu@degree@graduate + \DeclareRefcontext{appendix}{} + \g@addto@macro\appendix{% + \pretocmd\chapter{% + \newrefsection + \@tempcnta=\c@chapter + \advance\@tempcnta\@ne + \newrefcontext[labelprefix = {\@Alph\@tempcnta.}]{appendix}% + }{}{\thu@patch@error{\chapter}}% + \defbibheading{bibliography}[\bibname]{% + \ctexset{section/numbering = false}% + \section{#1}% + \ctexset{section/numbering = true}% + }% + } + % \renewcommand\thu@end@appendix@ref@section{% + % \endrefsection + % } + \fi +} \@ifpackagelater{titletoc}{2019/07/14}{ \newcommand\thu@print@contents[5]{% \printcontents[#1]{#2}{#3}[#4]{}% @@ -3636,9 +3952,11 @@ }, }% \section{摘要}% - \quotation }{% - \endquotation + \par + \ifx\thu@keywords\@empty\else + \textbf{关键词:}\thu@clist@use{\thu@keywords}{;}\par + \fi }% \thu@set@partial@toc@format \renewcommand\tableofcontents{% @@ -3713,6 +4031,7 @@ \newcommand\thu@appendix@bibliography[1]{\putbib[#1]} \newenvironment{resume}{% \@mainmatterfalse + \thu@end@appendix@ref@section \thu@chapter*{\thu@resume@name}% \ctexset{ section = { @@ -3729,13 +4048,18 @@ }, }% \setlist[achievements]{ - topsep = 6bp, - itemsep = 6bp, - leftmargin = 1cm, - labelwidth = 1cm, - labelsep = 0pt, - align = left, - label = [\arabic*], + topsep = 6bp, + itemsep = 6bp, + leftmargin = 1cm, + labelwidth = 1cm, + labelsep = 0pt, + first = { + \ifthu@degree@graduate + \fontsize{12bp}{16bp}\selectfont + \fi + }, + align = left, + label = [\arabic*], resume = achievements, }% \else @@ -3753,12 +4077,12 @@ \sffamily\fontsize{15bp}{20bp}\selectfont \fi \setlist[achievements]{ - topsep = 0bp, - itemsep = 0bp, - leftmargin = 1.75cm, - labelsep = 0.5cm, - align = right, - label = [\arabic*], + topsep = 0bp, + itemsep = 0bp, + leftmargin = 1.75cm, + labelsep = 0.5cm, + align = right, + label = [\arabic*], resume = achievements, }% \fi @@ -3791,6 +4115,7 @@ \thu@error{The "\protect\publicationskip" is obsolete. Do not use it}% } \NewEnviron{comments}[1][]{% + \thu@end@appendix@ref@section \ifthu@degree@graduate \@mainmatterfalse \kv@define@key{thu@comments}{name}{\let\thu@comments@name\kv@value}% @@ -3807,6 +4132,7 @@ \fi } \NewEnviron{resolution}{% + \thu@end@appendix@ref@section \ifthu@degree@graduate \@mainmatterfalse \chapter{\thu@resolution@name}% @@ -3831,21 +4157,21 @@ \thu@pdfbookmark{0}{综合论文训练记录表}% \includepdf[pages=-]{\thu@record@file}% } +\PassOptionsToPackage{ + linktoc = all, + bookmarksdepth = 2, + bookmarksnumbered = true, + bookmarksopen = true, + bookmarksopenlevel = 1, + bookmarksdepth = 3, + unicode = true, + psdextra = true, + breaklinks = true, + plainpages = false, + pdfdisplaydoctitle = true, + hidelinks, +}{hyperref} \AtEndOfPackageFile*{hyperref}{ - \hypersetup{ - linktoc = all, - bookmarksdepth = 2, - bookmarksnumbered = true, - bookmarksopen = true, - bookmarksopenlevel = 1, - bookmarksdepth = 3, - unicode = true, - psdextra = true, - breaklinks = true, - plainpages = false, - pdfdisplaydoctitle = true, - hidelinks, - }% \newcounter{thu@bookmark} \renewcommand\thu@pdfbookmark[2]{% \phantomsection @@ -3878,14 +4204,14 @@ \hypersetup{ pdftitle = \thu@title, pdfauthor = \thu@author, - pdfsubject = \thu@degree@name, + pdfsubject = \thu@degree@category, pdfkeywords = \thu@keywords, }% \else \hypersetup{ pdftitle = \thu@title@en, pdfauthor = \thu@author@en, - pdfsubject = \thu@degree@name@en, + pdfsubject = \thu@degree@category@en, pdfkeywords = \thu@keywords@en, }% \fi |