% \iffalse meta-comment
% !TeX program  = XeLaTeX
% !TeX encoding = UTF-8
%
% Copyright (C) 2019--2026 by Nan Geng <nangeng@nwafu.edu.cn>
%
% This work may be distributed and/or modified under the
% 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'.
%
% The Current Maintainer of this work is Nan Geng.
%
% This work consists of the files nwafuthesis.dtx,
%                                 nwafuthesis-doc.dtx,
%           and the derived files nwafuthesis.ins,
%                                 nwafuthesis.cls,
%                                 nwafudoc.cls,
%
%<*internal>
\iffalse
%</internal>
%
%<*internal>
\fi
\begingroup
  \def\NameOfLaTeXe{LaTeX2e}
\expandafter\endgroup\ifx\NameOfLaTeXe\fmtname\else
\csname fi\endcsname
%</internal>
%
%<*install>
\input l3docstrip.tex
\keepsilent
\askforoverwritefalse

\preamble

    Copyright (C) 2019--2026 by Nan Geng <nangeng@nwafu.edu.cn>

    This work may be distributed and/or modified under the
    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'.

    The Current Maintainer of this work is Nan Geng.

    This work consists of the files nwafuthesis.dtx,
                                    nwafuthesis-doc.dtx,
              and the derived files nwafuthesis.ins,
                                    nwafuthesis.cls,
                                    nwafudoc.cls,

\endpreamble

\generate{
  \usedir{tex/latex/nwafuthesis}
    \file{\jobname.cls}        {\from{\jobname.dtx}{class}}
    \file{nwafudoc.cls}        {\from{\jobname.dtx}{doc}
                                \from{\jobname-doc.dtx}{doc}}
%</install>
%<*internal>
  \usedir{source/latex/nwafuthesis}
    \file{\jobname.ins}        {\from{\jobname.dtx}{install}}
%</internal>
%<*install>
  \usedir{doc/latex/nwafuthesis}
  \nopreamble\nopostamble
}

\obeyspaces
\Msg{*************************************************************}
\Msg{*                                                           *}
\Msg{* To finish the installation you have to move the following *}
\Msg{* files into a directory searched by TeX:                   *}
\Msg{*                                                           *}
\Msg{* The recommended directory is TDS:tex/latex/nwafuthesis    *}
\Msg{*                                                           *}
\Msg{*     nwafuthesis.cls                                       *}
\Msg{*                                                           *}
\Msg{* To produce the documentation, run the file nwafuthesis.dtx*}
\Msg{* through XeLaTeX.                                          *}
\Msg{*                                                           *}
\Msg{* Happy TeXing!                                             *}
\Msg{*                                                           *}
\Msg{*************************************************************}

\endbatchfile
%</install>
%
%<*internal>
\fi
%</internal>
%
%<class|doc>\NeedsTeXFormat{LaTeX2e}
%<class|doc>\RequirePackage{expl3}
%<*!(driver|install)>
%<!readme>\GetIdInfo $Id: nwafuthesis.dtx 2.16 2026-05-16 Nan Geng <nangeng@nwafu.edu.cn> $
%<class>  {Thesis template for Northwest A\&F University}
%<class>\ProvidesExplClass{\ExplFileName}
%<definition>  {Definition file for nwafuthesis}
%<definition>\ProvidesExplFile{\ExplFileName.def}
%<doc>  {Documentation class for nwafuthesis}
%<doc>\ProvidesExplClass{nwafudoc}
%<!readme>  {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
%</!(driver|install)>
%<*driver>
% \PassOptionsToPackage{showframe}{geometry}
\documentclass{nwafudoc}
\usepackage{multirow,xeCJKfntef,xpinyin,csquotes}
\hypersetup{
  pdftitle  = {nwafuthesis: 西北农林科技大学学位论文模板},
  pdfauthor = {耿楠}
  }
% 全角标点放在引号中，需要改成半角式，否则间距过大，不好看
\def\FSID{“{\xeCJKsetup{PunctStyle=banjiao}。}”} % U+3002
\def\FSFW{“{\xeCJKsetup{PunctStyle=banjiao}．}”} % U+FF0E
\def\COFW{“{\xeCJKsetup{PunctStyle=banjiao}：}”} % U+FF1A
\def\SCFW{“{\xeCJKsetup{PunctStyle=banjiao}；}”} % U+FF1B

% nwafuthesis的LOGO
\newcommand{\nwafuthesis}{%
  \makebox{\rmfamily%
    N\hspace{-0.2ex}\raisebox{-0.5ex}{W}\raisebox{0.5ex}{\hspace{-0.2ex}\textsc{AFU}}\hspace{0.3ex}%
    \textsc{Thesis}}}

\title{\textcolor{MaterialIndigo800}{%
  \textbf{\nwafuthesis: 西北农林科技大学学位论文
          \xpinyin[font=\sffamily,format=\color{MaterialIndigo800}]{模}{mu2}板}}}
\author{耿楠}
\date{\today\quad v2.16%
  \thanks{\url{https://gitee.com/nwafu_nan/nwafuthesis-l3}.}}

\begin{document}
%<!--CODEDOC-->  \DisableImplementation
  \EnableImplementation
  \def\nwafuCODEDOC{}
  \DocInput{nwafuthesis.dtx}
  %\DocInput{nwafuthesis-doc.dtx}
  \IndexLayout
  \PrintChanges
  \PrintIndex
\end{document}
%</driver>
% \fi
%
% \changes{v2.13}{2026/05/12}{按2026年研究生撰写规范修订研究生页面布局和前料页码格式。}
% \changes{v2.12}{2026/05/10}{按2026年研究生撰写规范修订研究生模板封面。}
% \changes{v2.02}{2026/05/08}{用信息元数据驱动模式重构封面部件生成代码。}
% \changes{v2.00}{2026/04/29}{按2026年本科撰写规范修订本科模板。}
% \changes{v1.10}{2022/03/17}{更新实现细节。}
% \changes{v1.00}{2021/06/06}{开始发布测试。}
% \changes{v1.00}{2021/05/12}{开始编写模板。}
%
% \CheckSum{0}
%
% \CharacterTable
%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%   Digits        \0\1\2\3\4\5\6\7\8\9
%   Exclamation   \!     Double quote  \"     Hash (number) \#
%   Dollar        \$     Percent       \%     Ampersand     \&
%   Acute accent  \'     Left paren    \(     Right paren   \)
%   Asterisk      \*     Plus          \+     Comma         \,
%   Minus         \-     Point         \.     Solidus       \/
%   Colon         \:     Semicolon     \;     Less than     \<
%   Equals        \=     Greater than  \>     Question mark \?
%   Commercial at \@     Left bracket  \[     Backslash     \\
%   Right bracket \]     Circumflex    \^     Underscore    \_
%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%   Right brace   \}     Tilde         \~}
%
%^^A 禁止使用 " 符号作为抄录文本缩略符
% \DeleteShortVerb\"
%
%^^A 封面与目录的页边距
% \newgeometry{
%   left   = 1.25 in,
%   right  = 1.25 in,
%   top    = 1.25 in,
%   bottom = 1.00 in
% }
%
% \maketitle
% \vfill
% \begin{center}
%   \includegraphics[width=0.20\textwidth]{logo/nwafu-circle.pdf}\\[3ex]
%   \includegraphics[width=0.5\textwidth]{logo/motto}
% \end{center}
% \vfill
% \begin{center}
%   \includegraphics[width=0.6\textwidth]{logo/building}
% \end{center}
% \vfill
% \begin{center}
%   \bfseries\zihao{1}经国本\qquad{}解民生\qquad{}尚科学
% \end{center}
% \vfill
% \thispagestyle{empty}
% \clearpage
%
% \pagenumbering{Roman}
% \tableofcontents
% \clearpage
%
% \pagenumbering{arabic}
% \EnableDocumentation
%^^A \DisableDocumentation
%
% \begin{documentation}
%
%^^A 用户手册的页边距
% \newgeometry{
%   left   = 1.65 in,
%   right  = 0.80 in,
%   top    = 1.25 in,
%   bottom = 1.00 in
% }
%
% \section{简介}
%
% 目前，西北农林科技大学 \LaTeX{} 学位论文模板是由信息工程学院
% 耿楠老师编写的\cls{nwafuthesis}模板。
% 该模板是基于\LaTeXe{}开发，虽然一直在维护，但由于初期开发代码的不规范，
% 其维护成本较高，为此，
% 用 \LaTeX3 \cite{source3}根据\cite{西北农林科技大学研究生论文写作指南}和
% \cite{西北农林科技大学本科论文撰写规范}
% 重构了\cls{nwafuthesis}模板，以适应 \TeX{} 技术的发展。
% 同时\cls{nwafuthesis}还构建了一套简洁的用户接口，以方便用户使用。
% 新模板更加稳定，普适性更强，运行效率更高。
%
% \subsection*{\LaTeX{} 入门}
%
% 本文档并非一份 \LaTeX{} 零基础教程。如果是完完全全的新手，
% 建议先阅读相关入门文档，如大名鼎鼎的“\pkg{lshort}”
% \cite{lshort} 及其中文翻译版 \cite{lshort-zh-cn}。当然，
% 网络上诸如耿楠录制的\LaTeX{}教学系列视频等入门教程多如牛毛，
% 可以自行选取学习。
%
% \subsection*{关于本文档}
%
% 本文采用不同字体表示不同内容。无衬线字体表示宏包名称，如
% \pkg{xeCJK} 宏包、\cls{nwafuthesis} 文档类等；等宽字体表示代码或
% 文件名，如 \cs{nwafuset} 命令、\env{abstract} 环境、\TeX{} 文档
% \file{main.tex} 等；带有尖括号的楷体(或西文斜体)表示命令参数，
% 如 \meta{模板选项}、\meta{English title} 等。使用时，不必输入参数两侧
% 的尖括号。示例代码进行了语法高亮处理，以方便阅读。
%
% 在用户手册中，带有蓝色侧边线的为 \LaTeX{} 代码，而带有粉色侧边线
% 的则为命令行代码，请注意区分。模板提供的选项、命令、环境等，
% 均用横线框起，同时给出语法和相关说明。
%
% 手册中代码实现部分主要面向对 \LaTeX{} 模板开发感兴趣的用户。
% 文档的最后还提供了版本历史和代码索引，以供查阅。
%
% \section{安装}
%
% \subsection{模板工作流}
%
% 使用{\nwafuthesis}模板排版学位论文的工作流如图\ref{fig:workflow}所示。
%
% \begin{figure}[!htb]
%   \centering
%   \includegraphics[width=0.85\textwidth]{logo/workflow}
%   \caption{模板工作流}
%   \label{fig:workflow}
% \end{figure}
%
% 作为普通用户，仅需要通过{\LaTeX}发行版安装和更新模板，完成安装后，即可使用%
% \verb|\documentclass{nwafuthesis}|载入该模板进行工作了。作为普通用户，
% 强烈建议只关心学位论文内容，通过与导师的反复沟通修改与完善论文内容即可。
% 关于学位论文排版格式问题应该交由\nwafuthesis 开发者根据相关学校%
% 指南/规范进行设计和调整。开发者完成模板开发及功能完善后，会上传到
% CTAN(\url{www.ctan.org})，然后模板会被部署于{\LaTeX}发行版，此时普通
% 用户仅需要通过{\LaTeX}发行版的管理工具更新模板即可得到更新后的模板，
% 模板更新后，仅需再次编译学位论文即可按最新的格式要求完成排版。
%
% 关于{\nwafuthesis}模板的使用的详细说明，一方面可以通过阅读其使用说明书和
% 写作样例进行学习，另一方面也可以参阅耿楠在B站发布的教学视频%
% \url{https://www.bilibili.com/video/BV1tY4y1q7RT}进行学习。
%
% 如果有任何改进意见或者功能需求，欢迎前往 Gitee 仓库提交issue。
% {\nwafuthesis}模板的源代码托管于\url{https://gitee.com/nwafu_nan/nwafuthesis-l3}，
% 欢迎大家多提 issue/PR，以便进一步完善和优化我校学位论文\LaTeX{}模板。
%
% \subsection{获取 \cls{nwafuthesis}}
%
% \subsubsection{标准安装}
%
% 如果没有特殊理由，强烈建议使用宏包管理器安装 \cls{nwafuthesis}。
% 例如在 \TeXLive{} 中，执行（可能需要管理员权限）
% \begin{shellexample}[morekeywords={tlmgr,install}]
%   tlmgr install nwafuthesis
% \end{shellexample}
% 即可完成安装。
%
% 当然，在 \TeXLive{} 和 \MiKTeX{} 中，也可以通过图形界面进行安装，
% 此处不再赘述，请参阅软件帮助。
%
% \subsubsection{手动安装}
%
% 可以从\cls{nwafuthesis}源代码直接生成模板(\emph{不推荐})：
%
% \begin{itemize}
%   \item 打开 \href{https://gitee.com/nwafu_nan/nwafuthesis-l3}^^A
%     {Gitee仓库主页}，点击“克隆/下载”，并选择“下载ZIP”，
%     下载 \file{nwafuthesis-master.zip}；如果的电脑中安装有 git
%     程序，也可通过以下命令直接克隆代码仓库：
%     \begin{shellexample}[gobble=7,alsoletter={.},^^A
%         morekeywords={git,clone}]
%       git clone git@gitee.com:nwafu_nan/nwafuthesis-l3.git
%     \end{shellexample}
%   \item 在解压后的目录中或进入克隆后的仓库目录，然后执行以下命令以生成
%     模板的各组件：
%     \begin{shellexample}[gobble=7,morekeywords={xetex}]
%       xetex nwafuthesis.dtx
%     \end{shellexample}
%   \item 将生成的文档类（\file{.cls}）复制到 \TeX{} 发行版本地 TDS 树
%     的 \path{texmf-local/tex/latex/nwafuthesis/} 目录下，并执行
%     \texttt{mktexlsr} 刷新文件名数据库，方可完成安装。
% \end{itemize}
%
% \subsubsection{扁平化安装}
%
% 如果您不希望安装本模板，但需要立刻使用，也可以使用模板提供的安装脚本。
%
% \begin{itemize}
%   \item 打开 \href{https://gitee.com/nwafu_nan/nwafuthesis-l3}^^A
%     {Gitee仓库主页}，点击“克隆/下载”，并选择“下载ZIP”，
%     下载 \file{nwafuthesis-master.zip}；如果的电脑中安装有 git
%     程序，也可通过以下命令直接克隆代码仓库：
%     \begin{shellexample}[gobble=7,alsoletter={.},^^A
%         morekeywords={git,clone}]
%       git clone git@gitee.com:nwafu_nan/nwafuthesis-l3.git
%     \end{shellexample}
%   \item 在解压后的目录中或进入克隆后的仓库目录，然后执行以下命令以生成
%     模板的各组件：
%     \begin{itemize}
%       \item Windows系统：
%         \begin{shellexample}[gobble=11,morekeywords={build-win}]
%           build-win
%         \end{shellexample}
%       \item Linux系统：
%         \begin{shellexample}[gobble=11,morekeywords={build.sh}]
%           ./build.sh
%         \end{shellexample}
%     \end{itemize}
%   \item 将生成的文档类文件（\file{nwafuthesis.cls}）复制到
%         论文撰写工作目录，然后开始撰写论文。
% \end{itemize}
%
% \textbf{说明}：为编译模板本身，需要安装LibertinusSerif、IBMPlexSansCondensed、
% lmmonolt10和LibertinusMath-Regular西文字体，
% Source Han Serif SC、Source Han Sans SC和Sarasa Mono SC中文字体。
% 也可以打开\texttt{nwafuthesis-doc.dtx}文件，
% 注释或删除第1680行---1720行后执行编译(build-win.bat/build.sh)。
%
% \subsection{模板组成}
%
% 本模板主要包含核心文档类以及用户文档等两个
% 部分，其具体组成见表~\ref{tab:nwafuthesis-components}。
%
% \begin{table}[ht]
%   \caption{\cls{nwafuthesis} 的主要组成部分}
%   \label{tab:nwafuthesis-components}
%   \centering
%   \begin{tabular}{lp{20em}}
%     \toprule
%     \textbf{文件} & \textbf{功能说明} \\
%     \midrule
%     \file{nwafuthesis.cls} & 模板文档类 \\
%     \file{nwafuthesis.pdf} & 用户手册 \\
%     \bottomrule
%   \end{tabular}
% \end{table}
%
% \section{使用说明}
%
% \subsection{基本用法}
%
% 在当前工作目录下创建一个名为logo的文件夹，
% 并将学校的\enquote{\texttt{nwafu-bar.pdf}}
% logo矢量图保存在该文件夹内，然后建立如下一份
% 简单的 \TeX{} 文档，它演示了 \cls{nwafuthesis}
% 的最基本用法：
% \begin{latexexample}[deletetexcs={\documentclass},%
%     moretexcs={\chapter},morekeywords={\documentclass},%
%     emph={[2]document}]
%   % main.tex
%   \documentclass{nwafuthesis}
%   \begin{document}
%     \chapter{欢迎}
%     \section{欢迎使用nwafuthesis!}
%     你好，\LaTeX{}！
%   \end{document}
% \end{latexexample}
%
% 按照 \ref{subsec:编译方式}~小节中的方式编译该文档，应得到
% 一篇包含封面、题名页等在内的空白论文。
%
% \subsection{编译方式} \label{subsec:编译方式}
%
% 本模板不支持 \pdfTeX{} 引擎，请使用 \XeLaTeX{} 或 \LuaLaTeX{}
% 编译，推荐使用 \XeLaTeX{}编译。为了生成正确的目录、脚注、参考
% 文献以及交叉引用，至少需要连续编译4次。
%
% 假设\TeX{} 源文件名为 \file{main.tex}，使用 \XeLaTeX{} 编译论文。
% 则在命令行中可以顺序执行：
% \begin{shellexample}[morekeywords={xelatex}]
%   xelatex main
%   biber   main
%   xelatex main
%   xelatex main
% \end{shellexample}
% 或使用带有参数\meta{-xelatex}的 \pkg{latexmk}命令：
% \begin{shellexample}[morekeywords={latexmk},emph={-xelatex}]
%   latexmk -xelatex main
% \end{shellexample}
%
% 如果使用 \LuaLaTeX{} 编译论文，请在命令行中顺序执行：
% \begin{shellexample}[morekeywords={lualatex}]
%   lualatex main
%   biber   main
%   lualatex main
%   lualatex main
% \end{shellexample}
% 或者执行带有\meta{-lualatex}的latexmk命令
% \begin{shellexample}[morekeywords={latexmk},emph={-lualatex}]
%   latexmk -lualatex main
% \end{shellexample}
%
% 由于参考文献格式基于
% 胡振震编写的符合GB/T7714-2015的biblatex样式文件\cite{biblatex-gb7714-2015}
% 实现排版，并在后台强制使用biber引擎编译参考文献。
% 因此，在第二次编译时（即第一次 XeLaTeX 编译之后），请务必\textbf{使用biber进行编译}。
%
% 关于如何配置TeXStudio等IDE工具，以实现正确编译，请
% 参阅其使用说明书。
%
% \subsection{模板选项}
%
% 所谓\enquote{模板选项}是指在用\tn{documentclass}命令引入文档类时能够指定的选项：
% \begin{latexexample}[deletetexcs={\documentclass},%
%     morekeywords={\documentclass}]
%   \documentclass(*\oarg{模板选项}*){nwafuthesis}
% \end{latexexample}
%
% 有些模板选项为布尔型，只能取 \opt{true} 或 \opt{false}。
% 对于这些选项，\kvopt{\meta{选项}}{true} 中的“|= true|”
% 可以省略。
%
% \begin{function}[added=2021-05-12]{type}
%   \begin{nwafusyntax}[emph={[1]type}]
%     type = (*<doctor|master|(bachelor)>*)
%   \end{nwafusyntax}
%   选择论文类型。三种选项分别代表博士学位论文、硕士学位论文和本科
%   毕业论文(设计)，默认为 \opt{bachelor}。
% \end{function}
%
% \begin{function}[added=2021-05-12,updated=2026-05-17]{oneside,twoside}
%   指明论文的单/双面模式，默认为 \opt{twoside}。
% \end{function}
%
% 单面模式(\opt{oneside})中，后续各章接上一章另起一页连续起排。
%
% 双面模式(\opt{twoside})中，各章都从奇数页开始起排，若前一章
% 在奇数页结束，则会自动插入不带页眉和页脚的空白页。
%
% 对于研究生学位论文，奇数页页眉是章名称，偶数页页眉是
% “西北农林科技大学博士（或硕士）学位论文”。
% 对于本科毕业论文/设计，奇数页页眉是章名称，
% 偶数页页眉是“西北农林科技大学本科毕业论文/设计”
% (模板会根据\opt{nwafu/info/btype}选项自动选择论文或设计)。
%
% 本模板中，中英文封面、题名页、目录、摘要、主要符号表对照表、
% 附录、参考文献、致谢、个人简历等均视作章，也按相同方式排版。
%
% \begin{function}[added=2021-05-12]{draft}
%   \begin{nwafusyntax}[emph={[1]draft}]
%     draft = (*<\TFF>*)
%   \end{nwafusyntax}
%   选择是否开启草稿模式，默认关闭。
% \end{function}
%
% 草稿模式为全局选项，会影响到很多宏包的工作方式。
% 开启之后，主要的变化有：
% \begin{itemize}
%   \item 将行溢出的盒子显示为黑色方块；
%   \item 不插入图片，只输出一个占位方框；
%   \item 关闭超链接渲染，也不生成 PDF 书签；
%   \item 显示页面边框。
% \end{itemize}
%
% \subsection{参数设置}
%
% \begin{function}[added=2021-05-12]{\nwafuset}
%   \begin{nwafusyntax}[morekeywords={\nwafuset}]
%     \nwafuset(*\marg{键值列表}*)
%   \end{nwafusyntax}
%   本模板提供了一系列选项，以实现论文格式和作者、指导教师等
%   基本信息的配置。载入\pkg{nwafuthesis}文档类之后，以下
%   所有选项均可通过统一的\cs{nwafuset}命令进行设置。
% \end{function}
%
% \cs{nwafuset} 的参数是一组由（英文）逗号分隔的选项列表，列表中的
% 选项通常是 \kvopt{\meta{key}}{\meta{value}} 形式。部分选项的
% \meta{value} 可以省略。对于同一项，后续设置会覆盖以前的设置。
% 在下文的说明中，将用\textbf{粗体}表示默认值。
%
% \cs{nwafuset} 采用 \LaTeX3 风格的键值设置，支持不同类型以及多种
% 层次的选项设定。键值列表中，“|=|”左右的空格不影响设置；但需注意，
% 参数列表中\textbf{不可以出现空行}。
%
% 与模板选项相同，布尔型的参数 \kvopt{\meta{选项}}{true}
% 中的“|= true|”可以省略。
%
% 另有一些选项包含子选项，如 \opt{style} 、\opt{abstract}和 \opt{info} 等。它们可以
% 按如下两种等价方式来设定：
% \begin{latexexample}[morekeywords={\nwafuset},%
%     emph={[1]style,cjk-font,font-size,info,title,title*,author,author*,department}]
%   \nwafuset{
%     style = {cjk-font = adobe, font-size = -4},
%     info  = {
%       title      = {说C解C},
%       title*     = {C Story},
%       author     = {耿楠},
%       author*    = {Nan Geng},
%       department = {信息工程学院}
%     }
%   }
% \end{latexexample}
% 或者
% \begin{latexexample}[morekeywords={\nwafuset},%
%     emph={[1]style,cjk-font,font-size,info,title,title*,author,author*,department}]
%   \nwafuset{
%     style/cjk-font  = adobe,
%     style/font-size = -4,
%     info/title      = {说C解C},
%     info/title*     = {C Story},
%     info/author     = {耿楠},
%     info/author*    = {Nan Geng},
%     info/department = {信息工程学院}
%   }
% \end{latexexample}
%
% 注意 “|/|” 的前后均不可以出现空白字符。
%
% \subsubsection{论文格式} \label{subsubsec:论文格式}
%
% \begin{function}[added=2021-05-12]{style}
%   \begin{nwafusyntax}[emph={[1]style}]
%     style = (*\marg{键值列表}*)
%     style/(*\meta{key}*) = (*\meta{value}*)
%   \end{nwafusyntax}
%   该选项包含多个子项目，用于设置字体、字号等论文格式。
% \end{function}
%
% \begin{function}[added=2021-05-12,updated=2026-05-16]{style/font}
%   \begin{nwafusyntax}[emph={[1]font}]
%     font = (*<garamond|libertinus|lm|palatino|times|times*|none>*)
%   \end{nwafusyntax}
%   设置西文字体（包括数学字体）。具体配置见表~\ref{tab:font}。
%   该选项若未指定，则由根据操作系统进行选择，Windows取times*，MacOS取times*，Linux取times。
%
%   \textbf{说明：}强烈建议让模板根据操作系统自行完成字体设置，
%                  对于Times New Roman这一西文字体的要求，
%                  论文撰写规范中明确说明可以使用相似字体进行替换。
%                  同时，由于版权问题，本模板不提供任何字体安装文件。
% \end{function}
%
% \begin{table}[ht]
% \begin{threeparttable}
%   \caption{西文字体配置}
%   \label{tab:font}
%   \centering
%   \begin{tabular}{ccccc}
%     \toprule
%       & \strong{正文字体} & \strong{无衬线字体} & \strong{等宽字体} & \strong{数学字体} \\
%     \midrule
%       |garamond|        & EB Garamond         & Libertinus Sans & LM Mono\tnote{a} & Garamond Math\tnote{d}   \\
%       |libertinus|      & Libertinus Serif    & Libertinus Sans & LM Mono          & Libertinus Math\tnote{d} \\
%       |lm|              & LM Roman            & LM Sans         & LM Mono          & LM Math\tnote{d}         \\
%       |palatino|        & TG Pagella\tnote{b} & Libertinus Sans & LM Mono          & TG Pagella Math\tnote{d} \\
%       |times|           & XITS                & TG Heros        & TG Cursor        & XITS Math       \\
%       |times*|\tnote{c} & Times New Roman     & Arial           & Courier New      & XITS Math       \\
%     \bottomrule
%   \end{tabular}
%   \begin{tablenotes}
%     \item[a] “LM”是 Latin Modern 的缩写。
%     \item[b] “TG”是 TeX Gyre 的缩写。
%     \item[c] 本行中，Times New Roman、Arial 和 Courier New 是商业字体，
%       在 Windows 和 macOS 系统上均默认安装。
% \changes{v2.16}{2026/05/16}{添加数学伪粗体说明。}
%     \item[d] 这些数学字体无粗体字形，采用伪粗体实现数学粗体。
%   \end{tablenotes}
% \end{threeparttable}
% \end{table}
%
% \begin{function}[added=2021-05-12]{style/cjk-font}
%   \begin{nwafusyntax}[emph={[1]cjk-font}]
%     cjk-font = (*<adobe|fandol|founder|mac|sinotype|sourcehan|windows|none>*)
%   \end{nwafusyntax}
%   设置中文字体。具体配置见表~\ref{tab:cjk-font}。
%   该选项若未指定，则由根据操作系统进行选择，Windows取windows，MacOS取mac，Linux取fandol。
%
%   \textbf{说明：}强烈建议让模板根据操作系统自行完成字体设置，
%                  如排版中出现“🄵”这样的字符(主要是中文姓名)，
%                  则是因为字体中字形不完整造成的，可以尝试使用adobe、windows字体选项进行排版。
%                  同样，由于版权问题，本模板不提供任何字体安装文件。
% \end{function}
%
% \begin{table}[ht]
%   \caption{中文字体配置}
%   \label{tab:cjk-font}
%   \centering
%   \begin{tabular}{cccc}
%     \toprule
%       & \strong{正文字体（宋体）} & \strong{无衬线字体（黑体）} & \strong{等宽字体（仿宋）} \\
%     \midrule
%       \multirow{2}*{|adobe|}     & Adobe 宋体          & Adobe  黑体        & Adobe  仿宋        \\
%                                  & Adobe Song Std      & Adobe Heiti Std    & Adobe Fangsong Std \\
%       \multirow{2}*{|fandol|}    & Fandol 宋体         & Fandol 黑体        & Fandol 仿宋        \\
%                                  & FandolSong          & FandolHei          & FandolFang         \\
%       \multirow{2}*{|founder|}   & 方正书宋            & 方正黑体           & 方正仿宋           \\
%                                  & FZShuSong-Z01       & FZHei-B01          & FZFangSong-Z02     \\
%       \multirow{2}*{|mac|}       & （华文）宋体-简     & （华文）黑体-简    & 华文仿宋           \\
%                                  & Songti SC           & Heiti SC           & STFangsong         \\
%       \multirow{2}*{|sinotype|}  & 华文宋体            & 华文黑体           & 华文仿宋           \\
%                                  & STSong              & STHeiti            & STFangsong         \\
%       \multirow{2}*{|sourcehan|} & 思源宋体            & 思源黑体           & ---                \\
%                                  & Source Han Serif SC & Source Han Sans SC & ---                \\
%       \multirow{2}*{|windows|}   & （中易）宋体        & （中易）黑体       & （中易）仿宋       \\
%                                  & SimSun              & SimHei             & FangSong           \\
%     \bottomrule
%   \end{tabular}
% \end{table}
%
% 启用 \kvopt{font}{none} 或 \kvopt{cjk-font}{none} 之后，模板将关闭
% 默认西文 / 中文字体设置。此时，需要自行使用 \cs{setmainfont}、
% \cs{setCJKmainfont}、\cs{setmathfont} 等命令来配置字体。
%
% \begin{function}[added=2021-05-12]{style/font-size}
%   \begin{nwafusyntax}[emph={[1]font-size}]
%     font-size = (*<(-4)|5>*)
%   \end{nwafusyntax}
%   设置论文的基础字号，默认为小四号，不建议修改。
% \end{function}
%
% \begin{function}[added=2021-05-12]{style/fullwidth-stop}
%   \begin{nwafusyntax}[emph={[1]fullwidth-stop}]
%     fullwidth-stop = (*<catcode|mapping|(false)>*)
%   \end{nwafusyntax}
%   选择是否把全角实心句点\FSFW 作为默认的句号形状。
%   这种句号一般用于科技类文章，以避免与下标“$_o$”或“$_0$”混淆。
% \end{function}
%
% 选择 \kvopt{fullwidth-stop}{catcode} 或 \opt{mapping} 后，都会实现
% 上述效果。有所不同的是，在选择 \opt{catcode} 后，只有
% \emph{显式的}\FSID 会被替换为\FSFW；但在选择 \opt{mapping} 后，
% \emph{所有的}\FSID 都会被替换。例如，如果用宏保存了一些含有
% \FSID 的文字，那么在选择 \opt{catcode} 时，其中的\FSID 不会被
% 替换为\FSFW。
%
% 选项 \kvopt{fullwidth-stop}{mapping} 只在 \XeTeX{} 下有效。使用
% \LuaTeX{} 编译时，该选项相当于 \kvopt{fullwidth-stop}{catcode}。
%
% 如果在选择 \kvopt{fullwidth-stop}{mapping} 后仍需要临时显示
% \FSID，可以按如下方法操作：
% \begin{latexexample}[moretexcs={\CJKfontspec},emph={[1]Mapping}]
%   % 请使用 XeTeX 编译
%   % 外侧的花括号表示分组
%   这是一个句号{\CJKfontspec{(*\meta{字体名}*)}[Mapping=full-stop]。}
% \end{latexexample}
%
% \changes{v2.01}{2026/05/06}{添加带圈数字脚注选项。}
%
% \begin{function}[added=2021-05-12,updated=2026-05-06]{style/footnote-style}
%^^A 这里奇怪的东西是用来控制对齐的。nwafusyntax 会吃掉开头的几个
%^^A 空格，因此这里用 X 来占位。
%   \begin{nwafusyntax}[emph={[1]footnote-style}]
%     footnote-style = (*<plain|\\
%       XXXXXX\mbox{}~~~~~~~~~~~~~~~~~libertinus|libertinus*|libertinus-sans|\\
%       XXXXXX\mbox{}~~~~~~~~~~~~~~~~~pifont|pifont*|pifont-sans|pifont-sans*|\\
%       XXXXXX\mbox{}~~~~~~~~~~~~~~~~~circled|circled*|circled-sans|circled-sans*|\\
%       XXXXXX\mbox{}~~~~~~~~~~~~~~~~~xits|xits-sans|xits-sans*>*)
%   \end{nwafusyntax}
%   设置脚注编号样式。西文字体设置会影响其默认取值（见
%   表~\ref{tab:footnote-font}）。因此，要使得该选项生效，需将其
%   放置在 \opt{font} 选项之后。带有 |sans| 的为相应的无衬线字体
%   版本；带有 |*| 的为阴文样式（即黑底白字）。
%
%   \textbf{说明：}带圈数字(\opt{circled系列选项})是基于\pkg{pifont}宏包实现的，
%                  仅支持①-⑩之间的10个数字。
% \end{function}
%
% \begin{table}[ht]
%   \caption{西文字体与脚注编号样式默认值的对应关系}
%   \label{tab:footnote-font}
%   \centering
%   \begin{tabular}{ccccc}
%     \toprule
%     \textbf{西文字体设置} &
%       |libertinus| & |lm|     & |palatino| & |times| \\
%     \midrule
%     \textbf{脚注编号样式默认值} &
%       |libertinus| & |pifont| & |pifont|   & |xits|  \\
%     \bottomrule
%   \end{tabular}
% \end{table}
%
% \begin{function}[added=2021-05-12]{style/hyperlink}
%   \begin{nwafusyntax}[emph={[1]hyperlink}]
%     hyperlink = (*<border|color|(none)>*)
%   \end{nwafusyntax}
%   设置超链接样式。\opt{border} 表示在超链接四周绘制方框；
%   \opt{color} 表示用彩色显示超链接，可输出用于批阅的电子稿；
%   \opt{none} 表示没有特殊装饰，可用于生成最终的打印版文稿。
% \end{function}
%
% \begin{function}[added=2021-05-12,updated=2021-05-12]{style/hyperlink-color}
%   \begin{nwafusyntax}[emph={[1]hyperlink-color}]
%     hyperlink-color = (*<(default)|classic|elegant|fantasy|material|\\
%       XXXXXX\mbox{}~~~~~~~~~~~~~~~~~~business|science|summer|autumn|graylevel|prl>*)
%   \end{nwafusyntax}
%   设置超链接颜色。该选项在 \kvopt{hyperlink}{none} 时无效。
%   各选项所代表的颜色见表~\ref{tab:hyperlink-color}。
% \end{function}
%
% \begin{table}[ht]
% \centering
% \newcommand\linkcolorexam[3]{^^A
%   {\small 图~\textcolor[HTML]{#1}{1-2}，
%     (\textcolor[HTML]{#1}{3.4})~式} &
%   {\small \textcolor[HTML]{#2}{\texttt{http://g.cn}}} &
%   {\small 文献~[\textcolor[HTML]{#3}{1}]，
%     (\textcolor[HTML]{#3}{Knuth~1986})}}
% \begin{threeparttable}
% \caption{预定义的超链接颜色方案}
% \label{tab:hyperlink-color}
% \begin{tabular}{c*{3}{>{\hspace{0.2cm}}c<{\hspace{0.2cm}}}}
%   \toprule
%   \textsf{选项} & \textsf{链接} & \textsf{URL} & \textsf{引用} \\
%   \midrule
%   \opt{default}            & \linkcolorexam{990000}{0000B2}{007F00} \\
%   \opt{classic}            & \linkcolorexam{FF0000}{0000FF}{00FF00} \\
%   \opt{elegant}\tnote{a}   & \linkcolorexam{961212}{C31818}{9B764F} \\
%   \opt{fantasy}\tnote{b}   & \linkcolorexam{FF4A19}{FF3F94}{934BA1} \\
%   \opt{material}\tnote{c}  & \linkcolorexam{E91E63}{009688}{4CAF50} \\
%   \opt{business}\tnote{d}  & \linkcolorexam{D14542}{295497}{1F6E43} \\
%   \opt{science}\tnote{e}   & \linkcolorexam{CA0619}{389F9D}{FF8920} \\
%   \opt{summer}\tnote{f}    & \linkcolorexam{00AFAF}{5F5FAF}{5F8700} \\
%   \opt{autumn}\tnote{f}    & \linkcolorexam{D70000}{D75F00}{AF8700} \\
%   \opt{graylevel}\tnote{c} & \linkcolorexam{616161}{616161}{616161} \\
%   \opt{prl}\tnote{g}       & \linkcolorexam{2D3092}{2D3092}{2D3092} \\
%   \bottomrule
% \end{tabular}
% \begin{tablenotes}
%   \item[a] 来自 \href{https://tex.stackexchange.com/}^^A
%     {\TeX{} - \LaTeX{} Stack Exchange 网站}。
%   \item[b] Adobe CC 产品配色。
%   \item[c] 取自 Material 色彩方案
%     （见 \url{https://material.io/guidelines/style/color.html}）。
%   \item[d] Microsoft Office 2016 产品配色。
%   \item[e] 来自 \href{https://www.wolfram.com/}{Wolfram Research 网站}。
%   \item[f] 均取自 Solarized 色彩方案
%     （见 \url{http://ethanschoonover.com/solarized}）。
%   \item[g] \textit{Physical Review Letter} 杂志配色。
% \end{tablenotes}
% \end{threeparttable}
% \end{table}
%
% \begin{function}[added=2021-05-12]{style/bib-resource}
%   \begin{nwafusyntax}[emph={[1]bib-resource}]
%     bib-resource = (*\marg{文件}*)
%   \end{nwafusyntax}
%   参考文献数据源。可以是单个文件，也可以是用英文逗号隔开的一组文件。
%   其中，各文献数据源文件必须明确给出 \file{.bib}
%   后缀名。
% \end{function}
%
% \begin{function}[added=2021-05-12]{style/logo}
%   \begin{nwafusyntax}[emph={[1]logo}]
%     logo = (*\marg{文件}*)
%   \end{nwafusyntax}
%   封面中校名图片的文件名。默认值为 \file{logo/nwafu-bar.pdf}。
% \end{function}
%
% \begin{function}[added=2021-05-12]{style/logo-size}
%   \begin{nwafusyntax}[emph={[1]logo-size}]
%     logo-size = (*\marg{宽度}*)
%     logo-size = {(*\meta{宽度}*), (*\meta{高度}*)}
%   \end{nwafusyntax}
%   校名图片的大小。默认仅指定了宽度，为 |0.65\textwidth|\/。
%   如果仅需指定高度，可在 \meta{宽度} 处填入一个空的分组 |{}|。
% \end{function}
%
% \begin{function}[added=2021-05-12,updated=2021-5-22]{style/auto-make-cover}
%   \begin{nwafusyntax}[emph={[1]auto-make-cover}]
%     auto-make-cover = (*<\TTF>*)
%   \end{nwafusyntax}
%   是否自动生成研究生论文的封面（封一）、英文封面（封二）、
%   题名页（封三）、项目资助页（封四）、声明页（封五）和
%   使用授权页（封六）。本科论文（设计）的封面（封0）、题名页（封一）、
%   项目资助页（封四）和声明及使用授权页（封七）。
%   封面中的各项信息，可通过 \cs{nwafuset} 录入，
%   具体请参阅 \ref{subsubsec:信息录入}~节。
% \end{function}
%
% \begin{function}[deprecated,added=2021-05-18,updated=2026-04-29]{style/withchapter}
%   \begin{nwafusyntax}[emph={[1]withchapter}]
%     withchapter = (*<\TTF>*)
%   \end{nwafusyntax}
%   选择论文章标题格式为章格式（如：第1章 绪论）还是报告格式（如：1 绪论），默认为章格式。
%
% \changes{v2.00}{2026/05/07}{删除\opt{withchapter}选项。}
%   \emph{注意：} 从 v2.00 开始，该选项已被删除。
% \end{function}
%
% \begin{function}[added=2026-04-30]{style/figtabtoc}
%   \begin{nwafusyntax}[emph={[1]figtabtoc}]
%     figtabtoc = (*<\TTF>*)
%   \end{nwafusyntax}
%   选择是否输出插图与附表清单，目前仅对本科有效。
% \end{function}
%
% \begin{function}[added=2022-05-29,updated=2026-5-03]{style/withsign}
%   \begin{nwafusyntax}[emph={[1]withsign}]
%     withsign = (*<\TFF>*)
%   \end{nwafusyntax}
%   题名页是否需要签名，默认为不需要签名。
%
% \changes{v2.00}{2026/05/07}{将\opt{withsig}选项更名为\opt{withsign}。}
%   \emph{注意：} 从 v2.00 开始，此选项名称由原\opt{withsig}更名为\opt{withsign}。
% \end{function}
%
% \changes{v1.25}{2023/04/19}{添加盲审样式参数说明。}
%
% \begin{function}[added=2023-04-19]{style/anonymous}
%   \begin{nwafusyntax}[emph={[1]anonymous}]
%     anonymous = (*<\TFF>*)
%   \end{nwafusyntax}
%   选择是否输出盲审格式论文，默认为不输出盲审格式论文。
% \end{function}
%
% \begin{function}[deprecated,added=2022-05-24,updated=2026-05-07]{style/chapnum}
%   \begin{nwafusyntax}[emph={[1]chapnum}]
%     chapnum = (*<zh|(en)>*)
%   \end{nwafusyntax}
%   选择章编号格式，zh表示中文数字，en表示阿拉伯数字，默认为阿拉伯数字。
%
% \changes{v2.00}{2026/05/07}{删除\opt{chapnum}选项。}
%   \emph{注意：} 从 v2.00 开始，该选项已被删除。
% \end{function}
%
% \subsubsection{信息录入} \label{subsubsec:信息录入}
%
% \begin{function}[added=2021-05-12]{info}
%   \begin{nwafusyntax}[emph={[1]info}]
%     info = (*\marg{键值列表}*)
%     info/(*\meta{key}*) = (*\meta{value}*)
%   \end{nwafusyntax}
%   该选项包含许多子项目，用于录入论文信息。具体内容见下。以下带“|*|”
%   的项目表示对应的英文字段。
% \end{function}
%
% \begin{function}[added=2021-05-12,updated=2026-05-09]{info/ptype}
%   \begin{nwafusyntax}[emph={[1]ptype}]
%     ptype = (*<(academic)|engineering>*)
%   \end{nwafusyntax}
%   学位类型，仅适用于区分研究学位。\opt{academic} 和 \opt{engineering}
%   分别表示学术型和专业学位型。
%
% \changes{v2.02}{2026/05/09}{将学位类型选项名称修改为ptype，将professional选项值修改为engineering。}
%
%   \textbf{说明：} 从 v2.02 开始，该选项名称已由\opt{degree}修改为\opt{ptype}
%   (p---postgraduate)，其选项值\opt{professional}修改为\opt{engineering}。
% \end{function}
%
% \begin{function}[added=2021-05-18]{info/btype}
%   \begin{nwafusyntax}[emph={[1]btype}]
%     btype = (*<(paper)|design>*)
%   \end{nwafusyntax}
%   本科毕业类型，仅适用于本科。\opt{paper} 和 \opt{design}
%   分别表示论文和设计。
% \end{function}
%
% \begin{function}[added=2021-05-12]{info/title,info/title*}
%   \begin{nwafusyntax}[emph={[1]title,title*}]
%     title  = (*\marg{中文标题}*)
%     title* = (*\marg{英文标题}*)
%   \end{nwafusyntax}
%   论文标题。默认会在约 20 个汉字字宽处强制断行，但为了语义的
%   连贯以及排版的美观，如果的标题长于一行，建议使用“|\\|”
%   进行手动断行。
% \end{function}
%
% \begin{function}[added=2021-05-12]{info/author,info/author*}
%   \begin{nwafusyntax}[emph={[1]author,author*}]
%     author  = (*\marg{姓名}*)
%     author* = (*\marg{英文姓名或拼音}*)
%   \end{nwafusyntax}
%   作者姓名。
% \end{function}
%
% \changes{v2.01}{2026/05/07}{允许指导教师添加职称。}
% \begin{function}[added=2021-05-18,updated=2026-05-07]{info/supervisor, info/supervisor*}
%   \begin{nwafusyntax}[emph={[1]supervisor, supervisor*}]
%     supervisor  = (*\marg{姓名}*)
%     supervisor* = (*\marg{英文姓名或拼音}*)
%   \end{nwafusyntax}
%   导师姓名。可以有多个导师，每个导师包括英文逗号分隔的姓名和职称(可以省略)，
%   不同导师置于大括号内，然后用英文逗号分隔
% \end{function}
%
% \changes{v2.01}{2026/05/07}{允许合作指导教师添加职称。若无合作指导教师，则不输出任何内容。}
% \begin{function}[added=2021-05-18,updated=2026-05-07]{info/cosupervisor, info/cosupervisor*}
%   \begin{nwafusyntax}[emph={[1]cosupervisor, cosupervisor*}]
%     cosupervisor  = (*\marg{姓名}*)
%     cosupervisor* = (*\marg{英文姓名或拼音}*)
%   \end{nwafusyntax}
%   合作指导教师姓名。可以有多个导师，每个导师包括英文逗号分隔的姓名和职称(可以省略)，
%   不同导师置于大括号内，然后用英文逗号分隔
% \end{function}
%
% \changes{v2.01}{2026/05/07}{允许博士指导小组添加职称。}
% \begin{function}[added=2021-05-12,updated=2026-05-07]{info/instructors}
%   \begin{nwafusyntax}[emph={[1]instructors}]
%     instructors = (*\marg{成员 1, 成员 2, ...}*)
%   \end{nwafusyntax}
%   指导小组成员(仅研究生需要)。各成员之间需使用英文逗号隔开。为防止歧义，
%   可以用分组括号“|{...}|”把各成员字段括起来。
%   每个导师包括英文逗号分隔的姓名和职称(可以省略)。
% \end{function}
%
% \begin{function}[added=2021-05-18]{info/department, info/department*}
%   \begin{nwafusyntax}[emph={[1]department, department*}]
%     department  = (*\marg{名称}*)
%     department* = (*\marg{英文名称}*)
%   \end{nwafusyntax}
%   学院名称。
% \end{function}
%
% \begin{function}[added=2021-05-18]{info/major,info/major*}
%   \begin{nwafusyntax}[emph={[1]major, major*}]
%     major  = (*\marg{名称}*)
%     major* = (*\marg{英文名称}*)
%   \end{nwafusyntax}
%   专业名称。
% \end{function}
%
% \begin{function}[deprecated,added=2021-05-18,updated=2026-05-10]{info/researchfield, info/researchfield*}
%   \begin{nwafusyntax}[emph={[1]researchfield, researchfield*}]
%     researchfield  = (*\marg{名称}*)
%     researchfield* = (*\marg{英文名称}*)
%   \end{nwafusyntax}
%   研究方向名称(仅学术学位研究生需要)。

% \changes{v2.02}{2026/05/09}{删除\opt{researchfield}和\opt{researchfield*}选项。}
%   \emph{注意：} 从 v2.02 开始，该选项已被删除。
% \end{function}
%
% \begin{function}[added=2021-05-18,updated=2026-05-09]{info/engtitle, info/engtitle*}
%   \begin{nwafusyntax}[emph={[1]engtitle, engtitle*}]
%     engtitle  = (*\marg{名称}*)
%     engtitle* = (*\marg{英文名称}*)
%   \end{nwafusyntax}
%   专业学位类型名称(仅专业学位研究生需要)。
%
% \changes{v2.02}{2026/05/09}{将专业学位名称选项名称修改为\opt{engtitle}。}
%
%   \textbf{说明：} 从 v2.02 开始，该选项名称已由\opt{professionaltype}修改为\opt{engtitle}。
% \end{function}
%
% \begin{function}[added=2021-05-18,updated=2026-05-09]{info/engfield, info/engfield*}
%   \begin{nwafusyntax}[emph={[1]engfield, engfield*}]
%     engfield  = (*\marg{名称}*)
%     engfield* = (*\marg{英文名称}*)
%   \end{nwafusyntax}
%   专业学位领域名称(仅专业学位研究生需要)。
%
% \changes{v2.02}{2026/05/09}{将专业学位领域选项名称修改为\opt{engfield}。}
%
%   \textbf{说明：} 从 v2.02 开始，该选项名称已由\opt{professionalfield}修改为\opt{engfield}。
% \end{function}
%
% \begin{function}[added=2026-04-30]{info/btitle}
%   \begin{nwafusyntax}[emph={[1]btitle}]
%     btitle  = (*\marg{学士学位类别}*)
%   \end{nwafusyntax}
%   申请的学士学位类别，如农学、工学、理学、法学、文学、管理学等。
%
% \changes{v2.02}{2026/05/09}{将本科生申请学科类别选项名称修改为\opt{btitle}。}
%   \emph{注意：}本选项仅对本科有效。
% \end{function}
%
% \begin{function}[added=2021-05-23]{info/mastertype}
%   \begin{nwafusyntax}[emph={[1]mastertype}]
%     mastertype  = (*\marg{研究生学位英文名称}*)
%   \end{nwafusyntax}
%   研究生学位英文名称(用于硕士研究生英文封面)。
%
%   对于学术硕士可以取：Philosophy(哲学)；Economics(经济学)；
%   Science(理学)；Engineering(工学)；Agriculture(农学)；
%   Management(管理学)等(注意首字母需要大写)。
%
%   对于专业学位硕士可以取：Engineering(工程硕士)；
%   Agricultural(农业硕士) 等(注意首字母需要大写)。
% \end{function}
%
% \begin{function}[added=2021-05-12]{info/student-id}
%   \begin{nwafusyntax}[emph={[1]student-id}]
%     student-id = (*\marg{数字}*)
%   \end{nwafusyntax}
%   作者学号。
% \end{function}
%
% 西北农林科技大学学号采用10位4段制编码：X1--X4/X5/X6/X7--X10。
% 其中：
%
% X1--X4代表入学年份。
% 
% X5=0表示学生，此时，X6=1-2表示本科，
% X6=3表示成人教育学生，X6=4表示预科生，X6=5-6表示研究生，
% X6=7表示国际学院学生，X6=8表示水土保持研究所学生。
% X7-X10为流水号。
%
% \begin{function}[deprecated,added=2022-05-18,updated=2026-05-07]{info/class-id}
%   \begin{nwafusyntax}[emph={[1]class-id}]
%     class-id = (*\marg{数字}*)
%   \end{nwafusyntax}
%   作者班级号，班号数字(仅本科生使用)。
%
% \changes{v2.00}{2026/05/07}{已弃用\opt{class-id}选项。}
%   \textbf{已弃用：} 从 v2.00 开始，此选项已不再需要，将在后续版本中移除。
% \end{function}
%
% \begin{function}[added=2021-05-18]{info/grade}
%   \begin{nwafusyntax}[emph={[1]grade}]
%     grade = (*\marg{数字}*)
%   \end{nwafusyntax}
%   毕业年份(届)。
% \end{function}
%
% \begin{function}[deprecated,added=2021-05-18,updated=2026-04-30]{info/enroll}
%   \begin{nwafusyntax}[emph={[1]enroll}]
%     enroll = (*\marg{数字}*)
%   \end{nwafusyntax}
%   入学年份(年级)(仅本科生需要)。
%
% \changes{v2.00}{2026/05/07}{已弃用\opt{enroll}选项。}
%   \textbf{已弃用：} 从 v2.00 开始，此选项已不再需要，将在后续版本中移除。
% \end{function}
%
% \begin{function}[added=2021-05-12,updated=2021-05-23]{info/school-id}
%   \begin{nwafusyntax}[emph={[1]school-id}]
%     school-id = (*\marg{数字}*)
%   \end{nwafusyntax}
%   学校代码。默认值为 10712（西北农林科技大学学校代码）。
% \end{function}
%
% \begin{function}[added=2021-05-12, updated=2021-05-24]{info/date, info/date*}
%   \begin{nwafusyntax}[emph={[1]date, date*}]
%     date  = (*\marg{日期}*)
%     date* = (*\marg{英文日期}*)
%   \end{nwafusyntax}
%   学位会召开月份。
% \end{function}
%
% \begin{function}[added=2021-05-18]{info/defensedate}
%   \begin{nwafusyntax}[emph={[1]defensedate}]
%     defensedate  = (*\marg{日期}*)
%   \end{nwafusyntax}
%   论文答辩日期(仅研究生需要)。默认值为文档编译日期（\tn{today}）。
% \end{function}
%
% \begin{function}[added=2021-05-12, updated=2026-05-17]{info/secret-level}
%   \begin{nwafusyntax}[emph={[1]secret-level}]
%     secret-level = (*<(none)|i|ii>*)
%   \end{nwafusyntax}
%   密级(仅研究生需要)。\opt{i}、\opt{ii}分别表示限制和秘密的密级；
%   \opt{none} 表示不涉密，密级为公开。
% \end{function}
%
% \begin{function}[added=2021-05-18]{info/defensecommittees}
%   \begin{nwafusyntax}[emph={[1]defensecommittees}]
%     defensecommittees = (*\marg{\{单位, 姓名, 职称\}, \{单位, 姓名, 职称\}, ...}*)
%   \end{nwafusyntax}
%   答辩委员会构成，每个成员由单位、姓名和职称三部分构成，
%   用英文逗号分隔后置于大括号内，不同成员间用英文逗号隔开。为防止歧义，
%   可以用分组括号“|{...}|”把每个成员中的各个字段括起来。
% \end{function}
%
% \begin{function}[added=2021-05-18]{info/foundation}
%   \begin{nwafusyntax}[emph={[1]foundation}]
%     foundation = (*\marg{\{来源, 名称, 编号\}, \{来源, 名称, 编号\}, ...}*)
%   \end{nwafusyntax}
%   论文资助项目(仅研究生需要)，每个项目由来源、名称和编号三部分构成，
%   用英文逗号分隔后置于大括号内，不同项目间用英文逗号隔开。为防止歧义，
%   可以用分组括号“|{...}|”把每个项目中的各个字段括起来。
% \end{function}
%
% \begin{function}[added=2021-05-12]{info/clc}
%   \begin{nwafusyntax}[emph={[1]clc}]
%     clc = (*\marg{分类号}*)
%   \end{nwafusyntax}
%   中图分类号（CLC）(仅研究生需要)。
% \end{function}
%
% \begin{function}[added=2021-05-12]{info/udc}
%   \begin{nwafusyntax}[emph={[1]udc}]
%     udc = (*\marg{UDC码}*)
%   \end{nwafusyntax}
%   UDC码(UDC)(仅研究生需要)。
% \end{function}
%
% \subsubsection{摘要数据录入} \label{subsubsec:摘要数据录入}
%
% \begin{function}[added=2021-05-31]{nwafu / abstract}
%   \begin{nwafusyntax}[emph={[1]abstract}]
%     abstract = (*\marg{键值列表}*)
%     abstract/(*\meta{key}*) = (*\meta{value}*)
%   \end{nwafusyntax}
%   该选项包含多个子项目，用于录入或指定论文摘要数据文件，
%   具体内容见下。以下带“|*|” 的项目表示对应的英文字段。
% \end{function}
%
% \begin{function}[added=2021-05-31]{abstract/abstractfile,abstract/abstractfile*}
%   \begin{nwafusyntax}[emph={[1]abstractfile,abstractfile*}]
%     abstractfile  = (*\marg{中文摘要文件名}*)
%     abstractfile* = (*\marg{英文摘要文件名}*)
%   \end{nwafusyntax}
%   摘要内容\file{.tex}源文件的文件名称。在文件名中可以使用路径信息，
%   文件名中需包括\file{.tex}扩展名。
% \end{function}
%
% \begin{function}[added=2021-05-12,updated=2021-05-31]{abstract/keywords,abstract/keywords*}
%   \begin{nwafusyntax}[emph={[1]keywords,keywords*}]
%     keywords  = (*\marg{中文关键字}*)
%     keywords* = (*\marg{英文关键字}*)
%   \end{nwafusyntax}
%   关键字列表。各关键字之间需\textbf{使用英文逗号隔开}。为防止歧义，
%   可以用分组括号“|{...}|”把各关键字括起来。
% \end{function}
%
% \begin{function}[added=2021-05-31]{abstract/notationfile}
%   \begin{nwafusyntax}[emph={[1]notationfile}]
%     notationfile  = (*\marg{主要符号对照表文件名}*)
%   \end{nwafusyntax}
%   主要符号对照表内容\file{.tex}源文件的文件名称。在文件名中可以使用路径信息。
%   文件名中需包括\file{.tex}扩展名。如果未提供文件名，则不输出符号表。
%
%   \emph{说明：}主要符号对照表文件是一个用\env{notation}环境排版的普通表格，
%                目前\env{notation}基于\pkg{tabularray}宏包的\env{longtblr}环境实现。
% \end{function}
%
% \changes{v2.00}{2026/05/07}{添加\opt{termfile}选项。}
% \begin{function}[added=2026-05-01]{abstract/termfile}
%   \begin{nwafusyntax}[emph={[1]termfile}]
%     termfile  = (*\marg{术语表文件名}*)
%   \end{nwafusyntax}
%   术语表内容\file{.tex}源文件的文件名称。在文件名中可以使用路径信息。
%   文件名中需包括\file{.tex}扩展名。如果未提供文件名，则不输出术语表。
%
%   \emph{说明：}主要符号对照表文件是一个用\env{terminology}环境排版的普通表格，
%                目前\env{terminology}基于\pkg{tabularray}宏包的\env{longtblr}环境实现。
% \end{function}
%
% \subsection{正文编写}
%
% \begin{quotation}
%   喬孟符（吉）博學多能，以樂府稱。嘗云：「作樂府亦有法，曰^^A
%   \CJKunderdot{鳳頭、豬肚、豹尾}六字是也。」大概起要美麗，中要浩蕩，
%   結要響亮。尤貴在首尾貫穿，意思清新。苟能若是，斯可以言樂府矣。
% \end{quotation}
% \hfill ——陶宗儀《南村輟耕錄·作今樂府法》
%
% \subsubsection{凤头}
%
% \begin{function}[added=2021-05-29]{\frontmatter,\frontmatter*}
%   \begin{nwafusyntax}[deletetexcs={\frontmatter,\frontmatter*},
%                       morekeywords={\frontmatter,\frontmatter*}]
%     \frontmatter(*\oarg{编号格式|(Roman)}*)
%     \frontmatter*(*\oarg{编号格式|(Roman)}*)
%   \end{nwafusyntax}
%   \cs{frontmatter} 为前言区命令，章标题不编号，
%   默认页码为从I开始计数的大写罗马数字，也可以指定页码格式。
%   带有星号的命令 \cs{frontmatter*} 不使用清双页命令 \tn{cleardoublepage}。
%
% \end{function}
%
% \changes{v2.00}{2026/05/07}{为本科生添加封面0和封面四。}
% 对于研究生学位论文，该部分包含封面(研究生包括封面一$\sim$七，
% 本科包括封面0、封面一、封面四和封面七)、中英文摘要、主要符号对照表和目录。
% 在前置部分中，中英文摘要开始至主要符号对照表，页码采用大写罗马字母，并且与目录分开计数。
% 目录应该放在奇数页起排，页码采用大写罗马字母，并与正文分开计数。
%
% 对于本科毕业论文(设计)，该部分包含中英文摘要和目录。其中，
% 中英文摘要无页码。目录应该放在奇数页起排，页码采用大写罗马字母，并与正文分开计数
%
% 建议将中英文摘要内容分别写在不同\file{.tex}源文件中，然后用\cs{nwafuset}设置文件名后，
% 自动排版。在摘要的最后，会显示关键字列表，可通过 \cs{nwafuset} 录入关键字列表。
% 关于摘要数据录入，具体请参阅 \ref{subsubsec:摘要数据录入}~节。
%
% 建议将主要符号对照表写在\file{.tex}源文件中，然后用\cs{nwafuset}设置文件名后，
% 自动排版。关于主要符号对照表数据录入，具体请参阅 \ref{subsubsec:摘要数据录入}~节。
%
% 为正确按要求实现排版顺序和页码，不建议手动排版封面、中英文摘要、主要符号对照表和目录，
% 在提供基本内容后，由模板自动实现前置部分(凤头)排版
%
% \subsubsection{猪肚}
%
% \begin{function}[added=2021-05-29]{\mainmatter,\mainmatter*}
%   \begin{nwafusyntax}[deletetexcs={\mainmatter,\mainmatter*},
%                       morekeywords={\mainmatter,\mainmatter*}]
%     \mainmatter
%     \mainmatter*
%   \end{nwafusyntax}
%   \cs{mainmatter} 为主文区命令，章标题正常编号，
%   且页码为从1开始计数的阿拉伯数字，
%   带有星号的命令 \cs{mainmatter*} 不使用清双页命令 \tn{cleardoublepage}。
%
%   注意，由于要求第一章从奇数页开始排版，
%   因此应该使用不带星号的\cs{mainmatter}开始正文主体区的排版。
% \end{function}
%
% 主体部分是论文的核心，可以分章节撰写。如有需求，也可以采用
% 多文件方式撰写，然后用\cs{include}命令将各个子文件包含入主文件。
% 主体部分的页码采用阿拉伯数字连续编号。
%
% \begin{function}[added=2021-05-12]{\footnote}
%   \begin{nwafusyntax}[deletetexcs={\footnote},%
%       morekeywords={\footnote}]
%     \footnote(*\marg{脚注文字}*)
%   \end{nwafusyntax}
%   插入脚注。脚注编号样式可利用 \opt{style/footnote-style} 选项控制，
%   具体见 \ref{subsubsec:论文格式}~小节。
% \end{function}
%
% \begin{function}[added=2021-05-12]{axiom,corollary,definition,example,lemma,
%   proof,theorem}
%   \begin{nwafusyntax}[emph={[2]proof}]
%     \begin{proof}(*\oarg{小标题}*)
%       (*\meta{证明过程}*)
%     \end{proof}
%   \end{nwafusyntax}
%   一系列预定义的数学环境。具体含义见表~\ref{tab:theorem}。
% \end{function}
%
% \begin{table}[ht]
%   \caption{预定义的数学环境} \label{tab:theorem}
%   \centering
%   \begin{tabular}{cccccccc}
%     \toprule
%     \textbf{名称} &
%       \env{axiom}   & \env{corollary} & \env{definition} &
%       \env{example} & \env{lemma}     & \env{proof}      &
%       \env{theorem} \\
%     \midrule
%     \textbf{含义} &
%       公理 & 推论 & 定义 & 例 & 引理 & 证明 & 定理 \\
%     \bottomrule
%   \end{tabular}
% \end{table}
%
% 证明环境（\env{proof}）的最后会添加证毕符号“$\QED$”。要确保
% 该符号在正确的位置显示，需要按照 \ref{subsec:编译方式}~节
% 中的有关说明至少编译\emph{两次}，可不执行biber main参考文献编译操作。
%
% \begin{function}[added=2021-05-12]{\newtheorem}
%   \begin{nwafusyntax}[deletetexcs={\newtheorem},
%       morekeywords={\newtheorem,\newtheorem*}]
%     \newtheorem(*\oarg{选项}\marg{环境名}\marg{标题}*)
%     \newtheorem*(*\oarg{选项}\marg{环境名}\marg{标题}*)
%     \begin(*\marg{环境名}\oarg{小标题}*)
%       (*\meta{内容}*)
%     \end(*\marg{环境名}*)
%   \end{nwafusyntax}
%   声明新的定理类环境（数学环境）。带星号的版本表示不进行编号，
%   并且会默认添加证毕符号“$\QED$”。声明后，即可同预定义的数学环境
%   一样使用。
% \end{function}
%
% 事实上，表~\ref{tab:theorem} 中预定义的环境正是通过以下方式定义的：
% \begin{latexexample}[deletetexcs={\newtheorem},
%     morekeywords={\newtheorem,\newtheorem*}]
%   \newtheorem*{proof}{证明}
%   \newtheorem{axiom}{公理}
%   \newtheorem{corollary}{定理}
%   ...
% \end{latexexample}
%
% 与 \cs{nwafuset} 相同，\cs{newtheorem} 的可选参数 \meta{选项}
% 也为一组键值列表。可用的选项见下。注意无需输入“|theorem/|”。
%
% \begin{function}[added=2021-05-12]{theorem/style}
%   \begin{nwafusyntax}[emph={[1]style}]
%     style = (*<(plain)|margin|change|break|marginbreak|changebreak>*)
%   \end{nwafusyntax}
%   定理类环境的总体样式。
% \end{function}
%
% \begin{function}[added=2021-05-12]{theorem/header-font}
%   \begin{nwafusyntax}[emph={[1]header-font}]
%     header-font = (*\marg{字体}*)
%   \end{nwafusyntax}
%   定理头（即标题）的字体。中文模板默认为 \tn{sffamily}，即无衬线体
%   （黑体）；英文模板默认为 |\bfseries\upshape|，即加粗直立体。
% \end{function}
%
% \begin{function}[added=2021-05-12]{theorem/body-font}
%   \begin{nwafusyntax}[emph={[1]body-font}]
%     body-font = (*\marg{字体}*)
%   \end{nwafusyntax}
%   定理内容的字体。中文模板默认为 \tn{nwafu@kai}，即楷体；英文模板
%   默认为 \tn{itshape}，即斜体。
% \end{function}
%
% \begin{function}[added=2021-05-12]{theorem/qed}
%   \begin{nwafusyntax}[emph={[1]qed}]
%     qed = (*\marg{符号}*)
%   \end{nwafusyntax}
%   定理结束标记（即证毕符号）。如果用 \cs{newtheorem} 声明定理，
%   则默认为空；用 \cs{newtheorem*} 声明，则默认为
%   |\ensuremath{\QED}|，即“$\QED$”。
% \end{function}
%
% \begin{function}[added=2021-05-12]{theorem/counter}
%   \begin{nwafusyntax}[emph={[1]counter}]
%     counter = (*\marg{计数器}*)
%   \end{nwafusyntax}
%   定理计数器，表示定理编号在 \meta{计数器} 的下一级，并会随
%   \meta{计数器} 的变化而清零。\cite{刘海洋2013latex入门}
%   默认为 |chapter|，表示按章编号。使用 \cs{newtheorem*} 时，
%   该选项无效。
% \end{function}
%
% \begin{function}[added=2021-05-12]{\caption}
%   \begin{nwafusyntax}[deletetexcs={\caption},morekeywords={\caption}]
%     \caption(*\marg{图表标题}*)
%     \caption(*\oarg{短标题}\marg{长标题}*)
%   \end{nwafusyntax}
%   插入图表标题。可选参数 \meta{短标题} 用于图表目录。在
%   \meta{长标题} 中，可以进行长达多段的叙述；但 \meta{短标题}
%   和单独的 \meta{图表标题} 中则不允许分段。
%   \cite{刘海洋2013latex入门}
% \end{function}
%
% \begin{function}[added=2021-05-22]{\bicaption}
%   \begin{nwafusyntax}[deletetexcs={\bicaption},morekeywords={\bicaption}]
%     \bicaption(*\marg{中文标题}\marg{英文标题}*)
%   \end{nwafusyntax}
%   插入图表双语标题。双语标题基于\cls{bicaption}宏包实现。
% \end{function}
%
% 按照排版惯例，建议将表格标题放置在绘制表格命令之前，
% 而将图片标题放置在绘图或插图命令之后。另需注意，
% \tn{caption} 命令必须放置在浮动体环境（如 \env{table} 或
% \env{figure}）中。
%
% \subsubsection{豹尾}
%
% \begin{function}[added=2021-05-26]{\bibmatter}
%   参考文献开始开始。
% \end{function}
%
% 用于为参考文献部分设置正确的页眉，后续页码接正文区连续编码。
%
% \begin{function}[added=2021-05-12]{\printbibliography}
%   \begin{nwafusyntax}[morekeywords={\printbibliography}]
%     \printbibliography(*\oarg{选项}*)
%   \end{nwafusyntax}
%   打印参考文献列表。
% \meta{文献数据库} 可利用 \opt{style/bib-resource} 选项指定，具体见
%   \ref{subsubsec:论文格式}~小节。
% \end{function}
%
% 注：本模板参考文献是胡振震根据西北农林科技大学的基本要求，通过
% 添加部分样式控制代码实现的\cite{biblatex,biblatex-gb7714-2015}，
% 因此，\textbf{无法进行个性化定制}。
%
% \begin{function}[added=2021-05-24]{\appdendix}
%   声明附录开始。
% \end{function}
%
% 用于为附录部分设置正确的页眉及按要求实现附录中的图、表和公式编号。
% 后续页码接参考文献区连续编码。
%
% \begin{function}[added=2021-05-29]{\backmatter}
%   \cs{backmatter} 为后置区命令，页码格式与编号保持不变，
%   章标题不编号。
% \end{function}
%
% 用于为后置部分设置正确页眉，后置部分主要包括致谢和个人简历。
% 后续页码接附录区连续编码。
%
% \changes{v2.00}{2026/05/07}{添加盲审删除致谢判断。}
% \begin{function}[added=2021-06-01,updated=2026-05-07]{acknowledgement}
%   \begin{nwafusyntax}[emph={[2]acknowledgement}]
%     \begin{acknowledgement}
%       (*\meta{致谢内容}*)
%     \end{acknowledgement}
%   \end{nwafusyntax}
%   致谢排版环境。使用该环境的主要作用是设置页眉及产生不编号章标题。
% \end{function}
%
% \changes{v2.00}{2026/05/07}{添加盲审删除个人简历判断。}
% \begin{function}[added=2021-06-01,updated=2026-05-07]{resume}
%   \begin{nwafusyntax}[emph={[2]resume}]
%     \begin{resume}
%       (*\meta{简历内容}*)
%     \end{resume}
%   \end{nwafusyntax}
%   简历排版环境。使用该环境的主要作用是设置页眉及产生不编号章标题。
% \end{function}
%
% \begin{function}[added=2021-06-01]{\researchitem}
%   \begin{nwafusyntax}[deletetexcs={\researchitem},morekeywords={\researchitem}]
%     \researchitem(*\oarg{个人简历分类名称}*)
%   \end{nwafusyntax}
%   在简历排版中，指定成果类型，按标题的格式(非标题)居中排版。
% \end{function}
%
% \begin{function}[added=2021-06-01]{publications}
%   \begin{nwafusyntax}[emph={[2]publications}]
%     \begin{publications}
%       (*\meta{简历中发表的学术论文列表}*)
%     \end{publications}
%   \end{nwafusyntax}
%   简历中发表的学术论文排版列表环境。
% \end{function}
%
% \begin{function}[added=2021-06-01]{achievements}
%   \begin{nwafusyntax}[emph={[2]achievements}]
%     \begin{achievements}
%       (*\meta{简历中发表的学术论文列表}*)
%     \end{achievements}
%   \end{nwafusyntax}
%   简历中专利等研究成果排版列表环境。
% \end{function}
%
% \section{其他命令接口}
%
% \begin{function}[added=2021-05-20]{\nwafuthesis}
%   \cs{nwafuthesis} 命令用于输出\cls{nwafuthesis}模板
%   的LOGO:~\nwafuthesis{}。
% \end{function}
%
% \begin{function}[added=2021-05-20]{\datezh}
%   \cs{datezh} 命令用于输出中文格式的当前年、月。
% \end{function}
%
% \begin{function}[added=2021-05-20]{\dateen}
%   \cs{dateen} 命令用于输出英文格式的当前月,年。
% \end{function}
%
% \begin{function}[added=2022-04-04]{\fakebold}
%   \begin{nwafusyntax}[deletetexcs={\fakebold},morekeywords={\fakebold}]
%     \fakebold(*\oarg{加粗系数}\marg{文字内容}*)
%   \end{nwafusyntax}
%   使用PDF literal通过缩放笔画实现的伪粗命令。
% \end{function}
%
% \begin{function}[added=2021-05-12,updated=2021-5-28]{\makecoveri,
%                  \makecoverii,\makecoveriii, \makecoveriv,
%                  \makecoverv,\makecovervi,\makecovervii}
%   分别用于生成封面(一)$\sim$(七)。单独使用这几个命令可能
%   会造成页面顺序错误，因此若非必要，应避免直接使用这些命令排版。
% \end{function}
%
% \begin{function}[added=2021-06-04]{\makecovers}
%   生成所有封面。
% \end{function}
%
% \begin{function}[added=2021-05-12]{\tableofcontents,\listoffigures,\listoftables}
% 修改 \cs{tableofcontents}、\cs{listoffigures} 和 \cs{listoftables} 的定义，
% 使得页眉正确显示，并出现在目录及 PDF 书签中。来自于 \LaTeXe{} 标准文档类
% \file{book.cls}
% \footnote{原代码中只有 \cs{tableofcontents} 的 \cs{@mkboth} 出现在
% \cs{chapter*} 内部，这是出于兼容性的考虑而非 typo。}。
% \end{function}
%
% \begin{function}[added=2021-05-28]{\makefront}
%   用于生成中英文摘要、目录和主要符号对照表。
%
%   注意：不建议直接使用该命令排版，
%   应该由模板自动调用进行排版。
% \end{function}
%
% \begin{function}[added=2021-05-12]{abstract}
%   \begin{nwafusyntax}[emph={[2]abstract}]
%     \begin{abstract}
%       (*\meta{中文摘要}*)
%     \end{abstract}
%   \end{nwafusyntax}
% \end{function}
% \begin{function}[added=2021-05-12]{abstract*}
%   \begin{nwafusyntax}[emph={[2]abstract*}]
%     \begin{abstract*}
%       (*\meta{英文摘要}*)
%     \end{abstract*}
%   \end{nwafusyntax}
%   摘要排版环境。不带星号和带星号的版本分别用来排版中文摘要
%   和英文摘要。
%
%   注意：不建议直接排版摘要，应该提供摘要内容\file{.tex}源文件名后，由
%   \cs{makefront}命令自动排版。
% \end{function}
%
% \changes{v2.14}{2026/05/15}{修改基于tabularray实现的说明。}
% \changes{v2.00}{2026/05/06}{修改默认列数为3列，总宽度占页宽95%。}
% \begin{function}[added=2021-05-12,updated=2026-05-06,updated=2026-05-15]{notation}
%   \begin{nwafusyntax}[emph={[2]notation}]
%     \begin{notation}(*\oarg{列格式说明}*)
%       (*\meta{符号}*) &  (*\meta{单位}*) &  (*\meta{说明}*)  \\
%       (*\meta{符号 1}*) &  (*\meta{单位名称}*) &  (*\meta{说明内容}*)  \\
%       (*\meta{符号 2}*) &  (*\meta{单位名称}*) &  (*\meta{说明内容}*)  \\
%       (*\phantom{\meta{符号 $n$}}*)  (*$\vdots$*)
%       (*\meta{符号\ \kern-0.1em$n$}*) &  (*\meta{单位名称}*)  &  (*\meta{说明内容}*)
%     \end{notation}
%   \end{nwafusyntax}
%   主要符号对照表环境，基于 \pkg{tabularray} 宏包实现。
%
%   可选参数 \meta{列格式说明} 用于指定表格格式，需要符合\pkg{tabularray}宏包
%   的Inner specifications参数语法。
% \end{function}
%
% \changes{v2.00}{2026/05/01}{添加术语表环境，默认列数为2列，总宽度占页宽95%。}
% \begin{function}[added=2026-05-01,updated=2026-05-06,updated=2026-05-06]{terminology}
%   \begin{nwafusyntax}[emph={[2]terminology}]
%     \begin{terminology}(*\oarg{列格式说明}*)
%       (*\meta{术语}*) &  (*\meta{定义}*)  \\
%       (*\meta{术语 1}*)  &  (*\meta{定义内容}*)  \\
%       (*\meta{术语 2}*)  &  (*\meta{定义内容}*)  \\
%       (*\phantom{\meta{符号 $n$}}*)  (*$\vdots$*)
%       (*\meta{术语\ \kern-0.1em$n$}*)  &  (*\meta{定义内容}*)
%     \end{terminology}
%   \end{nwafusyntax}
%   主要符号对照表环境，基于 \pkg{tabularray} 宏包实现。
%
%   可选参数 \meta{列格式说明} 用于指定表格格式，需要符合\pkg{tabularray}宏包
%   的Inner specifications参数语法。
% \end{function}
%
% \begin{function}[added=2021-05-12]{\cleardoublepage}
%   \begin{nwafusyntax}[deletetexcs={\cleardoublepage},morekeywords={\cleardoublepage}]
%     \cleardoublepage(*\oarg{页面风格|(empty)}*)
%   \end{nwafusyntax}
%   在奇数页使用命令 \tn{cleardoublepage} 时可选参数为
%   下一页多出的空白偶数页的页面风格，默认为 \opt{empty} 即空的页眉页脚。
% \end{function}
%
% \section{宏包依赖情况}
%
% 使用不同编译方式、指定不同选项，会导致宏包依赖情况有所不同。
% 具体如下：
% \begin{itemize}
%   \item 在任何情况下，本模板都会\emph{显式}调用以下宏包
%     （或文档类）：
%     \begin{itemize}
%       \item \pkg{expl3}、\pkg{xparse}、\pkg{xtemplate} 和
%         \pkg{l3keys2e}，用于构建 \LaTeX3 编程环境
%         \cite{source3}。它们分属 \pkg{l3kernel} 和
%         \pkg{l3packages} 宏集。
%       \item \cls{ctexbook}，提供中文排版的通用框架。属于 \CTeX{}
%         宏集 \cite{CTeX}。
%       \item \pkg{amsmath}，对 \LaTeX{} 的数学排版功能进行了
%         全面扩展。属于 \AmSLaTeX{} 套件。
%       \item \pkg{unicode-math}，负责处理 Unicode 编码的
%         OpenType 数学字体。
%       \item \pkg{geometry}，用于调整页面尺寸。
%       \item \pkg{fancyhdr}，处理页眉页脚。
%       \item \pkg{footmisc}，处理脚注。
%       \item \pkg{ntheorem}，提供增强版的定理类环境。
%       \item \pkg{graphicx}，提供图形插入的接口。
%       \item \pkg{caption}，用于设置标题。
%       \item \pkg{bicaption}，用于设置标题。
%       \item \pkg{tabularray}，提供现代化表格排版功能。
%       \item \pkg{booktabs}，三线表排版。
%       \item \pkg{xcolor}，提供彩色支持。
%       \item \pkg{enumitem}，提供列表环境的个性化设置。
%       \item \pkg{biblatex}，提供参考文献排版。
%       \item \pkg{hyperref}，提供交叉引用、超链接、电子书签等功能。
%     \end{itemize}
%   \item 开启 \kvopt{style/footnote-style}{pifont} 后，会调用
%     \pkg{pifont} 宏包。它属于 \pkg{psnfss} 套件。
%   \item \pkg{biblatex} 宏包需要依赖 \biber{} 程序。参考文献样式由
%     \pkg{biblatex-gb7714-2015} 宏包提供的\texttt{gb7714-NWAFU}样式
%     文件控制，请注意将其升级到最新版\cite{biblatex,biblatex-gb7714-2015}。
% \end{itemize}
%
% 这里只列出了本模板直接调用的宏包。这些宏包自身的调用情况，
% 此处不再具体展开。如有需要，请参阅相关文档。
%
% \begin{thebibliography}{99}
%
% \newcommand\urlprefix{\newline\hspace*{\fill}}
% \let\OldUrl=\url
% \renewcommand\url[2][]{{\small\textit{#1}~\OldUrl{#2}}}
% \newcommand\CTANurl[2][]{{\small\textit{#1}~\href{http://mirror.ctan.org/#2}^^A
%   {\ttfamily CTAN://#2}}}
%
% \subsection{图书}
%
% \bibitem{knuth1986texbook}
% \textsc{Knuth D E}.
% \newblock \textit{The \TeX book: Computers \& Typesetting, volume A} [M].
% \newblock Boston: Addison--Wesley Publishing Company, 1986
% \urlprefix \CTANurl[源代码^^A
%   \footnote{此代码只可作为学习之用。未经 Knuth 本人同意，不应当编译此文档。}：]^^A
%   {systems/knuth/dist/tex/texbook.tex}
%
% \bibitem{mittelbach2004latexcompanion}
% \textsc{Mittelbach F} and \textsc{Goossens M}.
% \newblock \textit{The \LaTeX{} Companion} [M].
% \newblock 2nd ed.
% \newblock Boston: Addison--Wesley Publishing Company, 2004
%
% \bibitem{胡伟2017latex2e}
% 胡伟.
% \newblock \textit{\LaTeXe{} 文类和宏包学习手册} [M].
% \newblock 北京: 清华大学出版社, 2017
%
% \bibitem{刘海洋2013latex入门}
% 刘海洋.
% \newblock \textit{\LaTeX{} 入门} [M].
% \newblock 北京: 电子工业出版社, 2013
%
% \subsection{标准、规范}
%
% \bibitem{gb-t-7713.1-2006}
% 国务院学位委员会办公室, 全国信息与文献标准化技术委员会.
% \newblock \textit{学位论文编写规则: GB/T 7713.1--2006} [S].
% \newblock 北京: 中国标准出版社, 2007
%
% \bibitem{gb-t-7714-2015}
% 全国信息与文献标准化技术委员会.
% \newblock \textit{信息与文献\quad 参考文献著录规则: GB/T 7714--2015} [S].
% \newblock 北京: 中国标准出版社, 2015
%
% \bibitem{gb-t-15834-2011}
% 教育部语言文字信息管理司.
% \newblock \textit{标点符号用法: GB/T 15834--2011} [S/OL].
% \newblock 北京: 中国标准出版社, 2012
% \urlprefix\url{http://www.moe.gov.cn/ewebeditor/uploadfile/2015/01/13/20150113091548267.pdf}
%
% \bibitem{clreq}
% W3C.
% \newblock \textit{中文排版需求（Requirements for Chinese Text Layout）} [EB/OL].
% \newblock (2020-08-17)
% \urlprefix\url{https://w3c.github.io/clreq/}
%
% \bibitem{西北农林科技大学研究生论文写作指南}
% 西北农林科技大学研究生院.
% \newblock \textit{研究生学位论文写作指南(试用版)} [EB/OL].
% \newblock 2021 年 3 月修订版.
% \newblock (2021-03-17)
% \urlprefix\url{https://yjshy.nwafu.edu.cn/docs//2021-03/0d686e7d3f204af9880822db5fd7045c.pdf}
%
% \bibitem{西北农林科技大学本科论文撰写规范}
% 西北农林科技大学教务处.
% \newblock \textit{西北农林科技大学本科毕业论文(设计)写作规范(试用)} [EB/OL].
% \newblock 2021 年 5 月修订版.
% \newblock (2021-05-07)
% \urlprefix\url{https://jiaowu.nwafu.edu.cn/docs//2021-05/8aa0ef88fcf94e5ebf0bdcc2a6f42785.pdf}
%
% \subsection{宏包、模版}
%
% \bibitem{source2e}
% \textsc{Braams J}, \textsc{Carlisle D}, \textsc{Jeffrey A}, et al.
% \newblock \textit{The \LaTeXe{} Sources} [CP/OL].
% \newblock (2020-02-02)
% \urlprefix\url{https://ctan.org/pkg/latex}
% \urlprefix\CTANurl[源代码：]{macros/latex/base/source2e.pdf}
%
% \bibitem{CTeX}
% \textsc{CTEX.ORG}.
% \newblock \textit{\CTeX{} 宏集手册} [EB/OL].
% \newblock version 2.5.4,
% \newblock (2020-08-23)
% \urlprefix\url{https://ctan.org/pkg/ctex}
% \urlprefix\CTANurl[文档及源代码：]{language/chinese/ctex/ctex.pdf}
%
% \bibitem{xeCJK}
% \textsc{CTEX.ORG}.
% \newblock \textit{\pkg{xeCJK} 宏包} [EB/OL].
% \newblock version 3.8.5,
% \newblock (2020-08-23)
% \urlprefix\url{https://ctan.org/pkg/xecjk}
% \urlprefix\CTANurl[文档及源代码：]{macros/xetex/latex/xecjk/xeCJK.pdf}
%
% \bibitem{source3}
% \textsc{The \LaTeX3 Project}.
% \newblock \textit{The \LaTeX3 Sources} [CP/OL].
% \newblock (2020-08-07)
% \urlprefix\url{https://ctan.org/pkg/l3kernel}
% \urlprefix\CTANurl[源代码：]{macros/latex/contrib/l3kernel/source3.pdf}
%
% \bibitem{biblatex}
% \textsc{Lehman P}, \textsc{Kime P}, \textsc{Boruvka A}, et al.
% \newblock \textit{The \pkg{biblatex} Package} [EB/OL].
% \newblock version 3.15a,
% \newblock (2020-08-23)
% \urlprefix\url{https://ctan.org/pkg/biblatex}
% \urlprefix\CTANurl[文档：]{macros/latex/contrib/biblatex/doc/biblatex.pdf}
%
% \bibitem{lshort}
% \textsc{Oetiker T}, \textsc{Partl H}, \textsc{Hyna I}, et al.
% \newblock \textit{The Not So Short Introduction to \LaTeXe{}: Or \LaTeXe{} in 139 minutes} [EB/OL].
% \newblock version 6.2,
% \newblock (2018-02-28)
% \urlprefix\url{https://ctan.org/pkg/lshort-english}
% \urlprefix\CTANurl[文档：]{info/lshort/english/lshort.pdf}
%
% \bibitem{lshort-zh-cn}
% \textsc{Oetiker T}, \textsc{Partl H}, \textsc{Hyna I}, et al.
% \newblock \textit{一份（不太）简短的 \LaTeXe{} 介绍: 或 112 分钟了解 \LaTeXe{}} [EB/OL].
% \newblock \CTeX{} 开发小组, 译.
% \newblock 原版版本 version 6.2, 中文版本 version 6.02,
% \newblock (2020-08-03)
% \urlprefix\url{https://ctan.org/pkg/lshort-zh-cn}
% \urlprefix\CTANurl[文档：]{info/lshort/chinese/lshort-zh-cn.pdf}
%
% \bibitem{biblatex-gb7714-2015}
% 胡振震.
% \newblock \textit{符合 GB/T 7714-2015 标准的 biblatex 参考文献样式} [EB/OL].
% \newblock version 1.0v,
% \newblock (2020-07-21)
% \urlprefix\url{https://ctan.org/pkg/biblatex-gb7714-2015}
% \urlprefix\CTANurl[文档：]{biblatex-contrib/biblatex-gb7714-2015/biblatex-gb7714-2015.pdf}
%
% \bibitem{fduthesis}
% 曾祥东(\textsc{Xiangdong Z}).
% \newblock \textit{\textsc{fduThesis}：复旦大学毕业论文 \LaTeX{} 模板} [EB/OL].
% \newblock version 0.7e,
% \newblock (2020-08-30)
% \urlprefix\url{https://ctan.org/pkg/fduthesis}
% \urlprefix\CTANurl[文档及源代码：]{macros/latex/contrib/fduthesis/fduthesis.pdf}
%
% \subsection{其他}
%
% \bibitem{wright2009dtxfile}
% \textsc{Wright J}.
% \newblock \textit{A model dtx file} [EB/OL].
% \newblock (2009-10-06)
% \urlprefix\url{https://www.texdev.net/2009/10/06/a-model-dtx-file/}
%
% \bibitem{孔雀计划}
% 刘庆（\textsc{Eric Q L}）.
% \newblock \textit{孔雀计划：中文字体排印的思路} [EB/OL].
% \urlprefix\url{https://thetype.com/kongque/}
%
% \end{thebibliography}
%
% \clearpage
%
% \end{documentation}
%
% \begin{implementation}
%
%^^A 代码部分的页边距
% \newgeometry{
%   left      = 2.25 in,
%   right     = 1.00 in,
%   top       = 1.25 in,
%   bottom    = 1.00 in,
%   marginpar = 2.25 in
% }
%
% \changes{v1.11}{2022/04/03}{取消本科黑体加粗。}
%
% \section{实现细节}
%
% 本模板使用 \LaTeX3 语法编写，依赖 \pkg{expl3} 环境，
% 并需调用 \pkg{l3packages} 中的相关宏包。
%
% 按照 \LaTeX3 语法，代码中的空格、换行、回车与制表符完全被忽略，
% 而下划线“|_|”和冒号“|:|”则可作为一般字母使用。
% 正常的空格可以使用“|~|”代替；至于 |~| 原来所表示的“带子”，
% 则要用 \LaTeXe{} 的原始命令 \tn{nobreakspace} 代替。
%
% 以下代码中有一些形如 \textcolor[HTML]{2E3191}{\textsf{<*class>}}
% 的标记，这是 \pkg{DocStrip} 中的“guard”，用来选择性地提取文件。
% “\textsf{*}”和“\textsf{/}”分别表示该部分的开始和结束。不含
% “\textsf{*}”和“\textsf{/}”的 guard 出现在行号右侧，它们用来确定
% 单独一行代码的归属。这些 guard 的颜色深浅不一，用以明确嵌套关系。
%
% 另有若干形如 \textcolor{MaterialPink}{\textsf{<@@=nwafu>}} 的 guard，
% 它们用来标识名字空间（模块）。
%
% \subsection{准备}
%
%    \begin{macrocode}
%<@@=nwafu>
%<*class>
%    \end{macrocode}
%
% 检查 \LaTeX3 编程环境。
%    \begin{macrocode}
\RequirePackage {xtemplate, l3keys2e }
\clist_map_inline:nn { xtemplate, l3keys2e }
  {
    \@ifpackagelater {#1} { 2020/07/17 }
      { } { \msg_error:nnn { nwafuthesis } { l3-too-old } {#1} }
  }
\msg_new:nnn { nwafuthesis } { l3-too-old }
  {
    Package~ "#1"~ is~ too~ old. \\\\
    Please~ update~ an~ up-to-date~ version~ of~ the~ bundles \\
    "l3kernel"~ and~ "l3packages"~ using~ your~ TeX~ package \\
    manager~ or~ from~ CTAN.
  }
%    \end{macrocode}
%
% 目前 \cls{nwafuthesis} 仅支持 \XeTeX{} 和 \LuaTeX{}编译引擎。
%    \begin{macrocode}
\sys_if_engine_xetex:F
  {
    \sys_if_engine_luatex:F
      {
        \msg_fatal:nnx { nwafuthesis } { unsupported-engine }
          { \c_sys_engine_str }
      }
  }
\msg_new:nnn { nwafuthesis } { unsupported-engine }
  {
    The~ nwafuthesis~ class~ requires~ either~ XeTeX~ or~ LuaTeX. \\\\
    "#1"~ is~ not~ supported~ at~ present.~ You~ must~ change \\
    your~ typesetting~ engine~ to~ "xelatex"~ or~ "lualatex".
  }
%    \end{macrocode}
%
% \subsubsection{内部变量声明}
%
% \begin{variable}{\l_@@_tmpa_box,
%   \l_@@_tmpa_clist,
%   \l_@@_tmpb_clist,
%   \l_@@_tmpc_clist,
%   \l_@@_tmpd_clist,
%   \l_@@_tmpt_clist,
%   \l_@@_tmpa_dim,
%   \l_@@_tmpb_dim,
%   \l_@@_tmpc_dim,
%   \l_@@_tmpd_dim,
%   \l_@@_tmpt_dim,
%   \l_@@_tmpa_skip,
%   \l_@@_tmpa_tl,
%   \l_@@_tmpb_tl,
%   \l_@@_tmpt_tl
%  }
% 临时变量。
%    \begin{macrocode}
\box_new:N   \l_@@_tmpa_box
\clist_new:N \l_@@_tmpa_clist
\clist_new:N \l_@@_tmpb_clist
\clist_new:N \l_@@_tmpc_clist
\clist_new:N \l_@@_tmpd_clist
\clist_new:N \l_@@_tmpt_clist
\dim_new:N   \l_@@_tmpa_dim
\dim_new:N   \l_@@_tmpb_dim
\dim_new:N   \l_@@_tmpc_dim
\dim_new:N   \l_@@_tmpd_dim
\dim_new:N   \l_@@_tmpt_dim
\skip_new:N  \l_@@_tmpa_skip
\tl_new:N    \l_@@_tmpa_tl
\tl_new:N    \l_@@_tmpb_tl
\tl_new:N    \l_@@_tmpc_tl
\tl_new:N    \l_@@_tmpd_tl
\tl_new:N    \l_@@_tmpt_tl
%    \end{macrocode}
% \end{variable}
%
% \begin{variable}{\g_@@_thesis_type_int}
% 论文类型。取值 1、2、3 分别对应博士、硕士、本科（学士）。
%    \begin{macrocode}
\int_new:N \g_@@_thesis_type_int
%    \end{macrocode}
% \end{variable}
%
% \begin{variable}{\g_@@_to_ctexbook_clist,\g_@@_to_hyperref_clist}
% 分别保存由 \cls{nwafuthesis} 传入 \cls{ctexbook} 文档类和
% \pkg{hyperref} 宏包的选项列表。
%    \begin{macrocode}
\clist_new:N \g_@@_to_ctexbook_clist
\clist_new:N \g_@@_to_hyperref_clist
%    \end{macrocode}
% \end{variable}
%
% \begin{variable}{\g_@@_twoside_bool}
% 是否开启双页模式（默认打开）。
% 本模板中，目前使用双页与单页模式的排版结果是一样的，
% 保留该设置的目的是为了后续扩展。
%    \begin{macrocode}
\bool_new:N \g_@@_twoside_bool
\bool_set_true:N \g_@@_twoside_bool
%    \end{macrocode}
% \end{variable}
%
% \begin{variable}{\g_@@_draft_bool}
% 是否开启草稿模式。
%    \begin{macrocode}
\bool_new:N \g_@@_draft_bool
%    \end{macrocode}
% \end{variable}
%
% \changes{v2.00}{2026/04/29}{删除本科是否按章编写论文判断，统一按章编排论文，添加是否排版图表目录判断。}
%
% \begin{variable}{\g_@@_figtabtoc_bool}
% 是否输出图表清单(目前仅对本科有效)。
%    \begin{macrocode}
\bool_new:N \g_@@_figtabtoc_bool
%    \end{macrocode}
% \end{variable}
%
% \changes{v1.15}{2022/05/29}{添加研究生题名页签字判断变量。}
%
% \begin{variable}{\g_@@_withsignature_bool}
% 研究生题名页中的作者、指导教师和答辩委员会姓名是否需要签名。
%    \begin{macrocode}
\bool_new:N \g_@@_withsignature_bool
%    \end{macrocode}
% \end{variable}
%
% \changes{v1.25}{2023/04/18}{添加盲审判断变量。}
%
% \begin{variable}{\g_@@_anonymous_bool}
% 是否输出盲审版论文(隐藏作者、导师、页眉等个人及学校信息)。
%    \begin{macrocode}
\bool_new:N \g_@@_anonymous_bool
%    \end{macrocode}
% \end{variable}
%
%
% \changes{v2.00}{2026/04/29}{本科章编号统一为中文编号。}
% \changes{v1.12}{2022/05/24}{添加本科中文章编号处理。}
%
% \subsubsection{内部函数}
%
% \begin{macro}{\file_input:V,
%   \int_to_arabic:v,
%   \keys_define:nx,
%   \tl_map_inline:xn}
% \begin{macro}[TF]{\tl_if_eq:Vn}
% \LaTeX3{} 函数的函数变体。
%    \begin{macrocode}
\cs_generate_variant:Nn \file_input:n           { V  }
\cs_generate_variant:Nn \int_to_arabic:n        { v  }
\cs_generate_variant:Nn \keys_define:nn         { nx }
\cs_generate_variant:Nn \tl_map_inline:nn       { xn }
\prg_generate_conditional_variant:Nnn \tl_if_eq:nn { Vn } { T, TF }
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\@@_quad:,\@@_qquad:}
% 等价于 \LaTeXe{} 中的 \tn{quad} 和 \tn{qquad}。
%    \begin{macrocode}
\cs_new:Npn \@@_quad:  { \skip_horizontal:n { 1 em } }
\cs_new:Npn \@@_qquad: { \skip_horizontal:n { 2 em } }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_vspace:N,\@@_vspace:n,\@@_vspace:c}
% 类似 \LaTeXe{} 中的 \tn{vspace*}。
%    \begin{macrocode}
\cs_new_protected:Npn \@@_vspace:N #1
  {
    \dim_set_eq:NN \l_@@_tmpa_dim \prevdepth
    \hrule height \c_zero_dim
    \nobreak
    \skip_vertical:N #1
    \skip_vertical:N \c_zero_skip
    \dim_set_eq:NN \prevdepth \l_@@_tmpa_dim
  }
\cs_new_protected:Npn \@@_vspace:n #1
  {
    \skip_set:Nn \l_@@_tmpa_skip {#1}
    \@@_vspace:N \l_@@_tmpa_skip
  }
\cs_generate_variant:Nn \@@_vspace:N { c }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_symbol:n}
% 等价于 \LaTeXe{} 中的 \tn{symbol}。
%    \begin{macrocode}
\cs_new:Npn \@@_symbol:n #1 { \tex_char:D #1 \scan_stop: }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_arabic:n}
% 等价于 \LaTeXe{} 中的 \tn{arabic}。
%    \begin{macrocode}
\cs_new:Npn \@@_arabic:n #1
  { \int_to_arabic:v { c@ #1 } }
%    \end{macrocode}
% \end{macro}
%
% \changes{v1.11}{2022/04/03}{添加PDF literal实现的伪粗命令。}
%
% \begin{macro}{\@@_fake_bold:nn,\fakebold}
% 利用PDF literal实现的伪粗命令。
% 参考\url{https://zhuanlan.zhihu.com/p/60262200}实现。
% \begin{arguments}
%   \item 加粗系数
%   \item 需要加粗的文字
% \end{arguments}
%    \begin{macrocode}
\cs_new:Npn \@@_fake_bold:nn #1#2
  {
    \special{pdf:code~q~2~Tr~0~G~#1~w}%
    #2%
    \special{pdf:code~Q}%
  }
\NewDocumentCommand \fakebold {O{0.2} m }
  {
    \@@_fake_bold:nn { #1 }{ #2 }
  }
%    \end{macrocode}
% \end{macro}
%
% \changes{v1.10}{2022/03/17}{统一使用 \LaTeX{} 2020/10/01 新钩子机制。}
%
% \begin{macro}{\@@_gadd_ltxhook:nn}
% 封装 \LaTeX{} 的钩子管理机制。本模板中的字体加载命令位于
% |begindocument/before| 钩子中，需确保在 \pkg{xeCJK} 之前执行。
%    \begin{macrocode}
\cs_new_protected:Npn \@@_gadd_ltxhook:nn #1#2
  { \hook_gput_code:nnn {#1} { . } {#2} }
\hook_gset_rule:nnnn { begindocument/before } { . } { < } { xeCJK }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_patch_cmd:Nnn,\@@_preto_cmd:Nn,\@@_appto_cmd:Nn}
% 补丁工具，来自 \pkg{ctexpatch} 宏包。
%    \begin{macrocode}
\cs_new_protected:Npn \@@_patch_cmd:Nnn #1#2#3
  {
    \ctex_patch_cmd_once:NnnnTF #1 { } {#2} {#3}
      { } { \ctex_patch_failure:N #1 }
  }
\cs_new_protected:Npn \@@_preto_cmd:Nn #1#2
  {
    \ctex_preto_cmd:NnnTF #1 { } {#2}
      { } { \ctex_patch_failure:N #1 }
  }
\cs_new_protected:Npn \@@_appto_cmd:Nn #1#2
  {
    \ctex_appto_cmd:NnnTF #1 { } {#2}
      { } { \ctex_patch_failure:N #1 }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_at_begin_environment:nn}
% 在环境开始添加代码的补丁函数。
%    \begin{macrocode}
\cs_new_protected:Npn \@@_at_begin_environment:nn #1#2
  {
    \seq_set_from_clist:Nn \l_@@_env_hook_name_seq {#1}
    \seq_map_inline:Nn \l_@@_env_hook_name_seq
      { \AtBeginEnvironment{##1}{#2} }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_at_end_preamble:n}
% 在导言区结束位置添加代码的补丁函数。
%    \begin{macrocode}
\cs_new_protected:Npn \@@_at_end_preamble:n #1
  {
    \ctex_gadd_ltxhook:nn { env/document/before } { #1 }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_define_fn_style:nn,
%   \@@_define_punct:nn,
%   \@@_define_name:nn,
%   \@@_define_name:nnn}
% 用来定义脚注样式、标点、默认名称的辅助函数。
%    \begin{macrocode}
\cs_new_protected:Npn \@@_define_fn_style:nn #1#2
  { \tl_const:cn { c_@@_fn_style_ #1 _tl } {#2} }
\cs_new_protected:Npn \@@_define_punct:nn #1#2
  { \tl_const:cn { c_@@_ #1 _tl } { \@@_symbol:n {#2} } }
\cs_new_protected:Npn \@@_define_name:nn #1#2
  { \tl_const:cn { c_@@_name_ #1 _tl } {#2} }
\cs_new_protected:Npn \@@_define_name:nnn #1#2#3
  {
    \tl_const:cn { c_@@_name_ #1    _tl } {#2}
    \tl_const:cn { c_@@_name_ #1 _en_tl } {#3}
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_msg_new:nn,
%   \@@_error:n,\@@_error:nn,\@@_error:nx,\@@_error:nnn,
%   \@@_warning:n,\@@_warning:nn,\@@_warning:nxx,
%   \@@_info:nx}
% 各种信息函数的缩略形式。
%    \begin{macrocode}
\cs_new:Npn \@@_msg_new:nn  { \msg_new:nnn      { nwafuthesis } }
\cs_new:Npn \@@_error:n     { \msg_error:nn     { nwafuthesis } }
\cs_new:Npn \@@_error:nn    { \msg_error:nnn    { nwafuthesis } }
\cs_new:Npn \@@_error:nx    { \msg_error:nnx    { nwafuthesis } }
\cs_new:Npn \@@_error:nnn   { \msg_error:nnnn   { nwafuthesis } }
\cs_new:Npn \@@_error:nnnn  { \msg_error:nnnnn  { nwafuthesis } }
\cs_new:Npn \@@_warning:n   { \msg_warning:nn   { nwafuthesis } }
\cs_new:Npn \@@_warning:nn  { \msg_warning:nnn  { nwafuthesis } }
\cs_new:Npn \@@_warning:nxx { \msg_warning:nnxx { nwafuthesis } }
\cs_new:Npn \@@_info:nx     { \msg_info:nnx     { nwafuthesis } }
%    \end{macrocode}
% \end{macro}
%
% \subsection{选项处理}
%
% 定义 |nwafu/option| 键值类。
%    \begin{macrocode}
\keys_define:nn { nwafu / option }
  {
%    \end{macrocode}
%
% \begin{macro}{type}
% 设置论文类型。设为模板选项主要是为了以后的兼容性。论文类型会
% 影响很多设置，默认为本科毕业论文。
%    \begin{macrocode}
    type .choice:,
    type .value_required:n = true,
    type .choices:nn =
      { doctor, master, bachelor }
      { \int_gset_eq:NN \g_@@_thesis_type_int \l_keys_choice_int },
    type .initial:n = bachelor,
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{oneside,twoside}
% 设置页面类型为单面或双面。
%    \begin{macrocode}
    oneside .value_forbidden:n = true,
    twoside .value_forbidden:n = true,
    oneside .code:n =
      {
        \clist_gput_right:Nn \g_@@_to_ctexbook_clist { oneside }
        \bool_gset_false:N   \g_@@_twoside_bool
      },
    twoside .code:n =
      {
%    \end{macrocode}
% 此处是为后续诸如页边距调整为左右不同保留的设置。
%    \begin{macrocode}
        \clist_gput_right:Nn \g_@@_to_ctexbook_clist { twoside }
        \bool_gset_true:N    \g_@@_twoside_bool
      },
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{draft}
% 是否开启草稿模式（默认关闭）。
%    \begin{macrocode}
    draft .choice:,
    draft / true  .code:n =
      {
        \bool_gset_true:N     \g_@@_draft_bool
        \clist_gput_right:Nn \g_@@_to_ctexbook_clist { draft }
      },
    draft / false .code:n =
      { \bool_gset_false:N    \g_@@_draft_bool },
    draft .default:n = true,
    draft .initial:n = false,
%    \end{macrocode}
% \end{macro}
%
% 处理未知选项。
%    \begin{macrocode}
    unknown .code:n = { \@@_error:n { unknown-option } }
  }
\@@_msg_new:nn { unknown-option }
  { Class~ option~ "\l_keys_key_tl"~ is~ unknown. }
%    \end{macrocode}
%
% 将选项 |nwafu/option|传给文档类。
%    \begin{macrocode}
\ProcessKeysOptions { nwafu / option }
%    \end{macrocode}
%
% \subsection{模板使用命令及参数定义}
%
% \subsubsection{定义NWAFU LOGO和中英文年月命令}
%
% \begin{macro}{\nwafuthesis}
% nwafuthesis模板的LOGO。
%    \begin{macrocode}
\NewDocumentCommand \nwafuthesis { }
  {%
    \makebox{\rmfamily%
      N\hspace{-0.2ex}\raisebox{-0.5ex}{W}\raisebox{0.5ex}
      {\hspace{-0.2ex}\textsc{AFU}}\hspace{0.3ex}%
      \textsc{Thesis}
    }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\datezh}
% 取得中文年月。
%    \begin{macrocode}
\NewDocumentCommand \datezh { }
  {
    \int_use:N \c_sys_year_int 年
    \int_use:N \c_sys_month_int 月
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\dateen}
% 取得英文月年，详见：\\
% 1  = Jan.(January),\\
% 2  = Feb.(February),\\
% 3  = Mar.(March),\\
% 4  = Apr.(April),\\
% 5  = May.(May),\\
% 6  = Jun.(June),\\
% 7  = Jul.(July),\\
% 8  = Aug.(August),\\
% 9  = Sept.(September),\\
% 10 = Oct.(October),\\
% 11 = Nov.(November),\\
% 12 = Dec.(December),
%    \begin{macrocode}
\prop_new:N \l_@@_dateen_prop
\prop_set_from_keyval:Nn \l_@@_dateen_prop
  {
    1  = Jan.,
    2  = Feb.,
    3  = Mar.,
    4  = Apr.,
    5  = May.,
    6  = Jun.,
    7  = Jul.,
    8  = Aug.,
    9  = Sept.,
    10 = Oct.,
    11 = Nov.,
    12 = Dec.,
  }
\NewDocumentCommand \dateen { }
  {
    \prop_get:NVN \l_@@_dateen_prop \c_sys_month_int \l_@@_tmpa_tl
    \l_@@_tmpa_tl ,~ \int_use:N \c_sys_year_int
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{通用常量}
%
% \begin{variable}{\c_@@_name_simp_tl,\c_@@_name_trad_tl,
%   \c_@@_name_en_tl}
% 学校名称。
%    \begin{macrocode}
\tl_const:Nn \c_@@_name_simp_tl { 西北农林科技大学 }
\tl_const:Nn \c_@@_name_trad_tl { 西北農林科技大學 }
\tl_const:Nn \c_@@_name_en_tl { Northwest~ A\&F~ University }
%    \end{macrocode}
% \end{variable}
%
% 常用标点符号，见表~\ref{tab:punctuations}。
%    \begin{macrocode}
\clist_map_inline:nn
  {
    { ideo_comma       } { "3001 },
    { ideo_full_stop   } { "3002 },
    { fwid_tilde       } { "FF5E },
    { fwid_comma       } { "FF0C },
    { fwid_full_stop   } { "FF0E },
    { fwid_colon       } { "FF1A },
    { fwid_semicolon   } { "FF1B },
    { fwid_left_paren  } { "FF08 },
    { fwid_right_paren } { "FF09 },
    { fwid_left_title  } { "300A },
    { fwid_right_title } { "300B }
  }
  { \@@_define_punct:nn #1 }
%    \end{macrocode}
%
% \begin{table}[ht]
%   \caption{常用标点符号}
%   \label{tab:punctuations}
%   \centering
%   \begin{tabular}{cccc}
%     \toprule
%       \textbf{中文名称} & \textbf{英文名称} & \textbf{符号} & \textbf{Unicode} \\
%     \midrule
%       中文顿号     & Ideographic comma           & \symbol{"3001} & U+3001 \\
%       中文句号     & Ideographic full stop       & \symbol{"3002} & U+3002 \\
%       中文波浪号   & Fullwidth tilde             & \symbol{"FF5E} & U+FF5E \\
%       中文逗号     & Fullwidth comma             & \symbol{"FF0C} & U+FF0C \\
%       全角西文句点 & Fullwidth full stop         & \symbol{"FF0E} & U+FF0E \\
%       中文冒号     & Fullwidth colon             & \symbol{"FF1A} & U+FF1A \\
%       中文分号     & Fullwidth semicolon         & \symbol{"FF1B} & U+FF1B \\
%       中文左圆括号 & Fullwidth left parenthesis  & \symbol{"FF08} & U+FF08 \\
%       中文右圆括号 & Fullwidth right parenthesis & \symbol{"FF09} & U+FF09 \\
%       中文左书名号 & Fullwidth left book title   & \symbol{"300A} & U+300A \\
%       中文右书名号 & Fullwidth right book title  & \symbol{"300B} & U+300B \\
%     \bottomrule
%   \end{tabular}
% \end{table}
%
% \begin{variable}{\c_@@_line_spread_fp}
% 行距倍数。行距倍数 $k$ 由下式确定：
% \begin{equation*}
%   \num{1.2} \times k \times \SI{12}{bp} = \SI{20}{pt}.
% \end{equation*}
% 式中，\num{1.2} 是基本行距与文字大小之比，\SI{12}{bp} 是小四号字
% 的大小，\SI{20}{pt} 是行距固定值。
%    \begin{macrocode}
\fp_const:Nn \c_@@_line_spread_fp
  { \dim_ratio:nn { 20 pt } { 12 bp } / 1.2 }
%    \end{macrocode}
% \end{variable}
%
% \subsubsection{独创性和使用授权声明页内容常量}
%
% \begin{variable}{\c_@@_orig_decl_text_tl}
% 论文独创性声明。
%    \begin{macrocode}
\cs_new_protected:Npn \@@_define_orig_decl_text:
  {
    \int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 }
      {
%    \end{macrocode}
% 研究生独创性声明，注意此处分段只能用\tn{par}实现。
%    \begin{macrocode}
        \tl_const:Nn \c_@@_orig_decl_text_tl
          {
            本人声明{\c_@@_fwid_colon_tl}所呈交的学位论文是我个人在导师指导下%
            独立进行的研究工作及取得的研究结果{\c_@@_fwid_semicolon_tl}论文中%
            的研究数据及结果的获得完全符合学校{\c_@@_fwid_left_title_tl}%
            关于规范\@@_name_simp: {}研究生学术道德的暂行规定{\c_@@_fwid_right_title_tl}%
            {\c_@@_fwid_comma_tl}如果违反此规定{\c_@@_fwid_comma_tl}一切后果与%
            法律责任均由本人承担{\c_@@_ideo_full_stop_tl}\par%

            尽我所知{\c_@@_fwid_comma_tl}除了文中特别加以标注和致谢的地方外%
            {\c_@@_fwid_comma_tl}论文中不包含其他人已经发表或撰写过的研究结果%
            {\c_@@_fwid_comma_tl}也不包含其他人和自己本人已获得\@@_name_simp: {}%
            或其它教育机构的学位或证书而使用过的材料{\c_@@_ideo_full_stop_tl}与%
            我一同工作的同事对本研究所做的任何贡献均已在论文的致谢中作了明确的说%
            明并表示了谢意{\c_@@_ideo_full_stop_tl}%
          }
      }{
%    \end{macrocode}
% 本科生独创性声明，注意此处分段只能用\tn{par}实现。
%    \begin{macrocode}
        \tl_const:Nn \c_@@_orig_decl_text_tl
          {
            本人声明{\c_@@_fwid_colon_tl}所呈交的毕业%
            \clist_item:Nn \c_@@_bachelor_type_clist
              { \l_@@_info_bachelor_type_int }%
            是我个人在导师指导下独立进行的研究工作及取得的研究结果{\c_@@_ideo_full_stop_tl}%
            尽我所知{\c_@@_fwid_comma_tl}除了文中特别加以标注和致谢的地%
            方外{\c_@@_fwid_comma_tl}论文中不包含其他人已经发表或撰写过%
            的研究结果{\c_@@_fwid_comma_tl}也不包含其他人和自己本人已获%
            得\@@_name_simp: {}或其它教育机构的学位或证书而使用过的材%
            料{\c_@@_ideo_full_stop_tl}与我一同工作的同事对本研究所做的%
            任何贡献均已在论文的致谢中作了明确的说明并表示了谢意{\c_@@_ideo_full_stop_tl}%
            如违反此声明{\c_@@_fwid_comma_tl}一切后果与法律责任均由本人%
            承担{\c_@@_ideo_full_stop_tl}%
          }
      }
  }
\@@_define_orig_decl_text:
%    \end{macrocode}
% \end{variable}
%
% \changes{v1.25}{2023/04/18}{添加盲审隐藏导师承诺中研究生姓名。}
%
% \begin{variable}{\c_@@_super_decl_text_tl}
% 研究生学位导师承诺。
%    \begin{macrocode}
\tl_const:Nn \c_@@_super_decl_text_tl
  {
    本人承诺{\c_@@_fwid_colon_tl}我的研究生{%
    \bool_if:NTF \g_@@_anonymous_bool
    {
      \@@_text_uline:V \c_@@_name_anonname_tl
    }{
      \@@_text_uline:V \l_@@_info_author_tl
    }
    }%
    所呈交的学位论文是在我指导下独立开展研究工作及取得的研究结果%
    {\c_@@_fwid_comma_tl}属于我现岗职务工作的结果{\c_@@_fwid_comma_tl}%
    并严格按照学校{\c_@@_fwid_left_title_tl}关于规范\@@_name_simp: {}研%
    究生学术道德的暂行规定{\c_@@_fwid_right_title_tl}而%
    获得的研究结果{\c_@@_ideo_full_stop_tl}如果违反学校{\c_@@_fwid_left_title_tl}%
    关于规范\@@_name_simp: {}研究生学术道德的暂行规定{\c_@@_fwid_right_title_tl}%
    {\c_@@_fwid_comma_tl}我愿接受按学校%
    有关规定的处罚处理并承担相应导师连带责任{\c_@@_ideo_full_stop_tl}%
  }
%    \end{macrocode}
% \end{variable}
%
% \begin{variable}{\c_@@_auth_decl_text_tl}
% 论文使用授权声明。
%    \begin{macrocode}
\cs_new_protected:Npn \@@_auth_orig_decl_text:
  {
    \int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 }
      {
%    \end{macrocode}
% 研究生使用授权声明，注意此处分段只能用\tn{par}实现。
%    \begin{macrocode}
        \tl_const:Nn \c_@@_auth_decl_text_tl
          {
            本学位论文的知识产权归属\@@_name_simp: {}{\c_@@_ideo_full_stop_tl}%
            本人同意\@@_name_simp: {}保存或向国家有关部门或机构送交论文的纸%
            质版和电子版{\c_@@_fwid_comma_tl}允许论文被查阅和借阅{\c_@@_fwid_semicolon_tl}%
            同意\@@_name_simp: {}将本学位论文的全部或部分内容授权汇编录入%
            {\c_@@_fwid_left_title_tl}中国博士/硕士学位论文全文数据库%
            {\c_@@_fwid_right_title_tl}和{\c_@@_fwid_left_title_tl}中国学位%
            论文全文数据库{\c_@@_fwid_right_title_tl}进行出版%
            {\c_@@_fwid_comma_tl}并享受相关权益{\c_@@_ideo_full_stop_tl}\par

            本人保证{\c_@@_fwid_comma_tl}在毕业离开(或者工作调离)\@@_name_simp: {}%
            后{\c_@@_fwid_comma_tl}发表或者使用本学位论文及其相关的工作成%
            果时{\c_@@_fwid_comma_tl}将以\@@_name_simp: {}为第一署名单位%
            {\c_@@_fwid_comma_tl}否则{\c_@@_fwid_comma_tl}愿意按
            {\c_@@_fwid_left_title_tl}中华人民共和国著作权法{\c_@@_fwid_right_title_tl}%
            等有关规定接受处理并承担法律责任{\c_@@_ideo_full_stop_tl}\par%

            任何收存和保管本论文各种版本的其他单位和个人(包括研究生本人)未经本%
            论文作者的导师同意{\c_@@_fwid_comma_tl}不得有对本论文进行复制%
            {\c_@@_ideo_comma_tl}修改{\c_@@_ideo_comma_tl}发行{\c_@@_ideo_comma_tl}%
            出租{\c_@@_ideo_comma_tl}改编等侵犯著作权的行为{\c_@@_fwid_comma_tl}%
            否则{\c_@@_fwid_comma_tl}按违背{\c_@@_fwid_left_title_tl}中华人民共和国%
            著作权法{\c_@@_fwid_right_title_tl}等有关规定处%
            理并追究法律责任{\c_@@_ideo_full_stop_tl}\par%

            {\sffamily (保密的学位论文在保密期限内{\c_@@_fwid_comma_tl}不得以任何%
               方式发表{\c_@@_ideo_comma_tl}借阅{\c_@@_ideo_comma_tl}复印%
               {\c_@@_ideo_comma_tl}缩印或扫描复制手段保存{\c_@@_ideo_comma_tl}汇编论文)%
            }
          }
      }{
%    \end{macrocode}
% 本科生使用授权声明，注意此处分段只能用\tn{par}实现。
%    \begin{macrocode}
        \tl_const:Nn \c_@@_auth_decl_text_tl
          {
            本毕业\clist_item:Nn \c_@@_bachelor_type_clist
                                 { \l_@@_info_bachelor_type_int }%
            的知识产权归属\@@_name_simp: {}{\c_@@_ideo_full_stop_tl}本%
            人同意\@@_name_simp: {}保存或向国家有关部门或机构送交论文的%
            纸质版和电子版{\c_@@_fwid_comma_tl}允许论文被查阅和借阅%
            {\c_@@_ideo_full_stop_tl}\par

            本人保证{\c_@@_fwid_comma_tl}在毕业离开\@@_name_simp: {}后%
            {\c_@@_fwid_comma_tl}发表或者使用本毕业%
            \clist_item:Nn \c_@@_bachelor_type_clist { \l_@@_info_bachelor_type_int }%
            及其相关的工作成果时{\c_@@_fwid_comma_tl}将以\@@_name_simp: {}%
            为第一署名单位{\c_@@_fwid_comma_tl}如有违反{\c_@@_fwid_comma_tl}%
            愿意按{\c_@@_fwid_left_title_tl}中华人民共和国著作权法%
            {\c_@@_fwid_right_title_tl}等有关规定接受处理并承担法律责任%
            {\c_@@_ideo_full_stop_tl}\par%

            任何收存和保管本论文各种版本的其他单位和个人(包括作者本人)未经%
            本论文作者的导师同意{\c_@@_fwid_comma_tl}不得有对本论文进行复制%
            {\c_@@_ideo_comma_tl}修改{\c_@@_ideo_comma_tl}发行{\c_@@_ideo_comma_tl}%
            出租{\c_@@_ideo_comma_tl}改编等侵犯著作权的行为{\c_@@_fwid_comma_tl}%
            否则{\c_@@_fwid_comma_tl}按违背{\c_@@_fwid_left_title_tl}中华人民%
            共和国著作权法{\c_@@_fwid_right_title_tl}%
            等有关规定处理并追究法律责任{\c_@@_ideo_full_stop_tl}%
          }
      }
  }
\@@_auth_orig_decl_text:
%    \end{macrocode}
% \end{variable}
%
% \begin{variable}{\c_@@_orig_decl_sign_tl,
%   \c_@@_super_decl_sign_tl}
% 声明页签名项目。
%    \begin{macrocode}
\cs_new_protected:Npn \@@_orig_decl_sign:
  {
    \int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 }
      {
%    \end{macrocode}
% 研究生。
%    \begin{macrocode}
        \tl_const:Nn \c_@@_orig_decl_sign_tl  { 研究生签名 }
        \tl_const:Nn \c_@@_super_decl_sign_tl { 导师签名   }
      }{
%    \end{macrocode}
% 本科。
%    \begin{macrocode}
        \tl_const:Nn \c_@@_orig_decl_sign_tl  { 本科生签名   }
        \tl_const:Nn \c_@@_super_decl_sign_tl { 指导教师签名 }
      }
  }
\@@_orig_decl_sign:
\clist_const:Nn \c_@@_auth_decl_sign_clist
  { 作者签名, 导师签名, 日期 }
%    \end{macrocode}
% \end{variable}
%
% \subsubsection{杂项常量定义}
%
% \changes{v2.00}{2026/04/29}{修订本科毕业生为本科毕业。}
% \changes{v1.13}{2022/05/26}{修订本科毕业为本科毕业。}
%
% \begin{variable}{\c_@@_thesis_type_clist,
%   \c_@@_postgraduate_type_clist,
%   \c_@@_bachelor_type_clist}
% 论文类型与学位类型。
%    \begin{macrocode}
\clist_const:Nn \c_@@_thesis_type_clist
  { 博士学位论文, 硕士学位论文, 本科毕业 }
\clist_const:Nn \c_@@_postgraduate_type_clist
  { 学术学位, 专业学位 }
\clist_const:Nn \c_@@_bachelor_type_clist
  { 论文, 设计 }
%    \end{macrocode}
% \end{variable}
%
% \begin{variable}{\c_@@_secret_clist}
% 四种密级，公开无需列入。
%    \begin{macrocode}
\clist_const:Nn \c_@@_secret_clist { 公开, 限制, 秘密 }
%    \end{macrocode}
% \end{variable}
%
% 各字段默认名称，注意会忽略空格。
%
% 研究生和本科名称存在不一致现象，例如研究生用“研究生学号”，本科用“学号”。
%    \begin{macrocode}
\cs_new_protected:Npn \@@_define_name_const_zh:
  {
    \int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 }
      {
%    \end{macrocode}
% 研究生
%    \begin{macrocode}
        \clist_map_inline:nn
          {
            { secret_level    } { 密级                             },
            { udc             } { UDC                              },
            { school_id       } { 学校代码                         },
            { instructors     } { 指导小组                         },
            { ack             } { 致 \quad 谢                      },
            { toc             } { 目 \quad 录                      },
            { student_id      } { 研究生学号                       },
            { orig_decl       } { 研究生学位论文的独创性声明       },
            { super_decl      } { 导师指导研究生学位论文的承诺     },
            { auth_decl       } { 关于研究生学位论文使用授权的说明 },
            { resume          } { 个人简历                         },
            { lof             } { 插图目录                         },
            { lot             } { 表格目录                         },
          }
          { \@@_define_name:nn ##1 }
       }{
%    \end{macrocode}
% 本科生
%    \begin{macrocode}
        \clist_map_inline:nn
          {
            { ack             } { 致谢                           },
            { department      } { 培养单位                       },
            { bachelor_title  } { 申请学位类别                   },
            { major           } { 专业名称                       },
            { student_id      } { 学号                           },
            { authorbrief     } { 作者                           },
            { author          } { 学生姓名                       },
            { cosupervisor    } { 合作指导教师                   },
            { resume          } { 作者简历                       },
            { date            } { 完成日期                       },
            { toc             } { 目次                           },
            { notation        } { 主要符号注释表                 },
            { terminology     } { 术语表                         },
            { figtabtoc       } { 插图和附表清单                 },
            { orig_decl       } { 本科生毕业\clist_item:Nn
                                  \c_@@_bachelor_type_clist {
                                  \l_@@_info_bachelor_type_int
                                  }的原创性声明                  },
            { auth_decl       } { 本科生毕业\clist_item:Nn
                                  \c_@@_bachelor_type_clist {
                                  \l_@@_info_bachelor_type_int
                                  }的使用授权说明                }
          }
          { \@@_define_name:nn ##1 }
      }
  }
%    \end{macrocode}
% 执行研究生或本科中文常量定义。
%    \begin{macrocode}
\@@_define_name_const_zh:
%
%    \end{macrocode}
% 研究生与本科相同的中英文常量。
%    \begin{macrocode}
%
% \changes{v1.25}{2023/04/19}{添加盲审隐藏信息符号常量。}
%
\cs_new_protected:Npn \@@_define_name_const_zh_en:
  {
%    \end{macrocode}
% 研究生和本科名称相同中英文字段。
%    \begin{macrocode}
    \clist_map_inline:nn
      {
        { supervisor  } { 指导教师   } { Supervisor },
        { anonid      } { ********** } { ********** },
        { anonname    } { ********** } { ********** },
        { anonhead    } { ********** } { ********** },
        { bib_en      } { 参考文献   } { Bibliography },
        { pdf_creator } { 西北农林科技大学\LaTeX{}模板 }{ \LaTeX{}~ with~ nwafuthesis~ class },
      }
      { \@@_define_name:nnn ##1 }

    \int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 }
      {
%    \end{macrocode}
% 研究生。
%    \begin{macrocode}
        \clist_map_inline:nn
          {
            { department        } { 培养单位       } { Colleges             },
            { major             } { 学科专业       } { Major                },
            { engineering_title } { 专业学位类别   } { Degree~ Type         },
            { engineeringfield  } { 专业学位领域   } { Field                },
            { author            } { 论文作者       } { Candidate            },
            { cosupervisor      } { 合作指导教师   } { Co-Supervisor        },
            { date              } { 论文提交时间   } { Date~ of~ Submission },
            { abstract          } { 摘 \quad 要    } { ABSTRACT             },
            { keywords          } { 关键词         } { KEY~WORDS            },
            { clc               } { 分类号         } { CLC~ number:         },
            { notation          } { 主要符号对照表 } { List~ of~ Symbols    }
          }
          { \@@_define_name:nnn ##1 }
      }{
%    \end{macrocode}
% 本科。
%    \begin{macrocode}
        \clist_map_inline:nn
          {
            { abstract    } { 摘要           } { ABSTRACT              },
            { keywords    } { 关键词         } { KEY~WORDS             },
          }
          { \@@_define_name:nnn ##1 }
      }
  }
%    \end{macrocode}
% 执行研究生或本科中英文常量定义。
%    \begin{macrocode}
\@@_define_name_const_zh_en:
%    \end{macrocode}
%
% 定理类标题中英文名称常量。
%    \begin{macrocode}
%
\clist_map_inline:nn
  {
    { proof      } { 证明 } { Proof      },
    { axiom      } { 公理 } { Axiom      },
    { corollary  } { 推论 } { Corollary  },
    { definition } { 定义 } { Definition },
    { example    } { 例   } { Example    },
    { lemma      } { 引理 } { Lemma      },
    { theorem    } { 定理 } { Theorem    }
  }
  { \@@_define_name:nnn #1 }
%    \end{macrocode}
%
% \subsection{载入宏包、文档类}
%
% 将选项传入 \cls{ctexbook} 文档类。
%    \begin{macrocode}
\PassOptionsToClass
  {
    UTF8,
    heading    = true,
    fontset    = none,
    zihao      = -4,
    linespread = \c_@@_line_spread_fp,
    \g_@@_to_ctexbook_clist
  }
  { ctexbook }
%    \end{macrocode}
%
% 载入 \cls{ctexbook} 文档类。
% 在使用 \XeLaTeX{} 编译时，\cls{ctexbook} 的底层将调用 \pkg{xeCJK}
% 宏包；而在使用 \LuaLaTeX{} 编译时，则将调用 \pkg{LuaTeX-ja} 宏包。
% 两种情况下 \cls{ctexbook} 均会调用 \pkg{fontspec} 宏包。
%
%    \begin{macrocode}
\LoadClass { ctexbook }
%    \end{macrocode}
%
% 为各宏包传入必要的选项。
%
%    \begin{macrocode}
\clist_map_inline:nn
  {
    { shortlabels       } { enumitem  },
    { no-math           } { fontspec  },
    { perpage           } { footmisc  },
    { amsmath, thmmarks } { ntheorem  },
    { list=off          } { bicaption }
  }
  { \PassOptionsToPackage #1 }
%    \end{macrocode}
%
% \changes{v2.14}{2026/05/14}{添加tabularray和booktabs宏包。}
%
% 载入各宏包。其中，\pkg{amsmath} 必须在 \pkg{unicode-math} 之前引入。
%
%    \begin{macrocode}
\RequirePackage
  {
    amsmath,
    unicode-math,
    geometry,
    fancyhdr,
    titletoc,
    footmisc,
    ntheorem,
    enumitem,
    graphicx,
    caption,
    bicaption,
    tabularray,
    booktabs,
    xcolor,
  }
%    \end{macrocode}
%
% \changes{v1.10}{2022/03/17}{只检查 \cls{ctexbook} 和 \pkg{xeCJK} 的版本。}
%
% \begin{macro}{\@@_check_package:nnn}
% 检查过时宏包。
%    \begin{macrocode}
\cs_new_protected:Npn \@@_check_package:nnn #1#2#3
  {
    \@ifpackagelater {#1} {#2}
      { } { \@@_error:nnnn { package-too-old } { Package } {#1} {#3} }
  }
\cs_new_protected:Npn \@@_check_class:nnn #1#2#3
  {
    \@ifclasslater {#1} {#2}
      { } { \@@_error:nnnn { package-too-old } { Class } {#1} {#3} }
  }
\@@_msg_new:nn { package-too-old }
  {
    #1~ "#2"~ is~ too~ old. \\
    The~ nwafuthesis~ class~ only~ supports~ "#2" \\
    with~ a~ version~ higher~ than~ v#3. \\\\
    Please~ update~ an~ up-to-date~ version~ of~ it \\
    using~ your~ TeX~ package~ manager~ or~ from~ CTAN.
  }
%    \end{macrocode}
% \end{macro}
%
% \changes{v1.01}{2021/08/06}{由于无法获取ctex版本信息，暂时关闭对ctex版本检测。}
%
%    \begin{macrocode}
\@@_check_class:nnn { ctexbook } { 2021/03/14 } { 2.5.6 }
\sys_if_engine_xetex:T
  { \@@_check_package:nnn { xeCJK } { 2020/05/01 } { 3.8.3 } }
%    \end{macrocode}
%
% \subsection{页面布局}
%
% 利用 \pkg{geometry} 宏包设置纸张大小、页面边距以及页眉高度。这里，
% $\SI{2.54}{\centi\meter}=\SI{1}{in}$，
% $\SI{3.18}{\centi\meter}=\SI{1.25}{in}$。
%
% \changes{v2.13}{2026/05/12}{按2026年研究生撰写规范修订研究生页面布局。}
%
% 研究论文页面尺寸与本科毕业论文(设计)的
% 页面尺寸目前一致，但为后续维护仍采用分开设计的形式。
%    \begin{macrocode}
\cs_new_protected:Npn \@@_thesis_geometry:
  {
    \int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 }
      {
%    \end{macrocode}
% 研究生论文页边距
%    \begin{macrocode}
        \geometry
          {
            paper         = a4paper,
            top           = 1.45cm,
            bottom        = 2.60cm,
            left          = 2.60cm,
            right         = 2.60cm,
            bindingoffset = 0.00cm,
            headheight    = 0.80cm,
            headsep       = 0.70cm,
            footskip      = 0.75cm,
            includehead,
            includefoot,
          }
      }{
%    \end{macrocode}
% 本科论文页边距
%    \begin{macrocode}
        \geometry
          {
            paper         = a4paper,
            top           = 1.45cm,
            bottom        = 2.60cm,
            left          = 2.60cm,
            right         = 2.60cm,
            bindingoffset = 0.00cm,
            headheight    = 0.80cm,
            headsep       = 0.70cm,
            footskip      = 0.75cm,
            includehead,
            includefoot,
          }
      }
  }
\@@_thesis_geometry:
%    \end{macrocode}
%
% 草稿模式下显示页面边框及页眉、页脚线 。
%    \begin{macrocode}
\bool_if:NT \g_@@_draft_bool { \geometry { showframe } }
%    \end{macrocode}
%
% \subsection{字体}
%
% \subsubsection{字体选项变量}
%
% \begin{variable}{\g_@@_fontset_tl, \g_@@_cjk_fontset_tl}
% 存放字体选项值。
%    \begin{macrocode}
\tl_new:N \g_@@_fontset_tl
\tl_new:N \g_@@_cjk_fontset_tl
%    \end{macrocode}
% \end{variable}
%
% \subsubsection{字体选项}
%
% \begin{macro}{style/font}
% 西文字体选项。
%    \begin{macrocode}
\keys_define:nn { nwafu / style }
  {
    font .choices:nn =
      { garamond, libertinus, lm, palatino, times, times*, none }
      { \tl_gset_eq:NN \g_@@_fontset_tl \l_keys_choice_tl }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{style/cjk-font}
% 中文字体选项。
%    \begin{macrocode}
\keys_define:nn { nwafu / style }
  {
    cjk-font .choices:nn =
      { adobe, fandol, founder, mac, sinotype, sourcehan, windows, none }
      { \tl_gset_eq:NN \g_@@_cjk_fontset_tl \l_keys_choice_tl }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{预定义字体配置函数}
%
% \changes{v2.16}{2026/05/16}{添加字体设置函数变体(xx)。}
%
% \begin{macro}{
%   \@@_setmainfont:nn,
%   \@@_setsansfont:nn,
%   \@@_setmonofont:nn,
%   \@@_setmathfont:nn}
% 用于设置西文字体的辅助函数，来源于 \pkg{fontspec} 和 \pkg{unicode-math}。
% \begin{arguments}
%   \item 字体名
%   \item 选项
% \end{arguments}
%    \begin{macrocode}
\cs_new_protected:Npn \@@_setmainfont:nn #1#2
  { \__fontspec_main_setmainfont:nn {#2} {#1} }
\cs_new_protected:Npn \@@_setsansfont:nn #1#2
  { \__fontspec_main_setsansfont:nn {#2} {#1} }
\cs_new_protected:Npn \@@_setmonofont:nn #1#2
  { \__fontspec_main_setmonofont:nn {#2} {#1} }
\cs_new_protected:Npn \@@_setmathfont:nn #1#2
  { \__um_setmathfont:nn {#2} {#1} }
%    \end{macrocode}
% 西文字体设置函数的函数变体
%    \begin{macrocode}
\cs_generate_variant:Nn \@@_setmainfont:nn { xx }
\cs_generate_variant:Nn \@@_setsansfont:nn { xx }
\cs_generate_variant:Nn \@@_setmonofont:nn { xx }
\cs_generate_variant:Nn \@@_setmathfont:nn { xx }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{
%   \@@_setCJKmainfont:nn,
%   \@@_setCJKsansfont:nn,
%   \@@_setCJKmonofont:nn}
% 用于设置中文字体的辅助函数，来源于 \pkg{xeCJK} 和 \pkg{ctex} 宏包。
%    \begin{macrocode}
\cs_new_protected:Npn \@@_setCJKmainfont:nn #1#2
  { \@@_set_family:xnn { \CJKrmdefault } {#2} {#1} }
\cs_new_protected:Npn \@@_setCJKsansfont:nn #1#2
  { \@@_set_family:xnn { \CJKsfdefault } {#2} {#1} }
\cs_new_protected:Npn \@@_setCJKmonofont:nn #1#2
  { \@@_set_family:xnn { \CJKttdefault } {#2} {#1} }
%    \end{macrocode}
% 中文字体设置函数的函数变体
%    \begin{macrocode}
\cs_generate_variant:Nn \@@_setCJKmainfont:nn { xx }
\cs_generate_variant:Nn \@@_setCJKsansfont:nn { xx }
\cs_generate_variant:Nn \@@_setCJKmonofont:nn { xx }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_set_cjk_font_hei:nn,\nwafu@hei}
% 中文黑体需要单独设置。
%    \begin{macrocode}
\cs_new_protected:Npn \@@_set_cjk_font_hei:nn #1#2
  { \@@_set_family:nnn { nwafu@hei } {#2} {#1} }
%    \end{macrocode}
% 中文黑体字体设置函数的函数变体
%    \begin{macrocode}
\cs_generate_variant:Nn \@@_set_cjk_font_hei:nn { xx }
\cs_new_protected:Npn \nwafu@hei
  { \@@_switch_family:n { nwafu@hei } }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_set_cjk_font_kai:nn,\nwafu@kai}
% 楷体需要单独设置。
%    \begin{macrocode}
\cs_new_protected:Npn \@@_set_cjk_font_kai:nn #1#2
  { \@@_set_family:nnn { nwafu@kai } {#2} {#1} }
%    \end{macrocode}
% 中文楷体字体设置函数的函数变体
%    \begin{macrocode}
\cs_generate_variant:Nn \@@_set_cjk_font_kai:nn { xx }
\cs_new_protected:Npn \nwafu@kai
  { \@@_switch_family:n { nwafu@kai } }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{
%   \@@_cjk_font_options:,
%   \@@_cjk_font_hei_options:,
%   \@@_setCJKmainfont:n,
%   \@@_setCJKsansfont:n,
%   \@@_setCJKmonofont:n,
%   \@@_set_cjk_font_hei:n,
%   \@@_set_cjk_font_kai:n}
% 将 bold、italic 和 bold italic 统一按照 roman 设置。
%    \begin{macrocode}
\tl_const:Nn \@@_cjk_font_options:
 { UprightFont = *, ItalicFont = *, AutoFakeBold = true }
%    \end{macrocode}
% 设置为中文黑体时不启用伪粗体
%    \begin{macrocode}
\tl_const:Nn \@@_cjk_font_hei_options:
 { UprightFont = *, ItalicFont = *, AutoFakeBold = false }
%    \end{macrocode}
% 设置中文正文常规字体
%    \begin{macrocode}
\cs_new_protected:Npx \@@_setCJKmainfont:n   #1
  { \@@_setCJKmainfont:nn   {#1} { \@@_cjk_font_options: } }
%    \end{macrocode}
% 设置中文无衬线字体
%    \begin{macrocode}
\cs_new_protected:Npx \@@_setCJKsansfont:n   #1
  { \@@_setCJKsansfont:nn   {#1} { \@@_cjk_font_hei_options: } }
%    \end{macrocode}
% 设置中文等宽字体
%    \begin{macrocode}
\cs_new_protected:Npx \@@_setCJKmonofont:n   #1
  { \@@_setCJKmonofont:nn   {#1} { \@@_cjk_font_options: } }
%    \end{macrocode}
% 设置中文黑体字体
%    \begin{macrocode}
\cs_new_protected:Npx \@@_set_cjk_font_hei:n #1
  { \@@_set_cjk_font_hei:nn {#1} { \@@_cjk_font_hei_options: } }
%    \end{macrocode}
% 设置中文楷体字体
%    \begin{macrocode}
\cs_new_protected:Npx \@@_set_cjk_font_kai:n #1
  { \@@_set_cjk_font_kai:nn {#1} { \@@_cjk_font_options: } }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_set_family:nnn,\@@_set_family:xnn,\@@_switch_family:n}
% 封装 CJK 字体族的设定和切换命令。
%    \begin{macrocode}
\sys_if_engine_xetex:TF
  {
    \cs_new_eq:NN \@@_set_family:nnn  \xeCJK_set_family:nnn
    \cs_new_eq:NN \@@_switch_family:n \xeCJK_switch_family:n
  }
  {
    \cs_new_eq:NN \@@_set_family:nnn  \ctex_ltj_set_family:nnn
    \cs_new_eq:NN \@@_switch_family:n \ctex_ltj_switch_family:n
  }
\cs_generate_variant:Nn \@@_set_family:nnn { x }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{
%   \setmainfont,
%   \setsansfont,
%   \setmonofont,
%   \setmathfont,
%   \setCJKmainfont,
%   \setCJKsansfont,
%   \setCJKmonofont,
%   \@@_set_font:n}
% 重新定义以上宏包提供的字体选择命令。把它放在导言区末尾，使得用户配置不被
% 模板配置覆盖。
%    \begin{macrocode}
\cs_new_protected:Npn \@@_set_font_helper:n #1
  {
    \exp_args:Nc \RenewDocumentCommand { set #1 font } { O { } m O { } }
      {
        \ctex_at_end_preamble:n
          { \use:c { @@_set #1 font:nn } {##2} { ##1, ##3 } }
      }
  }
\clist_map_inline:nn { main, sans, mono, math    } { \@@_set_font_helper:n {#1} }
\clist_map_inline:nn { CJKmain, CJKsans, CJKmono } { \@@_set_font_helper:n {#1} }
%    \end{macrocode}
% \end{macro}
%
% \changes{v1.10}{2022/03/17}{判断 Libertinus Sans Bold Oblique 字体是否存在。}
%
% \subsubsection{字体配置变量}
%
% \begin{macro}{
%   \g_@@_font_family_libertinus_serif_tl,
%   \g_@@_font_family_libertinus_sans_tl,
%   \g_@@_font_style_libertinus_rm_tl,
%   \g_@@_font_style_libertinus_bf_tl,
%   \g_@@_font_style_libertinus_it_tl,
%   \g_@@_font_style_libertinus_bfit_tl,
%   \g_@@_font_style_libertinus_bfsl_tl,
%   \g_@@_font_family_xits_tl,
%   \g_@@_font_style_xits_rm_tl,
%   \g_@@_font_style_xits_bf_tl,
%   \g_@@_font_style_xits_it_tl,
%   \g_@@_font_style_xits_bfit_tl,
%   \g_@@_font_name_libertinus_serif_tl,
%   \g_@@_font_name_libertinus_sans_tl,
%   \g_@@_font_name_libertinus_math_tl,
%   \g_@@_font_name_libertinus_math_bf_tl,
%   \g_@@_font_name_xits_tl,
%   \g_@@_font_name_xits_math_rm_tl,
%   \g_@@_font_name_xits_math_bf_tl}
% Libertinus 和 XITS 字体的文件名做过变动，需要特殊处理。
%    \begin{macrocode}
\tl_new:N \g_@@_font_family_libertinus_serif_tl
\tl_new:N \g_@@_font_family_libertinus_sans_tl
\tl_new:N \g_@@_font_style_libertinus_rm_tl
\tl_new:N \g_@@_font_style_libertinus_bf_tl
\tl_new:N \g_@@_font_style_libertinus_it_tl
\tl_new:N \g_@@_font_style_libertinus_bfit_tl
\tl_new:N \g_@@_font_style_libertinus_bfsl_tl
\tl_new:N \g_@@_font_family_xits_tl
\tl_new:N \g_@@_font_style_xits_rm_tl
\tl_new:N \g_@@_font_style_xits_bf_tl
\tl_new:N \g_@@_font_style_xits_it_tl
\tl_new:N \g_@@_font_style_xits_bfit_tl
\tl_new:N \g_@@_font_name_libertinus_serif_tl
\tl_new:N \g_@@_font_name_libertinus_sans_tl
\tl_new:N \g_@@_font_name_libertinus_math_tl
\tl_new:N \g_@@_font_name_libertinus_math_bf_tl
\tl_new:N \g_@@_font_name_xits_tl
\tl_new:N \g_@@_font_name_xits_math_rm_tl
\tl_new:N \g_@@_font_name_xits_math_bf_tl
\fontspec_font_if_exist:nTF { LibertinusSerif-Regular.otf }
  {
    \tl_gset:Nn \g_@@_font_family_libertinus_serif_tl { LibertinusSerif     }
    \tl_gset:Nn \g_@@_font_family_libertinus_sans_tl  { LibertinusSans      }
    \tl_gset:Nn \g_@@_font_family_libertinus_math_tl  { LibertinusMath      }
    \tl_gset:Nn \g_@@_font_name_libertinus_math_bf_tl { LibertinusMath-Bold }
    \tl_gset:Nn \g_@@_font_style_libertinus_rm_tl     { Regular             }
    \tl_gset:Nn \g_@@_font_style_libertinus_bf_tl     { Bold                }
    \tl_gset:Nn \g_@@_font_style_libertinus_it_tl     { Italic              }
    \tl_gset:Nn \g_@@_font_style_libertinus_bfit_tl   { BoldItalic          }
%    \end{macrocode}
% 较新版本中 Libertinus Sans Bold Oblique 字体被移除，需进行额外判断。
%    \begin{macrocode}
    \fontspec_font_if_exist:nTF { LibertinusSans-BoldOblique.otf }
      { \tl_gset:Nn \g_@@_font_style_libertinus_bfsl_tl { BoldOblique } }
      { \tl_gset:Nn \g_@@_font_style_libertinus_bfsl_tl { Bold        } }
  }
  {
    \tl_gset:Nn \g_@@_font_family_libertinus_serif_tl { libertinusserif     }
    \tl_gset:Nn \g_@@_font_family_libertinus_sans_tl  { libertinussans      }
    \tl_gset:Nn \g_@@_font_family_libertinus_math_tl  { libertinusmath      }
    \tl_gset:Nn \g_@@_font_name_libertinus_math_bf_tl { libertinusmath-bold }
    \tl_gset:Nn \g_@@_font_style_libertinus_rm_tl     { regular             }
    \tl_gset:Nn \g_@@_font_style_libertinus_bf_tl     { bold                }
    \tl_gset:Nn \g_@@_font_style_libertinus_it_tl     { italic              }
    \tl_gset:Nn \g_@@_font_style_libertinus_bfit_tl   { bolditalic          }
    \tl_gset:Nn \g_@@_font_style_libertinus_bfsl_tl   { bolditalic          }
  }
\fontspec_font_if_exist:nTF { XITS-Regular.otf }
  {
    \tl_gset:Nn \g_@@_font_family_xits_tl        { XITS             }
    \tl_gset:Nn \g_@@_font_style_xits_rm_tl      { Regular          }
    \tl_gset:Nn \g_@@_font_style_xits_bf_tl      { Bold             }
    \tl_gset:Nn \g_@@_font_style_xits_it_tl      { Italic           }
    \tl_gset:Nn \g_@@_font_style_xits_bfit_tl    { BoldItalic       }
    \tl_gset:Nn \g_@@_font_name_xits_math_rm_tl  { XITSMath-Regular }
    \tl_gset:Nn \g_@@_font_name_xits_math_bf_tl  { XITSMath-Bold    }
  }
  {
    \tl_gset:Nn \g_@@_font_family_xits_tl        { xits          }
    \tl_gset:Nn \g_@@_font_style_xits_rm_tl      { regular       }
    \tl_gset:Nn \g_@@_font_style_xits_bf_tl      { bold          }
    \tl_gset:Nn \g_@@_font_style_xits_it_tl      { italic        }
    \tl_gset:Nn \g_@@_font_style_xits_bfit_tl    { bolditalic    }
    \tl_gset:Nn \g_@@_font_name_xits_math_rm_tl  { xits-math     }
    \tl_gset:Nn \g_@@_font_name_xits_math_bf_tl  { xits-mathbold }
  }
\tl_gset:Nx \g_@@_font_name_libertinus_serif_tl
  { \g_@@_font_family_libertinus_serif_tl - \g_@@_font_style_libertinus_rm_tl }
\tl_gset:Nx \g_@@_font_name_libertinus_sans_tl
  { \g_@@_font_family_libertinus_sans_tl  - \g_@@_font_style_libertinus_rm_tl }
\tl_gset:Nx \g_@@_font_name_libertinus_math_tl
  { \g_@@_font_family_libertinus_math_tl  - \g_@@_font_style_libertinus_rm_tl }
\tl_gset:Nx \g_@@_font_name_xits_tl
  { \g_@@_font_family_xits_tl - \g_@@_font_style_xits_rm_tl }
%    \end{macrocode}
% \end{macro}
%
% \changes{v2.16}{2026/05/16}{除XITS数学字体外的伪粗体设置。}
% \changes{v2.14}{2026/05/12}{用数据驱动模式处理字体。}
%
% \subsubsection{西文字体配置驱动数据列表}
%
% \begin{variable}{\c_@@_font_garamond_clist,
% \c_@@_font_libertinus_clist,
% \c_@@_font_lm_clist,
% \c_@@_font_palatino_clist,
% \c_@@_font_times_clist,
% \c_@@_font_times_star_clist}
% 西文字体配置数据列表。
% \begin{description}
%   \item[格式] |{|字体族|}{|字体名称|}{|选项|}|
%   \item[字体族] main, sans, mono, math
% \end{description}
% EB Garamond系列
%    \begin{macrocode}
\clist_const:Nn \c_@@_font_garamond_clist
  {
    { main } { EBGaramond }
      { Extension = .otf,
        UprightFont = *-Regular,
        BoldFont = *-Bold,
        ItalicFont = *-Italic,
        BoldItalicFont = *-BoldItalic },
    { sans } { \g_@@_font_family_libertinus_sans_tl }
      { Extension = .otf,
        UprightFont = *-\g_@@_font_style_libertinus_rm_tl,
        BoldFont = *-\g_@@_font_style_libertinus_bf_tl,
        ItalicFont = *-\g_@@_font_style_libertinus_it_tl,
        BoldItalicFont = *-\g_@@_font_style_libertinus_bfsl_tl },
    { mono } { lmmonolt10 }
      { Extension = .otf,
        UprightFont = *-regular,
        BoldFont = *-bold,
        ItalicFont = *-oblique,
        BoldItalicFont = *-boldoblique },
    { math } { Garamond-Math.otf }
      { BoldFont = Garamond-Math.otf,
        BoldFeatures = { FakeBold = 1.6 } }
  }
%    \end{macrocode}
% Libertinus系列
%    \begin{macrocode}
\clist_const:Nn \c_@@_font_libertinus_clist
  {
    { main } { \g_@@_font_family_libertinus_serif_tl }
      { Extension = .otf,
        UprightFont = *-\g_@@_font_style_libertinus_rm_tl,
        BoldFont = *-\g_@@_font_style_libertinus_bf_tl,
        ItalicFont = *-\g_@@_font_style_libertinus_it_tl,
        BoldItalicFont = *-\g_@@_font_style_libertinus_bfit_tl },
    { sans } { \g_@@_font_family_libertinus_sans_tl }
      { Extension = .otf,
        UprightFont = *-\g_@@_font_style_libertinus_rm_tl,
        BoldFont = *-\g_@@_font_style_libertinus_bf_tl,
        ItalicFont = *-\g_@@_font_style_libertinus_it_tl,
        BoldItalicFont = *-\g_@@_font_style_libertinus_bfsl_tl },
    { mono } { lmmonolt10 }
      { Extension = .otf,
        UprightFont = *-regular,
        BoldFont = *-bold,
        ItalicFont = *-oblique,
        BoldItalicFont = *-boldoblique },
    { math } { \g_@@_font_name_libertinus_math_tl .otf }
      { BoldFont = \g_@@_font_name_libertinus_math_tl .otf,
        BoldFeatures = { FakeBold = 1.6 } }
  }
%    \end{macrocode}
% Latin Modern 系列。在 \XeLaTeX{} 和 \LuaLaTeX{} 中已作为默认字体，所以仅需
% 额外处理数学部分。
%    \begin{macrocode}
\clist_const:Nn \c_@@_font_lm_clist
  {
    { math } { latinmodern-math.otf }
      {BoldFont       = latinmodern-math.otf,
       BoldFeatures   = { RawFeature = { embolden = 3 } },
       BoldItalicFont = latinmodern-math.otf,
       BoldItalicFeatures = { RawFeature = { embolden = 3 } }}
  }
%    \end{macrocode}
% Palatino 系列。
%    \begin{macrocode}
\clist_const:Nn \c_@@_font_palatino_clist
  {
    { main } { texgyrepagella }
      { Extension = .otf,
        UprightFont = *-regular,
        BoldFont = *-bold,
        ItalicFont = *-italic,
        BoldItalicFont = *-bolditalic },
    { sans } { \g_@@_font_family_libertinus_sans_tl }
      { Extension = .otf,
        UprightFont = *-\g_@@_font_style_libertinus_rm_tl,
        BoldFont = *-\g_@@_font_style_libertinus_bf_tl,
        ItalicFont = *-\g_@@_font_style_libertinus_it_tl,
        BoldItalicFont = *-\g_@@_font_style_libertinus_bfsl_tl,
        Scale = MatchUppercase },
    { mono } { lmmonolt10 }
      { Extension = .otf,
        UprightFont = *-regular,
        BoldFont = *-bold,
        ItalicFont = *-oblique,
        BoldItalicFont = *-boldoblique },
    { math } { texgyrepagella-math.otf }
      { BoldFont = texgyrepagella-math.otf,
        BoldFeatures = { FakeBold = 1.6 } }
  }
%    \end{macrocode}
% Times 系列。
%    \begin{macrocode}
\clist_const:Nn \c_@@_font_times_clist
  {
    { main } { \g_@@_font_family_xits_tl }
      { Extension = .otf,
        UprightFont = *-\g_@@_font_style_xits_rm_tl,
        BoldFont = *-\g_@@_font_style_xits_bf_tl,
        ItalicFont = *-\g_@@_font_style_xits_it_tl,
        BoldItalicFont = *-\g_@@_font_style_xits_bfit_tl },
    { sans } { texgyreheros }
      { Extension = .otf,
        UprightFont = *-regular,
        BoldFont = *-bold,
        ItalicFont = *-italic,
        BoldItalicFont = *-bolditalic },
    { mono } { texgyrecursor }
      { Extension = .otf,
        UprightFont = *-regular,
        BoldFont = *-bold,
        ItalicFont = *-italic,
        BoldItalicFont = *-bolditalic,
        Ligatures = CommonOff },
    { math } { \g_@@_font_name_xits_math_rm_tl .otf }
      { BoldFont = \g_@@_font_name_xits_math_bf_tl .otf }
  }
%    \end{macrocode}
% Times* 系列，除数学部分外采用系统字体。。
%    \begin{macrocode}
\clist_const:Nn \c_@@_font_times_asterisk_clist
  {
    { main } { Times~ New~ Roman } { },
    { sans } { Arial } { },
    { mono } { Courier~ New } { },
    { math } { \g_@@_font_name_xits_math_rm_tl .otf }
      { BoldFont = \g_@@_font_name_xits_math_bf_tl .otf }
  }
%    \end{macrocode}
% \end{variable}
%
% \subsubsection{西文字体加载函数}
%
% \begin{macro}{\@@_load_font_by_family:nn,
% \@@_load_font_by_family:nnn,
% \@@_load_fontset:n}
% 西文字体通用加载函数
%    \begin{macrocode}
\cs_new_protected:Npn \@@_load_font_by_family:nn #1#2
  {
    \str_case:nnF {#1}
      {
        { main } { \@@_setmainfont:xx {#2} { \l_@@_tmpa_tl } }
        { sans } { \@@_setsansfont:xx {#2} { \l_@@_tmpa_tl } }
        { mono } { \@@_setmonofont:xx {#2} { \l_@@_tmpa_tl } }
        { math } { \@@_setmathfont:xx {#2} { \l_@@_tmpa_tl } }
      }
      { \msg_error:nnn { nwafuthesis } { unknown-font-family } {#1} }
  }
\cs_new_protected:Npn \@@_load_font_by_family:nnn #1#2#3
  {
    \tl_set:Nx \l_@@_tmpa_tl { #3 }
    \@@_load_font_by_family:nn { #1 } { #2 }
  }
%    \end{macrocode}
% 定义报错信息
%    \begin{macrocode}
\msg_new:nnn { nwafuthesis } { unknown-font-family }
  { Unknown~ font~ family~ "#1". }
%    \end{macrocode}
% 批量加载字体
%    \begin{macrocode}
\cs_new_protected:Npn \@@_load_fontset:n #1
  {
    \clist_map_inline:cn { c_@@_font_ #1 _clist }
      {
        \@@_load_font_by_family:nnn ##1
      }
  }
%    \end{macrocode}
% 函数变体
%    \begin{macrocode}
\cs_generate_variant:Nn \@@_load_fontset:n { V }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{中文字体驱动数据列表}
%
% \begin{variable}{\c_@@_cjk_font_adobe_clist,
% \c_@@_cjk_font_fandol_clist,
% \c_@@_cjk_font_founder_clist,
% \c_@@_cjk_font_mac_clist,
% \c_@@_cjk_font_sinotype_clist,
% \c_@@_cjk_font_sourcehan_clist,
% \c_@@_cjk_font_windows_clist}
% 中文字体配置数据列表。
% \begin{description}
%   \item[格式] |{|字体族|}{|字体名称|}{|选项|}|
%   \item[字体族] main, sans, mono, hei, kai
% \end{description}
% Adobe 字库
%    \begin{macrocode}
\clist_const:Nn \c_@@_cjk_font_adobe_clist
  {
    { main } { AdobeSongStd-Light       } { },
    { sans } { AdobeHeitiStd-Regular    } { },
    { mono } { AdobeFangsongStd-Regular } { },
    { hei  } { AdobeHeitiStd-Regular    } { },
    { kai  } { AdobeKaitiStd-Regular    } { }
  }
%    \end{macrocode}
% Fandol 字库。注意它是安装在 \TeX{} 发行版中的，所以使用文件名调用。
%    \begin{macrocode}
\clist_const:Nn \c_@@_cjk_font_fandol_clist
  {
    { main } { FandolSong }
      { Extension = .otf,
        UprightFont = *-Regular,
        BoldFont = *-Bold,
        ItalicFont = *-Regular,
        BoldItalicFont = *-Bold },
    { sans } { FandolHei }
      { Extension = .otf,
        UprightFont = *-Regular,
        BoldFont = *-Bold,
        ItalicFont = *-Regular,
        BoldItalicFont = *-Bold },
    { mono } { FandolFang }
      { Extension = .otf,
        UprightFont = *-Regular,
        BoldFont = *-Regular,
        ItalicFont = *-Regular,
        BoldItalicFont = *-Regular },
    { hei  } { FandolHei }
      { Extension = .otf,
        UprightFont = *-Regular,
        BoldFont = *-Bold,
        ItalicFont = *-Regular,
        BoldItalicFont = *-Bold },
    { kai  } { FandolKai }
      { Extension = .otf,
        UprightFont = *-Regular,
        BoldFont = *-Regular,
        ItalicFont = *-Regular,
        BoldItalicFont = *-Regular }
  }
%    \end{macrocode}
% 方正字库。虽然有粗体（方正小标宋）等，但并非免费，故这里不做处理。
%    \begin{macrocode}
\clist_const:Nn \c_@@_cjk_font_founder_clist
  {
    { main } { FZShuSong-Z01  } { },
    { sans } { FZHei-B01      } { },
    { mono } { FZFangSong-Z02 } { },
    { hei  } { FZHei-B01      } { },
    { kai  } { FZKai-Z03      } { }
  }
%    \end{macrocode}
% macOS 自带中文字体。
%    \begin{macrocode}
\clist_const:Nn \c_@@_cjk_font_mac_clist
  {
    { main } { STSongti-SC }
      { UprightFont = *-Light,
        BoldFont = *-Bold,
        ItalicFont = *-Light,
        BoldItalicFont = *-Bold },
    { sans } { STHeitiSC }
      { UprightFont = *-Medium,
        BoldFont = *-Medium,
        ItalicFont = *-Medium,
        BoldItalicFont = *-Medium },
    { mono } { STFangsong }  { },
    { hei  } { STHeitiSC }
      { UprightFont = *-Medium,
        BoldFont = *-Medium,
        ItalicFont = *-Medium,
        BoldItalicFont = *-Medium },
    { kai  } { STKaitiSC }
      { UprightFont = *-Regular,
        BoldFont = *-Bold,
        ItalicFont = *-Regular,
        BoldItalicFont = *-Bold }
  }
%    \end{macrocode}
% 华文字库。
%    \begin{macrocode}
\clist_const:Nn \c_@@_cjk_font_sinotype_clist
  {
    { main } { STSong     } { },
    { sans } { STHeiti    } { },
    { mono } { STFangsong } { },
    { hei  } { STHeiti    } { },
    { kai  } { STKaiti    } { }
  }
%    \end{macrocode}
% 思源宋体、思源黑体。由于没有对应的楷体和仿宋，这里直接给出警告。
%    \begin{macrocode}
\clist_const:Nn \c_@@_cjk_font_sourcehan_clist
  {
    { main } { Source~ Han~ Serif~ SC }
      { UprightFont = *-Regular,
        BoldFont = *-Bold,
        ItalicFont = *-Regular,
        BoldItalicFont = *-Bold },
    { sans } { Source~ Han~ Sans~ SC }
      { UprightFont = *-Regular,
        BoldFont = *-Bold,
        ItalicFont = *-Regular,
        BoldItalicFont = *-Bold }
  }
%    \end{macrocode}
% Windows 自带中文字体。
%    \begin{macrocode}
\clist_const:Nn \c_@@_cjk_font_windows_clist
  {
    { main } { SimSun   } { },
    { sans } { SimHei   } { },
    { mono } { FangSong } { },
    { hei  } { SimHei   } { },
    { kai  } { KaiTi    } { }
  }
%    \end{macrocode}
% \end{variable}
%
% \subsubsection{中文字体加载函数}
%
% \begin{macro}{\@@_load_cjk_font_by_family:nn,
% \@@_load_cjk_font_by_family:nnn,
% \@@_load_cjk_fontset:n}
% 中文字体通用加载函数
%    \begin{macrocode}
\cs_new_protected:Npn \@@_load_cjk_font_by_family:nn #1#2
  {
    \str_case:nnF {#1}
      {
        { main } { \@@_setCJKmainfont:xx   {#2} { \@@_cjk_font_options:     } }
        { sans } { \@@_setCJKsansfont:xx   {#2} { \@@_cjk_font_hei_options: } }
        { mono } { \@@_setCJKmonofont:xx   {#2} { \@@_cjk_font_options:     } }
        { hei  } { \@@_set_cjk_font_hei:xx {#2} { \@@_cjk_font_hei_options: } }
        { kai  } { \@@_set_cjk_font_kai:xx {#2} { \@@_cjk_font_options:     } }
      }
      { \msg_error:nnn { nwafuthesis } { unknown-cjk-family } {#1} }
  }
\cs_new_protected:Npn \@@_load_cjk_font_by_family:nnn #1#2#3
  {
    \@@_load_cjk_font_by_family:nn { #1 } { #2 }
  }
%    \end{macrocode}
% 定义报错信息
%    \begin{macrocode}
\msg_new:nnn { nwafuthesis } { unknown-cjk-family }
  { Unknown~ CJK~ font~ family~ "#1". }
%    \end{macrocode}
% 批量加载字体
%    \begin{macrocode}
\cs_new_protected:Npn \@@_load_cjk_fontset:n #1
  {
    \clist_map_inline:cn { c_@@_cjk_font_ #1 _clist }
      {
        \@@_load_cjk_font_by_family:nnn ##1
      }
    \str_if_eq:nnT {#1} { sourcehan }
      { \@@_warning:n { source-han } }
  }
%    \end{macrocode}
% 函数变体
%    \begin{macrocode}
\cs_generate_variant:Nn \@@_load_cjk_fontset:n { V }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{字体环境检查与加载}
%
% 探测操作系统，以设置中英文字体。
%    \begin{macrocode}
\tl_new:N \l_@@_font_tl
\tl_new:N \l_@@_cjkfont_tl
\cs_new_protected:Npn \@@_detect_platform:
  {
    \sys_if_platform_windows:TF
      {
        \tl_set:Nn \l_@@_cjkfont_tl { windows }
        \tl_set:Nn \l_@@_font_tl    { times*  }
      }
      {
        \@@_if_platform_macos:TF
          {
            \tl_set:Nn \l_@@_cjkfont_tl { mac    }
            \tl_set:Nn \l_@@_font_tl    { times* }
          }{
            \tl_set:Nn \l_@@_cjkfont_tl { fandol }
            \tl_set:Nn \l_@@_font_tl    { times  }
          }
      }
  }
\cs_new_protected:Npn \@@_if_platform_macos:TF
  { \file_if_exist:nTF { /System/Library/Fonts/Menlo.ttc } }
%    \end{macrocode}
%
% \begin{macro}{\@@_load_font:}
% 字体加载命令。
%    \begin{macrocode}
\cs_new_protected:Npn \@@_load_font:
  {
%    \end{macrocode}
% 如果用户未指定西文字体，则根据操作系统自动选择
%    \begin{macrocode}
    \tl_if_empty:NT \g_@@_fontset_tl
      {
        \@@_detect_platform:
        \tl_gset_eq:NN \g_@@_fontset_tl \l_@@_font_tl
      }
%    \end{macrocode}
% 如果用户未指定中文字体，则根据操作系统自动选择
%    \begin{macrocode}
    \tl_if_empty:NT \g_@@_cjk_fontset_tl
      {
        \@@_detect_platform:
        \tl_gset_eq:NN \g_@@_cjk_fontset_tl \l_@@_cjkfont_tl
      }
    \tl_set_eq:NN \l_@@_tmpa_tl { \g_@@_fontset_tl }
%    \end{macrocode}
% none 表示用户自行配置，跳过
%    \begin{macrocode}
    \tl_if_eq:VnTF \l_@@_tmpa_tl { none }
      { }
      {
%    \end{macrocode}
%
% \changes{v2.15}{2026/05/15}{修复asterisk未加下划线造成编译错误问题。}
%
% 处理 times* 中的星号（转换为 times_asterisk）
%    \begin{macrocode}
        \tl_replace_all:Nnn \l_@@_tmpa_tl { * } { _asterisk }
%    \end{macrocode}
% 加载西文字体
%    \begin{macrocode}
        \@@_load_fontset:V \l_@@_tmpa_tl
      }
    \tl_set_eq:NN \l_@@_tmpa_tl \g_@@_cjk_fontset_tl
%    \end{macrocode}
% none 表示用户自行配置，跳过
%    \begin{macrocode}
    \tl_if_eq:VnTF \l_@@_tmpa_tl { none }
      { }  % none 表示用户自行配置，跳过
      {
%    \end{macrocode}
% 加载中文字体
%    \begin{macrocode}
        \@@_load_cjk_fontset:n { \g_@@_cjk_fontset_tl }
      }
  }
\ctex_at_end_preamble:n { \@@_load_font: }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{数学字体设置}
%
% 根据 GB 3102.11--93 以及 ISO 80000-2:2009 的规定，数学表达式中
% 表示变量的拉丁字母和希腊字母均应当使用斜体。
% 这里的 |\keys_set:nn{unicode-math}| 实际相当于 \cs{unimathsetup}。
%    \begin{macrocode}
\keys_set:nn { unicode-math }
  {
    math-style = ISO,
    bold-style = ISO,
%   mathrm     = sym
  }
%    \end{macrocode}
%
% \subsubsection{字号}
%
%    \begin{macrocode}
\keys_define:nn { nwafu / style }
  {
%    \end{macrocode}
%
% \begin{macro}{style/font-size}
% |font-size| 不是文档类选项，不能传给 \cls{ctexbook} 文档类，因此
% 只能手动重定义字号命令。
%    \begin{macrocode}
    font-size .choice:,
    font-size .value_required:n = true,
    font-size / -4 .code:n = { },
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\tiny,\scriptsize,\footnotesize,\small,
%   \normalsize,\large,\Large,\LARGE,\huge,\Huge}
% 默认使用小四号字，所以只有五号字需要重新设置。
%    \begin{macrocode}
    font-size /  5 .code:n =
      {
        \RenewDocumentCommand \tiny         { } { \zihao {  7 } }
        \RenewDocumentCommand \scriptsize   { } { \zihao { -6 } }
        \RenewDocumentCommand \footnotesize { } { \zihao {  6 } }
        \RenewDocumentCommand \small        { } { \zihao { -5 } }
        \RenewDocumentCommand \normalsize   { } { \zihao {  5 } }
        \RenewDocumentCommand \large        { } { \zihao { -4 } }
        \RenewDocumentCommand \Large        { } { \zihao { -3 } }
        \RenewDocumentCommand \LARGE        { } { \zihao { -2 } }
        \RenewDocumentCommand \huge         { } { \zihao {  2 } }
        \RenewDocumentCommand \Huge         { } { \zihao {  1 } }
      },
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{其它设置}
%
% \begin{macro}{style/fullwidth-stop}
% 设置句号形状（圆圈或是圆点）。
%    \begin{macrocode}
    fullwidth-stop .choice:,
    fullwidth-stop .value_required:n = true,
%    \end{macrocode}
% 利用类别码机制切换，只有显式的\FSID 会被替换。
%    \begin{macrocode}
    fullwidth-stop / catcode .code:n =
      { \@@_set_fullwidth_stop_catcode: },
%    \end{macrocode}
% 利用 TECKit 映射机制切换，相当于设置了 \tn{defaultCJKfontfeatures}
% |{|\kvopt{Map\-ping}{fullwidth-stop}|}|。这种手段会替换所有出现的\FSID，
% 并且将影响所有字体。只在 \XeTeX{} 下可用。
%    \begin{macrocode}
    fullwidth-stop / mapping .code:n =
      {
        \sys_if_engine_xetex:TF
          {
            \clist_gset:Nn \g__xeCJK_default_features_clist
              { Mapping = fullwidth-stop }
          }
          {
%    \end{macrocode}
% \LuaTeX{} 下改用类别码机制代替，并给出警告。
%    \begin{macrocode}
            \sys_if_engine_luatex:T
              {
                \@@_warning:n { mapping-not-available }
                \@@_set_fullwidth_stop_catcode:
              }
          }
      },
    fullwidth-stop / false .code:n = { }
  }
%    \end{macrocode}
% \end{macro}
%
% 提示信息。
%    \begin{macrocode}
\@@_msg_new:nn { mapping-not-available }
  {
    Option~ "fullwidth-stop = mapping"~ is~ not~ available~ in~ LuaTeX. \\
    "fullwidth-stop = catcode"~ will~ be~ set~ instead.
  }
%    \end{macrocode}
%
% \begin{macro}{\@@_set_fullwidth_stop_catcode:}
% 将\FSID 设置为活动符，并定义为句点\FSFW。
%    \begin{macrocode}
\cs_new:Npn \@@_set_fullwidth_stop_catcode:
  {
    \char_set_active_eq:NN ^^^^3002 \c_@@_fwid_full_stop_tl
    \char_set_catcode_active:N ^^^^3002
    \clist_map_inline:nn
      { \c_@@_orig_decl_text_tl, \c_@@_auth_decl_text_tl }
      { \tl_set_rescan:Nno ##1 { } {##1} }
  }
%    \end{macrocode}
% \end{macro}
%
% \changes{v1.10}{2022/03/17}{允许 \tn{emph} 对中文生效。}
%
% 声明 \tn{emph} 样式序列，使得中文强调以楷体显示。
%    \begin{macrocode}
\DeclareEmphSequence
  {
    \bfseries,
    \upshape \CJKfamily { \CJKfamilydefault },
  }
%    \end{macrocode}
%
% \changes{v1.25}{2023/04/18}{添加盲审判断变量。}
%
% \subsection{是否盲审选项}
%
% \begin{macro}{anonymous}
% 设置是否为盲审论文输出。
%    \begin{macrocode}
\keys_define:nn { nwafu / style }
  {
    anonymous .bool_gset:N = \g_@@_anonymous_bool,
    anonymous .default:n  = true,
    anonymous .initial:n  = false,
  }
%    \end{macrocode}
% \end{macro}
%
% \subsection{页眉页脚}
%
% 清除默认页眉页脚格式。
%    \begin{macrocode}
\fancyhf { }
%    \end{macrocode}
%
% \begin{macro}{\@@_university_name:}
% 获取学校名称函数（考虑盲审）
%    \begin{macrocode}
\cs_new:Npn \@@_university_name:
  {
    \bool_if:NTF \g_@@_anonymous_bool
      { **************** }
      { \@@_name_simp: }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_thesis_type_name:}
% 获取论文类型名称（本科区分论文/设计）
%    \begin{macrocode}
\cs_new:Npn \@@_thesis_type_name:
  {
    \clist_item:Nn \c_@@_thesis_type_clist { \g_@@_thesis_type_int }
    \int_compare:nNnT { \g_@@_thesis_type_int } = { 3 }
      { \clist_item:Nn \c_@@_bachelor_type_clist { \l_@@_info_bachelor_type_int } }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_header_odd:}
% 奇数页页眉（章标题）
%    \begin{macrocode}
\cs_new:Npn \@@_header_odd:
  { \small \nouppercase { \leftmark } }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_header_even:}
% 偶数页页眉（学校+论文类型）
%    \begin{macrocode}
\cs_new:Npn \@@_header_even:
  {
    \small \nouppercase
      {
        \@@_university_name:
        \@@_thesis_type_name:
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_header_center:}
% 单面模式中间页眉
%    \begin{macrocode}
\cs_new:Npn \@@_header_center:
  { \small \nouppercase { \g_@@_header_center_mark_tl } }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_footer_page:}
% 页脚页码
%    \begin{macrocode}
\cs_new:Npn \@@_footer_page: { \small \thepage }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_set_headrule_front:,\@@_set_headrule_main:}
% 设置页面横线粗细（正文前/正文后）
%    \begin{macrocode}
\cs_new_protected:Npn \@@_set_headrule_front:
  { \RenewDocumentCommand \headrulewidth { } { 0.75 pt } }
\cs_new_protected:Npn \@@_set_headrule_main:
  { \RenewDocumentCommand \headrulewidth { } { 0.75 pt } }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_set_header_footer_twoside:}
% 统一页眉页脚设置（双面模式）
%    \begin{macrocode}
\cs_new_protected:Npn \@@_set_header_footer_twoside:
  {
    \nwafuhead[OC] { \@@_header_odd: }
    \nwafuhead[EC] { \@@_header_even: }
    \nwafufoot[C]  { \@@_footer_page: }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_set_header_footer_oneside:}
% 统一页眉页脚设置（单面模式）
%    \begin{macrocode}
\cs_new_protected:Npn \@@_set_header_footer_oneside:
  {
    \nwafuhead[C] { \@@_header_center: }
    \nwafufoot[C] { \@@_footer_page: }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_apply_header_footer:}
% 根据当前模式自动选择页眉页脚设置
%    \begin{macrocode}
\cs_new_protected:Npn \@@_apply_header_footer:
  {
    \bool_if:NTF \g_@@_twoside_bool
      { \@@_set_header_footer_twoside: }
      { \@@_set_header_footer_oneside: }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{variable}{\g_@@_header_center_mark_tl}
% 用于保存中间页眉文字的变量。正文中将其设置为空，目录、摘要、
% 插图与附表清单、符号表、术语表、
% 参考文献、附录、致谢、个人简历等设置为相应标题文字。
%    \begin{macrocode}
\tl_new:N \g_@@_header_center_mark_tl
%    \end{macrocode}
% \end{variable}
%
% \begin{macro}{\cleardoublepage}
% 重定义 \tn{cleardoublepage}，使得偶数页面在没有内容时不显示页眉页脚，见
% \url{https://tex.stackexchange.com/a/1683}。最后清空中间页眉，确保正文部分
% 页眉显示正确。
%    \begin{macrocode}
\RenewDocumentCommand \cleardoublepage { }
  {
    \clearpage
    \bool_if:NT \g_@@_twoside_bool
      {
        \int_if_odd:nF \c@page
          { \hbox:n { } \thispagestyle{ empty } \newpage }
      }
    \tl_gset:Nn \g_@@_header_center_mark_tl { }
  }
%    \end{macrocode}
% \end{macro}
%
% 为\pkg{ctex} 宏包使用 \opt{heading} 选项后，会把页面格式设置为 |headings|。
% 因此必须在 \pkg{ctex} 调用之后重新设置 \cs{pagestyle} 为 |fancy|。
%    \begin{macrocode}
\pagestyle { fancy }
%    \end{macrocode}
%
% \changes{v2.00}{2026/04/30}{恢复本科摘要、目录等页眉。}
% \changes{v2.00}{2026/05/06}{添加盲审校名匿名页眉。}
% \changes{v1.11}{2022/04/02}{删除本科目录页眉，并修正单面模式目录页眉。}
% \changes{v1.13}{2022/05/26}{删除本科页眉题目中的换行符。}
%
% \begin{macro}{\frontmatter,\mainmatter}
% 重定义 \tn{frontmatter}和\tn{mainmatter}，
% 根据学校要求定制摘要、目录、主要符号对照表等前置及下文部分的页眉页脚。
%    \begin{macrocode}
\cs_gset_eq:NN \nwafuhead \fancyhead
\cs_gset_eq:NN \nwafufoot \fancyfoot
%    \end{macrocode}
% 重定义 \tn{frontmatter}，带星号的命令不启用\cs{cleardoublepage}。
%    \begin{macrocode}
\RenewDocumentCommand{\frontmatter}{s O{Roman}}
  {
    \IfBooleanTF{#1}{\clearpage}{\cleardoublepage}
    \@mainmatterfalse
    \@@_set_headrule_front:
    \pagenumbering{#2}
    \@@_apply_header_footer:
  }
%    \end{macrocode}
% 重定义 \tn{mainmatter}，带星号的命令不会启用\cs{cleardoublepage}。
%    \begin{macrocode}
\RenewDocumentCommand{\mainmatter}{s}
  {
    \IfBooleanTF{#1}{\clearpage}{\cleardoublepage}
    \@mainmattertrue
    \pagenumbering{arabic}
    \@@_set_headrule_main:
    \@@_apply_header_footer:
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\bibmatter}
% 新定义 \cs{bibmatter}，以根据学校要求定制参考文献页眉页脚。
%    \begin{macrocode}
\NewDocumentCommand{\bibmatter}{s}
  {
    \IfBooleanTF{#1}{\clearpage}{\cleardoublepage}
    \@mainmattertrue
    \@@_apply_header_footer:
  }
%    \end{macrocode}
% \end{macro}

% \begin{macro}{\appendix,\backmatter}
% 为 \cs{appendix}和\cs{backmatter}命令追加代码，
% 以根据学校要求定制附录及后置(致谢、个人简历等)页眉页脚。
%    \begin{macrocode}
\@@_appto_cmd:Nn \appendix
  {
    \clearpage
    \bool_if:NTF \g_@@_twoside_bool
      {
        \nwafuhead[OC] { \small \nouppercase { \@chapapp } }
        \nwafuhead[EC] { \@@_header_even: }
      }{
        \nwafuhead[C]
          {
            \int_if_odd:nTF \c@page
              { \small \nouppercase { \@chapapp } }
              { \@@_header_even: }
          }
      }
  }

\@@_appto_cmd:Nn \backmatter
  {
    \clearpage
    \bool_if:NTF \g_@@_twoside_bool
      {
        \nwafuhead[OC] { \@@_header_odd: }
        \nwafuhead[EC] { \@@_header_even: }
      }{
        \nwafuhead[C]
          {
            \int_if_odd:nTF \c@page
              { \@@_header_odd: }
              { \@@_header_even: }
          }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsection{是否输出插图与附表清单}
%
% \changes{v2.00}{2026/04/29}{删除withchapter选项，将本科统一为章格式，添加figtabtoc选项，以判断是否输出插图和附表清单。}
% \begin{macro}{figtabtoc}
% 设置本科论文是否输出插图与附表清单。
%    \begin{macrocode}
\keys_define:nn { nwafu / style }
  {
    figtabtoc .bool_gset:N = \g_@@_figtabtoc_bool,
    figtabtoc .default:n  = true,
    figtabtoc .initial:n  = false,
  }
%    \end{macrocode}
% \end{macro}
%
% \subsection{是否预留签名位置}
%
% \begin{macro}{withsign}
% 设置是否预留下签名。
%    \begin{macrocode}
\keys_define:nn { nwafu / style }
  {
    withsign .bool_gset:N = \g_@@_withsignature_bool,
    withsign .default:n  = true,
    withsign .initial:n  = false,
  }
%    \end{macrocode}
% \end{macro}
%
% \changes{v2.00}{2026/04/29}{将本科统一为阿拉伯数字章编号。}
% \subsection{章节标题格式设置}
%
% \changes{v1.11}{2022/04/02}{修订本科subsubsection编号两端括号为中文全角括号。}
%
% |\keys_set:nn{ctex}| 实际相当于调用 \cs{ctexset}。
%
% 设置章（chapter）、节（section）与小节（sub-section）标题样式。
% 此处使用 \kvopt{fixskip}{true} 选项来抑制前后的多余间距。
%
% 设置标题级别
%    \begin{macrocode}
\cs_new_protected:Npn \@@_ctexset_caption:
  {
    \int_compare:nNnTF{ \g_@@_thesis_type_int } < { 3 }
      {
%    \end{macrocode}
% 研究生
%    \begin{macrocode}
        \keys_set:nn { ctex }
          {
            secnumdepth = 3,
            chapter =
              {
                pagestyle   = fancy,
                aftername   = \hspace*{1.0\ccwd},
                format      = \zihao{3} \normalfont \nwafu@hei \centering,
                beforeskip  = 0.50\baselineskip,
                afterskip   = 1.25\baselineskip,
                number      = \chinese{ chapter },
                fixskip     = true
              },
            section =
              {
                format      = \zihao{-3} \normalfont \nwafu@hei \raggedright,
                beforeskip  = 0.85\baselineskip,
                afterskip   = 0.80\baselineskip,
                fixskip     = true
              },
            subsection =
              {
                format      = \zihao{4} \normalfont \nwafu@hei \raggedright,
                beforeskip  = 0.80\baselineskip,
                fixskip     = true
              },
            subsubsection =
              {
                format      = \zihao{-4} \normalfont \nwafu@hei \raggedright,
                beforeskip  = 0.40\baselineskip,
                afterskip   = 0.40\baselineskip,
                fixskip     = true
              }
          }
      }{
%    \end{macrocode}
% 本科
%    \begin{macrocode}
        \keys_set:nn { ctex }
          {
            secnumdepth = 3,
            chapter =
              {
                pagestyle   = fancy,
                number = { \@@_arabic:n { chapter } },
                aftername   = \hspace*{\ccwd},
                format      = \zihao{3} \normalfont \nwafu@hei \centering,
                beforeskip  = 0.25\baselineskip,
                afterskip   = 0.65\baselineskip,
                fixskip     = true
              },
            section =
              {
                aftername   = \hspace*{0.5\ccwd},
                format      = \zihao{4} \normalfont \nwafu@hei \raggedright,
                beforeskip  = 0.60\baselineskip,
                afterskip   = 0.65\baselineskip,
                fixskip     = true,
                afterindent = true,
              },
            subsection =
              {
                aftername   = \hspace*{0.5\ccwd},
                format      = \zihao{-4} \normalfont \nwafu@hei ,
                beforeskip  = 0.60\baselineskip,
                afterskip   = 0.65\baselineskip,
                fixskip     = true,
                afterindent = true,
                % indent      = 2\ccwd,
              },
            subsubsection =
              {
                name        = {{\c_@@_fwid_left_paren_tl},{\c_@@_fwid_right_paren_tl}},
                aftername   = \hspace*{0.0pt},
                number      = \@@_arabic:n { subsubsection },
                format      = \zihao{-4} \normalfont,
                beforeskip  = 0.60\baselineskip,
                afterskip   = 0.65\baselineskip,
                fixskip     = true,
                % afterindent = true,
                indent      = 2\ccwd,
              }
          }
      }
  }
\@@_ctexset_caption:
%    \end{macrocode}
%
% \begin{macro}{\@@_chapter:n,\@@_chapter:V}
% 手动生成章标题，用于摘要、参考文献等。
%    \begin{macrocode}
\cs_new_protected:Npn \@@_chapter:n #1
  {
    \group_begin:
      \ctexset
        {
          chapter =
            {
              numbering  = false,
              beforeskip = 0.25\baselineskip,
              afterskip  = 0.65\baselineskip
            }
        }
      \chapter {#1}
      \@@_chapter_header:n {#1}
    \group_end:
  }
\cs_generate_variant:Nn \@@_chapter:n { V }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_chapter_no_toc:n,\@@_chapter_no_toc:V}
% 目录自身不应出现在目录中，需特别处理。参考
% \url{https://tex.stackexchange.com/a/1821}。
%    \begin{macrocode}
\cs_new_protected:Npn \@@_chapter_no_toc:n #1
  {
    \chapter *           {#1}
    \@@_chapter_header:n {#1}
    \pdfbookmark [0] {#1} { toc }
  }
\cs_generate_variant:Nn \@@_chapter_no_toc:n { V }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_chapter_header:n}
% 单面排版模式下，目录、摘要、符号表等的页眉中间为相应标题，左右为空。
%    \begin{macrocode}
\cs_new_protected:Npn \@@_chapter_header:n #1
  {
    \bool_if:NTF \g_@@_twoside_bool
      { \markboth {#1} {#1} }
      {
        \markboth { } { }
        \tl_gset:Nn \g_@@_header_center_mark_tl {#1}
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsection{脚注}
%
% \subsubsection{编号样式}
%
% 各种脚注编号样式的名称。
%    \begin{macrocode}
\clist_map_inline:nn
  {
    { plain            } { plain           },
    { libertinus       } { libertinus      },
    { libertinus_neg   } { libertinus*     },
    { libertinus_sans  } { libertinus-sans },
    { pifont           } { pifont          },
    { pifont_neg       } { pifont*         },
    { pifont_sans      } { pifont-sans     },
    { pifont_sans_neg  } { pifont-sans*    },
    { circled          } { circled         },
    { circled_neg      } { circled*        },
    { circled_sans     } { circled-sans    },
    { circled_sans_neg } { circled-sans*   },
    { xits             } { xits            },
    { xits_sans        } { xits-sans       },
    { xits_sans_neg    } { xits-sans*      }
  }
  { \@@_define_fn_style:nn #1 }
%    \end{macrocode}
%
% \begin{variable}{\l_@@_fn_style_tl}
% 保存当前使用的脚注编号样式。
%    \begin{macrocode}
\tl_new:N \l_@@_fn_style_tl
%    \end{macrocode}
% \end{variable}
%
%    \begin{macrocode}
\keys_define:nn { nwafu / style }
  {
%    \end{macrocode}
%
% \changes{v2.01}{2026/05/06}{添加带圈数字脚注选项。}
%
% \begin{macro}{style/footnote-style}
% 脚注类型共分四大类：
% \begin{itemize}
%   \item \opt{plain}：使用当前字体；
%   \item \opt{libertinus}：取自 Libertinus Serif 和 Libertinus Sans
%     字体；
%   \item \opt{pifont}：使用 \pkg{pifont} 宏包；
%   \item \opt{xits}：取自 XITS 字体。
% \end{itemize}
% 不带任何修饰的为衬线阳文符号，带“|sans|”的为无衬线符号，带“|*|”的
% 为阴文版本。
%    \begin{macrocode}
    footnote-style .choices:nn =
      {
        plain,
        libertinus, libertinus*, libertinus-sans,
        pifont,     pifont*,     pifont-sans,     pifont-sans*,
        circled,    circled*,    circled-sans,    circled-sans*,
        xits,                    xits-sans,       xits-sans*
      }
%    \end{macrocode}
% 若使用 \opt{pifont} 类型，则需引入 \pkg{pifont} 宏包。
%    \begin{macrocode}
      {
        \tl_gset_eq:NN \l_@@_fn_style_tl \l_keys_choice_tl
        \int_compare:nT { 5 <= \l_keys_choice_int <= 12 }
          { \RequirePackage { pifont } }
      },
    footnote-style .value_required:n = true
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_fn_symbol_libertinus:n}
% \opt{libertinus} 普通版。\numrange{1}{20} 为数字，\numrange{21}{46}
% 为小写英文字母，\numrange{47}{72} 为大写英文字母。
%    \begin{macrocode}
\cs_new:Npn \@@_fn_symbol_libertinus:n #1
  {
    \int_compare:nTF { #1 >= 21 }
      {
        \int_compare:nTF { #1 >= 47 }
          { \@@_symbol:n { \int_eval:n { "24B6 - 47 + #1 } } }
          { \@@_symbol:n { \int_eval:n { "24D0 - 21 + #1 } } }
      }
      { \@@_symbol:n { \int_eval:n { "2460 - 1 + #1 } } }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_fn_symbol_libertinus_neg:n}
% \opt{libertinus} 阴文衬线版。只含 \numrange{1}{20}。
%    \begin{macrocode}
\cs_new:Npn \@@_fn_symbol_libertinus_neg:n #1
  {
    \int_compare:nTF { #1 >= 11 }
      { \@@_symbol:n { \int_eval:n { "24EB - 11 + #1 } } }
      { \@@_symbol:n { \int_eval:n { "2776 -  1 + #1 } } }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_fn_symbol_libertinus_sans:n}
% \opt{libertinus} 阳文无衬线版。符号排列与普通版相同。
%    \begin{macrocode}
\cs_new_eq:NN \@@_fn_symbol_libertinus_sans:n \@@_fn_symbol_libertinus:n
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_fn_symbol_pifont:n}
% \opt{pifont} 普通版。以下四种都只包含 \numrange{1}{10}。
%    \begin{macrocode}
\cs_new:Npn \@@_fn_symbol_pifont:n #1
  { \ding { \int_eval:n { 171 + #1 } } }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_fn_symbol_pifont_neg:n}
% \opt{pifont} 阴文衬线版。
%    \begin{macrocode}
\cs_new:Npn \@@_fn_symbol_pifont_neg:n #1
  { \ding { \int_eval:n { 181 + #1 } } }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_fn_symbol_pifont_sans:n}
% \opt{pifont} 阳文无衬线版。
%    \begin{macrocode}
\cs_new:Npn \@@_fn_symbol_pifont_sans:n #1
  { \ding { \int_eval:n { 191 + #1 } } }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_fn_symbol_pifont_sans_neg:n}
% \opt{pifont} 阴文无衬线版。
%    \begin{macrocode}
\cs_new:Npn \@@_fn_symbol_pifont_sans_neg:n #1
  { \ding { \int_eval:n { 201 + #1 } } }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_fn_symbol_xits:n}
% \opt{xits} 普通版。\numrange{1}{9} 为数字，\numrange{10}{35}
% 为小写英文字母，\numrange{36}{61} 为大写英文字母。
%    \begin{macrocode}
\cs_new:Npn \@@_fn_symbol_xits:n #1
  {
    \int_compare:nTF { #1 >= 10 }
      {
        \int_compare:nTF { #1 >= 36 }
          { \@@_symbol:n { \int_eval:n { "24B6 - 36 + #1 } } }
          { \@@_symbol:n { \int_eval:n { "24D0 - 10 + #1 } } }
      }
      { \@@_symbol:n { \int_eval:n { "2460 - 1 + #1 } } }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_fn_symbol_xits_sans:n}
% \opt{xits} 阳文无衬线版。只包含 \numrange{1}{10}。
%    \begin{macrocode}
\cs_new:Npn \@@_fn_symbol_xits_sans:n #1
  { \@@_symbol:n { \int_eval:n { "2780 - 1 + #1 } } }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_fn_symbol_xits_sans_neg:n}
% \opt{xits} 阴文无衬线版。也只包含 \numrange{1}{10}。
%    \begin{macrocode}
\cs_new:Npn \@@_fn_symbol_xits_sans_neg:n #1
  { \@@_symbol:n { \int_eval:n { "278A - 1 + #1 } } }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_fn_symbol_circled:n}
% \opt{circled} 带圈数字阳文衬线版。只包含 \numrange{1}{10}。
% 超过10用普通数字，10及10以内用带圈数字 ①-⑩。
%    \begin{macrocode}
\cs_new:Npn \@@_fn_symbol_circled:n #1
  {
    \int_compare:nTF { #1 > 10 }
      { \@arabic{#1} }
      { \ding { \int_eval:n { 171 + #1 } } }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_fn_symbol_circled_neg:n}
% \opt{circled} 带圈数字阴文衬线版。只包含 \numrange{1}{10}。
% 超过10用普通数字，10及10以内用带圈数字 ①-⑩。
%    \begin{macrocode}
\cs_new:Npn \@@_fn_symbol_circled_neg:n #1
  {
    \int_compare:nTF { #1 > 10 }
      { \@arabic{#1} }
      { \ding { \int_eval:n { 181 + #1 } } }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_fn_symbol_circled_sans:n}
% \opt{circled} 带圈数字阳文无衬线版。只包含 \numrange{1}{10}。
% 超过10用普通数字，10及10以内用带圈数字 ①-⑩。
%    \begin{macrocode}
\cs_new:Npn \@@_fn_symbol_circled_sans:n #1
  {
    \int_compare:nTF { #1 > 10 }
      { \@arabic{#1} }
      { \ding { \int_eval:n { 191 + #1 } } }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_fn_symbol_circled_sans_neg:n}
% \opt{circled} 带圈数字阴文无衬线版。只包含 \numrange{1}{10}。
% 超过10用普通数字，10及10以内用带圈数字 ①-⑩。
%    \begin{macrocode}
\cs_new:Npn \@@_fn_symbol_circled_sans_neg:n #1
  {
    \int_compare:nTF { #1 > 10 }
      { \@arabic{#1} }
      { \ding { \int_eval:n { 201 + #1 } } }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\thefootnote}
% 重定义脚注编号。
%    \begin{macrocode}
\cs_set:Npn \thefootnote { \nwafu_footnote_number:N \c@footnote }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\nwafu_footnote_number:N}
% 脚注编号样式。
%    \begin{macrocode}
\cs_new:Npn \nwafu_footnote_number:N #1
  {
    \tl_case:NnF \l_@@_fn_style_tl
      {
%    \end{macrocode}
% \opt{plain} 类型直接使用计数器 |footnote| 的值。
%    \begin{macrocode}
        \c_@@_fn_style_plain_tl
          { \int_use:N #1 }
%    \end{macrocode}
% \opt{libertinus} 类型需要使用 Libertinus Serif 或
% Libertinus Sans 字体。
%    \begin{macrocode}
        \c_@@_fn_style_libertinus_tl
          {
            \fontspec { \g_@@_font_name_libertinus_serif_tl .otf }
            \@@_fn_symbol_libertinus:n {#1}
          }
        \c_@@_fn_style_libertinus_neg_tl
          {
            \fontspec { \g_@@_font_name_libertinus_serif_tl .otf }
            \@@_fn_symbol_libertinus_neg:n {#1}
          }
        \c_@@_fn_style_libertinus_sans_tl
          {
            \fontspec { \g_@@_font_name_libertinus_sans_tl .otf }
            \@@_fn_symbol_libertinus_sans:n {#1}
          }
%    \end{macrocode}
% \opt{pifont} 类型无需进行额外的操作。
%    \begin{macrocode}
        \c_@@_fn_style_pifont_tl
          { \@@_fn_symbol_pifont:n {#1} }
        \c_@@_fn_style_pifont_neg_tl
          { \@@_fn_symbol_pifont_neg:n {#1} }
        \c_@@_fn_style_pifont_sans_tl
          { \@@_fn_symbol_pifont_sans:n {#1} }
        \c_@@_fn_style_pifont_sans_neg_tl
          { \@@_fn_symbol_pifont_sans_neg:n {#1} }
%    \end{macrocode}
% \opt{pifont} 类型带圈数字，无需进行额外的操作。
%    \begin{macrocode}
        \c_@@_fn_style_circled_tl
          {
            \@@_fn_symbol_circled:n {#1}
          }
        \c_@@_fn_style_circled_neg_tl
          {
            \@@_fn_symbol_circled_neg:n {#1}
          }
        \c_@@_fn_style_circled_sans_tl
          {
            \@@_fn_symbol_circled_sans:n {#1}
          }
        \c_@@_fn_style_circled_sans_neg_tl
          {
            \@@_fn_symbol_circled_sans_neg:n {#1}
          }
%    \end{macrocode}
% \opt{xits} 类型需要临时切换数学字体。
%    \begin{macrocode}
        \c_@@_fn_style_xits_tl
          {
            \fontspec { \g_@@_font_name_xits_tl .otf }
            \@@_fn_symbol_xits:n {#1}
          }
        \c_@@_fn_style_xits_sans_tl
          {
            \fontspec { \g_@@_font_name_xits_tl .otf }
            \@@_fn_symbol_xits_sans:n {#1}
          }
        \c_@@_fn_style_xits_sans_neg_tl
          {
            \fontspec { \g_@@_font_name_xits_tl .otf }
            \@@_fn_symbol_xits_sans_neg:n {#1}
          }
      }
%    \end{macrocode}
% 变量 \cs{l_@@_fn_style_tl} 保存的类型未知时，默认使用 \opt{plain}
% 类型。
%    \begin{macrocode}
      { \int_use:N #1 }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{整体样式}
%
% \begin{macro}[int]{\@makefntext}
% 重定义内部脚注文字命令，使脚注编号不使用上标，宽度为 \SI{1.5}{em}。
% 见 \url{http://tex.stackexchange.com/q/19844} 和
% \url{https://www.zhihu.com/question/53030087}。
%    \begin{macrocode}
\cs_set:Npn \@makefntext #1
  {
    \mode_leave_vertical:
    \hbox_to_wd:nn { 1.5 em } { \@thefnmark \hfil }
    #1
  }
%    \end{macrocode}
% \end{macro}
%
% \subsection{定理环境}
%
% \begin{variable}{\c_@@_thm_style_plain_clist,
%   \c_@@_thm_style_break_clist}
% 保存 \opt{plain}、\opt{break} 两种类型的定理样式名称。
%    \begin{macrocode}
\clist_const:Nn \c_@@_thm_style_plain_clist
  { plain, margin, change }
\clist_const:Nn \c_@@_thm_style_break_clist
  { break, marginbreak, changebreak }
%    \end{macrocode}
% \end{variable}
%
% \begin{variable}{\l_@@_thm_style_tl,
%   \l_@@_thm_header_font_tl,
%   \l_@@_thm_body_font_tl,
%   \l_@@_thm_qed_tl,
%   \l_@@_thm_counter_tl}
% 定理所需的一些字段。
%    \begin{macrocode}
\tl_new:N \l_@@_thm_style_tl
\tl_new:N \l_@@_thm_header_font_tl
\tl_new:N \l_@@_thm_body_font_tl
\tl_new:N \l_@@_thm_qed_tl
\tl_new:N \l_@@_thm_counter_tl
%    \end{macrocode}
% \end{variable}
%
% \begin{macro}{theorem/style,
%   theorem/header-font,
%   theorem/body-font,
%   theorem/qed,
%   theorem/counter}
% 定义 |nwafu/theorem| 键值类。
%    \begin{macrocode}
\keys_define:nn { nwafu / theorem }
  {
    style       .tl_set:N  = \l_@@_thm_style_tl,
    header-font .tl_set:N  = \l_@@_thm_header_font_tl,
    body-font   .tl_set:N  = \l_@@_thm_body_font_tl,
    qed         .tl_set:N  = \l_@@_thm_qed_tl,
    counter     .tl_set:N  = \l_@@_thm_counter_tl
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_thm_ntheorem_style:n,\@@_thm_ntheorem_new:w}
% 拷贝 \pkg{ntheorem} 命令。
%    \begin{macrocode}
\cs_new_eq:NN \@@_thm_ntheorem_style:n \theoremstyle
\cs_new_eq:NN \@@_thm_ntheorem_new:w   \newtheorem
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\newtheorem}
% 定义新的定理环境。
%    \begin{macrocode}
\RenewDocumentCommand \newtheorem { s o m m }
  {
%    \end{macrocode}
% 默认情况下，由 \cs{newtheorem*} 创建的定理其证毕符号为 \cs{QED}，
% 而由 \cs{new\-the\-orem} 创建的则不带证毕符号。符号 \cs{QED} 由
% \pkg{unicode-math} 宏包提供。
%    \begin{macrocode}
    \IfBooleanTF {#1}
      { \tl_set:Nn \l_@@_thm_qed_tl { \ensuremath { \QED } } }
      { \tl_set:Nn \l_@@_thm_qed_tl { } }
%    \end{macrocode}
% 设置默认样式为 \opt{plain}。
%    \begin{macrocode}
    \tl_set:Nn \l_@@_thm_style_tl { plain }
%    \end{macrocode}
% 处理可选参数。利用 |nwafu/theorem| 键值对设置，并按此修改证毕符号、
% 定理头字体和定理正文字体。
%    \begin{macrocode}
    \IfValueT {#2} { \keys_set:nn { nwafu / theorem } {#2} }
    \nwafu_thm_set_header_font:V \l_@@_thm_header_font_tl
    \nwafu_thm_set_body_font:V   \l_@@_thm_body_font_tl
    \nwafu_thm_set_qed:V         \l_@@_thm_qed_tl
%    \end{macrocode}
% \cs{newtheorem} 负责创建编号定理，而 \cs{newtheorem*}
% 则负责创建无编号定理。以下分这两种情况处理。
%    \begin{macrocode}
    \IfBooleanTF {#1}
      {
%    \end{macrocode}
% 带 |*| 的版本原则上只接受 \opt{plain} 和 \opt{break} 两种样式，
% 其余样式将被转换成这两者其中之一。
%    \begin{macrocode}
        \clist_if_in:nVF { plain, break } \l_@@_thm_style_tl
          {
            \clist_if_in:NVTF
              \c_@@_thm_style_plain_clist \l_@@_thm_style_tl
              { \@@_thm_redefine_style:n { plain } }
              {
                \clist_if_in:NVTF
                  \c_@@_thm_style_break_clist \l_@@_thm_style_tl
                  { \@@_thm_redefine_style:n { break } }
                  {
                    \@@_error:nx { unknown-theorem-style }
                      { \l_@@_thm_style_tl }
                  }
              }
          }
%    \end{macrocode}
% \pkg{ntheorem} 宏包提供的无编号定理带有 |nonumber| 前缀，
% 这里将其加上。
%    \begin{macrocode}
        \tl_put_left:Nn \l_@@_thm_style_tl { nonumber }
        \nwafu_thm_new_no_number:Vxx \l_@@_thm_style_tl {#3} {#4}
      }
      {
%    \end{macrocode}
% 不带 |*| 的版本支持不含“|nonumber|”的所有定理样式。
%    \begin{macrocode}
        \clist_clear:N \l_@@_tmpa_clist
        \clist_concat:NNN \l_@@_tmpa_clist
          \c_@@_thm_style_plain_clist \c_@@_thm_style_break_clist
        \clist_if_in:NVF \l_@@_tmpa_clist \l_@@_thm_style_tl
          {
            \@@_error:nx { unknown-theorem-style }
              { \l_@@_thm_style_tl }
          }
        \nwafu_thm_new:VVxx \l_@@_thm_style_tl \l_@@_thm_counter_tl
          {#3} {#4}
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_thm_redefine_style:n}
% 重定义定理样式，并给出警告。
%    \begin{macrocode}
\cs_new:Npn \@@_thm_redefine_style:n #1
  {
    \@@_warning:nxx { redefine-theorem-style }
      {#1} { \l_@@_thm_style_tl }
    \tl_set:Nn \l_@@_thm_style_tl {#1}
  }
%    \end{macrocode}
% \end{macro}
%
% 提示信息。
%    \begin{macrocode}
\@@_msg_new:nn { redefine-theorem-style }
  { Theorem~ style~ "#2"~ will~ be~ redefined~ as~ "#1". }
\@@_msg_new:nn { unknown-theorem-style }
  { Theorem~ style~ "#1"~ is~ unknown. }
%    \end{macrocode}
%
% \begin{macro}{\nwafu_thm_new:nnnn,\nwafu_thm_new:VVxx}
% 带编号的定理环境。
% \begin{arguments}
%   \item 样式
%   \item 计数器
%   \item 定理环境名称
%   \item 定理头文字
% \end{arguments}
%    \begin{macrocode}
\cs_new:Npn \nwafu_thm_new:nnnn #1#2#3#4
  {
    \@@_thm_ntheorem_style:n {#1}
    \@@_thm_ntheorem_new:w   {#3} {#4} [#2]
  }
\cs_generate_variant:Nn \nwafu_thm_new:nnnn { VVxx }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\nwafu_thm_new_no_number:nnn,
%   \nwafu_thm_new_no_number:Vxx}
% 不带编号的定理环境。
% \begin{arguments}
%   \item 样式
%   \item 定理环境名称
%   \item 定理头文字
% \end{arguments}
%    \begin{macrocode}
\cs_new:Npn \nwafu_thm_new_no_number:nnn #1#2#3
  {
    \@@_thm_ntheorem_style:n {#1}
    \@@_thm_ntheorem_new:w   {#2} {#3}
  }
\cs_generate_variant:Nn \nwafu_thm_new_no_number:nnn { Vxx }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\nwafu_thm_set_qed:n,
%   \nwafu_thm_set_header_font:n,
%   \nwafu_thm_set_body_font:n,
%   \nwafu_thm_set_qed:V,
%   \nwafu_thm_set_header_font:V,
%   \nwafu_thm_set_body_font:V}
% 封装 \pkg{ntheorem} 宏包提供的若干命令，分别用以设置证毕符号、
% 定理头字体和定理正文字体。
%    \begin{macrocode}
\cs_new:Npn \nwafu_thm_set_qed:n         #1 { \theoremsymbol     {#1} }
\cs_new:Npn \nwafu_thm_set_header_font:n #1 { \theoremheaderfont {#1} }
\cs_new:Npn \nwafu_thm_set_body_font:n   #1 { \theorembodyfont   {#1} }
\cs_generate_variant:Nn \nwafu_thm_set_qed:n         { V }
\cs_generate_variant:Nn \nwafu_thm_set_header_font:n { V }
\cs_generate_variant:Nn \nwafu_thm_set_body_font:n   { V }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\theequation}
% 重定义公式编号。
%    \begin{macrocode}
\cs_set:Npn \theequation
  { \thechapter - \@@_arabic:n { equation } }
%    \end{macrocode}
% \end{macro}
%
% \changes{v2.12}{2026/05/10}{按2026年研究生撰写规范修订研究模板封面。区分学术和专业学位类型类型。}
%
% \subsection{封面}
%
% \subsubsection{信息录入}

% \changes{v2.00}{2026/04/29}{添加本科申请学位类别记录变量。}
%
% \begin{variable}{\l_@@_info_title_tl,
%   \l_@@_info_date_tl,
%   \l_@@_info_grade_tl,
%   \l_@@_info_enroll_tl,
%   \l_@@_info_author_tl,
%   \l_@@_info_supervisor_tl,
%   \l_@@_info_cosupervisor_tl,
%   \l_@@_info_department_tl,
%   \l_@@_info_major_tl,
%   \l_@@_info_bachelor_title_tl,
%   \l_@@_info_researchfield_tl,
%   \l_@@_info_engineering_title_tl,
%   \l_@@_info_engineeringfield_tl,
%   \l_@@_info_class_id_tl,
%   \l_@@_info_student_id_tl,
%   \l_@@_info_school_id_tl,
%   \l_@@_info_clc_tl,
%   \l_@@_info_defensedate_tl,
%   \l_@@_info_instructors_clist,
%   \l_@@_info_defensecommittees_clist,
%   \l_@@_info_foundation_clist}
% 封面所需的字段。
%    \begin{macrocode}
\clist_map_inline:nn
  {
    title, date, grade, enroll, author, supervisor, cosupervisor,
    department, major, bachelor_title, researchfield, engineering_title, engineeringfield,
    class_id, student_id, school_id, clc, defensedate, udc
  }
  { \tl_new:c { l_@@_info_ #1 _tl } }
\clist_new:N \l_@@_info_instructors_clist
\clist_new:N \l_@@_info_defensecommittees_clist
\clist_new:N \l_@@_info_foundation_clist
%    \end{macrocode}
% \end{variable}
%
% \begin{variable}{\l_@@_info_title_en_tl,
%   \l_@@_info_author_en_tl,
%   \l_@@_info_supervisor_en_tl,
%   \l_@@_info_cosupervisor_en_tl,
%   \l_@@_info_department_en_tl,
%   \l_@@_info_major_en_tl,
%   \l_@@_info_mastertype_en_tl,
%   \l_@@_info_researchfield_en_tl,
%   \l_@@_info_engineering_title_en_tl,
%   \l_@@_info_engineeringfield_en_tl,
%   \l_@@_info_date_en_tl}
% 对应的英文字段。
%    \begin{macrocode}
\clist_map_inline:nn
  { title, author, supervisor, cosupervisor, department,
    major, mastertype, researchfield, engineering_title, engineeringfield,date }
  { \tl_new:c { l_@@_info_ #1 _en_tl } }
%    \end{macrocode}
% \end{variable}
%
% \begin{variable}{\l_@@_info_postgraduate_type_int}
% 学位类型。1 为学术学位，2 为专业学位。仅对研究生有效。
%    \begin{macrocode}
\int_new:N \l_@@_info_postgraduate_type_int
%    \end{macrocode}
% \end{variable}
%
% \begin{variable}{\l_@@_info_bachelor_type_int}
% 本科毕业类型。1 为论文，2 为设计。仅对本科有效。
%    \begin{macrocode}
\int_new:N \l_@@_info_bachelor_type_int
%    \end{macrocode}
% \end{variable}
%
% 定义 |nwafu/info| 键值类。
%    \begin{macrocode}
\keys_define:nn { nwafu / info }
  {
%    \end{macrocode}
%
% \changes{v2.02}{2026/05/09}{将学位类型选项名称修改为ptype，将professional选项值修改为engineering。}
%
% \begin{macro}{info/ptype}
% 学位类型。只对研究生论文有效。
%    \begin{macrocode}
    ptype      .choices:nn  =
      { academic, engineering }
      { \int_set_eq:NN \l_@@_info_postgraduate_type_int \l_keys_choice_int },
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/btype}
% 本科毕业类型。仅对本科有效。
%    \begin{macrocode}
    btype      .choice:,
    btype      .value_required:n = true,
    btype      .choices:nn  =
      { paper, design }
      { \int_set_eq:NN \l_@@_info_bachelor_type_int \l_keys_choice_int },
    btype      .initial:n = paper,
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/title,info/title*}
% 论文题目。以下带星号的项目均表示相应的英文字段。
%    \begin{macrocode}
    title       .tl_set:N    = \l_@@_info_title_tl,
    title*      .tl_set:N    = \l_@@_info_title_en_tl,
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/date, info/date*}
% 论文完成日期。
%    \begin{macrocode}
    date        .tl_set:N    = \l_@@_info_date_tl,
    date*       .tl_set:N    = \l_@@_info_date_en_tl,
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/grade}
% 毕业年份(届)。
%    \begin{macrocode}
    grade        .tl_set:N    = \l_@@_info_grade_tl,
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/enroll}
% 入学年份(级)。
%    \begin{macrocode}
    enroll        .tl_set:N    = \l_@@_info_enroll_tl,
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/author,info/author*}
% 作者姓名。
%    \begin{macrocode}
    author      .tl_set:N    = \l_@@_info_author_tl,
    author*     .tl_set:N    = \l_@@_info_author_en_tl,
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/supervisor,info/supervisor*}
% 导师姓名。
%    \begin{macrocode}
    supervisor  .tl_set:N    = \l_@@_info_supervisor_tl,
    supervisor* .tl_set:N    = \l_@@_info_supervisor_en_tl,
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/cosupervisor, info/cosupervisor*}
% 协助指导教师。
%    \begin{macrocode}
    cosupervisor        .tl_set:N    = \l_@@_info_cosupervisor_tl,
    cosupervisor*       .tl_set:N    = \l_@@_info_cosupervisor_en_tl,
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/instructors}
% 指导小组成员。
%    \begin{macrocode}
    instructors .clist_set:N = \l_@@_info_instructors_clist,
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/defensecommittees}
% 答辩委员会成员，每个成员包含单位、姓名、职称。仅研究生需要。
%    \begin{macrocode}
    defensecommittees .clist_set:N = \l_@@_info_defensecommittees_clist,
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/defensedate}
% 论文答辩日期。
%    \begin{macrocode}
    defensedate        .tl_set:N    = \l_@@_info_defensedate_tl,
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/foundation}
% 资助项目，每个项目包含项目类型、项目名称、项目编号。
%    \begin{macrocode}
    foundation .clist_set:N = \l_@@_info_foundation_clist,
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/department,info/department*}
% 院系。
%    \begin{macrocode}
    department  .tl_set:N    = \l_@@_info_department_tl,
    department* .tl_set:N    = \l_@@_info_department_en_tl,
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/major,info/major*}
% 专业。
%    \begin{macrocode}
    major       .tl_set:N    = \l_@@_info_major_tl,
    major*      .tl_set:N    = \l_@@_info_major_en_tl,
%    \end{macrocode}
% \end{macro}
%
% \changes{v2.02}{2026/05/09}{将本科生申请学科类别选项名称修改为\opt{btitle}。}
% \changes{v2.00}{2026/04/29}{添加本科申请学位类别选项。}
%
% \begin{macro}{info/btitle}
% 学士学位类型名称(农学、工学、理学、法学、文学、管理学等)，仅本科需要。
%    \begin{macrocode}
    btitle .tl_set:N    = \l_@@_info_bachelor_title_tl,
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/mastertype}
% 学位类型英文名称(现区分学博与专博，但考虑接口稳定性，暂不修改)。
%    \begin{macrocode}
    mastertype .tl_set:N    = \l_@@_info_mastertype_en_tl,
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/researchfield,info/researchfield*}
% 研究方向，仅博士、学历硕士需要。
%    \begin{macrocode}
    researchfield  .tl_set:N    = \l_@@_info_researchfield_tl,
    researchfield* .tl_set:N    = \l_@@_info_researchfield_en_tl,
%    \end{macrocode}
% \end{macro}
%
% \changes{v2.02}{2026/05/09}{将专业学位类型选项名称修改为\opt{engtitle}。}
%
% \begin{macro}{info/engtitle,info/engtitle*}
% 专业学位类型，仅专业学位研究生需要。
%    \begin{macrocode}
    engtitle  .tl_set:N    = \l_@@_info_engineering_title_tl,
    engtitle* .tl_set:N    = \l_@@_info_engineering_title_en_tl,
%    \end{macrocode}
% \end{macro}
%
% \changes{v2.02}{2026/05/09}{将专业学位领域选项名称修改为\opt{engfield}。}
%
% \begin{macro}{info/engfield,info/engfield*}
% 领域名称，仅专业学位研究生需要。
%    \begin{macrocode}
    engfield  .tl_set:N    = \l_@@_info_engineeringfield_tl,
    engfield* .tl_set:N    = \l_@@_info_engineeringfield_en_tl,
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/class-id}
% 班级号。仅本科需要
%    \begin{macrocode}
    class-id  .tl_set:N    = \l_@@_info_class_id_tl,
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/student-id}
% 学号。
%    \begin{macrocode}
    student-id  .tl_set:N    = \l_@@_info_student_id_tl,
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/school-id}
% 学校代码。
%    \begin{macrocode}
    school-id   .tl_set:N    = \l_@@_info_school_id_tl,
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/clc}
% 中图分类号。
%    \begin{macrocode}
    clc         .tl_set:N    = \l_@@_info_clc_tl,
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/udc}
% UDC码。
%    \begin{macrocode}
    udc         .tl_set:N    = \l_@@_info_udc_tl,
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{variable}{\l_@@_cover_logo_tl,\l_@@_cover_logo_size_clist}
%    \begin{macrocode}
\tl_new:N    \l_@@_cover_logo_tl
\clist_new:N \l_@@_cover_logo_size_clist
%    \end{macrocode}
% \end{variable}
%
% \begin{macro}{style/logo,style/logo-size}
% 校名图片的文件名和尺寸。
%    \begin{macrocode}
\keys_define:nn { nwafu / style }
  {
    logo      .tl_set:N    = \l_@@_cover_logo_tl,
    logo-size .clist_set:N = \l_@@_cover_logo_size_clist
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{密级}
%
% \begin{variable}{\l_@@_info_secret_level_tl}
% 保存当前的密级。
%    \begin{macrocode}
\tl_new:N \l_@@_info_secret_level_tl
%    \end{macrocode}
% \end{variable}
%
%    \begin{macrocode}
\keys_define:nn { nwafu / info }
  {
%    \end{macrocode}
%
% \begin{macro}{info/secret-level}
% 密级。\opt{none} 表示公开，\opt{i}和\opt{ii}分别为限制和秘密。
%    \begin{macrocode}
    secret-level .choice:,
    secret-level .value_required:n = true,
    secret-level .choices:nn  =
      { none, i, ii }
      {
        \tl_set:Nx \l_@@_info_secret_level_tl
          {
            \clist_item:Nn \c_@@_secret_clist { \l_keys_choice_int }
          }
      },
    secret-level .initial:n = none,
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{内部函数}
%
% \begin{macro}{\@@_spread_box:nn,\@@_spread_box:Vn,\@@_spread_box:nV}
% 分散对齐的水平盒子。
% \begin{arguments}
%   \item 宽度
%   \item 内容
% \end{arguments}
% 利用 \cs{tl_map_inline:nn} 在字符间插入 \tn{hfil}；紧随其后的 \tn{unskip}
% 将会去掉最后一个 \tn{hfil}。见 \url{https://tex.stackexchange.com/q/169689}。
% |#2| 需要完全展开以避免 underfull 警告。
%    \begin{macrocode}
\cs_new_protected:Npn \@@_spread_box:nn #1#2
  {
    \mode_leave_vertical:
    \hbox_to_wd:nn {#1}
      { \tl_map_inline:xn {#2} { ##1 \hfil } \unskip }
  }
\cs_generate_variant:Nn \@@_spread_box:nn  { Vn }
\cs_generate_variant:Nn \@@_spread_box:nn  { nV }
%    \end{macrocode}
% \end{macro}
%
% \changes{v2.00}{2026/04/29}{添加下划线居中盒子函数。}
%
% \begin{macro}{\@@_center_box:nn,\@@_center_box:Vn}
% 居中对齐的水平盒子。
%    \begin{macrocode}
\cs_new_protected:Npn \@@_center_box:nn #1#2
  {
    \mode_leave_vertical:
    \dim_set:Nn \l_@@_tmpt_dim {#1}
    \dim_add:Nn \l_@@_tmpt_dim {0.6em}
    \hbox_to_wd:nn {\l_@@_tmpt_dim} { \hfil #2 \hfil }
  }
\cs_generate_variant:Nn \@@_center_box:nn  { Vn }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_center_box_uline:nn,\@@_center_box_uline:Vn}
% 居中对齐的下划线水平盒子。
%    \begin{macrocode}
\cs_new_protected:Npn \@@_center_box_uline:nn #1#2
  {
    \mode_leave_vertical:
    \dim_set:Nn \l_@@_tmpt_dim {#1}
    \dim_add:Nn \l_@@_tmpt_dim {0.6em}
    \makebox[0cm][l]{\rule[-0.5ex]{\l_@@_tmpt_dim}{0.4 pt}}
    \hbox_to_wd:nn {\l_@@_tmpt_dim} { \hfil #2 \hfil }
  }
\cs_generate_variant:Nn \@@_center_box_uline:nn  { Vn }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_fixed_width_box:nn,\@@_fixed_width_box:Vn}
% 限宽盒子（允许换行）。
%    \begin{macrocode}
\cs_new:Npn \@@_fixed_width_box:nn #1#2
  { \parbox {#1} {#2} }
\cs_generate_variant:Nn \@@_fixed_width_box:nn  { Vn }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_fixed_width_center_box:nn}
% 居中对齐的限宽盒子（允许换行）。
%    \begin{macrocode}
\cs_new:Npn \@@_fixed_width_center_box:nn #1#2
  { \parbox {#1} { \centering #2 } }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_get_text_width:Nn,\@@_get_text_width:NV}
% 获取文本宽度，并存入 |dim| 型变量。
% \begin{arguments}
%   \item |dim| 型变量
%   \item 内容
% \end{arguments}
%    \begin{macrocode}
\cs_new:Npn \@@_get_text_width:Nn #1#2
  {
    \hbox_set:Nn \l_@@_tmpa_box {#2}
    \dim_set:Nn #1 { \box_wd:N \l_@@_tmpa_box }
  }
\cs_generate_variant:Nn \@@_get_text_width:Nn { NV }
\cs_generate_variant:Nn \@@_get_text_width:Nn { Nx }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_get_max_text_width:NN}
% 获取多个文本中的最大宽度，并存入 |dim| 型变量。
% \begin{arguments}
%   \item |dim| 型变量
%   \item 文本 |clist|
% \end{arguments}
% 当 \cs{l_@@_tmpa_clist} 非空时，弹出最后一个元素
% 赋给 \cs{l_@@_tmpa_tl}，获取其长度后与 |#1| 进行比较，
% 二者中较大的那一个将成为 |#1| 的新值。
% 不断循环，直至 \cs{l_@@_tmpa_clist} 为空。
%    \begin{macrocode}
\cs_new:Npn \@@_get_max_text_width:NN #1#2
  {
%    \end{macrocode}
% 这里用 |group| 确保局部变量不会被污染。
%    \begin{macrocode}
    \group_begin:
      \dim_set:Nn #1 {-999pt}
      \clist_set_eq:NN \l_@@_tmpt_clist #2
      \bool_until_do:nn { \clist_if_empty_p:N \l_@@_tmpt_clist }
        {
          \clist_pop:NN \l_@@_tmpt_clist \l_@@_tmpt_tl
          \@@_get_text_width:NV \l_@@_tmpt_dim \l_@@_tmpt_tl
          \dim_gset:Nn #1 { \dim_max:nn {#1} { \l_@@_tmpt_dim } }
        }
    \group_end:
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_blank_underline:n}
% 下划线占位符。|#1|: 长度。
%    \begin{macrocode}
\cs_new:Npn \@@_blank_underline:n #1
  { \rule [ -0.5 ex ] {#1} { 0.4 pt } }
\cs_generate_variant:Nn \@@_blank_underline:n { V }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_text_uline:n,\@@_text_uline:V}
% 下划线文字。|#1|: 文字。
%    \begin{macrocode}
\cs_new:Npn \@@_text_uline:n #1
  {
    \@@_get_text_width:Nn \l_@@_tmpt_dim {#1}
    \dim_add:Nn \l_@@_tmpt_dim {0.6em}
    \makebox[0cm][l]{\rule[-0.5ex]{\l_@@_tmpt_dim}{0.4 pt}}
      \rule{.3em}{0cm}#1\rule{.3em}{0cm}
  }
\cs_generate_variant:Nn \@@_text_uline:n { V }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_line_spread:N,\@@_line_spread:n}
% 设置行距。|#1|: 行距倍数 |fp| 变量。
%    \begin{macrocode}
\cs_new:Npn \@@_line_spread:N #1
  { \linespread { \fp_use:N #1 } \selectfont }
\cs_new:Npn \@@_line_spread:n #1
  { \linespread {#1} \selectfont }
%    \end{macrocode}
% \end{macro}
%
% \changes{v2.00}{2026/05/06}{添加学校名称动态宏。}
%
% \begin{macro}{\@@_name_simp:,\@@_name_trad:,\@@_name_en:}
% 学校名称动态宏，根据是否盲审确定是否进行匿名处理。
%    \begin{macrocode}
\cs_new:Npn \@@_name_simp:
  {
    \bool_if:NTF \g_@@_anonymous_bool
      { **************** }
      { 西北农林科技大学 }
  }
\cs_new:Npn \@@_name_trad:
  {
    \bool_if:NTF \g_@@_anonymous_bool
      { **************** }
      { 西北農林科技大學 }
  }
\cs_new:Npn \@@_name_en:
  {
    \bool_if:NTF \g_@@_anonymous_bool
      { ********************* }
      { Northwest~ A\&F~ University }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{字段元素元数据列表}
%
% \changes{v2.02}{2026/05/08}{添加封面信息字段元数据定义。}
%
% 字段描述符格式：|{|标签宏|}{|内容宏|}{|盲审隐藏标记|}{|特殊处理标记|}|\par
% 特殊处理标记：0=普通, 1=导师(需格式化), 2=合作导师/指导小组(需格式化+空值跳过检查), 3=日期等非隐藏字段\par
% \begin{variable}{\c_@@_cover_brief_doctor_academic_clist,
% \c_@@_cover_brief_doctor_engineering_clist,
% \c_@@_cover_brief_master_academic_clist,
% \c_@@_cover_brief_master_engineering_clist,
% \c_@@_cover_brief_bachelor_clist}
% 学术博士学位论文封面简要作者信息元数据列表：
%    \begin{macrocode}
\clist_const:Nn \c_@@_cover_brief_doctor_academic_clist
  {
    { \c_@@_name_authorbrief_tl  } { \l_@@_info_author_tl     } { 1 } { 0 },
    { \c_@@_name_supervisor_tl   } { \l_@@_info_supervisor_tl } { 1 } { 1 }
  }
%    \end{macrocode}
% 专业学位博士学位论文封面简要作者信息元数据列表：
%    \begin{macrocode}
\clist_const:Nn \c_@@_cover_brief_doctor_engineering_clist
  {
    { \c_@@_name_authorbrief_tl  } { \l_@@_info_author_tl     } { 1 } { 0 },
    { \c_@@_name_supervisor_tl   } { \l_@@_info_supervisor_tl } { 1 } { 1 }
  }
%    \end{macrocode}
% 学术硕士学位论文封面简要作者信息元数据列表：
%    \begin{macrocode}
\clist_const:Nn \c_@@_cover_brief_master_academic_clist
  {
    { \c_@@_name_authorbrief_tl  } { \l_@@_info_author_tl     } { 1 } { 0 },
    { \c_@@_name_supervisor_tl   } { \l_@@_info_supervisor_tl } { 1 } { 1 }
  }
%    \end{macrocode}
% 专业学位硕士学位论文封面简要作者信息元数据列表：
%    \begin{macrocode}
\clist_const:Nn \c_@@_cover_brief_master_engineering_clist
  {
    { \c_@@_name_authorbrief_tl  } { \l_@@_info_author_tl     } { 1 } { 0 },
    { \c_@@_name_supervisor_tl   } { \l_@@_info_supervisor_tl } { 1 } { 1 }
  }
%    \end{macrocode}
% 本科学位论文封面简要作者信息元数据列表：
%    \begin{macrocode}
\clist_const:Nn \c_@@_cover_brief_bachelor_clist
  {
    { \c_@@_name_authorbrief_tl  } { \l_@@_info_author_tl     } { 1 } { 0 },
    { \c_@@_name_supervisor_tl   } { \l_@@_info_supervisor_tl } { 1 } { 1 }
  }
%    \end{macrocode}
% \end{variable}
%
% \begin{variable}{\c_@@_cover_detail_doctor_academic_clist,
% \c_@@_cover_detail_doctor_engineering_clist,
% \c_@@_cover_detail_master_academic_clist,
% \c_@@_cover_detail_master_engineering_clist,
% \c_@@_cover_detail_bachelor_clist}
% 学术博士学位论文封面详细作者信息元数据列表：
%    \begin{macrocode}
\clist_const:Nn \c_@@_cover_detail_doctor_academic_clist
  {
    { \c_@@_name_department_tl    } { \l_@@_info_department_tl    } { 0 } { 0 },
    { \c_@@_name_major_tl         } { \l_@@_info_major_tl         } { 0 } { 0 },
    { \c_@@_name_author_tl        } { \l_@@_info_author_tl        } { 1 } { 0 },
    { \c_@@_name_supervisor_tl    } { \l_@@_info_supervisor_tl    } { 1 } { 1 },
    { \c_@@_name_cosupervisor_tl  } { \l_@@_info_cosupervisor_tl  } { 1 } { 2 }
  }
%    \end{macrocode}
% 专业学位博士学位论文封面详细作者信息元数据列表：
%    \begin{macrocode}
\clist_const:Nn \c_@@_cover_detail_doctor_engineering_clist
  {
    { \c_@@_name_department_tl        } { \l_@@_info_department_tl        } { 0 } { 0 },
    { \c_@@_name_engineering_title_tl } { \l_@@_info_engineering_title_tl } { 0 } { 0 },
    { \c_@@_name_engineeringfield_tl  } { \l_@@_info_engineeringfield_tl  } { 0 } { 0 },
    { \c_@@_name_author_tl            } { \l_@@_info_author_tl            } { 1 } { 0 },
    { \c_@@_name_supervisor_tl        } { \l_@@_info_supervisor_tl        } { 1 } { 1 },
    { \c_@@_name_cosupervisor_tl      } { \l_@@_info_cosupervisor_tl      } { 1 } { 2 },
  }
%    \end{macrocode}
% 学术硕士学位论文封面详细作者信息元数据列表：
%    \begin{macrocode}
\clist_const:Nn \c_@@_cover_detail_master_academic_clist
  {
    { \c_@@_name_department_tl    } { \l_@@_info_department_tl    } { 0 } { 0 },
    { \c_@@_name_major_tl         } { \l_@@_info_major_tl         } { 0 } { 0 },
    { \c_@@_name_author_tl        } { \l_@@_info_author_tl        } { 1 } { 0 },
    { \c_@@_name_supervisor_tl    } { \l_@@_info_supervisor_tl    } { 1 } { 1 },
    { \c_@@_name_cosupervisor_tl  } { \l_@@_info_cosupervisor_tl  } { 1 } { 2 }
  }
%    \end{macrocode}
% 专业学位硕士学位论文封面详细作者信息元数据列表：
%    \begin{macrocode}
\clist_const:Nn \c_@@_cover_detail_master_engineering_clist
  {
    { \c_@@_name_department_tl        } { \l_@@_info_department_tl        } { 0 } { 0 },
    { \c_@@_name_engineering_title_tl } { \l_@@_info_engineering_title_tl } { 0 } { 0 },
    { \c_@@_name_engineeringfield_tl  } { \l_@@_info_engineeringfield_tl  } { 0 } { 0 },
    { \c_@@_name_author_tl            } { \l_@@_info_author_tl            } { 1 } { 0 },
    { \c_@@_name_supervisor_tl        } { \l_@@_info_supervisor_tl        } { 1 } { 1 },
    { \c_@@_name_cosupervisor_tl      } { \l_@@_info_cosupervisor_tl      } { 1 } { 2 },
  }
%    \end{macrocode}
% 本科学位论文封面详细作者信息元数据列表：
%    \begin{macrocode}
\clist_const:Nn \c_@@_cover_detail_bachelor_clist
  {
    { \c_@@_name_author_tl         } { \l_@@_info_author_tl         } { 1 } { 0 },
    { \c_@@_name_supervisor_tl     } { \l_@@_info_supervisor_tl     } { 1 } { 1 },
    { \c_@@_name_cosupervisor_tl   } { \l_@@_info_cosupervisor_tl   } { 1 } { 2 },
    { \c_@@_name_bachelor_title_tl } { \l_@@_info_bachelor_title_tl } { 0 } { 0 },
    { \c_@@_name_major_tl          } { \l_@@_info_major_tl          } { 0 } { 0 },
    { \c_@@_name_department_tl     } { \l_@@_info_department_tl     } { 0 } { 0 }
  }
%    \end{macrocode}
% \end{variable}
%
% \begin{variable}{\c_@@_cover_detail_en_doctor_academic_clist,
% \c_@@_cover_detail_en_doctor_engineering_clist,
% \c_@@_cover_detail_en_master_academic_clist,
% \c_@@_cover_detail_en_master_engineering_clist}
% 学术博士学位论文英文封面详细作者信息元数据列表：
%    \begin{macrocode}
\clist_const:Nn \c_@@_cover_detail_en_doctor_academic_clist
  {
    { \c_@@_name_department_en_tl    } { \l_@@_info_department_en_tl    } { 0 } { 0 },
    { \c_@@_name_major_en_tl         } { \l_@@_info_major_en_tl         } { 0 } { 0 },
    { \c_@@_name_author_en_tl        } { \l_@@_info_author_en_tl        } { 1 } { 0 },
    { \c_@@_name_supervisor_en_tl    } { \l_@@_info_supervisor_en_tl    } { 1 } { 1 },
    { \c_@@_name_cosupervisor_en_tl  } { \l_@@_info_cosupervisor_en_tl  } { 1 } { 2 }
  }
%    \end{macrocode}
% 专业学位博士学位论文英文封面详细作者信息元数据列表：
%    \begin{macrocode}
\clist_const:Nn \c_@@_cover_detail_en_doctor_engineering_clist
  {
    { \c_@@_name_department_en_tl    } { \l_@@_info_department_en_tl    } { 0 } { 0 },
    { \c_@@_name_major_en_tl         } { \l_@@_info_major_en_tl         } { 0 } { 0 },
    { \c_@@_name_author_en_tl        } { \l_@@_info_author_en_tl        } { 1 } { 0 },
    { \c_@@_name_supervisor_en_tl    } { \l_@@_info_supervisor_en_tl    } { 1 } { 1 },
    { \c_@@_name_cosupervisor_en_tl  } { \l_@@_info_cosupervisor_en_tl  } { 1 } { 2 }
  }
%    \end{macrocode}
% 学术硕士学位论文英文封面详细作者信息元数据列表：
%    \begin{macrocode}
\clist_const:Nn \c_@@_cover_detail_en_master_academic_clist
  {
    { \c_@@_name_department_en_tl    } { \l_@@_info_department_en_tl    } { 0 } { 0 },
    { \c_@@_name_major_en_tl         } { \l_@@_info_major_en_tl         } { 0 } { 0 },
    { \c_@@_name_author_en_tl        } { \l_@@_info_author_en_tl        } { 1 } { 0 },
    { \c_@@_name_supervisor_en_tl    } { \l_@@_info_supervisor_en_tl    } { 1 } { 1 },
    { \c_@@_name_cosupervisor_en_tl  } { \l_@@_info_cosupervisor_en_tl  } { 1 } { 2 }
  }
%    \end{macrocode}
% 专业学位硕士学位论文英文封面详细作者信息元数据列表：
%    \begin{macrocode}
\clist_const:Nn \c_@@_cover_detail_en_master_engineering_clist
  {
    { \c_@@_name_department_en_tl    } { \l_@@_info_department_en_tl    } { 0 } { 0 },
    { \c_@@_name_major_en_tl         } { \l_@@_info_major_en_tl         } { 0 } { 0 },
    { \c_@@_name_author_en_tl        } { \l_@@_info_author_en_tl        } { 1 } { 0 },
    { \c_@@_name_supervisor_en_tl    } { \l_@@_info_supervisor_en_tl    } { 1 } { 1 },
    { \c_@@_name_cosupervisor_en_tl  } { \l_@@_info_cosupervisor_en_tl  } { 1 } { 2 }
  }
%    \end{macrocode}
% \end{variable}
%
% \begin{variable}{\c_@@_cover_doctor_instructors_clist,
% \c_@@_cover_master_instructors_clist}
% 博士题名页签名栏作者信息元数据列表
%    \begin{macrocode}
\clist_const:Nn \c_@@_cover_doctor_instructors_clist
  {
    { \c_@@_name_author_tl      } { \l_@@_info_author_tl         } { 1 } { 0 },
    { \c_@@_name_supervisor_tl  } { \l_@@_info_supervisor_tl     } { 1 } { 1 },
    { \c_@@_name_instructors_tl } { \l_@@_info_instructors_clist } { 1 } { 2 }
  }
%    \end{macrocode}
% 硕士题名页签名栏作者信息元数据列表
%    \begin{macrocode}
\clist_const:Nn \c_@@_cover_master_instructors_clist
  {
    { \c_@@_name_author_tl      } { \l_@@_info_author_tl         } { 1 } { 0 },
    { \c_@@_name_supervisor_tl  } { \l_@@_info_supervisor_tl     } { 1 } { 1 },
  }
%    \end{macrocode}
% \end{variable}
%
% \begin{variable}{\c_@@_cover_grad_id_clist, c_@@_cover_bachelor_id_clist}
% 封面ID元数据列表\par
% \textbf{注意}: 需要从左到右、从上到下布置ID元数据
%    \begin{macrocode}
\clist_const:Nn \c_@@_cover_grad_id_clist
  {
    { \c_@@_name_clc_tl          } { \l_@@_info_clc_tl          } { 0 } { 0 },
    { \c_@@_name_school_id_tl    } { \l_@@_info_school_id_tl    } { 1 } { 0 },
    { \c_@@_name_udc_tl          } { \l_@@_info_udc_tl          } { 0 } { 0 },
    { \c_@@_name_secret_level_tl } { \l_@@_info_secret_level_tl } { 0 } { 0 },
    { \c_@@_name_student_id_tl   } { \l_@@_info_student_id_tl   } { 1 } { 0 }
  }

\clist_const:Nn \c_@@_cover_bachelor_id_clist
  {
    { \c_@@_name_student_id_tl   } { \l_@@_info_student_id_tl   } { 1 } { 0 }
  }
%    \end{macrocode}
% \end{variable}
%
% \subsubsection{元数据处理辅助函数}
%
% \changes{v2.02}{2026/05/08}{添加封面信息字段元数据处理辅助函数。}
%
% \begin{macro}{\@@_select_author_brief_fields:}
% 选择简要作者信息元数据列表，结果保存在\l_@@_tmpa_clist变量
%    \begin{macrocode}
\cs_new_protected:Npn \@@_select_author_brief_fields:
  {
    \int_case:nnF { \g_@@_thesis_type_int }
      {
%    \end{macrocode}
% 博士封面简要作者信息元数据
%    \begin{macrocode}
        {1}
          {
            \int_case:nnF { \l_@@_info_postgraduate_type_int }
              {
%    \end{macrocode}
% 学术博士封面简要作者信息元数据
%    \begin{macrocode}
                {1} {\clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_brief_doctor_academic_clist }
%    \end{macrocode}
% 专业学位博士封面简要作者信息元数据
%    \begin{macrocode}
                {2} {\clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_brief_doctor_engineering_clist }
              }
%    \end{macrocode}
% 其它情况，使用学术博士封面简要作者信息元数据
%    \begin{macrocode}
              { \clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_brief_doctor_academic_clist }
          }
        {2}
          {
            \int_case:nnF { \l_@@_info_postgraduate_type_int }
              {
%    \end{macrocode}
% 学术硕士封面简要作者信息元数据
%    \begin{macrocode}
                {1} { \clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_brief_master_academic_clist }
%    \end{macrocode}
% 专业学位硕士封面简要作者信息元数据
%    \begin{macrocode}
                {2} { \clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_brief_master_engineering_clist }
              }
%    \end{macrocode}
% 其它情况，使用学术硕士封面简要作者信息元数据
%    \begin{macrocode}
              { \clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_brief_master_academic_clist }
          }
%    \end{macrocode}
% 本科封面简要作者信息元数据
%    \begin{macrocode}
        {3} { \clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_brief_bachelor_clist }
      }
%    \end{macrocode}
% 学位类型错误，使用空数据
%    \begin{macrocode}
      { \clist_clear:N \l_@@_tmpa_clist }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_select_author_detailed_fields:}
% 选择详细作者信息的元数据列表，结果保存在\l_@@_tmpa_clist变量
%    \begin{macrocode}
\cs_new_protected:Npn \@@_select_author_detailed_fields:
  {
    \int_case:nnF { \g_@@_thesis_type_int }
      {
%    \end{macrocode}
% 博士封面详细作者信息元数据
%    \begin{macrocode}
        {1}
          {
            \int_case:nnF { \l_@@_info_postgraduate_type_int }
              {
%    \end{macrocode}
% 学术博士封面详细作者信息元数据
%    \begin{macrocode}
                {1} { \clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_detail_doctor_academic_clist }
%    \end{macrocode}
% 专业学位博士封面详细作者信息元数据
%    \begin{macrocode}
                {2} { \clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_detail_doctor_engineering_clist }
              }
%    \end{macrocode}
% 其它情况，使用学术博士封面详细作者信息元数据
%    \begin{macrocode}
              { \clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_detail_doctor_academic_clist }
          }
        {2}
          {
            \int_case:nnF { \l_@@_info_postgraduate_type_int }
              {
%    \end{macrocode}
% 学术硕士封面详细作者信息元数据
%    \begin{macrocode}
                {1} { \clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_detail_master_academic_clist }
%    \end{macrocode}
% 专业学位硕士封面详细作者信息元数据
%    \begin{macrocode}
                {2} { \clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_detail_master_engineering_clist }
              }
%    \end{macrocode}
% 其它情况，使用学术硕士封面详细作者信息元数据
%    \begin{macrocode}
              { \clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_detail_master_academic_clist }
          }
%    \end{macrocode}
% 本科封面详细作者信息元数据
%    \begin{macrocode}
        {3} { \clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_detail_bachelor_clist }
      }
%    \end{macrocode}
% 学位类型错误，使用空数据
%    \begin{macrocode}
      { \clist_clear:N \l_@@_tmpa_clist }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_select_author_detailed_en_fields:}
% 选择英文详细作者信息元数据列表，结果保存在\l_@@_tmpa_clist变量
%    \begin{macrocode}
\cs_new_protected:Npn \@@_select_author_detailed_en_fields:
  {
    \int_case:nnF { \g_@@_thesis_type_int }
      {
%    \end{macrocode}
% 博士英文封面详细作者信息元数据
%    \begin{macrocode}
        {1}
          {
            \int_case:nnF { \l_@@_info_postgraduate_type_int }
              {
%    \end{macrocode}
% 学术博士英文封面详细作者信息元数据
%    \begin{macrocode}
                {1} { \clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_detail_en_doctor_academic_clist }
%    \end{macrocode}
% 专业学位博士英文封面详细作者信息元数据
%    \begin{macrocode}
                {2} { \clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_detail_en_doctor_engineering_clist }
              }
%    \end{macrocode}
% 其它情况，使用学术博士英文封面详细作者信息元数据
%    \begin{macrocode}
              { \clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_detail_en_doctor_academic_clist }
          }
        {2}
          {
            \int_case:nnF { \l_@@_info_postgraduate_type_int }
              {
%    \end{macrocode}
% 学术硕士英文封面详细作者信息元数据
%    \begin{macrocode}
                {1} { \clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_detail_en_master_academic_clist }
%    \end{macrocode}
% 专业学位硕士英文封面详细作者信息元数据
%    \begin{macrocode}
                {2} { \clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_detail_en_master_engineering_clist }
              }
%    \end{macrocode}
% 其它情况，使用学术硕士英文封面详细作者信息元数据
%    \begin{macrocode}
              { \clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_detail_en_master_academic_clist }
          }
%    \end{macrocode}
% 本科无英文封面详细作者信息元数据
%    \begin{macrocode}
        {3} { \clist_clear:N \l_@@_tmpa_clist }
      }
%    \end{macrocode}
% 学位类型错误，使用空数据
%    \begin{macrocode}
      { \clist_clear:N \l_@@_tmpa_clist }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_select_id_fields:}
% 选择学号等元数据列表，结果保存在\l_@@_tmpa_clist变量
%    \begin{macrocode}
\cs_new_protected:Npn \@@_select_id_fields:
  {
    \int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 }
      {
%    \end{macrocode}
% 研究生
%    \begin{macrocode}
        \clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_grad_id_clist
      }{
%    \end{macrocode}
% 本科生手动生成
%    \begin{macrocode}
        \clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_bachelor_id_clist
      }
  }
%    \end{macrocode}
% \end{macro}

% \begin{macro}{\@@_select_instructors_fields:}
% 选择题名页签名栏字段元数据（目前仅研究生需要）
%    \begin{macrocode}
\cs_new_protected:Npn \@@_select_instructors_fields:
  {
    \int_case:nnF { \g_@@_thesis_type_int }
      {
%    \end{macrocode}
% 博士包括作者、导师和指导小组
%    \begin{macrocode}
        {1} { \clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_doctor_instructors_clist }
%    \end{macrocode}
% 硕士仅包括作者和导师
%    \begin{macrocode}
        {2} { \clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_master_instructors_clist }
%    \end{macrocode}
% 本科生不使用此函数
%    \begin{macrocode}
        {3} { \clist_clear:N \l_@@_tmpa_clist }
      }
%    \end{macrocode}
% 类型错误，清空数据
%    \begin{macrocode}
      { \clist_clear:N \l_@@_tmpa_clist }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_get_max_label_width:,
% \@@_get_max_value_width:,
% \@@_get_max_value_en_width:,
% \@@_get_max_instructors_value_width:}
% 获取标签列最大宽度函数，结果保存到\l_@@_tmpa_dim变量
%    \begin{macrocode}
\cs_new_protected:Npn \@@_get_max_label_width:
  {
    \dim_set:Nn \l_@@_tmpa_dim { -999 pt }
    \clist_map_inline:Nn \l_@@_tmpa_clist
      {
        \exp_args:NnV \@@_get_text_width:Nn \l_@@_tmpt_dim { \exp_after:wN \use_i:nnnn ##1 }
        \dim_set:Nn \l_@@_tmpa_dim { \dim_max:nn { \l_@@_tmpa_dim } { \l_@@_tmpt_dim } }
      }
  }
%    \end{macrocode}
% 获取内容列最大宽度函数，结果保存到\l_@@_tmpb_dim变量
%    \begin{macrocode}
\cs_new_protected:Npn \@@_get_max_value_width:
  {
    \dim_set:Nn \l_@@_tmpb_dim { -999 pt }
    \clist_map_inline:Nn \l_@@_tmpa_clist
      {
%    \end{macrocode}
% 临时变量：内容的最终显示值（考虑盲审和格式化）
%    \begin{macrocode}
        \tl_set:Nx \l_@@_tmpt_tl { \exp_after:wN \use_ii:nnnn ##1 }
%    \end{macrocode}
% 盲审处理
%    \begin{macrocode}
        \bool_if:nT { \g_@@_anonymous_bool &&
                      \int_compare_p:nNn { \exp_after:wN \use_iii:nnnn ##1 } = { 1 } }
          { \tl_set:Nn \l_@@_tmpt_tl { \c_@@_name_anonname_tl } }
%    \end{macrocode}
% 导师字段特殊处理：需要格式化列表
%    \begin{macrocode}
        \bool_if:nT { \int_compare_p:nNn { \exp_after:wN \use_iv:nnnn ##1 } = { 1 } ||
                      \int_compare_p:nNn { \exp_after:wN \use_iv:nnnn ##1 } = { 2 } }
          { \@@_format_supervisor_list:N \l_@@_tmpt_tl }
%    \end{macrocode}
% 获取宽度
%    \begin{macrocode}
        \@@_get_text_width:NV \l_@@_tmpt_dim \l_@@_tmpt_tl
        \dim_set:Nn \l_@@_tmpb_dim
          { \dim_max:nn { \l_@@_tmpb_dim } { \l_@@_tmpt_dim } }
      }
  }
%    \end{macrocode}
% 获取研究生英文一行内容(标签: 内容)最大宽度，结果保存到\l_@@_tmpb_dim变量
%    \begin{macrocode}
\cs_new_protected:Npn \@@_get_max_value_en_width:
  {
    \dim_set:Nn \l_@@_tmpb_dim { -999 pt }
    \clist_map_inline:Nn \l_@@_tmpa_clist
      {
%    \end{macrocode}
% 临时变量：内容的最终显示值（考虑盲审和格式化）
%    \begin{macrocode}
        \tl_set:Nx \l_@@_tmpt_tl { \exp_after:wN \use_ii:nnnn ##1 }
%    \end{macrocode}
% 盲审处理
%    \begin{macrocode}
        \bool_if:nT { \g_@@_anonymous_bool &&
                      \int_compare_p:nNn { \exp_after:wN \use_iii:nnnn ##1 } = { 1 } }
          { \tl_set:Nn \l_@@_tmpt_tl { \c_@@_name_anonname_tl } }
%    \end{macrocode}
% 导师字段特殊处理：需要格式化列表
%    \begin{macrocode}
        \bool_if:nT { \int_compare_p:nNn { \exp_after:wN \use_iv:nnnn ##1 } = { 1 } ||
                      \int_compare_p:nNn { \exp_after:wN \use_iv:nnnn ##1 } = { 2 } }
          { \@@_format_supervisor_list:N \l_@@_tmpt_tl }
%    \end{macrocode}
% 获取宽度
%    \begin{macrocode}
        \@@_get_text_width:Nx \l_@@_tmpt_dim
          { \exp_after:wN \use_i:nnnn ##1\c_@@_fwid_colon_tl\l_@@_tmpt_tl }
        \dim_set:Nn \l_@@_tmpb_dim
          { \dim_max:nn { \l_@@_tmpb_dim } { \l_@@_tmpt_dim } }
      }
  }
%    \end{macrocode}
% 指导小组特殊宽度计算，结果保存到\l_@@_tmpb_dim变量
%    \begin{macrocode}
\cs_new_protected:Npn \@@_get_max_instructors_value_width:
  {
    \dim_set:Nn \l_@@_tmpb_dim { -999 pt }
    \clist_map_inline:Nn \l_@@_tmpa_clist
      {
%    \end{macrocode}
% 临时变量：内容的最终显示值（考虑盲审和格式化）
%    \begin{macrocode}
        \tl_set:Nx \l_@@_tmpt_tl { \exp_after:wN \use_ii:nnnn ##1 }
%    \end{macrocode}
% 盲审处理
%    \begin{macrocode}
        \bool_if:nT { \g_@@_anonymous_bool &&
                      \int_compare_p:nNn { \exp_after:wN \use_iii:nnnn ##1 } = { 1 } }
          { \tl_set:Nn \l_@@_tmpt_tl { \c_@@_name_anonname_tl } }
%    \end{macrocode}
% 导师字段格式化
%    \begin{macrocode}
        \bool_if:nT { \int_compare_p:nNn { \exp_after:wN \use_iv:nnnn ##1 } = { 1 } ||
                      \int_compare_p:nNn { \exp_after:wN \use_iv:nnnn ##1 } = { 2 } }
          { \@@_format_supervisor_list:N \l_@@_tmpt_tl }
%    \end{macrocode}
% 获取宽度（设置字体格式后再测量宽度）
%    \begin{macrocode}
        \hbox_set:Nn \l_@@_tmpa_box
          {
            \zihao{3}\bfseries
            \l_@@_tmpt_tl
          }
        \dim_set:Nn \l_@@_tmpt_dim { \box_wd:N \l_@@_tmpa_box }
        \dim_set:Nn \l_@@_tmpb_dim
          { \dim_max:nn { \l_@@_tmpb_dim } { \l_@@_tmpt_dim } }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_filter_nonempty_fields:}
% 过滤空字段
%    \begin{macrocode}
\cs_new_protected:Npn \@@_filter_nonempty_fields:
  {
    \clist_clear:N \l_tmpa_clist
    \clist_map_inline:Nn \l_@@_tmpa_clist
      {
%    \end{macrocode}
% 提取内容变量
%    \begin{macrocode}
        \tl_set:Nx \l_tmpa_tl { \exp_after:wN \use_ii:nnnn ##1 }
%    \end{macrocode}
% 提取特殊类型标记
%    \begin{macrocode}
        \tl_set:Nx \l_tmpb_tl { \exp_after:wN \use_iv:nnnn ##1 }
%    \end{macrocode}
% 如果是合作导师字段且内容为空，则不加入新列表
%    \begin{macrocode}
        \int_compare:nNnTF { \l_tmpb_tl } = { 2 }
          {
            \tl_if_empty:NTF \l_tmpa_tl
%    \end{macrocode}
% 跳过
%    \begin{macrocode}
              { }
%    \end{macrocode}
% 提取
%    \begin{macrocode}
              { \clist_put_right:Nn \l_tmpa_clist {##1} }
          }
          { \clist_put_right:Nn \l_tmpa_clist {##1} }
      }
    \clist_set_eq:NN \l_@@_tmpa_clist \l_tmpa_clist
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_cover_item_generic_output:nnnn,
%   \@@_cover_item_en_output:nnnn,
%   \@@_cover_item_id_output:nnnn,
%   \@@_cover_item_instructors_output:nnnn}
% \begin{arguments}
%   \item 标签文本
%   \item 内容变量
%   \item 盲审隐藏标记 (1=隐藏, 0=不隐藏)
%   \item 特殊处理类型 (0=普通, 1=导师, 2=合作导师, 3=日期等非隐藏字段)
% \end{arguments}
% 格式化并输出通用单行数据:
%    \begin{macrocode}
\cs_new_protected:Npn \@@_cover_item_generic_output:nnnn #1#2#3#4
  {
%    \end{macrocode}
% 获取最终内容
%    \begin{macrocode}
    \tl_set:Nn \l_@@_tmpb_tl { #2 }
%    \end{macrocode}
% 盲审处理
%    \begin{macrocode}
    \bool_if:nT { \g_@@_anonymous_bool && \int_compare_p:nNn {#3} = { 1 } }
      { \tl_set:Nn \l_@@_tmpb_tl { \c_@@_name_anonname_tl } }
%    \end{macrocode}
% 特殊类型处理
%    \begin{macrocode}
    \int_compare:nNnTF {#4} = { 1 }
      { \@@_format_supervisor_list:N \l_@@_tmpb_tl }
      {
        \int_compare:nNnT {#4} = { 2 }
          { \@@_format_supervisor_list:N \l_@@_tmpb_tl }
      }
%    \end{macrocode}
% 输出一行
%    \begin{macrocode}
    \@@_spread_box:Vn \l_@@_tmpa_dim { #1 }
    \int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 }
      {
        \@@_quad:
        \@@_center_box_uline:Vn \l_@@_tmpb_dim { \l_@@_tmpb_tl }
      }{
        \c_@@_fwid_colon_tl
        \@@_center_box:Vn \l_@@_tmpb_dim { \l_@@_tmpb_tl }
      }
    \par
  }
%    \end{macrocode}
% 函数变体
%    \begin{macrocode}
\cs_generate_variant:Nn \@@_cover_item_generic_output:nnnn { xxxx }
%    \end{macrocode}
% 格式化输出英文单行数据
%    \begin{macrocode}
\cs_new_protected:Npn \@@_cover_item_en_output:nnnn #1#2#3#4
  {
%    \end{macrocode}
% 获取最终内容
%    \begin{macrocode}
    \tl_set:Nn \l_@@_tmpb_tl { #2 }
%    \end{macrocode}
% 盲审处理
%    \begin{macrocode}
    \bool_if:nT { \g_@@_anonymous_bool && \int_compare_p:nNn {#3} = { 1 } }
      { \tl_set:Nn \l_@@_tmpb_tl { \c_@@_name_anonname_tl } }
%    \end{macrocode}
% 特殊类型处理
%    \begin{macrocode}
    \int_compare:nNnTF { #4 } = { 1 }
      { \@@_format_supervisor_list:N \l_@@_tmpb_tl }
      {
        \int_compare:nNnT { #4 } = { 2 }
          { \@@_format_supervisor_list:N \l_@@_tmpb_tl }
      }
%    \end{macrocode}
% 输出一行
%    \begin{macrocode}
    #1
    \c_@@_fwid_colon_tl
    \l_@@_tmpb_tl
    \skip_vertical:n { 1 ex }
  }
%    \end{macrocode}
% 函数变体
%    \begin{macrocode}
\cs_generate_variant:Nn \@@_cover_item_en_output:nnnn { xxxx }
%    \end{macrocode}
% 格式化输出学号等编号单行数据
%    \begin{macrocode}
\cs_new_protected:Npn \@@_cover_item_id_output:nnnn #1#2#3#4
  {
    \tl_set:Nx \l_@@_tmpb_tl {#2}
%    \end{macrocode}
% 盲审学校代码及学号处理
%    \begin{macrocode}
    \bool_if:nT { \g_@@_anonymous_bool && \int_compare_p:nNn {#3} = { 1 } }
      { \tl_set:Nn \l_@@_tmpb_tl { \c_@@_name_anonname_tl } }

    \int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 }
      {
%    \end{macrocode}
% 研究生\par
% 输出：UDC标签需要左对齐
%    \begin{macrocode}
        \tl_if_eq:NnTF \c_@@_name_udc_tl {#1}
          { \@@_fixed_width_box:Vn \l_@@_tmpa_dim {#1} }
          { \@@_spread_box:Vn \l_@@_tmpa_dim {#1} }
        \c_@@_fwid_colon_tl
        \@@_center_box_uline:Vn \l_@@_tmpb_dim { \l_@@_tmpb_tl }
%    \end{macrocode}
% id元素的左右布置判断
%    \begin{macrocode}
        \tl_set:Nn \l_@@_tmpt_tl { #1 }
        \bool_if:nTF
          {
            \tl_if_eq_p:NN \l_@@_tmpt_tl \c_@@_name_school_id_tl  ||
            \tl_if_eq_p:NN \l_@@_tmpt_tl \c_@@_name_udc_tl        ||
            \tl_if_eq_p:NN \l_@@_tmpt_tl \c_@@_name_student_id_tl
          }
          { \par } { \hfill }
      }{
%    \end{macrocode}
% 本科生
%    \begin{macrocode}
        \hfill
        \@@_spread_box:Vn \l_@@_tmpa_dim {#1}
        \c_@@_fwid_colon_tl
        \l_@@_tmpb_tl
      }
  }
%    \end{macrocode}
% 函数变体
%    \begin{macrocode}
\cs_generate_variant:Nn \@@_cover_item_id_output:nnnn { xxxx }
%    \end{macrocode}
% 格式化输出指导小组单行数据
%    \begin{macrocode}
\cs_new_protected:Npn \@@_cover_item_instructors_output:nnnn #1#2#3#4
  {
%    \end{macrocode}
% 获取最终内容
%    \begin{macrocode}
    \tl_set:Nx \l_@@_tmpb_tl {#2}
%    \end{macrocode}
% 盲审处理
%    \begin{macrocode}
    \bool_if:nT { \g_@@_anonymous_bool && \int_compare_p:nNn {#3} = { 1 } }
      { \tl_set:Nn \l_@@_tmpb_tl { \c_@@_name_anonname_tl } }
%    \end{macrocode}
% 格式化导师数据
%    \begin{macrocode}
    \bool_if:nT { \int_compare_p:nNn { #4 } = { 1 } || \int_compare_p:nNn { #4 } = { 2 } }
      { \@@_format_supervisor_list:N \l_@@_tmpb_tl }
%    \end{macrocode}
% 输出行（使用下划线盒子，因为需要签名）
%    \begin{macrocode}
    \@@_spread_box:Vn \l_@@_tmpa_dim {#1}
    \c_@@_fwid_colon_tl
%    \end{macrocode}
% 判断是否预留签名空白
%    \begin{macrocode}
    \bool_if:NTF \g_@@_withsignature_bool
      {
      }{
        \l_@@_tmpb_tl
      }
    \skip_vertical:n { 1.6 ex }
  }
%    \end{macrocode}
% 函数变体
%    \begin{macrocode}
\cs_generate_variant:Nn \@@_cover_item_instructors_output:nnnn { xxxx }
%    \end{macrocode}
% \end{macro}
%
% \changes{v2.01}{2026/05/07}{添加格式化导师姓名及职称内容的函数。}
%
% \begin{macro}{\@@_format_supervisor_list:N}
% 格式化导师内容。接收 tl 变量作为输入，每个导师由用英文逗号分隔的
% 姓名和职称构成，不同导师分别置于大括号内，然后用英文逗号分隔。
%    \begin{macrocode}
\cs_new_protected:Npn \@@_format_supervisor_list:N #1
  {
    \seq_clear:N \l_tmpa_seq
    \exp_args:Nx \clist_map_inline:nn { #1 }
      {
%    \end{macrocode}
% 取得姓名和职称
%    \begin{macrocode}
        \tl_set:Nx \l_@@_tmpa_tl { \clist_item:nn { ##1 } { 1 } }
        \tl_set:Nx \l_@@_tmpb_tl { \clist_item:nn { ##1 } { 2 } }
%    \end{macrocode}
% 判断有无职称，然后确定输出内容
%    \begin{macrocode}
        \tl_if_empty:NTF \l_@@_tmpb_tl
          { \seq_put_right:NV \l_tmpa_seq \l_@@_tmpa_tl }
          {
            \seq_put_right:Nx \l_tmpa_seq
              { \l_@@_tmpa_tl \enskip \l_@@_tmpb_tl }
          }
      }
    \tl_set:Nx #1 { \seq_use:Nn \l_tmpa_seq { ,\enskip } }
  }
%    \end{macrocode}
% \end{macro}

% \begin{macro}{\@@_format_instructors_list:N}
% 指导小组列表格式化
%    \begin{macrocode}
\cs_new_protected:Npn \@@_format_instructors_list:N #1
  {
    \tl_set_eq:NN \l_tmpa_tl #1
    \@@_format_supervisor_list:N \l_tmpa_tl
    \tl_set_eq:NN #1 \l_tmpa_tl
  }
%    \end{macrocode}
% \end{macro}
%
% \changes{v1.25}{2023/04/18}{添加盲审隐藏学号。}
%
% \subsubsection{封面各部件}
%
% \begin{macro}{\@@_cover_id:,\@@_cover_id_aux:n}
% 封面中的中图分类号、udc码、密级、学校代码和学号。
%    \begin{macrocode}
\cs_new_protected:Npn \@@_cover_id:
  {
    \group_begin:
      \@@_select_id_fields:
      \@@_get_max_label_width:
      \@@_get_max_value_width:
      \begin{minipage}[c]{\textwidth}
        \clist_map_inline:Nn \l_@@_tmpa_clist
          {
            \@@_cover_item_id_output:xxxx ##1
          }
      \end{minipage}
    \group_end:
  }
%    \end{macrocode}
% \end{macro}
%
% \changes{v2.00}{2026/05/06}{删除盲审时的学校LOGO。}
%
% \begin{macro}{\@@_cover_logo:}
% 插入校名图片。根据参数 \opt{width} 和 \opt{height} 是否为空依次
% 判断。\cs{l_@@_cover_logo_size_clist} 中超过两个的参数将被忽略。
%    \begin{macrocode}
\cs_new_protected:Npn \@@_cover_logo:
  {
    \bool_if:NTF \g_@@_anonymous_bool
      { **************** }
      {
        \clist_pop:NN   \l_@@_cover_logo_size_clist \l_@@_tmpa_tl
        \clist_pop:NNTF \l_@@_cover_logo_size_clist \l_@@_tmpb_tl
          {
            \tl_if_empty:NTF \l_@@_tmpa_tl
              { \includegraphics [ height = \l_@@_tmpb_tl ] }
              {
                \includegraphics
                  [ width  = \l_@@_tmpa_tl, height = \l_@@_tmpb_tl ]
              }
          }
          { \includegraphics [ width = \l_@@_tmpa_tl ] }
          { \l_@@_cover_logo_tl }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \changes{v2.00}{2026/04/29}{删除楷体伪粗设置。}
% \changes{v1.11}{2022/04/03}{利用PDF literal添加本科楷体伪粗。}
%
% \begin{macro}{\@@_cover_type:}
% 论文类型。
%    \begin{macrocode}
\cs_new_protected:Npn \@@_cover_type:
  {
    \tl_set:Nx \l_@@_tmpa_tl
      {
%    \end{macrocode}
% 取出论文类型。
%    \begin{macrocode}
        \clist_item:Nn \c_@@_thesis_type_clist { \g_@@_thesis_type_int }
      }
    \int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 }
      {
%    \end{macrocode}
% 研究生论文。
%    \begin{macrocode}
        \@@_spread_box:nn { 0.75 \textwidth } { \l_@@_tmpa_tl }
      }{
%    \end{macrocode}
% 本科毕业年份(届)。
%    \begin{macrocode}
        \@@_get_text_width:NV \l_@@_tmpa_dim \l_@@_info_grade_tl
        \@@_center_box:Vn \l_@@_tmpa_dim { \l_@@_info_grade_tl }
        \@@_spread_box:nn { 0.50 \textwidth }
          {
            届
            \l_@@_tmpa_tl
%    \end{macrocode}
% 本科的论文或设计选择。
%    \begin{macrocode}
            \clist_item:Nn \c_@@_bachelor_type_clist { \l_@@_info_bachelor_type_int }
          }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \changes{v2.02}{2026/05/09}{将\@@_cover_author重命名为\@@_cover_author_brief。}
% \changes{v2.01}{2026/05/07}{格式化导师数据。}
% \changes{v2.00}{2026/04/29}{添加本科封面的作者与导师。}
%
% \begin{macro}{\@@_cover_author_brief:}
% 封面作者简要信息栏(目前仅本科生需要)。
%    \begin{macrocode}
\cs_new_protected:Npn \@@_cover_author_brief:
  {
     \begin{minipage} [ c ] { \textwidth }
       \centering
%    \end{macrocode}
% 选择字段列表
%    \begin{macrocode}
      \@@_select_author_brief_fields:
%    \end{macrocode}
% 过滤空字段
%    \begin{macrocode}
      \@@_filter_nonempty_fields:
%    \end{macrocode}
% 计算最大宽度
%    \begin{macrocode}
      \@@_get_max_label_width:
      \@@_get_max_value_width:
%    \end{macrocode}
% 为标签列增加额外宽度用于对齐
%    \begin{macrocode}
      \dim_add:Nn \l_@@_tmpa_dim { 1.2 em }
%    \end{macrocode}
% 循环输出每一行
%    \begin{macrocode}
      \clist_map_inline:Nn \l_@@_tmpa_clist
        {
          \@@_cover_item_generic_output:xxxx ##1
        }
    \end{minipage}
  }
%    \end{macrocode}
% \end{macro}

% \changes{v2.02}{2026/05/09}{将\@@_cover_info重命名为\@@_cover_author_detailed。}
% \changes{v2.02}{2026/05/08}{采用元信息驱动模式，重构\@@_cover_info:函数。}
% \changes{v2.01}{2026/05/07}{添加合作指导教师是否为空判断以确定是否输出该条目，并格式化导师数据。}
% \changes{v2.00}{2026/04/29}{修订本科作者信息。}
% \changes{v1.25}{2023/04/18}{添加盲审隐藏中文作者与导师。}
%
% \begin{macro}{\@@_cover_author_detailed:}
% 作者详细信息栏。
%    \begin{macrocode}
\cs_new_protected:Npn \@@_cover_author_detailed:
  {
    \begin{minipage} [ c ] { \textwidth }
      \centering
%    \end{macrocode}
% 选择字段列表
%    \begin{macrocode}
      \@@_select_author_detailed_fields:
%    \end{macrocode}
% 过滤空字段
%    \begin{macrocode}
      \@@_filter_nonempty_fields:
%    \end{macrocode}
% 计算最大宽度
%    \begin{macrocode}
      \@@_get_max_label_width:
      \@@_get_max_value_width:
%    \end{macrocode}
% 为标签列增加额外宽度用于对齐(目前仅对本科有效)
%    \begin{macrocode}
    \int_compare:nNnT { \g_@@_thesis_type_int } = { 3 }
      {
        \dim_add:Nn \l_@@_tmpa_dim { 1.2 em }
      }
%    \end{macrocode}
% 循环输出每一行
%    \begin{macrocode}
      \clist_map_inline:Nn \l_@@_tmpa_clist
        {
          \@@_cover_item_generic_output:xxxx ##1
        }
    \end{minipage}
  }
%    \end{macrocode}
% \end{macro}
%
% \changes{v2.01}{2026/05/07}{若无合作指导老师，则删除该条目，添加导师职称处理。}
% \changes{v1.25}{2023/04/18}{添加盲审隐藏英文作者与导师。}
%
% \begin{macro}{\@@_cover_author_detailed_en:}
% 英文作者信息栏(仅对研究生有效)。
%    \begin{macrocode}
\cs_new_protected:Npn \@@_cover_author_detailed_en:
  {
%    \end{macrocode}
% 选择字段列表
%    \begin{macrocode}
    \@@_select_author_detailed_en_fields:
%    \end{macrocode}
% 过滤空字段
%    \begin{macrocode}
    \@@_filter_nonempty_fields:
%    \end{macrocode}
% 计算最大宽度
%    \begin{macrocode}
    \@@_get_max_value_en_width:
    \begin{minipage} [ c ] { \l_@@_tmpb_dim }
      \flushleft
%    \end{macrocode}
% 循环输出每一行
%    \begin{macrocode}
      \clist_map_inline:Nn \l_@@_tmpa_clist
        {
          \@@_cover_item_en_output:xxxx ##1
        }
    \end{minipage}
  }
%    \end{macrocode}
% \end{macro}
%
% \changes{v1.15}{2022/05/29}{为研究生题名页签字位置留空位。}
% \changes{v1.25}{2023/04/18}{添加盲审隐藏作者、导师、指导小组等。}
%
% \begin{macro}{\@@_cover_instructors:}
% 题名页作者、指导教师、指导小组签名(仅对研究生有效)。
%    \begin{macrocode}
\cs_new_protected:Npn \@@_cover_instructors:
  {
    \begin{minipage}[c]{\textwidth}
      \flushleft
      \@@_select_instructors_fields:
      \clist_if_empty:NTF \l_@@_tmpa_clist
        { }
        {
          \@@_get_max_label_width:
          \@@_get_max_instructors_value_width:
          \dim_add:Nn \l_@@_tmpb_dim { 0.8 em }
          \clist_map_inline:Nn \l_@@_tmpa_clist
            {
              \@@_cover_item_instructors_output:nnnn ##1
            }
        }
    \end{minipage}
  }
%    \end{macrocode}
% \end{macro}
%
% \changes{v1.25}{2023/04/18}{添加盲审隐藏答辩委员会。}
%
% \begin{macro}{\@@_cover_defensecommittees:}
% 答辩委员会名单，仅对研究生有效。
%    \begin{macrocode}
\cs_new_protected:Npn \@@_cover_defensecommittees:
  {
%    \end{macrocode}
% 清空临时变量。
%    \begin{macrocode}
    \clist_set:Nn \l_@@_tmpa_clist {}
    \clist_set:Nn \l_@@_tmpb_clist {}
    \clist_set:Nn \l_@@_tmpc_clist {}
    \bool_until_do:nn { \clist_if_empty_p:N \l_@@_info_defensecommittees_clist }
      {
        \clist_set:Nn \l_@@_tmpt_clist {}
%    \end{macrocode}
% 取出一个答辩委员的信息。
%    \begin{macrocode}
        \clist_pop:NN \l_@@_info_defensecommittees_clist \l_@@_tmpa_tl
        \clist_set:NV \l_@@_tmpt_clist \l_@@_tmpa_tl
%    \end{macrocode}
% 构造单位列表。
%    \begin{macrocode}
        \clist_put_right:Nx \l_@@_tmpa_clist {
            \clist_item:Nn \l_@@_tmpt_clist {1}
        }
%    \end{macrocode}
% 构造姓名列表。
%    \begin{macrocode}
        \clist_put_right:Nx \l_@@_tmpb_clist {
            \clist_item:Nn \l_@@_tmpt_clist {2}
        }
%    \end{macrocode}
% 构造职称列表。
%    \begin{macrocode}
        \clist_put_right:Nx \l_@@_tmpc_clist {
            \clist_item:Nn \l_@@_tmpt_clist {3}
        }
      }
%    \end{macrocode}
% 分别计算单位列表、姓名列表、职称列表的最宽宽度。
%    \begin{macrocode}
    \@@_get_max_text_width:NN \l_@@_tmpa_dim \l_@@_tmpa_clist
    \@@_get_max_text_width:NN \l_@@_tmpb_dim \l_@@_tmpb_clist
    \@@_get_max_text_width:NN \l_@@_tmpc_dim \l_@@_tmpc_clist
%    \end{macrocode}
% 输出答辩委员会信息。
%    \begin{macrocode}
    \bool_if:NF \g_@@_anonymous_bool
      {
        \begin{minipage} [ c ] { \textwidth }
          \centering
          \bool_until_do:nn { \clist_if_empty_p:N \l_@@_tmpa_clist }
            {
              \clist_pop:NN \l_@@_tmpa_clist \l_@@_tmpa_tl
              \clist_pop:NN \l_@@_tmpb_clist \l_@@_tmpb_tl
              \clist_pop:NN \l_@@_tmpc_clist \l_@@_tmpc_tl
              \@@_spread_box:Vn \l_@@_tmpa_dim { \l_@@_tmpa_tl }
              \@@_center_box_uline:Vn \l_@@_tmpb_dim { \l_@@_tmpb_tl }
              \@@_spread_box:Vn \l_@@_tmpc_dim { \l_@@_tmpc_tl }
              \skip_vertical:n { 0.5 ex }
            }
        \end{minipage}
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \changes{v1.25}{2023/04/18}{添加盲审隐藏项目资助列表。}
%
% \begin{macro}{\@@_cover_foundation:}
% 项目资助列表，仅对研究生有效。
%    \begin{macrocode}
\cs_new_protected:Npn \@@_cover_foundation:
  {
    \begin{minipage}[c]{\textwidth}
      \clist_map_inline:Nn \l_@@_info_foundation_clist
        {
          \indent
          \@@_qquad:
          本研究得到
          \bool_if:NTF \g_@@_anonymous_bool
            { \c_@@_name_anonname_tl }
            { \clist_item:nn {##1} {1} }  % 项目来源
          \c_@@_fwid_colon_tl
          \bool_if:NTF \g_@@_anonymous_bool
            { \c_@@_name_anonname_tl }
            { \clist_item:nn {##1} {2} }  % 项目名称
          (编号\c_@@_fwid_colon_tl
          \bool_if:NTF \g_@@_anonymous_bool
            { \c_@@_name_anonname_tl }
            { \clist_item:nn {##1} {3} }  % 项目编号
          )资助
          \par
        }
    \end{minipage}
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_cover_signature:N}
% 签名行。
%    \begin{macrocode}
\cs_new_protected:Npn \@@_cover_signature:N #1
  {
    \int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 }
      {
%    \end{macrocode}
% 研究生。
%    \begin{macrocode}
        \@@_qquad:
        \@@_spread_box:nV { 5 em } #1
        \c_@@_fwid_colon_tl
        \hspace*{\fill}
      }{
%    \end{macrocode}
% 本科。
%    \begin{macrocode}
        \@@_spread_box:nV { 6 em } #1
        \c_@@_fwid_colon_tl
        % \@@_blank_underline:n { 6 em }
        \hspace*{\fill}
      }
%    \end{macrocode}
% 签名时间。
%    \begin{macrocode}
    时间\c_@@_fwid_colon_tl
    \@@_qquad:\@@_qquad: 年
    \@@_qquad: 月
    \@@_qquad: 日
    \hspace*{\fill}
    % \@@_qquad:
  }
%    \end{macrocode}
% \end{macro}
%
% \changes{v1.12}{2022/04/12}{重新抽象封面\pkg{xtemplate}模板。}
%
% \subsubsection{封面模板}
%
% 本模板使用 \pkg{xtemplate} 提供的面向对象方法绘制封面。
%
% 以下分别从页面元素(element)和页面整体(page)的层次进行了抽象。
% 当把页面部件作为一个对象时，则页面部件只具备有限数量的属性：
% 内容、格式、边距、对齐方式等。而具体页面是这些对象的实例的集合，
% 附加边距、行距等属性。通过 \pkg{xtemplate} 提供的功能，可以
% 根据这些属性创建模板(template)，进而能大量构建具有\emph{相似行为}
% 的实例(instance)。
%
% 声明对象类型，此类对象均不需要带参数。
%    \begin{macrocode}
\DeclareObjectType { nwafu } { \c_zero_int }
%    \end{macrocode}
%
% 定义元素模板。
%    \begin{macrocode}
%<@@=nwafu_elem>
%    \end{macrocode}
%
% 声明页面元素模板接口。
%
% 元素是一个页面的基本组成单位，包括文字段落、插图等等。
% 一个抽象的元素应当具备以下属性：
% \begin{description}
%   \item[\opt{content}] 内容，即剥离了样式的元素本身
%   \item[\opt{format}] 格式，例如字号、字体、行距等
%   \item[\opt{bottom-skip}] 底边距，即与下一个元素的垂直距离
%   \item[\opt{align}] 对齐方式，包括左对齐、右对齐、居中、正常段落
% \end{description}
%    \begin{macrocode}
\DeclareTemplateInterface { nwafu } { element } { \c_zero_int }
  {
    content     : tokenlist = \c_empty_tl,
    format      : tokenlist = \c_empty_tl,
    bottom-skip : skip      = \c_zero_skip,
    align       : choice { left, right, center, normal } = normal
  }
%    \end{macrocode}
%
% 声明页面元素模板代码。^^A 涉及的变量将被自动创建。
%    \begin{macrocode}
\DeclareTemplateCode { nwafu } { element } { \c_zero_int }
  {
    content     = \l_@@_content_tl,
    format      = \l_@@_format_tl,
    bottom-skip = \l_@@_bottom_skip,
    align =
      {
        left =
          { \tl_set_eq:NN \l_@@_begin_align_tl \flushleft
            \tl_set_eq:NN \l_@@_end_align_tl   \endflushleft  },
        right =
          { \tl_set_eq:NN \l_@@_begin_align_tl \flushright
            \tl_set_eq:NN \l_@@_end_align_tl   \endflushright },
        center =
          { \tl_set_eq:NN \l_@@_begin_align_tl \center
            \tl_set_eq:NN \l_@@_end_align_tl   \endcenter     },
        normal =
          { \tl_clear:N   \l_@@_begin_align_tl
            \tl_clear:N   \l_@@_end_align_tl                  }
      }
  }
  {
    \AssignTemplateKeys
    \group_begin:
      \l_@@_begin_align_tl
      \l_@@_format_tl
      \l_@@_content_tl \par
      \l_@@_end_align_tl
    \group_end:
    \__nwafu_vspace:N \l_@@_bottom_skip
  }
%    \end{macrocode}
%
% 定义页面模板。
%    \begin{macrocode}
%<@@=nwafu_page>
%    \end{macrocode}
%
% 声明页面模板接口。
%
% 页面是元素的集合。一个抽象的页面应当具备以下属性：
% \begin{description}
%   \item[\opt{content}] 内容，包含页面元素模板实例名称的列表
%   \item[\opt{prefix}] 元素模板实例名称前缀(表示封一、封二等)
%   \item[\opt{format}] 格式，例如行距
%   \item[\opt{top-skip}] 上间距，即与页面顶部的距离
%   \item[\opt{bottom-skip}] 下间距，即与页面底部的距离
% \end{description}
%    \begin{macrocode}
\DeclareTemplateInterface { nwafu } { page } { \c_zero_int }
  {
    content     : commalist = \c_empty_clist,
    prefix      : tokenlist = \c_empty_tl,
    format      : tokenlist = \c_empty_tl,
    top-skip    : skip      = \c_zero_skip,
    bottom-skip : skip      = \c_zero_skip
  }
%    \end{macrocode}
%
% 声明页面模板代码。
%    \begin{macrocode}
\DeclareTemplateCode { nwafu } { page } { \c_zero_int }
  {
    content     = \l_@@_content_clist,
    prefix      = \l_@@_prefix_tl,
    format      = \l_@@_format_tl,
    top-skip    = \l_@@_top_skip,
    bottom-skip = \l_@@_bottom_skip
  }
  {
    \AssignTemplateKeys
    \__nwafu_vspace:N \l_@@_top_skip
    \group_begin:
      \l_@@_format_tl
      \clist_map_inline:Nn \l_@@_content_clist
        { \UseInstance { nwafu } { \l_@@_prefix_tl ##1 } }
    \group_end:
    \__nwafu_vspace:N \l_@@_bottom_skip
  }
%
%<@@=nwafu>
%    \end{macrocode}
%
% \begin{macro}{\@@_declare_element:nn,\@@_declare_page:nn}
% 封装 \pkg{xtemplate} 提供的函数，简化创建实例的过程。
% \begin{arguments}
%   \item 实例名称
%   \item 参数列表
% \end{arguments}
%    \begin{macrocode}
\cs_new_protected:Npn \@@_declare_element:nn #1#2
  { \DeclareInstance { nwafu } {#1} { element } {#2} }
\cs_generate_variant:Nn \@@_declare_element:nn { nx }
\cs_new_protected:Npn \@@_declare_page:nn    #1#2
  { \DeclareInstance { nwafu } {#1} { page    } {#2} }
\cs_generate_variant:Nn \@@_declare_page:nn { nx }
%    \end{macrocode}
% \end{macro}
%
% \changes{v2.15}{2026/05/15}{取消封面学位会召开月份加粗。}
% \changes{v2.12}{2026/05/10}{以数据驱动的方式重构封面元素声明代码。}
%
% \subsubsection{定义封面元素配置数据列表}
% 定义封面元素配置数据列表，以实现批量声明。
% \begin{description}
%   \item[格式] |{|名称|}{|内容|}{|格式|}{|底部间距|}{|对齐方式|}|内容，即剥离了样式的元素本身
%   \item[对齐方式] left, right, center, normal
% \end{description}
% 如不需要底部间距可以使用|\c_zero_skip|表示间距，但不可留白，否则会造成编译错误。
% \begin{variable}{\c_@@_cover_elements_o_clist}
% 封0元素（本科封面使用）
%    \begin{macrocode}
\clist_const:Nn \c_@@_cover_elements_o_clist
  {
    { logo      } { \@@_cover_logo: } { }
                  { -20 pt plus 0.3 fill } { center },
    { type      } { \@@_cover_type: } { \nwafu@hei \huge }
                  { 5 pt plus 0.3 fill } { center },
    { titlezh   } { \@@_fixed_width_center_box:nn { 0.95 \textwidth } { \l_@@_info_title_tl } }
                  { \@@_line_spread:n {0.95} \nwafu@hei \Huge }
                  { 0 pt plus 0.3 fill } { center },
    { titleen   } { \@@_fixed_width_center_box:nn { 0.95 \textwidth } { \l_@@_info_title_en_tl } }
                  { \@@_line_spread:n {0.95} \Huge }
                  { 80 pt plus 0.3 fill } { center },
    { info      } { \@@_cover_author_brief: } { \@@_line_spread:n {3.00} \nwafu@hei \large }
                  { 120 pt plus 0.3 fill } { center },
    { date      } { \l_@@_info_date_tl } { \nwafu@hei \large }
                  { 0 pt plus 0.3 fill } { center }
  }
%    \end{macrocode}
% \end{variable}
%
% \begin{variable}{\c_@@_cover_elements_i_graduate_clist}
% 封一元素（研究生中文封面）
%    \begin{macrocode}
\clist_const:Nn \c_@@_cover_elements_i_graduate_clist
  {
    { logo      } { \@@_cover_logo: } { }
                  { -50 pt plus 0.3 fill } { center },
    { type      } { \@@_cover_type: } { \sffamily \zihao { 0 } }
                  { 55 pt plus 0.3 fill } { center },
    { titlezh   } { \@@_fixed_width_center_box:nn { 0.95 \textwidth } { \l_@@_info_title_tl } }
                  { \sffamily \zihao { 2 } }
                  { 75 pt plus 0.3 fill } { center },
    { info      } { \@@_cover_author_detailed: } { \@@_line_spread:n {1.60} \nwafu@hei \zihao { 3 } }
                  { 53 pt plus 0.3 fill } { center },
    { date      } { \l_@@_info_date_tl } { \nwafu@hei \large }
                  { 0 pt plus 0.3 fill } { center }
  }
%    \end{macrocode}
% \end{variable}
%
% \begin{variable}{\c_@@_cover_elements_i_bachelor_clist}
% 封一元素（本科中文题名页）
%    \begin{macrocode}
\clist_const:Nn \c_@@_cover_elements_i_bachelor_clist
  {
    { id        } { \@@_cover_id: } { \zihao { 4 } }
                  { 10 pt plus 0.3 fill } { right },
    { logo      } { \@@_cover_logo: } { }
                  { -10 pt plus 0.3 fill } { center },
    { type      } { \@@_cover_type: } { \nwafu@hei \huge }
                  { 0 pt plus 0.3 fill } { center },
    { titlezh   } { \@@_fixed_width_center_box:nn { 0.95 \textwidth }
                  { \l_@@_info_title_tl } } { \@@_line_spread:n {0.95} \nwafu@hei \Huge }
                  { -5 pt plus 0.3 fill } { center },
    { titleen   } { \@@_fixed_width_center_box:nn { 0.95 \textwidth } { \l_@@_info_title_en_tl } }
                  { \@@_line_spread:n {0.95} \Huge }
                  { 15 pt plus 0.3 fill } { center },
    { info      } { \@@_cover_author_detailed: } { \@@_line_spread:n {1.60} \nwafu@hei \zihao { 3 } }
                  { 30 pt plus 0.3 fill } { center },
    { date      } { \l_@@_info_date_tl } { \nwafu@hei \large }
                  { 0 pt plus 0.3 fill } { center }
  }
%    \end{macrocode}
% \end{variable}
%
% \begin{variable}{\c_@@_cover_elements_ii_clist}
% 封二元素（研究生英文封面）
%    \begin{macrocode}
\clist_const:Nn \c_@@_cover_elements_ii_clist
  {
    { type       } { \@@_cover_ii_type_content: } { \@@_line_spread:n {1.62} \zihao { -3 } }
                   { 50 pt plus 0.3 fill } { center },
    { title      } { \l_@@_info_title_en_tl } { \@@_line_spread:n {0.90} \zihao { 1 } \bfseries }
                   { 75 pt plus 0.3 fill } { center },
    { info       } { \@@_cover_author_detailed_en: } { \@@_line_spread:n {1.12} \zihao { -3 } }
                   { 72 pt plus 0.3 fill } { center },
    { date       } { \l_@@_info_date_en_tl } { \nwafu@hei \large }
                   { 0 pt plus 0.3 fill } { center },
    { department } { \l_@@_info_department_en_tl } { \zihao { -3 } }
                   { -32 pt plus 0.3 fill } { center },
    { nwafu      } { \@@_name_en: } { \zihao { -3 } }
                   { 0 pt plus 0.3 fill } { center }
  }
%    \end{macrocode}
% \end{variable}
%
% \begin{variable}{\c_@@_cover_elements_iii_clist}
% 封三元素（研究生题名页）
%    \begin{macrocode}
\clist_const:Nn \c_@@_cover_elements_iii_clist
  {
    { id          } { \@@_cover_id: } { \@@_line_spread:n {1.12} \zihao { -4 } }
                    { 35 pt plus 0.3 fill } { center },
    { type        } { \@@_name_simp: \clist_item:Nn \c_@@_thesis_type_clist { \g_@@_thesis_type_int } }
                    { \zihao { -2 } \bfseries }
                    { 0 pt plus 0.3 fill } { center },
    { title       } { \l_@@_info_title_tl } { \zihao { 2 } \sffamily }
                    { 65 pt plus 0.3 fill } { center },
    { instructors } { \@@_cover_instructors: } { \@@_line_spread:n {0.88} \zihao { 3 } \bfseries }
                    { 75 pt plus 0.3 fill } { center },
    { ctitle      } { 答辩委员会 \c_@@_fwid_colon_tl } { \zihao { -3 } }
                    { -20 pt plus 0.3 fill } { left },
    { committees  } { \@@_cover_defensecommittees: } { \@@_line_spread:n {1.12} \zihao { -3 } }
                    { 60 pt plus 0.3 fill } { center },
    { date        } { 答辩日期 \c_@@_fwid_colon_tl \l_@@_info_defensedate_tl } { \zihao { -3 } }
                    { 0 pt plus 0.3 fill } { left }
  }
%    \end{macrocode}
% \end{variable}
%
% \begin{variable}{\c_@@_cover_elements_iv_clist}
% 封四元素（资助页）
%    \begin{macrocode}
\clist_const:Nn \c_@@_cover_elements_iv_clist
  {
    { foundationtitle } { 项目资助 } { \nwafu@hei \Large }
%    \end{macrocode}
% 注意使用\c_zero_skip表示与下一个元素的间距
%    \begin{macrocode}
                        { \c_zero_skip } { center },
    { foundation      } { \@@_cover_foundation: } { \sffamily \zihao { 3 } }
                        { 0 pt plus 0.3 fill } { center }
  }
%    \end{macrocode}
% \end{variable}
%
% \begin{variable}{\c_@@_cover_elements_v_clist}
%    \begin{macrocode}
% 封五元素（研究生声明页）
\clist_const:Nn \c_@@_cover_elements_v_clist
  {
    { originality-decl-name } { \c_@@_name_orig_decl_tl } { \@@_line_spread:n { 1.2 } \zihao { 3 } \sffamily }
                              { 0.25 cm } { center },
    { originality-decl-text } { \par \indent \c_@@_orig_decl_text_tl \par } { \zihao { -4 } }
                              { 0.4 cm } { normal },
    { originality-decl-sig  } { \@@_cover_signature:N \c_@@_orig_decl_sign_tl } { \zihao { -4 } }
                              { 0.4 cm } { left },
    { supervisor-decl-name  } { \c_@@_name_super_decl_tl } { \@@_line_spread:n { 1.2 } \zihao { 3 } \sffamily }
                              { 0.25 cm } { center },
    { supervisor-decl-text  } { \par \indent \c_@@_super_decl_text_tl \par } { \zihao { -4 } }
                              { 0.4 cm } { normal },
    { supervisor-decl-sig   } { \@@_cover_signature:N \c_@@_super_decl_sign_tl } { \zihao { -4 } }
                              { 0 pt plus 0.3 fill } { left }
  }
%    \end{macrocode}
% \end{variable}
%
% \begin{variable}{\c_@@_cover_elements_vi_clist}
% 封六元素（研究生授权页）
%    \begin{macrocode}
\clist_const:Nn \c_@@_cover_elements_vi_clist
  {
    { authorization-decl-name } { \c_@@_name_auth_decl_tl } { \@@_line_spread:n { 1.2 } \zihao { 3 } \sffamily }
                                { 0.25 cm } { center },
    { authorization-decl-text } { \par \indent \c_@@_auth_decl_text_tl \par } { \zihao { -4 } }
                                { 0.8 cm } { normal },
    { authorization-decl-sig  } { \@@_cover_signature:N \c_@@_orig_decl_sign_tl } { \zihao { -4 } }
                                { 0 pt plus 0.3 fill } { left },
    { supervisor-decl-sig     } { \@@_cover_signature:N \c_@@_super_decl_sign_tl } { \zihao { -4 } }
                                { 0 pt plus 0.3 fill } { left }
  }
%    \end{macrocode}
% \end{variable}
%
% \begin{variable}{\c_@@_cover_elements_vii_clist}
% 封七元素（本科声明+授权页）
%    \begin{macrocode}
\clist_const:Nn \c_@@_cover_elements_vii_clist
  {
    { originality-decl-name   } { \c_@@_name_orig_decl_tl } { \@@_line_spread:n { 1.2 } \zihao { 3 } \sffamily }
                                { 0.25 cm } { center },
    { originality-decl-text   } { \par \indent \c_@@_orig_decl_text_tl \par } { \zihao { -4 } \nwafu@kai }
                                { 0.4 cm } { normal },
    { originality-decl-sig    } { \@@_cover_signature:N \c_@@_orig_decl_sign_tl } { \zihao { -4 } \nwafu@kai }
                                { 0.4 cm } { left },
    { authorization-decl-name } { \c_@@_name_auth_decl_tl } { \@@_line_spread:n { 1.2 } \zihao { 3 } \sffamily }
                                { 0.25 cm } { center },
    { authorization-decl-text } { \par \indent \c_@@_auth_decl_text_tl \par } { \zihao { -4 } \nwafu@kai }
                                { 0.4 cm } { normal },
    { authorization-decl-sig  } { \@@_cover_signature:N \c_@@_orig_decl_sign_tl } { \zihao { -4 } \nwafu@kai }
                                { -0.5 cm } { left },
    { supervisor-decl-sig     } { \@@_cover_signature:N \c_@@_super_decl_sign_tl } { \zihao { -4 } \nwafu@kai }
                                { 0 pt plus 0.3 fill } { left }
  }
%    \end{macrocode}
% \end{variable}
%
% \subsubsection{定义封面页面元素}
%
% \changes{v2.00}{2026/04/30}{添加本科封面实例(本模板定义为封0)。}
%
% \begin{macro}{\@@_cover_ii_type_content:}
% 辅助函数：动态生成封二内容
%    \begin{macrocode}
\cs_new:Npn \@@_cover_ii_type_content:
  {
    \int_case:nn { \g_@@_thesis_type_int }
      {
        {1}
          {
            \@@_fixed_width_center_box:nn { 0.85 \textwidth }
              {
                Dissertation~Submitted~to~\@@_name_en: \\
                in~Partial~Fulfillment~of~the~Requirements \\
                \int_case:nn { \l_@@_info_postgraduate_type_int }
                  {
                    {1}{ for~the~Degree~of \\ }
                    {2}{ for~the~Professional~Degree~of \\ }
                  }
                Doctor~of~
                \int_case:nn { \l_@@_info_postgraduate_type_int }
                  {
                    {1}{ Philosophy }
                    {2}{ \l_@@_info_engineering_title_en_tl }
                  }
              }
          }
        {2}
          {
            \@@_fixed_width_center_box:nn { 0.85 \textwidth }
              {
                Dissertation~Submitted~to~\@@_name_en: \\
                in~Partial~Fulfillment~of~the~Requirements \\
                \int_case:nn { \l_@@_info_postgraduate_type_int }
                  {
                    {1}{ for~the~Degree~of \\ }
                    {2}{ for~the~Professional~Degree~of \\ }
                  }
                Master~of~
                \int_case:nn { \l_@@_info_postgraduate_type_int }
                  {
                    {1}{ \l_@@_info_mastertype_en_tl }
                    {2}{ \l_@@_info_engineering_title_en_tl }
                  }
              }
          }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_declare_cover_element:nnnnnn}
% 辅助函数：声明一个元素
% \begin{arguments}
%   \item 前缀 (如 cover/o)
%   \item 元素名称 (如 logo)
%   \item 内容
%   \item 格式
%   \item 底部间距
%   \item 对齐方式
% \end{arguments}
%    \begin{macrocode}
\cs_new_protected:Npn \@@_declare_cover_element:nnnnnn #1#2#3#4#5#6
  {
    \@@_declare_element:nn { #1 / #2 }
      {
        content     = {#3},
        format      = {#4},
        bottom-skip = {#5},
        align       = {#6}
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_declare_cover_elements:nn}
% 辅助函数：批量声明一组元素
% \begin{arguments}
%   \item 前缀 (如 cover/o)
%   \item 元素clist列表
% \end{arguments}
%    \begin{macrocode}
\cs_new_protected:Npn \@@_declare_cover_elements:nn #1#2
  {
    \clist_map_inline:Nn #2
    {
      \@@_declare_cover_element:nnnnnn { #1 } ##1
    }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{声明封面页面元素}
%
% 执行批量声明
% 封0元素（本科封面）
%    \begin{macrocode}
\@@_declare_cover_elements:nn { cover / o } \c_@@_cover_elements_o_clist
%    \end{macrocode}
% 封一元素（研究生中文封面）
%    \begin{macrocode}
\@@_declare_cover_elements:nn { cover / i / grad } \c_@@_cover_elements_i_graduate_clist
%    \end{macrocode}
% 封一元素（本科中文封面）
%    \begin{macrocode}
\@@_declare_cover_elements:nn { cover / i / bach } \c_@@_cover_elements_i_bachelor_clist
%    \end{macrocode}
% 封二元素（研究生英文封面）
%    \begin{macrocode}
\@@_declare_cover_elements:nn { cover / ii } \c_@@_cover_elements_ii_clist
%    \end{macrocode}
% 封三元素（研究生题名页）
%    \begin{macrocode}
\@@_declare_cover_elements:nn { cover / iii } \c_@@_cover_elements_iii_clist
%    \end{macrocode}
% 封四元素（资助页）
%    \begin{macrocode}
\@@_declare_cover_elements:nn { cover / iv } \c_@@_cover_elements_iv_clist
%    \end{macrocode}
% 封五元素（研究生声明页）
%    \begin{macrocode}
\@@_declare_cover_elements:nn { cover / v } \c_@@_cover_elements_v_clist
%    \end{macrocode}
% 封六元素（研究生授权页）
%    \begin{macrocode}
\@@_declare_cover_elements:nn { cover / vi } \c_@@_cover_elements_vi_clist
%    \end{macrocode}
% 封七元素（本科声明+授权页）
%    \begin{macrocode}
\@@_declare_cover_elements:nn { cover / vii } \c_@@_cover_elements_vii_clist
%    \end{macrocode}
%
% \subsubsection{定义封面页面参数}
%
% \begin{macro}{cover-o-default}
% 本科封0
%    \begin{macrocode}
\@@_declare_page:nx { cover-o-default }
  {
    content     = { logo, type, titlezh, titleen, info, date },
    prefix      = cover / o /,
    bottom-skip = 0 pt plus 1.5 fill
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{cover-i-default}
% 封一。
%    \begin{macrocode}
\@@_declare_page:nx { cover-i-default }
  {
    content     = \int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 }
                    {
%    \end{macrocode}
% 研究生封面一
%    \begin{macrocode}
                      { logo, type, titlezh, info, date}
                    }{
%    \end{macrocode}
% 本科封面一
%    \begin{macrocode}
                      { id, logo, type, titlezh, titleen, info, date }
                    },
    prefix      = cover / i / \int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 }
                                { grad } { bach } /,
    top-skip    = \int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 }
                    {
                      30 pt plus 1.5 fill,
                    }{
                      -40 pt plus 1.5 fill,
                    },
    bottom-skip = 0 pt plus 1.5 fill
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{cover-ii-default}
% 封二(仅研究生用)。
%    \begin{macrocode}
\@@_declare_page:nn { cover-ii-default }
  {
    content     = { type, title, info, date },
    prefix      = cover / ii /,
    top-skip    = 30 pt plus 0.1 fill,
    bottom-skip = 0 pt plus 1.5 fill
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{cover-iii-default}
% 封三(仅研究生用)。
%    \begin{macrocode}
\@@_declare_page:nn { cover-iii-default }
  {
    content     = { id, type, title, instructors, ctitle, committees, date },
    prefix      = cover / iii /,
    top-skip    = -55 pt plus 0.1 fill,
    bottom-skip = 0 pt plus 0.5 fill
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{cover-iv-default}
% 封四。
%    \begin{macrocode}
\@@_declare_page:nx { cover-iv-default }
  {
    content     = \int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 }
                {
%    \end{macrocode}
% 研究生
%    \begin{macrocode}
                    { foundation }
                }{
%    \end{macrocode}
% 本科
%    \begin{macrocode}
                    { foundationtitle, foundation }
                },
    prefix      = cover / iv /,
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{cover-v-default}
% 封五(仅研究生用)。
%    \begin{macrocode}
\@@_declare_page:nn { cover-v-default }
  {
    content     = { originality-decl-name,
                    originality-decl-text,
                    originality-decl-sig,
                    supervisor-decl-name,
                    supervisor-decl-text,
                    supervisor-decl-sig
                  },
    prefix      = cover / v /,
    format      = \@@_line_spread:n { 1.25 },
    top-skip    = 0 pt plus 0.2 fill,
    bottom-skip = 0 pt plus 2.5 fill
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{cover-vi-default}
% 封六(仅研究生用)。
%    \begin{macrocode}
\@@_declare_page:nn { cover-vi-default }
  {
    content     = { authorization-decl-name,
                    authorization-decl-text,
                    authorization-decl-sig,
                    supervisor-decl-sig
                  },
    prefix      = cover / vi /,
    format      = \@@_line_spread:n { 1.25 },
    top-skip    = 0 pt plus 0.2 fill,
    bottom-skip = 0 pt plus 2.5 fill
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{cover-vii-default}
% 封七(仅本科用)。
%    \begin{macrocode}
\@@_declare_page:nn { cover-vii-default }
  {
    content     = { originality-decl-name,
                    originality-decl-text,
                    originality-decl-sig,
                    authorization-decl-name,
                    authorization-decl-text,
                    authorization-decl-sig,
                    supervisor-decl-sig
                  },
    prefix      = cover / vii /,
    format      = \@@_line_spread:n { 1.25 },
    top-skip    = 0 pt plus 0.2 fill,
    bottom-skip = 0 pt plus 2.5 fill
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{排版封面}
%
% \begin{macro}{\makecovero,\makecoveri,\makecoverii,\makecoveriii,
%     \makecoveriv,\makecoverv,\makecovervi,\makecovervii}
% 封面一$\sim$七，其中一$\sim$六为研究生使用，0、一、四和七为本科使用。
%    \begin{macrocode}
% 封面0，本科封面
\NewDocumentCommand \makecovero { }
  {
    \thispagestyle { empty }
    \newgeometry{top=1.0in, bottom=1.0in, left=1.25in, right=1.25in}
    \UseInstance { nwafu } { cover-o-default }
    \restoregeometry
  }
%    \end{macrocode}
% 封面一，研究生、本科中文封面
%    \begin{macrocode}
\NewDocumentCommand \makecoveri { }
  {
    \thispagestyle { empty }
    \newgeometry{top=1.0in, bottom=1.0in, left=1.25in, right=1.25in}
    \UseInstance { nwafu } { cover-i-default }
    \restoregeometry
  }
%    \end{macrocode}
% 封面二，研究生英文封面
%    \begin{macrocode}
\NewDocumentCommand \makecoverii { }
  {
    \thispagestyle { empty }
    \newgeometry{top=1.0in, bottom=1.0in, left=1.25in, right=1.25in}
    \UseInstance { nwafu } { cover-ii-default }
    \restoregeometry
  }
%    \end{macrocode}
% 封面三，研究生封面内页(ID、答辩委员会等)
%    \begin{macrocode}
\NewDocumentCommand \makecoveriii { }
  {
    \thispagestyle { empty }
    \newgeometry{top=1.0in, bottom=1.0in, left=1.25in, right=1.25in}
    \UseInstance { nwafu } { cover-iii-default }
    \restoregeometry
  }
%    \end{macrocode}
% 封面四，研究生项目资助页
%    \begin{macrocode}
\NewDocumentCommand \makecoveriv { }
  {
    \thispagestyle { empty }
    \newgeometry{top=1.0in, bottom=1.0in, left=1.25in, right=1.25in}
    \UseInstance { nwafu } { cover-iv-default }
    \restoregeometry
  }
%    \end{macrocode}
% 封面五，研究生独创性声明与导师承诺
%    \begin{macrocode}
\NewDocumentCommand \makecoverv { }
  {
    \thispagestyle { empty }
    \newgeometry{top=1.0in, bottom=1.0in, left=1.25in, right=1.25in}
    \UseInstance { nwafu } { cover-v-default }
    \restoregeometry
  }
%    \end{macrocode}
% 封面六，研究生论文使用授权说明
%    \begin{macrocode}
\NewDocumentCommand \makecovervi { }
  {
    \thispagestyle { empty }
    \newgeometry{top=1.0in, bottom=1.0in, left=1.25in, right=1.25in}
    \UseInstance { nwafu } { cover-vi-default }
    \restoregeometry
  }
%    \end{macrocode}
% 封面七，本科生独创性声明及论文使用授权说明
%    \begin{macrocode}
\NewDocumentCommand \makecovervii { }
  {
    \thispagestyle { empty }
    \newgeometry{top=1.0in, bottom=1.0in, left=1.25in, right=1.25in}
    \UseInstance { nwafu } { cover-vii-default }
    \restoregeometry
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{自动生成封面}
%
% \begin{macro}{style/auto-make-cover}
% \begin{variable}{\g_@@_auto_make_cover_bool}
% 是否自动生成封面。
%    \begin{macrocode}
\bool_new:N \g_@@_auto_make_cover_bool
\keys_define:nn { nwafu / style }
  {
    auto-make-cover .bool_gset:N = \g_@@_auto_make_cover_bool,
    auto-make-cover .default:n  = true
  }
%    \end{macrocode}
% \end{variable}
% \end{macro}
%
% \changes{v2.13}{2026/05/12}{将研究生封一到封五设置为从奇数页起排。}
%
% \begin{macro}{\makecovers}
% 排版所有封面。
%    \begin{macrocode}
\NewDocumentCommand \makecovers { }
  {
    \int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 }
      {
%    \end{macrocode}
% 研究生
%    \begin{macrocode}
        \begin{titlepage}
          \makecoveri
          \cleardoublepage
          \makecoverii
          \cleardoublepage
          \makecoveriii
          \clist_if_empty:NF \l_@@_info_foundation_clist
            {
              \cleardoublepage
              \makecoveriv
            }
          \cleardoublepage
          \makecoverv
          \newpage
          \makecovervi
        \end{titlepage}
      }{
%    \end{macrocode}
% 本科
%    \begin{macrocode}
        \begin{titlepage}
          \makecovero
          \cleardoublepage
          \makecoveri
          \clist_if_empty:NF \l_@@_info_foundation_clist
            {
              \cleardoublepage
              \makecoveriv
            }
          \cleardoublepage
          \makecovervii
        \end{titlepage}
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \subsection{前料}
%
% \subsubsection{字段声明}
%
% \begin{variable}{\l_@@_abstract_file_tl,
%   \l_@@_abstract_file_en_tl,
%   \l_@@_abstract_keywords_clist,
%   \l_@@_abstract_keywords_en_clist,
%   \l_@@_notation_file_tl,
%   \l_@@_terminology_file_tl}
% 前料字段。
%    \begin{macrocode}
\tl_new:N    \l_@@_abstract_file_tl
\tl_new:N    \l_@@_abstract_file_en_tl
\clist_new:N \l_@@_abstract_keywords_clist
\clist_new:N \l_@@_abstract_keywords_en_clist
\tl_new:N    \l_@@_notation_file_tl
\tl_new:N    \l_@@_terminology_file_tl
%    \end{macrocode}
% \end{variable}
%
% \subsubsection{选项声明}
%
%    \begin{macrocode}
\keys_define:nn { nwafu / abstract }
  {
%    \end{macrocode}
%
% \begin{macro}{abstract/abstractfile, abstract/abstractfile*}
% 摘要文件的文件名
%    \begin{macrocode}
    abstractfile  .tl_set:N = \l_@@_abstract_file_tl,
    abstractfile* .tl_set:N = \l_@@_abstract_file_en_tl,
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{abstract/keywords, abstract/keywords*}
% 论文关键字列表。
%    \begin{macrocode}
    keywords  .clist_set:N = \l_@@_abstract_keywords_clist,
    keywords* .clist_set:N = \l_@@_abstract_keywords_en_clist,
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{abstract/notation}
% 符号表tex源文件的文件名。
%    \begin{macrocode}
    notationfile  .tl_set:N  = \l_@@_notation_file_tl,
    notationfile  .default:n = {},
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{abstract/terminology}
% 术语表tex源文件的文件名。
%    \begin{macrocode}
    termfile  .tl_set:N  = \l_@@_terminology_file_tl,
    termfile  .default:n = {},
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{定义摘要环境}
%
% \begin{environment}{abstract}
% \begin{environment}{abstract*}
% 摘要环境，定义中英文双语摘要。
%    \begin{macrocode}
\NewDocumentEnvironment { abstract  } { }
  { \@@_abstract_begin:    } { \@@_abstract_end:      }
\NewDocumentEnvironment { abstract* } { }
  { \@@_abstract_en_begin: } { \@@_abstract_en_end:   }
%    \end{macrocode}
% \end{environment}
% \end{environment}
%
% \begin{macro}{\@@_abstract_begin:,\@@_abstract_en_begin:}
% 摘要页标题。
%    \begin{macrocode}
\cs_new_protected:Npn \@@_abstract_begin:
  {
    \int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 }
      {
        \@@_chapter:V \c_@@_name_abstract_tl
      }{
        \@@_chapter:V \c_@@_name_abstract_tl
        \par \mode_leave_vertical: \par
      }
  }
\cs_new_protected:Npn \@@_abstract_en_begin:
  {
    \int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 }
      {
        \@@_chapter:n \c_@@_name_abstract_en_tl
      }{
        \@@_chapter:n \c_@@_name_abstract_en_tl
        \par \mode_leave_vertical: \par
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_abstract_end:,\@@_abstract_en_end:}
% 摘要正文完成后，输出关键字列表。
%    \begin{macrocode}
\cs_new_protected:Npn \@@_abstract_end:
  {
    \@@_keywords:nNn
      { \c_@@_name_keywords_tl \c_@@_fwid_colon_tl }
      \l_@@_abstract_keywords_clist { ; ~}
  }
\cs_new_protected:Npn \@@_abstract_en_end:
  {
    \@@_keywords:nNn
      {\c_@@_name_keywords_en_tl : ~ }
      \l_@@_abstract_keywords_en_clist { ; ~ }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_keywords:nNn,\@@_keywords_prevdepth:}
% 关键字列表前要空一行，使用悬挂缩进。|\parbox| 之后的间距
% 需要调整，见 \url{https://tex.stackexchange.com/a/34982}。
%    \begin{macrocode}
\cs_new_protected:Npn \@@_keywords:nNn #1#2#3
  {
    \int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 }
      {
        \par \mode_leave_vertical: \par \noindent
        \@@_get_text_width:Nn \l_@@_tmpa_dim {#1}
        \group_begin: \small\bfseries \MakeUppercase{#1} \group_end:
        \parbox [t] { \dim_eval:n { \textwidth - \l_@@_tmpa_dim } }
          {
            \small
            \clist_use:Nn #2 {#3} \par
            \cs_gset:Npx \@@_keywords_prevdepth: { \dim_use:N \tex_prevdepth:D }
          }
      }{
        \par \mode_leave_vertical: \par
        \@@_get_text_width:Nn \l_@@_tmpa_dim {#1}
        \group_begin:  \small\bfseries \MakeUppercase{#1} \group_end:
        \group_begin:
          \small
          \clist_use:Nn #2 {#3} \par
          \cs_gset:Npx \@@_keywords_prevdepth: { \dim_use:N \tex_prevdepth:D }
        \group_end:
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \changes{v2.00}{2026/04/30}{添加插图与附表清单环境(本科需要)。}
%
% \subsubsection{定义插图与附表清单环境}
%
% \begin{environment}{figtablist}
% 插图与附表清单，利用 \env{figtablist} 封装。
%    \begin{macrocode}
\NewDocumentEnvironment { figtablist } { }
  {
    \group_begin:
      \@@_chapter:V \c_@@_name_figtabtoc_tl
      \RenewDocumentCommand \addvspace { m } { }
      \RenewDocumentCommand \listoffigures { } { \@starttoc { lof } }
      \RenewDocumentCommand \listoftables  { } { \@starttoc { lot } }
  }
  {
    \group_end:
  }
%    \end{macrocode}
% \end{environment}
%
% \changes{v2.14}{2026/05/14}{用\pkg{tabularray}宏包重构\env{notation}和\env{terminology}环境。}
%
% 设置表头空样式
%    \begin{macrocode}
\NewTblrTheme{empty}{
    \SetTblrStyle{firstfoot,middlefoot,lastfoot}{font=\small}
    \DefTblrTemplate{firsthead}{default}{}
    \DefTblrTemplate{middlehead}{default}{}
    \DefTblrTemplate{lasthead}{default}{}
    \DefTblrTemplate{contfoot-text}{default}{（接下页）}
  }
%    \end{macrocode}
%
% \subsubsection{定义符号表环境}
%
% \begin{environment}{notation}
% 符号表环境，基于 \pkg{tabularray}宏包的\env{longtblr}环境实现。
%    \begin{macrocode}
\NewDocumentEnvironment { notation } { O{ } }
  {
    \group_begin:
      \@@_notation_begin:
      \begin{longtblr}[
        theme = empty,
        presep = 0pt,
      ]{
        width      = 0.95\textwidth,
        colspec    = { X[2,c,m] X[2,c,m] X[5.5,l,m] },
        hline{1,Z} = { \heavyrulewidth, solid },
        hline{2}   = { \lightrulewidth, solid },
        row{1}     = { c, m, font = \small\bfseries },
        #1,
      }
  }
  {
      \end{longtblr}
    \group_end:
  }
%    \end{macrocode}
% \end{environment}
%
% \begin{macro}{\@@_notation_begin:}
% 目录中符号表条目处理。
%    \begin{macrocode}
\cs_new_protected:Npn \@@_notation_begin:
  {
    \int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 }
      {
        \@@_chapter_no_toc:V \c_@@_name_notation_tl
      }{
        \@@_chapter:V \c_@@_name_notation_tl
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \changes{v2.00}{2026/04/30}{添加术语表环境(本科需要)。}
%
% \subsubsection{定义术语表环境}
%
% \begin{environment}{terminology}
% 术语表环境，基于 \pkg{tabularray}宏包的\env{longtblr}环境实现。
%    \begin{macrocode}
\NewDocumentEnvironment { terminology } { O{ } }
  {
    \group_begin:
      \@@_terminology_begin:
      \begin{longtblr}[
        theme = empty,
        presep = 0pt,
      ]{
        width      = 0.95\textwidth,
        colspec    = { X[3,c,m] X[6.5,l,m] },
        hline{1,Z} = { \heavyrulewidth, solid },
        hline{2}   = { \lightrulewidth, solid },
        row{1}     = {c, m, font = \small\bfseries },
        #1,
      }
  }
  {
      \end{longtblr}
    \group_end:
  }
%    \end{macrocode}
% \end{environment}
%
% \begin{macro}{\@@_terminology_begin:}
% 目录中术语表条目处理。
%    \begin{macrocode}
\cs_new_protected:Npn \@@_terminology_begin:
  {
    \int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 }
      {
        \@@_chapter_no_toc:V \c_@@_name_terminology_tl
      }{
        \@@_chapter:V \c_@@_name_terminology_tl
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \changes{v2.13}{2026/05/12}{按2026年研究生撰写规范修订研究生前料页码格式。}
% \changes{v2.00}{2026/04/30}{为2026版本科摘要、目次等添加页眉，页码连续编号。}
% \changes{v1.11}{2022/04/02}{修复摘要后的所有页面尺寸。}
%
% \subsubsection{辅助函数}
% 前料组件排版命令
% \begin{macro}{\@@_front_component_abstract_zh:}
% 中文摘要。
%    \begin{macrocode}
\cs_new_protected:Npn \@@_front_component_abstract_zh:
  {
    \tl_if_empty:NF \l_@@_abstract_file_tl
      {
        \cleardoublepage
        \begin{abstract}
          \file_input:V \l_@@_abstract_file_tl
        \end{abstract}
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_front_component_abstract_en:}
% 英文摘要（研究生版本）
%    \begin{macrocode}
\cs_new_protected:Npn \@@_front_component_abstract_en:
  {
    \tl_if_empty:NF \l_@@_abstract_file_en_tl
      {
        \cleardoublepage
        \begin{abstract*}
          \file_input:V \l_@@_abstract_file_en_tl
        \end{abstract*}
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_front_component_abstract_en_bachelor:}
% 英文摘要（本科版本，需要 \cleardoublepage）
%    \begin{macrocode}
\cs_new_protected:Npn \@@_front_component_abstract_en_bachelor:
  {
    \tl_if_empty:NF \l_@@_abstract_file_en_tl
      {
        \cleardoublepage
        \begin{abstract*}
          \file_input:V \l_@@_abstract_file_en_tl
        \end{abstract*}
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_front_component_toc_graduate:}
% 目录（研究生版本）
%    \begin{macrocode}
\cs_new_protected:Npn \@@_front_component_toc_graduate:
  {
    \cleardoublepage
    \tableofcontents
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_front_component_toc_bachelor:}
% 目录（本科版本）
%    \begin{macrocode}
\cs_new_protected:Npn \@@_front_component_toc_bachelor:
  {
    \cleardoublepage
    \tableofcontents
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_front_component_notation:}
% 符号表（本科版本）
%    \begin{macrocode}
\cs_new_protected:Npn \@@_front_component_notation:
  {
    \tl_if_empty:NF \l_@@_notation_file_tl
      {
        \cleardoublepage
        \file_input:V \l_@@_notation_file_tl
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_front_component_notation_graduate:}
% 符号表（研究生版本，需要设置页码）
%    \begin{macrocode}
\cs_new_protected:Npn \@@_front_component_notation_graduate:
  {
    \tl_if_empty:NF \l_@@_notation_file_tl
      {
        \cleardoublepage
        \file_input:V \l_@@_notation_file_tl
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_front_component_terminology:}
% 术语表（本科专用）
%    \begin{macrocode}
\cs_new_protected:Npn \@@_front_component_terminology:
  {
    \tl_if_empty:NF \l_@@_terminology_file_tl
      {
        \cleardoublepage
        \file_input:V \l_@@_terminology_file_tl
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_front_component_figtabtoc:}
% 插图与附表清单（本科专用）
%    \begin{macrocode}
\cs_new_protected:Npn \@@_front_component_figtabtoc:
  {
    \bool_if:NT \g_@@_figtabtoc_bool
      {
        \cleardoublepage
        \begin{figtablist}
          \listoffigures
          \listoftables
        \end{figtablist}
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_execute_frontmatter:n}
% 通用流程执行函数
%    \begin{macrocode}
\cs_new_protected:Npn \@@_execute_frontmatter:n #1
  {
    \clist_map_inline:Nn #1
      {
        \use:n { ##1 }
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_makefront_graduate:,
%  \@@_makefront_bachelor:}
% 研究生流程
%    \begin{macrocode}
\cs_new_protected:Npn \@@_makefront_graduate:
  {
    \frontmatter
    \@@_execute_frontmatter:n \c_@@_frontmatter_graduate_clist
  }
%    \end{macrocode}
% 本科流程
%    \begin{macrocode}
\cs_new_protected:Npn \@@_makefront_bachelor:
  {
    \frontmatter
    \@@_execute_frontmatter:n \c_@@_frontmatter_bachelor_clist
  }
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{前料流程配置列表}
%
% \begin{variable}{\c_@@_frontmatter_graduate_clist,
%   \c_@@_frontmatter_bachelor_clist}
% 研究生前料流程。
%    \begin{macrocode}
\clist_const:Nn \c_@@_frontmatter_graduate_clist
  {
    { \@@_front_component_abstract_zh:       },
    { \@@_front_component_abstract_en:       },
    { \@@_front_component_toc_graduate:      },
    { \@@_front_component_notation_graduate: }
  }
%    \end{macrocode}
% 本科生前料流程。
%    \begin{macrocode}
\clist_const:Nn \c_@@_frontmatter_bachelor_clist
  {
    { \@@_front_component_abstract_zh:          },
    { \@@_front_component_abstract_en_bachelor: },
    { \@@_front_component_toc_bachelor:         },
    { \@@_front_component_figtabtoc:            },
    { \@@_front_component_notation:             },
    { \@@_front_component_terminology:          }
  }
%    \end{macrocode}
% \end{variable}
%
% \subsubsection{排版前料}
%
% \begin{macro}{\makefront}
% 排版摘要、目录等前料。
%    \begin{macrocode}
\NewDocumentCommand \makefront { }
  {
%    \end{macrocode}
% 恢复页面尺寸
%    \begin{macrocode}
    \restoregeometry
%    \end{macrocode}
% 排版前料内容
%    \begin{macrocode}
    \int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 }
%    \end{macrocode}
% 研究生
%    \begin{macrocode}
      { \@@_makefront_graduate: }
%    \end{macrocode}
% 本科生
%    \begin{macrocode}
      { \@@_makefront_bachelor: }
  }
%    \end{macrocode}
% \end{macro}
%
% 在 \env{document} 开始位置添加封面以及摘要、目录、符号表、术语表等前料内容。
%
%    \begin{macrocode}
\ctex_after_end_preamble:n
  {
    \bool_if:NT \g_@@_auto_make_cover_bool
      {
        \makecovers
        \makefront
      }
  }
%    \end{macrocode}
%
% \subsection{目录}
%
% 设置目录标题。
%    \begin{macrocode}
\keys_set:nn { ctex }
  {
    contentsname   = \c_@@_name_toc_tl,
    listfigurename = \c_@@_name_lof_tl,
    listtablename  = \c_@@_name_lot_tl,
  }
%    \end{macrocode}
%
% \begin{variable}{\c_@@_toc_levels_clist}
% 目录级别配置数据
% \begin{description}
%   \item[格式] 格式：|{|级别名称|}{|是否为图表(0/1)|}|
% \end{description}
%    \begin{macrocode}
\clist_const:Nn \c_@@_toc_levels_clist
  {
    { chapter    } { 0 },
    { section    } { 0 },
    { subsection } { 0 },
    { figure     } { 1 },
    { table      } { 1 }
  }
%    \end{macrocode}
% \end{variable}
%
% \begin{variable}{\@@_toc_chapter_format_tl,
%   \@@_toc_chapter_indent_tl,
%   \@@_toc_chapter_rule_tl,
%   \@@_toc_chapter_numsep_tl,
%   \@@_toc_section_format_tl,
%   \@@_toc_section_indent_tl,
%   \@@_toc_section_rule_tl,
%   \@@_toc_section_numsep_tl,
%   \@@_toc_subsection_format_tl,
%   \@@_toc_subsection_indent_tl,
%   \@@_toc_subsection_rule_tl,
%   \@@_toc_subsection_numsep_tl,
%   \@@_toc_figure_format_tl,
%   \@@_toc_figure_indent_tl,
%   \@@_toc_figure_rule_tl,
%   \@@_toc_figure_numsep_tl,
%   \@@_toc_table_format_tl,
%   \@@_toc_table_indent_tl,
%   \@@_toc_table_rule_tl,
%   \@@_toc_table_numsep_tl,
%   \@@_toc_chapter_offset_dim,
%   \@@_toc_section_offset_dim,
%   \@@_toc_subsection_offset_dim,
%   \@@_toc_figure_offset_dim,
%   \@@_toc_table_offset_dim,
%   \@@_toc_line_align_bool,
%   \@@_titletoc_hang_fix_bool}
% 目录设置中需要的变量。
%    \begin{macrocode}
\clist_map_inline:nn { chapter, section, subsection, figure, table }
  {
%    \end{macrocode}
% tl变量
%    \begin{macrocode}
    \clist_map_inline:nn { format, indent, rule, numsep }
      { \tl_new:c { @@_toc_ #1 _ ##1 _tl } }

%    \end{macrocode}
% dim变量
%    \begin{macrocode}
    \dim_new:c { @@_toc_ #1 _offset_dim }
  }
%    \end{macrocode}
% bool变量
%    \begin{macrocode}
\bool_new:N \@@_toc_line_align_bool
\bool_new:N \@@_titletoc_hang_fix_bool
%    \end{macrocode}
% \end{variable}

% \begin{macro}{\@@_setup_toc_format_graduate:,}
% 目录格式设置(设置目录变量取值)
%
% 研究生目录格式设置
%    \begin{macrocode}
\cs_new_protected:Npn \@@_setup_toc_format_graduate:
  {
%    \end{macrocode}
% chapter(章)
%    \begin{macrocode}
    \tl_set:Nn  \@@_toc_chapter_format_tl  { \addvspace{1pt} \nwafu@hei }
    \tl_set:Nn  \@@_toc_chapter_indent_tl  { 0pc                        }
    \tl_set:Nn  \@@_toc_chapter_rule_tl    { \tocrule{$\cdot$}          }
    \tl_set:Nn  \@@_toc_chapter_numsep_tl  { 0.5\ccwd                   }
    \dim_set:Nn \@@_toc_chapter_offset_dim { 0pc                        }
%    \end{macrocode}
% section(节)
%    \begin{macrocode}
    \tl_set:Nn  \@@_toc_section_format_tl  { \addvspace{0pt}   }
    \tl_set:Nn  \@@_toc_section_indent_tl  { \ccwd             }
    \tl_set:Nn  \@@_toc_section_rule_tl    { \tocrule{$\cdot$} }
    \tl_set:Nn  \@@_toc_section_numsep_tl  { 0.5\ccwd          }
    \dim_set:Nn \@@_toc_section_offset_dim { 0pc               }
%    \end{macrocode}
% subsection(小节)
%    \begin{macrocode}
    \tl_set:Nn  \@@_toc_subsection_format_tl  { \addvspace{0pt}   }
    \tl_set:Nn  \@@_toc_subsection_indent_tl  { 2.0\ccwd          }
    \tl_set:Nn  \@@_toc_subsection_rule_tl    { \tocrule{$\cdot$} }
    \tl_set:Nn  \@@_toc_subsection_numsep_tl  { 0.5\ccwd          }
    \dim_set:Nn \@@_toc_subsection_offset_dim { 0pc               }
%    \end{macrocode}
% figure(图)
%    \begin{macrocode}
    \tl_set:Nn  \@@_toc_figure_format_tl  { \addvspace{0pt}   }
    \tl_set:Nn  \@@_toc_figure_indent_tl  { 0pc               }
    \tl_set:Nn  \@@_toc_figure_rule_tl    { \tocrule{$\cdot$} }
    \tl_set:Nn  \@@_toc_figure_numsep_tl  { 0.5\ccwd          }
    \dim_set:Nn \@@_toc_figure_offset_dim { 0pc               }
%    \end{macrocode}
% table(表)
%    \begin{macrocode}
    \tl_set:Nn  \@@_toc_table_format_tl  { \addvspace{0pt}   }
    \tl_set:Nn  \@@_toc_table_indent_tl  { 0pc               }
    \tl_set:Nn  \@@_toc_table_rule_tl    { \tocrule{$\cdot$} }
    \tl_set:Nn  \@@_toc_table_numsep_tl  { 0.5\ccwd          }
    \dim_set:Nn \@@_toc_table_offset_dim { 0pc               }
%    \end{macrocode}
% align和hang(对齐和悬挂状态)
%    \begin{macrocode}
    \bool_set_false:N \@@_toc_line_align_bool
    \bool_set_false:N \@@_titletoc_hang_fix_bool
  }
%    \end{macrocode}
% 本科生目录格式设置
%    \begin{macrocode}
\cs_new_protected:Npn \@@_setup_toc_format_bachelor:
  {
%    \end{macrocode}
% chapter(章)
%    \begin{macrocode}
    \tl_set:Nn  \@@_toc_chapter_format_tl  { \addvspace{1pt} \nwafu@hei }
    \tl_set:Nn  \@@_toc_chapter_indent_tl  { 0pc                        }
    \tl_set:Nn  \@@_toc_chapter_rule_tl    { \tocrule{$\cdot$}          }
    \tl_set:Nn  \@@_toc_chapter_numsep_tl  { 0.5\ccwd                   }
    \dim_set:Nn \@@_toc_chapter_offset_dim { 1pt                        }
%    \end{macrocode}
% section(节)
%    \begin{macrocode}
    \tl_set:Nn  \@@_toc_section_format_tl  { \addvspace{1pt} \small }
    \tl_set:Nn  \@@_toc_section_indent_tl  { \ccwd                  }
    \tl_set:Nn  \@@_toc_section_rule_tl    { \tocrule{$\cdot$}      }
    \tl_set:Nn  \@@_toc_section_numsep_tl  { 0.5\ccwd               }
    \dim_set:Nn \@@_toc_section_offset_dim { 1pt                    }
%    \end{macrocode}
% subsection(小节)
%    \begin{macrocode}
    \tl_set:Nn  \@@_toc_subsection_format_tl  { \addvspace{1pt} \small }
    \tl_set:Nn  \@@_toc_subsection_indent_tl  { 2.0\ccwd               }
    \tl_set:Nn  \@@_toc_subsection_rule_tl    { \tocrule{$\cdot$}      }
    \tl_set:Nn  \@@_toc_subsection_numsep_tl  { 0.5\ccwd               }
    \dim_set:Nn \@@_toc_subsection_offset_dim { 1pt                    }
%    \end{macrocode}
% figure(图)
%    \begin{macrocode}
    \tl_set:Nn  \@@_toc_figure_format_tl  { \addvspace{0pt}   }
    \tl_set:Nn  \@@_toc_figure_indent_tl  { 0pc               }
    \tl_set:Nn  \@@_toc_figure_rule_tl    { \tocrule{$\cdot$} }
    \tl_set:Nn  \@@_toc_figure_numsep_tl  { 0.5\ccwd          }
    \dim_set:Nn \@@_toc_figure_offset_dim { 1pt               }
%    \end{macrocode}
% table(表)
%    \begin{macrocode}
    \tl_set:Nn  \@@_toc_table_format_tl  { \addvspace{0pt}    }
    \tl_set:Nn  \@@_toc_table_indent_tl  { 0pc               }
    \tl_set:Nn  \@@_toc_table_rule_tl    { \tocrule{$\cdot$} }
    \tl_set:Nn  \@@_toc_table_numsep_tl  { 0.5\ccwd          }
    \dim_set:Nn \@@_toc_table_offset_dim { 1pt               }
%    \end{macrocode}
% align和hang(对齐和悬挂状态)
%    \begin{macrocode}
    \bool_set_false:N \@@_toc_line_align_bool
    \bool_set_false:N \@@_titletoc_hang_fix_bool
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_setup_toc_level:nn}
% 通用目录级别设置
%    \begin{macrocode}
\cs_new_protected:Npn \@@_setup_toc_level:nn #1#2
  {
    \titlecontents{#1}
%    \end{macrocode}
% 左侧缩进距离。
%    \begin{macrocode}
      [ \use:c { @@_toc_ #1 _indent_tl } ]
%    \end{macrocode}
% 标题格式，可以设置字体、加入垂直间距等，
% 垂直间距最好使用无间距重合的\textbackslash addvspace命令。
%    \begin{macrocode}
      { \use:c { @@_toc_ #1 _format_tl } }
%    \end{macrocode}
% 标题标志格式，如序号格式、序号宽度、序号与标题内容之间的间距等。
% 该参数若为空，则无标题标志。
%    \begin{macrocode}
      {
        \int_compare:nNnTF {#2} = { 1 }
          {
            \str_if_eq:nnT {#1} { figure }
              { \hspace*{0.5em}图~\thecontentslabel\quad }
            \str_if_eq:nnT {#1} { table }
              { \hspace*{0.5em}表~\thecontentslabel\quad }
          }{
            \bool_if:NT \@@_titletoc_hang_fix_bool
              {
                \contentspush
                  {
                    \thecontentslabel
%    \end{macrocode}
% 有编号的标题在目录中编号与标题的间距。
%    \begin{macrocode}
                    \hspace{ \use:c { @@_toc_ #1 _numsep_tl } }
                  }
              }
          }
      }
%    \end{macrocode}
% 无序号标题格式。
%    \begin{macrocode}
      { }
%    \end{macrocode}
% 标题与页码之间的导引线。
%    \begin{macrocode}
      { \use:c { @@_toc_ #1 _rule_tl } }
%    \end{macrocode}
% 下间距，可选参数, 用于设置标题排版后还需要执行的命令,
% 例如与下个标题的垂直间距等。
%    \begin{macrocode}
      [ \addvspace { \use:c { @@_toc_ #1 _offset_dim } } ]
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_setup_all_toc_levels:}
% 循环设置各级别目录格式。
% 代码借鉴于easybook(\url{https://gitee.com/texl3/easybook})。
%    \begin{macrocode}
\cs_new_protected:Npn \@@_setup_all_toc_levels:
  {
    \clist_map_inline:Nn \c_@@_toc_levels_clist
      {
        \@@_setup_toc_level:nn ##1
      }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_setup_toc_format:}
% 目录设置入口
%    \begin{macrocode}
\cs_new_protected:Npn \@@_setup_toc_format:
  {
%    \end{macrocode}
% 选择研究生或本科生
%    \begin{macrocode}
    \int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 }
      { \@@_setup_toc_format_graduate: }
      { \@@_setup_toc_format_bachelor: }
%    \end{macrocode}
% 设置所有目录条目的格式
%    \begin{macrocode}
    \@@_setup_all_toc_levels:
  }
%    \end{macrocode}
% 设置目录格式
%    \begin{macrocode}
\@@_setup_toc_format:
%    \end{macrocode}
% \end{macro}
%
% 自定义导引线命令。
% 代码借鉴于easybook(\url{https://gitee.com/texl3/easybook})。
%    \begin{macrocode}
\cs_new:Npn \NWAFUNumberLine #1
  {
    \CTEXifname
      {
        \use:c { CTEXthe#1 }
        \hspace{\use:c { @@_toc_#1_numsep_tl }}
      }{}
  }

%    \end{macrocode}
% 导引线。
%    \begin{macrocode}
\bool_if:NTF \@@_titletoc_hang_fix_bool
  {
%    \end{macrocode}
% CTeX格式导引线。
%    \begin{macrocode}
    \keys_set:nn { ctex }
      {
        chapter/tocline     = \CTEXnumberline{#1}#2,
        section/tocline     = \CTEXnumberline{#1}#2,
        subsection/tocline  = \CTEXnumberline{#1}#2
      }
  }{
%    \end{macrocode}
% 自定义导引线。
%    \begin{macrocode}
    \keys_set:nn { ctex }
      {
        chapter/tocline     = \NWAFUNumberLine{#1}#2,
        section/tocline     = \NWAFUNumberLine{#1}#2,
        subsection/tocline  = \NWAFUNumberLine{#1}#2,
      }
 }
%
%    \end{macrocode}
% 定义tocrule目录导引线命令。
% *星号命令能够使右侧与页码连接与不是对齐。
% 代码借鉴于easybook(\url{https://gitee.com/texl3/easybook})。
%    \begin{macrocode}
%
\NewDocumentCommand{\tocrule}{sO{0.3pc}D(){1.2}mO{}}
  {
    \small\normalfont
    \titlerule*[#2]{\scalebox{#3}{#4}}#5
    \IfBooleanTF{#1}
      {\thecontentspage}
      {
        \bool_if:NTF \@@_toc_line_align_bool
          {\contentspage}{\thecontentspage}
      }
  }
%    \end{macrocode}
%
% \subsection{致谢}
%
% \begin{environment}{acknowledgement}
% 致谢环境，只是简单地设置章节不编号标题。
%    \begin{macrocode}
\NewDocumentEnvironment { acknowledgement } { }
  {
    \group_begin:
    \@@_chapter:V \c_@@_name_ack_tl
  }
  {
    \group_end:
  }
%    \end{macrocode}
% \end{environment}
%
% \subsection{个人简历}
%
% \begin{environment}{resume}
% 个人简历环境，只是简单地设置章节不编号标题。
%    \begin{macrocode}
\NewDocumentEnvironment { resume } { }
  {
    \group_begin:
    \@@_chapter:V \c_@@_name_resume_tl
  }
  {
    \group_end:
  }
%    \end{macrocode}
% \end{environment}
%
% \begin{macro}{\resumeitem,\researchitem}
% 学习经历。
%    \begin{macrocode}
\NewDocumentCommand{ \resumitem }{ O{ 学习经历 } }
  {%
    \vspace{24bp}{\zihao{-4}\nwafu@hei\bfseries\centerline{#1}}\par\vspace{6bp}
  }
%    \end{macrocode}
% 学术成果。
%    \begin{macrocode}
\NewDocumentCommand{ \researchitem }{ O{ 发表的学术论文 } }
  {%
    \vspace{32bp}{\zihao{-4}\nwafu@hei\bfseries\centerline{#1}}\par\vspace{14bp}
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{environment}{publications}
% \begin{environment}{achievements}
% 个人简历中发论文和研究成果列表环境。
%    \begin{macrocode}
\newlist{publications}{enumerate}{1}
\setlist[publications]{label=[\arabic*],align=left,nosep,itemsep=3bp,
  leftmargin=10mm,before=\zihao{5},resume}
\newlist{achievements}{enumerate}{1}
\setlist[achievements]{label=[\arabic*],align=left,nosep,itemsep=3bp,
  leftmargin=10mm,before=\zihao{5}}
\def\publicationskip{\bigskip\bigskip}
%    \end{macrocode}
% \end{environment}
% \end{environment}
%
% \changes{v1.10}{2022/03/17}{直接使用胡振震制定的gb7714-NWAFU实现参考文献样式控制。}
% \changes{v1.14}{2022/05/26}{调整作者姓在前名在后，缩写不加点。}
% \changes{v1.15}{2022/05/28}{调整姓在前名在后缩写标点符号。}
%
% \subsection{参考文献著录与引用}
%
% \begin{variable}{\l_@@_bib_resource_clist}
% 保存参考文献数据库列表。
%    \begin{macrocode}
\clist_new:N \l_@@_bib_resource_clist
%    \end{macrocode}
% \end{variable}
%
%    \begin{macrocode}
\keys_define:nn { nwafu / style }
  {
%    \end{macrocode}
% \begin{macro}{style/bib-resource}
% 参考文献数据源。
%    \begin{macrocode}
    bib-resource .clist_set:N = \l_@@_bib_resource_clist
  }
%    \end{macrocode}
% \end{macro}
%
% 为了保证导言区中的设置能起作用，\pkg{biblatex} 宏包均需要在
% 导言区末尾载入（仍在 \pkg{hyperref} 之前），并做相关设置。
%    \begin{macrocode}
\@@_at_end_preamble:n
  {
    \@@_biblatex_pre_setup:
    \RequirePackage { biblatex }
    \@@_biblatex_post_setup:
  }
%    \end{macrocode}
%
% \begin{macro}{
%   \@@_biblatex_pre_setup:,
%   \@@_biblatex_post_setup:,
%   \@@_pass_options_to_biblatex:n}
% \pkg{biblatex} 相关设置。
%    \begin{macrocode}
\cs_new_protected:Npn \@@_biblatex_pre_setup:
  {
%    \end{macrocode}
% 参考文献引用与著录样式。
%    \begin{macrocode}
    \@@_pass_options_to_biblatex:n { style = gb7714-NWAFU }
%    \end{macrocode}
% 其它参数。
%    \begin{macrocode}
    \@@_pass_options_to_biblatex:n
      {
        gbtype = true,           % 文献类型标识 [J]/[M]/[D] 等
        gbfieldtype = true,      % 文献类型字段标识
      }
  }
\cs_new_protected:Npn \@@_biblatex_post_setup:
  {
%    \end{macrocode}
% 载入参考文献数据源文件。
%    \begin{macrocode}
    \clist_map_function:NN \l_@@_bib_resource_clist \addbibresource
%    \end{macrocode}
% 修改参考文献标题。
%    \begin{macrocode}
    \defbibheading { bibliography } [ \bibname ] { \@@_chapter:n {##1} }
%    \end{macrocode}
% 将非著者作为引用主语的引用作者与年份之间的分隔符从空格改为逗号+空格
% 同时覆盖 bbx 中的设置
%    \begin{macrocode}
    \DeclareDelimFormat[cite,parencite,citep]{nameyeardelim}{\addcomma\space}
    \renewcommand*{\nameyeardelim}{\addcomma\space}
%    \end{macrocode}
% 修改参考文献著录列表中作者与年份的分隔符（作者与年份之间用逗号）
%    \begin{macrocode}
    \DeclareDelimFormat[bib,biblist]{nameyeardelim}{\addcomma\space}
%    \end{macrocode}
% 修改英文文献著录列表刊名为正常字形
%    \begin{macrocode}
    \DeclareFieldFormat[article]{journaltitle}{##1\isdot}
  }
\cs_new_protected:Npn \@@_pass_options_to_biblatex:n #1
  { \PassOptionsToPackage {#1} { biblatex } }
%    \end{macrocode}
% \end{macro}
%
% \subsection{间距设置}
%
% 段落间距
%    \begin{macrocode}
\skip_set:Nn \parskip { 0pt plus 2pt minus 1pt }
%    \end{macrocode}
% 浮动体顶端与底端所留距离
%    \begin{macrocode}
\skip_set:Nn \intextsep { 14pt plus 2pt minus 2pt }
%    \end{macrocode}
% 最后一个浮动对象顶端或第一个浮动对象底端与正文之间的距离
%    \begin{macrocode}
\skip_set:Nn \textfloatsep { 16pt plus 2pt minus 4pt }
\allowdisplaybreaks[4]
\ctex_after_end_preamble:n
  {
%    \end{macrocode}
% 公式前的距离
%    \begin{macrocode}
    \skip_set:Nn \abovedisplayskip { 5pt plus 1pt minus 1pt }
%    \end{macrocode}
% 公式后的距离
%    \begin{macrocode}
    \skip_set:Nn \belowdisplayskip { 5pt plus 1pt minus 1pt }
%    \end{macrocode}
% 公式前与文本的距离
%    \begin{macrocode}
    \skip_set:Nn \abovedisplayshortskip { 0pt }
%    \end{macrocode}
% 公式后与文本的距离
%    \begin{macrocode}
    \skip_set:Nn \belowdisplayshortskip { 5pt plus 1pt minus 1pt }
%    \end{macrocode}
% 盲审致谢与个人简历的处理
%    \begin{macrocode}
    % 盲审时重定义致谢和个人简历为空环境
    \bool_if:NT \g_@@_anonymous_bool
      {
        \RenewDocumentEnvironment { acknowledgement } { } { } { }
        \RenewDocumentEnvironment { resume } { } { } { }
      }
  }
%    \end{macrocode}
%
% \changes{v2.13}{2026/05/12}{按2026年研究生撰写规范修订研究生图表题注为宋体。}
% \changes{v2.00}{2026/04/29}{修订本科图表题注为宋体。}
% \changes{v1.12}{2022/05/24}{修订图表题注西文为加粗。}
%
% \subsection{图表及其浮动体}
%
% \subsubsection{图表题注设置}
%
% 分别设置浮动体 \env{figure} 和 \env{table} 的标题样式。
%    \begin{macrocode}
\DeclareCaptionLabelSeparator{ccwd}{\hspace{0.5\ccwd}}
\DeclareCaptionLabelFormat{parens}{\bothIfFirst{#1}{~}(#2)}
\DeclareCaptionFont{nwafu@table@font}{\small}
\DeclareCaptionFont{nwafu@figure@font}{\small}
\DeclareCaptionFont{nwafu@subtable@font}{\small}
\DeclareCaptionFont{nwafu@subfigure@font}{\small}
%    \end{macrocode}
% 图表题注设置。
%    \begin{macrocode}
\captionsetup
  {
    format          = hang,
    font            = {stretch = 1},
    labelsep        = ccwd,
    singlelinecheck = true,
    skip            = 4bp,
  }
%    \end{macrocode}
% 图表题注字体设置。
%    \begin{macrocode}
\captionsetup[table]{font += nwafu@table@font}
\captionsetup[figure]{font += nwafu@figure@font}
%    \end{macrocode}
% 子图题注设置。
%    \begin{macrocode}
\captionsetup[subfigure]
  {
    labelformat = parens,
    font       = nwafu@subfigure@font,
    belowskip   = 2pt,
    aboveskip   = 6pt
  }
%    \end{macrocode}
%
% \subsubsection{双语图表题注设置}
%
% 设置双语标题前缀
%
% 直接采用类似\cs{captionsetup}[figure][bi-first]|{|name=图|}|
%
%    \begin{macrocode}
\DeclareCaptionOption{bi-first}[format=hang,hangindent=-0.5em]{
    \def\tablename{表}
    \def\figurename{图}
  }
\DeclareCaptionOption{bi-second}[format=hang,hangindent=-2em]{
    \def\tablename{Tab.}
    \def\figurename{Fig.}
  }
\captionsetup[bi-first]{bi-first}
\captionsetup[bi-second]{bi-second}
%    \end{macrocode}
%
% \subsubsection{图表环境内容居中钩子}
%
% 在环境结束前最后执行，对环境中所有内容有效
%    \begin{macrocode}
\AddToHook { env/figure/end }
  { \centering }
\AddToHook { env/table/end }
  { \centering }
%
%    \end{macrocode}
%
% \subsubsection{表格行距和字号设置}
%
% 在tabular环境开始处添加代码，
% 设置表格行距和字号。
%
% 注意：\cs{linespread}|{|1.05|}|需要在 \cs{small}\cs{selectfont} 之前使用，
% 这样行距倍数会基于 \cs{small} 字号计算。
%    \begin{macrocode}
\@@_at_begin_environment:nn { tabular }
  {
    \exp_args:Nx \linespread { 1.15 }
    \small\selectfont\ignorespaces
  }
%    \end{macrocode}
%
% \subsubsection{图表编号格式设置}
%
% \begin{macro}{\thefigure,\thetable}
% 重定义图表编号。
%    \begin{macrocode}
\cs_set:Npn \thefigure { \thechapter - \@@_arabic:n { figure } }
\cs_set:Npn \thetable  { \thechapter - \@@_arabic:n { table  } }
%    \end{macrocode}
% \end{macro}
%
% \changes{v2.14}{2026/05/13}{添加tabularray宏包支持。}
%
% \subsubsection{\pkg{tabularray}宏包设置}
%
% 设置tabularray表格参数
%    \begin{macrocode}
\SetTblrDefault
  {
%    \end{macrocode}
% 字号和行距
%    \begin{macrocode}
    cells = { font = \small },
    stretch = 0.90,
    rowsep = 0pt,
    colsep = 6pt,
%    \end{macrocode}
% 表格线宽度：
%
% 设置tabularray三线表顶线和底线表格水平线宽度和线型。
% 由于在复杂表头中无法确定tabularray三线表中线的位置，
% 因此由用户根据需要设置水平线宽度。
%    \begin{macrocode}
    hline = { \lightrulewidth },
    vline = { \lightrulewidth },
    hline{1,Z} = { \heavyrulewidth, solid },
  }
%    \end{macrocode}
% 设置tabularray跨页长表格主题参数
%    \begin{macrocode}
\DefTblrTemplate{caption-tag}{default}{表\hspace{0.25em}\thetable}
\DefTblrTemplate{contfoot-text}{default}{接下页}
\DefTblrTemplate{caption-sep}{default}{\enskip}
\DefTblrTemplate{conthead-text}{default}{\!（续）}

\NewTblrTheme{fancy}{
    \SetTblrStyle{firsthead,mddlehead,lasthead}{font=\centering\small}
    \SetTblrStyle{firstfoot}{font=\small}
    \SetTblrStyle{middlefoot}{font=\small}
    \SetTblrStyle{lastfoot}{font=\small}
  }
%    \end{macrocode}
% 设置talltblr，longtblr跨页表格内部参数
%    \begin{macrocode}
\SetTblrInner[talltblr, longtblr]{
    hline = { \lightrulewidth },
    vline = { \lightrulewidth },
    hline{1,Z} = { \heavyrulewidth, solid },
    cells = {font=\small},
    rowhead = 1,
    stretch = 0.90,
    rowsep = 0pt,
    colsep = 6pt,
  }
%    \end{macrocode}
% 为tabularray宏包引入booktabs库
%    \begin{macrocode}
\UseTblrLibrary{booktabs}
%    \end{macrocode}
%
% \changes{v1.11}{2022/04/02}{修订本科enumerate编号两端括号为中文全角括号。}
%
% \subsection{\env{enumerate}列表环境设置}
%
%    \begin{macrocode}
\cs_new_protected:Npn \@@_enumitem_label_set:nn #1#2
  { \SetEnumitemValue{label}{#1}{#2} }
\clist_map_inline:nn
  {
    { bullet   } { \textbullet                                               },
    { endash   } { \normalfont\bfseries\textendash                           },
    { asterisk } { \textasteriskcentered                                     },
    { arabic   } { \c_@@_fwid_left_paren_tl\arabic*\c_@@_fwid_right_paren_tl },
    { alph     } { \c_@@_fwid_left_paren_tl\alph*\c_@@_fwid_right_paren_tl   },
    { roman    } { \c_@@_fwid_left_paren_tl\roman*\c_@@_fwid_right_paren_tl  },
    { alph     } { \c_@@_fwid_left_paren_tl\alph*\c_@@_fwid_right_paren_tl   },
    { roman    } { \roman*.                                                  },
    { outline  } { \upshape\ding{111}                                        }
  }
  { \@@_enumitem_label_set:nn #1 }
\SetEnumitemValue{font}{sf}{\normalfont\sffamily}
\SetEnumitemValue{ref}{enumii}{\arabic{enumi}.\alph*}
\SetEnumitemValue{ref}{enumiii}{\arabic{enumi}.\alph{enumii}.\roman*}
\setlist
  {
    nosep,
    leftmargin  = *,
    labelindent = \dimexpr\parindent+0pt\relax,
    labelsep    = 0pt,
    wide        = \parindent,
  }
\setlist[itemize,1]{label = bullet}
\setlist[itemize,2]{label = endash}
\setlist[itemize,3]{label = asterisk}
\setlist[enumerate,1]{label = arabic,ref = \arabic*}
\setlist[enumerate,2]{label = alph,ref = enumii}
\setlist[enumerate,3]{label = roman,ref = enumiii,labelwidth = *}
\setlist[description]{font = sf,labelwidth = *,leftmargin = 2\ccwd}
%    \end{macrocode}
%
% \subsection{\pkg{hyperref} 相关配置}
%
% \begin{macro}{\hypersetup,\nwafu_hyperref_setup:n}
% \pkg{hyperref} 宏包是在导言区之后才引入的。若要在导言区中使用
% \tn{hypersetup} 命令，必须另行定义。
%    \begin{macrocode}
\NewDocumentCommand \hypersetup { m }
  { \nwafu_hyperref_setup:n {#1} }
\cs_new_protected:Npn \nwafu_hyperref_setup:n #1
  { \clist_gput_right:Nn \g_@@_to_hyperref_clist {#1} }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_set_hyperlink_color_key:n}
% 设置超链接颜色选项。最后的逗号用于确保 \pkg{l3keys} 可以正确解析，不能省去。
%    \begin{macrocode}
\cs_new:Npn \@@_set_hyperlink_color_key:n #1
  {
    hyperlink-color / \clist_item:nn {#1} {1} .code:n =
      {
        \@@_define_hyperlink_color:nnn
          { \clist_item:nn {#1} {2} }
          { \clist_item:nn {#1} {3} }
          { \clist_item:nn {#1} {4} }
        \nwafu_hyperref_setup:n
          {
            linkcolor = nwafu@link, linkbordercolor = nwafu@link,
            urlcolor  = nwafu@url,  urlbordercolor  = nwafu@url,
            citecolor = nwafu@cite, citebordercolor = nwafu@cite
          }
      },
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_define_hyperlink_color:nnn}
% 定义超链接颜色。
%    \begin{macrocode}
\cs_new_protected:Npn \@@_define_hyperlink_color:nnn #1#2#3
  {
    \definecolorset { HTML } { nwafu@ } { }
      { link, #1; url, #2; cite, #3 }
  }
%    \end{macrocode}
% \end{macro}
%
%    \begin{macrocode}
\keys_define:nx { nwafu / style }
  {
%    \end{macrocode}
%
% \begin{macro}{style/hyperlink}
% 超链接样式。
%    \begin{macrocode}
    hyperlink .choice:,
    hyperlink .value_required:n = true,
    hyperlink / border .code:n = { },
    hyperlink / color  .code:n =
      { \nwafu_hyperref_setup:n { colorlinks = true } },
    hyperlink / none   .code:n =
      { \nwafu_hyperref_setup:n { hidelinks  = true } },
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{style/hyperlink-color}
% 超链接颜色。
%    \begin{macrocode}
    hyperlink-color .choice:,
    hyperlink-color .value_required:n = true,
    \clist_map_function:nN
      {
        { autumn,    D70000, D75F00, AF8700 },
        { business,  D14542, 295497, 1F6E43 },
        { classic,   FF0000, 0000FF, 00FF00 },
        { default,   990000, 0000B2, 007F00 },
        { elegant,   961212, C31818, 9B764F },
        { fantasy,   FF4A19, FF3F94, 934BA1 },
        { material,  E91E63, 009688, 4CAF50 },
        { science,   CA0619, 389F9D, FF8920 },
        { summer,    00AFAF, 5F5FAF, 5F8700 },
        { graylevel, 616161, 616161, 616161 },
        { prl,       2D3092, 2D3092, 2D3092 }
      }
      \@@_set_hyperlink_color_key:n
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\nwafu_allow_url_break:,\@@_add_url_break_points:}
% 允许 URL 在字母、数字和一些特殊符号处断行。见
% \url{https://bit.ly/2hhIjLW}。
%    \begin{macrocode}
\cs_new:Npn \nwafu_allow_url_break:
  {
    \cs_new:Npn \@@_add_url_break_points:
      { \tl_map_function:NN \c_@@_url_break_points_tl \do }
    \@@_appto_cmd:Nn \UrlBreaks
      { \UrlOrds \@@_add_url_break_points: }
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{variable}{\c_@@_url_break_points_tl}
% 额外的断行位置是 26 个英文字母（大小写）以及 10 个阿拉伯数字。
% \pkg{url} 提供的宏 \tn{UrlBreaks} 还包含了特殊符号 |*|、|-|、
% |~|、|'|、|"|、|-|，也被设置为允许断行。
%    \begin{macrocode}
\tl_const:Nn \c_@@_url_break_points_tl
  {
    abcdefghijklmnopqrstuvwxyz
    ABCDEFGHIJKLMNOPQRSTUVWXYZ
    0123456789
  }
%    \end{macrocode}
% \end{variable}
%
% 在导言区末尾引入 \pkg{hyperref} 宏包。
%    \begin{macrocode}
\ctex_at_end_preamble:n
  {
    \RequirePackage { hyperref }
%    \end{macrocode}
% 此后 \tn{hypersetup} 命令由 \pkg{hyperref} 宏包接管。
%    \begin{macrocode}
    \tl_set_eq:NN \l_tmpa_tl \l_@@_info_title_tl
    \tl_replace_all:Nnn \l_tmpa_tl { \\ } { ~ }
    \hypersetup
      {
        bookmarksnumbered = true,
        psdextra          = true,
        unicode           = true,
%    \end{macrocode}
% 填写 PDF 元信息。
%    \begin{macrocode}
%<*class>
        pdftitle    = \l_tmpa_tl,
        pdfauthor   = \l_@@_info_author_tl,
        pdfkeywords = \l_@@_abstract_keywords_clist,
%</class>
%       pdfsubject  = ,
        pdfcreator  = \c_@@_name_pdf_creator_tl
      }
%    \end{macrocode}
% 将导言区中通过 \cs{nwafu_hyperref_setup:n} 进行的设置传入
% \tn{hypersetup}。
%    \begin{macrocode}
    \exp_args:NV \hypersetup \g_@@_to_hyperref_clist
%    \end{macrocode}
% URL 断行处理。
%    \begin{macrocode}
    \nwafu_allow_url_break:
%    \end{macrocode}
% 手动开启 \pkg{biblatex} 的 \pkg{hyperref} 支持。
%    \begin{macrocode}
    \BiblatexManualHyperrefOn
  }
%    \end{macrocode}
%
% 在 PDF 字符串中设置 \tn{nwafu@kai} 命令为空，以抑制 \pkg{hyperref}
% 的警告信息。
%    \begin{macrocode}
\ctex_at_end_package:nn { hyperref }
  {
    \pdfstringdefDisableCommands
      {
        \cs_set_eq:NN \nwafu@kai \prg_do_nothing:
        \cs_set_eq:NN \quad    \c_space_tl
        \cs_set_eq:NN \qquad   \c_space_tl
      }
  }
%    \end{macrocode}
%
% 引用标题配置。
%    \begin{macrocode}
\labelformat{part}{\CTEXthepart}
\labelformat{chapter}{\CTEXthechapter}
\labelformat{figure}{\figurename~#1}
\labelformat{table}{\tablename~#1}
\def\figureautorefname{图}
\def\tableautorefname{表}
\keys_set_known:nn { ctex }
  {
    figurename          = 图,
    tablename           = 表,
  }
\labelformat{equation}{式(#1)}
\labelformat{section}{第 #1 节}
\labelformat{subsection}{第 #1 小节}
%    \end{macrocode}
%
% \subsection{用户接口}
%
% \begin{macro}{abstract,info,style}
% 定义元（meta）键值对。
%    \begin{macrocode}
\keys_define:nn { nwafu }
  {
    abstract  .meta:nn = { nwafu / abstract } {#1},
    info      .meta:nn = { nwafu / info     } {#1},
    style     .meta:nn = { nwafu / style    } {#1}
  }
%    \end{macrocode}
% \end{macro}
%
% 文档类初始设置。
%    \begin{macrocode}
\keys_set:nn { nwafu }
  {
    style   / font-size       = -4,
    style   / fullwidth-stop  = false,
    style   / auto-make-cover = true,
    style   / logo            = { logo/nwafu-bar.pdf },
    style   / logo-size       = { 0.65 \textwidth },
    style   / hyperlink       = none,
    style   / hyperlink-color = default,
    info    / ptype           = academic,
    info    / secret-level    = none,
    info    / school-id       = { 10712 },
    info    / date            = { \zhtoday },
    theorem / header-font     = { \sffamily },
    theorem / body-font       = { \nwafu@kai },
    theorem / counter         = { chapter },
  }
%    \end{macrocode}
% 根据论文类型设置脚注样式
%    \begin{macrocode}
\int_compare:nNnTF { \g_@@_thesis_type_int } = { 3 }
  { \keys_set:nn { nwafu } { style / footnote-style = circled } }
  { \keys_set:nn { nwafu } { style / footnote-style = plain } }
%    \end{macrocode}
%
% \begin{macro}{\nwafuset}
% 用户设置接口。
%    \begin{macrocode}
\NewDocumentCommand \nwafuset { m }
  { \keys_set:nn { nwafu } {#1} }
%    \end{macrocode}
% \end{macro}
%
% \begin{environment}{proof}
% \begin{environment}{axiom}
% \begin{environment}{corollary}
% \begin{environment}{definition}
% \begin{environment}{example}
% \begin{environment}{lemma}
% \begin{environment}{theorem}
% 模板预定义的常用数学环境。
% 其中的“证明”比较特殊，它不编号，但会添加证毕符号。
%    \begin{macrocode}
\newtheorem* { proof       } { \c_@@_name_proof_tl      }
\newtheorem  { axiom       } { \c_@@_name_axiom_tl      }
\newtheorem  { corollary   } { \c_@@_name_corollary_tl  }
\newtheorem  { definition  } { \c_@@_name_definition_tl }
\newtheorem  { example     } { \c_@@_name_example_tl    }
\newtheorem  { lemma       } { \c_@@_name_lemma_tl      }
\newtheorem  { theorem     } { \c_@@_name_theorem_tl    }
%</class>
%    \end{macrocode}
% \end{environment}
% \end{environment}
% \end{environment}
% \end{environment}
% \end{environment}
% \end{environment}
% \end{environment}
%
%    \begin{macrocode}
%<@@=>
%    \end{macrocode}
%
% \clearpage
%
% \end{implementation}
%
