| 1 |
% \iffalse meta-comment |
| 2 |
% !TeX program = XeLaTeX |
| 3 |
% !TeX encoding = UTF-8 |
| 4 |
% |
| 5 |
% Copyright (C) 2019--2026 by Nan Geng <[email protected]> |
| 6 |
% |
| 7 |
% This work may be distributed and/or modified under the |
| 8 |
% conditions of the LaTeX Project Public License, either |
| 9 |
% version 1.3c of this license or (at your option) any later |
| 10 |
% version. The latest version of this license is in: |
| 11 |
% |
| 12 |
% http://www.latex-project.org/lppl.txt |
| 13 |
% |
| 14 |
% and version 1.3 or later is part of all distributions of |
| 15 |
% LaTeX version 2005/12/01 or later. |
| 16 |
% |
| 17 |
% This work has the LPPL maintenance status `maintained'. |
| 18 |
% |
| 19 |
% The Current Maintainer of this work is Nan Geng. |
| 20 |
% |
| 21 |
% This work consists of the files nwafuthesis.dtx, |
| 22 |
% nwafuthesis-doc.dtx, |
| 23 |
% and the derived files nwafuthesis.ins, |
| 24 |
% nwafuthesis.cls, |
| 25 |
% nwafudoc.cls, |
| 26 |
% |
| 27 |
%<*internal> |
| 28 |
\iffalse |
| 29 |
%</internal> |
| 30 |
% |
| 31 |
%<*internal> |
| 32 |
\fi |
| 33 |
\begingroup |
| 34 |
\def\NameOfLaTeXe{LaTeX2e} |
| 35 |
\expandafter\endgroup\ifx\NameOfLaTeXe\fmtname\else |
| 36 |
\csname fi\endcsname |
| 37 |
%</internal> |
| 38 |
% |
| 39 |
%<*install> |
| 40 |
\input l3docstrip.tex |
| 41 |
\keepsilent |
| 42 |
\askforoverwritefalse |
| 43 |
|
| 44 |
\preamble |
| 45 |
|
| 46 |
Copyright (C) 2019--2026 by Nan Geng <[email protected]> |
| 47 |
|
| 48 |
This work may be distributed and/or modified under the |
| 49 |
conditions of the LaTeX Project Public License, either |
| 50 |
version 1.3c of this license or (at your option) any later |
| 51 |
version. The latest version of this license is in: |
| 52 |
|
| 53 |
http://www.latex-project.org/lppl.txt |
| 54 |
|
| 55 |
and version 1.3 or later is part of all distributions of |
| 56 |
LaTeX version 2005/12/01 or later. |
| 57 |
|
| 58 |
This work has the LPPL maintenance status `maintained'. |
| 59 |
|
| 60 |
The Current Maintainer of this work is Nan Geng. |
| 61 |
|
| 62 |
This work consists of the files nwafuthesis.dtx, |
| 63 |
nwafuthesis-doc.dtx, |
| 64 |
and the derived files nwafuthesis.ins, |
| 65 |
nwafuthesis.cls, |
| 66 |
nwafudoc.cls, |
| 67 |
|
| 68 |
\endpreamble |
| 69 |
|
| 70 |
\generate{ |
| 71 |
\usedir{tex/latex/nwafuthesis} |
| 72 |
\file{\jobname.cls} {\from{\jobname.dtx}{class}} |
| 73 |
\file{nwafudoc.cls} {\from{\jobname.dtx}{doc} |
| 74 |
\from{\jobname-doc.dtx}{doc}} |
| 75 |
%</install> |
| 76 |
%<*internal> |
| 77 |
\usedir{source/latex/nwafuthesis} |
| 78 |
\file{\jobname.ins} {\from{\jobname.dtx}{install}} |
| 79 |
%</internal> |
| 80 |
%<*install> |
| 81 |
\usedir{doc/latex/nwafuthesis} |
| 82 |
\nopreamble\nopostamble |
| 83 |
} |
| 84 |
|
| 85 |
\obeyspaces |
| 86 |
\Msg{*************************************************************} |
| 87 |
\Msg{* *} |
| 88 |
\Msg{* To finish the installation you have to move the following *} |
| 89 |
\Msg{* files into a directory searched by TeX: *} |
| 90 |
\Msg{* *} |
| 91 |
\Msg{* The recommended directory is TDS:tex/latex/nwafuthesis *} |
| 92 |
\Msg{* *} |
| 93 |
\Msg{* nwafuthesis.cls *} |
| 94 |
\Msg{* *} |
| 95 |
\Msg{* To produce the documentation, run the file nwafuthesis.dtx*} |
| 96 |
\Msg{* through XeLaTeX. *} |
| 97 |
\Msg{* *} |
| 98 |
\Msg{* Happy TeXing! *} |
| 99 |
\Msg{* *} |
| 100 |
\Msg{*************************************************************} |
| 101 |
|
| 102 |
\endbatchfile |
| 103 |
%</install> |
| 104 |
% |
| 105 |
%<*internal> |
| 106 |
\fi |
| 107 |
%</internal> |
| 108 |
% |
| 109 |
%<class|doc>\NeedsTeXFormat{LaTeX2e} |
| 110 |
%<class|doc>\RequirePackage{expl3} |
| 111 |
%<*!(driver|install)> |
| 112 |
%<!readme>\GetIdInfo $Id: nwafuthesis.dtx 2.16 2026-05-16 Nan Geng <[email protected]> $ |
| 113 |
%<class> {Thesis template for Northwest A\&F University} |
| 114 |
%<class>\ProvidesExplClass{\ExplFileName} |
| 115 |
%<definition> {Definition file for nwafuthesis} |
| 116 |
%<definition>\ProvidesExplFile{\ExplFileName.def} |
| 117 |
%<doc> {Documentation class for nwafuthesis} |
| 118 |
%<doc>\ProvidesExplClass{nwafudoc} |
| 119 |
%<!readme> {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} |
| 120 |
%</!(driver|install)> |
| 121 |
%<*driver> |
| 122 |
% \PassOptionsToPackage{showframe}{geometry} |
| 123 |
\documentclass{nwafudoc} |
| 124 |
\usepackage{multirow,xeCJKfntef,xpinyin,csquotes} |
| 125 |
\hypersetup{ |
| 126 |
pdftitle = {nwafuthesis: 西北农林科技大学学位论文模板}, |
| 127 |
pdfauthor = {耿楠} |
| 128 |
} |
| 129 |
% 全角标点放在引号中,需要改成半角式,否则间距过大,不好看 |
| 130 |
\def\FSID{“{\xeCJKsetup{PunctStyle=banjiao}。}”} % U+3002 |
| 131 |
\def\FSFW{“{\xeCJKsetup{PunctStyle=banjiao}.}”} % U+FF0E |
| 132 |
\def\COFW{“{\xeCJKsetup{PunctStyle=banjiao}:}”} % U+FF1A |
| 133 |
\def\SCFW{“{\xeCJKsetup{PunctStyle=banjiao};}”} % U+FF1B |
| 134 |
|
| 135 |
% nwafuthesis的LOGO |
| 136 |
\newcommand{\nwafuthesis}{% |
| 137 |
\makebox{\rmfamily% |
| 138 |
N\hspace{-0.2ex}\raisebox{-0.5ex}{W}\raisebox{0.5ex}{\hspace{-0.2ex}\textsc{AFU}}\hspace{0.3ex}% |
| 139 |
\textsc{Thesis}}} |
| 140 |
|
| 141 |
\title{\textcolor{MaterialIndigo800}{% |
| 142 |
\textbf{\nwafuthesis: 西北农林科技大学学位论文 |
| 143 |
\xpinyin[font=\sffamily,format=\color{MaterialIndigo800}]{模}{mu2}板}}} |
| 144 |
\author{耿楠} |
| 145 |
\date{\today\quad v2.16% |
| 146 |
\thanks{\url{https://gitee.com/nwafu_nan/nwafuthesis-l3}.}} |
| 147 |
|
| 148 |
\begin{document} |
| 149 |
%<!--CODEDOC--> \DisableImplementation |
| 150 |
\EnableImplementation |
| 151 |
\def\nwafuCODEDOC{} |
| 152 |
\DocInput{nwafuthesis.dtx} |
| 153 |
%\DocInput{nwafuthesis-doc.dtx} |
| 154 |
\IndexLayout |
| 155 |
\PrintChanges |
| 156 |
\PrintIndex |
| 157 |
\end{document} |
| 158 |
%</driver> |
| 159 |
% \fi |
| 160 |
% |
| 161 |
% \changes{v2.13}{2026/05/12}{按2026年研究生撰写规范修订研究生页面布局和前料页码格式。} |
| 162 |
% \changes{v2.12}{2026/05/10}{按2026年研究生撰写规范修订研究生模板封面。} |
| 163 |
% \changes{v2.02}{2026/05/08}{用信息元数据驱动模式重构封面部件生成代码。} |
| 164 |
% \changes{v2.00}{2026/04/29}{按2026年本科撰写规范修订本科模板。} |
| 165 |
% \changes{v1.10}{2022/03/17}{更新实现细节。} |
| 166 |
% \changes{v1.00}{2021/06/06}{开始发布测试。} |
| 167 |
% \changes{v1.00}{2021/05/12}{开始编写模板。} |
| 168 |
% |
| 169 |
% \CheckSum{0} |
| 170 |
% |
| 171 |
% \CharacterTable |
| 172 |
% {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 |
| 173 |
% 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 |
| 174 |
% Digits \0\1\2\3\4\5\6\7\8\9 |
| 175 |
% Exclamation \! Double quote \" Hash (number) \# |
| 176 |
% Dollar \$ Percent \% Ampersand \& |
| 177 |
% Acute accent \' Left paren \( Right paren \) |
| 178 |
% Asterisk \* Plus \+ Comma \, |
| 179 |
% Minus \- Point \. Solidus \/ |
| 180 |
% Colon \: Semicolon \; Less than \< |
| 181 |
% Equals \= Greater than \> Question mark \? |
| 182 |
% Commercial at \@ Left bracket \[ Backslash \\ |
| 183 |
% Right bracket \] Circumflex \^ Underscore \_ |
| 184 |
% Grave accent \` Left brace \{ Vertical bar \| |
| 185 |
% Right brace \} Tilde \~} |
| 186 |
% |
| 187 |
%^^A 禁止使用 " 符号作为抄录文本缩略符 |
| 188 |
% \DeleteShortVerb\" |
| 189 |
% |
| 190 |
%^^A 封面与目录的页边距 |
| 191 |
% \newgeometry{ |
| 192 |
% left = 1.25 in, |
| 193 |
% right = 1.25 in, |
| 194 |
% top = 1.25 in, |
| 195 |
% bottom = 1.00 in |
| 196 |
% } |
| 197 |
% |
| 198 |
% \maketitle |
| 199 |
% \vfill |
| 200 |
% \begin{center} |
| 201 |
% \includegraphics[width=0.20\textwidth]{logo/nwafu-circle.pdf}\\[3ex] |
| 202 |
% \includegraphics[width=0.5\textwidth]{logo/motto} |
| 203 |
% \end{center} |
| 204 |
% \vfill |
| 205 |
% \begin{center} |
| 206 |
% \includegraphics[width=0.6\textwidth]{logo/building} |
| 207 |
% \end{center} |
| 208 |
% \vfill |
| 209 |
% \begin{center} |
| 210 |
% \bfseries\zihao{1}经国本\qquad{}解民生\qquad{}尚科学 |
| 211 |
% \end{center} |
| 212 |
% \vfill |
| 213 |
% \thispagestyle{empty} |
| 214 |
% \clearpage |
| 215 |
% |
| 216 |
% \pagenumbering{Roman} |
| 217 |
% \tableofcontents |
| 218 |
% \clearpage |
| 219 |
% |
| 220 |
% \pagenumbering{arabic} |
| 221 |
% \EnableDocumentation |
| 222 |
%^^A \DisableDocumentation |
| 223 |
% |
| 224 |
% \begin{documentation} |
| 225 |
% |
| 226 |
%^^A 用户手册的页边距 |
| 227 |
% \newgeometry{ |
| 228 |
% left = 1.65 in, |
| 229 |
% right = 0.80 in, |
| 230 |
% top = 1.25 in, |
| 231 |
% bottom = 1.00 in |
| 232 |
% } |
| 233 |
% |
| 234 |
% \section{简介} |
| 235 |
% |
| 236 |
% 目前,西北农林科技大学 \LaTeX{} 学位论文模板是由信息工程学院 |
| 237 |
% 耿楠老师编写的\cls{nwafuthesis}模板。 |
| 238 |
% 该模板是基于\LaTeXe{}开发,虽然一直在维护,但由于初期开发代码的不规范, |
| 239 |
% 其维护成本较高,为此, |
| 240 |
% 用 \LaTeX3 \cite{source3}根据\cite{西北农林科技大学研究生论文写作指南}和 |
| 241 |
% \cite{西北农林科技大学本科论文撰写规范} |
| 242 |
% 重构了\cls{nwafuthesis}模板,以适应 \TeX{} 技术的发展。 |
| 243 |
% 同时\cls{nwafuthesis}还构建了一套简洁的用户接口,以方便用户使用。 |
| 244 |
% 新模板更加稳定,普适性更强,运行效率更高。 |
| 245 |
% |
| 246 |
% \subsection*{\LaTeX{} 入门} |
| 247 |
% |
| 248 |
% 本文档并非一份 \LaTeX{} 零基础教程。如果是完完全全的新手, |
| 249 |
% 建议先阅读相关入门文档,如大名鼎鼎的“\pkg{lshort}” |
| 250 |
% \cite{lshort} 及其中文翻译版 \cite{lshort-zh-cn}。当然, |
| 251 |
% 网络上诸如耿楠录制的\LaTeX{}教学系列视频等入门教程多如牛毛, |
| 252 |
% 可以自行选取学习。 |
| 253 |
% |
| 254 |
% \subsection*{关于本文档} |
| 255 |
% |
| 256 |
% 本文采用不同字体表示不同内容。无衬线字体表示宏包名称,如 |
| 257 |
% \pkg{xeCJK} 宏包、\cls{nwafuthesis} 文档类等;等宽字体表示代码或 |
| 258 |
% 文件名,如 \cs{nwafuset} 命令、\env{abstract} 环境、\TeX{} 文档 |
| 259 |
% \file{main.tex} 等;带有尖括号的楷体(或西文斜体)表示命令参数, |
| 260 |
% 如 \meta{模板选项}、\meta{English title} 等。使用时,不必输入参数两侧 |
| 261 |
% 的尖括号。示例代码进行了语法高亮处理,以方便阅读。 |
| 262 |
% |
| 263 |
% 在用户手册中,带有蓝色侧边线的为 \LaTeX{} 代码,而带有粉色侧边线 |
| 264 |
% 的则为命令行代码,请注意区分。模板提供的选项、命令、环境等, |
| 265 |
% 均用横线框起,同时给出语法和相关说明。 |
| 266 |
% |
| 267 |
% 手册中代码实现部分主要面向对 \LaTeX{} 模板开发感兴趣的用户。 |
| 268 |
% 文档的最后还提供了版本历史和代码索引,以供查阅。 |
| 269 |
% |
| 270 |
% \section{安装} |
| 271 |
% |
| 272 |
% \subsection{模板工作流} |
| 273 |
% |
| 274 |
% 使用{\nwafuthesis}模板排版学位论文的工作流如图\ref{fig:workflow}所示。 |
| 275 |
% |
| 276 |
% \begin{figure}[!htb] |
| 277 |
% \centering |
| 278 |
% \includegraphics[width=0.85\textwidth]{logo/workflow} |
| 279 |
% \caption{模板工作流} |
| 280 |
% \label{fig:workflow} |
| 281 |
% \end{figure} |
| 282 |
% |
| 283 |
% 作为普通用户,仅需要通过{\LaTeX}发行版安装和更新模板,完成安装后,即可使用% |
| 284 |
% \verb|\documentclass{nwafuthesis}|载入该模板进行工作了。作为普通用户, |
| 285 |
% 强烈建议只关心学位论文内容,通过与导师的反复沟通修改与完善论文内容即可。 |
| 286 |
% 关于学位论文排版格式问题应该交由\nwafuthesis 开发者根据相关学校% |
| 287 |
% 指南/规范进行设计和调整。开发者完成模板开发及功能完善后,会上传到 |
| 288 |
% CTAN(\url{www.ctan.org}),然后模板会被部署于{\LaTeX}发行版,此时普通 |
| 289 |
% 用户仅需要通过{\LaTeX}发行版的管理工具更新模板即可得到更新后的模板, |
| 290 |
% 模板更新后,仅需再次编译学位论文即可按最新的格式要求完成排版。 |
| 291 |
% |
| 292 |
% 关于{\nwafuthesis}模板的使用的详细说明,一方面可以通过阅读其使用说明书和 |
| 293 |
% 写作样例进行学习,另一方面也可以参阅耿楠在B站发布的教学视频% |
| 294 |
% \url{https://www.bilibili.com/video/BV1tY4y1q7RT}进行学习。 |
| 295 |
% |
| 296 |
% 如果有任何改进意见或者功能需求,欢迎前往 Gitee 仓库提交issue。 |
| 297 |
% {\nwafuthesis}模板的源代码托管于\url{https://gitee.com/nwafu_nan/nwafuthesis-l3}, |
| 298 |
% 欢迎大家多提 issue/PR,以便进一步完善和优化我校学位论文\LaTeX{}模板。 |
| 299 |
% |
| 300 |
% \subsection{获取 \cls{nwafuthesis}} |
| 301 |
% |
| 302 |
% \subsubsection{标准安装} |
| 303 |
% |
| 304 |
% 如果没有特殊理由,强烈建议使用宏包管理器安装 \cls{nwafuthesis}。 |
| 305 |
% 例如在 \TeXLive{} 中,执行(可能需要管理员权限) |
| 306 |
% \begin{shellexample}[morekeywords={tlmgr,install}] |
| 307 |
% tlmgr install nwafuthesis |
| 308 |
% \end{shellexample} |
| 309 |
% 即可完成安装。 |
| 310 |
% |
| 311 |
% 当然,在 \TeXLive{} 和 \MiKTeX{} 中,也可以通过图形界面进行安装, |
| 312 |
% 此处不再赘述,请参阅软件帮助。 |
| 313 |
% |
| 314 |
% \subsubsection{手动安装} |
| 315 |
% |
| 316 |
% 可以从\cls{nwafuthesis}源代码直接生成模板(\emph{不推荐}): |
| 317 |
% |
| 318 |
% \begin{itemize} |
| 319 |
% \item 打开 \href{https://gitee.com/nwafu_nan/nwafuthesis-l3}^^A |
| 320 |
% {Gitee仓库主页},点击“克隆/下载”,并选择“下载ZIP”, |
| 321 |
% 下载 \file{nwafuthesis-master.zip};如果的电脑中安装有 git |
| 322 |
% 程序,也可通过以下命令直接克隆代码仓库: |
| 323 |
% \begin{shellexample}[gobble=7,alsoletter={.},^^A |
| 324 |
% morekeywords={git,clone}] |
| 325 |
% git clone [email protected]:nwafu_nan/nwafuthesis-l3.git |
| 326 |
% \end{shellexample} |
| 327 |
% \item 在解压后的目录中或进入克隆后的仓库目录,然后执行以下命令以生成 |
| 328 |
% 模板的各组件: |
| 329 |
% \begin{shellexample}[gobble=7,morekeywords={xetex}] |
| 330 |
% xetex nwafuthesis.dtx |
| 331 |
% \end{shellexample} |
| 332 |
% \item 将生成的文档类(\file{.cls})复制到 \TeX{} 发行版本地 TDS 树 |
| 333 |
% 的 \path{texmf-local/tex/latex/nwafuthesis/} 目录下,并执行 |
| 334 |
% \texttt{mktexlsr} 刷新文件名数据库,方可完成安装。 |
| 335 |
% \end{itemize} |
| 336 |
% |
| 337 |
% \subsubsection{扁平化安装} |
| 338 |
% |
| 339 |
% 如果您不希望安装本模板,但需要立刻使用,也可以使用模板提供的安装脚本。 |
| 340 |
% |
| 341 |
% \begin{itemize} |
| 342 |
% \item 打开 \href{https://gitee.com/nwafu_nan/nwafuthesis-l3}^^A |
| 343 |
% {Gitee仓库主页},点击“克隆/下载”,并选择“下载ZIP”, |
| 344 |
% 下载 \file{nwafuthesis-master.zip};如果的电脑中安装有 git |
| 345 |
% 程序,也可通过以下命令直接克隆代码仓库: |
| 346 |
% \begin{shellexample}[gobble=7,alsoletter={.},^^A |
| 347 |
% morekeywords={git,clone}] |
| 348 |
% git clone [email protected]:nwafu_nan/nwafuthesis-l3.git |
| 349 |
% \end{shellexample} |
| 350 |
% \item 在解压后的目录中或进入克隆后的仓库目录,然后执行以下命令以生成 |
| 351 |
% 模板的各组件: |
| 352 |
% \begin{itemize} |
| 353 |
% \item Windows系统: |
| 354 |
% \begin{shellexample}[gobble=11,morekeywords={build-win}] |
| 355 |
% build-win |
| 356 |
% \end{shellexample} |
| 357 |
% \item Linux系统: |
| 358 |
% \begin{shellexample}[gobble=11,morekeywords={build.sh}] |
| 359 |
% ./build.sh |
| 360 |
% \end{shellexample} |
| 361 |
% \end{itemize} |
| 362 |
% \item 将生成的文档类文件(\file{nwafuthesis.cls})复制到 |
| 363 |
% 论文撰写工作目录,然后开始撰写论文。 |
| 364 |
% \end{itemize} |
| 365 |
% |
| 366 |
% \textbf{说明}:为编译模板本身,需要安装LibertinusSerif、IBMPlexSansCondensed、 |
| 367 |
% lmmonolt10和LibertinusMath-Regular西文字体, |
| 368 |
% Source Han Serif SC、Source Han Sans SC和Sarasa Mono SC中文字体。 |
| 369 |
% 也可以打开\texttt{nwafuthesis-doc.dtx}文件, |
| 370 |
% 注释或删除第1680行---1720行后执行编译(build-win.bat/build.sh)。 |
| 371 |
% |
| 372 |
% \subsection{模板组成} |
| 373 |
% |
| 374 |
% 本模板主要包含核心文档类以及用户文档等两个 |
| 375 |
% 部分,其具体组成见表~\ref{tab:nwafuthesis-components}。 |
| 376 |
% |
| 377 |
% \begin{table}[ht] |
| 378 |
% \caption{\cls{nwafuthesis} 的主要组成部分} |
| 379 |
% \label{tab:nwafuthesis-components} |
| 380 |
% \centering |
| 381 |
% \begin{tabular}{lp{20em}} |
| 382 |
% \toprule |
| 383 |
% \textbf{文件} & \textbf{功能说明} \\ |
| 384 |
% \midrule |
| 385 |
% \file{nwafuthesis.cls} & 模板文档类 \\ |
| 386 |
% \file{nwafuthesis.pdf} & 用户手册 \\ |
| 387 |
% \bottomrule |
| 388 |
% \end{tabular} |
| 389 |
% \end{table} |
| 390 |
% |
| 391 |
% \section{使用说明} |
| 392 |
% |
| 393 |
% \subsection{基本用法} |
| 394 |
% |
| 395 |
% 在当前工作目录下创建一个名为logo的文件夹, |
| 396 |
% 并将学校的\enquote{\texttt{nwafu-bar.pdf}} |
| 397 |
% logo矢量图保存在该文件夹内,然后建立如下一份 |
| 398 |
% 简单的 \TeX{} 文档,它演示了 \cls{nwafuthesis} |
| 399 |
% 的最基本用法: |
| 400 |
% \begin{latexexample}[deletetexcs={\documentclass},% |
| 401 |
% moretexcs={\chapter},morekeywords={\documentclass},% |
| 402 |
% emph={[2]document}] |
| 403 |
% % main.tex |
| 404 |
% \documentclass{nwafuthesis} |
| 405 |
% \begin{document} |
| 406 |
% \chapter{欢迎} |
| 407 |
% \section{欢迎使用nwafuthesis!} |
| 408 |
% 你好,\LaTeX{}! |
| 409 |
% \end{document} |
| 410 |
% \end{latexexample} |
| 411 |
% |
| 412 |
% 按照 \ref{subsec:编译方式}~小节中的方式编译该文档,应得到 |
| 413 |
% 一篇包含封面、题名页等在内的空白论文。 |
| 414 |
% |
| 415 |
% \subsection{编译方式} \label{subsec:编译方式} |
| 416 |
% |
| 417 |
% 本模板不支持 \pdfTeX{} 引擎,请使用 \XeLaTeX{} 或 \LuaLaTeX{} |
| 418 |
% 编译,推荐使用 \XeLaTeX{}编译。为了生成正确的目录、脚注、参考 |
| 419 |
% 文献以及交叉引用,至少需要连续编译4次。 |
| 420 |
% |
| 421 |
% 假设\TeX{} 源文件名为 \file{main.tex},使用 \XeLaTeX{} 编译论文。 |
| 422 |
% 则在命令行中可以顺序执行: |
| 423 |
% \begin{shellexample}[morekeywords={xelatex}] |
| 424 |
% xelatex main |
| 425 |
% biber main |
| 426 |
% xelatex main |
| 427 |
% xelatex main |
| 428 |
% \end{shellexample} |
| 429 |
% 或使用带有参数\meta{-xelatex}的 \pkg{latexmk}命令: |
| 430 |
% \begin{shellexample}[morekeywords={latexmk},emph={-xelatex}] |
| 431 |
% latexmk -xelatex main |
| 432 |
% \end{shellexample} |
| 433 |
% |
| 434 |
% 如果使用 \LuaLaTeX{} 编译论文,请在命令行中顺序执行: |
| 435 |
% \begin{shellexample}[morekeywords={lualatex}] |
| 436 |
% lualatex main |
| 437 |
% biber main |
| 438 |
% lualatex main |
| 439 |
% lualatex main |
| 440 |
% \end{shellexample} |
| 441 |
% 或者执行带有\meta{-lualatex}的latexmk命令 |
| 442 |
% \begin{shellexample}[morekeywords={latexmk},emph={-lualatex}] |
| 443 |
% latexmk -lualatex main |
| 444 |
% \end{shellexample} |
| 445 |
% |
| 446 |
% 由于参考文献格式基于 |
| 447 |
% 胡振震编写的符合GB/T7714-2015的biblatex样式文件\cite{biblatex-gb7714-2015} |
| 448 |
% 实现排版,并在后台强制使用biber引擎编译参考文献。 |
| 449 |
% 因此,在第二次编译时(即第一次 XeLaTeX 编译之后),请务必\textbf{使用biber进行编译}。 |
| 450 |
% |
| 451 |
% 关于如何配置TeXStudio等IDE工具,以实现正确编译,请 |
| 452 |
% 参阅其使用说明书。 |
| 453 |
% |
| 454 |
% \subsection{模板选项} |
| 455 |
% |
| 456 |
% 所谓\enquote{模板选项}是指在用\tn{documentclass}命令引入文档类时能够指定的选项: |
| 457 |
% \begin{latexexample}[deletetexcs={\documentclass},% |
| 458 |
% morekeywords={\documentclass}] |
| 459 |
% \documentclass(*\oarg{模板选项}*){nwafuthesis} |
| 460 |
% \end{latexexample} |
| 461 |
% |
| 462 |
% 有些模板选项为布尔型,只能取 \opt{true} 或 \opt{false}。 |
| 463 |
% 对于这些选项,\kvopt{\meta{选项}}{true} 中的“|= true|” |
| 464 |
% 可以省略。 |
| 465 |
% |
| 466 |
% \begin{function}[added=2021-05-12]{type} |
| 467 |
% \begin{nwafusyntax}[emph={[1]type}] |
| 468 |
% type = (*<doctor|master|(bachelor)>*) |
| 469 |
% \end{nwafusyntax} |
| 470 |
% 选择论文类型。三种选项分别代表博士学位论文、硕士学位论文和本科 |
| 471 |
% 毕业论文(设计),默认为 \opt{bachelor}。 |
| 472 |
% \end{function} |
| 473 |
% |
| 474 |
% \begin{function}[added=2021-05-12,updated=2026-05-17]{oneside,twoside} |
| 475 |
% 指明论文的单/双面模式,默认为 \opt{twoside}。 |
| 476 |
% \end{function} |
| 477 |
% |
| 478 |
% 单面模式(\opt{oneside})中,后续各章接上一章另起一页连续起排。 |
| 479 |
% |
| 480 |
% 双面模式(\opt{twoside})中,各章都从奇数页开始起排,若前一章 |
| 481 |
% 在奇数页结束,则会自动插入不带页眉和页脚的空白页。 |
| 482 |
% |
| 483 |
% 对于研究生学位论文,奇数页页眉是章名称,偶数页页眉是 |
| 484 |
% “西北农林科技大学博士(或硕士)学位论文”。 |
| 485 |
% 对于本科毕业论文/设计,奇数页页眉是章名称, |
| 486 |
% 偶数页页眉是“西北农林科技大学本科毕业论文/设计” |
| 487 |
% (模板会根据\opt{nwafu/info/btype}选项自动选择论文或设计)。 |
| 488 |
% |
| 489 |
% 本模板中,中英文封面、题名页、目录、摘要、主要符号表对照表、 |
| 490 |
% 附录、参考文献、致谢、个人简历等均视作章,也按相同方式排版。 |
| 491 |
% |
| 492 |
% \begin{function}[added=2021-05-12]{draft} |
| 493 |
% \begin{nwafusyntax}[emph={[1]draft}] |
| 494 |
% draft = (*<\TFF>*) |
| 495 |
% \end{nwafusyntax} |
| 496 |
% 选择是否开启草稿模式,默认关闭。 |
| 497 |
% \end{function} |
| 498 |
% |
| 499 |
% 草稿模式为全局选项,会影响到很多宏包的工作方式。 |
| 500 |
% 开启之后,主要的变化有: |
| 501 |
% \begin{itemize} |
| 502 |
% \item 将行溢出的盒子显示为黑色方块; |
| 503 |
% \item 不插入图片,只输出一个占位方框; |
| 504 |
% \item 关闭超链接渲染,也不生成 PDF 书签; |
| 505 |
% \item 显示页面边框。 |
| 506 |
% \end{itemize} |
| 507 |
% |
| 508 |
% \subsection{参数设置} |
| 509 |
% |
| 510 |
% \begin{function}[added=2021-05-12]{\nwafuset} |
| 511 |
% \begin{nwafusyntax}[morekeywords={\nwafuset}] |
| 512 |
% \nwafuset(*\marg{键值列表}*) |
| 513 |
% \end{nwafusyntax} |
| 514 |
% 本模板提供了一系列选项,以实现论文格式和作者、指导教师等 |
| 515 |
% 基本信息的配置。载入\pkg{nwafuthesis}文档类之后,以下 |
| 516 |
% 所有选项均可通过统一的\cs{nwafuset}命令进行设置。 |
| 517 |
% \end{function} |
| 518 |
% |
| 519 |
% \cs{nwafuset} 的参数是一组由(英文)逗号分隔的选项列表,列表中的 |
| 520 |
% 选项通常是 \kvopt{\meta{key}}{\meta{value}} 形式。部分选项的 |
| 521 |
% \meta{value} 可以省略。对于同一项,后续设置会覆盖以前的设置。 |
| 522 |
% 在下文的说明中,将用\textbf{粗体}表示默认值。 |
| 523 |
% |
| 524 |
% \cs{nwafuset} 采用 \LaTeX3 风格的键值设置,支持不同类型以及多种 |
| 525 |
% 层次的选项设定。键值列表中,“|=|”左右的空格不影响设置;但需注意, |
| 526 |
% 参数列表中\textbf{不可以出现空行}。 |
| 527 |
% |
| 528 |
% 与模板选项相同,布尔型的参数 \kvopt{\meta{选项}}{true} |
| 529 |
% 中的“|= true|”可以省略。 |
| 530 |
% |
| 531 |
% 另有一些选项包含子选项,如 \opt{style} 、\opt{abstract}和 \opt{info} 等。它们可以 |
| 532 |
% 按如下两种等价方式来设定: |
| 533 |
% \begin{latexexample}[morekeywords={\nwafuset},% |
| 534 |
% emph={[1]style,cjk-font,font-size,info,title,title*,author,author*,department}] |
| 535 |
% \nwafuset{ |
| 536 |
% style = {cjk-font = adobe, font-size = -4}, |
| 537 |
% info = { |
| 538 |
% title = {说C解C}, |
| 539 |
% title* = {C Story}, |
| 540 |
% author = {耿楠}, |
| 541 |
% author* = {Nan Geng}, |
| 542 |
% department = {信息工程学院} |
| 543 |
% } |
| 544 |
% } |
| 545 |
% \end{latexexample} |
| 546 |
% 或者 |
| 547 |
% \begin{latexexample}[morekeywords={\nwafuset},% |
| 548 |
% emph={[1]style,cjk-font,font-size,info,title,title*,author,author*,department}] |
| 549 |
% \nwafuset{ |
| 550 |
% style/cjk-font = adobe, |
| 551 |
% style/font-size = -4, |
| 552 |
% info/title = {说C解C}, |
| 553 |
% info/title* = {C Story}, |
| 554 |
% info/author = {耿楠}, |
| 555 |
% info/author* = {Nan Geng}, |
| 556 |
% info/department = {信息工程学院} |
| 557 |
% } |
| 558 |
% \end{latexexample} |
| 559 |
% |
| 560 |
% 注意 “|/|” 的前后均不可以出现空白字符。 |
| 561 |
% |
| 562 |
% \subsubsection{论文格式} \label{subsubsec:论文格式} |
| 563 |
% |
| 564 |
% \begin{function}[added=2021-05-12]{style} |
| 565 |
% \begin{nwafusyntax}[emph={[1]style}] |
| 566 |
% style = (*\marg{键值列表}*) |
| 567 |
% style/(*\meta{key}*) = (*\meta{value}*) |
| 568 |
% \end{nwafusyntax} |
| 569 |
% 该选项包含多个子项目,用于设置字体、字号等论文格式。 |
| 570 |
% \end{function} |
| 571 |
% |
| 572 |
% \begin{function}[added=2021-05-12,updated=2026-05-16]{style/font} |
| 573 |
% \begin{nwafusyntax}[emph={[1]font}] |
| 574 |
% font = (*<garamond|libertinus|lm|palatino|times|times*|none>*) |
| 575 |
% \end{nwafusyntax} |
| 576 |
% 设置西文字体(包括数学字体)。具体配置见表~\ref{tab:font}。 |
| 577 |
% 该选项若未指定,则由根据操作系统进行选择,Windows取times*,MacOS取times*,Linux取times。 |
| 578 |
% |
| 579 |
% \textbf{说明:}强烈建议让模板根据操作系统自行完成字体设置, |
| 580 |
% 对于Times New Roman这一西文字体的要求, |
| 581 |
% 论文撰写规范中明确说明可以使用相似字体进行替换。 |
| 582 |
% 同时,由于版权问题,本模板不提供任何字体安装文件。 |
| 583 |
% \end{function} |
| 584 |
% |
| 585 |
% \begin{table}[ht] |
| 586 |
% \begin{threeparttable} |
| 587 |
% \caption{西文字体配置} |
| 588 |
% \label{tab:font} |
| 589 |
% \centering |
| 590 |
% \begin{tabular}{ccccc} |
| 591 |
% \toprule |
| 592 |
% & \strong{正文字体} & \strong{无衬线字体} & \strong{等宽字体} & \strong{数学字体} \\ |
| 593 |
% \midrule |
| 594 |
% |garamond| & EB Garamond & Libertinus Sans & LM Mono\tnote{a} & Garamond Math\tnote{d} \\ |
| 595 |
% |libertinus| & Libertinus Serif & Libertinus Sans & LM Mono & Libertinus Math\tnote{d} \\ |
| 596 |
% |lm| & LM Roman & LM Sans & LM Mono & LM Math\tnote{d} \\ |
| 597 |
% |palatino| & TG Pagella\tnote{b} & Libertinus Sans & LM Mono & TG Pagella Math\tnote{d} \\ |
| 598 |
% |times| & XITS & TG Heros & TG Cursor & XITS Math \\ |
| 599 |
% |times*|\tnote{c} & Times New Roman & Arial & Courier New & XITS Math \\ |
| 600 |
% \bottomrule |
| 601 |
% \end{tabular} |
| 602 |
% \begin{tablenotes} |
| 603 |
% \item[a] “LM”是 Latin Modern 的缩写。 |
| 604 |
% \item[b] “TG”是 TeX Gyre 的缩写。 |
| 605 |
% \item[c] 本行中,Times New Roman、Arial 和 Courier New 是商业字体, |
| 606 |
% 在 Windows 和 macOS 系统上均默认安装。 |
| 607 |
% \changes{v2.16}{2026/05/16}{添加数学伪粗体说明。} |
| 608 |
% \item[d] 这些数学字体无粗体字形,采用伪粗体实现数学粗体。 |
| 609 |
% \end{tablenotes} |
| 610 |
% \end{threeparttable} |
| 611 |
% \end{table} |
| 612 |
% |
| 613 |
% \begin{function}[added=2021-05-12]{style/cjk-font} |
| 614 |
% \begin{nwafusyntax}[emph={[1]cjk-font}] |
| 615 |
% cjk-font = (*<adobe|fandol|founder|mac|sinotype|sourcehan|windows|none>*) |
| 616 |
% \end{nwafusyntax} |
| 617 |
% 设置中文字体。具体配置见表~\ref{tab:cjk-font}。 |
| 618 |
% 该选项若未指定,则由根据操作系统进行选择,Windows取windows,MacOS取mac,Linux取fandol。 |
| 619 |
% |
| 620 |
% \textbf{说明:}强烈建议让模板根据操作系统自行完成字体设置, |
| 621 |
% 如排版中出现“🄵”这样的字符(主要是中文姓名), |
| 622 |
% 则是因为字体中字形不完整造成的,可以尝试使用adobe、windows字体选项进行排版。 |
| 623 |
% 同样,由于版权问题,本模板不提供任何字体安装文件。 |
| 624 |
% \end{function} |
| 625 |
% |
| 626 |
% \begin{table}[ht] |
| 627 |
% \caption{中文字体配置} |
| 628 |
% \label{tab:cjk-font} |
| 629 |
% \centering |
| 630 |
% \begin{tabular}{cccc} |
| 631 |
% \toprule |
| 632 |
% & \strong{正文字体(宋体)} & \strong{无衬线字体(黑体)} & \strong{等宽字体(仿宋)} \\ |
| 633 |
% \midrule |
| 634 |
% \multirow{2}*{|adobe|} & Adobe 宋体 & Adobe 黑体 & Adobe 仿宋 \\ |
| 635 |
% & Adobe Song Std & Adobe Heiti Std & Adobe Fangsong Std \\ |
| 636 |
% \multirow{2}*{|fandol|} & Fandol 宋体 & Fandol 黑体 & Fandol 仿宋 \\ |
| 637 |
% & FandolSong & FandolHei & FandolFang \\ |
| 638 |
% \multirow{2}*{|founder|} & 方正书宋 & 方正黑体 & 方正仿宋 \\ |
| 639 |
% & FZShuSong-Z01 & FZHei-B01 & FZFangSong-Z02 \\ |
| 640 |
% \multirow{2}*{|mac|} & (华文)宋体-简 & (华文)黑体-简 & 华文仿宋 \\ |
| 641 |
% & Songti SC & Heiti SC & STFangsong \\ |
| 642 |
% \multirow{2}*{|sinotype|} & 华文宋体 & 华文黑体 & 华文仿宋 \\ |
| 643 |
% & STSong & STHeiti & STFangsong \\ |
| 644 |
% \multirow{2}*{|sourcehan|} & 思源宋体 & 思源黑体 & --- \\ |
| 645 |
% & Source Han Serif SC & Source Han Sans SC & --- \\ |
| 646 |
% \multirow{2}*{|windows|} & (中易)宋体 & (中易)黑体 & (中易)仿宋 \\ |
| 647 |
% & SimSun & SimHei & FangSong \\ |
| 648 |
% \bottomrule |
| 649 |
% \end{tabular} |
| 650 |
% \end{table} |
| 651 |
% |
| 652 |
% 启用 \kvopt{font}{none} 或 \kvopt{cjk-font}{none} 之后,模板将关闭 |
| 653 |
% 默认西文 / 中文字体设置。此时,需要自行使用 \cs{setmainfont}、 |
| 654 |
% \cs{setCJKmainfont}、\cs{setmathfont} 等命令来配置字体。 |
| 655 |
% |
| 656 |
% \begin{function}[added=2021-05-12]{style/font-size} |
| 657 |
% \begin{nwafusyntax}[emph={[1]font-size}] |
| 658 |
% font-size = (*<(-4)|5>*) |
| 659 |
% \end{nwafusyntax} |
| 660 |
% 设置论文的基础字号,默认为小四号,不建议修改。 |
| 661 |
% \end{function} |
| 662 |
% |
| 663 |
% \begin{function}[added=2021-05-12]{style/fullwidth-stop} |
| 664 |
% \begin{nwafusyntax}[emph={[1]fullwidth-stop}] |
| 665 |
% fullwidth-stop = (*<catcode|mapping|(false)>*) |
| 666 |
% \end{nwafusyntax} |
| 667 |
% 选择是否把全角实心句点\FSFW 作为默认的句号形状。 |
| 668 |
% 这种句号一般用于科技类文章,以避免与下标“$_o$”或“$_0$”混淆。 |
| 669 |
% \end{function} |
| 670 |
% |
| 671 |
% 选择 \kvopt{fullwidth-stop}{catcode} 或 \opt{mapping} 后,都会实现 |
| 672 |
% 上述效果。有所不同的是,在选择 \opt{catcode} 后,只有 |
| 673 |
% \emph{显式的}\FSID 会被替换为\FSFW;但在选择 \opt{mapping} 后, |
| 674 |
% \emph{所有的}\FSID 都会被替换。例如,如果用宏保存了一些含有 |
| 675 |
% \FSID 的文字,那么在选择 \opt{catcode} 时,其中的\FSID 不会被 |
| 676 |
% 替换为\FSFW。 |
| 677 |
% |
| 678 |
% 选项 \kvopt{fullwidth-stop}{mapping} 只在 \XeTeX{} 下有效。使用 |
| 679 |
% \LuaTeX{} 编译时,该选项相当于 \kvopt{fullwidth-stop}{catcode}。 |
| 680 |
% |
| 681 |
% 如果在选择 \kvopt{fullwidth-stop}{mapping} 后仍需要临时显示 |
| 682 |
% \FSID,可以按如下方法操作: |
| 683 |
% \begin{latexexample}[moretexcs={\CJKfontspec},emph={[1]Mapping}] |
| 684 |
% % 请使用 XeTeX 编译 |
| 685 |
% % 外侧的花括号表示分组 |
| 686 |
% 这是一个句号{\CJKfontspec{(*\meta{字体名}*)}[Mapping=full-stop]。} |
| 687 |
% \end{latexexample} |
| 688 |
% |
| 689 |
% \changes{v2.01}{2026/05/06}{添加带圈数字脚注选项。} |
| 690 |
% |
| 691 |
% \begin{function}[added=2021-05-12,updated=2026-05-06]{style/footnote-style} |
| 692 |
%^^A 这里奇怪的东西是用来控制对齐的。nwafusyntax 会吃掉开头的几个 |
| 693 |
%^^A 空格,因此这里用 X 来占位。 |
| 694 |
% \begin{nwafusyntax}[emph={[1]footnote-style}] |
| 695 |
% footnote-style = (*<plain|\\ |
| 696 |
% XXXXXX\mbox{}~~~~~~~~~~~~~~~~~libertinus|libertinus*|libertinus-sans|\\ |
| 697 |
% XXXXXX\mbox{}~~~~~~~~~~~~~~~~~pifont|pifont*|pifont-sans|pifont-sans*|\\ |
| 698 |
% XXXXXX\mbox{}~~~~~~~~~~~~~~~~~circled|circled*|circled-sans|circled-sans*|\\ |
| 699 |
% XXXXXX\mbox{}~~~~~~~~~~~~~~~~~xits|xits-sans|xits-sans*>*) |
| 700 |
% \end{nwafusyntax} |
| 701 |
% 设置脚注编号样式。西文字体设置会影响其默认取值(见 |
| 702 |
% 表~\ref{tab:footnote-font})。因此,要使得该选项生效,需将其 |
| 703 |
% 放置在 \opt{font} 选项之后。带有 |sans| 的为相应的无衬线字体 |
| 704 |
% 版本;带有 |*| 的为阴文样式(即黑底白字)。 |
| 705 |
% |
| 706 |
% \textbf{说明:}带圈数字(\opt{circled系列选项})是基于\pkg{pifont}宏包实现的, |
| 707 |
% 仅支持①-⑩之间的10个数字。 |
| 708 |
% \end{function} |
| 709 |
% |
| 710 |
% \begin{table}[ht] |
| 711 |
% \caption{西文字体与脚注编号样式默认值的对应关系} |
| 712 |
% \label{tab:footnote-font} |
| 713 |
% \centering |
| 714 |
% \begin{tabular}{ccccc} |
| 715 |
% \toprule |
| 716 |
% \textbf{西文字体设置} & |
| 717 |
% |libertinus| & |lm| & |palatino| & |times| \\ |
| 718 |
% \midrule |
| 719 |
% \textbf{脚注编号样式默认值} & |
| 720 |
% |libertinus| & |pifont| & |pifont| & |xits| \\ |
| 721 |
% \bottomrule |
| 722 |
% \end{tabular} |
| 723 |
% \end{table} |
| 724 |
% |
| 725 |
% \begin{function}[added=2021-05-12]{style/hyperlink} |
| 726 |
% \begin{nwafusyntax}[emph={[1]hyperlink}] |
| 727 |
% hyperlink = (*<border|color|(none)>*) |
| 728 |
% \end{nwafusyntax} |
| 729 |
% 设置超链接样式。\opt{border} 表示在超链接四周绘制方框; |
| 730 |
% \opt{color} 表示用彩色显示超链接,可输出用于批阅的电子稿; |
| 731 |
% \opt{none} 表示没有特殊装饰,可用于生成最终的打印版文稿。 |
| 732 |
% \end{function} |
| 733 |
% |
| 734 |
% \begin{function}[added=2021-05-12,updated=2021-05-12]{style/hyperlink-color} |
| 735 |
% \begin{nwafusyntax}[emph={[1]hyperlink-color}] |
| 736 |
% hyperlink-color = (*<(default)|classic|elegant|fantasy|material|\\ |
| 737 |
% XXXXXX\mbox{}~~~~~~~~~~~~~~~~~~business|science|summer|autumn|graylevel|prl>*) |
| 738 |
% \end{nwafusyntax} |
| 739 |
% 设置超链接颜色。该选项在 \kvopt{hyperlink}{none} 时无效。 |
| 740 |
% 各选项所代表的颜色见表~\ref{tab:hyperlink-color}。 |
| 741 |
% \end{function} |
| 742 |
% |
| 743 |
% \begin{table}[ht] |
| 744 |
% \centering |
| 745 |
% \newcommand\linkcolorexam[3]{^^A |
| 746 |
% {\small 图~\textcolor[HTML]{#1}{1-2}, |
| 747 |
% (\textcolor[HTML]{#1}{3.4})~式} & |
| 748 |
% {\small \textcolor[HTML]{#2}{\texttt{http://g.cn}}} & |
| 749 |
% {\small 文献~[\textcolor[HTML]{#3}{1}], |
| 750 |
% (\textcolor[HTML]{#3}{Knuth~1986})}} |
| 751 |
% \begin{threeparttable} |
| 752 |
% \caption{预定义的超链接颜色方案} |
| 753 |
% \label{tab:hyperlink-color} |
| 754 |
% \begin{tabular}{c*{3}{>{\hspace{0.2cm}}c<{\hspace{0.2cm}}}} |
| 755 |
% \toprule |
| 756 |
% \textsf{选项} & \textsf{链接} & \textsf{URL} & \textsf{引用} \\ |
| 757 |
% \midrule |
| 758 |
% \opt{default} & \linkcolorexam{990000}{0000B2}{007F00} \\ |
| 759 |
% \opt{classic} & \linkcolorexam{FF0000}{0000FF}{00FF00} \\ |
| 760 |
% \opt{elegant}\tnote{a} & \linkcolorexam{961212}{C31818}{9B764F} \\ |
| 761 |
% \opt{fantasy}\tnote{b} & \linkcolorexam{FF4A19}{FF3F94}{934BA1} \\ |
| 762 |
% \opt{material}\tnote{c} & \linkcolorexam{E91E63}{009688}{4CAF50} \\ |
| 763 |
% \opt{business}\tnote{d} & \linkcolorexam{D14542}{295497}{1F6E43} \\ |
| 764 |
% \opt{science}\tnote{e} & \linkcolorexam{CA0619}{389F9D}{FF8920} \\ |
| 765 |
% \opt{summer}\tnote{f} & \linkcolorexam{00AFAF}{5F5FAF}{5F8700} \\ |
| 766 |
% \opt{autumn}\tnote{f} & \linkcolorexam{D70000}{D75F00}{AF8700} \\ |
| 767 |
% \opt{graylevel}\tnote{c} & \linkcolorexam{616161}{616161}{616161} \\ |
| 768 |
% \opt{prl}\tnote{g} & \linkcolorexam{2D3092}{2D3092}{2D3092} \\ |
| 769 |
% \bottomrule |
| 770 |
% \end{tabular} |
| 771 |
% \begin{tablenotes} |
| 772 |
% \item[a] 来自 \href{https://tex.stackexchange.com/}^^A |
| 773 |
% {\TeX{} - \LaTeX{} Stack Exchange 网站}。 |
| 774 |
% \item[b] Adobe CC 产品配色。 |
| 775 |
% \item[c] 取自 Material 色彩方案 |
| 776 |
% (见 \url{https://material.io/guidelines/style/color.html})。 |
| 777 |
% \item[d] Microsoft Office 2016 产品配色。 |
| 778 |
% \item[e] 来自 \href{https://www.wolfram.com/}{Wolfram Research 网站}。 |
| 779 |
% \item[f] 均取自 Solarized 色彩方案 |
| 780 |
% (见 \url{http://ethanschoonover.com/solarized})。 |
| 781 |
% \item[g] \textit{Physical Review Letter} 杂志配色。 |
| 782 |
% \end{tablenotes} |
| 783 |
% \end{threeparttable} |
| 784 |
% \end{table} |
| 785 |
% |
| 786 |
% \begin{function}[added=2021-05-12]{style/bib-resource} |
| 787 |
% \begin{nwafusyntax}[emph={[1]bib-resource}] |
| 788 |
% bib-resource = (*\marg{文件}*) |
| 789 |
% \end{nwafusyntax} |
| 790 |
% 参考文献数据源。可以是单个文件,也可以是用英文逗号隔开的一组文件。 |
| 791 |
% 其中,各文献数据源文件必须明确给出 \file{.bib} |
| 792 |
% 后缀名。 |
| 793 |
% \end{function} |
| 794 |
% |
| 795 |
% \begin{function}[added=2021-05-12]{style/logo} |
| 796 |
% \begin{nwafusyntax}[emph={[1]logo}] |
| 797 |
% logo = (*\marg{文件}*) |
| 798 |
% \end{nwafusyntax} |
| 799 |
% 封面中校名图片的文件名。默认值为 \file{logo/nwafu-bar.pdf}。 |
| 800 |
% \end{function} |
| 801 |
% |
| 802 |
% \begin{function}[added=2021-05-12]{style/logo-size} |
| 803 |
% \begin{nwafusyntax}[emph={[1]logo-size}] |
| 804 |
% logo-size = (*\marg{宽度}*) |
| 805 |
% logo-size = {(*\meta{宽度}*), (*\meta{高度}*)} |
| 806 |
% \end{nwafusyntax} |
| 807 |
% 校名图片的大小。默认仅指定了宽度,为 |0.65\textwidth|\/。 |
| 808 |
% 如果仅需指定高度,可在 \meta{宽度} 处填入一个空的分组 |{}|。 |
| 809 |
% \end{function} |
| 810 |
% |
| 811 |
% \begin{function}[added=2021-05-12,updated=2021-5-22]{style/auto-make-cover} |
| 812 |
% \begin{nwafusyntax}[emph={[1]auto-make-cover}] |
| 813 |
% auto-make-cover = (*<\TTF>*) |
| 814 |
% \end{nwafusyntax} |
| 815 |
% 是否自动生成研究生论文的封面(封一)、英文封面(封二)、 |
| 816 |
% 题名页(封三)、项目资助页(封四)、声明页(封五)和 |
| 817 |
% 使用授权页(封六)。本科论文(设计)的封面(封0)、题名页(封一)、 |
| 818 |
% 项目资助页(封四)和声明及使用授权页(封七)。 |
| 819 |
% 封面中的各项信息,可通过 \cs{nwafuset} 录入, |
| 820 |
% 具体请参阅 \ref{subsubsec:信息录入}~节。 |
| 821 |
% \end{function} |
| 822 |
% |
| 823 |
% \begin{function}[deprecated,added=2021-05-18,updated=2026-04-29]{style/withchapter} |
| 824 |
% \begin{nwafusyntax}[emph={[1]withchapter}] |
| 825 |
% withchapter = (*<\TTF>*) |
| 826 |
% \end{nwafusyntax} |
| 827 |
% 选择论文章标题格式为章格式(如:第1章 绪论)还是报告格式(如:1 绪论),默认为章格式。 |
| 828 |
% |
| 829 |
% \changes{v2.00}{2026/05/07}{删除\opt{withchapter}选项。} |
| 830 |
% \emph{注意:} 从 v2.00 开始,该选项已被删除。 |
| 831 |
% \end{function} |
| 832 |
% |
| 833 |
% \begin{function}[added=2026-04-30]{style/figtabtoc} |
| 834 |
% \begin{nwafusyntax}[emph={[1]figtabtoc}] |
| 835 |
% figtabtoc = (*<\TTF>*) |
| 836 |
% \end{nwafusyntax} |
| 837 |
% 选择是否输出插图与附表清单,目前仅对本科有效。 |
| 838 |
% \end{function} |
| 839 |
% |
| 840 |
% \begin{function}[added=2022-05-29,updated=2026-5-03]{style/withsign} |
| 841 |
% \begin{nwafusyntax}[emph={[1]withsign}] |
| 842 |
% withsign = (*<\TFF>*) |
| 843 |
% \end{nwafusyntax} |
| 844 |
% 题名页是否需要签名,默认为不需要签名。 |
| 845 |
% |
| 846 |
% \changes{v2.00}{2026/05/07}{将\opt{withsig}选项更名为\opt{withsign}。} |
| 847 |
% \emph{注意:} 从 v2.00 开始,此选项名称由原\opt{withsig}更名为\opt{withsign}。 |
| 848 |
% \end{function} |
| 849 |
% |
| 850 |
% \changes{v1.25}{2023/04/19}{添加盲审样式参数说明。} |
| 851 |
% |
| 852 |
% \begin{function}[added=2023-04-19]{style/anonymous} |
| 853 |
% \begin{nwafusyntax}[emph={[1]anonymous}] |
| 854 |
% anonymous = (*<\TFF>*) |
| 855 |
% \end{nwafusyntax} |
| 856 |
% 选择是否输出盲审格式论文,默认为不输出盲审格式论文。 |
| 857 |
% \end{function} |
| 858 |
% |
| 859 |
% \begin{function}[deprecated,added=2022-05-24,updated=2026-05-07]{style/chapnum} |
| 860 |
% \begin{nwafusyntax}[emph={[1]chapnum}] |
| 861 |
% chapnum = (*<zh|(en)>*) |
| 862 |
% \end{nwafusyntax} |
| 863 |
% 选择章编号格式,zh表示中文数字,en表示阿拉伯数字,默认为阿拉伯数字。 |
| 864 |
% |
| 865 |
% \changes{v2.00}{2026/05/07}{删除\opt{chapnum}选项。} |
| 866 |
% \emph{注意:} 从 v2.00 开始,该选项已被删除。 |
| 867 |
% \end{function} |
| 868 |
% |
| 869 |
% \subsubsection{信息录入} \label{subsubsec:信息录入} |
| 870 |
% |
| 871 |
% \begin{function}[added=2021-05-12]{info} |
| 872 |
% \begin{nwafusyntax}[emph={[1]info}] |
| 873 |
% info = (*\marg{键值列表}*) |
| 874 |
% info/(*\meta{key}*) = (*\meta{value}*) |
| 875 |
% \end{nwafusyntax} |
| 876 |
% 该选项包含许多子项目,用于录入论文信息。具体内容见下。以下带“|*|” |
| 877 |
% 的项目表示对应的英文字段。 |
| 878 |
% \end{function} |
| 879 |
% |
| 880 |
% \begin{function}[added=2021-05-12,updated=2026-05-09]{info/ptype} |
| 881 |
% \begin{nwafusyntax}[emph={[1]ptype}] |
| 882 |
% ptype = (*<(academic)|engineering>*) |
| 883 |
% \end{nwafusyntax} |
| 884 |
% 学位类型,仅适用于区分研究学位。\opt{academic} 和 \opt{engineering} |
| 885 |
% 分别表示学术型和专业学位型。 |
| 886 |
% |
| 887 |
% \changes{v2.02}{2026/05/09}{将学位类型选项名称修改为ptype,将professional选项值修改为engineering。} |
| 888 |
% |
| 889 |
% \textbf{说明:} 从 v2.02 开始,该选项名称已由\opt{degree}修改为\opt{ptype} |
| 890 |
% (p---postgraduate),其选项值\opt{professional}修改为\opt{engineering}。 |
| 891 |
% \end{function} |
| 892 |
% |
| 893 |
% \begin{function}[added=2021-05-18]{info/btype} |
| 894 |
% \begin{nwafusyntax}[emph={[1]btype}] |
| 895 |
% btype = (*<(paper)|design>*) |
| 896 |
% \end{nwafusyntax} |
| 897 |
% 本科毕业类型,仅适用于本科。\opt{paper} 和 \opt{design} |
| 898 |
% 分别表示论文和设计。 |
| 899 |
% \end{function} |
| 900 |
% |
| 901 |
% \begin{function}[added=2021-05-12]{info/title,info/title*} |
| 902 |
% \begin{nwafusyntax}[emph={[1]title,title*}] |
| 903 |
% title = (*\marg{中文标题}*) |
| 904 |
% title* = (*\marg{英文标题}*) |
| 905 |
% \end{nwafusyntax} |
| 906 |
% 论文标题。默认会在约 20 个汉字字宽处强制断行,但为了语义的 |
| 907 |
% 连贯以及排版的美观,如果的标题长于一行,建议使用“|\\|” |
| 908 |
% 进行手动断行。 |
| 909 |
% \end{function} |
| 910 |
% |
| 911 |
% \begin{function}[added=2021-05-12]{info/author,info/author*} |
| 912 |
% \begin{nwafusyntax}[emph={[1]author,author*}] |
| 913 |
% author = (*\marg{姓名}*) |
| 914 |
% author* = (*\marg{英文姓名或拼音}*) |
| 915 |
% \end{nwafusyntax} |
| 916 |
% 作者姓名。 |
| 917 |
% \end{function} |
| 918 |
% |
| 919 |
% \changes{v2.01}{2026/05/07}{允许指导教师添加职称。} |
| 920 |
% \begin{function}[added=2021-05-18,updated=2026-05-07]{info/supervisor, info/supervisor*} |
| 921 |
% \begin{nwafusyntax}[emph={[1]supervisor, supervisor*}] |
| 922 |
% supervisor = (*\marg{姓名}*) |
| 923 |
% supervisor* = (*\marg{英文姓名或拼音}*) |
| 924 |
% \end{nwafusyntax} |
| 925 |
% 导师姓名。可以有多个导师,每个导师包括英文逗号分隔的姓名和职称(可以省略), |
| 926 |
% 不同导师置于大括号内,然后用英文逗号分隔 |
| 927 |
% \end{function} |
| 928 |
% |
| 929 |
% \changes{v2.01}{2026/05/07}{允许合作指导教师添加职称。若无合作指导教师,则不输出任何内容。} |
| 930 |
% \begin{function}[added=2021-05-18,updated=2026-05-07]{info/cosupervisor, info/cosupervisor*} |
| 931 |
% \begin{nwafusyntax}[emph={[1]cosupervisor, cosupervisor*}] |
| 932 |
% cosupervisor = (*\marg{姓名}*) |
| 933 |
% cosupervisor* = (*\marg{英文姓名或拼音}*) |
| 934 |
% \end{nwafusyntax} |
| 935 |
% 合作指导教师姓名。可以有多个导师,每个导师包括英文逗号分隔的姓名和职称(可以省略), |
| 936 |
% 不同导师置于大括号内,然后用英文逗号分隔 |
| 937 |
% \end{function} |
| 938 |
% |
| 939 |
% \changes{v2.01}{2026/05/07}{允许博士指导小组添加职称。} |
| 940 |
% \begin{function}[added=2021-05-12,updated=2026-05-07]{info/instructors} |
| 941 |
% \begin{nwafusyntax}[emph={[1]instructors}] |
| 942 |
% instructors = (*\marg{成员 1, 成员 2, ...}*) |
| 943 |
% \end{nwafusyntax} |
| 944 |
% 指导小组成员(仅研究生需要)。各成员之间需使用英文逗号隔开。为防止歧义, |
| 945 |
% 可以用分组括号“|{...}|”把各成员字段括起来。 |
| 946 |
% 每个导师包括英文逗号分隔的姓名和职称(可以省略)。 |
| 947 |
% \end{function} |
| 948 |
% |
| 949 |
% \begin{function}[added=2021-05-18]{info/department, info/department*} |
| 950 |
% \begin{nwafusyntax}[emph={[1]department, department*}] |
| 951 |
% department = (*\marg{名称}*) |
| 952 |
% department* = (*\marg{英文名称}*) |
| 953 |
% \end{nwafusyntax} |
| 954 |
% 学院名称。 |
| 955 |
% \end{function} |
| 956 |
% |
| 957 |
% \begin{function}[added=2021-05-18]{info/major,info/major*} |
| 958 |
% \begin{nwafusyntax}[emph={[1]major, major*}] |
| 959 |
% major = (*\marg{名称}*) |
| 960 |
% major* = (*\marg{英文名称}*) |
| 961 |
% \end{nwafusyntax} |
| 962 |
% 专业名称。 |
| 963 |
% \end{function} |
| 964 |
% |
| 965 |
% \begin{function}[deprecated,added=2021-05-18,updated=2026-05-10]{info/researchfield, info/researchfield*} |
| 966 |
% \begin{nwafusyntax}[emph={[1]researchfield, researchfield*}] |
| 967 |
% researchfield = (*\marg{名称}*) |
| 968 |
% researchfield* = (*\marg{英文名称}*) |
| 969 |
% \end{nwafusyntax} |
| 970 |
% 研究方向名称(仅学术学位研究生需要)。 |
| 971 |
|
| 972 |
% \changes{v2.02}{2026/05/09}{删除\opt{researchfield}和\opt{researchfield*}选项。} |
| 973 |
% \emph{注意:} 从 v2.02 开始,该选项已被删除。 |
| 974 |
% \end{function} |
| 975 |
% |
| 976 |
% \begin{function}[added=2021-05-18,updated=2026-05-09]{info/engtitle, info/engtitle*} |
| 977 |
% \begin{nwafusyntax}[emph={[1]engtitle, engtitle*}] |
| 978 |
% engtitle = (*\marg{名称}*) |
| 979 |
% engtitle* = (*\marg{英文名称}*) |
| 980 |
% \end{nwafusyntax} |
| 981 |
% 专业学位类型名称(仅专业学位研究生需要)。 |
| 982 |
% |
| 983 |
% \changes{v2.02}{2026/05/09}{将专业学位名称选项名称修改为\opt{engtitle}。} |
| 984 |
% |
| 985 |
% \textbf{说明:} 从 v2.02 开始,该选项名称已由\opt{professionaltype}修改为\opt{engtitle}。 |
| 986 |
% \end{function} |
| 987 |
% |
| 988 |
% \begin{function}[added=2021-05-18,updated=2026-05-09]{info/engfield, info/engfield*} |
| 989 |
% \begin{nwafusyntax}[emph={[1]engfield, engfield*}] |
| 990 |
% engfield = (*\marg{名称}*) |
| 991 |
% engfield* = (*\marg{英文名称}*) |
| 992 |
% \end{nwafusyntax} |
| 993 |
% 专业学位领域名称(仅专业学位研究生需要)。 |
| 994 |
% |
| 995 |
% \changes{v2.02}{2026/05/09}{将专业学位领域选项名称修改为\opt{engfield}。} |
| 996 |
% |
| 997 |
% \textbf{说明:} 从 v2.02 开始,该选项名称已由\opt{professionalfield}修改为\opt{engfield}。 |
| 998 |
% \end{function} |
| 999 |
% |
| 1000 |
% \begin{function}[added=2026-04-30]{info/btitle} |
| 1001 |
% \begin{nwafusyntax}[emph={[1]btitle}] |
| 1002 |
% btitle = (*\marg{学士学位类别}*) |
| 1003 |
% \end{nwafusyntax} |
| 1004 |
% 申请的学士学位类别,如农学、工学、理学、法学、文学、管理学等。 |
| 1005 |
% |
| 1006 |
% \changes{v2.02}{2026/05/09}{将本科生申请学科类别选项名称修改为\opt{btitle}。} |
| 1007 |
% \emph{注意:}本选项仅对本科有效。 |
| 1008 |
% \end{function} |
| 1009 |
% |
| 1010 |
% \begin{function}[added=2021-05-23]{info/mastertype} |
| 1011 |
% \begin{nwafusyntax}[emph={[1]mastertype}] |
| 1012 |
% mastertype = (*\marg{研究生学位英文名称}*) |
| 1013 |
% \end{nwafusyntax} |
| 1014 |
% 研究生学位英文名称(用于硕士研究生英文封面)。 |
| 1015 |
% |
| 1016 |
% 对于学术硕士可以取:Philosophy(哲学);Economics(经济学); |
| 1017 |
% Science(理学);Engineering(工学);Agriculture(农学); |
| 1018 |
% Management(管理学)等(注意首字母需要大写)。 |
| 1019 |
% |
| 1020 |
% 对于专业学位硕士可以取:Engineering(工程硕士); |
| 1021 |
% Agricultural(农业硕士) 等(注意首字母需要大写)。 |
| 1022 |
% \end{function} |
| 1023 |
% |
| 1024 |
% \begin{function}[added=2021-05-12]{info/student-id} |
| 1025 |
% \begin{nwafusyntax}[emph={[1]student-id}] |
| 1026 |
% student-id = (*\marg{数字}*) |
| 1027 |
% \end{nwafusyntax} |
| 1028 |
% 作者学号。 |
| 1029 |
% \end{function} |
| 1030 |
% |
| 1031 |
% 西北农林科技大学学号采用10位4段制编码:X1--X4/X5/X6/X7--X10。 |
| 1032 |
% 其中: |
| 1033 |
% |
| 1034 |
% X1--X4代表入学年份。 |
| 1035 |
% |
| 1036 |
% X5=0表示学生,此时,X6=1-2表示本科, |
| 1037 |
% X6=3表示成人教育学生,X6=4表示预科生,X6=5-6表示研究生, |
| 1038 |
% X6=7表示国际学院学生,X6=8表示水土保持研究所学生。 |
| 1039 |
% X7-X10为流水号。 |
| 1040 |
% |
| 1041 |
% \begin{function}[deprecated,added=2022-05-18,updated=2026-05-07]{info/class-id} |
| 1042 |
% \begin{nwafusyntax}[emph={[1]class-id}] |
| 1043 |
% class-id = (*\marg{数字}*) |
| 1044 |
% \end{nwafusyntax} |
| 1045 |
% 作者班级号,班号数字(仅本科生使用)。 |
| 1046 |
% |
| 1047 |
% \changes{v2.00}{2026/05/07}{已弃用\opt{class-id}选项。} |
| 1048 |
% \textbf{已弃用:} 从 v2.00 开始,此选项已不再需要,将在后续版本中移除。 |
| 1049 |
% \end{function} |
| 1050 |
% |
| 1051 |
% \begin{function}[added=2021-05-18]{info/grade} |
| 1052 |
% \begin{nwafusyntax}[emph={[1]grade}] |
| 1053 |
% grade = (*\marg{数字}*) |
| 1054 |
% \end{nwafusyntax} |
| 1055 |
% 毕业年份(届)。 |
| 1056 |
% \end{function} |
| 1057 |
% |
| 1058 |
% \begin{function}[deprecated,added=2021-05-18,updated=2026-04-30]{info/enroll} |
| 1059 |
% \begin{nwafusyntax}[emph={[1]enroll}] |
| 1060 |
% enroll = (*\marg{数字}*) |
| 1061 |
% \end{nwafusyntax} |
| 1062 |
% 入学年份(年级)(仅本科生需要)。 |
| 1063 |
% |
| 1064 |
% \changes{v2.00}{2026/05/07}{已弃用\opt{enroll}选项。} |
| 1065 |
% \textbf{已弃用:} 从 v2.00 开始,此选项已不再需要,将在后续版本中移除。 |
| 1066 |
% \end{function} |
| 1067 |
% |
| 1068 |
% \begin{function}[added=2021-05-12,updated=2021-05-23]{info/school-id} |
| 1069 |
% \begin{nwafusyntax}[emph={[1]school-id}] |
| 1070 |
% school-id = (*\marg{数字}*) |
| 1071 |
% \end{nwafusyntax} |
| 1072 |
% 学校代码。默认值为 10712(西北农林科技大学学校代码)。 |
| 1073 |
% \end{function} |
| 1074 |
% |
| 1075 |
% \begin{function}[added=2021-05-12, updated=2021-05-24]{info/date, info/date*} |
| 1076 |
% \begin{nwafusyntax}[emph={[1]date, date*}] |
| 1077 |
% date = (*\marg{日期}*) |
| 1078 |
% date* = (*\marg{英文日期}*) |
| 1079 |
% \end{nwafusyntax} |
| 1080 |
% 学位会召开月份。 |
| 1081 |
% \end{function} |
| 1082 |
% |
| 1083 |
% \begin{function}[added=2021-05-18]{info/defensedate} |
| 1084 |
% \begin{nwafusyntax}[emph={[1]defensedate}] |
| 1085 |
% defensedate = (*\marg{日期}*) |
| 1086 |
% \end{nwafusyntax} |
| 1087 |
% 论文答辩日期(仅研究生需要)。默认值为文档编译日期(\tn{today})。 |
| 1088 |
% \end{function} |
| 1089 |
% |
| 1090 |
% \begin{function}[added=2021-05-12, updated=2026-05-17]{info/secret-level} |
| 1091 |
% \begin{nwafusyntax}[emph={[1]secret-level}] |
| 1092 |
% secret-level = (*<(none)|i|ii>*) |
| 1093 |
% \end{nwafusyntax} |
| 1094 |
% 密级(仅研究生需要)。\opt{i}、\opt{ii}分别表示限制和秘密的密级; |
| 1095 |
% \opt{none} 表示不涉密,密级为公开。 |
| 1096 |
% \end{function} |
| 1097 |
% |
| 1098 |
% \begin{function}[added=2021-05-18]{info/defensecommittees} |
| 1099 |
% \begin{nwafusyntax}[emph={[1]defensecommittees}] |
| 1100 |
% defensecommittees = (*\marg{\{单位, 姓名, 职称\}, \{单位, 姓名, 职称\}, ...}*) |
| 1101 |
% \end{nwafusyntax} |
| 1102 |
% 答辩委员会构成,每个成员由单位、姓名和职称三部分构成, |
| 1103 |
% 用英文逗号分隔后置于大括号内,不同成员间用英文逗号隔开。为防止歧义, |
| 1104 |
% 可以用分组括号“|{...}|”把每个成员中的各个字段括起来。 |
| 1105 |
% \end{function} |
| 1106 |
% |
| 1107 |
% \begin{function}[added=2021-05-18]{info/foundation} |
| 1108 |
% \begin{nwafusyntax}[emph={[1]foundation}] |
| 1109 |
% foundation = (*\marg{\{来源, 名称, 编号\}, \{来源, 名称, 编号\}, ...}*) |
| 1110 |
% \end{nwafusyntax} |
| 1111 |
% 论文资助项目(仅研究生需要),每个项目由来源、名称和编号三部分构成, |
| 1112 |
% 用英文逗号分隔后置于大括号内,不同项目间用英文逗号隔开。为防止歧义, |
| 1113 |
% 可以用分组括号“|{...}|”把每个项目中的各个字段括起来。 |
| 1114 |
% \end{function} |
| 1115 |
% |
| 1116 |
% \begin{function}[added=2021-05-12]{info/clc} |
| 1117 |
% \begin{nwafusyntax}[emph={[1]clc}] |
| 1118 |
% clc = (*\marg{分类号}*) |
| 1119 |
% \end{nwafusyntax} |
| 1120 |
% 中图分类号(CLC)(仅研究生需要)。 |
| 1121 |
% \end{function} |
| 1122 |
% |
| 1123 |
% \begin{function}[added=2021-05-12]{info/udc} |
| 1124 |
% \begin{nwafusyntax}[emph={[1]udc}] |
| 1125 |
% udc = (*\marg{UDC码}*) |
| 1126 |
% \end{nwafusyntax} |
| 1127 |
% UDC码(UDC)(仅研究生需要)。 |
| 1128 |
% \end{function} |
| 1129 |
% |
| 1130 |
% \subsubsection{摘要数据录入} \label{subsubsec:摘要数据录入} |
| 1131 |
% |
| 1132 |
% \begin{function}[added=2021-05-31]{nwafu / abstract} |
| 1133 |
% \begin{nwafusyntax}[emph={[1]abstract}] |
| 1134 |
% abstract = (*\marg{键值列表}*) |
| 1135 |
% abstract/(*\meta{key}*) = (*\meta{value}*) |
| 1136 |
% \end{nwafusyntax} |
| 1137 |
% 该选项包含多个子项目,用于录入或指定论文摘要数据文件, |
| 1138 |
% 具体内容见下。以下带“|*|” 的项目表示对应的英文字段。 |
| 1139 |
% \end{function} |
| 1140 |
% |
| 1141 |
% \begin{function}[added=2021-05-31]{abstract/abstractfile,abstract/abstractfile*} |
| 1142 |
% \begin{nwafusyntax}[emph={[1]abstractfile,abstractfile*}] |
| 1143 |
% abstractfile = (*\marg{中文摘要文件名}*) |
| 1144 |
% abstractfile* = (*\marg{英文摘要文件名}*) |
| 1145 |
% \end{nwafusyntax} |
| 1146 |
% 摘要内容\file{.tex}源文件的文件名称。在文件名中可以使用路径信息, |
| 1147 |
% 文件名中需包括\file{.tex}扩展名。 |
| 1148 |
% \end{function} |
| 1149 |
% |
| 1150 |
% \begin{function}[added=2021-05-12,updated=2021-05-31]{abstract/keywords,abstract/keywords*} |
| 1151 |
% \begin{nwafusyntax}[emph={[1]keywords,keywords*}] |
| 1152 |
% keywords = (*\marg{中文关键字}*) |
| 1153 |
% keywords* = (*\marg{英文关键字}*) |
| 1154 |
% \end{nwafusyntax} |
| 1155 |
% 关键字列表。各关键字之间需\textbf{使用英文逗号隔开}。为防止歧义, |
| 1156 |
% 可以用分组括号“|{...}|”把各关键字括起来。 |
| 1157 |
% \end{function} |
| 1158 |
% |
| 1159 |
% \begin{function}[added=2021-05-31]{abstract/notationfile} |
| 1160 |
% \begin{nwafusyntax}[emph={[1]notationfile}] |
| 1161 |
% notationfile = (*\marg{主要符号对照表文件名}*) |
| 1162 |
% \end{nwafusyntax} |
| 1163 |
% 主要符号对照表内容\file{.tex}源文件的文件名称。在文件名中可以使用路径信息。 |
| 1164 |
% 文件名中需包括\file{.tex}扩展名。如果未提供文件名,则不输出符号表。 |
| 1165 |
% |
| 1166 |
% \emph{说明:}主要符号对照表文件是一个用\env{notation}环境排版的普通表格, |
| 1167 |
% 目前\env{notation}基于\pkg{tabularray}宏包的\env{longtblr}环境实现。 |
| 1168 |
% \end{function} |
| 1169 |
% |
| 1170 |
% \changes{v2.00}{2026/05/07}{添加\opt{termfile}选项。} |
| 1171 |
% \begin{function}[added=2026-05-01]{abstract/termfile} |
| 1172 |
% \begin{nwafusyntax}[emph={[1]termfile}] |
| 1173 |
% termfile = (*\marg{术语表文件名}*) |
| 1174 |
% \end{nwafusyntax} |
| 1175 |
% 术语表内容\file{.tex}源文件的文件名称。在文件名中可以使用路径信息。 |
| 1176 |
% 文件名中需包括\file{.tex}扩展名。如果未提供文件名,则不输出术语表。 |
| 1177 |
% |
| 1178 |
% \emph{说明:}主要符号对照表文件是一个用\env{terminology}环境排版的普通表格, |
| 1179 |
% 目前\env{terminology}基于\pkg{tabularray}宏包的\env{longtblr}环境实现。 |
| 1180 |
% \end{function} |
| 1181 |
% |
| 1182 |
% \subsection{正文编写} |
| 1183 |
% |
| 1184 |
% \begin{quotation} |
| 1185 |
% 喬孟符(吉)博學多能,以樂府稱。嘗云:「作樂府亦有法,曰^^A |
| 1186 |
% \CJKunderdot{鳳頭、豬肚、豹尾}六字是也。」大概起要美麗,中要浩蕩, |
| 1187 |
% 結要響亮。尤貴在首尾貫穿,意思清新。苟能若是,斯可以言樂府矣。 |
| 1188 |
% \end{quotation} |
| 1189 |
% \hfill ——陶宗儀《南村輟耕錄·作今樂府法》 |
| 1190 |
% |
| 1191 |
% \subsubsection{凤头} |
| 1192 |
% |
| 1193 |
% \begin{function}[added=2021-05-29]{\frontmatter,\frontmatter*} |
| 1194 |
% \begin{nwafusyntax}[deletetexcs={\frontmatter,\frontmatter*}, |
| 1195 |
% morekeywords={\frontmatter,\frontmatter*}] |
| 1196 |
% \frontmatter(*\oarg{编号格式|(Roman)}*) |
| 1197 |
% \frontmatter*(*\oarg{编号格式|(Roman)}*) |
| 1198 |
% \end{nwafusyntax} |
| 1199 |
% \cs{frontmatter} 为前言区命令,章标题不编号, |
| 1200 |
% 默认页码为从I开始计数的大写罗马数字,也可以指定页码格式。 |
| 1201 |
% 带有星号的命令 \cs{frontmatter*} 不使用清双页命令 \tn{cleardoublepage}。 |
| 1202 |
% |
| 1203 |
% \end{function} |
| 1204 |
% |
| 1205 |
% \changes{v2.00}{2026/05/07}{为本科生添加封面0和封面四。} |
| 1206 |
% 对于研究生学位论文,该部分包含封面(研究生包括封面一$\sim$七, |
| 1207 |
% 本科包括封面0、封面一、封面四和封面七)、中英文摘要、主要符号对照表和目录。 |
| 1208 |
% 在前置部分中,中英文摘要开始至主要符号对照表,页码采用大写罗马字母,并且与目录分开计数。 |
| 1209 |
% 目录应该放在奇数页起排,页码采用大写罗马字母,并与正文分开计数。 |
| 1210 |
% |
| 1211 |
% 对于本科毕业论文(设计),该部分包含中英文摘要和目录。其中, |
| 1212 |
% 中英文摘要无页码。目录应该放在奇数页起排,页码采用大写罗马字母,并与正文分开计数 |
| 1213 |
% |
| 1214 |
% 建议将中英文摘要内容分别写在不同\file{.tex}源文件中,然后用\cs{nwafuset}设置文件名后, |
| 1215 |
% 自动排版。在摘要的最后,会显示关键字列表,可通过 \cs{nwafuset} 录入关键字列表。 |
| 1216 |
% 关于摘要数据录入,具体请参阅 \ref{subsubsec:摘要数据录入}~节。 |
| 1217 |
% |
| 1218 |
% 建议将主要符号对照表写在\file{.tex}源文件中,然后用\cs{nwafuset}设置文件名后, |
| 1219 |
% 自动排版。关于主要符号对照表数据录入,具体请参阅 \ref{subsubsec:摘要数据录入}~节。 |
| 1220 |
% |
| 1221 |
% 为正确按要求实现排版顺序和页码,不建议手动排版封面、中英文摘要、主要符号对照表和目录, |
| 1222 |
% 在提供基本内容后,由模板自动实现前置部分(凤头)排版 |
| 1223 |
% |
| 1224 |
% \subsubsection{猪肚} |
| 1225 |
% |
| 1226 |
% \begin{function}[added=2021-05-29]{\mainmatter,\mainmatter*} |
| 1227 |
% \begin{nwafusyntax}[deletetexcs={\mainmatter,\mainmatter*}, |
| 1228 |
% morekeywords={\mainmatter,\mainmatter*}] |
| 1229 |
% \mainmatter |
| 1230 |
% \mainmatter* |
| 1231 |
% \end{nwafusyntax} |
| 1232 |
% \cs{mainmatter} 为主文区命令,章标题正常编号, |
| 1233 |
% 且页码为从1开始计数的阿拉伯数字, |
| 1234 |
% 带有星号的命令 \cs{mainmatter*} 不使用清双页命令 \tn{cleardoublepage}。 |
| 1235 |
% |
| 1236 |
% 注意,由于要求第一章从奇数页开始排版, |
| 1237 |
% 因此应该使用不带星号的\cs{mainmatter}开始正文主体区的排版。 |
| 1238 |
% \end{function} |
| 1239 |
% |
| 1240 |
% 主体部分是论文的核心,可以分章节撰写。如有需求,也可以采用 |
| 1241 |
% 多文件方式撰写,然后用\cs{include}命令将各个子文件包含入主文件。 |
| 1242 |
% 主体部分的页码采用阿拉伯数字连续编号。 |
| 1243 |
% |
| 1244 |
% \begin{function}[added=2021-05-12]{\footnote} |
| 1245 |
% \begin{nwafusyntax}[deletetexcs={\footnote},% |
| 1246 |
% morekeywords={\footnote}] |
| 1247 |
% \footnote(*\marg{脚注文字}*) |
| 1248 |
% \end{nwafusyntax} |
| 1249 |
% 插入脚注。脚注编号样式可利用 \opt{style/footnote-style} 选项控制, |
| 1250 |
% 具体见 \ref{subsubsec:论文格式}~小节。 |
| 1251 |
% \end{function} |
| 1252 |
% |
| 1253 |
% \begin{function}[added=2021-05-12]{axiom,corollary,definition,example,lemma, |
| 1254 |
% proof,theorem} |
| 1255 |
% \begin{nwafusyntax}[emph={[2]proof}] |
| 1256 |
% \begin{proof}(*\oarg{小标题}*) |
| 1257 |
% (*\meta{证明过程}*) |
| 1258 |
% \end{proof} |
| 1259 |
% \end{nwafusyntax} |
| 1260 |
% 一系列预定义的数学环境。具体含义见表~\ref{tab:theorem}。 |
| 1261 |
% \end{function} |
| 1262 |
% |
| 1263 |
% \begin{table}[ht] |
| 1264 |
% \caption{预定义的数学环境} \label{tab:theorem} |
| 1265 |
% \centering |
| 1266 |
% \begin{tabular}{cccccccc} |
| 1267 |
% \toprule |
| 1268 |
% \textbf{名称} & |
| 1269 |
% \env{axiom} & \env{corollary} & \env{definition} & |
| 1270 |
% \env{example} & \env{lemma} & \env{proof} & |
| 1271 |
% \env{theorem} \\ |
| 1272 |
% \midrule |
| 1273 |
% \textbf{含义} & |
| 1274 |
% 公理 & 推论 & 定义 & 例 & 引理 & 证明 & 定理 \\ |
| 1275 |
% \bottomrule |
| 1276 |
% \end{tabular} |
| 1277 |
% \end{table} |
| 1278 |
% |
| 1279 |
% 证明环境(\env{proof})的最后会添加证毕符号“$\QED$”。要确保 |
| 1280 |
% 该符号在正确的位置显示,需要按照 \ref{subsec:编译方式}~节 |
| 1281 |
% 中的有关说明至少编译\emph{两次},可不执行biber main参考文献编译操作。 |
| 1282 |
% |
| 1283 |
% \begin{function}[added=2021-05-12]{\newtheorem} |
| 1284 |
% \begin{nwafusyntax}[deletetexcs={\newtheorem}, |
| 1285 |
% morekeywords={\newtheorem,\newtheorem*}] |
| 1286 |
% \newtheorem(*\oarg{选项}\marg{环境名}\marg{标题}*) |
| 1287 |
% \newtheorem*(*\oarg{选项}\marg{环境名}\marg{标题}*) |
| 1288 |
% \begin(*\marg{环境名}\oarg{小标题}*) |
| 1289 |
% (*\meta{内容}*) |
| 1290 |
% \end(*\marg{环境名}*) |
| 1291 |
% \end{nwafusyntax} |
| 1292 |
% 声明新的定理类环境(数学环境)。带星号的版本表示不进行编号, |
| 1293 |
% 并且会默认添加证毕符号“$\QED$”。声明后,即可同预定义的数学环境 |
| 1294 |
% 一样使用。 |
| 1295 |
% \end{function} |
| 1296 |
% |
| 1297 |
% 事实上,表~\ref{tab:theorem} 中预定义的环境正是通过以下方式定义的: |
| 1298 |
% \begin{latexexample}[deletetexcs={\newtheorem}, |
| 1299 |
% morekeywords={\newtheorem,\newtheorem*}] |
| 1300 |
% \newtheorem*{proof}{证明} |
| 1301 |
% \newtheorem{axiom}{公理} |
| 1302 |
% \newtheorem{corollary}{定理} |
| 1303 |
% ... |
| 1304 |
% \end{latexexample} |
| 1305 |
% |
| 1306 |
% 与 \cs{nwafuset} 相同,\cs{newtheorem} 的可选参数 \meta{选项} |
| 1307 |
% 也为一组键值列表。可用的选项见下。注意无需输入“|theorem/|”。 |
| 1308 |
% |
| 1309 |
% \begin{function}[added=2021-05-12]{theorem/style} |
| 1310 |
% \begin{nwafusyntax}[emph={[1]style}] |
| 1311 |
% style = (*<(plain)|margin|change|break|marginbreak|changebreak>*) |
| 1312 |
% \end{nwafusyntax} |
| 1313 |
% 定理类环境的总体样式。 |
| 1314 |
% \end{function} |
| 1315 |
% |
| 1316 |
% \begin{function}[added=2021-05-12]{theorem/header-font} |
| 1317 |
% \begin{nwafusyntax}[emph={[1]header-font}] |
| 1318 |
% header-font = (*\marg{字体}*) |
| 1319 |
% \end{nwafusyntax} |
| 1320 |
% 定理头(即标题)的字体。中文模板默认为 \tn{sffamily},即无衬线体 |
| 1321 |
% (黑体);英文模板默认为 |\bfseries\upshape|,即加粗直立体。 |
| 1322 |
% \end{function} |
| 1323 |
% |
| 1324 |
% \begin{function}[added=2021-05-12]{theorem/body-font} |
| 1325 |
% \begin{nwafusyntax}[emph={[1]body-font}] |
| 1326 |
% body-font = (*\marg{字体}*) |
| 1327 |
% \end{nwafusyntax} |
| 1328 |
% 定理内容的字体。中文模板默认为 \tn{nwafu@kai},即楷体;英文模板 |
| 1329 |
% 默认为 \tn{itshape},即斜体。 |
| 1330 |
% \end{function} |
| 1331 |
% |
| 1332 |
% \begin{function}[added=2021-05-12]{theorem/qed} |
| 1333 |
% \begin{nwafusyntax}[emph={[1]qed}] |
| 1334 |
% qed = (*\marg{符号}*) |
| 1335 |
% \end{nwafusyntax} |
| 1336 |
% 定理结束标记(即证毕符号)。如果用 \cs{newtheorem} 声明定理, |
| 1337 |
% 则默认为空;用 \cs{newtheorem*} 声明,则默认为 |
| 1338 |
% |\ensuremath{\QED}|,即“$\QED$”。 |
| 1339 |
% \end{function} |
| 1340 |
% |
| 1341 |
% \begin{function}[added=2021-05-12]{theorem/counter} |
| 1342 |
% \begin{nwafusyntax}[emph={[1]counter}] |
| 1343 |
% counter = (*\marg{计数器}*) |
| 1344 |
% \end{nwafusyntax} |
| 1345 |
% 定理计数器,表示定理编号在 \meta{计数器} 的下一级,并会随 |
| 1346 |
% \meta{计数器} 的变化而清零。\cite{刘海洋2013latex入门} |
| 1347 |
% 默认为 |chapter|,表示按章编号。使用 \cs{newtheorem*} 时, |
| 1348 |
% 该选项无效。 |
| 1349 |
% \end{function} |
| 1350 |
% |
| 1351 |
% \begin{function}[added=2021-05-12]{\caption} |
| 1352 |
% \begin{nwafusyntax}[deletetexcs={\caption},morekeywords={\caption}] |
| 1353 |
% \caption(*\marg{图表标题}*) |
| 1354 |
% \caption(*\oarg{短标题}\marg{长标题}*) |
| 1355 |
% \end{nwafusyntax} |
| 1356 |
% 插入图表标题。可选参数 \meta{短标题} 用于图表目录。在 |
| 1357 |
% \meta{长标题} 中,可以进行长达多段的叙述;但 \meta{短标题} |
| 1358 |
% 和单独的 \meta{图表标题} 中则不允许分段。 |
| 1359 |
% \cite{刘海洋2013latex入门} |
| 1360 |
% \end{function} |
| 1361 |
% |
| 1362 |
% \begin{function}[added=2021-05-22]{\bicaption} |
| 1363 |
% \begin{nwafusyntax}[deletetexcs={\bicaption},morekeywords={\bicaption}] |
| 1364 |
% \bicaption(*\marg{中文标题}\marg{英文标题}*) |
| 1365 |
% \end{nwafusyntax} |
| 1366 |
% 插入图表双语标题。双语标题基于\cls{bicaption}宏包实现。 |
| 1367 |
% \end{function} |
| 1368 |
% |
| 1369 |
% 按照排版惯例,建议将表格标题放置在绘制表格命令之前, |
| 1370 |
% 而将图片标题放置在绘图或插图命令之后。另需注意, |
| 1371 |
% \tn{caption} 命令必须放置在浮动体环境(如 \env{table} 或 |
| 1372 |
% \env{figure})中。 |
| 1373 |
% |
| 1374 |
% \subsubsection{豹尾} |
| 1375 |
% |
| 1376 |
% \begin{function}[added=2021-05-26]{\bibmatter} |
| 1377 |
% 参考文献开始开始。 |
| 1378 |
% \end{function} |
| 1379 |
% |
| 1380 |
% 用于为参考文献部分设置正确的页眉,后续页码接正文区连续编码。 |
| 1381 |
% |
| 1382 |
% \begin{function}[added=2021-05-12]{\printbibliography} |
| 1383 |
% \begin{nwafusyntax}[morekeywords={\printbibliography}] |
| 1384 |
% \printbibliography(*\oarg{选项}*) |
| 1385 |
% \end{nwafusyntax} |
| 1386 |
% 打印参考文献列表。 |
| 1387 |
% \meta{文献数据库} 可利用 \opt{style/bib-resource} 选项指定,具体见 |
| 1388 |
% \ref{subsubsec:论文格式}~小节。 |
| 1389 |
% \end{function} |
| 1390 |
% |
| 1391 |
% 注:本模板参考文献是胡振震根据西北农林科技大学的基本要求,通过 |
| 1392 |
% 添加部分样式控制代码实现的\cite{biblatex,biblatex-gb7714-2015}, |
| 1393 |
% 因此,\textbf{无法进行个性化定制}。 |
| 1394 |
% |
| 1395 |
% \begin{function}[added=2021-05-24]{\appdendix} |
| 1396 |
% 声明附录开始。 |
| 1397 |
% \end{function} |
| 1398 |
% |
| 1399 |
% 用于为附录部分设置正确的页眉及按要求实现附录中的图、表和公式编号。 |
| 1400 |
% 后续页码接参考文献区连续编码。 |
| 1401 |
% |
| 1402 |
% \begin{function}[added=2021-05-29]{\backmatter} |
| 1403 |
% \cs{backmatter} 为后置区命令,页码格式与编号保持不变, |
| 1404 |
% 章标题不编号。 |
| 1405 |
% \end{function} |
| 1406 |
% |
| 1407 |
% 用于为后置部分设置正确页眉,后置部分主要包括致谢和个人简历。 |
| 1408 |
% 后续页码接附录区连续编码。 |
| 1409 |
% |
| 1410 |
% \changes{v2.00}{2026/05/07}{添加盲审删除致谢判断。} |
| 1411 |
% \begin{function}[added=2021-06-01,updated=2026-05-07]{acknowledgement} |
| 1412 |
% \begin{nwafusyntax}[emph={[2]acknowledgement}] |
| 1413 |
% \begin{acknowledgement} |
| 1414 |
% (*\meta{致谢内容}*) |
| 1415 |
% \end{acknowledgement} |
| 1416 |
% \end{nwafusyntax} |
| 1417 |
% 致谢排版环境。使用该环境的主要作用是设置页眉及产生不编号章标题。 |
| 1418 |
% \end{function} |
| 1419 |
% |
| 1420 |
% \changes{v2.00}{2026/05/07}{添加盲审删除个人简历判断。} |
| 1421 |
% \begin{function}[added=2021-06-01,updated=2026-05-07]{resume} |
| 1422 |
% \begin{nwafusyntax}[emph={[2]resume}] |
| 1423 |
% \begin{resume} |
| 1424 |
% (*\meta{简历内容}*) |
| 1425 |
% \end{resume} |
| 1426 |
% \end{nwafusyntax} |
| 1427 |
% 简历排版环境。使用该环境的主要作用是设置页眉及产生不编号章标题。 |
| 1428 |
% \end{function} |
| 1429 |
% |
| 1430 |
% \begin{function}[added=2021-06-01]{\researchitem} |
| 1431 |
% \begin{nwafusyntax}[deletetexcs={\researchitem},morekeywords={\researchitem}] |
| 1432 |
% \researchitem(*\oarg{个人简历分类名称}*) |
| 1433 |
% \end{nwafusyntax} |
| 1434 |
% 在简历排版中,指定成果类型,按标题的格式(非标题)居中排版。 |
| 1435 |
% \end{function} |
| 1436 |
% |
| 1437 |
% \begin{function}[added=2021-06-01]{publications} |
| 1438 |
% \begin{nwafusyntax}[emph={[2]publications}] |
| 1439 |
% \begin{publications} |
| 1440 |
% (*\meta{简历中发表的学术论文列表}*) |
| 1441 |
% \end{publications} |
| 1442 |
% \end{nwafusyntax} |
| 1443 |
% 简历中发表的学术论文排版列表环境。 |
| 1444 |
% \end{function} |
| 1445 |
% |
| 1446 |
% \begin{function}[added=2021-06-01]{achievements} |
| 1447 |
% \begin{nwafusyntax}[emph={[2]achievements}] |
| 1448 |
% \begin{achievements} |
| 1449 |
% (*\meta{简历中发表的学术论文列表}*) |
| 1450 |
% \end{achievements} |
| 1451 |
% \end{nwafusyntax} |
| 1452 |
% 简历中专利等研究成果排版列表环境。 |
| 1453 |
% \end{function} |
| 1454 |
% |
| 1455 |
% \section{其他命令接口} |
| 1456 |
% |
| 1457 |
% \begin{function}[added=2021-05-20]{\nwafuthesis} |
| 1458 |
% \cs{nwafuthesis} 命令用于输出\cls{nwafuthesis}模板 |
| 1459 |
% 的LOGO:~\nwafuthesis{}。 |
| 1460 |
% \end{function} |
| 1461 |
% |
| 1462 |
% \begin{function}[added=2021-05-20]{\datezh} |
| 1463 |
% \cs{datezh} 命令用于输出中文格式的当前年、月。 |
| 1464 |
% \end{function} |
| 1465 |
% |
| 1466 |
% \begin{function}[added=2021-05-20]{\dateen} |
| 1467 |
% \cs{dateen} 命令用于输出英文格式的当前月,年。 |
| 1468 |
% \end{function} |
| 1469 |
% |
| 1470 |
% \begin{function}[added=2022-04-04]{\fakebold} |
| 1471 |
% \begin{nwafusyntax}[deletetexcs={\fakebold},morekeywords={\fakebold}] |
| 1472 |
% \fakebold(*\oarg{加粗系数}\marg{文字内容}*) |
| 1473 |
% \end{nwafusyntax} |
| 1474 |
% 使用PDF literal通过缩放笔画实现的伪粗命令。 |
| 1475 |
% \end{function} |
| 1476 |
% |
| 1477 |
% \begin{function}[added=2021-05-12,updated=2021-5-28]{\makecoveri, |
| 1478 |
% \makecoverii,\makecoveriii, \makecoveriv, |
| 1479 |
% \makecoverv,\makecovervi,\makecovervii} |
| 1480 |
% 分别用于生成封面(一)$\sim$(七)。单独使用这几个命令可能 |
| 1481 |
% 会造成页面顺序错误,因此若非必要,应避免直接使用这些命令排版。 |
| 1482 |
% \end{function} |
| 1483 |
% |
| 1484 |
% \begin{function}[added=2021-06-04]{\makecovers} |
| 1485 |
% 生成所有封面。 |
| 1486 |
% \end{function} |
| 1487 |
% |
| 1488 |
% \begin{function}[added=2021-05-12]{\tableofcontents,\listoffigures,\listoftables} |
| 1489 |
% 修改 \cs{tableofcontents}、\cs{listoffigures} 和 \cs{listoftables} 的定义, |
| 1490 |
% 使得页眉正确显示,并出现在目录及 PDF 书签中。来自于 \LaTeXe{} 标准文档类 |
| 1491 |
% \file{book.cls} |
| 1492 |
% \footnote{原代码中只有 \cs{tableofcontents} 的 \cs{@mkboth} 出现在 |
| 1493 |
% \cs{chapter*} 内部,这是出于兼容性的考虑而非 typo。}。 |
| 1494 |
% \end{function} |
| 1495 |
% |
| 1496 |
% \begin{function}[added=2021-05-28]{\makefront} |
| 1497 |
% 用于生成中英文摘要、目录和主要符号对照表。 |
| 1498 |
% |
| 1499 |
% 注意:不建议直接使用该命令排版, |
| 1500 |
% 应该由模板自动调用进行排版。 |
| 1501 |
% \end{function} |
| 1502 |
% |
| 1503 |
% \begin{function}[added=2021-05-12]{abstract} |
| 1504 |
% \begin{nwafusyntax}[emph={[2]abstract}] |
| 1505 |
% \begin{abstract} |
| 1506 |
% (*\meta{中文摘要}*) |
| 1507 |
% \end{abstract} |
| 1508 |
% \end{nwafusyntax} |
| 1509 |
% \end{function} |
| 1510 |
% \begin{function}[added=2021-05-12]{abstract*} |
| 1511 |
% \begin{nwafusyntax}[emph={[2]abstract*}] |
| 1512 |
% \begin{abstract*} |
| 1513 |
% (*\meta{英文摘要}*) |
| 1514 |
% \end{abstract*} |
| 1515 |
% \end{nwafusyntax} |
| 1516 |
% 摘要排版环境。不带星号和带星号的版本分别用来排版中文摘要 |
| 1517 |
% 和英文摘要。 |
| 1518 |
% |
| 1519 |
% 注意:不建议直接排版摘要,应该提供摘要内容\file{.tex}源文件名后,由 |
| 1520 |
% \cs{makefront}命令自动排版。 |
| 1521 |
% \end{function} |
| 1522 |
% |
| 1523 |
% \changes{v2.14}{2026/05/15}{修改基于tabularray实现的说明。} |
| 1524 |
% \changes{v2.00}{2026/05/06}{修改默认列数为3列,总宽度占页宽95%。} |
| 1525 |
% \begin{function}[added=2021-05-12,updated=2026-05-06,updated=2026-05-15]{notation} |
| 1526 |
% \begin{nwafusyntax}[emph={[2]notation}] |
| 1527 |
% \begin{notation}(*\oarg{列格式说明}*) |
| 1528 |
% (*\meta{符号}*) & (*\meta{单位}*) & (*\meta{说明}*) \\ |
| 1529 |
% (*\meta{符号 1}*) & (*\meta{单位名称}*) & (*\meta{说明内容}*) \\ |
| 1530 |
% (*\meta{符号 2}*) & (*\meta{单位名称}*) & (*\meta{说明内容}*) \\ |
| 1531 |
% (*\phantom{\meta{符号 $n$}}*) (*$\vdots$*) |
| 1532 |
% (*\meta{符号\ \kern-0.1em$n$}*) & (*\meta{单位名称}*) & (*\meta{说明内容}*) |
| 1533 |
% \end{notation} |
| 1534 |
% \end{nwafusyntax} |
| 1535 |
% 主要符号对照表环境,基于 \pkg{tabularray} 宏包实现。 |
| 1536 |
% |
| 1537 |
% 可选参数 \meta{列格式说明} 用于指定表格格式,需要符合\pkg{tabularray}宏包 |
| 1538 |
% 的Inner specifications参数语法。 |
| 1539 |
% \end{function} |
| 1540 |
% |
| 1541 |
% \changes{v2.00}{2026/05/01}{添加术语表环境,默认列数为2列,总宽度占页宽95%。} |
| 1542 |
% \begin{function}[added=2026-05-01,updated=2026-05-06,updated=2026-05-06]{terminology} |
| 1543 |
% \begin{nwafusyntax}[emph={[2]terminology}] |
| 1544 |
% \begin{terminology}(*\oarg{列格式说明}*) |
| 1545 |
% (*\meta{术语}*) & (*\meta{定义}*) \\ |
| 1546 |
% (*\meta{术语 1}*) & (*\meta{定义内容}*) \\ |
| 1547 |
% (*\meta{术语 2}*) & (*\meta{定义内容}*) \\ |
| 1548 |
% (*\phantom{\meta{符号 $n$}}*) (*$\vdots$*) |
| 1549 |
% (*\meta{术语\ \kern-0.1em$n$}*) & (*\meta{定义内容}*) |
| 1550 |
% \end{terminology} |
| 1551 |
% \end{nwafusyntax} |
| 1552 |
% 主要符号对照表环境,基于 \pkg{tabularray} 宏包实现。 |
| 1553 |
% |
| 1554 |
% 可选参数 \meta{列格式说明} 用于指定表格格式,需要符合\pkg{tabularray}宏包 |
| 1555 |
% 的Inner specifications参数语法。 |
| 1556 |
% \end{function} |
| 1557 |
% |
| 1558 |
% \begin{function}[added=2021-05-12]{\cleardoublepage} |
| 1559 |
% \begin{nwafusyntax}[deletetexcs={\cleardoublepage},morekeywords={\cleardoublepage}] |
| 1560 |
% \cleardoublepage(*\oarg{页面风格|(empty)}*) |
| 1561 |
% \end{nwafusyntax} |
| 1562 |
% 在奇数页使用命令 \tn{cleardoublepage} 时可选参数为 |
| 1563 |
% 下一页多出的空白偶数页的页面风格,默认为 \opt{empty} 即空的页眉页脚。 |
| 1564 |
% \end{function} |
| 1565 |
% |
| 1566 |
% \section{宏包依赖情况} |
| 1567 |
% |
| 1568 |
% 使用不同编译方式、指定不同选项,会导致宏包依赖情况有所不同。 |
| 1569 |
% 具体如下: |
| 1570 |
% \begin{itemize} |
| 1571 |
% \item 在任何情况下,本模板都会\emph{显式}调用以下宏包 |
| 1572 |
% (或文档类): |
| 1573 |
% \begin{itemize} |
| 1574 |
% \item \pkg{expl3}、\pkg{xparse}、\pkg{xtemplate} 和 |
| 1575 |
% \pkg{l3keys2e},用于构建 \LaTeX3 编程环境 |
| 1576 |
% \cite{source3}。它们分属 \pkg{l3kernel} 和 |
| 1577 |
% \pkg{l3packages} 宏集。 |
| 1578 |
% \item \cls{ctexbook},提供中文排版的通用框架。属于 \CTeX{} |
| 1579 |
% 宏集 \cite{CTeX}。 |
| 1580 |
% \item \pkg{amsmath},对 \LaTeX{} 的数学排版功能进行了 |
| 1581 |
% 全面扩展。属于 \AmSLaTeX{} 套件。 |
| 1582 |
% \item \pkg{unicode-math},负责处理 Unicode 编码的 |
| 1583 |
% OpenType 数学字体。 |
| 1584 |
% \item \pkg{geometry},用于调整页面尺寸。 |
| 1585 |
% \item \pkg{fancyhdr},处理页眉页脚。 |
| 1586 |
% \item \pkg{footmisc},处理脚注。 |
| 1587 |
% \item \pkg{ntheorem},提供增强版的定理类环境。 |
| 1588 |
% \item \pkg{graphicx},提供图形插入的接口。 |
| 1589 |
% \item \pkg{caption},用于设置标题。 |
| 1590 |
% \item \pkg{bicaption},用于设置标题。 |
| 1591 |
% \item \pkg{tabularray},提供现代化表格排版功能。 |
| 1592 |
% \item \pkg{booktabs},三线表排版。 |
| 1593 |
% \item \pkg{xcolor},提供彩色支持。 |
| 1594 |
% \item \pkg{enumitem},提供列表环境的个性化设置。 |
| 1595 |
% \item \pkg{biblatex},提供参考文献排版。 |
| 1596 |
% \item \pkg{hyperref},提供交叉引用、超链接、电子书签等功能。 |
| 1597 |
% \end{itemize} |
| 1598 |
% \item 开启 \kvopt{style/footnote-style}{pifont} 后,会调用 |
| 1599 |
% \pkg{pifont} 宏包。它属于 \pkg{psnfss} 套件。 |
| 1600 |
% \item \pkg{biblatex} 宏包需要依赖 \biber{} 程序。参考文献样式由 |
| 1601 |
% \pkg{biblatex-gb7714-2015} 宏包提供的\texttt{gb7714-NWAFU}样式 |
| 1602 |
% 文件控制,请注意将其升级到最新版\cite{biblatex,biblatex-gb7714-2015}。 |
| 1603 |
% \end{itemize} |
| 1604 |
% |
| 1605 |
% 这里只列出了本模板直接调用的宏包。这些宏包自身的调用情况, |
| 1606 |
% 此处不再具体展开。如有需要,请参阅相关文档。 |
| 1607 |
% |
| 1608 |
% \begin{thebibliography}{99} |
| 1609 |
% |
| 1610 |
% \newcommand\urlprefix{\newline\hspace*{\fill}} |
| 1611 |
% \let\OldUrl=\url |
| 1612 |
% \renewcommand\url[2][]{{\small\textit{#1}~\OldUrl{#2}}} |
| 1613 |
% \newcommand\CTANurl[2][]{{\small\textit{#1}~\href{http://mirror.ctan.org/#2}^^A |
| 1614 |
% {\ttfamily CTAN://#2}}} |
| 1615 |
% |
| 1616 |
% \subsection{图书} |
| 1617 |
% |
| 1618 |
% \bibitem{knuth1986texbook} |
| 1619 |
% \textsc{Knuth D E}. |
| 1620 |
% \newblock \textit{The \TeX book: Computers \& Typesetting, volume A} [M]. |
| 1621 |
% \newblock Boston: Addison--Wesley Publishing Company, 1986 |
| 1622 |
% \urlprefix \CTANurl[源代码^^A |
| 1623 |
% \footnote{此代码只可作为学习之用。未经 Knuth 本人同意,不应当编译此文档。}:]^^A |
| 1624 |
% {systems/knuth/dist/tex/texbook.tex} |
| 1625 |
% |
| 1626 |
% \bibitem{mittelbach2004latexcompanion} |
| 1627 |
% \textsc{Mittelbach F} and \textsc{Goossens M}. |
| 1628 |
% \newblock \textit{The \LaTeX{} Companion} [M]. |
| 1629 |
% \newblock 2nd ed. |
| 1630 |
% \newblock Boston: Addison--Wesley Publishing Company, 2004 |
| 1631 |
% |
| 1632 |
% \bibitem{胡伟2017latex2e} |
| 1633 |
% 胡伟. |
| 1634 |
% \newblock \textit{\LaTeXe{} 文类和宏包学习手册} [M]. |
| 1635 |
% \newblock 北京: 清华大学出版社, 2017 |
| 1636 |
% |
| 1637 |
% \bibitem{刘海洋2013latex入门} |
| 1638 |
% 刘海洋. |
| 1639 |
% \newblock \textit{\LaTeX{} 入门} [M]. |
| 1640 |
% \newblock 北京: 电子工业出版社, 2013 |
| 1641 |
% |
| 1642 |
% \subsection{标准、规范} |
| 1643 |
% |
| 1644 |
% \bibitem{gb-t-7713.1-2006} |
| 1645 |
% 国务院学位委员会办公室, 全国信息与文献标准化技术委员会. |
| 1646 |
% \newblock \textit{学位论文编写规则: GB/T 7713.1--2006} [S]. |
| 1647 |
% \newblock 北京: 中国标准出版社, 2007 |
| 1648 |
% |
| 1649 |
% \bibitem{gb-t-7714-2015} |
| 1650 |
% 全国信息与文献标准化技术委员会. |
| 1651 |
% \newblock \textit{信息与文献\quad 参考文献著录规则: GB/T 7714--2015} [S]. |
| 1652 |
% \newblock 北京: 中国标准出版社, 2015 |
| 1653 |
% |
| 1654 |
% \bibitem{gb-t-15834-2011} |
| 1655 |
% 教育部语言文字信息管理司. |
| 1656 |
% \newblock \textit{标点符号用法: GB/T 15834--2011} [S/OL]. |
| 1657 |
% \newblock 北京: 中国标准出版社, 2012 |
| 1658 |
% \urlprefix\url{http://www.moe.gov.cn/ewebeditor/uploadfile/2015/01/13/20150113091548267.pdf} |
| 1659 |
% |
| 1660 |
% \bibitem{clreq} |
| 1661 |
% W3C. |
| 1662 |
% \newblock \textit{中文排版需求(Requirements for Chinese Text Layout)} [EB/OL]. |
| 1663 |
% \newblock (2020-08-17) |
| 1664 |
% \urlprefix\url{https://w3c.github.io/clreq/} |
| 1665 |
% |
| 1666 |
% \bibitem{西北农林科技大学研究生论文写作指南} |
| 1667 |
% 西北农林科技大学研究生院. |
| 1668 |
% \newblock \textit{研究生学位论文写作指南(试用版)} [EB/OL]. |
| 1669 |
% \newblock 2021 年 3 月修订版. |
| 1670 |
% \newblock (2021-03-17) |
| 1671 |
% \urlprefix\url{https://yjshy.nwafu.edu.cn/docs//2021-03/0d686e7d3f204af9880822db5fd7045c.pdf} |
| 1672 |
% |
| 1673 |
% \bibitem{西北农林科技大学本科论文撰写规范} |
| 1674 |
% 西北农林科技大学教务处. |
| 1675 |
% \newblock \textit{西北农林科技大学本科毕业论文(设计)写作规范(试用)} [EB/OL]. |
| 1676 |
% \newblock 2021 年 5 月修订版. |
| 1677 |
% \newblock (2021-05-07) |
| 1678 |
% \urlprefix\url{https://jiaowu.nwafu.edu.cn/docs//2021-05/8aa0ef88fcf94e5ebf0bdcc2a6f42785.pdf} |
| 1679 |
% |
| 1680 |
% \subsection{宏包、模版} |
| 1681 |
% |
| 1682 |
% \bibitem{source2e} |
| 1683 |
% \textsc{Braams J}, \textsc{Carlisle D}, \textsc{Jeffrey A}, et al. |
| 1684 |
% \newblock \textit{The \LaTeXe{} Sources} [CP/OL]. |
| 1685 |
% \newblock (2020-02-02) |
| 1686 |
% \urlprefix\url{https://ctan.org/pkg/latex} |
| 1687 |
% \urlprefix\CTANurl[源代码:]{macros/latex/base/source2e.pdf} |
| 1688 |
% |
| 1689 |
% \bibitem{CTeX} |
| 1690 |
% \textsc{CTEX.ORG}. |
| 1691 |
% \newblock \textit{\CTeX{} 宏集手册} [EB/OL]. |
| 1692 |
% \newblock version 2.5.4, |
| 1693 |
% \newblock (2020-08-23) |
| 1694 |
% \urlprefix\url{https://ctan.org/pkg/ctex} |
| 1695 |
% \urlprefix\CTANurl[文档及源代码:]{language/chinese/ctex/ctex.pdf} |
| 1696 |
% |
| 1697 |
% \bibitem{xeCJK} |
| 1698 |
% \textsc{CTEX.ORG}. |
| 1699 |
% \newblock \textit{\pkg{xeCJK} 宏包} [EB/OL]. |
| 1700 |
% \newblock version 3.8.5, |
| 1701 |
% \newblock (2020-08-23) |
| 1702 |
% \urlprefix\url{https://ctan.org/pkg/xecjk} |
| 1703 |
% \urlprefix\CTANurl[文档及源代码:]{macros/xetex/latex/xecjk/xeCJK.pdf} |
| 1704 |
% |
| 1705 |
% \bibitem{source3} |
| 1706 |
% \textsc{The \LaTeX3 Project}. |
| 1707 |
% \newblock \textit{The \LaTeX3 Sources} [CP/OL]. |
| 1708 |
% \newblock (2020-08-07) |
| 1709 |
% \urlprefix\url{https://ctan.org/pkg/l3kernel} |
| 1710 |
% \urlprefix\CTANurl[源代码:]{macros/latex/contrib/l3kernel/source3.pdf} |
| 1711 |
% |
| 1712 |
% \bibitem{biblatex} |
| 1713 |
% \textsc{Lehman P}, \textsc{Kime P}, \textsc{Boruvka A}, et al. |
| 1714 |
% \newblock \textit{The \pkg{biblatex} Package} [EB/OL]. |
| 1715 |
% \newblock version 3.15a, |
| 1716 |
% \newblock (2020-08-23) |
| 1717 |
% \urlprefix\url{https://ctan.org/pkg/biblatex} |
| 1718 |
% \urlprefix\CTANurl[文档:]{macros/latex/contrib/biblatex/doc/biblatex.pdf} |
| 1719 |
% |
| 1720 |
% \bibitem{lshort} |
| 1721 |
% \textsc{Oetiker T}, \textsc{Partl H}, \textsc{Hyna I}, et al. |
| 1722 |
% \newblock \textit{The Not So Short Introduction to \LaTeXe{}: Or \LaTeXe{} in 139 minutes} [EB/OL]. |
| 1723 |
% \newblock version 6.2, |
| 1724 |
% \newblock (2018-02-28) |
| 1725 |
% \urlprefix\url{https://ctan.org/pkg/lshort-english} |
| 1726 |
% \urlprefix\CTANurl[文档:]{info/lshort/english/lshort.pdf} |
| 1727 |
% |
| 1728 |
% \bibitem{lshort-zh-cn} |
| 1729 |
% \textsc{Oetiker T}, \textsc{Partl H}, \textsc{Hyna I}, et al. |
| 1730 |
% \newblock \textit{一份(不太)简短的 \LaTeXe{} 介绍: 或 112 分钟了解 \LaTeXe{}} [EB/OL]. |
| 1731 |
% \newblock \CTeX{} 开发小组, 译. |
| 1732 |
% \newblock 原版版本 version 6.2, 中文版本 version 6.02, |
| 1733 |
% \newblock (2020-08-03) |
| 1734 |
% \urlprefix\url{https://ctan.org/pkg/lshort-zh-cn} |
| 1735 |
% \urlprefix\CTANurl[文档:]{info/lshort/chinese/lshort-zh-cn.pdf} |
| 1736 |
% |
| 1737 |
% \bibitem{biblatex-gb7714-2015} |
| 1738 |
% 胡振震. |
| 1739 |
% \newblock \textit{符合 GB/T 7714-2015 标准的 biblatex 参考文献样式} [EB/OL]. |
| 1740 |
% \newblock version 1.0v, |
| 1741 |
% \newblock (2020-07-21) |
| 1742 |
% \urlprefix\url{https://ctan.org/pkg/biblatex-gb7714-2015} |
| 1743 |
% \urlprefix\CTANurl[文档:]{biblatex-contrib/biblatex-gb7714-2015/biblatex-gb7714-2015.pdf} |
| 1744 |
% |
| 1745 |
% \bibitem{fduthesis} |
| 1746 |
% 曾祥东(\textsc{Xiangdong Z}). |
| 1747 |
% \newblock \textit{\textsc{fduThesis}:复旦大学毕业论文 \LaTeX{} 模板} [EB/OL]. |
| 1748 |
% \newblock version 0.7e, |
| 1749 |
% \newblock (2020-08-30) |
| 1750 |
% \urlprefix\url{https://ctan.org/pkg/fduthesis} |
| 1751 |
% \urlprefix\CTANurl[文档及源代码:]{macros/latex/contrib/fduthesis/fduthesis.pdf} |
| 1752 |
% |
| 1753 |
% \subsection{其他} |
| 1754 |
% |
| 1755 |
% \bibitem{wright2009dtxfile} |
| 1756 |
% \textsc{Wright J}. |
| 1757 |
% \newblock \textit{A model dtx file} [EB/OL]. |
| 1758 |
% \newblock (2009-10-06) |
| 1759 |
% \urlprefix\url{https://www.texdev.net/2009/10/06/a-model-dtx-file/} |
| 1760 |
% |
| 1761 |
% \bibitem{孔雀计划} |
| 1762 |
% 刘庆(\textsc{Eric Q L}). |
| 1763 |
% \newblock \textit{孔雀计划:中文字体排印的思路} [EB/OL]. |
| 1764 |
% \urlprefix\url{https://thetype.com/kongque/} |
| 1765 |
% |
| 1766 |
% \end{thebibliography} |
| 1767 |
% |
| 1768 |
% \clearpage |
| 1769 |
% |
| 1770 |
% \end{documentation} |
| 1771 |
% |
| 1772 |
% \begin{implementation} |
| 1773 |
% |
| 1774 |
%^^A 代码部分的页边距 |
| 1775 |
% \newgeometry{ |
| 1776 |
% left = 2.25 in, |
| 1777 |
% right = 1.00 in, |
| 1778 |
% top = 1.25 in, |
| 1779 |
% bottom = 1.00 in, |
| 1780 |
% marginpar = 2.25 in |
| 1781 |
% } |
| 1782 |
% |
| 1783 |
% \changes{v1.11}{2022/04/03}{取消本科黑体加粗。} |
| 1784 |
% |
| 1785 |
% \section{实现细节} |
| 1786 |
% |
| 1787 |
% 本模板使用 \LaTeX3 语法编写,依赖 \pkg{expl3} 环境, |
| 1788 |
% 并需调用 \pkg{l3packages} 中的相关宏包。 |
| 1789 |
% |
| 1790 |
% 按照 \LaTeX3 语法,代码中的空格、换行、回车与制表符完全被忽略, |
| 1791 |
% 而下划线“|_|”和冒号“|:|”则可作为一般字母使用。 |
| 1792 |
% 正常的空格可以使用“|~|”代替;至于 |~| 原来所表示的“带子”, |
| 1793 |
% 则要用 \LaTeXe{} 的原始命令 \tn{nobreakspace} 代替。 |
| 1794 |
% |
| 1795 |
% 以下代码中有一些形如 \textcolor[HTML]{2E3191}{\textsf{<*class>}} |
| 1796 |
% 的标记,这是 \pkg{DocStrip} 中的“guard”,用来选择性地提取文件。 |
| 1797 |
% “\textsf{*}”和“\textsf{/}”分别表示该部分的开始和结束。不含 |
| 1798 |
% “\textsf{*}”和“\textsf{/}”的 guard 出现在行号右侧,它们用来确定 |
| 1799 |
% 单独一行代码的归属。这些 guard 的颜色深浅不一,用以明确嵌套关系。 |
| 1800 |
% |
| 1801 |
% 另有若干形如 \textcolor{MaterialPink}{\textsf{<@@=nwafu>}} 的 guard, |
| 1802 |
% 它们用来标识名字空间(模块)。 |
| 1803 |
% |
| 1804 |
% \subsection{准备} |
| 1805 |
% |
| 1806 |
% \begin{macrocode} |
| 1807 |
%<@@=nwafu> |
| 1808 |
%<*class> |
| 1809 |
% \end{macrocode} |
| 1810 |
% |
| 1811 |
% 检查 \LaTeX3 编程环境。 |
| 1812 |
% \begin{macrocode} |
| 1813 |
\RequirePackage {xtemplate, l3keys2e } |
| 1814 |
\clist_map_inline:nn { xtemplate, l3keys2e } |
| 1815 |
{ |
| 1816 |
\@ifpackagelater {#1} { 2020/07/17 } |
| 1817 |
{ } { \msg_error:nnn { nwafuthesis } { l3-too-old } {#1} } |
| 1818 |
} |
| 1819 |
\msg_new:nnn { nwafuthesis } { l3-too-old } |
| 1820 |
{ |
| 1821 |
Package~ "#1"~ is~ too~ old. \\\\ |
| 1822 |
Please~ update~ an~ up-to-date~ version~ of~ the~ bundles \\ |
| 1823 |
"l3kernel"~ and~ "l3packages"~ using~ your~ TeX~ package \\ |
| 1824 |
manager~ or~ from~ CTAN. |
| 1825 |
} |
| 1826 |
% \end{macrocode} |
| 1827 |
% |
| 1828 |
% 目前 \cls{nwafuthesis} 仅支持 \XeTeX{} 和 \LuaTeX{}编译引擎。 |
| 1829 |
% \begin{macrocode} |
| 1830 |
\sys_if_engine_xetex:F |
| 1831 |
{ |
| 1832 |
\sys_if_engine_luatex:F |
| 1833 |
{ |
| 1834 |
\msg_fatal:nnx { nwafuthesis } { unsupported-engine } |
| 1835 |
{ \c_sys_engine_str } |
| 1836 |
} |
| 1837 |
} |
| 1838 |
\msg_new:nnn { nwafuthesis } { unsupported-engine } |
| 1839 |
{ |
| 1840 |
The~ nwafuthesis~ class~ requires~ either~ XeTeX~ or~ LuaTeX. \\\\ |
| 1841 |
"#1"~ is~ not~ supported~ at~ present.~ You~ must~ change \\ |
| 1842 |
your~ typesetting~ engine~ to~ "xelatex"~ or~ "lualatex". |
| 1843 |
} |
| 1844 |
% \end{macrocode} |
| 1845 |
% |
| 1846 |
% \subsubsection{内部变量声明} |
| 1847 |
% |
| 1848 |
% \begin{variable}{\l_@@_tmpa_box, |
| 1849 |
% \l_@@_tmpa_clist, |
| 1850 |
% \l_@@_tmpb_clist, |
| 1851 |
% \l_@@_tmpc_clist, |
| 1852 |
% \l_@@_tmpd_clist, |
| 1853 |
% \l_@@_tmpt_clist, |
| 1854 |
% \l_@@_tmpa_dim, |
| 1855 |
% \l_@@_tmpb_dim, |
| 1856 |
% \l_@@_tmpc_dim, |
| 1857 |
% \l_@@_tmpd_dim, |
| 1858 |
% \l_@@_tmpt_dim, |
| 1859 |
% \l_@@_tmpa_skip, |
| 1860 |
% \l_@@_tmpa_tl, |
| 1861 |
% \l_@@_tmpb_tl, |
| 1862 |
% \l_@@_tmpt_tl |
| 1863 |
% } |
| 1864 |
% 临时变量。 |
| 1865 |
% \begin{macrocode} |
| 1866 |
\box_new:N \l_@@_tmpa_box |
| 1867 |
\clist_new:N \l_@@_tmpa_clist |
| 1868 |
\clist_new:N \l_@@_tmpb_clist |
| 1869 |
\clist_new:N \l_@@_tmpc_clist |
| 1870 |
\clist_new:N \l_@@_tmpd_clist |
| 1871 |
\clist_new:N \l_@@_tmpt_clist |
| 1872 |
\dim_new:N \l_@@_tmpa_dim |
| 1873 |
\dim_new:N \l_@@_tmpb_dim |
| 1874 |
\dim_new:N \l_@@_tmpc_dim |
| 1875 |
\dim_new:N \l_@@_tmpd_dim |
| 1876 |
\dim_new:N \l_@@_tmpt_dim |
| 1877 |
\skip_new:N \l_@@_tmpa_skip |
| 1878 |
\tl_new:N \l_@@_tmpa_tl |
| 1879 |
\tl_new:N \l_@@_tmpb_tl |
| 1880 |
\tl_new:N \l_@@_tmpc_tl |
| 1881 |
\tl_new:N \l_@@_tmpd_tl |
| 1882 |
\tl_new:N \l_@@_tmpt_tl |
| 1883 |
% \end{macrocode} |
| 1884 |
% \end{variable} |
| 1885 |
% |
| 1886 |
% \begin{variable}{\g_@@_thesis_type_int} |
| 1887 |
% 论文类型。取值 1、2、3 分别对应博士、硕士、本科(学士)。 |
| 1888 |
% \begin{macrocode} |
| 1889 |
\int_new:N \g_@@_thesis_type_int |
| 1890 |
% \end{macrocode} |
| 1891 |
% \end{variable} |
| 1892 |
% |
| 1893 |
% \begin{variable}{\g_@@_to_ctexbook_clist,\g_@@_to_hyperref_clist} |
| 1894 |
% 分别保存由 \cls{nwafuthesis} 传入 \cls{ctexbook} 文档类和 |
| 1895 |
% \pkg{hyperref} 宏包的选项列表。 |
| 1896 |
% \begin{macrocode} |
| 1897 |
\clist_new:N \g_@@_to_ctexbook_clist |
| 1898 |
\clist_new:N \g_@@_to_hyperref_clist |
| 1899 |
% \end{macrocode} |
| 1900 |
% \end{variable} |
| 1901 |
% |
| 1902 |
% \begin{variable}{\g_@@_twoside_bool} |
| 1903 |
% 是否开启双页模式(默认打开)。 |
| 1904 |
% 本模板中,目前使用双页与单页模式的排版结果是一样的, |
| 1905 |
% 保留该设置的目的是为了后续扩展。 |
| 1906 |
% \begin{macrocode} |
| 1907 |
\bool_new:N \g_@@_twoside_bool |
| 1908 |
\bool_set_true:N \g_@@_twoside_bool |
| 1909 |
% \end{macrocode} |
| 1910 |
% \end{variable} |
| 1911 |
% |
| 1912 |
% \begin{variable}{\g_@@_draft_bool} |
| 1913 |
% 是否开启草稿模式。 |
| 1914 |
% \begin{macrocode} |
| 1915 |
\bool_new:N \g_@@_draft_bool |
| 1916 |
% \end{macrocode} |
| 1917 |
% \end{variable} |
| 1918 |
% |
| 1919 |
% \changes{v2.00}{2026/04/29}{删除本科是否按章编写论文判断,统一按章编排论文,添加是否排版图表目录判断。} |
| 1920 |
% |
| 1921 |
% \begin{variable}{\g_@@_figtabtoc_bool} |
| 1922 |
% 是否输出图表清单(目前仅对本科有效)。 |
| 1923 |
% \begin{macrocode} |
| 1924 |
\bool_new:N \g_@@_figtabtoc_bool |
| 1925 |
% \end{macrocode} |
| 1926 |
% \end{variable} |
| 1927 |
% |
| 1928 |
% \changes{v1.15}{2022/05/29}{添加研究生题名页签字判断变量。} |
| 1929 |
% |
| 1930 |
% \begin{variable}{\g_@@_withsignature_bool} |
| 1931 |
% 研究生题名页中的作者、指导教师和答辩委员会姓名是否需要签名。 |
| 1932 |
% \begin{macrocode} |
| 1933 |
\bool_new:N \g_@@_withsignature_bool |
| 1934 |
% \end{macrocode} |
| 1935 |
% \end{variable} |
| 1936 |
% |
| 1937 |
% \changes{v1.25}{2023/04/18}{添加盲审判断变量。} |
| 1938 |
% |
| 1939 |
% \begin{variable}{\g_@@_anonymous_bool} |
| 1940 |
% 是否输出盲审版论文(隐藏作者、导师、页眉等个人及学校信息)。 |
| 1941 |
% \begin{macrocode} |
| 1942 |
\bool_new:N \g_@@_anonymous_bool |
| 1943 |
% \end{macrocode} |
| 1944 |
% \end{variable} |
| 1945 |
% |
| 1946 |
% |
| 1947 |
% \changes{v2.00}{2026/04/29}{本科章编号统一为中文编号。} |
| 1948 |
% \changes{v1.12}{2022/05/24}{添加本科中文章编号处理。} |
| 1949 |
% |
| 1950 |
% \subsubsection{内部函数} |
| 1951 |
% |
| 1952 |
% \begin{macro}{\file_input:V, |
| 1953 |
% \int_to_arabic:v, |
| 1954 |
% \keys_define:nx, |
| 1955 |
% \tl_map_inline:xn} |
| 1956 |
% \begin{macro}[TF]{\tl_if_eq:Vn} |
| 1957 |
% \LaTeX3{} 函数的函数变体。 |
| 1958 |
% \begin{macrocode} |
| 1959 |
\cs_generate_variant:Nn \file_input:n { V } |
| 1960 |
\cs_generate_variant:Nn \int_to_arabic:n { v } |
| 1961 |
\cs_generate_variant:Nn \keys_define:nn { nx } |
| 1962 |
\cs_generate_variant:Nn \tl_map_inline:nn { xn } |
| 1963 |
\prg_generate_conditional_variant:Nnn \tl_if_eq:nn { Vn } { T, TF } |
| 1964 |
% \end{macrocode} |
| 1965 |
% \end{macro} |
| 1966 |
% \end{macro} |
| 1967 |
% |
| 1968 |
% \begin{macro}{\@@_quad:,\@@_qquad:} |
| 1969 |
% 等价于 \LaTeXe{} 中的 \tn{quad} 和 \tn{qquad}。 |
| 1970 |
% \begin{macrocode} |
| 1971 |
\cs_new:Npn \@@_quad: { \skip_horizontal:n { 1 em } } |
| 1972 |
\cs_new:Npn \@@_qquad: { \skip_horizontal:n { 2 em } } |
| 1973 |
% \end{macrocode} |
| 1974 |
% \end{macro} |
| 1975 |
% |
| 1976 |
% \begin{macro}{\@@_vspace:N,\@@_vspace:n,\@@_vspace:c} |
| 1977 |
% 类似 \LaTeXe{} 中的 \tn{vspace*}。 |
| 1978 |
% \begin{macrocode} |
| 1979 |
\cs_new_protected:Npn \@@_vspace:N #1 |
| 1980 |
{ |
| 1981 |
\dim_set_eq:NN \l_@@_tmpa_dim \prevdepth |
| 1982 |
\hrule height \c_zero_dim |
| 1983 |
\nobreak |
| 1984 |
\skip_vertical:N #1 |
| 1985 |
\skip_vertical:N \c_zero_skip |
| 1986 |
\dim_set_eq:NN \prevdepth \l_@@_tmpa_dim |
| 1987 |
} |
| 1988 |
\cs_new_protected:Npn \@@_vspace:n #1 |
| 1989 |
{ |
| 1990 |
\skip_set:Nn \l_@@_tmpa_skip {#1} |
| 1991 |
\@@_vspace:N \l_@@_tmpa_skip |
| 1992 |
} |
| 1993 |
\cs_generate_variant:Nn \@@_vspace:N { c } |
| 1994 |
% \end{macrocode} |
| 1995 |
% \end{macro} |
| 1996 |
% |
| 1997 |
% \begin{macro}{\@@_symbol:n} |
| 1998 |
% 等价于 \LaTeXe{} 中的 \tn{symbol}。 |
| 1999 |
% \begin{macrocode} |
| 2000 |
\cs_new:Npn \@@_symbol:n #1 { \tex_char:D #1 \scan_stop: } |
| 2001 |
% \end{macrocode} |
| 2002 |
% \end{macro} |
| 2003 |
% |
| 2004 |
% \begin{macro}{\@@_arabic:n} |
| 2005 |
% 等价于 \LaTeXe{} 中的 \tn{arabic}。 |
| 2006 |
% \begin{macrocode} |
| 2007 |
\cs_new:Npn \@@_arabic:n #1 |
| 2008 |
{ \int_to_arabic:v { c@ #1 } } |
| 2009 |
% \end{macrocode} |
| 2010 |
% \end{macro} |
| 2011 |
% |
| 2012 |
% \changes{v1.11}{2022/04/03}{添加PDF literal实现的伪粗命令。} |
| 2013 |
% |
| 2014 |
% \begin{macro}{\@@_fake_bold:nn,\fakebold} |
| 2015 |
% 利用PDF literal实现的伪粗命令。 |
| 2016 |
% 参考\url{https://zhuanlan.zhihu.com/p/60262200}实现。 |
| 2017 |
% \begin{arguments} |
| 2018 |
% \item 加粗系数 |
| 2019 |
% \item 需要加粗的文字 |
| 2020 |
% \end{arguments} |
| 2021 |
% \begin{macrocode} |
| 2022 |
\cs_new:Npn \@@_fake_bold:nn #1#2 |
| 2023 |
{ |
| 2024 |
\special{pdf:code~q~2~Tr~0~G~#1~w}% |
| 2025 |
#2% |
| 2026 |
\special{pdf:code~Q}% |
| 2027 |
} |
| 2028 |
\NewDocumentCommand \fakebold {O{0.2} m } |
| 2029 |
{ |
| 2030 |
\@@_fake_bold:nn { #1 }{ #2 } |
| 2031 |
} |
| 2032 |
% \end{macrocode} |
| 2033 |
% \end{macro} |
| 2034 |
% |
| 2035 |
% \changes{v1.10}{2022/03/17}{统一使用 \LaTeX{} 2020/10/01 新钩子机制。} |
| 2036 |
% |
| 2037 |
% \begin{macro}{\@@_gadd_ltxhook:nn} |
| 2038 |
% 封装 \LaTeX{} 的钩子管理机制。本模板中的字体加载命令位于 |
| 2039 |
% |begindocument/before| 钩子中,需确保在 \pkg{xeCJK} 之前执行。 |
| 2040 |
% \begin{macrocode} |
| 2041 |
\cs_new_protected:Npn \@@_gadd_ltxhook:nn #1#2 |
| 2042 |
{ \hook_gput_code:nnn {#1} { . } {#2} } |
| 2043 |
\hook_gset_rule:nnnn { begindocument/before } { . } { < } { xeCJK } |
| 2044 |
% \end{macrocode} |
| 2045 |
% \end{macro} |
| 2046 |
% |
| 2047 |
% \begin{macro}{\@@_patch_cmd:Nnn,\@@_preto_cmd:Nn,\@@_appto_cmd:Nn} |
| 2048 |
% 补丁工具,来自 \pkg{ctexpatch} 宏包。 |
| 2049 |
% \begin{macrocode} |
| 2050 |
\cs_new_protected:Npn \@@_patch_cmd:Nnn #1#2#3 |
| 2051 |
{ |
| 2052 |
\ctex_patch_cmd_once:NnnnTF #1 { } {#2} {#3} |
| 2053 |
{ } { \ctex_patch_failure:N #1 } |
| 2054 |
} |
| 2055 |
\cs_new_protected:Npn \@@_preto_cmd:Nn #1#2 |
| 2056 |
{ |
| 2057 |
\ctex_preto_cmd:NnnTF #1 { } {#2} |
| 2058 |
{ } { \ctex_patch_failure:N #1 } |
| 2059 |
} |
| 2060 |
\cs_new_protected:Npn \@@_appto_cmd:Nn #1#2 |
| 2061 |
{ |
| 2062 |
\ctex_appto_cmd:NnnTF #1 { } {#2} |
| 2063 |
{ } { \ctex_patch_failure:N #1 } |
| 2064 |
} |
| 2065 |
% \end{macrocode} |
| 2066 |
% \end{macro} |
| 2067 |
% |
| 2068 |
% \begin{macro}{\@@_at_begin_environment:nn} |
| 2069 |
% 在环境开始添加代码的补丁函数。 |
| 2070 |
% \begin{macrocode} |
| 2071 |
\cs_new_protected:Npn \@@_at_begin_environment:nn #1#2 |
| 2072 |
{ |
| 2073 |
\seq_set_from_clist:Nn \l_@@_env_hook_name_seq {#1} |
| 2074 |
\seq_map_inline:Nn \l_@@_env_hook_name_seq |
| 2075 |
{ \AtBeginEnvironment{##1}{#2} } |
| 2076 |
} |
| 2077 |
% \end{macrocode} |
| 2078 |
% \end{macro} |
| 2079 |
% |
| 2080 |
% \begin{macro}{\@@_at_end_preamble:n} |
| 2081 |
% 在导言区结束位置添加代码的补丁函数。 |
| 2082 |
% \begin{macrocode} |
| 2083 |
\cs_new_protected:Npn \@@_at_end_preamble:n #1 |
| 2084 |
{ |
| 2085 |
\ctex_gadd_ltxhook:nn { env/document/before } { #1 } |
| 2086 |
} |
| 2087 |
% \end{macrocode} |
| 2088 |
% \end{macro} |
| 2089 |
% |
| 2090 |
% \begin{macro}{\@@_define_fn_style:nn, |
| 2091 |
% \@@_define_punct:nn, |
| 2092 |
% \@@_define_name:nn, |
| 2093 |
% \@@_define_name:nnn} |
| 2094 |
% 用来定义脚注样式、标点、默认名称的辅助函数。 |
| 2095 |
% \begin{macrocode} |
| 2096 |
\cs_new_protected:Npn \@@_define_fn_style:nn #1#2 |
| 2097 |
{ \tl_const:cn { c_@@_fn_style_ #1 _tl } {#2} } |
| 2098 |
\cs_new_protected:Npn \@@_define_punct:nn #1#2 |
| 2099 |
{ \tl_const:cn { c_@@_ #1 _tl } { \@@_symbol:n {#2} } } |
| 2100 |
\cs_new_protected:Npn \@@_define_name:nn #1#2 |
| 2101 |
{ \tl_const:cn { c_@@_name_ #1 _tl } {#2} } |
| 2102 |
\cs_new_protected:Npn \@@_define_name:nnn #1#2#3 |
| 2103 |
{ |
| 2104 |
\tl_const:cn { c_@@_name_ #1 _tl } {#2} |
| 2105 |
\tl_const:cn { c_@@_name_ #1 _en_tl } {#3} |
| 2106 |
} |
| 2107 |
% \end{macrocode} |
| 2108 |
% \end{macro} |
| 2109 |
% |
| 2110 |
% \begin{macro}{\@@_msg_new:nn, |
| 2111 |
% \@@_error:n,\@@_error:nn,\@@_error:nx,\@@_error:nnn, |
| 2112 |
% \@@_warning:n,\@@_warning:nn,\@@_warning:nxx, |
| 2113 |
% \@@_info:nx} |
| 2114 |
% 各种信息函数的缩略形式。 |
| 2115 |
% \begin{macrocode} |
| 2116 |
\cs_new:Npn \@@_msg_new:nn { \msg_new:nnn { nwafuthesis } } |
| 2117 |
\cs_new:Npn \@@_error:n { \msg_error:nn { nwafuthesis } } |
| 2118 |
\cs_new:Npn \@@_error:nn { \msg_error:nnn { nwafuthesis } } |
| 2119 |
\cs_new:Npn \@@_error:nx { \msg_error:nnx { nwafuthesis } } |
| 2120 |
\cs_new:Npn \@@_error:nnn { \msg_error:nnnn { nwafuthesis } } |
| 2121 |
\cs_new:Npn \@@_error:nnnn { \msg_error:nnnnn { nwafuthesis } } |
| 2122 |
\cs_new:Npn \@@_warning:n { \msg_warning:nn { nwafuthesis } } |
| 2123 |
\cs_new:Npn \@@_warning:nn { \msg_warning:nnn { nwafuthesis } } |
| 2124 |
\cs_new:Npn \@@_warning:nxx { \msg_warning:nnxx { nwafuthesis } } |
| 2125 |
\cs_new:Npn \@@_info:nx { \msg_info:nnx { nwafuthesis } } |
| 2126 |
% \end{macrocode} |
| 2127 |
% \end{macro} |
| 2128 |
% |
| 2129 |
% \subsection{选项处理} |
| 2130 |
% |
| 2131 |
% 定义 |nwafu/option| 键值类。 |
| 2132 |
% \begin{macrocode} |
| 2133 |
\keys_define:nn { nwafu / option } |
| 2134 |
{ |
| 2135 |
% \end{macrocode} |
| 2136 |
% |
| 2137 |
% \begin{macro}{type} |
| 2138 |
% 设置论文类型。设为模板选项主要是为了以后的兼容性。论文类型会 |
| 2139 |
% 影响很多设置,默认为本科毕业论文。 |
| 2140 |
% \begin{macrocode} |
| 2141 |
type .choice:, |
| 2142 |
type .value_required:n = true, |
| 2143 |
type .choices:nn = |
| 2144 |
{ doctor, master, bachelor } |
| 2145 |
{ \int_gset_eq:NN \g_@@_thesis_type_int \l_keys_choice_int }, |
| 2146 |
type .initial:n = bachelor, |
| 2147 |
% \end{macrocode} |
| 2148 |
% \end{macro} |
| 2149 |
% |
| 2150 |
% \begin{macro}{oneside,twoside} |
| 2151 |
% 设置页面类型为单面或双面。 |
| 2152 |
% \begin{macrocode} |
| 2153 |
oneside .value_forbidden:n = true, |
| 2154 |
twoside .value_forbidden:n = true, |
| 2155 |
oneside .code:n = |
| 2156 |
{ |
| 2157 |
\clist_gput_right:Nn \g_@@_to_ctexbook_clist { oneside } |
| 2158 |
\bool_gset_false:N \g_@@_twoside_bool |
| 2159 |
}, |
| 2160 |
twoside .code:n = |
| 2161 |
{ |
| 2162 |
% \end{macrocode} |
| 2163 |
% 此处是为后续诸如页边距调整为左右不同保留的设置。 |
| 2164 |
% \begin{macrocode} |
| 2165 |
\clist_gput_right:Nn \g_@@_to_ctexbook_clist { twoside } |
| 2166 |
\bool_gset_true:N \g_@@_twoside_bool |
| 2167 |
}, |
| 2168 |
% \end{macrocode} |
| 2169 |
% \end{macro} |
| 2170 |
% |
| 2171 |
% \begin{macro}{draft} |
| 2172 |
% 是否开启草稿模式(默认关闭)。 |
| 2173 |
% \begin{macrocode} |
| 2174 |
draft .choice:, |
| 2175 |
draft / true .code:n = |
| 2176 |
{ |
| 2177 |
\bool_gset_true:N \g_@@_draft_bool |
| 2178 |
\clist_gput_right:Nn \g_@@_to_ctexbook_clist { draft } |
| 2179 |
}, |
| 2180 |
draft / false .code:n = |
| 2181 |
{ \bool_gset_false:N \g_@@_draft_bool }, |
| 2182 |
draft .default:n = true, |
| 2183 |
draft .initial:n = false, |
| 2184 |
% \end{macrocode} |
| 2185 |
% \end{macro} |
| 2186 |
% |
| 2187 |
% 处理未知选项。 |
| 2188 |
% \begin{macrocode} |
| 2189 |
unknown .code:n = { \@@_error:n { unknown-option } } |
| 2190 |
} |
| 2191 |
\@@_msg_new:nn { unknown-option } |
| 2192 |
{ Class~ option~ "\l_keys_key_tl"~ is~ unknown. } |
| 2193 |
% \end{macrocode} |
| 2194 |
% |
| 2195 |
% 将选项 |nwafu/option|传给文档类。 |
| 2196 |
% \begin{macrocode} |
| 2197 |
\ProcessKeysOptions { nwafu / option } |
| 2198 |
% \end{macrocode} |
| 2199 |
% |
| 2200 |
% \subsection{模板使用命令及参数定义} |
| 2201 |
% |
| 2202 |
% \subsubsection{定义NWAFU LOGO和中英文年月命令} |
| 2203 |
% |
| 2204 |
% \begin{macro}{\nwafuthesis} |
| 2205 |
% nwafuthesis模板的LOGO。 |
| 2206 |
% \begin{macrocode} |
| 2207 |
\NewDocumentCommand \nwafuthesis { } |
| 2208 |
{% |
| 2209 |
\makebox{\rmfamily% |
| 2210 |
N\hspace{-0.2ex}\raisebox{-0.5ex}{W}\raisebox{0.5ex} |
| 2211 |
{\hspace{-0.2ex}\textsc{AFU}}\hspace{0.3ex}% |
| 2212 |
\textsc{Thesis} |
| 2213 |
} |
| 2214 |
} |
| 2215 |
% \end{macrocode} |
| 2216 |
% \end{macro} |
| 2217 |
% |
| 2218 |
% \begin{macro}{\datezh} |
| 2219 |
% 取得中文年月。 |
| 2220 |
% \begin{macrocode} |
| 2221 |
\NewDocumentCommand \datezh { } |
| 2222 |
{ |
| 2223 |
\int_use:N \c_sys_year_int 年 |
| 2224 |
\int_use:N \c_sys_month_int 月 |
| 2225 |
} |
| 2226 |
% \end{macrocode} |
| 2227 |
% \end{macro} |
| 2228 |
% |
| 2229 |
% \begin{macro}{\dateen} |
| 2230 |
% 取得英文月年,详见:\\ |
| 2231 |
% 1 = Jan.(January),\\ |
| 2232 |
% 2 = Feb.(February),\\ |
| 2233 |
% 3 = Mar.(March),\\ |
| 2234 |
% 4 = Apr.(April),\\ |
| 2235 |
% 5 = May.(May),\\ |
| 2236 |
% 6 = Jun.(June),\\ |
| 2237 |
% 7 = Jul.(July),\\ |
| 2238 |
% 8 = Aug.(August),\\ |
| 2239 |
% 9 = Sept.(September),\\ |
| 2240 |
% 10 = Oct.(October),\\ |
| 2241 |
% 11 = Nov.(November),\\ |
| 2242 |
% 12 = Dec.(December), |
| 2243 |
% \begin{macrocode} |
| 2244 |
\prop_new:N \l_@@_dateen_prop |
| 2245 |
\prop_set_from_keyval:Nn \l_@@_dateen_prop |
| 2246 |
{ |
| 2247 |
1 = Jan., |
| 2248 |
2 = Feb., |
| 2249 |
3 = Mar., |
| 2250 |
4 = Apr., |
| 2251 |
5 = May., |
| 2252 |
6 = Jun., |
| 2253 |
7 = Jul., |
| 2254 |
8 = Aug., |
| 2255 |
9 = Sept., |
| 2256 |
10 = Oct., |
| 2257 |
11 = Nov., |
| 2258 |
12 = Dec., |
| 2259 |
} |
| 2260 |
\NewDocumentCommand \dateen { } |
| 2261 |
{ |
| 2262 |
\prop_get:NVN \l_@@_dateen_prop \c_sys_month_int \l_@@_tmpa_tl |
| 2263 |
\l_@@_tmpa_tl ,~ \int_use:N \c_sys_year_int |
| 2264 |
} |
| 2265 |
% \end{macrocode} |
| 2266 |
% \end{macro} |
| 2267 |
% |
| 2268 |
% \subsubsection{通用常量} |
| 2269 |
% |
| 2270 |
% \begin{variable}{\c_@@_name_simp_tl,\c_@@_name_trad_tl, |
| 2271 |
% \c_@@_name_en_tl} |
| 2272 |
% 学校名称。 |
| 2273 |
% \begin{macrocode} |
| 2274 |
\tl_const:Nn \c_@@_name_simp_tl { 西北农林科技大学 } |
| 2275 |
\tl_const:Nn \c_@@_name_trad_tl { 西北農林科技大學 } |
| 2276 |
\tl_const:Nn \c_@@_name_en_tl { Northwest~ A\&F~ University } |
| 2277 |
% \end{macrocode} |
| 2278 |
% \end{variable} |
| 2279 |
% |
| 2280 |
% 常用标点符号,见表~\ref{tab:punctuations}。 |
| 2281 |
% \begin{macrocode} |
| 2282 |
\clist_map_inline:nn |
| 2283 |
{ |
| 2284 |
{ ideo_comma } { "3001 }, |
| 2285 |
{ ideo_full_stop } { "3002 }, |
| 2286 |
{ fwid_tilde } { "FF5E }, |
| 2287 |
{ fwid_comma } { "FF0C }, |
| 2288 |
{ fwid_full_stop } { "FF0E }, |
| 2289 |
{ fwid_colon } { "FF1A }, |
| 2290 |
{ fwid_semicolon } { "FF1B }, |
| 2291 |
{ fwid_left_paren } { "FF08 }, |
| 2292 |
{ fwid_right_paren } { "FF09 }, |
| 2293 |
{ fwid_left_title } { "300A }, |
| 2294 |
{ fwid_right_title } { "300B } |
| 2295 |
} |
| 2296 |
{ \@@_define_punct:nn #1 } |
| 2297 |
% \end{macrocode} |
| 2298 |
% |
| 2299 |
% \begin{table}[ht] |
| 2300 |
% \caption{常用标点符号} |
| 2301 |
% \label{tab:punctuations} |
| 2302 |
% \centering |
| 2303 |
% \begin{tabular}{cccc} |
| 2304 |
% \toprule |
| 2305 |
% \textbf{中文名称} & \textbf{英文名称} & \textbf{符号} & \textbf{Unicode} \\ |
| 2306 |
% \midrule |
| 2307 |
% 中文顿号 & Ideographic comma & \symbol{"3001} & U+3001 \\ |
| 2308 |
% 中文句号 & Ideographic full stop & \symbol{"3002} & U+3002 \\ |
| 2309 |
% 中文波浪号 & Fullwidth tilde & \symbol{"FF5E} & U+FF5E \\ |
| 2310 |
% 中文逗号 & Fullwidth comma & \symbol{"FF0C} & U+FF0C \\ |
| 2311 |
% 全角西文句点 & Fullwidth full stop & \symbol{"FF0E} & U+FF0E \\ |
| 2312 |
% 中文冒号 & Fullwidth colon & \symbol{"FF1A} & U+FF1A \\ |
| 2313 |
% 中文分号 & Fullwidth semicolon & \symbol{"FF1B} & U+FF1B \\ |
| 2314 |
% 中文左圆括号 & Fullwidth left parenthesis & \symbol{"FF08} & U+FF08 \\ |
| 2315 |
% 中文右圆括号 & Fullwidth right parenthesis & \symbol{"FF09} & U+FF09 \\ |
| 2316 |
% 中文左书名号 & Fullwidth left book title & \symbol{"300A} & U+300A \\ |
| 2317 |
% 中文右书名号 & Fullwidth right book title & \symbol{"300B} & U+300B \\ |
| 2318 |
% \bottomrule |
| 2319 |
% \end{tabular} |
| 2320 |
% \end{table} |
| 2321 |
% |
| 2322 |
% \begin{variable}{\c_@@_line_spread_fp} |
| 2323 |
% 行距倍数。行距倍数 $k$ 由下式确定: |
| 2324 |
% \begin{equation*} |
| 2325 |
% \num{1.2} \times k \times \SI{12}{bp} = \SI{20}{pt}. |
| 2326 |
% \end{equation*} |
| 2327 |
% 式中,\num{1.2} 是基本行距与文字大小之比,\SI{12}{bp} 是小四号字 |
| 2328 |
% 的大小,\SI{20}{pt} 是行距固定值。 |
| 2329 |
% \begin{macrocode} |
| 2330 |
\fp_const:Nn \c_@@_line_spread_fp |
| 2331 |
{ \dim_ratio:nn { 20 pt } { 12 bp } / 1.2 } |
| 2332 |
% \end{macrocode} |
| 2333 |
% \end{variable} |
| 2334 |
% |
| 2335 |
% \subsubsection{独创性和使用授权声明页内容常量} |
| 2336 |
% |
| 2337 |
% \begin{variable}{\c_@@_orig_decl_text_tl} |
| 2338 |
% 论文独创性声明。 |
| 2339 |
% \begin{macrocode} |
| 2340 |
\cs_new_protected:Npn \@@_define_orig_decl_text: |
| 2341 |
{ |
| 2342 |
\int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 } |
| 2343 |
{ |
| 2344 |
% \end{macrocode} |
| 2345 |
% 研究生独创性声明,注意此处分段只能用\tn{par}实现。 |
| 2346 |
% \begin{macrocode} |
| 2347 |
\tl_const:Nn \c_@@_orig_decl_text_tl |
| 2348 |
{ |
| 2349 |
本人声明{\c_@@_fwid_colon_tl}所呈交的学位论文是我个人在导师指导下% |
| 2350 |
独立进行的研究工作及取得的研究结果{\c_@@_fwid_semicolon_tl}论文中% |
| 2351 |
的研究数据及结果的获得完全符合学校{\c_@@_fwid_left_title_tl}% |
| 2352 |
关于规范\@@_name_simp: {}研究生学术道德的暂行规定{\c_@@_fwid_right_title_tl}% |
| 2353 |
{\c_@@_fwid_comma_tl}如果违反此规定{\c_@@_fwid_comma_tl}一切后果与% |
| 2354 |
法律责任均由本人承担{\c_@@_ideo_full_stop_tl}\par% |
| 2355 |
|
| 2356 |
尽我所知{\c_@@_fwid_comma_tl}除了文中特别加以标注和致谢的地方外% |
| 2357 |
{\c_@@_fwid_comma_tl}论文中不包含其他人已经发表或撰写过的研究结果% |
| 2358 |
{\c_@@_fwid_comma_tl}也不包含其他人和自己本人已获得\@@_name_simp: {}% |
| 2359 |
或其它教育机构的学位或证书而使用过的材料{\c_@@_ideo_full_stop_tl}与% |
| 2360 |
我一同工作的同事对本研究所做的任何贡献均已在论文的致谢中作了明确的说% |
| 2361 |
明并表示了谢意{\c_@@_ideo_full_stop_tl}% |
| 2362 |
} |
| 2363 |
}{ |
| 2364 |
% \end{macrocode} |
| 2365 |
% 本科生独创性声明,注意此处分段只能用\tn{par}实现。 |
| 2366 |
% \begin{macrocode} |
| 2367 |
\tl_const:Nn \c_@@_orig_decl_text_tl |
| 2368 |
{ |
| 2369 |
本人声明{\c_@@_fwid_colon_tl}所呈交的毕业% |
| 2370 |
\clist_item:Nn \c_@@_bachelor_type_clist |
| 2371 |
{ \l_@@_info_bachelor_type_int }% |
| 2372 |
是我个人在导师指导下独立进行的研究工作及取得的研究结果{\c_@@_ideo_full_stop_tl}% |
| 2373 |
尽我所知{\c_@@_fwid_comma_tl}除了文中特别加以标注和致谢的地% |
| 2374 |
方外{\c_@@_fwid_comma_tl}论文中不包含其他人已经发表或撰写过% |
| 2375 |
的研究结果{\c_@@_fwid_comma_tl}也不包含其他人和自己本人已获% |
| 2376 |
得\@@_name_simp: {}或其它教育机构的学位或证书而使用过的材% |
| 2377 |
料{\c_@@_ideo_full_stop_tl}与我一同工作的同事对本研究所做的% |
| 2378 |
任何贡献均已在论文的致谢中作了明确的说明并表示了谢意{\c_@@_ideo_full_stop_tl}% |
| 2379 |
如违反此声明{\c_@@_fwid_comma_tl}一切后果与法律责任均由本人% |
| 2380 |
承担{\c_@@_ideo_full_stop_tl}% |
| 2381 |
} |
| 2382 |
} |
| 2383 |
} |
| 2384 |
\@@_define_orig_decl_text: |
| 2385 |
% \end{macrocode} |
| 2386 |
% \end{variable} |
| 2387 |
% |
| 2388 |
% \changes{v1.25}{2023/04/18}{添加盲审隐藏导师承诺中研究生姓名。} |
| 2389 |
% |
| 2390 |
% \begin{variable}{\c_@@_super_decl_text_tl} |
| 2391 |
% 研究生学位导师承诺。 |
| 2392 |
% \begin{macrocode} |
| 2393 |
\tl_const:Nn \c_@@_super_decl_text_tl |
| 2394 |
{ |
| 2395 |
本人承诺{\c_@@_fwid_colon_tl}我的研究生{% |
| 2396 |
\bool_if:NTF \g_@@_anonymous_bool |
| 2397 |
{ |
| 2398 |
\@@_text_uline:V \c_@@_name_anonname_tl |
| 2399 |
}{ |
| 2400 |
\@@_text_uline:V \l_@@_info_author_tl |
| 2401 |
} |
| 2402 |
}% |
| 2403 |
所呈交的学位论文是在我指导下独立开展研究工作及取得的研究结果% |
| 2404 |
{\c_@@_fwid_comma_tl}属于我现岗职务工作的结果{\c_@@_fwid_comma_tl}% |
| 2405 |
并严格按照学校{\c_@@_fwid_left_title_tl}关于规范\@@_name_simp: {}研% |
| 2406 |
究生学术道德的暂行规定{\c_@@_fwid_right_title_tl}而% |
| 2407 |
获得的研究结果{\c_@@_ideo_full_stop_tl}如果违反学校{\c_@@_fwid_left_title_tl}% |
| 2408 |
关于规范\@@_name_simp: {}研究生学术道德的暂行规定{\c_@@_fwid_right_title_tl}% |
| 2409 |
{\c_@@_fwid_comma_tl}我愿接受按学校% |
| 2410 |
有关规定的处罚处理并承担相应导师连带责任{\c_@@_ideo_full_stop_tl}% |
| 2411 |
} |
| 2412 |
% \end{macrocode} |
| 2413 |
% \end{variable} |
| 2414 |
% |
| 2415 |
% \begin{variable}{\c_@@_auth_decl_text_tl} |
| 2416 |
% 论文使用授权声明。 |
| 2417 |
% \begin{macrocode} |
| 2418 |
\cs_new_protected:Npn \@@_auth_orig_decl_text: |
| 2419 |
{ |
| 2420 |
\int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 } |
| 2421 |
{ |
| 2422 |
% \end{macrocode} |
| 2423 |
% 研究生使用授权声明,注意此处分段只能用\tn{par}实现。 |
| 2424 |
% \begin{macrocode} |
| 2425 |
\tl_const:Nn \c_@@_auth_decl_text_tl |
| 2426 |
{ |
| 2427 |
本学位论文的知识产权归属\@@_name_simp: {}{\c_@@_ideo_full_stop_tl}% |
| 2428 |
本人同意\@@_name_simp: {}保存或向国家有关部门或机构送交论文的纸% |
| 2429 |
质版和电子版{\c_@@_fwid_comma_tl}允许论文被查阅和借阅{\c_@@_fwid_semicolon_tl}% |
| 2430 |
同意\@@_name_simp: {}将本学位论文的全部或部分内容授权汇编录入% |
| 2431 |
{\c_@@_fwid_left_title_tl}中国博士/硕士学位论文全文数据库% |
| 2432 |
{\c_@@_fwid_right_title_tl}和{\c_@@_fwid_left_title_tl}中国学位% |
| 2433 |
论文全文数据库{\c_@@_fwid_right_title_tl}进行出版% |
| 2434 |
{\c_@@_fwid_comma_tl}并享受相关权益{\c_@@_ideo_full_stop_tl}\par |
| 2435 |
|
| 2436 |
本人保证{\c_@@_fwid_comma_tl}在毕业离开(或者工作调离)\@@_name_simp: {}% |
| 2437 |
后{\c_@@_fwid_comma_tl}发表或者使用本学位论文及其相关的工作成% |
| 2438 |
果时{\c_@@_fwid_comma_tl}将以\@@_name_simp: {}为第一署名单位% |
| 2439 |
{\c_@@_fwid_comma_tl}否则{\c_@@_fwid_comma_tl}愿意按 |
| 2440 |
{\c_@@_fwid_left_title_tl}中华人民共和国著作权法{\c_@@_fwid_right_title_tl}% |
| 2441 |
等有关规定接受处理并承担法律责任{\c_@@_ideo_full_stop_tl}\par% |
| 2442 |
|
| 2443 |
任何收存和保管本论文各种版本的其他单位和个人(包括研究生本人)未经本% |
| 2444 |
论文作者的导师同意{\c_@@_fwid_comma_tl}不得有对本论文进行复制% |
| 2445 |
{\c_@@_ideo_comma_tl}修改{\c_@@_ideo_comma_tl}发行{\c_@@_ideo_comma_tl}% |
| 2446 |
出租{\c_@@_ideo_comma_tl}改编等侵犯著作权的行为{\c_@@_fwid_comma_tl}% |
| 2447 |
否则{\c_@@_fwid_comma_tl}按违背{\c_@@_fwid_left_title_tl}中华人民共和国% |
| 2448 |
著作权法{\c_@@_fwid_right_title_tl}等有关规定处% |
| 2449 |
理并追究法律责任{\c_@@_ideo_full_stop_tl}\par% |
| 2450 |
|
| 2451 |
{\sffamily (保密的学位论文在保密期限内{\c_@@_fwid_comma_tl}不得以任何% |
| 2452 |
方式发表{\c_@@_ideo_comma_tl}借阅{\c_@@_ideo_comma_tl}复印% |
| 2453 |
{\c_@@_ideo_comma_tl}缩印或扫描复制手段保存{\c_@@_ideo_comma_tl}汇编论文)% |
| 2454 |
} |
| 2455 |
} |
| 2456 |
}{ |
| 2457 |
% \end{macrocode} |
| 2458 |
% 本科生使用授权声明,注意此处分段只能用\tn{par}实现。 |
| 2459 |
% \begin{macrocode} |
| 2460 |
\tl_const:Nn \c_@@_auth_decl_text_tl |
| 2461 |
{ |
| 2462 |
本毕业\clist_item:Nn \c_@@_bachelor_type_clist |
| 2463 |
{ \l_@@_info_bachelor_type_int }% |
| 2464 |
的知识产权归属\@@_name_simp: {}{\c_@@_ideo_full_stop_tl}本% |
| 2465 |
人同意\@@_name_simp: {}保存或向国家有关部门或机构送交论文的% |
| 2466 |
纸质版和电子版{\c_@@_fwid_comma_tl}允许论文被查阅和借阅% |
| 2467 |
{\c_@@_ideo_full_stop_tl}\par |
| 2468 |
|
| 2469 |
本人保证{\c_@@_fwid_comma_tl}在毕业离开\@@_name_simp: {}后% |
| 2470 |
{\c_@@_fwid_comma_tl}发表或者使用本毕业% |
| 2471 |
\clist_item:Nn \c_@@_bachelor_type_clist { \l_@@_info_bachelor_type_int }% |
| 2472 |
及其相关的工作成果时{\c_@@_fwid_comma_tl}将以\@@_name_simp: {}% |
| 2473 |
为第一署名单位{\c_@@_fwid_comma_tl}如有违反{\c_@@_fwid_comma_tl}% |
| 2474 |
愿意按{\c_@@_fwid_left_title_tl}中华人民共和国著作权法% |
| 2475 |
{\c_@@_fwid_right_title_tl}等有关规定接受处理并承担法律责任% |
| 2476 |
{\c_@@_ideo_full_stop_tl}\par% |
| 2477 |
|
| 2478 |
任何收存和保管本论文各种版本的其他单位和个人(包括作者本人)未经% |
| 2479 |
本论文作者的导师同意{\c_@@_fwid_comma_tl}不得有对本论文进行复制% |
| 2480 |
{\c_@@_ideo_comma_tl}修改{\c_@@_ideo_comma_tl}发行{\c_@@_ideo_comma_tl}% |
| 2481 |
出租{\c_@@_ideo_comma_tl}改编等侵犯著作权的行为{\c_@@_fwid_comma_tl}% |
| 2482 |
否则{\c_@@_fwid_comma_tl}按违背{\c_@@_fwid_left_title_tl}中华人民% |
| 2483 |
共和国著作权法{\c_@@_fwid_right_title_tl}% |
| 2484 |
等有关规定处理并追究法律责任{\c_@@_ideo_full_stop_tl}% |
| 2485 |
} |
| 2486 |
} |
| 2487 |
} |
| 2488 |
\@@_auth_orig_decl_text: |
| 2489 |
% \end{macrocode} |
| 2490 |
% \end{variable} |
| 2491 |
% |
| 2492 |
% \begin{variable}{\c_@@_orig_decl_sign_tl, |
| 2493 |
% \c_@@_super_decl_sign_tl} |
| 2494 |
% 声明页签名项目。 |
| 2495 |
% \begin{macrocode} |
| 2496 |
\cs_new_protected:Npn \@@_orig_decl_sign: |
| 2497 |
{ |
| 2498 |
\int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 } |
| 2499 |
{ |
| 2500 |
% \end{macrocode} |
| 2501 |
% 研究生。 |
| 2502 |
% \begin{macrocode} |
| 2503 |
\tl_const:Nn \c_@@_orig_decl_sign_tl { 研究生签名 } |
| 2504 |
\tl_const:Nn \c_@@_super_decl_sign_tl { 导师签名 } |
| 2505 |
}{ |
| 2506 |
% \end{macrocode} |
| 2507 |
% 本科。 |
| 2508 |
% \begin{macrocode} |
| 2509 |
\tl_const:Nn \c_@@_orig_decl_sign_tl { 本科生签名 } |
| 2510 |
\tl_const:Nn \c_@@_super_decl_sign_tl { 指导教师签名 } |
| 2511 |
} |
| 2512 |
} |
| 2513 |
\@@_orig_decl_sign: |
| 2514 |
\clist_const:Nn \c_@@_auth_decl_sign_clist |
| 2515 |
{ 作者签名, 导师签名, 日期 } |
| 2516 |
% \end{macrocode} |
| 2517 |
% \end{variable} |
| 2518 |
% |
| 2519 |
% \subsubsection{杂项常量定义} |
| 2520 |
% |
| 2521 |
% \changes{v2.00}{2026/04/29}{修订本科毕业生为本科毕业。} |
| 2522 |
% \changes{v1.13}{2022/05/26}{修订本科毕业为本科毕业。} |
| 2523 |
% |
| 2524 |
% \begin{variable}{\c_@@_thesis_type_clist, |
| 2525 |
% \c_@@_postgraduate_type_clist, |
| 2526 |
% \c_@@_bachelor_type_clist} |
| 2527 |
% 论文类型与学位类型。 |
| 2528 |
% \begin{macrocode} |
| 2529 |
\clist_const:Nn \c_@@_thesis_type_clist |
| 2530 |
{ 博士学位论文, 硕士学位论文, 本科毕业 } |
| 2531 |
\clist_const:Nn \c_@@_postgraduate_type_clist |
| 2532 |
{ 学术学位, 专业学位 } |
| 2533 |
\clist_const:Nn \c_@@_bachelor_type_clist |
| 2534 |
{ 论文, 设计 } |
| 2535 |
% \end{macrocode} |
| 2536 |
% \end{variable} |
| 2537 |
% |
| 2538 |
% \begin{variable}{\c_@@_secret_clist} |
| 2539 |
% 四种密级,公开无需列入。 |
| 2540 |
% \begin{macrocode} |
| 2541 |
\clist_const:Nn \c_@@_secret_clist { 公开, 限制, 秘密 } |
| 2542 |
% \end{macrocode} |
| 2543 |
% \end{variable} |
| 2544 |
% |
| 2545 |
% 各字段默认名称,注意会忽略空格。 |
| 2546 |
% |
| 2547 |
% 研究生和本科名称存在不一致现象,例如研究生用“研究生学号”,本科用“学号”。 |
| 2548 |
% \begin{macrocode} |
| 2549 |
\cs_new_protected:Npn \@@_define_name_const_zh: |
| 2550 |
{ |
| 2551 |
\int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 } |
| 2552 |
{ |
| 2553 |
% \end{macrocode} |
| 2554 |
% 研究生 |
| 2555 |
% \begin{macrocode} |
| 2556 |
\clist_map_inline:nn |
| 2557 |
{ |
| 2558 |
{ secret_level } { 密级 }, |
| 2559 |
{ udc } { UDC }, |
| 2560 |
{ school_id } { 学校代码 }, |
| 2561 |
{ instructors } { 指导小组 }, |
| 2562 |
{ ack } { 致 \quad 谢 }, |
| 2563 |
{ toc } { 目 \quad 录 }, |
| 2564 |
{ student_id } { 研究生学号 }, |
| 2565 |
{ orig_decl } { 研究生学位论文的独创性声明 }, |
| 2566 |
{ super_decl } { 导师指导研究生学位论文的承诺 }, |
| 2567 |
{ auth_decl } { 关于研究生学位论文使用授权的说明 }, |
| 2568 |
{ resume } { 个人简历 }, |
| 2569 |
{ lof } { 插图目录 }, |
| 2570 |
{ lot } { 表格目录 }, |
| 2571 |
} |
| 2572 |
{ \@@_define_name:nn ##1 } |
| 2573 |
}{ |
| 2574 |
% \end{macrocode} |
| 2575 |
% 本科生 |
| 2576 |
% \begin{macrocode} |
| 2577 |
\clist_map_inline:nn |
| 2578 |
{ |
| 2579 |
{ ack } { 致谢 }, |
| 2580 |
{ department } { 培养单位 }, |
| 2581 |
{ bachelor_title } { 申请学位类别 }, |
| 2582 |
{ major } { 专业名称 }, |
| 2583 |
{ student_id } { 学号 }, |
| 2584 |
{ authorbrief } { 作者 }, |
| 2585 |
{ author } { 学生姓名 }, |
| 2586 |
{ cosupervisor } { 合作指导教师 }, |
| 2587 |
{ resume } { 作者简历 }, |
| 2588 |
{ date } { 完成日期 }, |
| 2589 |
{ toc } { 目次 }, |
| 2590 |
{ notation } { 主要符号注释表 }, |
| 2591 |
{ terminology } { 术语表 }, |
| 2592 |
{ figtabtoc } { 插图和附表清单 }, |
| 2593 |
{ orig_decl } { 本科生毕业\clist_item:Nn |
| 2594 |
\c_@@_bachelor_type_clist { |
| 2595 |
\l_@@_info_bachelor_type_int |
| 2596 |
}的原创性声明 }, |
| 2597 |
{ auth_decl } { 本科生毕业\clist_item:Nn |
| 2598 |
\c_@@_bachelor_type_clist { |
| 2599 |
\l_@@_info_bachelor_type_int |
| 2600 |
}的使用授权说明 } |
| 2601 |
} |
| 2602 |
{ \@@_define_name:nn ##1 } |
| 2603 |
} |
| 2604 |
} |
| 2605 |
% \end{macrocode} |
| 2606 |
% 执行研究生或本科中文常量定义。 |
| 2607 |
% \begin{macrocode} |
| 2608 |
\@@_define_name_const_zh: |
| 2609 |
% |
| 2610 |
% \end{macrocode} |
| 2611 |
% 研究生与本科相同的中英文常量。 |
| 2612 |
% \begin{macrocode} |
| 2613 |
% |
| 2614 |
% \changes{v1.25}{2023/04/19}{添加盲审隐藏信息符号常量。} |
| 2615 |
% |
| 2616 |
\cs_new_protected:Npn \@@_define_name_const_zh_en: |
| 2617 |
{ |
| 2618 |
% \end{macrocode} |
| 2619 |
% 研究生和本科名称相同中英文字段。 |
| 2620 |
% \begin{macrocode} |
| 2621 |
\clist_map_inline:nn |
| 2622 |
{ |
| 2623 |
{ supervisor } { 指导教师 } { Supervisor }, |
| 2624 |
{ anonid } { ********** } { ********** }, |
| 2625 |
{ anonname } { ********** } { ********** }, |
| 2626 |
{ anonhead } { ********** } { ********** }, |
| 2627 |
{ bib_en } { 参考文献 } { Bibliography }, |
| 2628 |
{ pdf_creator } { 西北农林科技大学\LaTeX{}模板 }{ \LaTeX{}~ with~ nwafuthesis~ class }, |
| 2629 |
} |
| 2630 |
{ \@@_define_name:nnn ##1 } |
| 2631 |
|
| 2632 |
\int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 } |
| 2633 |
{ |
| 2634 |
% \end{macrocode} |
| 2635 |
% 研究生。 |
| 2636 |
% \begin{macrocode} |
| 2637 |
\clist_map_inline:nn |
| 2638 |
{ |
| 2639 |
{ department } { 培养单位 } { Colleges }, |
| 2640 |
{ major } { 学科专业 } { Major }, |
| 2641 |
{ engineering_title } { 专业学位类别 } { Degree~ Type }, |
| 2642 |
{ engineeringfield } { 专业学位领域 } { Field }, |
| 2643 |
{ author } { 论文作者 } { Candidate }, |
| 2644 |
{ cosupervisor } { 合作指导教师 } { Co-Supervisor }, |
| 2645 |
{ date } { 论文提交时间 } { Date~ of~ Submission }, |
| 2646 |
{ abstract } { 摘 \quad 要 } { ABSTRACT }, |
| 2647 |
{ keywords } { 关键词 } { KEY~WORDS }, |
| 2648 |
{ clc } { 分类号 } { CLC~ number: }, |
| 2649 |
{ notation } { 主要符号对照表 } { List~ of~ Symbols } |
| 2650 |
} |
| 2651 |
{ \@@_define_name:nnn ##1 } |
| 2652 |
}{ |
| 2653 |
% \end{macrocode} |
| 2654 |
% 本科。 |
| 2655 |
% \begin{macrocode} |
| 2656 |
\clist_map_inline:nn |
| 2657 |
{ |
| 2658 |
{ abstract } { 摘要 } { ABSTRACT }, |
| 2659 |
{ keywords } { 关键词 } { KEY~WORDS }, |
| 2660 |
} |
| 2661 |
{ \@@_define_name:nnn ##1 } |
| 2662 |
} |
| 2663 |
} |
| 2664 |
% \end{macrocode} |
| 2665 |
% 执行研究生或本科中英文常量定义。 |
| 2666 |
% \begin{macrocode} |
| 2667 |
\@@_define_name_const_zh_en: |
| 2668 |
% \end{macrocode} |
| 2669 |
% |
| 2670 |
% 定理类标题中英文名称常量。 |
| 2671 |
% \begin{macrocode} |
| 2672 |
% |
| 2673 |
\clist_map_inline:nn |
| 2674 |
{ |
| 2675 |
{ proof } { 证明 } { Proof }, |
| 2676 |
{ axiom } { 公理 } { Axiom }, |
| 2677 |
{ corollary } { 推论 } { Corollary }, |
| 2678 |
{ definition } { 定义 } { Definition }, |
| 2679 |
{ example } { 例 } { Example }, |
| 2680 |
{ lemma } { 引理 } { Lemma }, |
| 2681 |
{ theorem } { 定理 } { Theorem } |
| 2682 |
} |
| 2683 |
{ \@@_define_name:nnn #1 } |
| 2684 |
% \end{macrocode} |
| 2685 |
% |
| 2686 |
% \subsection{载入宏包、文档类} |
| 2687 |
% |
| 2688 |
% 将选项传入 \cls{ctexbook} 文档类。 |
| 2689 |
% \begin{macrocode} |
| 2690 |
\PassOptionsToClass |
| 2691 |
{ |
| 2692 |
UTF8, |
| 2693 |
heading = true, |
| 2694 |
fontset = none, |
| 2695 |
zihao = -4, |
| 2696 |
linespread = \c_@@_line_spread_fp, |
| 2697 |
\g_@@_to_ctexbook_clist |
| 2698 |
} |
| 2699 |
{ ctexbook } |
| 2700 |
% \end{macrocode} |
| 2701 |
% |
| 2702 |
% 载入 \cls{ctexbook} 文档类。 |
| 2703 |
% 在使用 \XeLaTeX{} 编译时,\cls{ctexbook} 的底层将调用 \pkg{xeCJK} |
| 2704 |
% 宏包;而在使用 \LuaLaTeX{} 编译时,则将调用 \pkg{LuaTeX-ja} 宏包。 |
| 2705 |
% 两种情况下 \cls{ctexbook} 均会调用 \pkg{fontspec} 宏包。 |
| 2706 |
% |
| 2707 |
% \begin{macrocode} |
| 2708 |
\LoadClass { ctexbook } |
| 2709 |
% \end{macrocode} |
| 2710 |
% |
| 2711 |
% 为各宏包传入必要的选项。 |
| 2712 |
% |
| 2713 |
% \begin{macrocode} |
| 2714 |
\clist_map_inline:nn |
| 2715 |
{ |
| 2716 |
{ shortlabels } { enumitem }, |
| 2717 |
{ no-math } { fontspec }, |
| 2718 |
{ perpage } { footmisc }, |
| 2719 |
{ amsmath, thmmarks } { ntheorem }, |
| 2720 |
{ list=off } { bicaption } |
| 2721 |
} |
| 2722 |
{ \PassOptionsToPackage #1 } |
| 2723 |
% \end{macrocode} |
| 2724 |
% |
| 2725 |
% \changes{v2.14}{2026/05/14}{添加tabularray和booktabs宏包。} |
| 2726 |
% |
| 2727 |
% 载入各宏包。其中,\pkg{amsmath} 必须在 \pkg{unicode-math} 之前引入。 |
| 2728 |
% |
| 2729 |
% \begin{macrocode} |
| 2730 |
\RequirePackage |
| 2731 |
{ |
| 2732 |
amsmath, |
| 2733 |
unicode-math, |
| 2734 |
geometry, |
| 2735 |
fancyhdr, |
| 2736 |
titletoc, |
| 2737 |
footmisc, |
| 2738 |
ntheorem, |
| 2739 |
enumitem, |
| 2740 |
graphicx, |
| 2741 |
caption, |
| 2742 |
bicaption, |
| 2743 |
tabularray, |
| 2744 |
booktabs, |
| 2745 |
xcolor, |
| 2746 |
} |
| 2747 |
% \end{macrocode} |
| 2748 |
% |
| 2749 |
% \changes{v1.10}{2022/03/17}{只检查 \cls{ctexbook} 和 \pkg{xeCJK} 的版本。} |
| 2750 |
% |
| 2751 |
% \begin{macro}{\@@_check_package:nnn} |
| 2752 |
% 检查过时宏包。 |
| 2753 |
% \begin{macrocode} |
| 2754 |
\cs_new_protected:Npn \@@_check_package:nnn #1#2#3 |
| 2755 |
{ |
| 2756 |
\@ifpackagelater {#1} {#2} |
| 2757 |
{ } { \@@_error:nnnn { package-too-old } { Package } {#1} {#3} } |
| 2758 |
} |
| 2759 |
\cs_new_protected:Npn \@@_check_class:nnn #1#2#3 |
| 2760 |
{ |
| 2761 |
\@ifclasslater {#1} {#2} |
| 2762 |
{ } { \@@_error:nnnn { package-too-old } { Class } {#1} {#3} } |
| 2763 |
} |
| 2764 |
\@@_msg_new:nn { package-too-old } |
| 2765 |
{ |
| 2766 |
#1~ "#2"~ is~ too~ old. \\ |
| 2767 |
The~ nwafuthesis~ class~ only~ supports~ "#2" \\ |
| 2768 |
with~ a~ version~ higher~ than~ v#3. \\\\ |
| 2769 |
Please~ update~ an~ up-to-date~ version~ of~ it \\ |
| 2770 |
using~ your~ TeX~ package~ manager~ or~ from~ CTAN. |
| 2771 |
} |
| 2772 |
% \end{macrocode} |
| 2773 |
% \end{macro} |
| 2774 |
% |
| 2775 |
% \changes{v1.01}{2021/08/06}{由于无法获取ctex版本信息,暂时关闭对ctex版本检测。} |
| 2776 |
% |
| 2777 |
% \begin{macrocode} |
| 2778 |
\@@_check_class:nnn { ctexbook } { 2021/03/14 } { 2.5.6 } |
| 2779 |
\sys_if_engine_xetex:T |
| 2780 |
{ \@@_check_package:nnn { xeCJK } { 2020/05/01 } { 3.8.3 } } |
| 2781 |
% \end{macrocode} |
| 2782 |
% |
| 2783 |
% \subsection{页面布局} |
| 2784 |
% |
| 2785 |
% 利用 \pkg{geometry} 宏包设置纸张大小、页面边距以及页眉高度。这里, |
| 2786 |
% $\SI{2.54}{\centi\meter}=\SI{1}{in}$, |
| 2787 |
% $\SI{3.18}{\centi\meter}=\SI{1.25}{in}$。 |
| 2788 |
% |
| 2789 |
% \changes{v2.13}{2026/05/12}{按2026年研究生撰写规范修订研究生页面布局。} |
| 2790 |
% |
| 2791 |
% 研究论文页面尺寸与本科毕业论文(设计)的 |
| 2792 |
% 页面尺寸目前一致,但为后续维护仍采用分开设计的形式。 |
| 2793 |
% \begin{macrocode} |
| 2794 |
\cs_new_protected:Npn \@@_thesis_geometry: |
| 2795 |
{ |
| 2796 |
\int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 } |
| 2797 |
{ |
| 2798 |
% \end{macrocode} |
| 2799 |
% 研究生论文页边距 |
| 2800 |
% \begin{macrocode} |
| 2801 |
\geometry |
| 2802 |
{ |
| 2803 |
paper = a4paper, |
| 2804 |
top = 1.45cm, |
| 2805 |
bottom = 2.60cm, |
| 2806 |
left = 2.60cm, |
| 2807 |
right = 2.60cm, |
| 2808 |
bindingoffset = 0.00cm, |
| 2809 |
headheight = 0.80cm, |
| 2810 |
headsep = 0.70cm, |
| 2811 |
footskip = 0.75cm, |
| 2812 |
includehead, |
| 2813 |
includefoot, |
| 2814 |
} |
| 2815 |
}{ |
| 2816 |
% \end{macrocode} |
| 2817 |
% 本科论文页边距 |
| 2818 |
% \begin{macrocode} |
| 2819 |
\geometry |
| 2820 |
{ |
| 2821 |
paper = a4paper, |
| 2822 |
top = 1.45cm, |
| 2823 |
bottom = 2.60cm, |
| 2824 |
left = 2.60cm, |
| 2825 |
right = 2.60cm, |
| 2826 |
bindingoffset = 0.00cm, |
| 2827 |
headheight = 0.80cm, |
| 2828 |
headsep = 0.70cm, |
| 2829 |
footskip = 0.75cm, |
| 2830 |
includehead, |
| 2831 |
includefoot, |
| 2832 |
} |
| 2833 |
} |
| 2834 |
} |
| 2835 |
\@@_thesis_geometry: |
| 2836 |
% \end{macrocode} |
| 2837 |
% |
| 2838 |
% 草稿模式下显示页面边框及页眉、页脚线 。 |
| 2839 |
% \begin{macrocode} |
| 2840 |
\bool_if:NT \g_@@_draft_bool { \geometry { showframe } } |
| 2841 |
% \end{macrocode} |
| 2842 |
% |
| 2843 |
% \subsection{字体} |
| 2844 |
% |
| 2845 |
% \subsubsection{字体选项变量} |
| 2846 |
% |
| 2847 |
% \begin{variable}{\g_@@_fontset_tl, \g_@@_cjk_fontset_tl} |
| 2848 |
% 存放字体选项值。 |
| 2849 |
% \begin{macrocode} |
| 2850 |
\tl_new:N \g_@@_fontset_tl |
| 2851 |
\tl_new:N \g_@@_cjk_fontset_tl |
| 2852 |
% \end{macrocode} |
| 2853 |
% \end{variable} |
| 2854 |
% |
| 2855 |
% \subsubsection{字体选项} |
| 2856 |
% |
| 2857 |
% \begin{macro}{style/font} |
| 2858 |
% 西文字体选项。 |
| 2859 |
% \begin{macrocode} |
| 2860 |
\keys_define:nn { nwafu / style } |
| 2861 |
{ |
| 2862 |
font .choices:nn = |
| 2863 |
{ garamond, libertinus, lm, palatino, times, times*, none } |
| 2864 |
{ \tl_gset_eq:NN \g_@@_fontset_tl \l_keys_choice_tl } |
| 2865 |
} |
| 2866 |
% \end{macrocode} |
| 2867 |
% \end{macro} |
| 2868 |
% |
| 2869 |
% \begin{macro}{style/cjk-font} |
| 2870 |
% 中文字体选项。 |
| 2871 |
% \begin{macrocode} |
| 2872 |
\keys_define:nn { nwafu / style } |
| 2873 |
{ |
| 2874 |
cjk-font .choices:nn = |
| 2875 |
{ adobe, fandol, founder, mac, sinotype, sourcehan, windows, none } |
| 2876 |
{ \tl_gset_eq:NN \g_@@_cjk_fontset_tl \l_keys_choice_tl } |
| 2877 |
} |
| 2878 |
% \end{macrocode} |
| 2879 |
% \end{macro} |
| 2880 |
% |
| 2881 |
% \subsubsection{预定义字体配置函数} |
| 2882 |
% |
| 2883 |
% \changes{v2.16}{2026/05/16}{添加字体设置函数变体(xx)。} |
| 2884 |
% |
| 2885 |
% \begin{macro}{ |
| 2886 |
% \@@_setmainfont:nn, |
| 2887 |
% \@@_setsansfont:nn, |
| 2888 |
% \@@_setmonofont:nn, |
| 2889 |
% \@@_setmathfont:nn} |
| 2890 |
% 用于设置西文字体的辅助函数,来源于 \pkg{fontspec} 和 \pkg{unicode-math}。 |
| 2891 |
% \begin{arguments} |
| 2892 |
% \item 字体名 |
| 2893 |
% \item 选项 |
| 2894 |
% \end{arguments} |
| 2895 |
% \begin{macrocode} |
| 2896 |
\cs_new_protected:Npn \@@_setmainfont:nn #1#2 |
| 2897 |
{ \__fontspec_main_setmainfont:nn {#2} {#1} } |
| 2898 |
\cs_new_protected:Npn \@@_setsansfont:nn #1#2 |
| 2899 |
{ \__fontspec_main_setsansfont:nn {#2} {#1} } |
| 2900 |
\cs_new_protected:Npn \@@_setmonofont:nn #1#2 |
| 2901 |
{ \__fontspec_main_setmonofont:nn {#2} {#1} } |
| 2902 |
\cs_new_protected:Npn \@@_setmathfont:nn #1#2 |
| 2903 |
{ \__um_setmathfont:nn {#2} {#1} } |
| 2904 |
% \end{macrocode} |
| 2905 |
% 西文字体设置函数的函数变体 |
| 2906 |
% \begin{macrocode} |
| 2907 |
\cs_generate_variant:Nn \@@_setmainfont:nn { xx } |
| 2908 |
\cs_generate_variant:Nn \@@_setsansfont:nn { xx } |
| 2909 |
\cs_generate_variant:Nn \@@_setmonofont:nn { xx } |
| 2910 |
\cs_generate_variant:Nn \@@_setmathfont:nn { xx } |
| 2911 |
% \end{macrocode} |
| 2912 |
% \end{macro} |
| 2913 |
% |
| 2914 |
% \begin{macro}{ |
| 2915 |
% \@@_setCJKmainfont:nn, |
| 2916 |
% \@@_setCJKsansfont:nn, |
| 2917 |
% \@@_setCJKmonofont:nn} |
| 2918 |
% 用于设置中文字体的辅助函数,来源于 \pkg{xeCJK} 和 \pkg{ctex} 宏包。 |
| 2919 |
% \begin{macrocode} |
| 2920 |
\cs_new_protected:Npn \@@_setCJKmainfont:nn #1#2 |
| 2921 |
{ \@@_set_family:xnn { \CJKrmdefault } {#2} {#1} } |
| 2922 |
\cs_new_protected:Npn \@@_setCJKsansfont:nn #1#2 |
| 2923 |
{ \@@_set_family:xnn { \CJKsfdefault } {#2} {#1} } |
| 2924 |
\cs_new_protected:Npn \@@_setCJKmonofont:nn #1#2 |
| 2925 |
{ \@@_set_family:xnn { \CJKttdefault } {#2} {#1} } |
| 2926 |
% \end{macrocode} |
| 2927 |
% 中文字体设置函数的函数变体 |
| 2928 |
% \begin{macrocode} |
| 2929 |
\cs_generate_variant:Nn \@@_setCJKmainfont:nn { xx } |
| 2930 |
\cs_generate_variant:Nn \@@_setCJKsansfont:nn { xx } |
| 2931 |
\cs_generate_variant:Nn \@@_setCJKmonofont:nn { xx } |
| 2932 |
% \end{macrocode} |
| 2933 |
% \end{macro} |
| 2934 |
% |
| 2935 |
% \begin{macro}{\@@_set_cjk_font_hei:nn,\nwafu@hei} |
| 2936 |
% 中文黑体需要单独设置。 |
| 2937 |
% \begin{macrocode} |
| 2938 |
\cs_new_protected:Npn \@@_set_cjk_font_hei:nn #1#2 |
| 2939 |
{ \@@_set_family:nnn { nwafu@hei } {#2} {#1} } |
| 2940 |
% \end{macrocode} |
| 2941 |
% 中文黑体字体设置函数的函数变体 |
| 2942 |
% \begin{macrocode} |
| 2943 |
\cs_generate_variant:Nn \@@_set_cjk_font_hei:nn { xx } |
| 2944 |
\cs_new_protected:Npn \nwafu@hei |
| 2945 |
{ \@@_switch_family:n { nwafu@hei } } |
| 2946 |
% \end{macrocode} |
| 2947 |
% \end{macro} |
| 2948 |
% |
| 2949 |
% \begin{macro}{\@@_set_cjk_font_kai:nn,\nwafu@kai} |
| 2950 |
% 楷体需要单独设置。 |
| 2951 |
% \begin{macrocode} |
| 2952 |
\cs_new_protected:Npn \@@_set_cjk_font_kai:nn #1#2 |
| 2953 |
{ \@@_set_family:nnn { nwafu@kai } {#2} {#1} } |
| 2954 |
% \end{macrocode} |
| 2955 |
% 中文楷体字体设置函数的函数变体 |
| 2956 |
% \begin{macrocode} |
| 2957 |
\cs_generate_variant:Nn \@@_set_cjk_font_kai:nn { xx } |
| 2958 |
\cs_new_protected:Npn \nwafu@kai |
| 2959 |
{ \@@_switch_family:n { nwafu@kai } } |
| 2960 |
% \end{macrocode} |
| 2961 |
% \end{macro} |
| 2962 |
% |
| 2963 |
% \begin{macro}{ |
| 2964 |
% \@@_cjk_font_options:, |
| 2965 |
% \@@_cjk_font_hei_options:, |
| 2966 |
% \@@_setCJKmainfont:n, |
| 2967 |
% \@@_setCJKsansfont:n, |
| 2968 |
% \@@_setCJKmonofont:n, |
| 2969 |
% \@@_set_cjk_font_hei:n, |
| 2970 |
% \@@_set_cjk_font_kai:n} |
| 2971 |
% 将 bold、italic 和 bold italic 统一按照 roman 设置。 |
| 2972 |
% \begin{macrocode} |
| 2973 |
\tl_const:Nn \@@_cjk_font_options: |
| 2974 |
{ UprightFont = *, ItalicFont = *, AutoFakeBold = true } |
| 2975 |
% \end{macrocode} |
| 2976 |
% 设置为中文黑体时不启用伪粗体 |
| 2977 |
% \begin{macrocode} |
| 2978 |
\tl_const:Nn \@@_cjk_font_hei_options: |
| 2979 |
{ UprightFont = *, ItalicFont = *, AutoFakeBold = false } |
| 2980 |
% \end{macrocode} |
| 2981 |
% 设置中文正文常规字体 |
| 2982 |
% \begin{macrocode} |
| 2983 |
\cs_new_protected:Npx \@@_setCJKmainfont:n #1 |
| 2984 |
{ \@@_setCJKmainfont:nn {#1} { \@@_cjk_font_options: } } |
| 2985 |
% \end{macrocode} |
| 2986 |
% 设置中文无衬线字体 |
| 2987 |
% \begin{macrocode} |
| 2988 |
\cs_new_protected:Npx \@@_setCJKsansfont:n #1 |
| 2989 |
{ \@@_setCJKsansfont:nn {#1} { \@@_cjk_font_hei_options: } } |
| 2990 |
% \end{macrocode} |
| 2991 |
% 设置中文等宽字体 |
| 2992 |
% \begin{macrocode} |
| 2993 |
\cs_new_protected:Npx \@@_setCJKmonofont:n #1 |
| 2994 |
{ \@@_setCJKmonofont:nn {#1} { \@@_cjk_font_options: } } |
| 2995 |
% \end{macrocode} |
| 2996 |
% 设置中文黑体字体 |
| 2997 |
% \begin{macrocode} |
| 2998 |
\cs_new_protected:Npx \@@_set_cjk_font_hei:n #1 |
| 2999 |
{ \@@_set_cjk_font_hei:nn {#1} { \@@_cjk_font_hei_options: } } |
| 3000 |
% \end{macrocode} |
| 3001 |
% 设置中文楷体字体 |
| 3002 |
% \begin{macrocode} |
| 3003 |
\cs_new_protected:Npx \@@_set_cjk_font_kai:n #1 |
| 3004 |
{ \@@_set_cjk_font_kai:nn {#1} { \@@_cjk_font_options: } } |
| 3005 |
% \end{macrocode} |
| 3006 |
% \end{macro} |
| 3007 |
% |
| 3008 |
% \begin{macro}{\@@_set_family:nnn,\@@_set_family:xnn,\@@_switch_family:n} |
| 3009 |
% 封装 CJK 字体族的设定和切换命令。 |
| 3010 |
% \begin{macrocode} |
| 3011 |
\sys_if_engine_xetex:TF |
| 3012 |
{ |
| 3013 |
\cs_new_eq:NN \@@_set_family:nnn \xeCJK_set_family:nnn |
| 3014 |
\cs_new_eq:NN \@@_switch_family:n \xeCJK_switch_family:n |
| 3015 |
} |
| 3016 |
{ |
| 3017 |
\cs_new_eq:NN \@@_set_family:nnn \ctex_ltj_set_family:nnn |
| 3018 |
\cs_new_eq:NN \@@_switch_family:n \ctex_ltj_switch_family:n |
| 3019 |
} |
| 3020 |
\cs_generate_variant:Nn \@@_set_family:nnn { x } |
| 3021 |
% \end{macrocode} |
| 3022 |
% \end{macro} |
| 3023 |
% |
| 3024 |
% \begin{macro}{ |
| 3025 |
% \setmainfont, |
| 3026 |
% \setsansfont, |
| 3027 |
% \setmonofont, |
| 3028 |
% \setmathfont, |
| 3029 |
% \setCJKmainfont, |
| 3030 |
% \setCJKsansfont, |
| 3031 |
% \setCJKmonofont, |
| 3032 |
% \@@_set_font:n} |
| 3033 |
% 重新定义以上宏包提供的字体选择命令。把它放在导言区末尾,使得用户配置不被 |
| 3034 |
% 模板配置覆盖。 |
| 3035 |
% \begin{macrocode} |
| 3036 |
\cs_new_protected:Npn \@@_set_font_helper:n #1 |
| 3037 |
{ |
| 3038 |
\exp_args:Nc \RenewDocumentCommand { set #1 font } { O { } m O { } } |
| 3039 |
{ |
| 3040 |
\ctex_at_end_preamble:n |
| 3041 |
{ \use:c { @@_set #1 font:nn } {##2} { ##1, ##3 } } |
| 3042 |
} |
| 3043 |
} |
| 3044 |
\clist_map_inline:nn { main, sans, mono, math } { \@@_set_font_helper:n {#1} } |
| 3045 |
\clist_map_inline:nn { CJKmain, CJKsans, CJKmono } { \@@_set_font_helper:n {#1} } |
| 3046 |
% \end{macrocode} |
| 3047 |
% \end{macro} |
| 3048 |
% |
| 3049 |
% \changes{v1.10}{2022/03/17}{判断 Libertinus Sans Bold Oblique 字体是否存在。} |
| 3050 |
% |
| 3051 |
% \subsubsection{字体配置变量} |
| 3052 |
% |
| 3053 |
% \begin{macro}{ |
| 3054 |
% \g_@@_font_family_libertinus_serif_tl, |
| 3055 |
% \g_@@_font_family_libertinus_sans_tl, |
| 3056 |
% \g_@@_font_style_libertinus_rm_tl, |
| 3057 |
% \g_@@_font_style_libertinus_bf_tl, |
| 3058 |
% \g_@@_font_style_libertinus_it_tl, |
| 3059 |
% \g_@@_font_style_libertinus_bfit_tl, |
| 3060 |
% \g_@@_font_style_libertinus_bfsl_tl, |
| 3061 |
% \g_@@_font_family_xits_tl, |
| 3062 |
% \g_@@_font_style_xits_rm_tl, |
| 3063 |
% \g_@@_font_style_xits_bf_tl, |
| 3064 |
% \g_@@_font_style_xits_it_tl, |
| 3065 |
% \g_@@_font_style_xits_bfit_tl, |
| 3066 |
% \g_@@_font_name_libertinus_serif_tl, |
| 3067 |
% \g_@@_font_name_libertinus_sans_tl, |
| 3068 |
% \g_@@_font_name_libertinus_math_tl, |
| 3069 |
% \g_@@_font_name_libertinus_math_bf_tl, |
| 3070 |
% \g_@@_font_name_xits_tl, |
| 3071 |
% \g_@@_font_name_xits_math_rm_tl, |
| 3072 |
% \g_@@_font_name_xits_math_bf_tl} |
| 3073 |
% Libertinus 和 XITS 字体的文件名做过变动,需要特殊处理。 |
| 3074 |
% \begin{macrocode} |
| 3075 |
\tl_new:N \g_@@_font_family_libertinus_serif_tl |
| 3076 |
\tl_new:N \g_@@_font_family_libertinus_sans_tl |
| 3077 |
\tl_new:N \g_@@_font_style_libertinus_rm_tl |
| 3078 |
\tl_new:N \g_@@_font_style_libertinus_bf_tl |
| 3079 |
\tl_new:N \g_@@_font_style_libertinus_it_tl |
| 3080 |
\tl_new:N \g_@@_font_style_libertinus_bfit_tl |
| 3081 |
\tl_new:N \g_@@_font_style_libertinus_bfsl_tl |
| 3082 |
\tl_new:N \g_@@_font_family_xits_tl |
| 3083 |
\tl_new:N \g_@@_font_style_xits_rm_tl |
| 3084 |
\tl_new:N \g_@@_font_style_xits_bf_tl |
| 3085 |
\tl_new:N \g_@@_font_style_xits_it_tl |
| 3086 |
\tl_new:N \g_@@_font_style_xits_bfit_tl |
| 3087 |
\tl_new:N \g_@@_font_name_libertinus_serif_tl |
| 3088 |
\tl_new:N \g_@@_font_name_libertinus_sans_tl |
| 3089 |
\tl_new:N \g_@@_font_name_libertinus_math_tl |
| 3090 |
\tl_new:N \g_@@_font_name_libertinus_math_bf_tl |
| 3091 |
\tl_new:N \g_@@_font_name_xits_tl |
| 3092 |
\tl_new:N \g_@@_font_name_xits_math_rm_tl |
| 3093 |
\tl_new:N \g_@@_font_name_xits_math_bf_tl |
| 3094 |
\fontspec_font_if_exist:nTF { LibertinusSerif-Regular.otf } |
| 3095 |
{ |
| 3096 |
\tl_gset:Nn \g_@@_font_family_libertinus_serif_tl { LibertinusSerif } |
| 3097 |
\tl_gset:Nn \g_@@_font_family_libertinus_sans_tl { LibertinusSans } |
| 3098 |
\tl_gset:Nn \g_@@_font_family_libertinus_math_tl { LibertinusMath } |
| 3099 |
\tl_gset:Nn \g_@@_font_name_libertinus_math_bf_tl { LibertinusMath-Bold } |
| 3100 |
\tl_gset:Nn \g_@@_font_style_libertinus_rm_tl { Regular } |
| 3101 |
\tl_gset:Nn \g_@@_font_style_libertinus_bf_tl { Bold } |
| 3102 |
\tl_gset:Nn \g_@@_font_style_libertinus_it_tl { Italic } |
| 3103 |
\tl_gset:Nn \g_@@_font_style_libertinus_bfit_tl { BoldItalic } |
| 3104 |
% \end{macrocode} |
| 3105 |
% 较新版本中 Libertinus Sans Bold Oblique 字体被移除,需进行额外判断。 |
| 3106 |
% \begin{macrocode} |
| 3107 |
\fontspec_font_if_exist:nTF { LibertinusSans-BoldOblique.otf } |
| 3108 |
{ \tl_gset:Nn \g_@@_font_style_libertinus_bfsl_tl { BoldOblique } } |
| 3109 |
{ \tl_gset:Nn \g_@@_font_style_libertinus_bfsl_tl { Bold } } |
| 3110 |
} |
| 3111 |
{ |
| 3112 |
\tl_gset:Nn \g_@@_font_family_libertinus_serif_tl { libertinusserif } |
| 3113 |
\tl_gset:Nn \g_@@_font_family_libertinus_sans_tl { libertinussans } |
| 3114 |
\tl_gset:Nn \g_@@_font_family_libertinus_math_tl { libertinusmath } |
| 3115 |
\tl_gset:Nn \g_@@_font_name_libertinus_math_bf_tl { libertinusmath-bold } |
| 3116 |
\tl_gset:Nn \g_@@_font_style_libertinus_rm_tl { regular } |
| 3117 |
\tl_gset:Nn \g_@@_font_style_libertinus_bf_tl { bold } |
| 3118 |
\tl_gset:Nn \g_@@_font_style_libertinus_it_tl { italic } |
| 3119 |
\tl_gset:Nn \g_@@_font_style_libertinus_bfit_tl { bolditalic } |
| 3120 |
\tl_gset:Nn \g_@@_font_style_libertinus_bfsl_tl { bolditalic } |
| 3121 |
} |
| 3122 |
\fontspec_font_if_exist:nTF { XITS-Regular.otf } |
| 3123 |
{ |
| 3124 |
\tl_gset:Nn \g_@@_font_family_xits_tl { XITS } |
| 3125 |
\tl_gset:Nn \g_@@_font_style_xits_rm_tl { Regular } |
| 3126 |
\tl_gset:Nn \g_@@_font_style_xits_bf_tl { Bold } |
| 3127 |
\tl_gset:Nn \g_@@_font_style_xits_it_tl { Italic } |
| 3128 |
\tl_gset:Nn \g_@@_font_style_xits_bfit_tl { BoldItalic } |
| 3129 |
\tl_gset:Nn \g_@@_font_name_xits_math_rm_tl { XITSMath-Regular } |
| 3130 |
\tl_gset:Nn \g_@@_font_name_xits_math_bf_tl { XITSMath-Bold } |
| 3131 |
} |
| 3132 |
{ |
| 3133 |
\tl_gset:Nn \g_@@_font_family_xits_tl { xits } |
| 3134 |
\tl_gset:Nn \g_@@_font_style_xits_rm_tl { regular } |
| 3135 |
\tl_gset:Nn \g_@@_font_style_xits_bf_tl { bold } |
| 3136 |
\tl_gset:Nn \g_@@_font_style_xits_it_tl { italic } |
| 3137 |
\tl_gset:Nn \g_@@_font_style_xits_bfit_tl { bolditalic } |
| 3138 |
\tl_gset:Nn \g_@@_font_name_xits_math_rm_tl { xits-math } |
| 3139 |
\tl_gset:Nn \g_@@_font_name_xits_math_bf_tl { xits-mathbold } |
| 3140 |
} |
| 3141 |
\tl_gset:Nx \g_@@_font_name_libertinus_serif_tl |
| 3142 |
{ \g_@@_font_family_libertinus_serif_tl - \g_@@_font_style_libertinus_rm_tl } |
| 3143 |
\tl_gset:Nx \g_@@_font_name_libertinus_sans_tl |
| 3144 |
{ \g_@@_font_family_libertinus_sans_tl - \g_@@_font_style_libertinus_rm_tl } |
| 3145 |
\tl_gset:Nx \g_@@_font_name_libertinus_math_tl |
| 3146 |
{ \g_@@_font_family_libertinus_math_tl - \g_@@_font_style_libertinus_rm_tl } |
| 3147 |
\tl_gset:Nx \g_@@_font_name_xits_tl |
| 3148 |
{ \g_@@_font_family_xits_tl - \g_@@_font_style_xits_rm_tl } |
| 3149 |
% \end{macrocode} |
| 3150 |
% \end{macro} |
| 3151 |
% |
| 3152 |
% \changes{v2.16}{2026/05/16}{除XITS数学字体外的伪粗体设置。} |
| 3153 |
% \changes{v2.14}{2026/05/12}{用数据驱动模式处理字体。} |
| 3154 |
% |
| 3155 |
% \subsubsection{西文字体配置驱动数据列表} |
| 3156 |
% |
| 3157 |
% \begin{variable}{\c_@@_font_garamond_clist, |
| 3158 |
% \c_@@_font_libertinus_clist, |
| 3159 |
% \c_@@_font_lm_clist, |
| 3160 |
% \c_@@_font_palatino_clist, |
| 3161 |
% \c_@@_font_times_clist, |
| 3162 |
% \c_@@_font_times_star_clist} |
| 3163 |
% 西文字体配置数据列表。 |
| 3164 |
% \begin{description} |
| 3165 |
% \item[格式] |{|字体族|}{|字体名称|}{|选项|}| |
| 3166 |
% \item[字体族] main, sans, mono, math |
| 3167 |
% \end{description} |
| 3168 |
% EB Garamond系列 |
| 3169 |
% \begin{macrocode} |
| 3170 |
\clist_const:Nn \c_@@_font_garamond_clist |
| 3171 |
{ |
| 3172 |
{ main } { EBGaramond } |
| 3173 |
{ Extension = .otf, |
| 3174 |
UprightFont = *-Regular, |
| 3175 |
BoldFont = *-Bold, |
| 3176 |
ItalicFont = *-Italic, |
| 3177 |
BoldItalicFont = *-BoldItalic }, |
| 3178 |
{ sans } { \g_@@_font_family_libertinus_sans_tl } |
| 3179 |
{ Extension = .otf, |
| 3180 |
UprightFont = *-\g_@@_font_style_libertinus_rm_tl, |
| 3181 |
BoldFont = *-\g_@@_font_style_libertinus_bf_tl, |
| 3182 |
ItalicFont = *-\g_@@_font_style_libertinus_it_tl, |
| 3183 |
BoldItalicFont = *-\g_@@_font_style_libertinus_bfsl_tl }, |
| 3184 |
{ mono } { lmmonolt10 } |
| 3185 |
{ Extension = .otf, |
| 3186 |
UprightFont = *-regular, |
| 3187 |
BoldFont = *-bold, |
| 3188 |
ItalicFont = *-oblique, |
| 3189 |
BoldItalicFont = *-boldoblique }, |
| 3190 |
{ math } { Garamond-Math.otf } |
| 3191 |
{ BoldFont = Garamond-Math.otf, |
| 3192 |
BoldFeatures = { FakeBold = 1.6 } } |
| 3193 |
} |
| 3194 |
% \end{macrocode} |
| 3195 |
% Libertinus系列 |
| 3196 |
% \begin{macrocode} |
| 3197 |
\clist_const:Nn \c_@@_font_libertinus_clist |
| 3198 |
{ |
| 3199 |
{ main } { \g_@@_font_family_libertinus_serif_tl } |
| 3200 |
{ Extension = .otf, |
| 3201 |
UprightFont = *-\g_@@_font_style_libertinus_rm_tl, |
| 3202 |
BoldFont = *-\g_@@_font_style_libertinus_bf_tl, |
| 3203 |
ItalicFont = *-\g_@@_font_style_libertinus_it_tl, |
| 3204 |
BoldItalicFont = *-\g_@@_font_style_libertinus_bfit_tl }, |
| 3205 |
{ sans } { \g_@@_font_family_libertinus_sans_tl } |
| 3206 |
{ Extension = .otf, |
| 3207 |
UprightFont = *-\g_@@_font_style_libertinus_rm_tl, |
| 3208 |
BoldFont = *-\g_@@_font_style_libertinus_bf_tl, |
| 3209 |
ItalicFont = *-\g_@@_font_style_libertinus_it_tl, |
| 3210 |
BoldItalicFont = *-\g_@@_font_style_libertinus_bfsl_tl }, |
| 3211 |
{ mono } { lmmonolt10 } |
| 3212 |
{ Extension = .otf, |
| 3213 |
UprightFont = *-regular, |
| 3214 |
BoldFont = *-bold, |
| 3215 |
ItalicFont = *-oblique, |
| 3216 |
BoldItalicFont = *-boldoblique }, |
| 3217 |
{ math } { \g_@@_font_name_libertinus_math_tl .otf } |
| 3218 |
{ BoldFont = \g_@@_font_name_libertinus_math_tl .otf, |
| 3219 |
BoldFeatures = { FakeBold = 1.6 } } |
| 3220 |
} |
| 3221 |
% \end{macrocode} |
| 3222 |
% Latin Modern 系列。在 \XeLaTeX{} 和 \LuaLaTeX{} 中已作为默认字体,所以仅需 |
| 3223 |
% 额外处理数学部分。 |
| 3224 |
% \begin{macrocode} |
| 3225 |
\clist_const:Nn \c_@@_font_lm_clist |
| 3226 |
{ |
| 3227 |
{ math } { latinmodern-math.otf } |
| 3228 |
{BoldFont = latinmodern-math.otf, |
| 3229 |
BoldFeatures = { RawFeature = { embolden = 3 } }, |
| 3230 |
BoldItalicFont = latinmodern-math.otf, |
| 3231 |
BoldItalicFeatures = { RawFeature = { embolden = 3 } }} |
| 3232 |
} |
| 3233 |
% \end{macrocode} |
| 3234 |
% Palatino 系列。 |
| 3235 |
% \begin{macrocode} |
| 3236 |
\clist_const:Nn \c_@@_font_palatino_clist |
| 3237 |
{ |
| 3238 |
{ main } { texgyrepagella } |
| 3239 |
{ Extension = .otf, |
| 3240 |
UprightFont = *-regular, |
| 3241 |
BoldFont = *-bold, |
| 3242 |
ItalicFont = *-italic, |
| 3243 |
BoldItalicFont = *-bolditalic }, |
| 3244 |
{ sans } { \g_@@_font_family_libertinus_sans_tl } |
| 3245 |
{ Extension = .otf, |
| 3246 |
UprightFont = *-\g_@@_font_style_libertinus_rm_tl, |
| 3247 |
BoldFont = *-\g_@@_font_style_libertinus_bf_tl, |
| 3248 |
ItalicFont = *-\g_@@_font_style_libertinus_it_tl, |
| 3249 |
BoldItalicFont = *-\g_@@_font_style_libertinus_bfsl_tl, |
| 3250 |
Scale = MatchUppercase }, |
| 3251 |
{ mono } { lmmonolt10 } |
| 3252 |
{ Extension = .otf, |
| 3253 |
UprightFont = *-regular, |
| 3254 |
BoldFont = *-bold, |
| 3255 |
ItalicFont = *-oblique, |
| 3256 |
BoldItalicFont = *-boldoblique }, |
| 3257 |
{ math } { texgyrepagella-math.otf } |
| 3258 |
{ BoldFont = texgyrepagella-math.otf, |
| 3259 |
BoldFeatures = { FakeBold = 1.6 } } |
| 3260 |
} |
| 3261 |
% \end{macrocode} |
| 3262 |
% Times 系列。 |
| 3263 |
% \begin{macrocode} |
| 3264 |
\clist_const:Nn \c_@@_font_times_clist |
| 3265 |
{ |
| 3266 |
{ main } { \g_@@_font_family_xits_tl } |
| 3267 |
{ Extension = .otf, |
| 3268 |
UprightFont = *-\g_@@_font_style_xits_rm_tl, |
| 3269 |
BoldFont = *-\g_@@_font_style_xits_bf_tl, |
| 3270 |
ItalicFont = *-\g_@@_font_style_xits_it_tl, |
| 3271 |
BoldItalicFont = *-\g_@@_font_style_xits_bfit_tl }, |
| 3272 |
{ sans } { texgyreheros } |
| 3273 |
{ Extension = .otf, |
| 3274 |
UprightFont = *-regular, |
| 3275 |
BoldFont = *-bold, |
| 3276 |
ItalicFont = *-italic, |
| 3277 |
BoldItalicFont = *-bolditalic }, |
| 3278 |
{ mono } { texgyrecursor } |
| 3279 |
{ Extension = .otf, |
| 3280 |
UprightFont = *-regular, |
| 3281 |
BoldFont = *-bold, |
| 3282 |
ItalicFont = *-italic, |
| 3283 |
BoldItalicFont = *-bolditalic, |
| 3284 |
Ligatures = CommonOff }, |
| 3285 |
{ math } { \g_@@_font_name_xits_math_rm_tl .otf } |
| 3286 |
{ BoldFont = \g_@@_font_name_xits_math_bf_tl .otf } |
| 3287 |
} |
| 3288 |
% \end{macrocode} |
| 3289 |
% Times* 系列,除数学部分外采用系统字体。。 |
| 3290 |
% \begin{macrocode} |
| 3291 |
\clist_const:Nn \c_@@_font_times_asterisk_clist |
| 3292 |
{ |
| 3293 |
{ main } { Times~ New~ Roman } { }, |
| 3294 |
{ sans } { Arial } { }, |
| 3295 |
{ mono } { Courier~ New } { }, |
| 3296 |
{ math } { \g_@@_font_name_xits_math_rm_tl .otf } |
| 3297 |
{ BoldFont = \g_@@_font_name_xits_math_bf_tl .otf } |
| 3298 |
} |
| 3299 |
% \end{macrocode} |
| 3300 |
% \end{variable} |
| 3301 |
% |
| 3302 |
% \subsubsection{西文字体加载函数} |
| 3303 |
% |
| 3304 |
% \begin{macro}{\@@_load_font_by_family:nn, |
| 3305 |
% \@@_load_font_by_family:nnn, |
| 3306 |
% \@@_load_fontset:n} |
| 3307 |
% 西文字体通用加载函数 |
| 3308 |
% \begin{macrocode} |
| 3309 |
\cs_new_protected:Npn \@@_load_font_by_family:nn #1#2 |
| 3310 |
{ |
| 3311 |
\str_case:nnF {#1} |
| 3312 |
{ |
| 3313 |
{ main } { \@@_setmainfont:xx {#2} { \l_@@_tmpa_tl } } |
| 3314 |
{ sans } { \@@_setsansfont:xx {#2} { \l_@@_tmpa_tl } } |
| 3315 |
{ mono } { \@@_setmonofont:xx {#2} { \l_@@_tmpa_tl } } |
| 3316 |
{ math } { \@@_setmathfont:xx {#2} { \l_@@_tmpa_tl } } |
| 3317 |
} |
| 3318 |
{ \msg_error:nnn { nwafuthesis } { unknown-font-family } {#1} } |
| 3319 |
} |
| 3320 |
\cs_new_protected:Npn \@@_load_font_by_family:nnn #1#2#3 |
| 3321 |
{ |
| 3322 |
\tl_set:Nx \l_@@_tmpa_tl { #3 } |
| 3323 |
\@@_load_font_by_family:nn { #1 } { #2 } |
| 3324 |
} |
| 3325 |
% \end{macrocode} |
| 3326 |
% 定义报错信息 |
| 3327 |
% \begin{macrocode} |
| 3328 |
\msg_new:nnn { nwafuthesis } { unknown-font-family } |
| 3329 |
{ Unknown~ font~ family~ "#1". } |
| 3330 |
% \end{macrocode} |
| 3331 |
% 批量加载字体 |
| 3332 |
% \begin{macrocode} |
| 3333 |
\cs_new_protected:Npn \@@_load_fontset:n #1 |
| 3334 |
{ |
| 3335 |
\clist_map_inline:cn { c_@@_font_ #1 _clist } |
| 3336 |
{ |
| 3337 |
\@@_load_font_by_family:nnn ##1 |
| 3338 |
} |
| 3339 |
} |
| 3340 |
% \end{macrocode} |
| 3341 |
% 函数变体 |
| 3342 |
% \begin{macrocode} |
| 3343 |
\cs_generate_variant:Nn \@@_load_fontset:n { V } |
| 3344 |
% \end{macrocode} |
| 3345 |
% \end{macro} |
| 3346 |
% |
| 3347 |
% \subsubsection{中文字体驱动数据列表} |
| 3348 |
% |
| 3349 |
% \begin{variable}{\c_@@_cjk_font_adobe_clist, |
| 3350 |
% \c_@@_cjk_font_fandol_clist, |
| 3351 |
% \c_@@_cjk_font_founder_clist, |
| 3352 |
% \c_@@_cjk_font_mac_clist, |
| 3353 |
% \c_@@_cjk_font_sinotype_clist, |
| 3354 |
% \c_@@_cjk_font_sourcehan_clist, |
| 3355 |
% \c_@@_cjk_font_windows_clist} |
| 3356 |
% 中文字体配置数据列表。 |
| 3357 |
% \begin{description} |
| 3358 |
% \item[格式] |{|字体族|}{|字体名称|}{|选项|}| |
| 3359 |
% \item[字体族] main, sans, mono, hei, kai |
| 3360 |
% \end{description} |
| 3361 |
% Adobe 字库 |
| 3362 |
% \begin{macrocode} |
| 3363 |
\clist_const:Nn \c_@@_cjk_font_adobe_clist |
| 3364 |
{ |
| 3365 |
{ main } { AdobeSongStd-Light } { }, |
| 3366 |
{ sans } { AdobeHeitiStd-Regular } { }, |
| 3367 |
{ mono } { AdobeFangsongStd-Regular } { }, |
| 3368 |
{ hei } { AdobeHeitiStd-Regular } { }, |
| 3369 |
{ kai } { AdobeKaitiStd-Regular } { } |
| 3370 |
} |
| 3371 |
% \end{macrocode} |
| 3372 |
% Fandol 字库。注意它是安装在 \TeX{} 发行版中的,所以使用文件名调用。 |
| 3373 |
% \begin{macrocode} |
| 3374 |
\clist_const:Nn \c_@@_cjk_font_fandol_clist |
| 3375 |
{ |
| 3376 |
{ main } { FandolSong } |
| 3377 |
{ Extension = .otf, |
| 3378 |
UprightFont = *-Regular, |
| 3379 |
BoldFont = *-Bold, |
| 3380 |
ItalicFont = *-Regular, |
| 3381 |
BoldItalicFont = *-Bold }, |
| 3382 |
{ sans } { FandolHei } |
| 3383 |
{ Extension = .otf, |
| 3384 |
UprightFont = *-Regular, |
| 3385 |
BoldFont = *-Bold, |
| 3386 |
ItalicFont = *-Regular, |
| 3387 |
BoldItalicFont = *-Bold }, |
| 3388 |
{ mono } { FandolFang } |
| 3389 |
{ Extension = .otf, |
| 3390 |
UprightFont = *-Regular, |
| 3391 |
BoldFont = *-Regular, |
| 3392 |
ItalicFont = *-Regular, |
| 3393 |
BoldItalicFont = *-Regular }, |
| 3394 |
{ hei } { FandolHei } |
| 3395 |
{ Extension = .otf, |
| 3396 |
UprightFont = *-Regular, |
| 3397 |
BoldFont = *-Bold, |
| 3398 |
ItalicFont = *-Regular, |
| 3399 |
BoldItalicFont = *-Bold }, |
| 3400 |
{ kai } { FandolKai } |
| 3401 |
{ Extension = .otf, |
| 3402 |
UprightFont = *-Regular, |
| 3403 |
BoldFont = *-Regular, |
| 3404 |
ItalicFont = *-Regular, |
| 3405 |
BoldItalicFont = *-Regular } |
| 3406 |
} |
| 3407 |
% \end{macrocode} |
| 3408 |
% 方正字库。虽然有粗体(方正小标宋)等,但并非免费,故这里不做处理。 |
| 3409 |
% \begin{macrocode} |
| 3410 |
\clist_const:Nn \c_@@_cjk_font_founder_clist |
| 3411 |
{ |
| 3412 |
{ main } { FZShuSong-Z01 } { }, |
| 3413 |
{ sans } { FZHei-B01 } { }, |
| 3414 |
{ mono } { FZFangSong-Z02 } { }, |
| 3415 |
{ hei } { FZHei-B01 } { }, |
| 3416 |
{ kai } { FZKai-Z03 } { } |
| 3417 |
} |
| 3418 |
% \end{macrocode} |
| 3419 |
% macOS 自带中文字体。 |
| 3420 |
% \begin{macrocode} |
| 3421 |
\clist_const:Nn \c_@@_cjk_font_mac_clist |
| 3422 |
{ |
| 3423 |
{ main } { STSongti-SC } |
| 3424 |
{ UprightFont = *-Light, |
| 3425 |
BoldFont = *-Bold, |
| 3426 |
ItalicFont = *-Light, |
| 3427 |
BoldItalicFont = *-Bold }, |
| 3428 |
{ sans } { STHeitiSC } |
| 3429 |
{ UprightFont = *-Medium, |
| 3430 |
BoldFont = *-Medium, |
| 3431 |
ItalicFont = *-Medium, |
| 3432 |
BoldItalicFont = *-Medium }, |
| 3433 |
{ mono } { STFangsong } { }, |
| 3434 |
{ hei } { STHeitiSC } |
| 3435 |
{ UprightFont = *-Medium, |
| 3436 |
BoldFont = *-Medium, |
| 3437 |
ItalicFont = *-Medium, |
| 3438 |
BoldItalicFont = *-Medium }, |
| 3439 |
{ kai } { STKaitiSC } |
| 3440 |
{ UprightFont = *-Regular, |
| 3441 |
BoldFont = *-Bold, |
| 3442 |
ItalicFont = *-Regular, |
| 3443 |
BoldItalicFont = *-Bold } |
| 3444 |
} |
| 3445 |
% \end{macrocode} |
| 3446 |
% 华文字库。 |
| 3447 |
% \begin{macrocode} |
| 3448 |
\clist_const:Nn \c_@@_cjk_font_sinotype_clist |
| 3449 |
{ |
| 3450 |
{ main } { STSong } { }, |
| 3451 |
{ sans } { STHeiti } { }, |
| 3452 |
{ mono } { STFangsong } { }, |
| 3453 |
{ hei } { STHeiti } { }, |
| 3454 |
{ kai } { STKaiti } { } |
| 3455 |
} |
| 3456 |
% \end{macrocode} |
| 3457 |
% 思源宋体、思源黑体。由于没有对应的楷体和仿宋,这里直接给出警告。 |
| 3458 |
% \begin{macrocode} |
| 3459 |
\clist_const:Nn \c_@@_cjk_font_sourcehan_clist |
| 3460 |
{ |
| 3461 |
{ main } { Source~ Han~ Serif~ SC } |
| 3462 |
{ UprightFont = *-Regular, |
| 3463 |
BoldFont = *-Bold, |
| 3464 |
ItalicFont = *-Regular, |
| 3465 |
BoldItalicFont = *-Bold }, |
| 3466 |
{ sans } { Source~ Han~ Sans~ SC } |
| 3467 |
{ UprightFont = *-Regular, |
| 3468 |
BoldFont = *-Bold, |
| 3469 |
ItalicFont = *-Regular, |
| 3470 |
BoldItalicFont = *-Bold } |
| 3471 |
} |
| 3472 |
% \end{macrocode} |
| 3473 |
% Windows 自带中文字体。 |
| 3474 |
% \begin{macrocode} |
| 3475 |
\clist_const:Nn \c_@@_cjk_font_windows_clist |
| 3476 |
{ |
| 3477 |
{ main } { SimSun } { }, |
| 3478 |
{ sans } { SimHei } { }, |
| 3479 |
{ mono } { FangSong } { }, |
| 3480 |
{ hei } { SimHei } { }, |
| 3481 |
{ kai } { KaiTi } { } |
| 3482 |
} |
| 3483 |
% \end{macrocode} |
| 3484 |
% \end{variable} |
| 3485 |
% |
| 3486 |
% \subsubsection{中文字体加载函数} |
| 3487 |
% |
| 3488 |
% \begin{macro}{\@@_load_cjk_font_by_family:nn, |
| 3489 |
% \@@_load_cjk_font_by_family:nnn, |
| 3490 |
% \@@_load_cjk_fontset:n} |
| 3491 |
% 中文字体通用加载函数 |
| 3492 |
% \begin{macrocode} |
| 3493 |
\cs_new_protected:Npn \@@_load_cjk_font_by_family:nn #1#2 |
| 3494 |
{ |
| 3495 |
\str_case:nnF {#1} |
| 3496 |
{ |
| 3497 |
{ main } { \@@_setCJKmainfont:xx {#2} { \@@_cjk_font_options: } } |
| 3498 |
{ sans } { \@@_setCJKsansfont:xx {#2} { \@@_cjk_font_hei_options: } } |
| 3499 |
{ mono } { \@@_setCJKmonofont:xx {#2} { \@@_cjk_font_options: } } |
| 3500 |
{ hei } { \@@_set_cjk_font_hei:xx {#2} { \@@_cjk_font_hei_options: } } |
| 3501 |
{ kai } { \@@_set_cjk_font_kai:xx {#2} { \@@_cjk_font_options: } } |
| 3502 |
} |
| 3503 |
{ \msg_error:nnn { nwafuthesis } { unknown-cjk-family } {#1} } |
| 3504 |
} |
| 3505 |
\cs_new_protected:Npn \@@_load_cjk_font_by_family:nnn #1#2#3 |
| 3506 |
{ |
| 3507 |
\@@_load_cjk_font_by_family:nn { #1 } { #2 } |
| 3508 |
} |
| 3509 |
% \end{macrocode} |
| 3510 |
% 定义报错信息 |
| 3511 |
% \begin{macrocode} |
| 3512 |
\msg_new:nnn { nwafuthesis } { unknown-cjk-family } |
| 3513 |
{ Unknown~ CJK~ font~ family~ "#1". } |
| 3514 |
% \end{macrocode} |
| 3515 |
% 批量加载字体 |
| 3516 |
% \begin{macrocode} |
| 3517 |
\cs_new_protected:Npn \@@_load_cjk_fontset:n #1 |
| 3518 |
{ |
| 3519 |
\clist_map_inline:cn { c_@@_cjk_font_ #1 _clist } |
| 3520 |
{ |
| 3521 |
\@@_load_cjk_font_by_family:nnn ##1 |
| 3522 |
} |
| 3523 |
\str_if_eq:nnT {#1} { sourcehan } |
| 3524 |
{ \@@_warning:n { source-han } } |
| 3525 |
} |
| 3526 |
% \end{macrocode} |
| 3527 |
% 函数变体 |
| 3528 |
% \begin{macrocode} |
| 3529 |
\cs_generate_variant:Nn \@@_load_cjk_fontset:n { V } |
| 3530 |
% \end{macrocode} |
| 3531 |
% \end{macro} |
| 3532 |
% |
| 3533 |
% \subsubsection{字体环境检查与加载} |
| 3534 |
% |
| 3535 |
% 探测操作系统,以设置中英文字体。 |
| 3536 |
% \begin{macrocode} |
| 3537 |
\tl_new:N \l_@@_font_tl |
| 3538 |
\tl_new:N \l_@@_cjkfont_tl |
| 3539 |
\cs_new_protected:Npn \@@_detect_platform: |
| 3540 |
{ |
| 3541 |
\sys_if_platform_windows:TF |
| 3542 |
{ |
| 3543 |
\tl_set:Nn \l_@@_cjkfont_tl { windows } |
| 3544 |
\tl_set:Nn \l_@@_font_tl { times* } |
| 3545 |
} |
| 3546 |
{ |
| 3547 |
\@@_if_platform_macos:TF |
| 3548 |
{ |
| 3549 |
\tl_set:Nn \l_@@_cjkfont_tl { mac } |
| 3550 |
\tl_set:Nn \l_@@_font_tl { times* } |
| 3551 |
}{ |
| 3552 |
\tl_set:Nn \l_@@_cjkfont_tl { fandol } |
| 3553 |
\tl_set:Nn \l_@@_font_tl { times } |
| 3554 |
} |
| 3555 |
} |
| 3556 |
} |
| 3557 |
\cs_new_protected:Npn \@@_if_platform_macos:TF |
| 3558 |
{ \file_if_exist:nTF { /System/Library/Fonts/Menlo.ttc } } |
| 3559 |
% \end{macrocode} |
| 3560 |
% |
| 3561 |
% \begin{macro}{\@@_load_font:} |
| 3562 |
% 字体加载命令。 |
| 3563 |
% \begin{macrocode} |
| 3564 |
\cs_new_protected:Npn \@@_load_font: |
| 3565 |
{ |
| 3566 |
% \end{macrocode} |
| 3567 |
% 如果用户未指定西文字体,则根据操作系统自动选择 |
| 3568 |
% \begin{macrocode} |
| 3569 |
\tl_if_empty:NT \g_@@_fontset_tl |
| 3570 |
{ |
| 3571 |
\@@_detect_platform: |
| 3572 |
\tl_gset_eq:NN \g_@@_fontset_tl \l_@@_font_tl |
| 3573 |
} |
| 3574 |
% \end{macrocode} |
| 3575 |
% 如果用户未指定中文字体,则根据操作系统自动选择 |
| 3576 |
% \begin{macrocode} |
| 3577 |
\tl_if_empty:NT \g_@@_cjk_fontset_tl |
| 3578 |
{ |
| 3579 |
\@@_detect_platform: |
| 3580 |
\tl_gset_eq:NN \g_@@_cjk_fontset_tl \l_@@_cjkfont_tl |
| 3581 |
} |
| 3582 |
\tl_set_eq:NN \l_@@_tmpa_tl { \g_@@_fontset_tl } |
| 3583 |
% \end{macrocode} |
| 3584 |
% none 表示用户自行配置,跳过 |
| 3585 |
% \begin{macrocode} |
| 3586 |
\tl_if_eq:VnTF \l_@@_tmpa_tl { none } |
| 3587 |
{ } |
| 3588 |
{ |
| 3589 |
% \end{macrocode} |
| 3590 |
% |
| 3591 |
% \changes{v2.15}{2026/05/15}{修复asterisk未加下划线造成编译错误问题。} |
| 3592 |
% |
| 3593 |
% 处理 times* 中的星号(转换为 times_asterisk) |
| 3594 |
% \begin{macrocode} |
| 3595 |
\tl_replace_all:Nnn \l_@@_tmpa_tl { * } { _asterisk } |
| 3596 |
% \end{macrocode} |
| 3597 |
% 加载西文字体 |
| 3598 |
% \begin{macrocode} |
| 3599 |
\@@_load_fontset:V \l_@@_tmpa_tl |
| 3600 |
} |
| 3601 |
\tl_set_eq:NN \l_@@_tmpa_tl \g_@@_cjk_fontset_tl |
| 3602 |
% \end{macrocode} |
| 3603 |
% none 表示用户自行配置,跳过 |
| 3604 |
% \begin{macrocode} |
| 3605 |
\tl_if_eq:VnTF \l_@@_tmpa_tl { none } |
| 3606 |
{ } % none 表示用户自行配置,跳过 |
| 3607 |
{ |
| 3608 |
% \end{macrocode} |
| 3609 |
% 加载中文字体 |
| 3610 |
% \begin{macrocode} |
| 3611 |
\@@_load_cjk_fontset:n { \g_@@_cjk_fontset_tl } |
| 3612 |
} |
| 3613 |
} |
| 3614 |
\ctex_at_end_preamble:n { \@@_load_font: } |
| 3615 |
% \end{macrocode} |
| 3616 |
% \end{macro} |
| 3617 |
% |
| 3618 |
% \subsubsection{数学字体设置} |
| 3619 |
% |
| 3620 |
% 根据 GB 3102.11--93 以及 ISO 80000-2:2009 的规定,数学表达式中 |
| 3621 |
% 表示变量的拉丁字母和希腊字母均应当使用斜体。 |
| 3622 |
% 这里的 |\keys_set:nn{unicode-math}| 实际相当于 \cs{unimathsetup}。 |
| 3623 |
% \begin{macrocode} |
| 3624 |
\keys_set:nn { unicode-math } |
| 3625 |
{ |
| 3626 |
math-style = ISO, |
| 3627 |
bold-style = ISO, |
| 3628 |
% mathrm = sym |
| 3629 |
} |
| 3630 |
% \end{macrocode} |
| 3631 |
% |
| 3632 |
% \subsubsection{字号} |
| 3633 |
% |
| 3634 |
% \begin{macrocode} |
| 3635 |
\keys_define:nn { nwafu / style } |
| 3636 |
{ |
| 3637 |
% \end{macrocode} |
| 3638 |
% |
| 3639 |
% \begin{macro}{style/font-size} |
| 3640 |
% |font-size| 不是文档类选项,不能传给 \cls{ctexbook} 文档类,因此 |
| 3641 |
% 只能手动重定义字号命令。 |
| 3642 |
% \begin{macrocode} |
| 3643 |
font-size .choice:, |
| 3644 |
font-size .value_required:n = true, |
| 3645 |
font-size / -4 .code:n = { }, |
| 3646 |
% \end{macrocode} |
| 3647 |
% \end{macro} |
| 3648 |
% |
| 3649 |
% \begin{macro}{\tiny,\scriptsize,\footnotesize,\small, |
| 3650 |
% \normalsize,\large,\Large,\LARGE,\huge,\Huge} |
| 3651 |
% 默认使用小四号字,所以只有五号字需要重新设置。 |
| 3652 |
% \begin{macrocode} |
| 3653 |
font-size / 5 .code:n = |
| 3654 |
{ |
| 3655 |
\RenewDocumentCommand \tiny { } { \zihao { 7 } } |
| 3656 |
\RenewDocumentCommand \scriptsize { } { \zihao { -6 } } |
| 3657 |
\RenewDocumentCommand \footnotesize { } { \zihao { 6 } } |
| 3658 |
\RenewDocumentCommand \small { } { \zihao { -5 } } |
| 3659 |
\RenewDocumentCommand \normalsize { } { \zihao { 5 } } |
| 3660 |
\RenewDocumentCommand \large { } { \zihao { -4 } } |
| 3661 |
\RenewDocumentCommand \Large { } { \zihao { -3 } } |
| 3662 |
\RenewDocumentCommand \LARGE { } { \zihao { -2 } } |
| 3663 |
\RenewDocumentCommand \huge { } { \zihao { 2 } } |
| 3664 |
\RenewDocumentCommand \Huge { } { \zihao { 1 } } |
| 3665 |
}, |
| 3666 |
% \end{macrocode} |
| 3667 |
% \end{macro} |
| 3668 |
% |
| 3669 |
% \subsubsection{其它设置} |
| 3670 |
% |
| 3671 |
% \begin{macro}{style/fullwidth-stop} |
| 3672 |
% 设置句号形状(圆圈或是圆点)。 |
| 3673 |
% \begin{macrocode} |
| 3674 |
fullwidth-stop .choice:, |
| 3675 |
fullwidth-stop .value_required:n = true, |
| 3676 |
% \end{macrocode} |
| 3677 |
% 利用类别码机制切换,只有显式的\FSID 会被替换。 |
| 3678 |
% \begin{macrocode} |
| 3679 |
fullwidth-stop / catcode .code:n = |
| 3680 |
{ \@@_set_fullwidth_stop_catcode: }, |
| 3681 |
% \end{macrocode} |
| 3682 |
% 利用 TECKit 映射机制切换,相当于设置了 \tn{defaultCJKfontfeatures} |
| 3683 |
% |{|\kvopt{Map\-ping}{fullwidth-stop}|}|。这种手段会替换所有出现的\FSID, |
| 3684 |
% 并且将影响所有字体。只在 \XeTeX{} 下可用。 |
| 3685 |
% \begin{macrocode} |
| 3686 |
fullwidth-stop / mapping .code:n = |
| 3687 |
{ |
| 3688 |
\sys_if_engine_xetex:TF |
| 3689 |
{ |
| 3690 |
\clist_gset:Nn \g__xeCJK_default_features_clist |
| 3691 |
{ Mapping = fullwidth-stop } |
| 3692 |
} |
| 3693 |
{ |
| 3694 |
% \end{macrocode} |
| 3695 |
% \LuaTeX{} 下改用类别码机制代替,并给出警告。 |
| 3696 |
% \begin{macrocode} |
| 3697 |
\sys_if_engine_luatex:T |
| 3698 |
{ |
| 3699 |
\@@_warning:n { mapping-not-available } |
| 3700 |
\@@_set_fullwidth_stop_catcode: |
| 3701 |
} |
| 3702 |
} |
| 3703 |
}, |
| 3704 |
fullwidth-stop / false .code:n = { } |
| 3705 |
} |
| 3706 |
% \end{macrocode} |
| 3707 |
% \end{macro} |
| 3708 |
% |
| 3709 |
% 提示信息。 |
| 3710 |
% \begin{macrocode} |
| 3711 |
\@@_msg_new:nn { mapping-not-available } |
| 3712 |
{ |
| 3713 |
Option~ "fullwidth-stop = mapping"~ is~ not~ available~ in~ LuaTeX. \\ |
| 3714 |
"fullwidth-stop = catcode"~ will~ be~ set~ instead. |
| 3715 |
} |
| 3716 |
% \end{macrocode} |
| 3717 |
% |
| 3718 |
% \begin{macro}{\@@_set_fullwidth_stop_catcode:} |
| 3719 |
% 将\FSID 设置为活动符,并定义为句点\FSFW。 |
| 3720 |
% \begin{macrocode} |
| 3721 |
\cs_new:Npn \@@_set_fullwidth_stop_catcode: |
| 3722 |
{ |
| 3723 |
\char_set_active_eq:NN ^^^^3002 \c_@@_fwid_full_stop_tl |
| 3724 |
\char_set_catcode_active:N ^^^^3002 |
| 3725 |
\clist_map_inline:nn |
| 3726 |
{ \c_@@_orig_decl_text_tl, \c_@@_auth_decl_text_tl } |
| 3727 |
{ \tl_set_rescan:Nno ##1 { } {##1} } |
| 3728 |
} |
| 3729 |
% \end{macrocode} |
| 3730 |
% \end{macro} |
| 3731 |
% |
| 3732 |
% \changes{v1.10}{2022/03/17}{允许 \tn{emph} 对中文生效。} |
| 3733 |
% |
| 3734 |
% 声明 \tn{emph} 样式序列,使得中文强调以楷体显示。 |
| 3735 |
% \begin{macrocode} |
| 3736 |
\DeclareEmphSequence |
| 3737 |
{ |
| 3738 |
\bfseries, |
| 3739 |
\upshape \CJKfamily { \CJKfamilydefault }, |
| 3740 |
} |
| 3741 |
% \end{macrocode} |
| 3742 |
% |
| 3743 |
% \changes{v1.25}{2023/04/18}{添加盲审判断变量。} |
| 3744 |
% |
| 3745 |
% \subsection{是否盲审选项} |
| 3746 |
% |
| 3747 |
% \begin{macro}{anonymous} |
| 3748 |
% 设置是否为盲审论文输出。 |
| 3749 |
% \begin{macrocode} |
| 3750 |
\keys_define:nn { nwafu / style } |
| 3751 |
{ |
| 3752 |
anonymous .bool_gset:N = \g_@@_anonymous_bool, |
| 3753 |
anonymous .default:n = true, |
| 3754 |
anonymous .initial:n = false, |
| 3755 |
} |
| 3756 |
% \end{macrocode} |
| 3757 |
% \end{macro} |
| 3758 |
% |
| 3759 |
% \subsection{页眉页脚} |
| 3760 |
% |
| 3761 |
% 清除默认页眉页脚格式。 |
| 3762 |
% \begin{macrocode} |
| 3763 |
\fancyhf { } |
| 3764 |
% \end{macrocode} |
| 3765 |
% |
| 3766 |
% \begin{macro}{\@@_university_name:} |
| 3767 |
% 获取学校名称函数(考虑盲审) |
| 3768 |
% \begin{macrocode} |
| 3769 |
\cs_new:Npn \@@_university_name: |
| 3770 |
{ |
| 3771 |
\bool_if:NTF \g_@@_anonymous_bool |
| 3772 |
{ **************** } |
| 3773 |
{ \@@_name_simp: } |
| 3774 |
} |
| 3775 |
% \end{macrocode} |
| 3776 |
% \end{macro} |
| 3777 |
% |
| 3778 |
% \begin{macro}{\@@_thesis_type_name:} |
| 3779 |
% 获取论文类型名称(本科区分论文/设计) |
| 3780 |
% \begin{macrocode} |
| 3781 |
\cs_new:Npn \@@_thesis_type_name: |
| 3782 |
{ |
| 3783 |
\clist_item:Nn \c_@@_thesis_type_clist { \g_@@_thesis_type_int } |
| 3784 |
\int_compare:nNnT { \g_@@_thesis_type_int } = { 3 } |
| 3785 |
{ \clist_item:Nn \c_@@_bachelor_type_clist { \l_@@_info_bachelor_type_int } } |
| 3786 |
} |
| 3787 |
% \end{macrocode} |
| 3788 |
% \end{macro} |
| 3789 |
% |
| 3790 |
% \begin{macro}{\@@_header_odd:} |
| 3791 |
% 奇数页页眉(章标题) |
| 3792 |
% \begin{macrocode} |
| 3793 |
\cs_new:Npn \@@_header_odd: |
| 3794 |
{ \small \nouppercase { \leftmark } } |
| 3795 |
% \end{macrocode} |
| 3796 |
% \end{macro} |
| 3797 |
% |
| 3798 |
% \begin{macro}{\@@_header_even:} |
| 3799 |
% 偶数页页眉(学校+论文类型) |
| 3800 |
% \begin{macrocode} |
| 3801 |
\cs_new:Npn \@@_header_even: |
| 3802 |
{ |
| 3803 |
\small \nouppercase |
| 3804 |
{ |
| 3805 |
\@@_university_name: |
| 3806 |
\@@_thesis_type_name: |
| 3807 |
} |
| 3808 |
} |
| 3809 |
% \end{macrocode} |
| 3810 |
% \end{macro} |
| 3811 |
% |
| 3812 |
% \begin{macro}{\@@_header_center:} |
| 3813 |
% 单面模式中间页眉 |
| 3814 |
% \begin{macrocode} |
| 3815 |
\cs_new:Npn \@@_header_center: |
| 3816 |
{ \small \nouppercase { \g_@@_header_center_mark_tl } } |
| 3817 |
% \end{macrocode} |
| 3818 |
% \end{macro} |
| 3819 |
% |
| 3820 |
% \begin{macro}{\@@_footer_page:} |
| 3821 |
% 页脚页码 |
| 3822 |
% \begin{macrocode} |
| 3823 |
\cs_new:Npn \@@_footer_page: { \small \thepage } |
| 3824 |
% \end{macrocode} |
| 3825 |
% \end{macro} |
| 3826 |
% |
| 3827 |
% \begin{macro}{\@@_set_headrule_front:,\@@_set_headrule_main:} |
| 3828 |
% 设置页面横线粗细(正文前/正文后) |
| 3829 |
% \begin{macrocode} |
| 3830 |
\cs_new_protected:Npn \@@_set_headrule_front: |
| 3831 |
{ \RenewDocumentCommand \headrulewidth { } { 0.75 pt } } |
| 3832 |
\cs_new_protected:Npn \@@_set_headrule_main: |
| 3833 |
{ \RenewDocumentCommand \headrulewidth { } { 0.75 pt } } |
| 3834 |
% \end{macrocode} |
| 3835 |
% \end{macro} |
| 3836 |
% |
| 3837 |
% \begin{macro}{\@@_set_header_footer_twoside:} |
| 3838 |
% 统一页眉页脚设置(双面模式) |
| 3839 |
% \begin{macrocode} |
| 3840 |
\cs_new_protected:Npn \@@_set_header_footer_twoside: |
| 3841 |
{ |
| 3842 |
\nwafuhead[OC] { \@@_header_odd: } |
| 3843 |
\nwafuhead[EC] { \@@_header_even: } |
| 3844 |
\nwafufoot[C] { \@@_footer_page: } |
| 3845 |
} |
| 3846 |
% \end{macrocode} |
| 3847 |
% \end{macro} |
| 3848 |
% |
| 3849 |
% \begin{macro}{\@@_set_header_footer_oneside:} |
| 3850 |
% 统一页眉页脚设置(单面模式) |
| 3851 |
% \begin{macrocode} |
| 3852 |
\cs_new_protected:Npn \@@_set_header_footer_oneside: |
| 3853 |
{ |
| 3854 |
\nwafuhead[C] { \@@_header_center: } |
| 3855 |
\nwafufoot[C] { \@@_footer_page: } |
| 3856 |
} |
| 3857 |
% \end{macrocode} |
| 3858 |
% \end{macro} |
| 3859 |
% |
| 3860 |
% \begin{macro}{\@@_apply_header_footer:} |
| 3861 |
% 根据当前模式自动选择页眉页脚设置 |
| 3862 |
% \begin{macrocode} |
| 3863 |
\cs_new_protected:Npn \@@_apply_header_footer: |
| 3864 |
{ |
| 3865 |
\bool_if:NTF \g_@@_twoside_bool |
| 3866 |
{ \@@_set_header_footer_twoside: } |
| 3867 |
{ \@@_set_header_footer_oneside: } |
| 3868 |
} |
| 3869 |
% \end{macrocode} |
| 3870 |
% \end{macro} |
| 3871 |
% |
| 3872 |
% \begin{variable}{\g_@@_header_center_mark_tl} |
| 3873 |
% 用于保存中间页眉文字的变量。正文中将其设置为空,目录、摘要、 |
| 3874 |
% 插图与附表清单、符号表、术语表、 |
| 3875 |
% 参考文献、附录、致谢、个人简历等设置为相应标题文字。 |
| 3876 |
% \begin{macrocode} |
| 3877 |
\tl_new:N \g_@@_header_center_mark_tl |
| 3878 |
% \end{macrocode} |
| 3879 |
% \end{variable} |
| 3880 |
% |
| 3881 |
% \begin{macro}{\cleardoublepage} |
| 3882 |
% 重定义 \tn{cleardoublepage},使得偶数页面在没有内容时不显示页眉页脚,见 |
| 3883 |
% \url{https://tex.stackexchange.com/a/1683}。最后清空中间页眉,确保正文部分 |
| 3884 |
% 页眉显示正确。 |
| 3885 |
% \begin{macrocode} |
| 3886 |
\RenewDocumentCommand \cleardoublepage { } |
| 3887 |
{ |
| 3888 |
\clearpage |
| 3889 |
\bool_if:NT \g_@@_twoside_bool |
| 3890 |
{ |
| 3891 |
\int_if_odd:nF \c@page |
| 3892 |
{ \hbox:n { } \thispagestyle{ empty } \newpage } |
| 3893 |
} |
| 3894 |
\tl_gset:Nn \g_@@_header_center_mark_tl { } |
| 3895 |
} |
| 3896 |
% \end{macrocode} |
| 3897 |
% \end{macro} |
| 3898 |
% |
| 3899 |
% 为\pkg{ctex} 宏包使用 \opt{heading} 选项后,会把页面格式设置为 |headings|。 |
| 3900 |
% 因此必须在 \pkg{ctex} 调用之后重新设置 \cs{pagestyle} 为 |fancy|。 |
| 3901 |
% \begin{macrocode} |
| 3902 |
\pagestyle { fancy } |
| 3903 |
% \end{macrocode} |
| 3904 |
% |
| 3905 |
% \changes{v2.00}{2026/04/30}{恢复本科摘要、目录等页眉。} |
| 3906 |
% \changes{v2.00}{2026/05/06}{添加盲审校名匿名页眉。} |
| 3907 |
% \changes{v1.11}{2022/04/02}{删除本科目录页眉,并修正单面模式目录页眉。} |
| 3908 |
% \changes{v1.13}{2022/05/26}{删除本科页眉题目中的换行符。} |
| 3909 |
% |
| 3910 |
% \begin{macro}{\frontmatter,\mainmatter} |
| 3911 |
% 重定义 \tn{frontmatter}和\tn{mainmatter}, |
| 3912 |
% 根据学校要求定制摘要、目录、主要符号对照表等前置及下文部分的页眉页脚。 |
| 3913 |
% \begin{macrocode} |
| 3914 |
\cs_gset_eq:NN \nwafuhead \fancyhead |
| 3915 |
\cs_gset_eq:NN \nwafufoot \fancyfoot |
| 3916 |
% \end{macrocode} |
| 3917 |
% 重定义 \tn{frontmatter},带星号的命令不启用\cs{cleardoublepage}。 |
| 3918 |
% \begin{macrocode} |
| 3919 |
\RenewDocumentCommand{\frontmatter}{s O{Roman}} |
| 3920 |
{ |
| 3921 |
\IfBooleanTF{#1}{\clearpage}{\cleardoublepage} |
| 3922 |
\@mainmatterfalse |
| 3923 |
\@@_set_headrule_front: |
| 3924 |
\pagenumbering{#2} |
| 3925 |
\@@_apply_header_footer: |
| 3926 |
} |
| 3927 |
% \end{macrocode} |
| 3928 |
% 重定义 \tn{mainmatter},带星号的命令不会启用\cs{cleardoublepage}。 |
| 3929 |
% \begin{macrocode} |
| 3930 |
\RenewDocumentCommand{\mainmatter}{s} |
| 3931 |
{ |
| 3932 |
\IfBooleanTF{#1}{\clearpage}{\cleardoublepage} |
| 3933 |
\@mainmattertrue |
| 3934 |
\pagenumbering{arabic} |
| 3935 |
\@@_set_headrule_main: |
| 3936 |
\@@_apply_header_footer: |
| 3937 |
} |
| 3938 |
% \end{macrocode} |
| 3939 |
% \end{macro} |
| 3940 |
% |
| 3941 |
% \begin{macro}{\bibmatter} |
| 3942 |
% 新定义 \cs{bibmatter},以根据学校要求定制参考文献页眉页脚。 |
| 3943 |
% \begin{macrocode} |
| 3944 |
\NewDocumentCommand{\bibmatter}{s} |
| 3945 |
{ |
| 3946 |
\IfBooleanTF{#1}{\clearpage}{\cleardoublepage} |
| 3947 |
\@mainmattertrue |
| 3948 |
\@@_apply_header_footer: |
| 3949 |
} |
| 3950 |
% \end{macrocode} |
| 3951 |
% \end{macro} |
| 3952 |
|
| 3953 |
% \begin{macro}{\appendix,\backmatter} |
| 3954 |
% 为 \cs{appendix}和\cs{backmatter}命令追加代码, |
| 3955 |
% 以根据学校要求定制附录及后置(致谢、个人简历等)页眉页脚。 |
| 3956 |
% \begin{macrocode} |
| 3957 |
\@@_appto_cmd:Nn \appendix |
| 3958 |
{ |
| 3959 |
\clearpage |
| 3960 |
\bool_if:NTF \g_@@_twoside_bool |
| 3961 |
{ |
| 3962 |
\nwafuhead[OC] { \small \nouppercase { \@chapapp } } |
| 3963 |
\nwafuhead[EC] { \@@_header_even: } |
| 3964 |
}{ |
| 3965 |
\nwafuhead[C] |
| 3966 |
{ |
| 3967 |
\int_if_odd:nTF \c@page |
| 3968 |
{ \small \nouppercase { \@chapapp } } |
| 3969 |
{ \@@_header_even: } |
| 3970 |
} |
| 3971 |
} |
| 3972 |
} |
| 3973 |
|
| 3974 |
\@@_appto_cmd:Nn \backmatter |
| 3975 |
{ |
| 3976 |
\clearpage |
| 3977 |
\bool_if:NTF \g_@@_twoside_bool |
| 3978 |
{ |
| 3979 |
\nwafuhead[OC] { \@@_header_odd: } |
| 3980 |
\nwafuhead[EC] { \@@_header_even: } |
| 3981 |
}{ |
| 3982 |
\nwafuhead[C] |
| 3983 |
{ |
| 3984 |
\int_if_odd:nTF \c@page |
| 3985 |
{ \@@_header_odd: } |
| 3986 |
{ \@@_header_even: } |
| 3987 |
} |
| 3988 |
} |
| 3989 |
} |
| 3990 |
% \end{macrocode} |
| 3991 |
% \end{macro} |
| 3992 |
% |
| 3993 |
% \subsection{是否输出插图与附表清单} |
| 3994 |
% |
| 3995 |
% \changes{v2.00}{2026/04/29}{删除withchapter选项,将本科统一为章格式,添加figtabtoc选项,以判断是否输出插图和附表清单。} |
| 3996 |
% \begin{macro}{figtabtoc} |
| 3997 |
% 设置本科论文是否输出插图与附表清单。 |
| 3998 |
% \begin{macrocode} |
| 3999 |
\keys_define:nn { nwafu / style } |
| 4000 |
{ |
| 4001 |
figtabtoc .bool_gset:N = \g_@@_figtabtoc_bool, |
| 4002 |
figtabtoc .default:n = true, |
| 4003 |
figtabtoc .initial:n = false, |
| 4004 |
} |
| 4005 |
% \end{macrocode} |
| 4006 |
% \end{macro} |
| 4007 |
% |
| 4008 |
% \subsection{是否预留签名位置} |
| 4009 |
% |
| 4010 |
% \begin{macro}{withsign} |
| 4011 |
% 设置是否预留下签名。 |
| 4012 |
% \begin{macrocode} |
| 4013 |
\keys_define:nn { nwafu / style } |
| 4014 |
{ |
| 4015 |
withsign .bool_gset:N = \g_@@_withsignature_bool, |
| 4016 |
withsign .default:n = true, |
| 4017 |
withsign .initial:n = false, |
| 4018 |
} |
| 4019 |
% \end{macrocode} |
| 4020 |
% \end{macro} |
| 4021 |
% |
| 4022 |
% \changes{v2.00}{2026/04/29}{将本科统一为阿拉伯数字章编号。} |
| 4023 |
% \subsection{章节标题格式设置} |
| 4024 |
% |
| 4025 |
% \changes{v1.11}{2022/04/02}{修订本科subsubsection编号两端括号为中文全角括号。} |
| 4026 |
% |
| 4027 |
% |\keys_set:nn{ctex}| 实际相当于调用 \cs{ctexset}。 |
| 4028 |
% |
| 4029 |
% 设置章(chapter)、节(section)与小节(sub-section)标题样式。 |
| 4030 |
% 此处使用 \kvopt{fixskip}{true} 选项来抑制前后的多余间距。 |
| 4031 |
% |
| 4032 |
% 设置标题级别 |
| 4033 |
% \begin{macrocode} |
| 4034 |
\cs_new_protected:Npn \@@_ctexset_caption: |
| 4035 |
{ |
| 4036 |
\int_compare:nNnTF{ \g_@@_thesis_type_int } < { 3 } |
| 4037 |
{ |
| 4038 |
% \end{macrocode} |
| 4039 |
% 研究生 |
| 4040 |
% \begin{macrocode} |
| 4041 |
\keys_set:nn { ctex } |
| 4042 |
{ |
| 4043 |
secnumdepth = 3, |
| 4044 |
chapter = |
| 4045 |
{ |
| 4046 |
pagestyle = fancy, |
| 4047 |
aftername = \hspace*{1.0\ccwd}, |
| 4048 |
format = \zihao{3} \normalfont \nwafu@hei \centering, |
| 4049 |
beforeskip = 0.50\baselineskip, |
| 4050 |
afterskip = 1.25\baselineskip, |
| 4051 |
number = \chinese{ chapter }, |
| 4052 |
fixskip = true |
| 4053 |
}, |
| 4054 |
section = |
| 4055 |
{ |
| 4056 |
format = \zihao{-3} \normalfont \nwafu@hei \raggedright, |
| 4057 |
beforeskip = 0.85\baselineskip, |
| 4058 |
afterskip = 0.80\baselineskip, |
| 4059 |
fixskip = true |
| 4060 |
}, |
| 4061 |
subsection = |
| 4062 |
{ |
| 4063 |
format = \zihao{4} \normalfont \nwafu@hei \raggedright, |
| 4064 |
beforeskip = 0.80\baselineskip, |
| 4065 |
fixskip = true |
| 4066 |
}, |
| 4067 |
subsubsection = |
| 4068 |
{ |
| 4069 |
format = \zihao{-4} \normalfont \nwafu@hei \raggedright, |
| 4070 |
beforeskip = 0.40\baselineskip, |
| 4071 |
afterskip = 0.40\baselineskip, |
| 4072 |
fixskip = true |
| 4073 |
} |
| 4074 |
} |
| 4075 |
}{ |
| 4076 |
% \end{macrocode} |
| 4077 |
% 本科 |
| 4078 |
% \begin{macrocode} |
| 4079 |
\keys_set:nn { ctex } |
| 4080 |
{ |
| 4081 |
secnumdepth = 3, |
| 4082 |
chapter = |
| 4083 |
{ |
| 4084 |
pagestyle = fancy, |
| 4085 |
number = { \@@_arabic:n { chapter } }, |
| 4086 |
aftername = \hspace*{\ccwd}, |
| 4087 |
format = \zihao{3} \normalfont \nwafu@hei \centering, |
| 4088 |
beforeskip = 0.25\baselineskip, |
| 4089 |
afterskip = 0.65\baselineskip, |
| 4090 |
fixskip = true |
| 4091 |
}, |
| 4092 |
section = |
| 4093 |
{ |
| 4094 |
aftername = \hspace*{0.5\ccwd}, |
| 4095 |
format = \zihao{4} \normalfont \nwafu@hei \raggedright, |
| 4096 |
beforeskip = 0.60\baselineskip, |
| 4097 |
afterskip = 0.65\baselineskip, |
| 4098 |
fixskip = true, |
| 4099 |
afterindent = true, |
| 4100 |
}, |
| 4101 |
subsection = |
| 4102 |
{ |
| 4103 |
aftername = \hspace*{0.5\ccwd}, |
| 4104 |
format = \zihao{-4} \normalfont \nwafu@hei , |
| 4105 |
beforeskip = 0.60\baselineskip, |
| 4106 |
afterskip = 0.65\baselineskip, |
| 4107 |
fixskip = true, |
| 4108 |
afterindent = true, |
| 4109 |
% indent = 2\ccwd, |
| 4110 |
}, |
| 4111 |
subsubsection = |
| 4112 |
{ |
| 4113 |
name = {{\c_@@_fwid_left_paren_tl},{\c_@@_fwid_right_paren_tl}}, |
| 4114 |
aftername = \hspace*{0.0pt}, |
| 4115 |
number = \@@_arabic:n { subsubsection }, |
| 4116 |
format = \zihao{-4} \normalfont, |
| 4117 |
beforeskip = 0.60\baselineskip, |
| 4118 |
afterskip = 0.65\baselineskip, |
| 4119 |
fixskip = true, |
| 4120 |
% afterindent = true, |
| 4121 |
indent = 2\ccwd, |
| 4122 |
} |
| 4123 |
} |
| 4124 |
} |
| 4125 |
} |
| 4126 |
\@@_ctexset_caption: |
| 4127 |
% \end{macrocode} |
| 4128 |
% |
| 4129 |
% \begin{macro}{\@@_chapter:n,\@@_chapter:V} |
| 4130 |
% 手动生成章标题,用于摘要、参考文献等。 |
| 4131 |
% \begin{macrocode} |
| 4132 |
\cs_new_protected:Npn \@@_chapter:n #1 |
| 4133 |
{ |
| 4134 |
\group_begin: |
| 4135 |
\ctexset |
| 4136 |
{ |
| 4137 |
chapter = |
| 4138 |
{ |
| 4139 |
numbering = false, |
| 4140 |
beforeskip = 0.25\baselineskip, |
| 4141 |
afterskip = 0.65\baselineskip |
| 4142 |
} |
| 4143 |
} |
| 4144 |
\chapter {#1} |
| 4145 |
\@@_chapter_header:n {#1} |
| 4146 |
\group_end: |
| 4147 |
} |
| 4148 |
\cs_generate_variant:Nn \@@_chapter:n { V } |
| 4149 |
% \end{macrocode} |
| 4150 |
% \end{macro} |
| 4151 |
% |
| 4152 |
% \begin{macro}{\@@_chapter_no_toc:n,\@@_chapter_no_toc:V} |
| 4153 |
% 目录自身不应出现在目录中,需特别处理。参考 |
| 4154 |
% \url{https://tex.stackexchange.com/a/1821}。 |
| 4155 |
% \begin{macrocode} |
| 4156 |
\cs_new_protected:Npn \@@_chapter_no_toc:n #1 |
| 4157 |
{ |
| 4158 |
\chapter * {#1} |
| 4159 |
\@@_chapter_header:n {#1} |
| 4160 |
\pdfbookmark [0] {#1} { toc } |
| 4161 |
} |
| 4162 |
\cs_generate_variant:Nn \@@_chapter_no_toc:n { V } |
| 4163 |
% \end{macrocode} |
| 4164 |
% \end{macro} |
| 4165 |
% |
| 4166 |
% \begin{macro}{\@@_chapter_header:n} |
| 4167 |
% 单面排版模式下,目录、摘要、符号表等的页眉中间为相应标题,左右为空。 |
| 4168 |
% \begin{macrocode} |
| 4169 |
\cs_new_protected:Npn \@@_chapter_header:n #1 |
| 4170 |
{ |
| 4171 |
\bool_if:NTF \g_@@_twoside_bool |
| 4172 |
{ \markboth {#1} {#1} } |
| 4173 |
{ |
| 4174 |
\markboth { } { } |
| 4175 |
\tl_gset:Nn \g_@@_header_center_mark_tl {#1} |
| 4176 |
} |
| 4177 |
} |
| 4178 |
% \end{macrocode} |
| 4179 |
% \end{macro} |
| 4180 |
% |
| 4181 |
% \subsection{脚注} |
| 4182 |
% |
| 4183 |
% \subsubsection{编号样式} |
| 4184 |
% |
| 4185 |
% 各种脚注编号样式的名称。 |
| 4186 |
% \begin{macrocode} |
| 4187 |
\clist_map_inline:nn |
| 4188 |
{ |
| 4189 |
{ plain } { plain }, |
| 4190 |
{ libertinus } { libertinus }, |
| 4191 |
{ libertinus_neg } { libertinus* }, |
| 4192 |
{ libertinus_sans } { libertinus-sans }, |
| 4193 |
{ pifont } { pifont }, |
| 4194 |
{ pifont_neg } { pifont* }, |
| 4195 |
{ pifont_sans } { pifont-sans }, |
| 4196 |
{ pifont_sans_neg } { pifont-sans* }, |
| 4197 |
{ circled } { circled }, |
| 4198 |
{ circled_neg } { circled* }, |
| 4199 |
{ circled_sans } { circled-sans }, |
| 4200 |
{ circled_sans_neg } { circled-sans* }, |
| 4201 |
{ xits } { xits }, |
| 4202 |
{ xits_sans } { xits-sans }, |
| 4203 |
{ xits_sans_neg } { xits-sans* } |
| 4204 |
} |
| 4205 |
{ \@@_define_fn_style:nn #1 } |
| 4206 |
% \end{macrocode} |
| 4207 |
% |
| 4208 |
% \begin{variable}{\l_@@_fn_style_tl} |
| 4209 |
% 保存当前使用的脚注编号样式。 |
| 4210 |
% \begin{macrocode} |
| 4211 |
\tl_new:N \l_@@_fn_style_tl |
| 4212 |
% \end{macrocode} |
| 4213 |
% \end{variable} |
| 4214 |
% |
| 4215 |
% \begin{macrocode} |
| 4216 |
\keys_define:nn { nwafu / style } |
| 4217 |
{ |
| 4218 |
% \end{macrocode} |
| 4219 |
% |
| 4220 |
% \changes{v2.01}{2026/05/06}{添加带圈数字脚注选项。} |
| 4221 |
% |
| 4222 |
% \begin{macro}{style/footnote-style} |
| 4223 |
% 脚注类型共分四大类: |
| 4224 |
% \begin{itemize} |
| 4225 |
% \item \opt{plain}:使用当前字体; |
| 4226 |
% \item \opt{libertinus}:取自 Libertinus Serif 和 Libertinus Sans |
| 4227 |
% 字体; |
| 4228 |
% \item \opt{pifont}:使用 \pkg{pifont} 宏包; |
| 4229 |
% \item \opt{xits}:取自 XITS 字体。 |
| 4230 |
% \end{itemize} |
| 4231 |
% 不带任何修饰的为衬线阳文符号,带“|sans|”的为无衬线符号,带“|*|”的 |
| 4232 |
% 为阴文版本。 |
| 4233 |
% \begin{macrocode} |
| 4234 |
footnote-style .choices:nn = |
| 4235 |
{ |
| 4236 |
plain, |
| 4237 |
libertinus, libertinus*, libertinus-sans, |
| 4238 |
pifont, pifont*, pifont-sans, pifont-sans*, |
| 4239 |
circled, circled*, circled-sans, circled-sans*, |
| 4240 |
xits, xits-sans, xits-sans* |
| 4241 |
} |
| 4242 |
% \end{macrocode} |
| 4243 |
% 若使用 \opt{pifont} 类型,则需引入 \pkg{pifont} 宏包。 |
| 4244 |
% \begin{macrocode} |
| 4245 |
{ |
| 4246 |
\tl_gset_eq:NN \l_@@_fn_style_tl \l_keys_choice_tl |
| 4247 |
\int_compare:nT { 5 <= \l_keys_choice_int <= 12 } |
| 4248 |
{ \RequirePackage { pifont } } |
| 4249 |
}, |
| 4250 |
footnote-style .value_required:n = true |
| 4251 |
} |
| 4252 |
% \end{macrocode} |
| 4253 |
% \end{macro} |
| 4254 |
% |
| 4255 |
% \begin{macro}{\@@_fn_symbol_libertinus:n} |
| 4256 |
% \opt{libertinus} 普通版。\numrange{1}{20} 为数字,\numrange{21}{46} |
| 4257 |
% 为小写英文字母,\numrange{47}{72} 为大写英文字母。 |
| 4258 |
% \begin{macrocode} |
| 4259 |
\cs_new:Npn \@@_fn_symbol_libertinus:n #1 |
| 4260 |
{ |
| 4261 |
\int_compare:nTF { #1 >= 21 } |
| 4262 |
{ |
| 4263 |
\int_compare:nTF { #1 >= 47 } |
| 4264 |
{ \@@_symbol:n { \int_eval:n { "24B6 - 47 + #1 } } } |
| 4265 |
{ \@@_symbol:n { \int_eval:n { "24D0 - 21 + #1 } } } |
| 4266 |
} |
| 4267 |
{ \@@_symbol:n { \int_eval:n { "2460 - 1 + #1 } } } |
| 4268 |
} |
| 4269 |
% \end{macrocode} |
| 4270 |
% \end{macro} |
| 4271 |
% |
| 4272 |
% \begin{macro}{\@@_fn_symbol_libertinus_neg:n} |
| 4273 |
% \opt{libertinus} 阴文衬线版。只含 \numrange{1}{20}。 |
| 4274 |
% \begin{macrocode} |
| 4275 |
\cs_new:Npn \@@_fn_symbol_libertinus_neg:n #1 |
| 4276 |
{ |
| 4277 |
\int_compare:nTF { #1 >= 11 } |
| 4278 |
{ \@@_symbol:n { \int_eval:n { "24EB - 11 + #1 } } } |
| 4279 |
{ \@@_symbol:n { \int_eval:n { "2776 - 1 + #1 } } } |
| 4280 |
} |
| 4281 |
% \end{macrocode} |
| 4282 |
% \end{macro} |
| 4283 |
% |
| 4284 |
% \begin{macro}{\@@_fn_symbol_libertinus_sans:n} |
| 4285 |
% \opt{libertinus} 阳文无衬线版。符号排列与普通版相同。 |
| 4286 |
% \begin{macrocode} |
| 4287 |
\cs_new_eq:NN \@@_fn_symbol_libertinus_sans:n \@@_fn_symbol_libertinus:n |
| 4288 |
% \end{macrocode} |
| 4289 |
% \end{macro} |
| 4290 |
% |
| 4291 |
% \begin{macro}{\@@_fn_symbol_pifont:n} |
| 4292 |
% \opt{pifont} 普通版。以下四种都只包含 \numrange{1}{10}。 |
| 4293 |
% \begin{macrocode} |
| 4294 |
\cs_new:Npn \@@_fn_symbol_pifont:n #1 |
| 4295 |
{ \ding { \int_eval:n { 171 + #1 } } } |
| 4296 |
% \end{macrocode} |
| 4297 |
% \end{macro} |
| 4298 |
% |
| 4299 |
% \begin{macro}{\@@_fn_symbol_pifont_neg:n} |
| 4300 |
% \opt{pifont} 阴文衬线版。 |
| 4301 |
% \begin{macrocode} |
| 4302 |
\cs_new:Npn \@@_fn_symbol_pifont_neg:n #1 |
| 4303 |
{ \ding { \int_eval:n { 181 + #1 } } } |
| 4304 |
% \end{macrocode} |
| 4305 |
% \end{macro} |
| 4306 |
% |
| 4307 |
% \begin{macro}{\@@_fn_symbol_pifont_sans:n} |
| 4308 |
% \opt{pifont} 阳文无衬线版。 |
| 4309 |
% \begin{macrocode} |
| 4310 |
\cs_new:Npn \@@_fn_symbol_pifont_sans:n #1 |
| 4311 |
{ \ding { \int_eval:n { 191 + #1 } } } |
| 4312 |
% \end{macrocode} |
| 4313 |
% \end{macro} |
| 4314 |
% |
| 4315 |
% \begin{macro}{\@@_fn_symbol_pifont_sans_neg:n} |
| 4316 |
% \opt{pifont} 阴文无衬线版。 |
| 4317 |
% \begin{macrocode} |
| 4318 |
\cs_new:Npn \@@_fn_symbol_pifont_sans_neg:n #1 |
| 4319 |
{ \ding { \int_eval:n { 201 + #1 } } } |
| 4320 |
% \end{macrocode} |
| 4321 |
% \end{macro} |
| 4322 |
% |
| 4323 |
% \begin{macro}{\@@_fn_symbol_xits:n} |
| 4324 |
% \opt{xits} 普通版。\numrange{1}{9} 为数字,\numrange{10}{35} |
| 4325 |
% 为小写英文字母,\numrange{36}{61} 为大写英文字母。 |
| 4326 |
% \begin{macrocode} |
| 4327 |
\cs_new:Npn \@@_fn_symbol_xits:n #1 |
| 4328 |
{ |
| 4329 |
\int_compare:nTF { #1 >= 10 } |
| 4330 |
{ |
| 4331 |
\int_compare:nTF { #1 >= 36 } |
| 4332 |
{ \@@_symbol:n { \int_eval:n { "24B6 - 36 + #1 } } } |
| 4333 |
{ \@@_symbol:n { \int_eval:n { "24D0 - 10 + #1 } } } |
| 4334 |
} |
| 4335 |
{ \@@_symbol:n { \int_eval:n { "2460 - 1 + #1 } } } |
| 4336 |
} |
| 4337 |
% \end{macrocode} |
| 4338 |
% \end{macro} |
| 4339 |
% |
| 4340 |
% \begin{macro}{\@@_fn_symbol_xits_sans:n} |
| 4341 |
% \opt{xits} 阳文无衬线版。只包含 \numrange{1}{10}。 |
| 4342 |
% \begin{macrocode} |
| 4343 |
\cs_new:Npn \@@_fn_symbol_xits_sans:n #1 |
| 4344 |
{ \@@_symbol:n { \int_eval:n { "2780 - 1 + #1 } } } |
| 4345 |
% \end{macrocode} |
| 4346 |
% \end{macro} |
| 4347 |
% |
| 4348 |
% \begin{macro}{\@@_fn_symbol_xits_sans_neg:n} |
| 4349 |
% \opt{xits} 阴文无衬线版。也只包含 \numrange{1}{10}。 |
| 4350 |
% \begin{macrocode} |
| 4351 |
\cs_new:Npn \@@_fn_symbol_xits_sans_neg:n #1 |
| 4352 |
{ \@@_symbol:n { \int_eval:n { "278A - 1 + #1 } } } |
| 4353 |
% \end{macrocode} |
| 4354 |
% \end{macro} |
| 4355 |
% |
| 4356 |
% \begin{macro}{\@@_fn_symbol_circled:n} |
| 4357 |
% \opt{circled} 带圈数字阳文衬线版。只包含 \numrange{1}{10}。 |
| 4358 |
% 超过10用普通数字,10及10以内用带圈数字 ①-⑩。 |
| 4359 |
% \begin{macrocode} |
| 4360 |
\cs_new:Npn \@@_fn_symbol_circled:n #1 |
| 4361 |
{ |
| 4362 |
\int_compare:nTF { #1 > 10 } |
| 4363 |
{ \@arabic{#1} } |
| 4364 |
{ \ding { \int_eval:n { 171 + #1 } } } |
| 4365 |
} |
| 4366 |
% \end{macrocode} |
| 4367 |
% \end{macro} |
| 4368 |
% |
| 4369 |
% \begin{macro}{\@@_fn_symbol_circled_neg:n} |
| 4370 |
% \opt{circled} 带圈数字阴文衬线版。只包含 \numrange{1}{10}。 |
| 4371 |
% 超过10用普通数字,10及10以内用带圈数字 ①-⑩。 |
| 4372 |
% \begin{macrocode} |
| 4373 |
\cs_new:Npn \@@_fn_symbol_circled_neg:n #1 |
| 4374 |
{ |
| 4375 |
\int_compare:nTF { #1 > 10 } |
| 4376 |
{ \@arabic{#1} } |
| 4377 |
{ \ding { \int_eval:n { 181 + #1 } } } |
| 4378 |
} |
| 4379 |
% \end{macrocode} |
| 4380 |
% \end{macro} |
| 4381 |
% |
| 4382 |
% \begin{macro}{\@@_fn_symbol_circled_sans:n} |
| 4383 |
% \opt{circled} 带圈数字阳文无衬线版。只包含 \numrange{1}{10}。 |
| 4384 |
% 超过10用普通数字,10及10以内用带圈数字 ①-⑩。 |
| 4385 |
% \begin{macrocode} |
| 4386 |
\cs_new:Npn \@@_fn_symbol_circled_sans:n #1 |
| 4387 |
{ |
| 4388 |
\int_compare:nTF { #1 > 10 } |
| 4389 |
{ \@arabic{#1} } |
| 4390 |
{ \ding { \int_eval:n { 191 + #1 } } } |
| 4391 |
} |
| 4392 |
% \end{macrocode} |
| 4393 |
% \end{macro} |
| 4394 |
% |
| 4395 |
% \begin{macro}{\@@_fn_symbol_circled_sans_neg:n} |
| 4396 |
% \opt{circled} 带圈数字阴文无衬线版。只包含 \numrange{1}{10}。 |
| 4397 |
% 超过10用普通数字,10及10以内用带圈数字 ①-⑩。 |
| 4398 |
% \begin{macrocode} |
| 4399 |
\cs_new:Npn \@@_fn_symbol_circled_sans_neg:n #1 |
| 4400 |
{ |
| 4401 |
\int_compare:nTF { #1 > 10 } |
| 4402 |
{ \@arabic{#1} } |
| 4403 |
{ \ding { \int_eval:n { 201 + #1 } } } |
| 4404 |
} |
| 4405 |
% \end{macrocode} |
| 4406 |
% \end{macro} |
| 4407 |
% |
| 4408 |
% \begin{macro}{\thefootnote} |
| 4409 |
% 重定义脚注编号。 |
| 4410 |
% \begin{macrocode} |
| 4411 |
\cs_set:Npn \thefootnote { \nwafu_footnote_number:N \c@footnote } |
| 4412 |
% \end{macrocode} |
| 4413 |
% \end{macro} |
| 4414 |
% |
| 4415 |
% \begin{macro}{\nwafu_footnote_number:N} |
| 4416 |
% 脚注编号样式。 |
| 4417 |
% \begin{macrocode} |
| 4418 |
\cs_new:Npn \nwafu_footnote_number:N #1 |
| 4419 |
{ |
| 4420 |
\tl_case:NnF \l_@@_fn_style_tl |
| 4421 |
{ |
| 4422 |
% \end{macrocode} |
| 4423 |
% \opt{plain} 类型直接使用计数器 |footnote| 的值。 |
| 4424 |
% \begin{macrocode} |
| 4425 |
\c_@@_fn_style_plain_tl |
| 4426 |
{ \int_use:N #1 } |
| 4427 |
% \end{macrocode} |
| 4428 |
% \opt{libertinus} 类型需要使用 Libertinus Serif 或 |
| 4429 |
% Libertinus Sans 字体。 |
| 4430 |
% \begin{macrocode} |
| 4431 |
\c_@@_fn_style_libertinus_tl |
| 4432 |
{ |
| 4433 |
\fontspec { \g_@@_font_name_libertinus_serif_tl .otf } |
| 4434 |
\@@_fn_symbol_libertinus:n {#1} |
| 4435 |
} |
| 4436 |
\c_@@_fn_style_libertinus_neg_tl |
| 4437 |
{ |
| 4438 |
\fontspec { \g_@@_font_name_libertinus_serif_tl .otf } |
| 4439 |
\@@_fn_symbol_libertinus_neg:n {#1} |
| 4440 |
} |
| 4441 |
\c_@@_fn_style_libertinus_sans_tl |
| 4442 |
{ |
| 4443 |
\fontspec { \g_@@_font_name_libertinus_sans_tl .otf } |
| 4444 |
\@@_fn_symbol_libertinus_sans:n {#1} |
| 4445 |
} |
| 4446 |
% \end{macrocode} |
| 4447 |
% \opt{pifont} 类型无需进行额外的操作。 |
| 4448 |
% \begin{macrocode} |
| 4449 |
\c_@@_fn_style_pifont_tl |
| 4450 |
{ \@@_fn_symbol_pifont:n {#1} } |
| 4451 |
\c_@@_fn_style_pifont_neg_tl |
| 4452 |
{ \@@_fn_symbol_pifont_neg:n {#1} } |
| 4453 |
\c_@@_fn_style_pifont_sans_tl |
| 4454 |
{ \@@_fn_symbol_pifont_sans:n {#1} } |
| 4455 |
\c_@@_fn_style_pifont_sans_neg_tl |
| 4456 |
{ \@@_fn_symbol_pifont_sans_neg:n {#1} } |
| 4457 |
% \end{macrocode} |
| 4458 |
% \opt{pifont} 类型带圈数字,无需进行额外的操作。 |
| 4459 |
% \begin{macrocode} |
| 4460 |
\c_@@_fn_style_circled_tl |
| 4461 |
{ |
| 4462 |
\@@_fn_symbol_circled:n {#1} |
| 4463 |
} |
| 4464 |
\c_@@_fn_style_circled_neg_tl |
| 4465 |
{ |
| 4466 |
\@@_fn_symbol_circled_neg:n {#1} |
| 4467 |
} |
| 4468 |
\c_@@_fn_style_circled_sans_tl |
| 4469 |
{ |
| 4470 |
\@@_fn_symbol_circled_sans:n {#1} |
| 4471 |
} |
| 4472 |
\c_@@_fn_style_circled_sans_neg_tl |
| 4473 |
{ |
| 4474 |
\@@_fn_symbol_circled_sans_neg:n {#1} |
| 4475 |
} |
| 4476 |
% \end{macrocode} |
| 4477 |
% \opt{xits} 类型需要临时切换数学字体。 |
| 4478 |
% \begin{macrocode} |
| 4479 |
\c_@@_fn_style_xits_tl |
| 4480 |
{ |
| 4481 |
\fontspec { \g_@@_font_name_xits_tl .otf } |
| 4482 |
\@@_fn_symbol_xits:n {#1} |
| 4483 |
} |
| 4484 |
\c_@@_fn_style_xits_sans_tl |
| 4485 |
{ |
| 4486 |
\fontspec { \g_@@_font_name_xits_tl .otf } |
| 4487 |
\@@_fn_symbol_xits_sans:n {#1} |
| 4488 |
} |
| 4489 |
\c_@@_fn_style_xits_sans_neg_tl |
| 4490 |
{ |
| 4491 |
\fontspec { \g_@@_font_name_xits_tl .otf } |
| 4492 |
\@@_fn_symbol_xits_sans_neg:n {#1} |
| 4493 |
} |
| 4494 |
} |
| 4495 |
% \end{macrocode} |
| 4496 |
% 变量 \cs{l_@@_fn_style_tl} 保存的类型未知时,默认使用 \opt{plain} |
| 4497 |
% 类型。 |
| 4498 |
% \begin{macrocode} |
| 4499 |
{ \int_use:N #1 } |
| 4500 |
} |
| 4501 |
% \end{macrocode} |
| 4502 |
% \end{macro} |
| 4503 |
% |
| 4504 |
% \subsubsection{整体样式} |
| 4505 |
% |
| 4506 |
% \begin{macro}[int]{\@makefntext} |
| 4507 |
% 重定义内部脚注文字命令,使脚注编号不使用上标,宽度为 \SI{1.5}{em}。 |
| 4508 |
% 见 \url{http://tex.stackexchange.com/q/19844} 和 |
| 4509 |
% \url{https://www.zhihu.com/question/53030087}。 |
| 4510 |
% \begin{macrocode} |
| 4511 |
\cs_set:Npn \@makefntext #1 |
| 4512 |
{ |
| 4513 |
\mode_leave_vertical: |
| 4514 |
\hbox_to_wd:nn { 1.5 em } { \@thefnmark \hfil } |
| 4515 |
#1 |
| 4516 |
} |
| 4517 |
% \end{macrocode} |
| 4518 |
% \end{macro} |
| 4519 |
% |
| 4520 |
% \subsection{定理环境} |
| 4521 |
% |
| 4522 |
% \begin{variable}{\c_@@_thm_style_plain_clist, |
| 4523 |
% \c_@@_thm_style_break_clist} |
| 4524 |
% 保存 \opt{plain}、\opt{break} 两种类型的定理样式名称。 |
| 4525 |
% \begin{macrocode} |
| 4526 |
\clist_const:Nn \c_@@_thm_style_plain_clist |
| 4527 |
{ plain, margin, change } |
| 4528 |
\clist_const:Nn \c_@@_thm_style_break_clist |
| 4529 |
{ break, marginbreak, changebreak } |
| 4530 |
% \end{macrocode} |
| 4531 |
% \end{variable} |
| 4532 |
% |
| 4533 |
% \begin{variable}{\l_@@_thm_style_tl, |
| 4534 |
% \l_@@_thm_header_font_tl, |
| 4535 |
% \l_@@_thm_body_font_tl, |
| 4536 |
% \l_@@_thm_qed_tl, |
| 4537 |
% \l_@@_thm_counter_tl} |
| 4538 |
% 定理所需的一些字段。 |
| 4539 |
% \begin{macrocode} |
| 4540 |
\tl_new:N \l_@@_thm_style_tl |
| 4541 |
\tl_new:N \l_@@_thm_header_font_tl |
| 4542 |
\tl_new:N \l_@@_thm_body_font_tl |
| 4543 |
\tl_new:N \l_@@_thm_qed_tl |
| 4544 |
\tl_new:N \l_@@_thm_counter_tl |
| 4545 |
% \end{macrocode} |
| 4546 |
% \end{variable} |
| 4547 |
% |
| 4548 |
% \begin{macro}{theorem/style, |
| 4549 |
% theorem/header-font, |
| 4550 |
% theorem/body-font, |
| 4551 |
% theorem/qed, |
| 4552 |
% theorem/counter} |
| 4553 |
% 定义 |nwafu/theorem| 键值类。 |
| 4554 |
% \begin{macrocode} |
| 4555 |
\keys_define:nn { nwafu / theorem } |
| 4556 |
{ |
| 4557 |
style .tl_set:N = \l_@@_thm_style_tl, |
| 4558 |
header-font .tl_set:N = \l_@@_thm_header_font_tl, |
| 4559 |
body-font .tl_set:N = \l_@@_thm_body_font_tl, |
| 4560 |
qed .tl_set:N = \l_@@_thm_qed_tl, |
| 4561 |
counter .tl_set:N = \l_@@_thm_counter_tl |
| 4562 |
} |
| 4563 |
% \end{macrocode} |
| 4564 |
% \end{macro} |
| 4565 |
% |
| 4566 |
% \begin{macro}{\@@_thm_ntheorem_style:n,\@@_thm_ntheorem_new:w} |
| 4567 |
% 拷贝 \pkg{ntheorem} 命令。 |
| 4568 |
% \begin{macrocode} |
| 4569 |
\cs_new_eq:NN \@@_thm_ntheorem_style:n \theoremstyle |
| 4570 |
\cs_new_eq:NN \@@_thm_ntheorem_new:w \newtheorem |
| 4571 |
% \end{macrocode} |
| 4572 |
% \end{macro} |
| 4573 |
% |
| 4574 |
% \begin{macro}{\newtheorem} |
| 4575 |
% 定义新的定理环境。 |
| 4576 |
% \begin{macrocode} |
| 4577 |
\RenewDocumentCommand \newtheorem { s o m m } |
| 4578 |
{ |
| 4579 |
% \end{macrocode} |
| 4580 |
% 默认情况下,由 \cs{newtheorem*} 创建的定理其证毕符号为 \cs{QED}, |
| 4581 |
% 而由 \cs{new\-the\-orem} 创建的则不带证毕符号。符号 \cs{QED} 由 |
| 4582 |
% \pkg{unicode-math} 宏包提供。 |
| 4583 |
% \begin{macrocode} |
| 4584 |
\IfBooleanTF {#1} |
| 4585 |
{ \tl_set:Nn \l_@@_thm_qed_tl { \ensuremath { \QED } } } |
| 4586 |
{ \tl_set:Nn \l_@@_thm_qed_tl { } } |
| 4587 |
% \end{macrocode} |
| 4588 |
% 设置默认样式为 \opt{plain}。 |
| 4589 |
% \begin{macrocode} |
| 4590 |
\tl_set:Nn \l_@@_thm_style_tl { plain } |
| 4591 |
% \end{macrocode} |
| 4592 |
% 处理可选参数。利用 |nwafu/theorem| 键值对设置,并按此修改证毕符号、 |
| 4593 |
% 定理头字体和定理正文字体。 |
| 4594 |
% \begin{macrocode} |
| 4595 |
\IfValueT {#2} { \keys_set:nn { nwafu / theorem } {#2} } |
| 4596 |
\nwafu_thm_set_header_font:V \l_@@_thm_header_font_tl |
| 4597 |
\nwafu_thm_set_body_font:V \l_@@_thm_body_font_tl |
| 4598 |
\nwafu_thm_set_qed:V \l_@@_thm_qed_tl |
| 4599 |
% \end{macrocode} |
| 4600 |
% \cs{newtheorem} 负责创建编号定理,而 \cs{newtheorem*} |
| 4601 |
% 则负责创建无编号定理。以下分这两种情况处理。 |
| 4602 |
% \begin{macrocode} |
| 4603 |
\IfBooleanTF {#1} |
| 4604 |
{ |
| 4605 |
% \end{macrocode} |
| 4606 |
% 带 |*| 的版本原则上只接受 \opt{plain} 和 \opt{break} 两种样式, |
| 4607 |
% 其余样式将被转换成这两者其中之一。 |
| 4608 |
% \begin{macrocode} |
| 4609 |
\clist_if_in:nVF { plain, break } \l_@@_thm_style_tl |
| 4610 |
{ |
| 4611 |
\clist_if_in:NVTF |
| 4612 |
\c_@@_thm_style_plain_clist \l_@@_thm_style_tl |
| 4613 |
{ \@@_thm_redefine_style:n { plain } } |
| 4614 |
{ |
| 4615 |
\clist_if_in:NVTF |
| 4616 |
\c_@@_thm_style_break_clist \l_@@_thm_style_tl |
| 4617 |
{ \@@_thm_redefine_style:n { break } } |
| 4618 |
{ |
| 4619 |
\@@_error:nx { unknown-theorem-style } |
| 4620 |
{ \l_@@_thm_style_tl } |
| 4621 |
} |
| 4622 |
} |
| 4623 |
} |
| 4624 |
% \end{macrocode} |
| 4625 |
% \pkg{ntheorem} 宏包提供的无编号定理带有 |nonumber| 前缀, |
| 4626 |
% 这里将其加上。 |
| 4627 |
% \begin{macrocode} |
| 4628 |
\tl_put_left:Nn \l_@@_thm_style_tl { nonumber } |
| 4629 |
\nwafu_thm_new_no_number:Vxx \l_@@_thm_style_tl {#3} {#4} |
| 4630 |
} |
| 4631 |
{ |
| 4632 |
% \end{macrocode} |
| 4633 |
% 不带 |*| 的版本支持不含“|nonumber|”的所有定理样式。 |
| 4634 |
% \begin{macrocode} |
| 4635 |
\clist_clear:N \l_@@_tmpa_clist |
| 4636 |
\clist_concat:NNN \l_@@_tmpa_clist |
| 4637 |
\c_@@_thm_style_plain_clist \c_@@_thm_style_break_clist |
| 4638 |
\clist_if_in:NVF \l_@@_tmpa_clist \l_@@_thm_style_tl |
| 4639 |
{ |
| 4640 |
\@@_error:nx { unknown-theorem-style } |
| 4641 |
{ \l_@@_thm_style_tl } |
| 4642 |
} |
| 4643 |
\nwafu_thm_new:VVxx \l_@@_thm_style_tl \l_@@_thm_counter_tl |
| 4644 |
{#3} {#4} |
| 4645 |
} |
| 4646 |
} |
| 4647 |
% \end{macrocode} |
| 4648 |
% \end{macro} |
| 4649 |
% |
| 4650 |
% \begin{macro}{\@@_thm_redefine_style:n} |
| 4651 |
% 重定义定理样式,并给出警告。 |
| 4652 |
% \begin{macrocode} |
| 4653 |
\cs_new:Npn \@@_thm_redefine_style:n #1 |
| 4654 |
{ |
| 4655 |
\@@_warning:nxx { redefine-theorem-style } |
| 4656 |
{#1} { \l_@@_thm_style_tl } |
| 4657 |
\tl_set:Nn \l_@@_thm_style_tl {#1} |
| 4658 |
} |
| 4659 |
% \end{macrocode} |
| 4660 |
% \end{macro} |
| 4661 |
% |
| 4662 |
% 提示信息。 |
| 4663 |
% \begin{macrocode} |
| 4664 |
\@@_msg_new:nn { redefine-theorem-style } |
| 4665 |
{ Theorem~ style~ "#2"~ will~ be~ redefined~ as~ "#1". } |
| 4666 |
\@@_msg_new:nn { unknown-theorem-style } |
| 4667 |
{ Theorem~ style~ "#1"~ is~ unknown. } |
| 4668 |
% \end{macrocode} |
| 4669 |
% |
| 4670 |
% \begin{macro}{\nwafu_thm_new:nnnn,\nwafu_thm_new:VVxx} |
| 4671 |
% 带编号的定理环境。 |
| 4672 |
% \begin{arguments} |
| 4673 |
% \item 样式 |
| 4674 |
% \item 计数器 |
| 4675 |
% \item 定理环境名称 |
| 4676 |
% \item 定理头文字 |
| 4677 |
% \end{arguments} |
| 4678 |
% \begin{macrocode} |
| 4679 |
\cs_new:Npn \nwafu_thm_new:nnnn #1#2#3#4 |
| 4680 |
{ |
| 4681 |
\@@_thm_ntheorem_style:n {#1} |
| 4682 |
\@@_thm_ntheorem_new:w {#3} {#4} [#2] |
| 4683 |
} |
| 4684 |
\cs_generate_variant:Nn \nwafu_thm_new:nnnn { VVxx } |
| 4685 |
% \end{macrocode} |
| 4686 |
% \end{macro} |
| 4687 |
% |
| 4688 |
% \begin{macro}{\nwafu_thm_new_no_number:nnn, |
| 4689 |
% \nwafu_thm_new_no_number:Vxx} |
| 4690 |
% 不带编号的定理环境。 |
| 4691 |
% \begin{arguments} |
| 4692 |
% \item 样式 |
| 4693 |
% \item 定理环境名称 |
| 4694 |
% \item 定理头文字 |
| 4695 |
% \end{arguments} |
| 4696 |
% \begin{macrocode} |
| 4697 |
\cs_new:Npn \nwafu_thm_new_no_number:nnn #1#2#3 |
| 4698 |
{ |
| 4699 |
\@@_thm_ntheorem_style:n {#1} |
| 4700 |
\@@_thm_ntheorem_new:w {#2} {#3} |
| 4701 |
} |
| 4702 |
\cs_generate_variant:Nn \nwafu_thm_new_no_number:nnn { Vxx } |
| 4703 |
% \end{macrocode} |
| 4704 |
% \end{macro} |
| 4705 |
% |
| 4706 |
% \begin{macro}{\nwafu_thm_set_qed:n, |
| 4707 |
% \nwafu_thm_set_header_font:n, |
| 4708 |
% \nwafu_thm_set_body_font:n, |
| 4709 |
% \nwafu_thm_set_qed:V, |
| 4710 |
% \nwafu_thm_set_header_font:V, |
| 4711 |
% \nwafu_thm_set_body_font:V} |
| 4712 |
% 封装 \pkg{ntheorem} 宏包提供的若干命令,分别用以设置证毕符号、 |
| 4713 |
% 定理头字体和定理正文字体。 |
| 4714 |
% \begin{macrocode} |
| 4715 |
\cs_new:Npn \nwafu_thm_set_qed:n #1 { \theoremsymbol {#1} } |
| 4716 |
\cs_new:Npn \nwafu_thm_set_header_font:n #1 { \theoremheaderfont {#1} } |
| 4717 |
\cs_new:Npn \nwafu_thm_set_body_font:n #1 { \theorembodyfont {#1} } |
| 4718 |
\cs_generate_variant:Nn \nwafu_thm_set_qed:n { V } |
| 4719 |
\cs_generate_variant:Nn \nwafu_thm_set_header_font:n { V } |
| 4720 |
\cs_generate_variant:Nn \nwafu_thm_set_body_font:n { V } |
| 4721 |
% \end{macrocode} |
| 4722 |
% \end{macro} |
| 4723 |
% |
| 4724 |
% \begin{macro}{\theequation} |
| 4725 |
% 重定义公式编号。 |
| 4726 |
% \begin{macrocode} |
| 4727 |
\cs_set:Npn \theequation |
| 4728 |
{ \thechapter - \@@_arabic:n { equation } } |
| 4729 |
% \end{macrocode} |
| 4730 |
% \end{macro} |
| 4731 |
% |
| 4732 |
% \changes{v2.12}{2026/05/10}{按2026年研究生撰写规范修订研究模板封面。区分学术和专业学位类型类型。} |
| 4733 |
% |
| 4734 |
% \subsection{封面} |
| 4735 |
% |
| 4736 |
% \subsubsection{信息录入} |
| 4737 |
|
| 4738 |
% \changes{v2.00}{2026/04/29}{添加本科申请学位类别记录变量。} |
| 4739 |
% |
| 4740 |
% \begin{variable}{\l_@@_info_title_tl, |
| 4741 |
% \l_@@_info_date_tl, |
| 4742 |
% \l_@@_info_grade_tl, |
| 4743 |
% \l_@@_info_enroll_tl, |
| 4744 |
% \l_@@_info_author_tl, |
| 4745 |
% \l_@@_info_supervisor_tl, |
| 4746 |
% \l_@@_info_cosupervisor_tl, |
| 4747 |
% \l_@@_info_department_tl, |
| 4748 |
% \l_@@_info_major_tl, |
| 4749 |
% \l_@@_info_bachelor_title_tl, |
| 4750 |
% \l_@@_info_researchfield_tl, |
| 4751 |
% \l_@@_info_engineering_title_tl, |
| 4752 |
% \l_@@_info_engineeringfield_tl, |
| 4753 |
% \l_@@_info_class_id_tl, |
| 4754 |
% \l_@@_info_student_id_tl, |
| 4755 |
% \l_@@_info_school_id_tl, |
| 4756 |
% \l_@@_info_clc_tl, |
| 4757 |
% \l_@@_info_defensedate_tl, |
| 4758 |
% \l_@@_info_instructors_clist, |
| 4759 |
% \l_@@_info_defensecommittees_clist, |
| 4760 |
% \l_@@_info_foundation_clist} |
| 4761 |
% 封面所需的字段。 |
| 4762 |
% \begin{macrocode} |
| 4763 |
\clist_map_inline:nn |
| 4764 |
{ |
| 4765 |
title, date, grade, enroll, author, supervisor, cosupervisor, |
| 4766 |
department, major, bachelor_title, researchfield, engineering_title, engineeringfield, |
| 4767 |
class_id, student_id, school_id, clc, defensedate, udc |
| 4768 |
} |
| 4769 |
{ \tl_new:c { l_@@_info_ #1 _tl } } |
| 4770 |
\clist_new:N \l_@@_info_instructors_clist |
| 4771 |
\clist_new:N \l_@@_info_defensecommittees_clist |
| 4772 |
\clist_new:N \l_@@_info_foundation_clist |
| 4773 |
% \end{macrocode} |
| 4774 |
% \end{variable} |
| 4775 |
% |
| 4776 |
% \begin{variable}{\l_@@_info_title_en_tl, |
| 4777 |
% \l_@@_info_author_en_tl, |
| 4778 |
% \l_@@_info_supervisor_en_tl, |
| 4779 |
% \l_@@_info_cosupervisor_en_tl, |
| 4780 |
% \l_@@_info_department_en_tl, |
| 4781 |
% \l_@@_info_major_en_tl, |
| 4782 |
% \l_@@_info_mastertype_en_tl, |
| 4783 |
% \l_@@_info_researchfield_en_tl, |
| 4784 |
% \l_@@_info_engineering_title_en_tl, |
| 4785 |
% \l_@@_info_engineeringfield_en_tl, |
| 4786 |
% \l_@@_info_date_en_tl} |
| 4787 |
% 对应的英文字段。 |
| 4788 |
% \begin{macrocode} |
| 4789 |
\clist_map_inline:nn |
| 4790 |
{ title, author, supervisor, cosupervisor, department, |
| 4791 |
major, mastertype, researchfield, engineering_title, engineeringfield,date } |
| 4792 |
{ \tl_new:c { l_@@_info_ #1 _en_tl } } |
| 4793 |
% \end{macrocode} |
| 4794 |
% \end{variable} |
| 4795 |
% |
| 4796 |
% \begin{variable}{\l_@@_info_postgraduate_type_int} |
| 4797 |
% 学位类型。1 为学术学位,2 为专业学位。仅对研究生有效。 |
| 4798 |
% \begin{macrocode} |
| 4799 |
\int_new:N \l_@@_info_postgraduate_type_int |
| 4800 |
% \end{macrocode} |
| 4801 |
% \end{variable} |
| 4802 |
% |
| 4803 |
% \begin{variable}{\l_@@_info_bachelor_type_int} |
| 4804 |
% 本科毕业类型。1 为论文,2 为设计。仅对本科有效。 |
| 4805 |
% \begin{macrocode} |
| 4806 |
\int_new:N \l_@@_info_bachelor_type_int |
| 4807 |
% \end{macrocode} |
| 4808 |
% \end{variable} |
| 4809 |
% |
| 4810 |
% 定义 |nwafu/info| 键值类。 |
| 4811 |
% \begin{macrocode} |
| 4812 |
\keys_define:nn { nwafu / info } |
| 4813 |
{ |
| 4814 |
% \end{macrocode} |
| 4815 |
% |
| 4816 |
% \changes{v2.02}{2026/05/09}{将学位类型选项名称修改为ptype,将professional选项值修改为engineering。} |
| 4817 |
% |
| 4818 |
% \begin{macro}{info/ptype} |
| 4819 |
% 学位类型。只对研究生论文有效。 |
| 4820 |
% \begin{macrocode} |
| 4821 |
ptype .choices:nn = |
| 4822 |
{ academic, engineering } |
| 4823 |
{ \int_set_eq:NN \l_@@_info_postgraduate_type_int \l_keys_choice_int }, |
| 4824 |
% \end{macrocode} |
| 4825 |
% \end{macro} |
| 4826 |
% |
| 4827 |
% \begin{macro}{info/btype} |
| 4828 |
% 本科毕业类型。仅对本科有效。 |
| 4829 |
% \begin{macrocode} |
| 4830 |
btype .choice:, |
| 4831 |
btype .value_required:n = true, |
| 4832 |
btype .choices:nn = |
| 4833 |
{ paper, design } |
| 4834 |
{ \int_set_eq:NN \l_@@_info_bachelor_type_int \l_keys_choice_int }, |
| 4835 |
btype .initial:n = paper, |
| 4836 |
% \end{macrocode} |
| 4837 |
% \end{macro} |
| 4838 |
% |
| 4839 |
% \begin{macro}{info/title,info/title*} |
| 4840 |
% 论文题目。以下带星号的项目均表示相应的英文字段。 |
| 4841 |
% \begin{macrocode} |
| 4842 |
title .tl_set:N = \l_@@_info_title_tl, |
| 4843 |
title* .tl_set:N = \l_@@_info_title_en_tl, |
| 4844 |
% \end{macrocode} |
| 4845 |
% \end{macro} |
| 4846 |
% |
| 4847 |
% \begin{macro}{info/date, info/date*} |
| 4848 |
% 论文完成日期。 |
| 4849 |
% \begin{macrocode} |
| 4850 |
date .tl_set:N = \l_@@_info_date_tl, |
| 4851 |
date* .tl_set:N = \l_@@_info_date_en_tl, |
| 4852 |
% \end{macrocode} |
| 4853 |
% \end{macro} |
| 4854 |
% |
| 4855 |
% \begin{macro}{info/grade} |
| 4856 |
% 毕业年份(届)。 |
| 4857 |
% \begin{macrocode} |
| 4858 |
grade .tl_set:N = \l_@@_info_grade_tl, |
| 4859 |
% \end{macrocode} |
| 4860 |
% \end{macro} |
| 4861 |
% |
| 4862 |
% \begin{macro}{info/enroll} |
| 4863 |
% 入学年份(级)。 |
| 4864 |
% \begin{macrocode} |
| 4865 |
enroll .tl_set:N = \l_@@_info_enroll_tl, |
| 4866 |
% \end{macrocode} |
| 4867 |
% \end{macro} |
| 4868 |
% |
| 4869 |
% \begin{macro}{info/author,info/author*} |
| 4870 |
% 作者姓名。 |
| 4871 |
% \begin{macrocode} |
| 4872 |
author .tl_set:N = \l_@@_info_author_tl, |
| 4873 |
author* .tl_set:N = \l_@@_info_author_en_tl, |
| 4874 |
% \end{macrocode} |
| 4875 |
% \end{macro} |
| 4876 |
% |
| 4877 |
% \begin{macro}{info/supervisor,info/supervisor*} |
| 4878 |
% 导师姓名。 |
| 4879 |
% \begin{macrocode} |
| 4880 |
supervisor .tl_set:N = \l_@@_info_supervisor_tl, |
| 4881 |
supervisor* .tl_set:N = \l_@@_info_supervisor_en_tl, |
| 4882 |
% \end{macrocode} |
| 4883 |
% \end{macro} |
| 4884 |
% |
| 4885 |
% \begin{macro}{info/cosupervisor, info/cosupervisor*} |
| 4886 |
% 协助指导教师。 |
| 4887 |
% \begin{macrocode} |
| 4888 |
cosupervisor .tl_set:N = \l_@@_info_cosupervisor_tl, |
| 4889 |
cosupervisor* .tl_set:N = \l_@@_info_cosupervisor_en_tl, |
| 4890 |
% \end{macrocode} |
| 4891 |
% \end{macro} |
| 4892 |
% |
| 4893 |
% \begin{macro}{info/instructors} |
| 4894 |
% 指导小组成员。 |
| 4895 |
% \begin{macrocode} |
| 4896 |
instructors .clist_set:N = \l_@@_info_instructors_clist, |
| 4897 |
% \end{macrocode} |
| 4898 |
% \end{macro} |
| 4899 |
% |
| 4900 |
% \begin{macro}{info/defensecommittees} |
| 4901 |
% 答辩委员会成员,每个成员包含单位、姓名、职称。仅研究生需要。 |
| 4902 |
% \begin{macrocode} |
| 4903 |
defensecommittees .clist_set:N = \l_@@_info_defensecommittees_clist, |
| 4904 |
% \end{macrocode} |
| 4905 |
% \end{macro} |
| 4906 |
% |
| 4907 |
% \begin{macro}{info/defensedate} |
| 4908 |
% 论文答辩日期。 |
| 4909 |
% \begin{macrocode} |
| 4910 |
defensedate .tl_set:N = \l_@@_info_defensedate_tl, |
| 4911 |
% \end{macrocode} |
| 4912 |
% \end{macro} |
| 4913 |
% |
| 4914 |
% \begin{macro}{info/foundation} |
| 4915 |
% 资助项目,每个项目包含项目类型、项目名称、项目编号。 |
| 4916 |
% \begin{macrocode} |
| 4917 |
foundation .clist_set:N = \l_@@_info_foundation_clist, |
| 4918 |
% \end{macrocode} |
| 4919 |
% \end{macro} |
| 4920 |
% |
| 4921 |
% \begin{macro}{info/department,info/department*} |
| 4922 |
% 院系。 |
| 4923 |
% \begin{macrocode} |
| 4924 |
department .tl_set:N = \l_@@_info_department_tl, |
| 4925 |
department* .tl_set:N = \l_@@_info_department_en_tl, |
| 4926 |
% \end{macrocode} |
| 4927 |
% \end{macro} |
| 4928 |
% |
| 4929 |
% \begin{macro}{info/major,info/major*} |
| 4930 |
% 专业。 |
| 4931 |
% \begin{macrocode} |
| 4932 |
major .tl_set:N = \l_@@_info_major_tl, |
| 4933 |
major* .tl_set:N = \l_@@_info_major_en_tl, |
| 4934 |
% \end{macrocode} |
| 4935 |
% \end{macro} |
| 4936 |
% |
| 4937 |
% \changes{v2.02}{2026/05/09}{将本科生申请学科类别选项名称修改为\opt{btitle}。} |
| 4938 |
% \changes{v2.00}{2026/04/29}{添加本科申请学位类别选项。} |
| 4939 |
% |
| 4940 |
% \begin{macro}{info/btitle} |
| 4941 |
% 学士学位类型名称(农学、工学、理学、法学、文学、管理学等),仅本科需要。 |
| 4942 |
% \begin{macrocode} |
| 4943 |
btitle .tl_set:N = \l_@@_info_bachelor_title_tl, |
| 4944 |
% \end{macrocode} |
| 4945 |
% \end{macro} |
| 4946 |
% |
| 4947 |
% \begin{macro}{info/mastertype} |
| 4948 |
% 学位类型英文名称(现区分学博与专博,但考虑接口稳定性,暂不修改)。 |
| 4949 |
% \begin{macrocode} |
| 4950 |
mastertype .tl_set:N = \l_@@_info_mastertype_en_tl, |
| 4951 |
% \end{macrocode} |
| 4952 |
% \end{macro} |
| 4953 |
% |
| 4954 |
% \begin{macro}{info/researchfield,info/researchfield*} |
| 4955 |
% 研究方向,仅博士、学历硕士需要。 |
| 4956 |
% \begin{macrocode} |
| 4957 |
researchfield .tl_set:N = \l_@@_info_researchfield_tl, |
| 4958 |
researchfield* .tl_set:N = \l_@@_info_researchfield_en_tl, |
| 4959 |
% \end{macrocode} |
| 4960 |
% \end{macro} |
| 4961 |
% |
| 4962 |
% \changes{v2.02}{2026/05/09}{将专业学位类型选项名称修改为\opt{engtitle}。} |
| 4963 |
% |
| 4964 |
% \begin{macro}{info/engtitle,info/engtitle*} |
| 4965 |
% 专业学位类型,仅专业学位研究生需要。 |
| 4966 |
% \begin{macrocode} |
| 4967 |
engtitle .tl_set:N = \l_@@_info_engineering_title_tl, |
| 4968 |
engtitle* .tl_set:N = \l_@@_info_engineering_title_en_tl, |
| 4969 |
% \end{macrocode} |
| 4970 |
% \end{macro} |
| 4971 |
% |
| 4972 |
% \changes{v2.02}{2026/05/09}{将专业学位领域选项名称修改为\opt{engfield}。} |
| 4973 |
% |
| 4974 |
% \begin{macro}{info/engfield,info/engfield*} |
| 4975 |
% 领域名称,仅专业学位研究生需要。 |
| 4976 |
% \begin{macrocode} |
| 4977 |
engfield .tl_set:N = \l_@@_info_engineeringfield_tl, |
| 4978 |
engfield* .tl_set:N = \l_@@_info_engineeringfield_en_tl, |
| 4979 |
% \end{macrocode} |
| 4980 |
% \end{macro} |
| 4981 |
% |
| 4982 |
% \begin{macro}{info/class-id} |
| 4983 |
% 班级号。仅本科需要 |
| 4984 |
% \begin{macrocode} |
| 4985 |
class-id .tl_set:N = \l_@@_info_class_id_tl, |
| 4986 |
% \end{macrocode} |
| 4987 |
% \end{macro} |
| 4988 |
% |
| 4989 |
% \begin{macro}{info/student-id} |
| 4990 |
% 学号。 |
| 4991 |
% \begin{macrocode} |
| 4992 |
student-id .tl_set:N = \l_@@_info_student_id_tl, |
| 4993 |
% \end{macrocode} |
| 4994 |
% \end{macro} |
| 4995 |
% |
| 4996 |
% \begin{macro}{info/school-id} |
| 4997 |
% 学校代码。 |
| 4998 |
% \begin{macrocode} |
| 4999 |
school-id .tl_set:N = \l_@@_info_school_id_tl, |
| 5000 |
% \end{macrocode} |
| 5001 |
% \end{macro} |
| 5002 |
% |
| 5003 |
% \begin{macro}{info/clc} |
| 5004 |
% 中图分类号。 |
| 5005 |
% \begin{macrocode} |
| 5006 |
clc .tl_set:N = \l_@@_info_clc_tl, |
| 5007 |
% \end{macrocode} |
| 5008 |
% \end{macro} |
| 5009 |
% |
| 5010 |
% \begin{macro}{info/udc} |
| 5011 |
% UDC码。 |
| 5012 |
% \begin{macrocode} |
| 5013 |
udc .tl_set:N = \l_@@_info_udc_tl, |
| 5014 |
} |
| 5015 |
% \end{macrocode} |
| 5016 |
% \end{macro} |
| 5017 |
% |
| 5018 |
% \begin{variable}{\l_@@_cover_logo_tl,\l_@@_cover_logo_size_clist} |
| 5019 |
% \begin{macrocode} |
| 5020 |
\tl_new:N \l_@@_cover_logo_tl |
| 5021 |
\clist_new:N \l_@@_cover_logo_size_clist |
| 5022 |
% \end{macrocode} |
| 5023 |
% \end{variable} |
| 5024 |
% |
| 5025 |
% \begin{macro}{style/logo,style/logo-size} |
| 5026 |
% 校名图片的文件名和尺寸。 |
| 5027 |
% \begin{macrocode} |
| 5028 |
\keys_define:nn { nwafu / style } |
| 5029 |
{ |
| 5030 |
logo .tl_set:N = \l_@@_cover_logo_tl, |
| 5031 |
logo-size .clist_set:N = \l_@@_cover_logo_size_clist |
| 5032 |
} |
| 5033 |
% \end{macrocode} |
| 5034 |
% \end{macro} |
| 5035 |
% |
| 5036 |
% \subsubsection{密级} |
| 5037 |
% |
| 5038 |
% \begin{variable}{\l_@@_info_secret_level_tl} |
| 5039 |
% 保存当前的密级。 |
| 5040 |
% \begin{macrocode} |
| 5041 |
\tl_new:N \l_@@_info_secret_level_tl |
| 5042 |
% \end{macrocode} |
| 5043 |
% \end{variable} |
| 5044 |
% |
| 5045 |
% \begin{macrocode} |
| 5046 |
\keys_define:nn { nwafu / info } |
| 5047 |
{ |
| 5048 |
% \end{macrocode} |
| 5049 |
% |
| 5050 |
% \begin{macro}{info/secret-level} |
| 5051 |
% 密级。\opt{none} 表示公开,\opt{i}和\opt{ii}分别为限制和秘密。 |
| 5052 |
% \begin{macrocode} |
| 5053 |
secret-level .choice:, |
| 5054 |
secret-level .value_required:n = true, |
| 5055 |
secret-level .choices:nn = |
| 5056 |
{ none, i, ii } |
| 5057 |
{ |
| 5058 |
\tl_set:Nx \l_@@_info_secret_level_tl |
| 5059 |
{ |
| 5060 |
\clist_item:Nn \c_@@_secret_clist { \l_keys_choice_int } |
| 5061 |
} |
| 5062 |
}, |
| 5063 |
secret-level .initial:n = none, |
| 5064 |
} |
| 5065 |
% \end{macrocode} |
| 5066 |
% \end{macro} |
| 5067 |
% |
| 5068 |
% \subsubsection{内部函数} |
| 5069 |
% |
| 5070 |
% \begin{macro}{\@@_spread_box:nn,\@@_spread_box:Vn,\@@_spread_box:nV} |
| 5071 |
% 分散对齐的水平盒子。 |
| 5072 |
% \begin{arguments} |
| 5073 |
% \item 宽度 |
| 5074 |
% \item 内容 |
| 5075 |
% \end{arguments} |
| 5076 |
% 利用 \cs{tl_map_inline:nn} 在字符间插入 \tn{hfil};紧随其后的 \tn{unskip} |
| 5077 |
% 将会去掉最后一个 \tn{hfil}。见 \url{https://tex.stackexchange.com/q/169689}。 |
| 5078 |
% |#2| 需要完全展开以避免 underfull 警告。 |
| 5079 |
% \begin{macrocode} |
| 5080 |
\cs_new_protected:Npn \@@_spread_box:nn #1#2 |
| 5081 |
{ |
| 5082 |
\mode_leave_vertical: |
| 5083 |
\hbox_to_wd:nn {#1} |
| 5084 |
{ \tl_map_inline:xn {#2} { ##1 \hfil } \unskip } |
| 5085 |
} |
| 5086 |
\cs_generate_variant:Nn \@@_spread_box:nn { Vn } |
| 5087 |
\cs_generate_variant:Nn \@@_spread_box:nn { nV } |
| 5088 |
% \end{macrocode} |
| 5089 |
% \end{macro} |
| 5090 |
% |
| 5091 |
% \changes{v2.00}{2026/04/29}{添加下划线居中盒子函数。} |
| 5092 |
% |
| 5093 |
% \begin{macro}{\@@_center_box:nn,\@@_center_box:Vn} |
| 5094 |
% 居中对齐的水平盒子。 |
| 5095 |
% \begin{macrocode} |
| 5096 |
\cs_new_protected:Npn \@@_center_box:nn #1#2 |
| 5097 |
{ |
| 5098 |
\mode_leave_vertical: |
| 5099 |
\dim_set:Nn \l_@@_tmpt_dim {#1} |
| 5100 |
\dim_add:Nn \l_@@_tmpt_dim {0.6em} |
| 5101 |
\hbox_to_wd:nn {\l_@@_tmpt_dim} { \hfil #2 \hfil } |
| 5102 |
} |
| 5103 |
\cs_generate_variant:Nn \@@_center_box:nn { Vn } |
| 5104 |
% \end{macrocode} |
| 5105 |
% \end{macro} |
| 5106 |
% |
| 5107 |
% \begin{macro}{\@@_center_box_uline:nn,\@@_center_box_uline:Vn} |
| 5108 |
% 居中对齐的下划线水平盒子。 |
| 5109 |
% \begin{macrocode} |
| 5110 |
\cs_new_protected:Npn \@@_center_box_uline:nn #1#2 |
| 5111 |
{ |
| 5112 |
\mode_leave_vertical: |
| 5113 |
\dim_set:Nn \l_@@_tmpt_dim {#1} |
| 5114 |
\dim_add:Nn \l_@@_tmpt_dim {0.6em} |
| 5115 |
\makebox[0cm][l]{\rule[-0.5ex]{\l_@@_tmpt_dim}{0.4 pt}} |
| 5116 |
\hbox_to_wd:nn {\l_@@_tmpt_dim} { \hfil #2 \hfil } |
| 5117 |
} |
| 5118 |
\cs_generate_variant:Nn \@@_center_box_uline:nn { Vn } |
| 5119 |
% \end{macrocode} |
| 5120 |
% \end{macro} |
| 5121 |
% |
| 5122 |
% \begin{macro}{\@@_fixed_width_box:nn,\@@_fixed_width_box:Vn} |
| 5123 |
% 限宽盒子(允许换行)。 |
| 5124 |
% \begin{macrocode} |
| 5125 |
\cs_new:Npn \@@_fixed_width_box:nn #1#2 |
| 5126 |
{ \parbox {#1} {#2} } |
| 5127 |
\cs_generate_variant:Nn \@@_fixed_width_box:nn { Vn } |
| 5128 |
% \end{macrocode} |
| 5129 |
% \end{macro} |
| 5130 |
% |
| 5131 |
% \begin{macro}{\@@_fixed_width_center_box:nn} |
| 5132 |
% 居中对齐的限宽盒子(允许换行)。 |
| 5133 |
% \begin{macrocode} |
| 5134 |
\cs_new:Npn \@@_fixed_width_center_box:nn #1#2 |
| 5135 |
{ \parbox {#1} { \centering #2 } } |
| 5136 |
% \end{macrocode} |
| 5137 |
% \end{macro} |
| 5138 |
% |
| 5139 |
% \begin{macro}{\@@_get_text_width:Nn,\@@_get_text_width:NV} |
| 5140 |
% 获取文本宽度,并存入 |dim| 型变量。 |
| 5141 |
% \begin{arguments} |
| 5142 |
% \item |dim| 型变量 |
| 5143 |
% \item 内容 |
| 5144 |
% \end{arguments} |
| 5145 |
% \begin{macrocode} |
| 5146 |
\cs_new:Npn \@@_get_text_width:Nn #1#2 |
| 5147 |
{ |
| 5148 |
\hbox_set:Nn \l_@@_tmpa_box {#2} |
| 5149 |
\dim_set:Nn #1 { \box_wd:N \l_@@_tmpa_box } |
| 5150 |
} |
| 5151 |
\cs_generate_variant:Nn \@@_get_text_width:Nn { NV } |
| 5152 |
\cs_generate_variant:Nn \@@_get_text_width:Nn { Nx } |
| 5153 |
% \end{macrocode} |
| 5154 |
% \end{macro} |
| 5155 |
% |
| 5156 |
% \begin{macro}{\@@_get_max_text_width:NN} |
| 5157 |
% 获取多个文本中的最大宽度,并存入 |dim| 型变量。 |
| 5158 |
% \begin{arguments} |
| 5159 |
% \item |dim| 型变量 |
| 5160 |
% \item 文本 |clist| |
| 5161 |
% \end{arguments} |
| 5162 |
% 当 \cs{l_@@_tmpa_clist} 非空时,弹出最后一个元素 |
| 5163 |
% 赋给 \cs{l_@@_tmpa_tl},获取其长度后与 |#1| 进行比较, |
| 5164 |
% 二者中较大的那一个将成为 |#1| 的新值。 |
| 5165 |
% 不断循环,直至 \cs{l_@@_tmpa_clist} 为空。 |
| 5166 |
% \begin{macrocode} |
| 5167 |
\cs_new:Npn \@@_get_max_text_width:NN #1#2 |
| 5168 |
{ |
| 5169 |
% \end{macrocode} |
| 5170 |
% 这里用 |group| 确保局部变量不会被污染。 |
| 5171 |
% \begin{macrocode} |
| 5172 |
\group_begin: |
| 5173 |
\dim_set:Nn #1 {-999pt} |
| 5174 |
\clist_set_eq:NN \l_@@_tmpt_clist #2 |
| 5175 |
\bool_until_do:nn { \clist_if_empty_p:N \l_@@_tmpt_clist } |
| 5176 |
{ |
| 5177 |
\clist_pop:NN \l_@@_tmpt_clist \l_@@_tmpt_tl |
| 5178 |
\@@_get_text_width:NV \l_@@_tmpt_dim \l_@@_tmpt_tl |
| 5179 |
\dim_gset:Nn #1 { \dim_max:nn {#1} { \l_@@_tmpt_dim } } |
| 5180 |
} |
| 5181 |
\group_end: |
| 5182 |
} |
| 5183 |
% \end{macrocode} |
| 5184 |
% \end{macro} |
| 5185 |
% |
| 5186 |
% \begin{macro}{\@@_blank_underline:n} |
| 5187 |
% 下划线占位符。|#1|: 长度。 |
| 5188 |
% \begin{macrocode} |
| 5189 |
\cs_new:Npn \@@_blank_underline:n #1 |
| 5190 |
{ \rule [ -0.5 ex ] {#1} { 0.4 pt } } |
| 5191 |
\cs_generate_variant:Nn \@@_blank_underline:n { V } |
| 5192 |
% \end{macrocode} |
| 5193 |
% \end{macro} |
| 5194 |
% |
| 5195 |
% \begin{macro}{\@@_text_uline:n,\@@_text_uline:V} |
| 5196 |
% 下划线文字。|#1|: 文字。 |
| 5197 |
% \begin{macrocode} |
| 5198 |
\cs_new:Npn \@@_text_uline:n #1 |
| 5199 |
{ |
| 5200 |
\@@_get_text_width:Nn \l_@@_tmpt_dim {#1} |
| 5201 |
\dim_add:Nn \l_@@_tmpt_dim {0.6em} |
| 5202 |
\makebox[0cm][l]{\rule[-0.5ex]{\l_@@_tmpt_dim}{0.4 pt}} |
| 5203 |
\rule{.3em}{0cm}#1\rule{.3em}{0cm} |
| 5204 |
} |
| 5205 |
\cs_generate_variant:Nn \@@_text_uline:n { V } |
| 5206 |
% \end{macrocode} |
| 5207 |
% \end{macro} |
| 5208 |
% |
| 5209 |
% \begin{macro}{\@@_line_spread:N,\@@_line_spread:n} |
| 5210 |
% 设置行距。|#1|: 行距倍数 |fp| 变量。 |
| 5211 |
% \begin{macrocode} |
| 5212 |
\cs_new:Npn \@@_line_spread:N #1 |
| 5213 |
{ \linespread { \fp_use:N #1 } \selectfont } |
| 5214 |
\cs_new:Npn \@@_line_spread:n #1 |
| 5215 |
{ \linespread {#1} \selectfont } |
| 5216 |
% \end{macrocode} |
| 5217 |
% \end{macro} |
| 5218 |
% |
| 5219 |
% \changes{v2.00}{2026/05/06}{添加学校名称动态宏。} |
| 5220 |
% |
| 5221 |
% \begin{macro}{\@@_name_simp:,\@@_name_trad:,\@@_name_en:} |
| 5222 |
% 学校名称动态宏,根据是否盲审确定是否进行匿名处理。 |
| 5223 |
% \begin{macrocode} |
| 5224 |
\cs_new:Npn \@@_name_simp: |
| 5225 |
{ |
| 5226 |
\bool_if:NTF \g_@@_anonymous_bool |
| 5227 |
{ **************** } |
| 5228 |
{ 西北农林科技大学 } |
| 5229 |
} |
| 5230 |
\cs_new:Npn \@@_name_trad: |
| 5231 |
{ |
| 5232 |
\bool_if:NTF \g_@@_anonymous_bool |
| 5233 |
{ **************** } |
| 5234 |
{ 西北農林科技大學 } |
| 5235 |
} |
| 5236 |
\cs_new:Npn \@@_name_en: |
| 5237 |
{ |
| 5238 |
\bool_if:NTF \g_@@_anonymous_bool |
| 5239 |
{ ********************* } |
| 5240 |
{ Northwest~ A\&F~ University } |
| 5241 |
} |
| 5242 |
% \end{macrocode} |
| 5243 |
% \end{macro} |
| 5244 |
% |
| 5245 |
% \subsubsection{字段元素元数据列表} |
| 5246 |
% |
| 5247 |
% \changes{v2.02}{2026/05/08}{添加封面信息字段元数据定义。} |
| 5248 |
% |
| 5249 |
% 字段描述符格式:|{|标签宏|}{|内容宏|}{|盲审隐藏标记|}{|特殊处理标记|}|\par |
| 5250 |
% 特殊处理标记:0=普通, 1=导师(需格式化), 2=合作导师/指导小组(需格式化+空值跳过检查), 3=日期等非隐藏字段\par |
| 5251 |
% \begin{variable}{\c_@@_cover_brief_doctor_academic_clist, |
| 5252 |
% \c_@@_cover_brief_doctor_engineering_clist, |
| 5253 |
% \c_@@_cover_brief_master_academic_clist, |
| 5254 |
% \c_@@_cover_brief_master_engineering_clist, |
| 5255 |
% \c_@@_cover_brief_bachelor_clist} |
| 5256 |
% 学术博士学位论文封面简要作者信息元数据列表: |
| 5257 |
% \begin{macrocode} |
| 5258 |
\clist_const:Nn \c_@@_cover_brief_doctor_academic_clist |
| 5259 |
{ |
| 5260 |
{ \c_@@_name_authorbrief_tl } { \l_@@_info_author_tl } { 1 } { 0 }, |
| 5261 |
{ \c_@@_name_supervisor_tl } { \l_@@_info_supervisor_tl } { 1 } { 1 } |
| 5262 |
} |
| 5263 |
% \end{macrocode} |
| 5264 |
% 专业学位博士学位论文封面简要作者信息元数据列表: |
| 5265 |
% \begin{macrocode} |
| 5266 |
\clist_const:Nn \c_@@_cover_brief_doctor_engineering_clist |
| 5267 |
{ |
| 5268 |
{ \c_@@_name_authorbrief_tl } { \l_@@_info_author_tl } { 1 } { 0 }, |
| 5269 |
{ \c_@@_name_supervisor_tl } { \l_@@_info_supervisor_tl } { 1 } { 1 } |
| 5270 |
} |
| 5271 |
% \end{macrocode} |
| 5272 |
% 学术硕士学位论文封面简要作者信息元数据列表: |
| 5273 |
% \begin{macrocode} |
| 5274 |
\clist_const:Nn \c_@@_cover_brief_master_academic_clist |
| 5275 |
{ |
| 5276 |
{ \c_@@_name_authorbrief_tl } { \l_@@_info_author_tl } { 1 } { 0 }, |
| 5277 |
{ \c_@@_name_supervisor_tl } { \l_@@_info_supervisor_tl } { 1 } { 1 } |
| 5278 |
} |
| 5279 |
% \end{macrocode} |
| 5280 |
% 专业学位硕士学位论文封面简要作者信息元数据列表: |
| 5281 |
% \begin{macrocode} |
| 5282 |
\clist_const:Nn \c_@@_cover_brief_master_engineering_clist |
| 5283 |
{ |
| 5284 |
{ \c_@@_name_authorbrief_tl } { \l_@@_info_author_tl } { 1 } { 0 }, |
| 5285 |
{ \c_@@_name_supervisor_tl } { \l_@@_info_supervisor_tl } { 1 } { 1 } |
| 5286 |
} |
| 5287 |
% \end{macrocode} |
| 5288 |
% 本科学位论文封面简要作者信息元数据列表: |
| 5289 |
% \begin{macrocode} |
| 5290 |
\clist_const:Nn \c_@@_cover_brief_bachelor_clist |
| 5291 |
{ |
| 5292 |
{ \c_@@_name_authorbrief_tl } { \l_@@_info_author_tl } { 1 } { 0 }, |
| 5293 |
{ \c_@@_name_supervisor_tl } { \l_@@_info_supervisor_tl } { 1 } { 1 } |
| 5294 |
} |
| 5295 |
% \end{macrocode} |
| 5296 |
% \end{variable} |
| 5297 |
% |
| 5298 |
% \begin{variable}{\c_@@_cover_detail_doctor_academic_clist, |
| 5299 |
% \c_@@_cover_detail_doctor_engineering_clist, |
| 5300 |
% \c_@@_cover_detail_master_academic_clist, |
| 5301 |
% \c_@@_cover_detail_master_engineering_clist, |
| 5302 |
% \c_@@_cover_detail_bachelor_clist} |
| 5303 |
% 学术博士学位论文封面详细作者信息元数据列表: |
| 5304 |
% \begin{macrocode} |
| 5305 |
\clist_const:Nn \c_@@_cover_detail_doctor_academic_clist |
| 5306 |
{ |
| 5307 |
{ \c_@@_name_department_tl } { \l_@@_info_department_tl } { 0 } { 0 }, |
| 5308 |
{ \c_@@_name_major_tl } { \l_@@_info_major_tl } { 0 } { 0 }, |
| 5309 |
{ \c_@@_name_author_tl } { \l_@@_info_author_tl } { 1 } { 0 }, |
| 5310 |
{ \c_@@_name_supervisor_tl } { \l_@@_info_supervisor_tl } { 1 } { 1 }, |
| 5311 |
{ \c_@@_name_cosupervisor_tl } { \l_@@_info_cosupervisor_tl } { 1 } { 2 } |
| 5312 |
} |
| 5313 |
% \end{macrocode} |
| 5314 |
% 专业学位博士学位论文封面详细作者信息元数据列表: |
| 5315 |
% \begin{macrocode} |
| 5316 |
\clist_const:Nn \c_@@_cover_detail_doctor_engineering_clist |
| 5317 |
{ |
| 5318 |
{ \c_@@_name_department_tl } { \l_@@_info_department_tl } { 0 } { 0 }, |
| 5319 |
{ \c_@@_name_engineering_title_tl } { \l_@@_info_engineering_title_tl } { 0 } { 0 }, |
| 5320 |
{ \c_@@_name_engineeringfield_tl } { \l_@@_info_engineeringfield_tl } { 0 } { 0 }, |
| 5321 |
{ \c_@@_name_author_tl } { \l_@@_info_author_tl } { 1 } { 0 }, |
| 5322 |
{ \c_@@_name_supervisor_tl } { \l_@@_info_supervisor_tl } { 1 } { 1 }, |
| 5323 |
{ \c_@@_name_cosupervisor_tl } { \l_@@_info_cosupervisor_tl } { 1 } { 2 }, |
| 5324 |
} |
| 5325 |
% \end{macrocode} |
| 5326 |
% 学术硕士学位论文封面详细作者信息元数据列表: |
| 5327 |
% \begin{macrocode} |
| 5328 |
\clist_const:Nn \c_@@_cover_detail_master_academic_clist |
| 5329 |
{ |
| 5330 |
{ \c_@@_name_department_tl } { \l_@@_info_department_tl } { 0 } { 0 }, |
| 5331 |
{ \c_@@_name_major_tl } { \l_@@_info_major_tl } { 0 } { 0 }, |
| 5332 |
{ \c_@@_name_author_tl } { \l_@@_info_author_tl } { 1 } { 0 }, |
| 5333 |
{ \c_@@_name_supervisor_tl } { \l_@@_info_supervisor_tl } { 1 } { 1 }, |
| 5334 |
{ \c_@@_name_cosupervisor_tl } { \l_@@_info_cosupervisor_tl } { 1 } { 2 } |
| 5335 |
} |
| 5336 |
% \end{macrocode} |
| 5337 |
% 专业学位硕士学位论文封面详细作者信息元数据列表: |
| 5338 |
% \begin{macrocode} |
| 5339 |
\clist_const:Nn \c_@@_cover_detail_master_engineering_clist |
| 5340 |
{ |
| 5341 |
{ \c_@@_name_department_tl } { \l_@@_info_department_tl } { 0 } { 0 }, |
| 5342 |
{ \c_@@_name_engineering_title_tl } { \l_@@_info_engineering_title_tl } { 0 } { 0 }, |
| 5343 |
{ \c_@@_name_engineeringfield_tl } { \l_@@_info_engineeringfield_tl } { 0 } { 0 }, |
| 5344 |
{ \c_@@_name_author_tl } { \l_@@_info_author_tl } { 1 } { 0 }, |
| 5345 |
{ \c_@@_name_supervisor_tl } { \l_@@_info_supervisor_tl } { 1 } { 1 }, |
| 5346 |
{ \c_@@_name_cosupervisor_tl } { \l_@@_info_cosupervisor_tl } { 1 } { 2 }, |
| 5347 |
} |
| 5348 |
% \end{macrocode} |
| 5349 |
% 本科学位论文封面详细作者信息元数据列表: |
| 5350 |
% \begin{macrocode} |
| 5351 |
\clist_const:Nn \c_@@_cover_detail_bachelor_clist |
| 5352 |
{ |
| 5353 |
{ \c_@@_name_author_tl } { \l_@@_info_author_tl } { 1 } { 0 }, |
| 5354 |
{ \c_@@_name_supervisor_tl } { \l_@@_info_supervisor_tl } { 1 } { 1 }, |
| 5355 |
{ \c_@@_name_cosupervisor_tl } { \l_@@_info_cosupervisor_tl } { 1 } { 2 }, |
| 5356 |
{ \c_@@_name_bachelor_title_tl } { \l_@@_info_bachelor_title_tl } { 0 } { 0 }, |
| 5357 |
{ \c_@@_name_major_tl } { \l_@@_info_major_tl } { 0 } { 0 }, |
| 5358 |
{ \c_@@_name_department_tl } { \l_@@_info_department_tl } { 0 } { 0 } |
| 5359 |
} |
| 5360 |
% \end{macrocode} |
| 5361 |
% \end{variable} |
| 5362 |
% |
| 5363 |
% \begin{variable}{\c_@@_cover_detail_en_doctor_academic_clist, |
| 5364 |
% \c_@@_cover_detail_en_doctor_engineering_clist, |
| 5365 |
% \c_@@_cover_detail_en_master_academic_clist, |
| 5366 |
% \c_@@_cover_detail_en_master_engineering_clist} |
| 5367 |
% 学术博士学位论文英文封面详细作者信息元数据列表: |
| 5368 |
% \begin{macrocode} |
| 5369 |
\clist_const:Nn \c_@@_cover_detail_en_doctor_academic_clist |
| 5370 |
{ |
| 5371 |
{ \c_@@_name_department_en_tl } { \l_@@_info_department_en_tl } { 0 } { 0 }, |
| 5372 |
{ \c_@@_name_major_en_tl } { \l_@@_info_major_en_tl } { 0 } { 0 }, |
| 5373 |
{ \c_@@_name_author_en_tl } { \l_@@_info_author_en_tl } { 1 } { 0 }, |
| 5374 |
{ \c_@@_name_supervisor_en_tl } { \l_@@_info_supervisor_en_tl } { 1 } { 1 }, |
| 5375 |
{ \c_@@_name_cosupervisor_en_tl } { \l_@@_info_cosupervisor_en_tl } { 1 } { 2 } |
| 5376 |
} |
| 5377 |
% \end{macrocode} |
| 5378 |
% 专业学位博士学位论文英文封面详细作者信息元数据列表: |
| 5379 |
% \begin{macrocode} |
| 5380 |
\clist_const:Nn \c_@@_cover_detail_en_doctor_engineering_clist |
| 5381 |
{ |
| 5382 |
{ \c_@@_name_department_en_tl } { \l_@@_info_department_en_tl } { 0 } { 0 }, |
| 5383 |
{ \c_@@_name_major_en_tl } { \l_@@_info_major_en_tl } { 0 } { 0 }, |
| 5384 |
{ \c_@@_name_author_en_tl } { \l_@@_info_author_en_tl } { 1 } { 0 }, |
| 5385 |
{ \c_@@_name_supervisor_en_tl } { \l_@@_info_supervisor_en_tl } { 1 } { 1 }, |
| 5386 |
{ \c_@@_name_cosupervisor_en_tl } { \l_@@_info_cosupervisor_en_tl } { 1 } { 2 } |
| 5387 |
} |
| 5388 |
% \end{macrocode} |
| 5389 |
% 学术硕士学位论文英文封面详细作者信息元数据列表: |
| 5390 |
% \begin{macrocode} |
| 5391 |
\clist_const:Nn \c_@@_cover_detail_en_master_academic_clist |
| 5392 |
{ |
| 5393 |
{ \c_@@_name_department_en_tl } { \l_@@_info_department_en_tl } { 0 } { 0 }, |
| 5394 |
{ \c_@@_name_major_en_tl } { \l_@@_info_major_en_tl } { 0 } { 0 }, |
| 5395 |
{ \c_@@_name_author_en_tl } { \l_@@_info_author_en_tl } { 1 } { 0 }, |
| 5396 |
{ \c_@@_name_supervisor_en_tl } { \l_@@_info_supervisor_en_tl } { 1 } { 1 }, |
| 5397 |
{ \c_@@_name_cosupervisor_en_tl } { \l_@@_info_cosupervisor_en_tl } { 1 } { 2 } |
| 5398 |
} |
| 5399 |
% \end{macrocode} |
| 5400 |
% 专业学位硕士学位论文英文封面详细作者信息元数据列表: |
| 5401 |
% \begin{macrocode} |
| 5402 |
\clist_const:Nn \c_@@_cover_detail_en_master_engineering_clist |
| 5403 |
{ |
| 5404 |
{ \c_@@_name_department_en_tl } { \l_@@_info_department_en_tl } { 0 } { 0 }, |
| 5405 |
{ \c_@@_name_major_en_tl } { \l_@@_info_major_en_tl } { 0 } { 0 }, |
| 5406 |
{ \c_@@_name_author_en_tl } { \l_@@_info_author_en_tl } { 1 } { 0 }, |
| 5407 |
{ \c_@@_name_supervisor_en_tl } { \l_@@_info_supervisor_en_tl } { 1 } { 1 }, |
| 5408 |
{ \c_@@_name_cosupervisor_en_tl } { \l_@@_info_cosupervisor_en_tl } { 1 } { 2 } |
| 5409 |
} |
| 5410 |
% \end{macrocode} |
| 5411 |
% \end{variable} |
| 5412 |
% |
| 5413 |
% \begin{variable}{\c_@@_cover_doctor_instructors_clist, |
| 5414 |
% \c_@@_cover_master_instructors_clist} |
| 5415 |
% 博士题名页签名栏作者信息元数据列表 |
| 5416 |
% \begin{macrocode} |
| 5417 |
\clist_const:Nn \c_@@_cover_doctor_instructors_clist |
| 5418 |
{ |
| 5419 |
{ \c_@@_name_author_tl } { \l_@@_info_author_tl } { 1 } { 0 }, |
| 5420 |
{ \c_@@_name_supervisor_tl } { \l_@@_info_supervisor_tl } { 1 } { 1 }, |
| 5421 |
{ \c_@@_name_instructors_tl } { \l_@@_info_instructors_clist } { 1 } { 2 } |
| 5422 |
} |
| 5423 |
% \end{macrocode} |
| 5424 |
% 硕士题名页签名栏作者信息元数据列表 |
| 5425 |
% \begin{macrocode} |
| 5426 |
\clist_const:Nn \c_@@_cover_master_instructors_clist |
| 5427 |
{ |
| 5428 |
{ \c_@@_name_author_tl } { \l_@@_info_author_tl } { 1 } { 0 }, |
| 5429 |
{ \c_@@_name_supervisor_tl } { \l_@@_info_supervisor_tl } { 1 } { 1 }, |
| 5430 |
} |
| 5431 |
% \end{macrocode} |
| 5432 |
% \end{variable} |
| 5433 |
% |
| 5434 |
% \begin{variable}{\c_@@_cover_grad_id_clist, c_@@_cover_bachelor_id_clist} |
| 5435 |
% 封面ID元数据列表\par |
| 5436 |
% \textbf{注意}: 需要从左到右、从上到下布置ID元数据 |
| 5437 |
% \begin{macrocode} |
| 5438 |
\clist_const:Nn \c_@@_cover_grad_id_clist |
| 5439 |
{ |
| 5440 |
{ \c_@@_name_clc_tl } { \l_@@_info_clc_tl } { 0 } { 0 }, |
| 5441 |
{ \c_@@_name_school_id_tl } { \l_@@_info_school_id_tl } { 1 } { 0 }, |
| 5442 |
{ \c_@@_name_udc_tl } { \l_@@_info_udc_tl } { 0 } { 0 }, |
| 5443 |
{ \c_@@_name_secret_level_tl } { \l_@@_info_secret_level_tl } { 0 } { 0 }, |
| 5444 |
{ \c_@@_name_student_id_tl } { \l_@@_info_student_id_tl } { 1 } { 0 } |
| 5445 |
} |
| 5446 |
|
| 5447 |
\clist_const:Nn \c_@@_cover_bachelor_id_clist |
| 5448 |
{ |
| 5449 |
{ \c_@@_name_student_id_tl } { \l_@@_info_student_id_tl } { 1 } { 0 } |
| 5450 |
} |
| 5451 |
% \end{macrocode} |
| 5452 |
% \end{variable} |
| 5453 |
% |
| 5454 |
% \subsubsection{元数据处理辅助函数} |
| 5455 |
% |
| 5456 |
% \changes{v2.02}{2026/05/08}{添加封面信息字段元数据处理辅助函数。} |
| 5457 |
% |
| 5458 |
% \begin{macro}{\@@_select_author_brief_fields:} |
| 5459 |
% 选择简要作者信息元数据列表,结果保存在\l_@@_tmpa_clist变量 |
| 5460 |
% \begin{macrocode} |
| 5461 |
\cs_new_protected:Npn \@@_select_author_brief_fields: |
| 5462 |
{ |
| 5463 |
\int_case:nnF { \g_@@_thesis_type_int } |
| 5464 |
{ |
| 5465 |
% \end{macrocode} |
| 5466 |
% 博士封面简要作者信息元数据 |
| 5467 |
% \begin{macrocode} |
| 5468 |
{1} |
| 5469 |
{ |
| 5470 |
\int_case:nnF { \l_@@_info_postgraduate_type_int } |
| 5471 |
{ |
| 5472 |
% \end{macrocode} |
| 5473 |
% 学术博士封面简要作者信息元数据 |
| 5474 |
% \begin{macrocode} |
| 5475 |
{1} {\clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_brief_doctor_academic_clist } |
| 5476 |
% \end{macrocode} |
| 5477 |
% 专业学位博士封面简要作者信息元数据 |
| 5478 |
% \begin{macrocode} |
| 5479 |
{2} {\clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_brief_doctor_engineering_clist } |
| 5480 |
} |
| 5481 |
% \end{macrocode} |
| 5482 |
% 其它情况,使用学术博士封面简要作者信息元数据 |
| 5483 |
% \begin{macrocode} |
| 5484 |
{ \clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_brief_doctor_academic_clist } |
| 5485 |
} |
| 5486 |
{2} |
| 5487 |
{ |
| 5488 |
\int_case:nnF { \l_@@_info_postgraduate_type_int } |
| 5489 |
{ |
| 5490 |
% \end{macrocode} |
| 5491 |
% 学术硕士封面简要作者信息元数据 |
| 5492 |
% \begin{macrocode} |
| 5493 |
{1} { \clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_brief_master_academic_clist } |
| 5494 |
% \end{macrocode} |
| 5495 |
% 专业学位硕士封面简要作者信息元数据 |
| 5496 |
% \begin{macrocode} |
| 5497 |
{2} { \clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_brief_master_engineering_clist } |
| 5498 |
} |
| 5499 |
% \end{macrocode} |
| 5500 |
% 其它情况,使用学术硕士封面简要作者信息元数据 |
| 5501 |
% \begin{macrocode} |
| 5502 |
{ \clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_brief_master_academic_clist } |
| 5503 |
} |
| 5504 |
% \end{macrocode} |
| 5505 |
% 本科封面简要作者信息元数据 |
| 5506 |
% \begin{macrocode} |
| 5507 |
{3} { \clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_brief_bachelor_clist } |
| 5508 |
} |
| 5509 |
% \end{macrocode} |
| 5510 |
% 学位类型错误,使用空数据 |
| 5511 |
% \begin{macrocode} |
| 5512 |
{ \clist_clear:N \l_@@_tmpa_clist } |
| 5513 |
} |
| 5514 |
% \end{macrocode} |
| 5515 |
% \end{macro} |
| 5516 |
% |
| 5517 |
% \begin{macro}{\@@_select_author_detailed_fields:} |
| 5518 |
% 选择详细作者信息的元数据列表,结果保存在\l_@@_tmpa_clist变量 |
| 5519 |
% \begin{macrocode} |
| 5520 |
\cs_new_protected:Npn \@@_select_author_detailed_fields: |
| 5521 |
{ |
| 5522 |
\int_case:nnF { \g_@@_thesis_type_int } |
| 5523 |
{ |
| 5524 |
% \end{macrocode} |
| 5525 |
% 博士封面详细作者信息元数据 |
| 5526 |
% \begin{macrocode} |
| 5527 |
{1} |
| 5528 |
{ |
| 5529 |
\int_case:nnF { \l_@@_info_postgraduate_type_int } |
| 5530 |
{ |
| 5531 |
% \end{macrocode} |
| 5532 |
% 学术博士封面详细作者信息元数据 |
| 5533 |
% \begin{macrocode} |
| 5534 |
{1} { \clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_detail_doctor_academic_clist } |
| 5535 |
% \end{macrocode} |
| 5536 |
% 专业学位博士封面详细作者信息元数据 |
| 5537 |
% \begin{macrocode} |
| 5538 |
{2} { \clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_detail_doctor_engineering_clist } |
| 5539 |
} |
| 5540 |
% \end{macrocode} |
| 5541 |
% 其它情况,使用学术博士封面详细作者信息元数据 |
| 5542 |
% \begin{macrocode} |
| 5543 |
{ \clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_detail_doctor_academic_clist } |
| 5544 |
} |
| 5545 |
{2} |
| 5546 |
{ |
| 5547 |
\int_case:nnF { \l_@@_info_postgraduate_type_int } |
| 5548 |
{ |
| 5549 |
% \end{macrocode} |
| 5550 |
% 学术硕士封面详细作者信息元数据 |
| 5551 |
% \begin{macrocode} |
| 5552 |
{1} { \clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_detail_master_academic_clist } |
| 5553 |
% \end{macrocode} |
| 5554 |
% 专业学位硕士封面详细作者信息元数据 |
| 5555 |
% \begin{macrocode} |
| 5556 |
{2} { \clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_detail_master_engineering_clist } |
| 5557 |
} |
| 5558 |
% \end{macrocode} |
| 5559 |
% 其它情况,使用学术硕士封面详细作者信息元数据 |
| 5560 |
% \begin{macrocode} |
| 5561 |
{ \clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_detail_master_academic_clist } |
| 5562 |
} |
| 5563 |
% \end{macrocode} |
| 5564 |
% 本科封面详细作者信息元数据 |
| 5565 |
% \begin{macrocode} |
| 5566 |
{3} { \clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_detail_bachelor_clist } |
| 5567 |
} |
| 5568 |
% \end{macrocode} |
| 5569 |
% 学位类型错误,使用空数据 |
| 5570 |
% \begin{macrocode} |
| 5571 |
{ \clist_clear:N \l_@@_tmpa_clist } |
| 5572 |
} |
| 5573 |
% \end{macrocode} |
| 5574 |
% \end{macro} |
| 5575 |
% |
| 5576 |
% \begin{macro}{\@@_select_author_detailed_en_fields:} |
| 5577 |
% 选择英文详细作者信息元数据列表,结果保存在\l_@@_tmpa_clist变量 |
| 5578 |
% \begin{macrocode} |
| 5579 |
\cs_new_protected:Npn \@@_select_author_detailed_en_fields: |
| 5580 |
{ |
| 5581 |
\int_case:nnF { \g_@@_thesis_type_int } |
| 5582 |
{ |
| 5583 |
% \end{macrocode} |
| 5584 |
% 博士英文封面详细作者信息元数据 |
| 5585 |
% \begin{macrocode} |
| 5586 |
{1} |
| 5587 |
{ |
| 5588 |
\int_case:nnF { \l_@@_info_postgraduate_type_int } |
| 5589 |
{ |
| 5590 |
% \end{macrocode} |
| 5591 |
% 学术博士英文封面详细作者信息元数据 |
| 5592 |
% \begin{macrocode} |
| 5593 |
{1} { \clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_detail_en_doctor_academic_clist } |
| 5594 |
% \end{macrocode} |
| 5595 |
% 专业学位博士英文封面详细作者信息元数据 |
| 5596 |
% \begin{macrocode} |
| 5597 |
{2} { \clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_detail_en_doctor_engineering_clist } |
| 5598 |
} |
| 5599 |
% \end{macrocode} |
| 5600 |
% 其它情况,使用学术博士英文封面详细作者信息元数据 |
| 5601 |
% \begin{macrocode} |
| 5602 |
{ \clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_detail_en_doctor_academic_clist } |
| 5603 |
} |
| 5604 |
{2} |
| 5605 |
{ |
| 5606 |
\int_case:nnF { \l_@@_info_postgraduate_type_int } |
| 5607 |
{ |
| 5608 |
% \end{macrocode} |
| 5609 |
% 学术硕士英文封面详细作者信息元数据 |
| 5610 |
% \begin{macrocode} |
| 5611 |
{1} { \clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_detail_en_master_academic_clist } |
| 5612 |
% \end{macrocode} |
| 5613 |
% 专业学位硕士英文封面详细作者信息元数据 |
| 5614 |
% \begin{macrocode} |
| 5615 |
{2} { \clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_detail_en_master_engineering_clist } |
| 5616 |
} |
| 5617 |
% \end{macrocode} |
| 5618 |
% 其它情况,使用学术硕士英文封面详细作者信息元数据 |
| 5619 |
% \begin{macrocode} |
| 5620 |
{ \clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_detail_en_master_academic_clist } |
| 5621 |
} |
| 5622 |
% \end{macrocode} |
| 5623 |
% 本科无英文封面详细作者信息元数据 |
| 5624 |
% \begin{macrocode} |
| 5625 |
{3} { \clist_clear:N \l_@@_tmpa_clist } |
| 5626 |
} |
| 5627 |
% \end{macrocode} |
| 5628 |
% 学位类型错误,使用空数据 |
| 5629 |
% \begin{macrocode} |
| 5630 |
{ \clist_clear:N \l_@@_tmpa_clist } |
| 5631 |
} |
| 5632 |
% \end{macrocode} |
| 5633 |
% \end{macro} |
| 5634 |
% |
| 5635 |
% \begin{macro}{\@@_select_id_fields:} |
| 5636 |
% 选择学号等元数据列表,结果保存在\l_@@_tmpa_clist变量 |
| 5637 |
% \begin{macrocode} |
| 5638 |
\cs_new_protected:Npn \@@_select_id_fields: |
| 5639 |
{ |
| 5640 |
\int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 } |
| 5641 |
{ |
| 5642 |
% \end{macrocode} |
| 5643 |
% 研究生 |
| 5644 |
% \begin{macrocode} |
| 5645 |
\clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_grad_id_clist |
| 5646 |
}{ |
| 5647 |
% \end{macrocode} |
| 5648 |
% 本科生手动生成 |
| 5649 |
% \begin{macrocode} |
| 5650 |
\clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_bachelor_id_clist |
| 5651 |
} |
| 5652 |
} |
| 5653 |
% \end{macrocode} |
| 5654 |
% \end{macro} |
| 5655 |
|
| 5656 |
% \begin{macro}{\@@_select_instructors_fields:} |
| 5657 |
% 选择题名页签名栏字段元数据(目前仅研究生需要) |
| 5658 |
% \begin{macrocode} |
| 5659 |
\cs_new_protected:Npn \@@_select_instructors_fields: |
| 5660 |
{ |
| 5661 |
\int_case:nnF { \g_@@_thesis_type_int } |
| 5662 |
{ |
| 5663 |
% \end{macrocode} |
| 5664 |
% 博士包括作者、导师和指导小组 |
| 5665 |
% \begin{macrocode} |
| 5666 |
{1} { \clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_doctor_instructors_clist } |
| 5667 |
% \end{macrocode} |
| 5668 |
% 硕士仅包括作者和导师 |
| 5669 |
% \begin{macrocode} |
| 5670 |
{2} { \clist_set_eq:NN \l_@@_tmpa_clist \c_@@_cover_master_instructors_clist } |
| 5671 |
% \end{macrocode} |
| 5672 |
% 本科生不使用此函数 |
| 5673 |
% \begin{macrocode} |
| 5674 |
{3} { \clist_clear:N \l_@@_tmpa_clist } |
| 5675 |
} |
| 5676 |
% \end{macrocode} |
| 5677 |
% 类型错误,清空数据 |
| 5678 |
% \begin{macrocode} |
| 5679 |
{ \clist_clear:N \l_@@_tmpa_clist } |
| 5680 |
} |
| 5681 |
% \end{macrocode} |
| 5682 |
% \end{macro} |
| 5683 |
% |
| 5684 |
% \begin{macro}{\@@_get_max_label_width:, |
| 5685 |
% \@@_get_max_value_width:, |
| 5686 |
% \@@_get_max_value_en_width:, |
| 5687 |
% \@@_get_max_instructors_value_width:} |
| 5688 |
% 获取标签列最大宽度函数,结果保存到\l_@@_tmpa_dim变量 |
| 5689 |
% \begin{macrocode} |
| 5690 |
\cs_new_protected:Npn \@@_get_max_label_width: |
| 5691 |
{ |
| 5692 |
\dim_set:Nn \l_@@_tmpa_dim { -999 pt } |
| 5693 |
\clist_map_inline:Nn \l_@@_tmpa_clist |
| 5694 |
{ |
| 5695 |
\exp_args:NnV \@@_get_text_width:Nn \l_@@_tmpt_dim { \exp_after:wN \use_i:nnnn ##1 } |
| 5696 |
\dim_set:Nn \l_@@_tmpa_dim { \dim_max:nn { \l_@@_tmpa_dim } { \l_@@_tmpt_dim } } |
| 5697 |
} |
| 5698 |
} |
| 5699 |
% \end{macrocode} |
| 5700 |
% 获取内容列最大宽度函数,结果保存到\l_@@_tmpb_dim变量 |
| 5701 |
% \begin{macrocode} |
| 5702 |
\cs_new_protected:Npn \@@_get_max_value_width: |
| 5703 |
{ |
| 5704 |
\dim_set:Nn \l_@@_tmpb_dim { -999 pt } |
| 5705 |
\clist_map_inline:Nn \l_@@_tmpa_clist |
| 5706 |
{ |
| 5707 |
% \end{macrocode} |
| 5708 |
% 临时变量:内容的最终显示值(考虑盲审和格式化) |
| 5709 |
% \begin{macrocode} |
| 5710 |
\tl_set:Nx \l_@@_tmpt_tl { \exp_after:wN \use_ii:nnnn ##1 } |
| 5711 |
% \end{macrocode} |
| 5712 |
% 盲审处理 |
| 5713 |
% \begin{macrocode} |
| 5714 |
\bool_if:nT { \g_@@_anonymous_bool && |
| 5715 |
\int_compare_p:nNn { \exp_after:wN \use_iii:nnnn ##1 } = { 1 } } |
| 5716 |
{ \tl_set:Nn \l_@@_tmpt_tl { \c_@@_name_anonname_tl } } |
| 5717 |
% \end{macrocode} |
| 5718 |
% 导师字段特殊处理:需要格式化列表 |
| 5719 |
% \begin{macrocode} |
| 5720 |
\bool_if:nT { \int_compare_p:nNn { \exp_after:wN \use_iv:nnnn ##1 } = { 1 } || |
| 5721 |
\int_compare_p:nNn { \exp_after:wN \use_iv:nnnn ##1 } = { 2 } } |
| 5722 |
{ \@@_format_supervisor_list:N \l_@@_tmpt_tl } |
| 5723 |
% \end{macrocode} |
| 5724 |
% 获取宽度 |
| 5725 |
% \begin{macrocode} |
| 5726 |
\@@_get_text_width:NV \l_@@_tmpt_dim \l_@@_tmpt_tl |
| 5727 |
\dim_set:Nn \l_@@_tmpb_dim |
| 5728 |
{ \dim_max:nn { \l_@@_tmpb_dim } { \l_@@_tmpt_dim } } |
| 5729 |
} |
| 5730 |
} |
| 5731 |
% \end{macrocode} |
| 5732 |
% 获取研究生英文一行内容(标签: 内容)最大宽度,结果保存到\l_@@_tmpb_dim变量 |
| 5733 |
% \begin{macrocode} |
| 5734 |
\cs_new_protected:Npn \@@_get_max_value_en_width: |
| 5735 |
{ |
| 5736 |
\dim_set:Nn \l_@@_tmpb_dim { -999 pt } |
| 5737 |
\clist_map_inline:Nn \l_@@_tmpa_clist |
| 5738 |
{ |
| 5739 |
% \end{macrocode} |
| 5740 |
% 临时变量:内容的最终显示值(考虑盲审和格式化) |
| 5741 |
% \begin{macrocode} |
| 5742 |
\tl_set:Nx \l_@@_tmpt_tl { \exp_after:wN \use_ii:nnnn ##1 } |
| 5743 |
% \end{macrocode} |
| 5744 |
% 盲审处理 |
| 5745 |
% \begin{macrocode} |
| 5746 |
\bool_if:nT { \g_@@_anonymous_bool && |
| 5747 |
\int_compare_p:nNn { \exp_after:wN \use_iii:nnnn ##1 } = { 1 } } |
| 5748 |
{ \tl_set:Nn \l_@@_tmpt_tl { \c_@@_name_anonname_tl } } |
| 5749 |
% \end{macrocode} |
| 5750 |
% 导师字段特殊处理:需要格式化列表 |
| 5751 |
% \begin{macrocode} |
| 5752 |
\bool_if:nT { \int_compare_p:nNn { \exp_after:wN \use_iv:nnnn ##1 } = { 1 } || |
| 5753 |
\int_compare_p:nNn { \exp_after:wN \use_iv:nnnn ##1 } = { 2 } } |
| 5754 |
{ \@@_format_supervisor_list:N \l_@@_tmpt_tl } |
| 5755 |
% \end{macrocode} |
| 5756 |
% 获取宽度 |
| 5757 |
% \begin{macrocode} |
| 5758 |
\@@_get_text_width:Nx \l_@@_tmpt_dim |
| 5759 |
{ \exp_after:wN \use_i:nnnn ##1\c_@@_fwid_colon_tl\l_@@_tmpt_tl } |
| 5760 |
\dim_set:Nn \l_@@_tmpb_dim |
| 5761 |
{ \dim_max:nn { \l_@@_tmpb_dim } { \l_@@_tmpt_dim } } |
| 5762 |
} |
| 5763 |
} |
| 5764 |
% \end{macrocode} |
| 5765 |
% 指导小组特殊宽度计算,结果保存到\l_@@_tmpb_dim变量 |
| 5766 |
% \begin{macrocode} |
| 5767 |
\cs_new_protected:Npn \@@_get_max_instructors_value_width: |
| 5768 |
{ |
| 5769 |
\dim_set:Nn \l_@@_tmpb_dim { -999 pt } |
| 5770 |
\clist_map_inline:Nn \l_@@_tmpa_clist |
| 5771 |
{ |
| 5772 |
% \end{macrocode} |
| 5773 |
% 临时变量:内容的最终显示值(考虑盲审和格式化) |
| 5774 |
% \begin{macrocode} |
| 5775 |
\tl_set:Nx \l_@@_tmpt_tl { \exp_after:wN \use_ii:nnnn ##1 } |
| 5776 |
% \end{macrocode} |
| 5777 |
% 盲审处理 |
| 5778 |
% \begin{macrocode} |
| 5779 |
\bool_if:nT { \g_@@_anonymous_bool && |
| 5780 |
\int_compare_p:nNn { \exp_after:wN \use_iii:nnnn ##1 } = { 1 } } |
| 5781 |
{ \tl_set:Nn \l_@@_tmpt_tl { \c_@@_name_anonname_tl } } |
| 5782 |
% \end{macrocode} |
| 5783 |
% 导师字段格式化 |
| 5784 |
% \begin{macrocode} |
| 5785 |
\bool_if:nT { \int_compare_p:nNn { \exp_after:wN \use_iv:nnnn ##1 } = { 1 } || |
| 5786 |
\int_compare_p:nNn { \exp_after:wN \use_iv:nnnn ##1 } = { 2 } } |
| 5787 |
{ \@@_format_supervisor_list:N \l_@@_tmpt_tl } |
| 5788 |
% \end{macrocode} |
| 5789 |
% 获取宽度(设置字体格式后再测量宽度) |
| 5790 |
% \begin{macrocode} |
| 5791 |
\hbox_set:Nn \l_@@_tmpa_box |
| 5792 |
{ |
| 5793 |
\zihao{3}\bfseries |
| 5794 |
\l_@@_tmpt_tl |
| 5795 |
} |
| 5796 |
\dim_set:Nn \l_@@_tmpt_dim { \box_wd:N \l_@@_tmpa_box } |
| 5797 |
\dim_set:Nn \l_@@_tmpb_dim |
| 5798 |
{ \dim_max:nn { \l_@@_tmpb_dim } { \l_@@_tmpt_dim } } |
| 5799 |
} |
| 5800 |
} |
| 5801 |
% \end{macrocode} |
| 5802 |
% \end{macro} |
| 5803 |
% |
| 5804 |
% \begin{macro}{\@@_filter_nonempty_fields:} |
| 5805 |
% 过滤空字段 |
| 5806 |
% \begin{macrocode} |
| 5807 |
\cs_new_protected:Npn \@@_filter_nonempty_fields: |
| 5808 |
{ |
| 5809 |
\clist_clear:N \l_tmpa_clist |
| 5810 |
\clist_map_inline:Nn \l_@@_tmpa_clist |
| 5811 |
{ |
| 5812 |
% \end{macrocode} |
| 5813 |
% 提取内容变量 |
| 5814 |
% \begin{macrocode} |
| 5815 |
\tl_set:Nx \l_tmpa_tl { \exp_after:wN \use_ii:nnnn ##1 } |
| 5816 |
% \end{macrocode} |
| 5817 |
% 提取特殊类型标记 |
| 5818 |
% \begin{macrocode} |
| 5819 |
\tl_set:Nx \l_tmpb_tl { \exp_after:wN \use_iv:nnnn ##1 } |
| 5820 |
% \end{macrocode} |
| 5821 |
% 如果是合作导师字段且内容为空,则不加入新列表 |
| 5822 |
% \begin{macrocode} |
| 5823 |
\int_compare:nNnTF { \l_tmpb_tl } = { 2 } |
| 5824 |
{ |
| 5825 |
\tl_if_empty:NTF \l_tmpa_tl |
| 5826 |
% \end{macrocode} |
| 5827 |
% 跳过 |
| 5828 |
% \begin{macrocode} |
| 5829 |
{ } |
| 5830 |
% \end{macrocode} |
| 5831 |
% 提取 |
| 5832 |
% \begin{macrocode} |
| 5833 |
{ \clist_put_right:Nn \l_tmpa_clist {##1} } |
| 5834 |
} |
| 5835 |
{ \clist_put_right:Nn \l_tmpa_clist {##1} } |
| 5836 |
} |
| 5837 |
\clist_set_eq:NN \l_@@_tmpa_clist \l_tmpa_clist |
| 5838 |
} |
| 5839 |
% \end{macrocode} |
| 5840 |
% \end{macro} |
| 5841 |
% |
| 5842 |
% \begin{macro}{\@@_cover_item_generic_output:nnnn, |
| 5843 |
% \@@_cover_item_en_output:nnnn, |
| 5844 |
% \@@_cover_item_id_output:nnnn, |
| 5845 |
% \@@_cover_item_instructors_output:nnnn} |
| 5846 |
% \begin{arguments} |
| 5847 |
% \item 标签文本 |
| 5848 |
% \item 内容变量 |
| 5849 |
% \item 盲审隐藏标记 (1=隐藏, 0=不隐藏) |
| 5850 |
% \item 特殊处理类型 (0=普通, 1=导师, 2=合作导师, 3=日期等非隐藏字段) |
| 5851 |
% \end{arguments} |
| 5852 |
% 格式化并输出通用单行数据: |
| 5853 |
% \begin{macrocode} |
| 5854 |
\cs_new_protected:Npn \@@_cover_item_generic_output:nnnn #1#2#3#4 |
| 5855 |
{ |
| 5856 |
% \end{macrocode} |
| 5857 |
% 获取最终内容 |
| 5858 |
% \begin{macrocode} |
| 5859 |
\tl_set:Nn \l_@@_tmpb_tl { #2 } |
| 5860 |
% \end{macrocode} |
| 5861 |
% 盲审处理 |
| 5862 |
% \begin{macrocode} |
| 5863 |
\bool_if:nT { \g_@@_anonymous_bool && \int_compare_p:nNn {#3} = { 1 } } |
| 5864 |
{ \tl_set:Nn \l_@@_tmpb_tl { \c_@@_name_anonname_tl } } |
| 5865 |
% \end{macrocode} |
| 5866 |
% 特殊类型处理 |
| 5867 |
% \begin{macrocode} |
| 5868 |
\int_compare:nNnTF {#4} = { 1 } |
| 5869 |
{ \@@_format_supervisor_list:N \l_@@_tmpb_tl } |
| 5870 |
{ |
| 5871 |
\int_compare:nNnT {#4} = { 2 } |
| 5872 |
{ \@@_format_supervisor_list:N \l_@@_tmpb_tl } |
| 5873 |
} |
| 5874 |
% \end{macrocode} |
| 5875 |
% 输出一行 |
| 5876 |
% \begin{macrocode} |
| 5877 |
\@@_spread_box:Vn \l_@@_tmpa_dim { #1 } |
| 5878 |
\int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 } |
| 5879 |
{ |
| 5880 |
\@@_quad: |
| 5881 |
\@@_center_box_uline:Vn \l_@@_tmpb_dim { \l_@@_tmpb_tl } |
| 5882 |
}{ |
| 5883 |
\c_@@_fwid_colon_tl |
| 5884 |
\@@_center_box:Vn \l_@@_tmpb_dim { \l_@@_tmpb_tl } |
| 5885 |
} |
| 5886 |
\par |
| 5887 |
} |
| 5888 |
% \end{macrocode} |
| 5889 |
% 函数变体 |
| 5890 |
% \begin{macrocode} |
| 5891 |
\cs_generate_variant:Nn \@@_cover_item_generic_output:nnnn { xxxx } |
| 5892 |
% \end{macrocode} |
| 5893 |
% 格式化输出英文单行数据 |
| 5894 |
% \begin{macrocode} |
| 5895 |
\cs_new_protected:Npn \@@_cover_item_en_output:nnnn #1#2#3#4 |
| 5896 |
{ |
| 5897 |
% \end{macrocode} |
| 5898 |
% 获取最终内容 |
| 5899 |
% \begin{macrocode} |
| 5900 |
\tl_set:Nn \l_@@_tmpb_tl { #2 } |
| 5901 |
% \end{macrocode} |
| 5902 |
% 盲审处理 |
| 5903 |
% \begin{macrocode} |
| 5904 |
\bool_if:nT { \g_@@_anonymous_bool && \int_compare_p:nNn {#3} = { 1 } } |
| 5905 |
{ \tl_set:Nn \l_@@_tmpb_tl { \c_@@_name_anonname_tl } } |
| 5906 |
% \end{macrocode} |
| 5907 |
% 特殊类型处理 |
| 5908 |
% \begin{macrocode} |
| 5909 |
\int_compare:nNnTF { #4 } = { 1 } |
| 5910 |
{ \@@_format_supervisor_list:N \l_@@_tmpb_tl } |
| 5911 |
{ |
| 5912 |
\int_compare:nNnT { #4 } = { 2 } |
| 5913 |
{ \@@_format_supervisor_list:N \l_@@_tmpb_tl } |
| 5914 |
} |
| 5915 |
% \end{macrocode} |
| 5916 |
% 输出一行 |
| 5917 |
% \begin{macrocode} |
| 5918 |
#1 |
| 5919 |
\c_@@_fwid_colon_tl |
| 5920 |
\l_@@_tmpb_tl |
| 5921 |
\skip_vertical:n { 1 ex } |
| 5922 |
} |
| 5923 |
% \end{macrocode} |
| 5924 |
% 函数变体 |
| 5925 |
% \begin{macrocode} |
| 5926 |
\cs_generate_variant:Nn \@@_cover_item_en_output:nnnn { xxxx } |
| 5927 |
% \end{macrocode} |
| 5928 |
% 格式化输出学号等编号单行数据 |
| 5929 |
% \begin{macrocode} |
| 5930 |
\cs_new_protected:Npn \@@_cover_item_id_output:nnnn #1#2#3#4 |
| 5931 |
{ |
| 5932 |
\tl_set:Nx \l_@@_tmpb_tl {#2} |
| 5933 |
% \end{macrocode} |
| 5934 |
% 盲审学校代码及学号处理 |
| 5935 |
% \begin{macrocode} |
| 5936 |
\bool_if:nT { \g_@@_anonymous_bool && \int_compare_p:nNn {#3} = { 1 } } |
| 5937 |
{ \tl_set:Nn \l_@@_tmpb_tl { \c_@@_name_anonname_tl } } |
| 5938 |
|
| 5939 |
\int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 } |
| 5940 |
{ |
| 5941 |
% \end{macrocode} |
| 5942 |
% 研究生\par |
| 5943 |
% 输出:UDC标签需要左对齐 |
| 5944 |
% \begin{macrocode} |
| 5945 |
\tl_if_eq:NnTF \c_@@_name_udc_tl {#1} |
| 5946 |
{ \@@_fixed_width_box:Vn \l_@@_tmpa_dim {#1} } |
| 5947 |
{ \@@_spread_box:Vn \l_@@_tmpa_dim {#1} } |
| 5948 |
\c_@@_fwid_colon_tl |
| 5949 |
\@@_center_box_uline:Vn \l_@@_tmpb_dim { \l_@@_tmpb_tl } |
| 5950 |
% \end{macrocode} |
| 5951 |
% id元素的左右布置判断 |
| 5952 |
% \begin{macrocode} |
| 5953 |
\tl_set:Nn \l_@@_tmpt_tl { #1 } |
| 5954 |
\bool_if:nTF |
| 5955 |
{ |
| 5956 |
\tl_if_eq_p:NN \l_@@_tmpt_tl \c_@@_name_school_id_tl || |
| 5957 |
\tl_if_eq_p:NN \l_@@_tmpt_tl \c_@@_name_udc_tl || |
| 5958 |
\tl_if_eq_p:NN \l_@@_tmpt_tl \c_@@_name_student_id_tl |
| 5959 |
} |
| 5960 |
{ \par } { \hfill } |
| 5961 |
}{ |
| 5962 |
% \end{macrocode} |
| 5963 |
% 本科生 |
| 5964 |
% \begin{macrocode} |
| 5965 |
\hfill |
| 5966 |
\@@_spread_box:Vn \l_@@_tmpa_dim {#1} |
| 5967 |
\c_@@_fwid_colon_tl |
| 5968 |
\l_@@_tmpb_tl |
| 5969 |
} |
| 5970 |
} |
| 5971 |
% \end{macrocode} |
| 5972 |
% 函数变体 |
| 5973 |
% \begin{macrocode} |
| 5974 |
\cs_generate_variant:Nn \@@_cover_item_id_output:nnnn { xxxx } |
| 5975 |
% \end{macrocode} |
| 5976 |
% 格式化输出指导小组单行数据 |
| 5977 |
% \begin{macrocode} |
| 5978 |
\cs_new_protected:Npn \@@_cover_item_instructors_output:nnnn #1#2#3#4 |
| 5979 |
{ |
| 5980 |
% \end{macrocode} |
| 5981 |
% 获取最终内容 |
| 5982 |
% \begin{macrocode} |
| 5983 |
\tl_set:Nx \l_@@_tmpb_tl {#2} |
| 5984 |
% \end{macrocode} |
| 5985 |
% 盲审处理 |
| 5986 |
% \begin{macrocode} |
| 5987 |
\bool_if:nT { \g_@@_anonymous_bool && \int_compare_p:nNn {#3} = { 1 } } |
| 5988 |
{ \tl_set:Nn \l_@@_tmpb_tl { \c_@@_name_anonname_tl } } |
| 5989 |
% \end{macrocode} |
| 5990 |
% 格式化导师数据 |
| 5991 |
% \begin{macrocode} |
| 5992 |
\bool_if:nT { \int_compare_p:nNn { #4 } = { 1 } || \int_compare_p:nNn { #4 } = { 2 } } |
| 5993 |
{ \@@_format_supervisor_list:N \l_@@_tmpb_tl } |
| 5994 |
% \end{macrocode} |
| 5995 |
% 输出行(使用下划线盒子,因为需要签名) |
| 5996 |
% \begin{macrocode} |
| 5997 |
\@@_spread_box:Vn \l_@@_tmpa_dim {#1} |
| 5998 |
\c_@@_fwid_colon_tl |
| 5999 |
% \end{macrocode} |
| 6000 |
% 判断是否预留签名空白 |
| 6001 |
% \begin{macrocode} |
| 6002 |
\bool_if:NTF \g_@@_withsignature_bool |
| 6003 |
{ |
| 6004 |
}{ |
| 6005 |
\l_@@_tmpb_tl |
| 6006 |
} |
| 6007 |
\skip_vertical:n { 1.6 ex } |
| 6008 |
} |
| 6009 |
% \end{macrocode} |
| 6010 |
% 函数变体 |
| 6011 |
% \begin{macrocode} |
| 6012 |
\cs_generate_variant:Nn \@@_cover_item_instructors_output:nnnn { xxxx } |
| 6013 |
% \end{macrocode} |
| 6014 |
% \end{macro} |
| 6015 |
% |
| 6016 |
% \changes{v2.01}{2026/05/07}{添加格式化导师姓名及职称内容的函数。} |
| 6017 |
% |
| 6018 |
% \begin{macro}{\@@_format_supervisor_list:N} |
| 6019 |
% 格式化导师内容。接收 tl 变量作为输入,每个导师由用英文逗号分隔的 |
| 6020 |
% 姓名和职称构成,不同导师分别置于大括号内,然后用英文逗号分隔。 |
| 6021 |
% \begin{macrocode} |
| 6022 |
\cs_new_protected:Npn \@@_format_supervisor_list:N #1 |
| 6023 |
{ |
| 6024 |
\seq_clear:N \l_tmpa_seq |
| 6025 |
\exp_args:Nx \clist_map_inline:nn { #1 } |
| 6026 |
{ |
| 6027 |
% \end{macrocode} |
| 6028 |
% 取得姓名和职称 |
| 6029 |
% \begin{macrocode} |
| 6030 |
\tl_set:Nx \l_@@_tmpa_tl { \clist_item:nn { ##1 } { 1 } } |
| 6031 |
\tl_set:Nx \l_@@_tmpb_tl { \clist_item:nn { ##1 } { 2 } } |
| 6032 |
% \end{macrocode} |
| 6033 |
% 判断有无职称,然后确定输出内容 |
| 6034 |
% \begin{macrocode} |
| 6035 |
\tl_if_empty:NTF \l_@@_tmpb_tl |
| 6036 |
{ \seq_put_right:NV \l_tmpa_seq \l_@@_tmpa_tl } |
| 6037 |
{ |
| 6038 |
\seq_put_right:Nx \l_tmpa_seq |
| 6039 |
{ \l_@@_tmpa_tl \enskip \l_@@_tmpb_tl } |
| 6040 |
} |
| 6041 |
} |
| 6042 |
\tl_set:Nx #1 { \seq_use:Nn \l_tmpa_seq { ,\enskip } } |
| 6043 |
} |
| 6044 |
% \end{macrocode} |
| 6045 |
% \end{macro} |
| 6046 |
|
| 6047 |
% \begin{macro}{\@@_format_instructors_list:N} |
| 6048 |
% 指导小组列表格式化 |
| 6049 |
% \begin{macrocode} |
| 6050 |
\cs_new_protected:Npn \@@_format_instructors_list:N #1 |
| 6051 |
{ |
| 6052 |
\tl_set_eq:NN \l_tmpa_tl #1 |
| 6053 |
\@@_format_supervisor_list:N \l_tmpa_tl |
| 6054 |
\tl_set_eq:NN #1 \l_tmpa_tl |
| 6055 |
} |
| 6056 |
% \end{macrocode} |
| 6057 |
% \end{macro} |
| 6058 |
% |
| 6059 |
% \changes{v1.25}{2023/04/18}{添加盲审隐藏学号。} |
| 6060 |
% |
| 6061 |
% \subsubsection{封面各部件} |
| 6062 |
% |
| 6063 |
% \begin{macro}{\@@_cover_id:,\@@_cover_id_aux:n} |
| 6064 |
% 封面中的中图分类号、udc码、密级、学校代码和学号。 |
| 6065 |
% \begin{macrocode} |
| 6066 |
\cs_new_protected:Npn \@@_cover_id: |
| 6067 |
{ |
| 6068 |
\group_begin: |
| 6069 |
\@@_select_id_fields: |
| 6070 |
\@@_get_max_label_width: |
| 6071 |
\@@_get_max_value_width: |
| 6072 |
\begin{minipage}[c]{\textwidth} |
| 6073 |
\clist_map_inline:Nn \l_@@_tmpa_clist |
| 6074 |
{ |
| 6075 |
\@@_cover_item_id_output:xxxx ##1 |
| 6076 |
} |
| 6077 |
\end{minipage} |
| 6078 |
\group_end: |
| 6079 |
} |
| 6080 |
% \end{macrocode} |
| 6081 |
% \end{macro} |
| 6082 |
% |
| 6083 |
% \changes{v2.00}{2026/05/06}{删除盲审时的学校LOGO。} |
| 6084 |
% |
| 6085 |
% \begin{macro}{\@@_cover_logo:} |
| 6086 |
% 插入校名图片。根据参数 \opt{width} 和 \opt{height} 是否为空依次 |
| 6087 |
% 判断。\cs{l_@@_cover_logo_size_clist} 中超过两个的参数将被忽略。 |
| 6088 |
% \begin{macrocode} |
| 6089 |
\cs_new_protected:Npn \@@_cover_logo: |
| 6090 |
{ |
| 6091 |
\bool_if:NTF \g_@@_anonymous_bool |
| 6092 |
{ **************** } |
| 6093 |
{ |
| 6094 |
\clist_pop:NN \l_@@_cover_logo_size_clist \l_@@_tmpa_tl |
| 6095 |
\clist_pop:NNTF \l_@@_cover_logo_size_clist \l_@@_tmpb_tl |
| 6096 |
{ |
| 6097 |
\tl_if_empty:NTF \l_@@_tmpa_tl |
| 6098 |
{ \includegraphics [ height = \l_@@_tmpb_tl ] } |
| 6099 |
{ |
| 6100 |
\includegraphics |
| 6101 |
[ width = \l_@@_tmpa_tl, height = \l_@@_tmpb_tl ] |
| 6102 |
} |
| 6103 |
} |
| 6104 |
{ \includegraphics [ width = \l_@@_tmpa_tl ] } |
| 6105 |
{ \l_@@_cover_logo_tl } |
| 6106 |
} |
| 6107 |
} |
| 6108 |
% \end{macrocode} |
| 6109 |
% \end{macro} |
| 6110 |
% |
| 6111 |
% \changes{v2.00}{2026/04/29}{删除楷体伪粗设置。} |
| 6112 |
% \changes{v1.11}{2022/04/03}{利用PDF literal添加本科楷体伪粗。} |
| 6113 |
% |
| 6114 |
% \begin{macro}{\@@_cover_type:} |
| 6115 |
% 论文类型。 |
| 6116 |
% \begin{macrocode} |
| 6117 |
\cs_new_protected:Npn \@@_cover_type: |
| 6118 |
{ |
| 6119 |
\tl_set:Nx \l_@@_tmpa_tl |
| 6120 |
{ |
| 6121 |
% \end{macrocode} |
| 6122 |
% 取出论文类型。 |
| 6123 |
% \begin{macrocode} |
| 6124 |
\clist_item:Nn \c_@@_thesis_type_clist { \g_@@_thesis_type_int } |
| 6125 |
} |
| 6126 |
\int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 } |
| 6127 |
{ |
| 6128 |
% \end{macrocode} |
| 6129 |
% 研究生论文。 |
| 6130 |
% \begin{macrocode} |
| 6131 |
\@@_spread_box:nn { 0.75 \textwidth } { \l_@@_tmpa_tl } |
| 6132 |
}{ |
| 6133 |
% \end{macrocode} |
| 6134 |
% 本科毕业年份(届)。 |
| 6135 |
% \begin{macrocode} |
| 6136 |
\@@_get_text_width:NV \l_@@_tmpa_dim \l_@@_info_grade_tl |
| 6137 |
\@@_center_box:Vn \l_@@_tmpa_dim { \l_@@_info_grade_tl } |
| 6138 |
\@@_spread_box:nn { 0.50 \textwidth } |
| 6139 |
{ |
| 6140 |
届 |
| 6141 |
\l_@@_tmpa_tl |
| 6142 |
% \end{macrocode} |
| 6143 |
% 本科的论文或设计选择。 |
| 6144 |
% \begin{macrocode} |
| 6145 |
\clist_item:Nn \c_@@_bachelor_type_clist { \l_@@_info_bachelor_type_int } |
| 6146 |
} |
| 6147 |
} |
| 6148 |
} |
| 6149 |
% \end{macrocode} |
| 6150 |
% \end{macro} |
| 6151 |
% |
| 6152 |
% \changes{v2.02}{2026/05/09}{将\@@_cover_author重命名为\@@_cover_author_brief。} |
| 6153 |
% \changes{v2.01}{2026/05/07}{格式化导师数据。} |
| 6154 |
% \changes{v2.00}{2026/04/29}{添加本科封面的作者与导师。} |
| 6155 |
% |
| 6156 |
% \begin{macro}{\@@_cover_author_brief:} |
| 6157 |
% 封面作者简要信息栏(目前仅本科生需要)。 |
| 6158 |
% \begin{macrocode} |
| 6159 |
\cs_new_protected:Npn \@@_cover_author_brief: |
| 6160 |
{ |
| 6161 |
\begin{minipage} [ c ] { \textwidth } |
| 6162 |
\centering |
| 6163 |
% \end{macrocode} |
| 6164 |
% 选择字段列表 |
| 6165 |
% \begin{macrocode} |
| 6166 |
\@@_select_author_brief_fields: |
| 6167 |
% \end{macrocode} |
| 6168 |
% 过滤空字段 |
| 6169 |
% \begin{macrocode} |
| 6170 |
\@@_filter_nonempty_fields: |
| 6171 |
% \end{macrocode} |
| 6172 |
% 计算最大宽度 |
| 6173 |
% \begin{macrocode} |
| 6174 |
\@@_get_max_label_width: |
| 6175 |
\@@_get_max_value_width: |
| 6176 |
% \end{macrocode} |
| 6177 |
% 为标签列增加额外宽度用于对齐 |
| 6178 |
% \begin{macrocode} |
| 6179 |
\dim_add:Nn \l_@@_tmpa_dim { 1.2 em } |
| 6180 |
% \end{macrocode} |
| 6181 |
% 循环输出每一行 |
| 6182 |
% \begin{macrocode} |
| 6183 |
\clist_map_inline:Nn \l_@@_tmpa_clist |
| 6184 |
{ |
| 6185 |
\@@_cover_item_generic_output:xxxx ##1 |
| 6186 |
} |
| 6187 |
\end{minipage} |
| 6188 |
} |
| 6189 |
% \end{macrocode} |
| 6190 |
% \end{macro} |
| 6191 |
|
| 6192 |
% \changes{v2.02}{2026/05/09}{将\@@_cover_info重命名为\@@_cover_author_detailed。} |
| 6193 |
% \changes{v2.02}{2026/05/08}{采用元信息驱动模式,重构\@@_cover_info:函数。} |
| 6194 |
% \changes{v2.01}{2026/05/07}{添加合作指导教师是否为空判断以确定是否输出该条目,并格式化导师数据。} |
| 6195 |
% \changes{v2.00}{2026/04/29}{修订本科作者信息。} |
| 6196 |
% \changes{v1.25}{2023/04/18}{添加盲审隐藏中文作者与导师。} |
| 6197 |
% |
| 6198 |
% \begin{macro}{\@@_cover_author_detailed:} |
| 6199 |
% 作者详细信息栏。 |
| 6200 |
% \begin{macrocode} |
| 6201 |
\cs_new_protected:Npn \@@_cover_author_detailed: |
| 6202 |
{ |
| 6203 |
\begin{minipage} [ c ] { \textwidth } |
| 6204 |
\centering |
| 6205 |
% \end{macrocode} |
| 6206 |
% 选择字段列表 |
| 6207 |
% \begin{macrocode} |
| 6208 |
\@@_select_author_detailed_fields: |
| 6209 |
% \end{macrocode} |
| 6210 |
% 过滤空字段 |
| 6211 |
% \begin{macrocode} |
| 6212 |
\@@_filter_nonempty_fields: |
| 6213 |
% \end{macrocode} |
| 6214 |
% 计算最大宽度 |
| 6215 |
% \begin{macrocode} |
| 6216 |
\@@_get_max_label_width: |
| 6217 |
\@@_get_max_value_width: |
| 6218 |
% \end{macrocode} |
| 6219 |
% 为标签列增加额外宽度用于对齐(目前仅对本科有效) |
| 6220 |
% \begin{macrocode} |
| 6221 |
\int_compare:nNnT { \g_@@_thesis_type_int } = { 3 } |
| 6222 |
{ |
| 6223 |
\dim_add:Nn \l_@@_tmpa_dim { 1.2 em } |
| 6224 |
} |
| 6225 |
% \end{macrocode} |
| 6226 |
% 循环输出每一行 |
| 6227 |
% \begin{macrocode} |
| 6228 |
\clist_map_inline:Nn \l_@@_tmpa_clist |
| 6229 |
{ |
| 6230 |
\@@_cover_item_generic_output:xxxx ##1 |
| 6231 |
} |
| 6232 |
\end{minipage} |
| 6233 |
} |
| 6234 |
% \end{macrocode} |
| 6235 |
% \end{macro} |
| 6236 |
% |
| 6237 |
% \changes{v2.01}{2026/05/07}{若无合作指导老师,则删除该条目,添加导师职称处理。} |
| 6238 |
% \changes{v1.25}{2023/04/18}{添加盲审隐藏英文作者与导师。} |
| 6239 |
% |
| 6240 |
% \begin{macro}{\@@_cover_author_detailed_en:} |
| 6241 |
% 英文作者信息栏(仅对研究生有效)。 |
| 6242 |
% \begin{macrocode} |
| 6243 |
\cs_new_protected:Npn \@@_cover_author_detailed_en: |
| 6244 |
{ |
| 6245 |
% \end{macrocode} |
| 6246 |
% 选择字段列表 |
| 6247 |
% \begin{macrocode} |
| 6248 |
\@@_select_author_detailed_en_fields: |
| 6249 |
% \end{macrocode} |
| 6250 |
% 过滤空字段 |
| 6251 |
% \begin{macrocode} |
| 6252 |
\@@_filter_nonempty_fields: |
| 6253 |
% \end{macrocode} |
| 6254 |
% 计算最大宽度 |
| 6255 |
% \begin{macrocode} |
| 6256 |
\@@_get_max_value_en_width: |
| 6257 |
\begin{minipage} [ c ] { \l_@@_tmpb_dim } |
| 6258 |
\flushleft |
| 6259 |
% \end{macrocode} |
| 6260 |
% 循环输出每一行 |
| 6261 |
% \begin{macrocode} |
| 6262 |
\clist_map_inline:Nn \l_@@_tmpa_clist |
| 6263 |
{ |
| 6264 |
\@@_cover_item_en_output:xxxx ##1 |
| 6265 |
} |
| 6266 |
\end{minipage} |
| 6267 |
} |
| 6268 |
% \end{macrocode} |
| 6269 |
% \end{macro} |
| 6270 |
% |
| 6271 |
% \changes{v1.15}{2022/05/29}{为研究生题名页签字位置留空位。} |
| 6272 |
% \changes{v1.25}{2023/04/18}{添加盲审隐藏作者、导师、指导小组等。} |
| 6273 |
% |
| 6274 |
% \begin{macro}{\@@_cover_instructors:} |
| 6275 |
% 题名页作者、指导教师、指导小组签名(仅对研究生有效)。 |
| 6276 |
% \begin{macrocode} |
| 6277 |
\cs_new_protected:Npn \@@_cover_instructors: |
| 6278 |
{ |
| 6279 |
\begin{minipage}[c]{\textwidth} |
| 6280 |
\flushleft |
| 6281 |
\@@_select_instructors_fields: |
| 6282 |
\clist_if_empty:NTF \l_@@_tmpa_clist |
| 6283 |
{ } |
| 6284 |
{ |
| 6285 |
\@@_get_max_label_width: |
| 6286 |
\@@_get_max_instructors_value_width: |
| 6287 |
\dim_add:Nn \l_@@_tmpb_dim { 0.8 em } |
| 6288 |
\clist_map_inline:Nn \l_@@_tmpa_clist |
| 6289 |
{ |
| 6290 |
\@@_cover_item_instructors_output:nnnn ##1 |
| 6291 |
} |
| 6292 |
} |
| 6293 |
\end{minipage} |
| 6294 |
} |
| 6295 |
% \end{macrocode} |
| 6296 |
% \end{macro} |
| 6297 |
% |
| 6298 |
% \changes{v1.25}{2023/04/18}{添加盲审隐藏答辩委员会。} |
| 6299 |
% |
| 6300 |
% \begin{macro}{\@@_cover_defensecommittees:} |
| 6301 |
% 答辩委员会名单,仅对研究生有效。 |
| 6302 |
% \begin{macrocode} |
| 6303 |
\cs_new_protected:Npn \@@_cover_defensecommittees: |
| 6304 |
{ |
| 6305 |
% \end{macrocode} |
| 6306 |
% 清空临时变量。 |
| 6307 |
% \begin{macrocode} |
| 6308 |
\clist_set:Nn \l_@@_tmpa_clist {} |
| 6309 |
\clist_set:Nn \l_@@_tmpb_clist {} |
| 6310 |
\clist_set:Nn \l_@@_tmpc_clist {} |
| 6311 |
\bool_until_do:nn { \clist_if_empty_p:N \l_@@_info_defensecommittees_clist } |
| 6312 |
{ |
| 6313 |
\clist_set:Nn \l_@@_tmpt_clist {} |
| 6314 |
% \end{macrocode} |
| 6315 |
% 取出一个答辩委员的信息。 |
| 6316 |
% \begin{macrocode} |
| 6317 |
\clist_pop:NN \l_@@_info_defensecommittees_clist \l_@@_tmpa_tl |
| 6318 |
\clist_set:NV \l_@@_tmpt_clist \l_@@_tmpa_tl |
| 6319 |
% \end{macrocode} |
| 6320 |
% 构造单位列表。 |
| 6321 |
% \begin{macrocode} |
| 6322 |
\clist_put_right:Nx \l_@@_tmpa_clist { |
| 6323 |
\clist_item:Nn \l_@@_tmpt_clist {1} |
| 6324 |
} |
| 6325 |
% \end{macrocode} |
| 6326 |
% 构造姓名列表。 |
| 6327 |
% \begin{macrocode} |
| 6328 |
\clist_put_right:Nx \l_@@_tmpb_clist { |
| 6329 |
\clist_item:Nn \l_@@_tmpt_clist {2} |
| 6330 |
} |
| 6331 |
% \end{macrocode} |
| 6332 |
% 构造职称列表。 |
| 6333 |
% \begin{macrocode} |
| 6334 |
\clist_put_right:Nx \l_@@_tmpc_clist { |
| 6335 |
\clist_item:Nn \l_@@_tmpt_clist {3} |
| 6336 |
} |
| 6337 |
} |
| 6338 |
% \end{macrocode} |
| 6339 |
% 分别计算单位列表、姓名列表、职称列表的最宽宽度。 |
| 6340 |
% \begin{macrocode} |
| 6341 |
\@@_get_max_text_width:NN \l_@@_tmpa_dim \l_@@_tmpa_clist |
| 6342 |
\@@_get_max_text_width:NN \l_@@_tmpb_dim \l_@@_tmpb_clist |
| 6343 |
\@@_get_max_text_width:NN \l_@@_tmpc_dim \l_@@_tmpc_clist |
| 6344 |
% \end{macrocode} |
| 6345 |
% 输出答辩委员会信息。 |
| 6346 |
% \begin{macrocode} |
| 6347 |
\bool_if:NF \g_@@_anonymous_bool |
| 6348 |
{ |
| 6349 |
\begin{minipage} [ c ] { \textwidth } |
| 6350 |
\centering |
| 6351 |
\bool_until_do:nn { \clist_if_empty_p:N \l_@@_tmpa_clist } |
| 6352 |
{ |
| 6353 |
\clist_pop:NN \l_@@_tmpa_clist \l_@@_tmpa_tl |
| 6354 |
\clist_pop:NN \l_@@_tmpb_clist \l_@@_tmpb_tl |
| 6355 |
\clist_pop:NN \l_@@_tmpc_clist \l_@@_tmpc_tl |
| 6356 |
\@@_spread_box:Vn \l_@@_tmpa_dim { \l_@@_tmpa_tl } |
| 6357 |
\@@_center_box_uline:Vn \l_@@_tmpb_dim { \l_@@_tmpb_tl } |
| 6358 |
\@@_spread_box:Vn \l_@@_tmpc_dim { \l_@@_tmpc_tl } |
| 6359 |
\skip_vertical:n { 0.5 ex } |
| 6360 |
} |
| 6361 |
\end{minipage} |
| 6362 |
} |
| 6363 |
} |
| 6364 |
% \end{macrocode} |
| 6365 |
% \end{macro} |
| 6366 |
% |
| 6367 |
% \changes{v1.25}{2023/04/18}{添加盲审隐藏项目资助列表。} |
| 6368 |
% |
| 6369 |
% \begin{macro}{\@@_cover_foundation:} |
| 6370 |
% 项目资助列表,仅对研究生有效。 |
| 6371 |
% \begin{macrocode} |
| 6372 |
\cs_new_protected:Npn \@@_cover_foundation: |
| 6373 |
{ |
| 6374 |
\begin{minipage}[c]{\textwidth} |
| 6375 |
\clist_map_inline:Nn \l_@@_info_foundation_clist |
| 6376 |
{ |
| 6377 |
\indent |
| 6378 |
\@@_qquad: |
| 6379 |
本研究得到 |
| 6380 |
\bool_if:NTF \g_@@_anonymous_bool |
| 6381 |
{ \c_@@_name_anonname_tl } |
| 6382 |
{ \clist_item:nn {##1} {1} } % 项目来源 |
| 6383 |
\c_@@_fwid_colon_tl |
| 6384 |
\bool_if:NTF \g_@@_anonymous_bool |
| 6385 |
{ \c_@@_name_anonname_tl } |
| 6386 |
{ \clist_item:nn {##1} {2} } % 项目名称 |
| 6387 |
(编号\c_@@_fwid_colon_tl |
| 6388 |
\bool_if:NTF \g_@@_anonymous_bool |
| 6389 |
{ \c_@@_name_anonname_tl } |
| 6390 |
{ \clist_item:nn {##1} {3} } % 项目编号 |
| 6391 |
)资助 |
| 6392 |
\par |
| 6393 |
} |
| 6394 |
\end{minipage} |
| 6395 |
} |
| 6396 |
% \end{macrocode} |
| 6397 |
% \end{macro} |
| 6398 |
% |
| 6399 |
% \begin{macro}{\@@_cover_signature:N} |
| 6400 |
% 签名行。 |
| 6401 |
% \begin{macrocode} |
| 6402 |
\cs_new_protected:Npn \@@_cover_signature:N #1 |
| 6403 |
{ |
| 6404 |
\int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 } |
| 6405 |
{ |
| 6406 |
% \end{macrocode} |
| 6407 |
% 研究生。 |
| 6408 |
% \begin{macrocode} |
| 6409 |
\@@_qquad: |
| 6410 |
\@@_spread_box:nV { 5 em } #1 |
| 6411 |
\c_@@_fwid_colon_tl |
| 6412 |
\hspace*{\fill} |
| 6413 |
}{ |
| 6414 |
% \end{macrocode} |
| 6415 |
% 本科。 |
| 6416 |
% \begin{macrocode} |
| 6417 |
\@@_spread_box:nV { 6 em } #1 |
| 6418 |
\c_@@_fwid_colon_tl |
| 6419 |
% \@@_blank_underline:n { 6 em } |
| 6420 |
\hspace*{\fill} |
| 6421 |
} |
| 6422 |
% \end{macrocode} |
| 6423 |
% 签名时间。 |
| 6424 |
% \begin{macrocode} |
| 6425 |
时间\c_@@_fwid_colon_tl |
| 6426 |
\@@_qquad:\@@_qquad: 年 |
| 6427 |
\@@_qquad: 月 |
| 6428 |
\@@_qquad: 日 |
| 6429 |
\hspace*{\fill} |
| 6430 |
% \@@_qquad: |
| 6431 |
} |
| 6432 |
% \end{macrocode} |
| 6433 |
% \end{macro} |
| 6434 |
% |
| 6435 |
% \changes{v1.12}{2022/04/12}{重新抽象封面\pkg{xtemplate}模板。} |
| 6436 |
% |
| 6437 |
% \subsubsection{封面模板} |
| 6438 |
% |
| 6439 |
% 本模板使用 \pkg{xtemplate} 提供的面向对象方法绘制封面。 |
| 6440 |
% |
| 6441 |
% 以下分别从页面元素(element)和页面整体(page)的层次进行了抽象。 |
| 6442 |
% 当把页面部件作为一个对象时,则页面部件只具备有限数量的属性: |
| 6443 |
% 内容、格式、边距、对齐方式等。而具体页面是这些对象的实例的集合, |
| 6444 |
% 附加边距、行距等属性。通过 \pkg{xtemplate} 提供的功能,可以 |
| 6445 |
% 根据这些属性创建模板(template),进而能大量构建具有\emph{相似行为} |
| 6446 |
% 的实例(instance)。 |
| 6447 |
% |
| 6448 |
% 声明对象类型,此类对象均不需要带参数。 |
| 6449 |
% \begin{macrocode} |
| 6450 |
\DeclareObjectType { nwafu } { \c_zero_int } |
| 6451 |
% \end{macrocode} |
| 6452 |
% |
| 6453 |
% 定义元素模板。 |
| 6454 |
% \begin{macrocode} |
| 6455 |
%<@@=nwafu_elem> |
| 6456 |
% \end{macrocode} |
| 6457 |
% |
| 6458 |
% 声明页面元素模板接口。 |
| 6459 |
% |
| 6460 |
% 元素是一个页面的基本组成单位,包括文字段落、插图等等。 |
| 6461 |
% 一个抽象的元素应当具备以下属性: |
| 6462 |
% \begin{description} |
| 6463 |
% \item[\opt{content}] 内容,即剥离了样式的元素本身 |
| 6464 |
% \item[\opt{format}] 格式,例如字号、字体、行距等 |
| 6465 |
% \item[\opt{bottom-skip}] 底边距,即与下一个元素的垂直距离 |
| 6466 |
% \item[\opt{align}] 对齐方式,包括左对齐、右对齐、居中、正常段落 |
| 6467 |
% \end{description} |
| 6468 |
% \begin{macrocode} |
| 6469 |
\DeclareTemplateInterface { nwafu } { element } { \c_zero_int } |
| 6470 |
{ |
| 6471 |
content : tokenlist = \c_empty_tl, |
| 6472 |
format : tokenlist = \c_empty_tl, |
| 6473 |
bottom-skip : skip = \c_zero_skip, |
| 6474 |
align : choice { left, right, center, normal } = normal |
| 6475 |
} |
| 6476 |
% \end{macrocode} |
| 6477 |
% |
| 6478 |
% 声明页面元素模板代码。^^A 涉及的变量将被自动创建。 |
| 6479 |
% \begin{macrocode} |
| 6480 |
\DeclareTemplateCode { nwafu } { element } { \c_zero_int } |
| 6481 |
{ |
| 6482 |
content = \l_@@_content_tl, |
| 6483 |
format = \l_@@_format_tl, |
| 6484 |
bottom-skip = \l_@@_bottom_skip, |
| 6485 |
align = |
| 6486 |
{ |
| 6487 |
left = |
| 6488 |
{ \tl_set_eq:NN \l_@@_begin_align_tl \flushleft |
| 6489 |
\tl_set_eq:NN \l_@@_end_align_tl \endflushleft }, |
| 6490 |
right = |
| 6491 |
{ \tl_set_eq:NN \l_@@_begin_align_tl \flushright |
| 6492 |
\tl_set_eq:NN \l_@@_end_align_tl \endflushright }, |
| 6493 |
center = |
| 6494 |
{ \tl_set_eq:NN \l_@@_begin_align_tl \center |
| 6495 |
\tl_set_eq:NN \l_@@_end_align_tl \endcenter }, |
| 6496 |
normal = |
| 6497 |
{ \tl_clear:N \l_@@_begin_align_tl |
| 6498 |
\tl_clear:N \l_@@_end_align_tl } |
| 6499 |
} |
| 6500 |
} |
| 6501 |
{ |
| 6502 |
\AssignTemplateKeys |
| 6503 |
\group_begin: |
| 6504 |
\l_@@_begin_align_tl |
| 6505 |
\l_@@_format_tl |
| 6506 |
\l_@@_content_tl \par |
| 6507 |
\l_@@_end_align_tl |
| 6508 |
\group_end: |
| 6509 |
\__nwafu_vspace:N \l_@@_bottom_skip |
| 6510 |
} |
| 6511 |
% \end{macrocode} |
| 6512 |
% |
| 6513 |
% 定义页面模板。 |
| 6514 |
% \begin{macrocode} |
| 6515 |
%<@@=nwafu_page> |
| 6516 |
% \end{macrocode} |
| 6517 |
% |
| 6518 |
% 声明页面模板接口。 |
| 6519 |
% |
| 6520 |
% 页面是元素的集合。一个抽象的页面应当具备以下属性: |
| 6521 |
% \begin{description} |
| 6522 |
% \item[\opt{content}] 内容,包含页面元素模板实例名称的列表 |
| 6523 |
% \item[\opt{prefix}] 元素模板实例名称前缀(表示封一、封二等) |
| 6524 |
% \item[\opt{format}] 格式,例如行距 |
| 6525 |
% \item[\opt{top-skip}] 上间距,即与页面顶部的距离 |
| 6526 |
% \item[\opt{bottom-skip}] 下间距,即与页面底部的距离 |
| 6527 |
% \end{description} |
| 6528 |
% \begin{macrocode} |
| 6529 |
\DeclareTemplateInterface { nwafu } { page } { \c_zero_int } |
| 6530 |
{ |
| 6531 |
content : commalist = \c_empty_clist, |
| 6532 |
prefix : tokenlist = \c_empty_tl, |
| 6533 |
format : tokenlist = \c_empty_tl, |
| 6534 |
top-skip : skip = \c_zero_skip, |
| 6535 |
bottom-skip : skip = \c_zero_skip |
| 6536 |
} |
| 6537 |
% \end{macrocode} |
| 6538 |
% |
| 6539 |
% 声明页面模板代码。 |
| 6540 |
% \begin{macrocode} |
| 6541 |
\DeclareTemplateCode { nwafu } { page } { \c_zero_int } |
| 6542 |
{ |
| 6543 |
content = \l_@@_content_clist, |
| 6544 |
prefix = \l_@@_prefix_tl, |
| 6545 |
format = \l_@@_format_tl, |
| 6546 |
top-skip = \l_@@_top_skip, |
| 6547 |
bottom-skip = \l_@@_bottom_skip |
| 6548 |
} |
| 6549 |
{ |
| 6550 |
\AssignTemplateKeys |
| 6551 |
\__nwafu_vspace:N \l_@@_top_skip |
| 6552 |
\group_begin: |
| 6553 |
\l_@@_format_tl |
| 6554 |
\clist_map_inline:Nn \l_@@_content_clist |
| 6555 |
{ \UseInstance { nwafu } { \l_@@_prefix_tl ##1 } } |
| 6556 |
\group_end: |
| 6557 |
\__nwafu_vspace:N \l_@@_bottom_skip |
| 6558 |
} |
| 6559 |
% |
| 6560 |
%<@@=nwafu> |
| 6561 |
% \end{macrocode} |
| 6562 |
% |
| 6563 |
% \begin{macro}{\@@_declare_element:nn,\@@_declare_page:nn} |
| 6564 |
% 封装 \pkg{xtemplate} 提供的函数,简化创建实例的过程。 |
| 6565 |
% \begin{arguments} |
| 6566 |
% \item 实例名称 |
| 6567 |
% \item 参数列表 |
| 6568 |
% \end{arguments} |
| 6569 |
% \begin{macrocode} |
| 6570 |
\cs_new_protected:Npn \@@_declare_element:nn #1#2 |
| 6571 |
{ \DeclareInstance { nwafu } {#1} { element } {#2} } |
| 6572 |
\cs_generate_variant:Nn \@@_declare_element:nn { nx } |
| 6573 |
\cs_new_protected:Npn \@@_declare_page:nn #1#2 |
| 6574 |
{ \DeclareInstance { nwafu } {#1} { page } {#2} } |
| 6575 |
\cs_generate_variant:Nn \@@_declare_page:nn { nx } |
| 6576 |
% \end{macrocode} |
| 6577 |
% \end{macro} |
| 6578 |
% |
| 6579 |
% \changes{v2.15}{2026/05/15}{取消封面学位会召开月份加粗。} |
| 6580 |
% \changes{v2.12}{2026/05/10}{以数据驱动的方式重构封面元素声明代码。} |
| 6581 |
% |
| 6582 |
% \subsubsection{定义封面元素配置数据列表} |
| 6583 |
% 定义封面元素配置数据列表,以实现批量声明。 |
| 6584 |
% \begin{description} |
| 6585 |
% \item[格式] |{|名称|}{|内容|}{|格式|}{|底部间距|}{|对齐方式|}|内容,即剥离了样式的元素本身 |
| 6586 |
% \item[对齐方式] left, right, center, normal |
| 6587 |
% \end{description} |
| 6588 |
% 如不需要底部间距可以使用|\c_zero_skip|表示间距,但不可留白,否则会造成编译错误。 |
| 6589 |
% \begin{variable}{\c_@@_cover_elements_o_clist} |
| 6590 |
% 封0元素(本科封面使用) |
| 6591 |
% \begin{macrocode} |
| 6592 |
\clist_const:Nn \c_@@_cover_elements_o_clist |
| 6593 |
{ |
| 6594 |
{ logo } { \@@_cover_logo: } { } |
| 6595 |
{ -20 pt plus 0.3 fill } { center }, |
| 6596 |
{ type } { \@@_cover_type: } { \nwafu@hei \huge } |
| 6597 |
{ 5 pt plus 0.3 fill } { center }, |
| 6598 |
{ titlezh } { \@@_fixed_width_center_box:nn { 0.95 \textwidth } { \l_@@_info_title_tl } } |
| 6599 |
{ \@@_line_spread:n {0.95} \nwafu@hei \Huge } |
| 6600 |
{ 0 pt plus 0.3 fill } { center }, |
| 6601 |
{ titleen } { \@@_fixed_width_center_box:nn { 0.95 \textwidth } { \l_@@_info_title_en_tl } } |
| 6602 |
{ \@@_line_spread:n {0.95} \Huge } |
| 6603 |
{ 80 pt plus 0.3 fill } { center }, |
| 6604 |
{ info } { \@@_cover_author_brief: } { \@@_line_spread:n {3.00} \nwafu@hei \large } |
| 6605 |
{ 120 pt plus 0.3 fill } { center }, |
| 6606 |
{ date } { \l_@@_info_date_tl } { \nwafu@hei \large } |
| 6607 |
{ 0 pt plus 0.3 fill } { center } |
| 6608 |
} |
| 6609 |
% \end{macrocode} |
| 6610 |
% \end{variable} |
| 6611 |
% |
| 6612 |
% \begin{variable}{\c_@@_cover_elements_i_graduate_clist} |
| 6613 |
% 封一元素(研究生中文封面) |
| 6614 |
% \begin{macrocode} |
| 6615 |
\clist_const:Nn \c_@@_cover_elements_i_graduate_clist |
| 6616 |
{ |
| 6617 |
{ logo } { \@@_cover_logo: } { } |
| 6618 |
{ -50 pt plus 0.3 fill } { center }, |
| 6619 |
{ type } { \@@_cover_type: } { \sffamily \zihao { 0 } } |
| 6620 |
{ 55 pt plus 0.3 fill } { center }, |
| 6621 |
{ titlezh } { \@@_fixed_width_center_box:nn { 0.95 \textwidth } { \l_@@_info_title_tl } } |
| 6622 |
{ \sffamily \zihao { 2 } } |
| 6623 |
{ 75 pt plus 0.3 fill } { center }, |
| 6624 |
{ info } { \@@_cover_author_detailed: } { \@@_line_spread:n {1.60} \nwafu@hei \zihao { 3 } } |
| 6625 |
{ 53 pt plus 0.3 fill } { center }, |
| 6626 |
{ date } { \l_@@_info_date_tl } { \nwafu@hei \large } |
| 6627 |
{ 0 pt plus 0.3 fill } { center } |
| 6628 |
} |
| 6629 |
% \end{macrocode} |
| 6630 |
% \end{variable} |
| 6631 |
% |
| 6632 |
% \begin{variable}{\c_@@_cover_elements_i_bachelor_clist} |
| 6633 |
% 封一元素(本科中文题名页) |
| 6634 |
% \begin{macrocode} |
| 6635 |
\clist_const:Nn \c_@@_cover_elements_i_bachelor_clist |
| 6636 |
{ |
| 6637 |
{ id } { \@@_cover_id: } { \zihao { 4 } } |
| 6638 |
{ 10 pt plus 0.3 fill } { right }, |
| 6639 |
{ logo } { \@@_cover_logo: } { } |
| 6640 |
{ -10 pt plus 0.3 fill } { center }, |
| 6641 |
{ type } { \@@_cover_type: } { \nwafu@hei \huge } |
| 6642 |
{ 0 pt plus 0.3 fill } { center }, |
| 6643 |
{ titlezh } { \@@_fixed_width_center_box:nn { 0.95 \textwidth } |
| 6644 |
{ \l_@@_info_title_tl } } { \@@_line_spread:n {0.95} \nwafu@hei \Huge } |
| 6645 |
{ -5 pt plus 0.3 fill } { center }, |
| 6646 |
{ titleen } { \@@_fixed_width_center_box:nn { 0.95 \textwidth } { \l_@@_info_title_en_tl } } |
| 6647 |
{ \@@_line_spread:n {0.95} \Huge } |
| 6648 |
{ 15 pt plus 0.3 fill } { center }, |
| 6649 |
{ info } { \@@_cover_author_detailed: } { \@@_line_spread:n {1.60} \nwafu@hei \zihao { 3 } } |
| 6650 |
{ 30 pt plus 0.3 fill } { center }, |
| 6651 |
{ date } { \l_@@_info_date_tl } { \nwafu@hei \large } |
| 6652 |
{ 0 pt plus 0.3 fill } { center } |
| 6653 |
} |
| 6654 |
% \end{macrocode} |
| 6655 |
% \end{variable} |
| 6656 |
% |
| 6657 |
% \begin{variable}{\c_@@_cover_elements_ii_clist} |
| 6658 |
% 封二元素(研究生英文封面) |
| 6659 |
% \begin{macrocode} |
| 6660 |
\clist_const:Nn \c_@@_cover_elements_ii_clist |
| 6661 |
{ |
| 6662 |
{ type } { \@@_cover_ii_type_content: } { \@@_line_spread:n {1.62} \zihao { -3 } } |
| 6663 |
{ 50 pt plus 0.3 fill } { center }, |
| 6664 |
{ title } { \l_@@_info_title_en_tl } { \@@_line_spread:n {0.90} \zihao { 1 } \bfseries } |
| 6665 |
{ 75 pt plus 0.3 fill } { center }, |
| 6666 |
{ info } { \@@_cover_author_detailed_en: } { \@@_line_spread:n {1.12} \zihao { -3 } } |
| 6667 |
{ 72 pt plus 0.3 fill } { center }, |
| 6668 |
{ date } { \l_@@_info_date_en_tl } { \nwafu@hei \large } |
| 6669 |
{ 0 pt plus 0.3 fill } { center }, |
| 6670 |
{ department } { \l_@@_info_department_en_tl } { \zihao { -3 } } |
| 6671 |
{ -32 pt plus 0.3 fill } { center }, |
| 6672 |
{ nwafu } { \@@_name_en: } { \zihao { -3 } } |
| 6673 |
{ 0 pt plus 0.3 fill } { center } |
| 6674 |
} |
| 6675 |
% \end{macrocode} |
| 6676 |
% \end{variable} |
| 6677 |
% |
| 6678 |
% \begin{variable}{\c_@@_cover_elements_iii_clist} |
| 6679 |
% 封三元素(研究生题名页) |
| 6680 |
% \begin{macrocode} |
| 6681 |
\clist_const:Nn \c_@@_cover_elements_iii_clist |
| 6682 |
{ |
| 6683 |
{ id } { \@@_cover_id: } { \@@_line_spread:n {1.12} \zihao { -4 } } |
| 6684 |
{ 35 pt plus 0.3 fill } { center }, |
| 6685 |
{ type } { \@@_name_simp: \clist_item:Nn \c_@@_thesis_type_clist { \g_@@_thesis_type_int } } |
| 6686 |
{ \zihao { -2 } \bfseries } |
| 6687 |
{ 0 pt plus 0.3 fill } { center }, |
| 6688 |
{ title } { \l_@@_info_title_tl } { \zihao { 2 } \sffamily } |
| 6689 |
{ 65 pt plus 0.3 fill } { center }, |
| 6690 |
{ instructors } { \@@_cover_instructors: } { \@@_line_spread:n {0.88} \zihao { 3 } \bfseries } |
| 6691 |
{ 75 pt plus 0.3 fill } { center }, |
| 6692 |
{ ctitle } { 答辩委员会 \c_@@_fwid_colon_tl } { \zihao { -3 } } |
| 6693 |
{ -20 pt plus 0.3 fill } { left }, |
| 6694 |
{ committees } { \@@_cover_defensecommittees: } { \@@_line_spread:n {1.12} \zihao { -3 } } |
| 6695 |
{ 60 pt plus 0.3 fill } { center }, |
| 6696 |
{ date } { 答辩日期 \c_@@_fwid_colon_tl \l_@@_info_defensedate_tl } { \zihao { -3 } } |
| 6697 |
{ 0 pt plus 0.3 fill } { left } |
| 6698 |
} |
| 6699 |
% \end{macrocode} |
| 6700 |
% \end{variable} |
| 6701 |
% |
| 6702 |
% \begin{variable}{\c_@@_cover_elements_iv_clist} |
| 6703 |
% 封四元素(资助页) |
| 6704 |
% \begin{macrocode} |
| 6705 |
\clist_const:Nn \c_@@_cover_elements_iv_clist |
| 6706 |
{ |
| 6707 |
{ foundationtitle } { 项目资助 } { \nwafu@hei \Large } |
| 6708 |
% \end{macrocode} |
| 6709 |
% 注意使用\c_zero_skip表示与下一个元素的间距 |
| 6710 |
% \begin{macrocode} |
| 6711 |
{ \c_zero_skip } { center }, |
| 6712 |
{ foundation } { \@@_cover_foundation: } { \sffamily \zihao { 3 } } |
| 6713 |
{ 0 pt plus 0.3 fill } { center } |
| 6714 |
} |
| 6715 |
% \end{macrocode} |
| 6716 |
% \end{variable} |
| 6717 |
% |
| 6718 |
% \begin{variable}{\c_@@_cover_elements_v_clist} |
| 6719 |
% \begin{macrocode} |
| 6720 |
% 封五元素(研究生声明页) |
| 6721 |
\clist_const:Nn \c_@@_cover_elements_v_clist |
| 6722 |
{ |
| 6723 |
{ originality-decl-name } { \c_@@_name_orig_decl_tl } { \@@_line_spread:n { 1.2 } \zihao { 3 } \sffamily } |
| 6724 |
{ 0.25 cm } { center }, |
| 6725 |
{ originality-decl-text } { \par \indent \c_@@_orig_decl_text_tl \par } { \zihao { -4 } } |
| 6726 |
{ 0.4 cm } { normal }, |
| 6727 |
{ originality-decl-sig } { \@@_cover_signature:N \c_@@_orig_decl_sign_tl } { \zihao { -4 } } |
| 6728 |
{ 0.4 cm } { left }, |
| 6729 |
{ supervisor-decl-name } { \c_@@_name_super_decl_tl } { \@@_line_spread:n { 1.2 } \zihao { 3 } \sffamily } |
| 6730 |
{ 0.25 cm } { center }, |
| 6731 |
{ supervisor-decl-text } { \par \indent \c_@@_super_decl_text_tl \par } { \zihao { -4 } } |
| 6732 |
{ 0.4 cm } { normal }, |
| 6733 |
{ supervisor-decl-sig } { \@@_cover_signature:N \c_@@_super_decl_sign_tl } { \zihao { -4 } } |
| 6734 |
{ 0 pt plus 0.3 fill } { left } |
| 6735 |
} |
| 6736 |
% \end{macrocode} |
| 6737 |
% \end{variable} |
| 6738 |
% |
| 6739 |
% \begin{variable}{\c_@@_cover_elements_vi_clist} |
| 6740 |
% 封六元素(研究生授权页) |
| 6741 |
% \begin{macrocode} |
| 6742 |
\clist_const:Nn \c_@@_cover_elements_vi_clist |
| 6743 |
{ |
| 6744 |
{ authorization-decl-name } { \c_@@_name_auth_decl_tl } { \@@_line_spread:n { 1.2 } \zihao { 3 } \sffamily } |
| 6745 |
{ 0.25 cm } { center }, |
| 6746 |
{ authorization-decl-text } { \par \indent \c_@@_auth_decl_text_tl \par } { \zihao { -4 } } |
| 6747 |
{ 0.8 cm } { normal }, |
| 6748 |
{ authorization-decl-sig } { \@@_cover_signature:N \c_@@_orig_decl_sign_tl } { \zihao { -4 } } |
| 6749 |
{ 0 pt plus 0.3 fill } { left }, |
| 6750 |
{ supervisor-decl-sig } { \@@_cover_signature:N \c_@@_super_decl_sign_tl } { \zihao { -4 } } |
| 6751 |
{ 0 pt plus 0.3 fill } { left } |
| 6752 |
} |
| 6753 |
% \end{macrocode} |
| 6754 |
% \end{variable} |
| 6755 |
% |
| 6756 |
% \begin{variable}{\c_@@_cover_elements_vii_clist} |
| 6757 |
% 封七元素(本科声明+授权页) |
| 6758 |
% \begin{macrocode} |
| 6759 |
\clist_const:Nn \c_@@_cover_elements_vii_clist |
| 6760 |
{ |
| 6761 |
{ originality-decl-name } { \c_@@_name_orig_decl_tl } { \@@_line_spread:n { 1.2 } \zihao { 3 } \sffamily } |
| 6762 |
{ 0.25 cm } { center }, |
| 6763 |
{ originality-decl-text } { \par \indent \c_@@_orig_decl_text_tl \par } { \zihao { -4 } \nwafu@kai } |
| 6764 |
{ 0.4 cm } { normal }, |
| 6765 |
{ originality-decl-sig } { \@@_cover_signature:N \c_@@_orig_decl_sign_tl } { \zihao { -4 } \nwafu@kai } |
| 6766 |
{ 0.4 cm } { left }, |
| 6767 |
{ authorization-decl-name } { \c_@@_name_auth_decl_tl } { \@@_line_spread:n { 1.2 } \zihao { 3 } \sffamily } |
| 6768 |
{ 0.25 cm } { center }, |
| 6769 |
{ authorization-decl-text } { \par \indent \c_@@_auth_decl_text_tl \par } { \zihao { -4 } \nwafu@kai } |
| 6770 |
{ 0.4 cm } { normal }, |
| 6771 |
{ authorization-decl-sig } { \@@_cover_signature:N \c_@@_orig_decl_sign_tl } { \zihao { -4 } \nwafu@kai } |
| 6772 |
{ -0.5 cm } { left }, |
| 6773 |
{ supervisor-decl-sig } { \@@_cover_signature:N \c_@@_super_decl_sign_tl } { \zihao { -4 } \nwafu@kai } |
| 6774 |
{ 0 pt plus 0.3 fill } { left } |
| 6775 |
} |
| 6776 |
% \end{macrocode} |
| 6777 |
% \end{variable} |
| 6778 |
% |
| 6779 |
% \subsubsection{定义封面页面元素} |
| 6780 |
% |
| 6781 |
% \changes{v2.00}{2026/04/30}{添加本科封面实例(本模板定义为封0)。} |
| 6782 |
% |
| 6783 |
% \begin{macro}{\@@_cover_ii_type_content:} |
| 6784 |
% 辅助函数:动态生成封二内容 |
| 6785 |
% \begin{macrocode} |
| 6786 |
\cs_new:Npn \@@_cover_ii_type_content: |
| 6787 |
{ |
| 6788 |
\int_case:nn { \g_@@_thesis_type_int } |
| 6789 |
{ |
| 6790 |
{1} |
| 6791 |
{ |
| 6792 |
\@@_fixed_width_center_box:nn { 0.85 \textwidth } |
| 6793 |
{ |
| 6794 |
Dissertation~Submitted~to~\@@_name_en: \\ |
| 6795 |
in~Partial~Fulfillment~of~the~Requirements \\ |
| 6796 |
\int_case:nn { \l_@@_info_postgraduate_type_int } |
| 6797 |
{ |
| 6798 |
{1}{ for~the~Degree~of \\ } |
| 6799 |
{2}{ for~the~Professional~Degree~of \\ } |
| 6800 |
} |
| 6801 |
Doctor~of~ |
| 6802 |
\int_case:nn { \l_@@_info_postgraduate_type_int } |
| 6803 |
{ |
| 6804 |
{1}{ Philosophy } |
| 6805 |
{2}{ \l_@@_info_engineering_title_en_tl } |
| 6806 |
} |
| 6807 |
} |
| 6808 |
} |
| 6809 |
{2} |
| 6810 |
{ |
| 6811 |
\@@_fixed_width_center_box:nn { 0.85 \textwidth } |
| 6812 |
{ |
| 6813 |
Dissertation~Submitted~to~\@@_name_en: \\ |
| 6814 |
in~Partial~Fulfillment~of~the~Requirements \\ |
| 6815 |
\int_case:nn { \l_@@_info_postgraduate_type_int } |
| 6816 |
{ |
| 6817 |
{1}{ for~the~Degree~of \\ } |
| 6818 |
{2}{ for~the~Professional~Degree~of \\ } |
| 6819 |
} |
| 6820 |
Master~of~ |
| 6821 |
\int_case:nn { \l_@@_info_postgraduate_type_int } |
| 6822 |
{ |
| 6823 |
{1}{ \l_@@_info_mastertype_en_tl } |
| 6824 |
{2}{ \l_@@_info_engineering_title_en_tl } |
| 6825 |
} |
| 6826 |
} |
| 6827 |
} |
| 6828 |
} |
| 6829 |
} |
| 6830 |
% \end{macrocode} |
| 6831 |
% \end{macro} |
| 6832 |
% |
| 6833 |
% \begin{macro}{\@@_declare_cover_element:nnnnnn} |
| 6834 |
% 辅助函数:声明一个元素 |
| 6835 |
% \begin{arguments} |
| 6836 |
% \item 前缀 (如 cover/o) |
| 6837 |
% \item 元素名称 (如 logo) |
| 6838 |
% \item 内容 |
| 6839 |
% \item 格式 |
| 6840 |
% \item 底部间距 |
| 6841 |
% \item 对齐方式 |
| 6842 |
% \end{arguments} |
| 6843 |
% \begin{macrocode} |
| 6844 |
\cs_new_protected:Npn \@@_declare_cover_element:nnnnnn #1#2#3#4#5#6 |
| 6845 |
{ |
| 6846 |
\@@_declare_element:nn { #1 / #2 } |
| 6847 |
{ |
| 6848 |
content = {#3}, |
| 6849 |
format = {#4}, |
| 6850 |
bottom-skip = {#5}, |
| 6851 |
align = {#6} |
| 6852 |
} |
| 6853 |
} |
| 6854 |
% \end{macrocode} |
| 6855 |
% \end{macro} |
| 6856 |
% |
| 6857 |
% \begin{macro}{\@@_declare_cover_elements:nn} |
| 6858 |
% 辅助函数:批量声明一组元素 |
| 6859 |
% \begin{arguments} |
| 6860 |
% \item 前缀 (如 cover/o) |
| 6861 |
% \item 元素clist列表 |
| 6862 |
% \end{arguments} |
| 6863 |
% \begin{macrocode} |
| 6864 |
\cs_new_protected:Npn \@@_declare_cover_elements:nn #1#2 |
| 6865 |
{ |
| 6866 |
\clist_map_inline:Nn #2 |
| 6867 |
{ |
| 6868 |
\@@_declare_cover_element:nnnnnn { #1 } ##1 |
| 6869 |
} |
| 6870 |
} |
| 6871 |
% \end{macrocode} |
| 6872 |
% \end{macro} |
| 6873 |
% |
| 6874 |
% \subsubsection{声明封面页面元素} |
| 6875 |
% |
| 6876 |
% 执行批量声明 |
| 6877 |
% 封0元素(本科封面) |
| 6878 |
% \begin{macrocode} |
| 6879 |
\@@_declare_cover_elements:nn { cover / o } \c_@@_cover_elements_o_clist |
| 6880 |
% \end{macrocode} |
| 6881 |
% 封一元素(研究生中文封面) |
| 6882 |
% \begin{macrocode} |
| 6883 |
\@@_declare_cover_elements:nn { cover / i / grad } \c_@@_cover_elements_i_graduate_clist |
| 6884 |
% \end{macrocode} |
| 6885 |
% 封一元素(本科中文封面) |
| 6886 |
% \begin{macrocode} |
| 6887 |
\@@_declare_cover_elements:nn { cover / i / bach } \c_@@_cover_elements_i_bachelor_clist |
| 6888 |
% \end{macrocode} |
| 6889 |
% 封二元素(研究生英文封面) |
| 6890 |
% \begin{macrocode} |
| 6891 |
\@@_declare_cover_elements:nn { cover / ii } \c_@@_cover_elements_ii_clist |
| 6892 |
% \end{macrocode} |
| 6893 |
% 封三元素(研究生题名页) |
| 6894 |
% \begin{macrocode} |
| 6895 |
\@@_declare_cover_elements:nn { cover / iii } \c_@@_cover_elements_iii_clist |
| 6896 |
% \end{macrocode} |
| 6897 |
% 封四元素(资助页) |
| 6898 |
% \begin{macrocode} |
| 6899 |
\@@_declare_cover_elements:nn { cover / iv } \c_@@_cover_elements_iv_clist |
| 6900 |
% \end{macrocode} |
| 6901 |
% 封五元素(研究生声明页) |
| 6902 |
% \begin{macrocode} |
| 6903 |
\@@_declare_cover_elements:nn { cover / v } \c_@@_cover_elements_v_clist |
| 6904 |
% \end{macrocode} |
| 6905 |
% 封六元素(研究生授权页) |
| 6906 |
% \begin{macrocode} |
| 6907 |
\@@_declare_cover_elements:nn { cover / vi } \c_@@_cover_elements_vi_clist |
| 6908 |
% \end{macrocode} |
| 6909 |
% 封七元素(本科声明+授权页) |
| 6910 |
% \begin{macrocode} |
| 6911 |
\@@_declare_cover_elements:nn { cover / vii } \c_@@_cover_elements_vii_clist |
| 6912 |
% \end{macrocode} |
| 6913 |
% |
| 6914 |
% \subsubsection{定义封面页面参数} |
| 6915 |
% |
| 6916 |
% \begin{macro}{cover-o-default} |
| 6917 |
% 本科封0 |
| 6918 |
% \begin{macrocode} |
| 6919 |
\@@_declare_page:nx { cover-o-default } |
| 6920 |
{ |
| 6921 |
content = { logo, type, titlezh, titleen, info, date }, |
| 6922 |
prefix = cover / o /, |
| 6923 |
bottom-skip = 0 pt plus 1.5 fill |
| 6924 |
} |
| 6925 |
% \end{macrocode} |
| 6926 |
% \end{macro} |
| 6927 |
% |
| 6928 |
% \begin{macro}{cover-i-default} |
| 6929 |
% 封一。 |
| 6930 |
% \begin{macrocode} |
| 6931 |
\@@_declare_page:nx { cover-i-default } |
| 6932 |
{ |
| 6933 |
content = \int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 } |
| 6934 |
{ |
| 6935 |
% \end{macrocode} |
| 6936 |
% 研究生封面一 |
| 6937 |
% \begin{macrocode} |
| 6938 |
{ logo, type, titlezh, info, date} |
| 6939 |
}{ |
| 6940 |
% \end{macrocode} |
| 6941 |
% 本科封面一 |
| 6942 |
% \begin{macrocode} |
| 6943 |
{ id, logo, type, titlezh, titleen, info, date } |
| 6944 |
}, |
| 6945 |
prefix = cover / i / \int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 } |
| 6946 |
{ grad } { bach } /, |
| 6947 |
top-skip = \int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 } |
| 6948 |
{ |
| 6949 |
30 pt plus 1.5 fill, |
| 6950 |
}{ |
| 6951 |
-40 pt plus 1.5 fill, |
| 6952 |
}, |
| 6953 |
bottom-skip = 0 pt plus 1.5 fill |
| 6954 |
} |
| 6955 |
% \end{macrocode} |
| 6956 |
% \end{macro} |
| 6957 |
% |
| 6958 |
% \begin{macro}{cover-ii-default} |
| 6959 |
% 封二(仅研究生用)。 |
| 6960 |
% \begin{macrocode} |
| 6961 |
\@@_declare_page:nn { cover-ii-default } |
| 6962 |
{ |
| 6963 |
content = { type, title, info, date }, |
| 6964 |
prefix = cover / ii /, |
| 6965 |
top-skip = 30 pt plus 0.1 fill, |
| 6966 |
bottom-skip = 0 pt plus 1.5 fill |
| 6967 |
} |
| 6968 |
% \end{macrocode} |
| 6969 |
% \end{macro} |
| 6970 |
% |
| 6971 |
% \begin{macro}{cover-iii-default} |
| 6972 |
% 封三(仅研究生用)。 |
| 6973 |
% \begin{macrocode} |
| 6974 |
\@@_declare_page:nn { cover-iii-default } |
| 6975 |
{ |
| 6976 |
content = { id, type, title, instructors, ctitle, committees, date }, |
| 6977 |
prefix = cover / iii /, |
| 6978 |
top-skip = -55 pt plus 0.1 fill, |
| 6979 |
bottom-skip = 0 pt plus 0.5 fill |
| 6980 |
} |
| 6981 |
% \end{macrocode} |
| 6982 |
% \end{macro} |
| 6983 |
% |
| 6984 |
% \begin{macro}{cover-iv-default} |
| 6985 |
% 封四。 |
| 6986 |
% \begin{macrocode} |
| 6987 |
\@@_declare_page:nx { cover-iv-default } |
| 6988 |
{ |
| 6989 |
content = \int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 } |
| 6990 |
{ |
| 6991 |
% \end{macrocode} |
| 6992 |
% 研究生 |
| 6993 |
% \begin{macrocode} |
| 6994 |
{ foundation } |
| 6995 |
}{ |
| 6996 |
% \end{macrocode} |
| 6997 |
% 本科 |
| 6998 |
% \begin{macrocode} |
| 6999 |
{ foundationtitle, foundation } |
| 7000 |
}, |
| 7001 |
prefix = cover / iv /, |
| 7002 |
} |
| 7003 |
% \end{macrocode} |
| 7004 |
% \end{macro} |
| 7005 |
% |
| 7006 |
% \begin{macro}{cover-v-default} |
| 7007 |
% 封五(仅研究生用)。 |
| 7008 |
% \begin{macrocode} |
| 7009 |
\@@_declare_page:nn { cover-v-default } |
| 7010 |
{ |
| 7011 |
content = { originality-decl-name, |
| 7012 |
originality-decl-text, |
| 7013 |
originality-decl-sig, |
| 7014 |
supervisor-decl-name, |
| 7015 |
supervisor-decl-text, |
| 7016 |
supervisor-decl-sig |
| 7017 |
}, |
| 7018 |
prefix = cover / v /, |
| 7019 |
format = \@@_line_spread:n { 1.25 }, |
| 7020 |
top-skip = 0 pt plus 0.2 fill, |
| 7021 |
bottom-skip = 0 pt plus 2.5 fill |
| 7022 |
} |
| 7023 |
% \end{macrocode} |
| 7024 |
% \end{macro} |
| 7025 |
% |
| 7026 |
% \begin{macro}{cover-vi-default} |
| 7027 |
% 封六(仅研究生用)。 |
| 7028 |
% \begin{macrocode} |
| 7029 |
\@@_declare_page:nn { cover-vi-default } |
| 7030 |
{ |
| 7031 |
content = { authorization-decl-name, |
| 7032 |
authorization-decl-text, |
| 7033 |
authorization-decl-sig, |
| 7034 |
supervisor-decl-sig |
| 7035 |
}, |
| 7036 |
prefix = cover / vi /, |
| 7037 |
format = \@@_line_spread:n { 1.25 }, |
| 7038 |
top-skip = 0 pt plus 0.2 fill, |
| 7039 |
bottom-skip = 0 pt plus 2.5 fill |
| 7040 |
} |
| 7041 |
% \end{macrocode} |
| 7042 |
% \end{macro} |
| 7043 |
% |
| 7044 |
% \begin{macro}{cover-vii-default} |
| 7045 |
% 封七(仅本科用)。 |
| 7046 |
% \begin{macrocode} |
| 7047 |
\@@_declare_page:nn { cover-vii-default } |
| 7048 |
{ |
| 7049 |
content = { originality-decl-name, |
| 7050 |
originality-decl-text, |
| 7051 |
originality-decl-sig, |
| 7052 |
authorization-decl-name, |
| 7053 |
authorization-decl-text, |
| 7054 |
authorization-decl-sig, |
| 7055 |
supervisor-decl-sig |
| 7056 |
}, |
| 7057 |
prefix = cover / vii /, |
| 7058 |
format = \@@_line_spread:n { 1.25 }, |
| 7059 |
top-skip = 0 pt plus 0.2 fill, |
| 7060 |
bottom-skip = 0 pt plus 2.5 fill |
| 7061 |
} |
| 7062 |
% \end{macrocode} |
| 7063 |
% \end{macro} |
| 7064 |
% |
| 7065 |
% \subsubsection{排版封面} |
| 7066 |
% |
| 7067 |
% \begin{macro}{\makecovero,\makecoveri,\makecoverii,\makecoveriii, |
| 7068 |
% \makecoveriv,\makecoverv,\makecovervi,\makecovervii} |
| 7069 |
% 封面一$\sim$七,其中一$\sim$六为研究生使用,0、一、四和七为本科使用。 |
| 7070 |
% \begin{macrocode} |
| 7071 |
% 封面0,本科封面 |
| 7072 |
\NewDocumentCommand \makecovero { } |
| 7073 |
{ |
| 7074 |
\thispagestyle { empty } |
| 7075 |
\newgeometry{top=1.0in, bottom=1.0in, left=1.25in, right=1.25in} |
| 7076 |
\UseInstance { nwafu } { cover-o-default } |
| 7077 |
\restoregeometry |
| 7078 |
} |
| 7079 |
% \end{macrocode} |
| 7080 |
% 封面一,研究生、本科中文封面 |
| 7081 |
% \begin{macrocode} |
| 7082 |
\NewDocumentCommand \makecoveri { } |
| 7083 |
{ |
| 7084 |
\thispagestyle { empty } |
| 7085 |
\newgeometry{top=1.0in, bottom=1.0in, left=1.25in, right=1.25in} |
| 7086 |
\UseInstance { nwafu } { cover-i-default } |
| 7087 |
\restoregeometry |
| 7088 |
} |
| 7089 |
% \end{macrocode} |
| 7090 |
% 封面二,研究生英文封面 |
| 7091 |
% \begin{macrocode} |
| 7092 |
\NewDocumentCommand \makecoverii { } |
| 7093 |
{ |
| 7094 |
\thispagestyle { empty } |
| 7095 |
\newgeometry{top=1.0in, bottom=1.0in, left=1.25in, right=1.25in} |
| 7096 |
\UseInstance { nwafu } { cover-ii-default } |
| 7097 |
\restoregeometry |
| 7098 |
} |
| 7099 |
% \end{macrocode} |
| 7100 |
% 封面三,研究生封面内页(ID、答辩委员会等) |
| 7101 |
% \begin{macrocode} |
| 7102 |
\NewDocumentCommand \makecoveriii { } |
| 7103 |
{ |
| 7104 |
\thispagestyle { empty } |
| 7105 |
\newgeometry{top=1.0in, bottom=1.0in, left=1.25in, right=1.25in} |
| 7106 |
\UseInstance { nwafu } { cover-iii-default } |
| 7107 |
\restoregeometry |
| 7108 |
} |
| 7109 |
% \end{macrocode} |
| 7110 |
% 封面四,研究生项目资助页 |
| 7111 |
% \begin{macrocode} |
| 7112 |
\NewDocumentCommand \makecoveriv { } |
| 7113 |
{ |
| 7114 |
\thispagestyle { empty } |
| 7115 |
\newgeometry{top=1.0in, bottom=1.0in, left=1.25in, right=1.25in} |
| 7116 |
\UseInstance { nwafu } { cover-iv-default } |
| 7117 |
\restoregeometry |
| 7118 |
} |
| 7119 |
% \end{macrocode} |
| 7120 |
% 封面五,研究生独创性声明与导师承诺 |
| 7121 |
% \begin{macrocode} |
| 7122 |
\NewDocumentCommand \makecoverv { } |
| 7123 |
{ |
| 7124 |
\thispagestyle { empty } |
| 7125 |
\newgeometry{top=1.0in, bottom=1.0in, left=1.25in, right=1.25in} |
| 7126 |
\UseInstance { nwafu } { cover-v-default } |
| 7127 |
\restoregeometry |
| 7128 |
} |
| 7129 |
% \end{macrocode} |
| 7130 |
% 封面六,研究生论文使用授权说明 |
| 7131 |
% \begin{macrocode} |
| 7132 |
\NewDocumentCommand \makecovervi { } |
| 7133 |
{ |
| 7134 |
\thispagestyle { empty } |
| 7135 |
\newgeometry{top=1.0in, bottom=1.0in, left=1.25in, right=1.25in} |
| 7136 |
\UseInstance { nwafu } { cover-vi-default } |
| 7137 |
\restoregeometry |
| 7138 |
} |
| 7139 |
% \end{macrocode} |
| 7140 |
% 封面七,本科生独创性声明及论文使用授权说明 |
| 7141 |
% \begin{macrocode} |
| 7142 |
\NewDocumentCommand \makecovervii { } |
| 7143 |
{ |
| 7144 |
\thispagestyle { empty } |
| 7145 |
\newgeometry{top=1.0in, bottom=1.0in, left=1.25in, right=1.25in} |
| 7146 |
\UseInstance { nwafu } { cover-vii-default } |
| 7147 |
\restoregeometry |
| 7148 |
} |
| 7149 |
% \end{macrocode} |
| 7150 |
% \end{macro} |
| 7151 |
% |
| 7152 |
% \subsubsection{自动生成封面} |
| 7153 |
% |
| 7154 |
% \begin{macro}{style/auto-make-cover} |
| 7155 |
% \begin{variable}{\g_@@_auto_make_cover_bool} |
| 7156 |
% 是否自动生成封面。 |
| 7157 |
% \begin{macrocode} |
| 7158 |
\bool_new:N \g_@@_auto_make_cover_bool |
| 7159 |
\keys_define:nn { nwafu / style } |
| 7160 |
{ |
| 7161 |
auto-make-cover .bool_gset:N = \g_@@_auto_make_cover_bool, |
| 7162 |
auto-make-cover .default:n = true |
| 7163 |
} |
| 7164 |
% \end{macrocode} |
| 7165 |
% \end{variable} |
| 7166 |
% \end{macro} |
| 7167 |
% |
| 7168 |
% \changes{v2.13}{2026/05/12}{将研究生封一到封五设置为从奇数页起排。} |
| 7169 |
% |
| 7170 |
% \begin{macro}{\makecovers} |
| 7171 |
% 排版所有封面。 |
| 7172 |
% \begin{macrocode} |
| 7173 |
\NewDocumentCommand \makecovers { } |
| 7174 |
{ |
| 7175 |
\int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 } |
| 7176 |
{ |
| 7177 |
% \end{macrocode} |
| 7178 |
% 研究生 |
| 7179 |
% \begin{macrocode} |
| 7180 |
\begin{titlepage} |
| 7181 |
\makecoveri |
| 7182 |
\cleardoublepage |
| 7183 |
\makecoverii |
| 7184 |
\cleardoublepage |
| 7185 |
\makecoveriii |
| 7186 |
\clist_if_empty:NF \l_@@_info_foundation_clist |
| 7187 |
{ |
| 7188 |
\cleardoublepage |
| 7189 |
\makecoveriv |
| 7190 |
} |
| 7191 |
\cleardoublepage |
| 7192 |
\makecoverv |
| 7193 |
\newpage |
| 7194 |
\makecovervi |
| 7195 |
\end{titlepage} |
| 7196 |
}{ |
| 7197 |
% \end{macrocode} |
| 7198 |
% 本科 |
| 7199 |
% \begin{macrocode} |
| 7200 |
\begin{titlepage} |
| 7201 |
\makecovero |
| 7202 |
\cleardoublepage |
| 7203 |
\makecoveri |
| 7204 |
\clist_if_empty:NF \l_@@_info_foundation_clist |
| 7205 |
{ |
| 7206 |
\cleardoublepage |
| 7207 |
\makecoveriv |
| 7208 |
} |
| 7209 |
\cleardoublepage |
| 7210 |
\makecovervii |
| 7211 |
\end{titlepage} |
| 7212 |
} |
| 7213 |
} |
| 7214 |
% \end{macrocode} |
| 7215 |
% \end{macro} |
| 7216 |
% |
| 7217 |
% \subsection{前料} |
| 7218 |
% |
| 7219 |
% \subsubsection{字段声明} |
| 7220 |
% |
| 7221 |
% \begin{variable}{\l_@@_abstract_file_tl, |
| 7222 |
% \l_@@_abstract_file_en_tl, |
| 7223 |
% \l_@@_abstract_keywords_clist, |
| 7224 |
% \l_@@_abstract_keywords_en_clist, |
| 7225 |
% \l_@@_notation_file_tl, |
| 7226 |
% \l_@@_terminology_file_tl} |
| 7227 |
% 前料字段。 |
| 7228 |
% \begin{macrocode} |
| 7229 |
\tl_new:N \l_@@_abstract_file_tl |
| 7230 |
\tl_new:N \l_@@_abstract_file_en_tl |
| 7231 |
\clist_new:N \l_@@_abstract_keywords_clist |
| 7232 |
\clist_new:N \l_@@_abstract_keywords_en_clist |
| 7233 |
\tl_new:N \l_@@_notation_file_tl |
| 7234 |
\tl_new:N \l_@@_terminology_file_tl |
| 7235 |
% \end{macrocode} |
| 7236 |
% \end{variable} |
| 7237 |
% |
| 7238 |
% \subsubsection{选项声明} |
| 7239 |
% |
| 7240 |
% \begin{macrocode} |
| 7241 |
\keys_define:nn { nwafu / abstract } |
| 7242 |
{ |
| 7243 |
% \end{macrocode} |
| 7244 |
% |
| 7245 |
% \begin{macro}{abstract/abstractfile, abstract/abstractfile*} |
| 7246 |
% 摘要文件的文件名 |
| 7247 |
% \begin{macrocode} |
| 7248 |
abstractfile .tl_set:N = \l_@@_abstract_file_tl, |
| 7249 |
abstractfile* .tl_set:N = \l_@@_abstract_file_en_tl, |
| 7250 |
% \end{macrocode} |
| 7251 |
% \end{macro} |
| 7252 |
% |
| 7253 |
% \begin{macro}{abstract/keywords, abstract/keywords*} |
| 7254 |
% 论文关键字列表。 |
| 7255 |
% \begin{macrocode} |
| 7256 |
keywords .clist_set:N = \l_@@_abstract_keywords_clist, |
| 7257 |
keywords* .clist_set:N = \l_@@_abstract_keywords_en_clist, |
| 7258 |
% \end{macrocode} |
| 7259 |
% \end{macro} |
| 7260 |
% |
| 7261 |
% \begin{macro}{abstract/notation} |
| 7262 |
% 符号表tex源文件的文件名。 |
| 7263 |
% \begin{macrocode} |
| 7264 |
notationfile .tl_set:N = \l_@@_notation_file_tl, |
| 7265 |
notationfile .default:n = {}, |
| 7266 |
% \end{macrocode} |
| 7267 |
% \end{macro} |
| 7268 |
% |
| 7269 |
% \begin{macro}{abstract/terminology} |
| 7270 |
% 术语表tex源文件的文件名。 |
| 7271 |
% \begin{macrocode} |
| 7272 |
termfile .tl_set:N = \l_@@_terminology_file_tl, |
| 7273 |
termfile .default:n = {}, |
| 7274 |
} |
| 7275 |
% \end{macrocode} |
| 7276 |
% \end{macro} |
| 7277 |
% |
| 7278 |
% \subsubsection{定义摘要环境} |
| 7279 |
% |
| 7280 |
% \begin{environment}{abstract} |
| 7281 |
% \begin{environment}{abstract*} |
| 7282 |
% 摘要环境,定义中英文双语摘要。 |
| 7283 |
% \begin{macrocode} |
| 7284 |
\NewDocumentEnvironment { abstract } { } |
| 7285 |
{ \@@_abstract_begin: } { \@@_abstract_end: } |
| 7286 |
\NewDocumentEnvironment { abstract* } { } |
| 7287 |
{ \@@_abstract_en_begin: } { \@@_abstract_en_end: } |
| 7288 |
% \end{macrocode} |
| 7289 |
% \end{environment} |
| 7290 |
% \end{environment} |
| 7291 |
% |
| 7292 |
% \begin{macro}{\@@_abstract_begin:,\@@_abstract_en_begin:} |
| 7293 |
% 摘要页标题。 |
| 7294 |
% \begin{macrocode} |
| 7295 |
\cs_new_protected:Npn \@@_abstract_begin: |
| 7296 |
{ |
| 7297 |
\int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 } |
| 7298 |
{ |
| 7299 |
\@@_chapter:V \c_@@_name_abstract_tl |
| 7300 |
}{ |
| 7301 |
\@@_chapter:V \c_@@_name_abstract_tl |
| 7302 |
\par \mode_leave_vertical: \par |
| 7303 |
} |
| 7304 |
} |
| 7305 |
\cs_new_protected:Npn \@@_abstract_en_begin: |
| 7306 |
{ |
| 7307 |
\int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 } |
| 7308 |
{ |
| 7309 |
\@@_chapter:n \c_@@_name_abstract_en_tl |
| 7310 |
}{ |
| 7311 |
\@@_chapter:n \c_@@_name_abstract_en_tl |
| 7312 |
\par \mode_leave_vertical: \par |
| 7313 |
} |
| 7314 |
} |
| 7315 |
% \end{macrocode} |
| 7316 |
% \end{macro} |
| 7317 |
% |
| 7318 |
% \begin{macro}{\@@_abstract_end:,\@@_abstract_en_end:} |
| 7319 |
% 摘要正文完成后,输出关键字列表。 |
| 7320 |
% \begin{macrocode} |
| 7321 |
\cs_new_protected:Npn \@@_abstract_end: |
| 7322 |
{ |
| 7323 |
\@@_keywords:nNn |
| 7324 |
{ \c_@@_name_keywords_tl \c_@@_fwid_colon_tl } |
| 7325 |
\l_@@_abstract_keywords_clist { ; ~} |
| 7326 |
} |
| 7327 |
\cs_new_protected:Npn \@@_abstract_en_end: |
| 7328 |
{ |
| 7329 |
\@@_keywords:nNn |
| 7330 |
{\c_@@_name_keywords_en_tl : ~ } |
| 7331 |
\l_@@_abstract_keywords_en_clist { ; ~ } |
| 7332 |
} |
| 7333 |
% \end{macrocode} |
| 7334 |
% \end{macro} |
| 7335 |
% |
| 7336 |
% \begin{macro}{\@@_keywords:nNn,\@@_keywords_prevdepth:} |
| 7337 |
% 关键字列表前要空一行,使用悬挂缩进。|\parbox| 之后的间距 |
| 7338 |
% 需要调整,见 \url{https://tex.stackexchange.com/a/34982}。 |
| 7339 |
% \begin{macrocode} |
| 7340 |
\cs_new_protected:Npn \@@_keywords:nNn #1#2#3 |
| 7341 |
{ |
| 7342 |
\int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 } |
| 7343 |
{ |
| 7344 |
\par \mode_leave_vertical: \par \noindent |
| 7345 |
\@@_get_text_width:Nn \l_@@_tmpa_dim {#1} |
| 7346 |
\group_begin: \small\bfseries \MakeUppercase{#1} \group_end: |
| 7347 |
\parbox [t] { \dim_eval:n { \textwidth - \l_@@_tmpa_dim } } |
| 7348 |
{ |
| 7349 |
\small |
| 7350 |
\clist_use:Nn #2 {#3} \par |
| 7351 |
\cs_gset:Npx \@@_keywords_prevdepth: { \dim_use:N \tex_prevdepth:D } |
| 7352 |
} |
| 7353 |
}{ |
| 7354 |
\par \mode_leave_vertical: \par |
| 7355 |
\@@_get_text_width:Nn \l_@@_tmpa_dim {#1} |
| 7356 |
\group_begin: \small\bfseries \MakeUppercase{#1} \group_end: |
| 7357 |
\group_begin: |
| 7358 |
\small |
| 7359 |
\clist_use:Nn #2 {#3} \par |
| 7360 |
\cs_gset:Npx \@@_keywords_prevdepth: { \dim_use:N \tex_prevdepth:D } |
| 7361 |
\group_end: |
| 7362 |
} |
| 7363 |
} |
| 7364 |
% \end{macrocode} |
| 7365 |
% \end{macro} |
| 7366 |
% |
| 7367 |
% \changes{v2.00}{2026/04/30}{添加插图与附表清单环境(本科需要)。} |
| 7368 |
% |
| 7369 |
% \subsubsection{定义插图与附表清单环境} |
| 7370 |
% |
| 7371 |
% \begin{environment}{figtablist} |
| 7372 |
% 插图与附表清单,利用 \env{figtablist} 封装。 |
| 7373 |
% \begin{macrocode} |
| 7374 |
\NewDocumentEnvironment { figtablist } { } |
| 7375 |
{ |
| 7376 |
\group_begin: |
| 7377 |
\@@_chapter:V \c_@@_name_figtabtoc_tl |
| 7378 |
\RenewDocumentCommand \addvspace { m } { } |
| 7379 |
\RenewDocumentCommand \listoffigures { } { \@starttoc { lof } } |
| 7380 |
\RenewDocumentCommand \listoftables { } { \@starttoc { lot } } |
| 7381 |
} |
| 7382 |
{ |
| 7383 |
\group_end: |
| 7384 |
} |
| 7385 |
% \end{macrocode} |
| 7386 |
% \end{environment} |
| 7387 |
% |
| 7388 |
% \changes{v2.14}{2026/05/14}{用\pkg{tabularray}宏包重构\env{notation}和\env{terminology}环境。} |
| 7389 |
% |
| 7390 |
% 设置表头空样式 |
| 7391 |
% \begin{macrocode} |
| 7392 |
\NewTblrTheme{empty}{ |
| 7393 |
\SetTblrStyle{firstfoot,middlefoot,lastfoot}{font=\small} |
| 7394 |
\DefTblrTemplate{firsthead}{default}{} |
| 7395 |
\DefTblrTemplate{middlehead}{default}{} |
| 7396 |
\DefTblrTemplate{lasthead}{default}{} |
| 7397 |
\DefTblrTemplate{contfoot-text}{default}{(接下页)} |
| 7398 |
} |
| 7399 |
% \end{macrocode} |
| 7400 |
% |
| 7401 |
% \subsubsection{定义符号表环境} |
| 7402 |
% |
| 7403 |
% \begin{environment}{notation} |
| 7404 |
% 符号表环境,基于 \pkg{tabularray}宏包的\env{longtblr}环境实现。 |
| 7405 |
% \begin{macrocode} |
| 7406 |
\NewDocumentEnvironment { notation } { O{ } } |
| 7407 |
{ |
| 7408 |
\group_begin: |
| 7409 |
\@@_notation_begin: |
| 7410 |
\begin{longtblr}[ |
| 7411 |
theme = empty, |
| 7412 |
presep = 0pt, |
| 7413 |
]{ |
| 7414 |
width = 0.95\textwidth, |
| 7415 |
colspec = { X[2,c,m] X[2,c,m] X[5.5,l,m] }, |
| 7416 |
hline{1,Z} = { \heavyrulewidth, solid }, |
| 7417 |
hline{2} = { \lightrulewidth, solid }, |
| 7418 |
row{1} = { c, m, font = \small\bfseries }, |
| 7419 |
#1, |
| 7420 |
} |
| 7421 |
} |
| 7422 |
{ |
| 7423 |
\end{longtblr} |
| 7424 |
\group_end: |
| 7425 |
} |
| 7426 |
% \end{macrocode} |
| 7427 |
% \end{environment} |
| 7428 |
% |
| 7429 |
% \begin{macro}{\@@_notation_begin:} |
| 7430 |
% 目录中符号表条目处理。 |
| 7431 |
% \begin{macrocode} |
| 7432 |
\cs_new_protected:Npn \@@_notation_begin: |
| 7433 |
{ |
| 7434 |
\int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 } |
| 7435 |
{ |
| 7436 |
\@@_chapter_no_toc:V \c_@@_name_notation_tl |
| 7437 |
}{ |
| 7438 |
\@@_chapter:V \c_@@_name_notation_tl |
| 7439 |
} |
| 7440 |
} |
| 7441 |
% \end{macrocode} |
| 7442 |
% \end{macro} |
| 7443 |
% |
| 7444 |
% \changes{v2.00}{2026/04/30}{添加术语表环境(本科需要)。} |
| 7445 |
% |
| 7446 |
% \subsubsection{定义术语表环境} |
| 7447 |
% |
| 7448 |
% \begin{environment}{terminology} |
| 7449 |
% 术语表环境,基于 \pkg{tabularray}宏包的\env{longtblr}环境实现。 |
| 7450 |
% \begin{macrocode} |
| 7451 |
\NewDocumentEnvironment { terminology } { O{ } } |
| 7452 |
{ |
| 7453 |
\group_begin: |
| 7454 |
\@@_terminology_begin: |
| 7455 |
\begin{longtblr}[ |
| 7456 |
theme = empty, |
| 7457 |
presep = 0pt, |
| 7458 |
]{ |
| 7459 |
width = 0.95\textwidth, |
| 7460 |
colspec = { X[3,c,m] X[6.5,l,m] }, |
| 7461 |
hline{1,Z} = { \heavyrulewidth, solid }, |
| 7462 |
hline{2} = { \lightrulewidth, solid }, |
| 7463 |
row{1} = {c, m, font = \small\bfseries }, |
| 7464 |
#1, |
| 7465 |
} |
| 7466 |
} |
| 7467 |
{ |
| 7468 |
\end{longtblr} |
| 7469 |
\group_end: |
| 7470 |
} |
| 7471 |
% \end{macrocode} |
| 7472 |
% \end{environment} |
| 7473 |
% |
| 7474 |
% \begin{macro}{\@@_terminology_begin:} |
| 7475 |
% 目录中术语表条目处理。 |
| 7476 |
% \begin{macrocode} |
| 7477 |
\cs_new_protected:Npn \@@_terminology_begin: |
| 7478 |
{ |
| 7479 |
\int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 } |
| 7480 |
{ |
| 7481 |
\@@_chapter_no_toc:V \c_@@_name_terminology_tl |
| 7482 |
}{ |
| 7483 |
\@@_chapter:V \c_@@_name_terminology_tl |
| 7484 |
} |
| 7485 |
} |
| 7486 |
% \end{macrocode} |
| 7487 |
% \end{macro} |
| 7488 |
% |
| 7489 |
% \changes{v2.13}{2026/05/12}{按2026年研究生撰写规范修订研究生前料页码格式。} |
| 7490 |
% \changes{v2.00}{2026/04/30}{为2026版本科摘要、目次等添加页眉,页码连续编号。} |
| 7491 |
% \changes{v1.11}{2022/04/02}{修复摘要后的所有页面尺寸。} |
| 7492 |
% |
| 7493 |
% \subsubsection{辅助函数} |
| 7494 |
% 前料组件排版命令 |
| 7495 |
% \begin{macro}{\@@_front_component_abstract_zh:} |
| 7496 |
% 中文摘要。 |
| 7497 |
% \begin{macrocode} |
| 7498 |
\cs_new_protected:Npn \@@_front_component_abstract_zh: |
| 7499 |
{ |
| 7500 |
\tl_if_empty:NF \l_@@_abstract_file_tl |
| 7501 |
{ |
| 7502 |
\cleardoublepage |
| 7503 |
\begin{abstract} |
| 7504 |
\file_input:V \l_@@_abstract_file_tl |
| 7505 |
\end{abstract} |
| 7506 |
} |
| 7507 |
} |
| 7508 |
% \end{macrocode} |
| 7509 |
% \end{macro} |
| 7510 |
% |
| 7511 |
% \begin{macro}{\@@_front_component_abstract_en:} |
| 7512 |
% 英文摘要(研究生版本) |
| 7513 |
% \begin{macrocode} |
| 7514 |
\cs_new_protected:Npn \@@_front_component_abstract_en: |
| 7515 |
{ |
| 7516 |
\tl_if_empty:NF \l_@@_abstract_file_en_tl |
| 7517 |
{ |
| 7518 |
\cleardoublepage |
| 7519 |
\begin{abstract*} |
| 7520 |
\file_input:V \l_@@_abstract_file_en_tl |
| 7521 |
\end{abstract*} |
| 7522 |
} |
| 7523 |
} |
| 7524 |
% \end{macrocode} |
| 7525 |
% \end{macro} |
| 7526 |
% |
| 7527 |
% \begin{macro}{\@@_front_component_abstract_en_bachelor:} |
| 7528 |
% 英文摘要(本科版本,需要 \cleardoublepage) |
| 7529 |
% \begin{macrocode} |
| 7530 |
\cs_new_protected:Npn \@@_front_component_abstract_en_bachelor: |
| 7531 |
{ |
| 7532 |
\tl_if_empty:NF \l_@@_abstract_file_en_tl |
| 7533 |
{ |
| 7534 |
\cleardoublepage |
| 7535 |
\begin{abstract*} |
| 7536 |
\file_input:V \l_@@_abstract_file_en_tl |
| 7537 |
\end{abstract*} |
| 7538 |
} |
| 7539 |
} |
| 7540 |
% \end{macrocode} |
| 7541 |
% \end{macro} |
| 7542 |
% |
| 7543 |
% \begin{macro}{\@@_front_component_toc_graduate:} |
| 7544 |
% 目录(研究生版本) |
| 7545 |
% \begin{macrocode} |
| 7546 |
\cs_new_protected:Npn \@@_front_component_toc_graduate: |
| 7547 |
{ |
| 7548 |
\cleardoublepage |
| 7549 |
\tableofcontents |
| 7550 |
} |
| 7551 |
% \end{macrocode} |
| 7552 |
% \end{macro} |
| 7553 |
% |
| 7554 |
% \begin{macro}{\@@_front_component_toc_bachelor:} |
| 7555 |
% 目录(本科版本) |
| 7556 |
% \begin{macrocode} |
| 7557 |
\cs_new_protected:Npn \@@_front_component_toc_bachelor: |
| 7558 |
{ |
| 7559 |
\cleardoublepage |
| 7560 |
\tableofcontents |
| 7561 |
} |
| 7562 |
% \end{macrocode} |
| 7563 |
% \end{macro} |
| 7564 |
% |
| 7565 |
% \begin{macro}{\@@_front_component_notation:} |
| 7566 |
% 符号表(本科版本) |
| 7567 |
% \begin{macrocode} |
| 7568 |
\cs_new_protected:Npn \@@_front_component_notation: |
| 7569 |
{ |
| 7570 |
\tl_if_empty:NF \l_@@_notation_file_tl |
| 7571 |
{ |
| 7572 |
\cleardoublepage |
| 7573 |
\file_input:V \l_@@_notation_file_tl |
| 7574 |
} |
| 7575 |
} |
| 7576 |
% \end{macrocode} |
| 7577 |
% \end{macro} |
| 7578 |
% |
| 7579 |
% \begin{macro}{\@@_front_component_notation_graduate:} |
| 7580 |
% 符号表(研究生版本,需要设置页码) |
| 7581 |
% \begin{macrocode} |
| 7582 |
\cs_new_protected:Npn \@@_front_component_notation_graduate: |
| 7583 |
{ |
| 7584 |
\tl_if_empty:NF \l_@@_notation_file_tl |
| 7585 |
{ |
| 7586 |
\cleardoublepage |
| 7587 |
\file_input:V \l_@@_notation_file_tl |
| 7588 |
} |
| 7589 |
} |
| 7590 |
% \end{macrocode} |
| 7591 |
% \end{macro} |
| 7592 |
% |
| 7593 |
% \begin{macro}{\@@_front_component_terminology:} |
| 7594 |
% 术语表(本科专用) |
| 7595 |
% \begin{macrocode} |
| 7596 |
\cs_new_protected:Npn \@@_front_component_terminology: |
| 7597 |
{ |
| 7598 |
\tl_if_empty:NF \l_@@_terminology_file_tl |
| 7599 |
{ |
| 7600 |
\cleardoublepage |
| 7601 |
\file_input:V \l_@@_terminology_file_tl |
| 7602 |
} |
| 7603 |
} |
| 7604 |
% \end{macrocode} |
| 7605 |
% \end{macro} |
| 7606 |
% |
| 7607 |
% \begin{macro}{\@@_front_component_figtabtoc:} |
| 7608 |
% 插图与附表清单(本科专用) |
| 7609 |
% \begin{macrocode} |
| 7610 |
\cs_new_protected:Npn \@@_front_component_figtabtoc: |
| 7611 |
{ |
| 7612 |
\bool_if:NT \g_@@_figtabtoc_bool |
| 7613 |
{ |
| 7614 |
\cleardoublepage |
| 7615 |
\begin{figtablist} |
| 7616 |
\listoffigures |
| 7617 |
\listoftables |
| 7618 |
\end{figtablist} |
| 7619 |
} |
| 7620 |
} |
| 7621 |
% \end{macrocode} |
| 7622 |
% \end{macro} |
| 7623 |
% |
| 7624 |
% \begin{macro}{\@@_execute_frontmatter:n} |
| 7625 |
% 通用流程执行函数 |
| 7626 |
% \begin{macrocode} |
| 7627 |
\cs_new_protected:Npn \@@_execute_frontmatter:n #1 |
| 7628 |
{ |
| 7629 |
\clist_map_inline:Nn #1 |
| 7630 |
{ |
| 7631 |
\use:n { ##1 } |
| 7632 |
} |
| 7633 |
} |
| 7634 |
% \end{macrocode} |
| 7635 |
% \end{macro} |
| 7636 |
% |
| 7637 |
% \begin{macro}{\@@_makefront_graduate:, |
| 7638 |
% \@@_makefront_bachelor:} |
| 7639 |
% 研究生流程 |
| 7640 |
% \begin{macrocode} |
| 7641 |
\cs_new_protected:Npn \@@_makefront_graduate: |
| 7642 |
{ |
| 7643 |
\frontmatter |
| 7644 |
\@@_execute_frontmatter:n \c_@@_frontmatter_graduate_clist |
| 7645 |
} |
| 7646 |
% \end{macrocode} |
| 7647 |
% 本科流程 |
| 7648 |
% \begin{macrocode} |
| 7649 |
\cs_new_protected:Npn \@@_makefront_bachelor: |
| 7650 |
{ |
| 7651 |
\frontmatter |
| 7652 |
\@@_execute_frontmatter:n \c_@@_frontmatter_bachelor_clist |
| 7653 |
} |
| 7654 |
% \end{macrocode} |
| 7655 |
% \end{macro} |
| 7656 |
% |
| 7657 |
% \subsubsection{前料流程配置列表} |
| 7658 |
% |
| 7659 |
% \begin{variable}{\c_@@_frontmatter_graduate_clist, |
| 7660 |
% \c_@@_frontmatter_bachelor_clist} |
| 7661 |
% 研究生前料流程。 |
| 7662 |
% \begin{macrocode} |
| 7663 |
\clist_const:Nn \c_@@_frontmatter_graduate_clist |
| 7664 |
{ |
| 7665 |
{ \@@_front_component_abstract_zh: }, |
| 7666 |
{ \@@_front_component_abstract_en: }, |
| 7667 |
{ \@@_front_component_toc_graduate: }, |
| 7668 |
{ \@@_front_component_notation_graduate: } |
| 7669 |
} |
| 7670 |
% \end{macrocode} |
| 7671 |
% 本科生前料流程。 |
| 7672 |
% \begin{macrocode} |
| 7673 |
\clist_const:Nn \c_@@_frontmatter_bachelor_clist |
| 7674 |
{ |
| 7675 |
{ \@@_front_component_abstract_zh: }, |
| 7676 |
{ \@@_front_component_abstract_en_bachelor: }, |
| 7677 |
{ \@@_front_component_toc_bachelor: }, |
| 7678 |
{ \@@_front_component_figtabtoc: }, |
| 7679 |
{ \@@_front_component_notation: }, |
| 7680 |
{ \@@_front_component_terminology: } |
| 7681 |
} |
| 7682 |
% \end{macrocode} |
| 7683 |
% \end{variable} |
| 7684 |
% |
| 7685 |
% \subsubsection{排版前料} |
| 7686 |
% |
| 7687 |
% \begin{macro}{\makefront} |
| 7688 |
% 排版摘要、目录等前料。 |
| 7689 |
% \begin{macrocode} |
| 7690 |
\NewDocumentCommand \makefront { } |
| 7691 |
{ |
| 7692 |
% \end{macrocode} |
| 7693 |
% 恢复页面尺寸 |
| 7694 |
% \begin{macrocode} |
| 7695 |
\restoregeometry |
| 7696 |
% \end{macrocode} |
| 7697 |
% 排版前料内容 |
| 7698 |
% \begin{macrocode} |
| 7699 |
\int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 } |
| 7700 |
% \end{macrocode} |
| 7701 |
% 研究生 |
| 7702 |
% \begin{macrocode} |
| 7703 |
{ \@@_makefront_graduate: } |
| 7704 |
% \end{macrocode} |
| 7705 |
% 本科生 |
| 7706 |
% \begin{macrocode} |
| 7707 |
{ \@@_makefront_bachelor: } |
| 7708 |
} |
| 7709 |
% \end{macrocode} |
| 7710 |
% \end{macro} |
| 7711 |
% |
| 7712 |
% 在 \env{document} 开始位置添加封面以及摘要、目录、符号表、术语表等前料内容。 |
| 7713 |
% |
| 7714 |
% \begin{macrocode} |
| 7715 |
\ctex_after_end_preamble:n |
| 7716 |
{ |
| 7717 |
\bool_if:NT \g_@@_auto_make_cover_bool |
| 7718 |
{ |
| 7719 |
\makecovers |
| 7720 |
\makefront |
| 7721 |
} |
| 7722 |
} |
| 7723 |
% \end{macrocode} |
| 7724 |
% |
| 7725 |
% \subsection{目录} |
| 7726 |
% |
| 7727 |
% 设置目录标题。 |
| 7728 |
% \begin{macrocode} |
| 7729 |
\keys_set:nn { ctex } |
| 7730 |
{ |
| 7731 |
contentsname = \c_@@_name_toc_tl, |
| 7732 |
listfigurename = \c_@@_name_lof_tl, |
| 7733 |
listtablename = \c_@@_name_lot_tl, |
| 7734 |
} |
| 7735 |
% \end{macrocode} |
| 7736 |
% |
| 7737 |
% \begin{variable}{\c_@@_toc_levels_clist} |
| 7738 |
% 目录级别配置数据 |
| 7739 |
% \begin{description} |
| 7740 |
% \item[格式] 格式:|{|级别名称|}{|是否为图表(0/1)|}| |
| 7741 |
% \end{description} |
| 7742 |
% \begin{macrocode} |
| 7743 |
\clist_const:Nn \c_@@_toc_levels_clist |
| 7744 |
{ |
| 7745 |
{ chapter } { 0 }, |
| 7746 |
{ section } { 0 }, |
| 7747 |
{ subsection } { 0 }, |
| 7748 |
{ figure } { 1 }, |
| 7749 |
{ table } { 1 } |
| 7750 |
} |
| 7751 |
% \end{macrocode} |
| 7752 |
% \end{variable} |
| 7753 |
% |
| 7754 |
% \begin{variable}{\@@_toc_chapter_format_tl, |
| 7755 |
% \@@_toc_chapter_indent_tl, |
| 7756 |
% \@@_toc_chapter_rule_tl, |
| 7757 |
% \@@_toc_chapter_numsep_tl, |
| 7758 |
% \@@_toc_section_format_tl, |
| 7759 |
% \@@_toc_section_indent_tl, |
| 7760 |
% \@@_toc_section_rule_tl, |
| 7761 |
% \@@_toc_section_numsep_tl, |
| 7762 |
% \@@_toc_subsection_format_tl, |
| 7763 |
% \@@_toc_subsection_indent_tl, |
| 7764 |
% \@@_toc_subsection_rule_tl, |
| 7765 |
% \@@_toc_subsection_numsep_tl, |
| 7766 |
% \@@_toc_figure_format_tl, |
| 7767 |
% \@@_toc_figure_indent_tl, |
| 7768 |
% \@@_toc_figure_rule_tl, |
| 7769 |
% \@@_toc_figure_numsep_tl, |
| 7770 |
% \@@_toc_table_format_tl, |
| 7771 |
% \@@_toc_table_indent_tl, |
| 7772 |
% \@@_toc_table_rule_tl, |
| 7773 |
% \@@_toc_table_numsep_tl, |
| 7774 |
% \@@_toc_chapter_offset_dim, |
| 7775 |
% \@@_toc_section_offset_dim, |
| 7776 |
% \@@_toc_subsection_offset_dim, |
| 7777 |
% \@@_toc_figure_offset_dim, |
| 7778 |
% \@@_toc_table_offset_dim, |
| 7779 |
% \@@_toc_line_align_bool, |
| 7780 |
% \@@_titletoc_hang_fix_bool} |
| 7781 |
% 目录设置中需要的变量。 |
| 7782 |
% \begin{macrocode} |
| 7783 |
\clist_map_inline:nn { chapter, section, subsection, figure, table } |
| 7784 |
{ |
| 7785 |
% \end{macrocode} |
| 7786 |
% tl变量 |
| 7787 |
% \begin{macrocode} |
| 7788 |
\clist_map_inline:nn { format, indent, rule, numsep } |
| 7789 |
{ \tl_new:c { @@_toc_ #1 _ ##1 _tl } } |
| 7790 |
|
| 7791 |
% \end{macrocode} |
| 7792 |
% dim变量 |
| 7793 |
% \begin{macrocode} |
| 7794 |
\dim_new:c { @@_toc_ #1 _offset_dim } |
| 7795 |
} |
| 7796 |
% \end{macrocode} |
| 7797 |
% bool变量 |
| 7798 |
% \begin{macrocode} |
| 7799 |
\bool_new:N \@@_toc_line_align_bool |
| 7800 |
\bool_new:N \@@_titletoc_hang_fix_bool |
| 7801 |
% \end{macrocode} |
| 7802 |
% \end{variable} |
| 7803 |
|
| 7804 |
% \begin{macro}{\@@_setup_toc_format_graduate:,} |
| 7805 |
% 目录格式设置(设置目录变量取值) |
| 7806 |
% |
| 7807 |
% 研究生目录格式设置 |
| 7808 |
% \begin{macrocode} |
| 7809 |
\cs_new_protected:Npn \@@_setup_toc_format_graduate: |
| 7810 |
{ |
| 7811 |
% \end{macrocode} |
| 7812 |
% chapter(章) |
| 7813 |
% \begin{macrocode} |
| 7814 |
\tl_set:Nn \@@_toc_chapter_format_tl { \addvspace{1pt} \nwafu@hei } |
| 7815 |
\tl_set:Nn \@@_toc_chapter_indent_tl { 0pc } |
| 7816 |
\tl_set:Nn \@@_toc_chapter_rule_tl { \tocrule{$\cdot$} } |
| 7817 |
\tl_set:Nn \@@_toc_chapter_numsep_tl { 0.5\ccwd } |
| 7818 |
\dim_set:Nn \@@_toc_chapter_offset_dim { 0pc } |
| 7819 |
% \end{macrocode} |
| 7820 |
% section(节) |
| 7821 |
% \begin{macrocode} |
| 7822 |
\tl_set:Nn \@@_toc_section_format_tl { \addvspace{0pt} } |
| 7823 |
\tl_set:Nn \@@_toc_section_indent_tl { \ccwd } |
| 7824 |
\tl_set:Nn \@@_toc_section_rule_tl { \tocrule{$\cdot$} } |
| 7825 |
\tl_set:Nn \@@_toc_section_numsep_tl { 0.5\ccwd } |
| 7826 |
\dim_set:Nn \@@_toc_section_offset_dim { 0pc } |
| 7827 |
% \end{macrocode} |
| 7828 |
% subsection(小节) |
| 7829 |
% \begin{macrocode} |
| 7830 |
\tl_set:Nn \@@_toc_subsection_format_tl { \addvspace{0pt} } |
| 7831 |
\tl_set:Nn \@@_toc_subsection_indent_tl { 2.0\ccwd } |
| 7832 |
\tl_set:Nn \@@_toc_subsection_rule_tl { \tocrule{$\cdot$} } |
| 7833 |
\tl_set:Nn \@@_toc_subsection_numsep_tl { 0.5\ccwd } |
| 7834 |
\dim_set:Nn \@@_toc_subsection_offset_dim { 0pc } |
| 7835 |
% \end{macrocode} |
| 7836 |
% figure(图) |
| 7837 |
% \begin{macrocode} |
| 7838 |
\tl_set:Nn \@@_toc_figure_format_tl { \addvspace{0pt} } |
| 7839 |
\tl_set:Nn \@@_toc_figure_indent_tl { 0pc } |
| 7840 |
\tl_set:Nn \@@_toc_figure_rule_tl { \tocrule{$\cdot$} } |
| 7841 |
\tl_set:Nn \@@_toc_figure_numsep_tl { 0.5\ccwd } |
| 7842 |
\dim_set:Nn \@@_toc_figure_offset_dim { 0pc } |
| 7843 |
% \end{macrocode} |
| 7844 |
% table(表) |
| 7845 |
% \begin{macrocode} |
| 7846 |
\tl_set:Nn \@@_toc_table_format_tl { \addvspace{0pt} } |
| 7847 |
\tl_set:Nn \@@_toc_table_indent_tl { 0pc } |
| 7848 |
\tl_set:Nn \@@_toc_table_rule_tl { \tocrule{$\cdot$} } |
| 7849 |
\tl_set:Nn \@@_toc_table_numsep_tl { 0.5\ccwd } |
| 7850 |
\dim_set:Nn \@@_toc_table_offset_dim { 0pc } |
| 7851 |
% \end{macrocode} |
| 7852 |
% align和hang(对齐和悬挂状态) |
| 7853 |
% \begin{macrocode} |
| 7854 |
\bool_set_false:N \@@_toc_line_align_bool |
| 7855 |
\bool_set_false:N \@@_titletoc_hang_fix_bool |
| 7856 |
} |
| 7857 |
% \end{macrocode} |
| 7858 |
% 本科生目录格式设置 |
| 7859 |
% \begin{macrocode} |
| 7860 |
\cs_new_protected:Npn \@@_setup_toc_format_bachelor: |
| 7861 |
{ |
| 7862 |
% \end{macrocode} |
| 7863 |
% chapter(章) |
| 7864 |
% \begin{macrocode} |
| 7865 |
\tl_set:Nn \@@_toc_chapter_format_tl { \addvspace{1pt} \nwafu@hei } |
| 7866 |
\tl_set:Nn \@@_toc_chapter_indent_tl { 0pc } |
| 7867 |
\tl_set:Nn \@@_toc_chapter_rule_tl { \tocrule{$\cdot$} } |
| 7868 |
\tl_set:Nn \@@_toc_chapter_numsep_tl { 0.5\ccwd } |
| 7869 |
\dim_set:Nn \@@_toc_chapter_offset_dim { 1pt } |
| 7870 |
% \end{macrocode} |
| 7871 |
% section(节) |
| 7872 |
% \begin{macrocode} |
| 7873 |
\tl_set:Nn \@@_toc_section_format_tl { \addvspace{1pt} \small } |
| 7874 |
\tl_set:Nn \@@_toc_section_indent_tl { \ccwd } |
| 7875 |
\tl_set:Nn \@@_toc_section_rule_tl { \tocrule{$\cdot$} } |
| 7876 |
\tl_set:Nn \@@_toc_section_numsep_tl { 0.5\ccwd } |
| 7877 |
\dim_set:Nn \@@_toc_section_offset_dim { 1pt } |
| 7878 |
% \end{macrocode} |
| 7879 |
% subsection(小节) |
| 7880 |
% \begin{macrocode} |
| 7881 |
\tl_set:Nn \@@_toc_subsection_format_tl { \addvspace{1pt} \small } |
| 7882 |
\tl_set:Nn \@@_toc_subsection_indent_tl { 2.0\ccwd } |
| 7883 |
\tl_set:Nn \@@_toc_subsection_rule_tl { \tocrule{$\cdot$} } |
| 7884 |
\tl_set:Nn \@@_toc_subsection_numsep_tl { 0.5\ccwd } |
| 7885 |
\dim_set:Nn \@@_toc_subsection_offset_dim { 1pt } |
| 7886 |
% \end{macrocode} |
| 7887 |
% figure(图) |
| 7888 |
% \begin{macrocode} |
| 7889 |
\tl_set:Nn \@@_toc_figure_format_tl { \addvspace{0pt} } |
| 7890 |
\tl_set:Nn \@@_toc_figure_indent_tl { 0pc } |
| 7891 |
\tl_set:Nn \@@_toc_figure_rule_tl { \tocrule{$\cdot$} } |
| 7892 |
\tl_set:Nn \@@_toc_figure_numsep_tl { 0.5\ccwd } |
| 7893 |
\dim_set:Nn \@@_toc_figure_offset_dim { 1pt } |
| 7894 |
% \end{macrocode} |
| 7895 |
% table(表) |
| 7896 |
% \begin{macrocode} |
| 7897 |
\tl_set:Nn \@@_toc_table_format_tl { \addvspace{0pt} } |
| 7898 |
\tl_set:Nn \@@_toc_table_indent_tl { 0pc } |
| 7899 |
\tl_set:Nn \@@_toc_table_rule_tl { \tocrule{$\cdot$} } |
| 7900 |
\tl_set:Nn \@@_toc_table_numsep_tl { 0.5\ccwd } |
| 7901 |
\dim_set:Nn \@@_toc_table_offset_dim { 1pt } |
| 7902 |
% \end{macrocode} |
| 7903 |
% align和hang(对齐和悬挂状态) |
| 7904 |
% \begin{macrocode} |
| 7905 |
\bool_set_false:N \@@_toc_line_align_bool |
| 7906 |
\bool_set_false:N \@@_titletoc_hang_fix_bool |
| 7907 |
} |
| 7908 |
% \end{macrocode} |
| 7909 |
% \end{macro} |
| 7910 |
% |
| 7911 |
% \begin{macro}{\@@_setup_toc_level:nn} |
| 7912 |
% 通用目录级别设置 |
| 7913 |
% \begin{macrocode} |
| 7914 |
\cs_new_protected:Npn \@@_setup_toc_level:nn #1#2 |
| 7915 |
{ |
| 7916 |
\titlecontents{#1} |
| 7917 |
% \end{macrocode} |
| 7918 |
% 左侧缩进距离。 |
| 7919 |
% \begin{macrocode} |
| 7920 |
[ \use:c { @@_toc_ #1 _indent_tl } ] |
| 7921 |
% \end{macrocode} |
| 7922 |
% 标题格式,可以设置字体、加入垂直间距等, |
| 7923 |
% 垂直间距最好使用无间距重合的\textbackslash addvspace命令。 |
| 7924 |
% \begin{macrocode} |
| 7925 |
{ \use:c { @@_toc_ #1 _format_tl } } |
| 7926 |
% \end{macrocode} |
| 7927 |
% 标题标志格式,如序号格式、序号宽度、序号与标题内容之间的间距等。 |
| 7928 |
% 该参数若为空,则无标题标志。 |
| 7929 |
% \begin{macrocode} |
| 7930 |
{ |
| 7931 |
\int_compare:nNnTF {#2} = { 1 } |
| 7932 |
{ |
| 7933 |
\str_if_eq:nnT {#1} { figure } |
| 7934 |
{ \hspace*{0.5em}图~\thecontentslabel\quad } |
| 7935 |
\str_if_eq:nnT {#1} { table } |
| 7936 |
{ \hspace*{0.5em}表~\thecontentslabel\quad } |
| 7937 |
}{ |
| 7938 |
\bool_if:NT \@@_titletoc_hang_fix_bool |
| 7939 |
{ |
| 7940 |
\contentspush |
| 7941 |
{ |
| 7942 |
\thecontentslabel |
| 7943 |
% \end{macrocode} |
| 7944 |
% 有编号的标题在目录中编号与标题的间距。 |
| 7945 |
% \begin{macrocode} |
| 7946 |
\hspace{ \use:c { @@_toc_ #1 _numsep_tl } } |
| 7947 |
} |
| 7948 |
} |
| 7949 |
} |
| 7950 |
} |
| 7951 |
% \end{macrocode} |
| 7952 |
% 无序号标题格式。 |
| 7953 |
% \begin{macrocode} |
| 7954 |
{ } |
| 7955 |
% \end{macrocode} |
| 7956 |
% 标题与页码之间的导引线。 |
| 7957 |
% \begin{macrocode} |
| 7958 |
{ \use:c { @@_toc_ #1 _rule_tl } } |
| 7959 |
% \end{macrocode} |
| 7960 |
% 下间距,可选参数, 用于设置标题排版后还需要执行的命令, |
| 7961 |
% 例如与下个标题的垂直间距等。 |
| 7962 |
% \begin{macrocode} |
| 7963 |
[ \addvspace { \use:c { @@_toc_ #1 _offset_dim } } ] |
| 7964 |
} |
| 7965 |
% \end{macrocode} |
| 7966 |
% \end{macro} |
| 7967 |
% |
| 7968 |
% \begin{macro}{\@@_setup_all_toc_levels:} |
| 7969 |
% 循环设置各级别目录格式。 |
| 7970 |
% 代码借鉴于easybook(\url{https://gitee.com/texl3/easybook})。 |
| 7971 |
% \begin{macrocode} |
| 7972 |
\cs_new_protected:Npn \@@_setup_all_toc_levels: |
| 7973 |
{ |
| 7974 |
\clist_map_inline:Nn \c_@@_toc_levels_clist |
| 7975 |
{ |
| 7976 |
\@@_setup_toc_level:nn ##1 |
| 7977 |
} |
| 7978 |
} |
| 7979 |
% \end{macrocode} |
| 7980 |
% \end{macro} |
| 7981 |
% |
| 7982 |
% \begin{macro}{\@@_setup_toc_format:} |
| 7983 |
% 目录设置入口 |
| 7984 |
% \begin{macrocode} |
| 7985 |
\cs_new_protected:Npn \@@_setup_toc_format: |
| 7986 |
{ |
| 7987 |
% \end{macrocode} |
| 7988 |
% 选择研究生或本科生 |
| 7989 |
% \begin{macrocode} |
| 7990 |
\int_compare:nNnTF { \g_@@_thesis_type_int } < { 3 } |
| 7991 |
{ \@@_setup_toc_format_graduate: } |
| 7992 |
{ \@@_setup_toc_format_bachelor: } |
| 7993 |
% \end{macrocode} |
| 7994 |
% 设置所有目录条目的格式 |
| 7995 |
% \begin{macrocode} |
| 7996 |
\@@_setup_all_toc_levels: |
| 7997 |
} |
| 7998 |
% \end{macrocode} |
| 7999 |
% 设置目录格式 |
| 8000 |
% \begin{macrocode} |
| 8001 |
\@@_setup_toc_format: |
| 8002 |
% \end{macrocode} |
| 8003 |
% \end{macro} |
| 8004 |
% |
| 8005 |
% 自定义导引线命令。 |
| 8006 |
% 代码借鉴于easybook(\url{https://gitee.com/texl3/easybook})。 |
| 8007 |
% \begin{macrocode} |
| 8008 |
\cs_new:Npn \NWAFUNumberLine #1 |
| 8009 |
{ |
| 8010 |
\CTEXifname |
| 8011 |
{ |
| 8012 |
\use:c { CTEXthe#1 } |
| 8013 |
\hspace{\use:c { @@_toc_#1_numsep_tl }} |
| 8014 |
}{} |
| 8015 |
} |
| 8016 |
|
| 8017 |
% \end{macrocode} |
| 8018 |
% 导引线。 |
| 8019 |
% \begin{macrocode} |
| 8020 |
\bool_if:NTF \@@_titletoc_hang_fix_bool |
| 8021 |
{ |
| 8022 |
% \end{macrocode} |
| 8023 |
% CTeX格式导引线。 |
| 8024 |
% \begin{macrocode} |
| 8025 |
\keys_set:nn { ctex } |
| 8026 |
{ |
| 8027 |
chapter/tocline = \CTEXnumberline{#1}#2, |
| 8028 |
section/tocline = \CTEXnumberline{#1}#2, |
| 8029 |
subsection/tocline = \CTEXnumberline{#1}#2 |
| 8030 |
} |
| 8031 |
}{ |
| 8032 |
% \end{macrocode} |
| 8033 |
% 自定义导引线。 |
| 8034 |
% \begin{macrocode} |
| 8035 |
\keys_set:nn { ctex } |
| 8036 |
{ |
| 8037 |
chapter/tocline = \NWAFUNumberLine{#1}#2, |
| 8038 |
section/tocline = \NWAFUNumberLine{#1}#2, |
| 8039 |
subsection/tocline = \NWAFUNumberLine{#1}#2, |
| 8040 |
} |
| 8041 |
} |
| 8042 |
% |
| 8043 |
% \end{macrocode} |
| 8044 |
% 定义tocrule目录导引线命令。 |
| 8045 |
% *星号命令能够使右侧与页码连接与不是对齐。 |
| 8046 |
% 代码借鉴于easybook(\url{https://gitee.com/texl3/easybook})。 |
| 8047 |
% \begin{macrocode} |
| 8048 |
% |
| 8049 |
\NewDocumentCommand{\tocrule}{sO{0.3pc}D(){1.2}mO{}} |
| 8050 |
{ |
| 8051 |
\small\normalfont |
| 8052 |
\titlerule*[#2]{\scalebox{#3}{#4}}#5 |
| 8053 |
\IfBooleanTF{#1} |
| 8054 |
{\thecontentspage} |
| 8055 |
{ |
| 8056 |
\bool_if:NTF \@@_toc_line_align_bool |
| 8057 |
{\contentspage}{\thecontentspage} |
| 8058 |
} |
| 8059 |
} |
| 8060 |
% \end{macrocode} |
| 8061 |
% |
| 8062 |
% \subsection{致谢} |
| 8063 |
% |
| 8064 |
% \begin{environment}{acknowledgement} |
| 8065 |
% 致谢环境,只是简单地设置章节不编号标题。 |
| 8066 |
% \begin{macrocode} |
| 8067 |
\NewDocumentEnvironment { acknowledgement } { } |
| 8068 |
{ |
| 8069 |
\group_begin: |
| 8070 |
\@@_chapter:V \c_@@_name_ack_tl |
| 8071 |
} |
| 8072 |
{ |
| 8073 |
\group_end: |
| 8074 |
} |
| 8075 |
% \end{macrocode} |
| 8076 |
% \end{environment} |
| 8077 |
% |
| 8078 |
% \subsection{个人简历} |
| 8079 |
% |
| 8080 |
% \begin{environment}{resume} |
| 8081 |
% 个人简历环境,只是简单地设置章节不编号标题。 |
| 8082 |
% \begin{macrocode} |
| 8083 |
\NewDocumentEnvironment { resume } { } |
| 8084 |
{ |
| 8085 |
\group_begin: |
| 8086 |
\@@_chapter:V \c_@@_name_resume_tl |
| 8087 |
} |
| 8088 |
{ |
| 8089 |
\group_end: |
| 8090 |
} |
| 8091 |
% \end{macrocode} |
| 8092 |
% \end{environment} |
| 8093 |
% |
| 8094 |
% \begin{macro}{\resumeitem,\researchitem} |
| 8095 |
% 学习经历。 |
| 8096 |
% \begin{macrocode} |
| 8097 |
\NewDocumentCommand{ \resumitem }{ O{ 学习经历 } } |
| 8098 |
{% |
| 8099 |
\vspace{24bp}{\zihao{-4}\nwafu@hei\bfseries\centerline{#1}}\par\vspace{6bp} |
| 8100 |
} |
| 8101 |
% \end{macrocode} |
| 8102 |
% 学术成果。 |
| 8103 |
% \begin{macrocode} |
| 8104 |
\NewDocumentCommand{ \researchitem }{ O{ 发表的学术论文 } } |
| 8105 |
{% |
| 8106 |
\vspace{32bp}{\zihao{-4}\nwafu@hei\bfseries\centerline{#1}}\par\vspace{14bp} |
| 8107 |
} |
| 8108 |
% \end{macrocode} |
| 8109 |
% \end{macro} |
| 8110 |
% |
| 8111 |
% \begin{environment}{publications} |
| 8112 |
% \begin{environment}{achievements} |
| 8113 |
% 个人简历中发论文和研究成果列表环境。 |
| 8114 |
% \begin{macrocode} |
| 8115 |
\newlist{publications}{enumerate}{1} |
| 8116 |
\setlist[publications]{label=[\arabic*],align=left,nosep,itemsep=3bp, |
| 8117 |
leftmargin=10mm,before=\zihao{5},resume} |
| 8118 |
\newlist{achievements}{enumerate}{1} |
| 8119 |
\setlist[achievements]{label=[\arabic*],align=left,nosep,itemsep=3bp, |
| 8120 |
leftmargin=10mm,before=\zihao{5}} |
| 8121 |
\def\publicationskip{\bigskip\bigskip} |
| 8122 |
% \end{macrocode} |
| 8123 |
% \end{environment} |
| 8124 |
% \end{environment} |
| 8125 |
% |
| 8126 |
% \changes{v1.10}{2022/03/17}{直接使用胡振震制定的gb7714-NWAFU实现参考文献样式控制。} |
| 8127 |
% \changes{v1.14}{2022/05/26}{调整作者姓在前名在后,缩写不加点。} |
| 8128 |
% \changes{v1.15}{2022/05/28}{调整姓在前名在后缩写标点符号。} |
| 8129 |
% |
| 8130 |
% \subsection{参考文献著录与引用} |
| 8131 |
% |
| 8132 |
% \begin{variable}{\l_@@_bib_resource_clist} |
| 8133 |
% 保存参考文献数据库列表。 |
| 8134 |
% \begin{macrocode} |
| 8135 |
\clist_new:N \l_@@_bib_resource_clist |
| 8136 |
% \end{macrocode} |
| 8137 |
% \end{variable} |
| 8138 |
% |
| 8139 |
% \begin{macrocode} |
| 8140 |
\keys_define:nn { nwafu / style } |
| 8141 |
{ |
| 8142 |
% \end{macrocode} |
| 8143 |
% \begin{macro}{style/bib-resource} |
| 8144 |
% 参考文献数据源。 |
| 8145 |
% \begin{macrocode} |
| 8146 |
bib-resource .clist_set:N = \l_@@_bib_resource_clist |
| 8147 |
} |
| 8148 |
% \end{macrocode} |
| 8149 |
% \end{macro} |
| 8150 |
% |
| 8151 |
% 为了保证导言区中的设置能起作用,\pkg{biblatex} 宏包均需要在 |
| 8152 |
% 导言区末尾载入(仍在 \pkg{hyperref} 之前),并做相关设置。 |
| 8153 |
% \begin{macrocode} |
| 8154 |
\@@_at_end_preamble:n |
| 8155 |
{ |
| 8156 |
\@@_biblatex_pre_setup: |
| 8157 |
\RequirePackage { biblatex } |
| 8158 |
\@@_biblatex_post_setup: |
| 8159 |
} |
| 8160 |
% \end{macrocode} |
| 8161 |
% |
| 8162 |
% \begin{macro}{ |
| 8163 |
% \@@_biblatex_pre_setup:, |
| 8164 |
% \@@_biblatex_post_setup:, |
| 8165 |
% \@@_pass_options_to_biblatex:n} |
| 8166 |
% \pkg{biblatex} 相关设置。 |
| 8167 |
% \begin{macrocode} |
| 8168 |
\cs_new_protected:Npn \@@_biblatex_pre_setup: |
| 8169 |
{ |
| 8170 |
% \end{macrocode} |
| 8171 |
% 参考文献引用与著录样式。 |
| 8172 |
% \begin{macrocode} |
| 8173 |
\@@_pass_options_to_biblatex:n { style = gb7714-NWAFU } |
| 8174 |
% \end{macrocode} |
| 8175 |
% 其它参数。 |
| 8176 |
% \begin{macrocode} |
| 8177 |
\@@_pass_options_to_biblatex:n |
| 8178 |
{ |
| 8179 |
gbtype = true, % 文献类型标识 [J]/[M]/[D] 等 |
| 8180 |
gbfieldtype = true, % 文献类型字段标识 |
| 8181 |
} |
| 8182 |
} |
| 8183 |
\cs_new_protected:Npn \@@_biblatex_post_setup: |
| 8184 |
{ |
| 8185 |
% \end{macrocode} |
| 8186 |
% 载入参考文献数据源文件。 |
| 8187 |
% \begin{macrocode} |
| 8188 |
\clist_map_function:NN \l_@@_bib_resource_clist \addbibresource |
| 8189 |
% \end{macrocode} |
| 8190 |
% 修改参考文献标题。 |
| 8191 |
% \begin{macrocode} |
| 8192 |
\defbibheading { bibliography } [ \bibname ] { \@@_chapter:n {##1} } |
| 8193 |
% \end{macrocode} |
| 8194 |
% 将非著者作为引用主语的引用作者与年份之间的分隔符从空格改为逗号+空格 |
| 8195 |
% 同时覆盖 bbx 中的设置 |
| 8196 |
% \begin{macrocode} |
| 8197 |
\DeclareDelimFormat[cite,parencite,citep]{nameyeardelim}{\addcomma\space} |
| 8198 |
\renewcommand*{\nameyeardelim}{\addcomma\space} |
| 8199 |
% \end{macrocode} |
| 8200 |
% 修改参考文献著录列表中作者与年份的分隔符(作者与年份之间用逗号) |
| 8201 |
% \begin{macrocode} |
| 8202 |
\DeclareDelimFormat[bib,biblist]{nameyeardelim}{\addcomma\space} |
| 8203 |
% \end{macrocode} |
| 8204 |
% 修改英文文献著录列表刊名为正常字形 |
| 8205 |
% \begin{macrocode} |
| 8206 |
\DeclareFieldFormat[article]{journaltitle}{##1\isdot} |
| 8207 |
} |
| 8208 |
\cs_new_protected:Npn \@@_pass_options_to_biblatex:n #1 |
| 8209 |
{ \PassOptionsToPackage {#1} { biblatex } } |
| 8210 |
% \end{macrocode} |
| 8211 |
% \end{macro} |
| 8212 |
% |
| 8213 |
% \subsection{间距设置} |
| 8214 |
% |
| 8215 |
% 段落间距 |
| 8216 |
% \begin{macrocode} |
| 8217 |
\skip_set:Nn \parskip { 0pt plus 2pt minus 1pt } |
| 8218 |
% \end{macrocode} |
| 8219 |
% 浮动体顶端与底端所留距离 |
| 8220 |
% \begin{macrocode} |
| 8221 |
\skip_set:Nn \intextsep { 14pt plus 2pt minus 2pt } |
| 8222 |
% \end{macrocode} |
| 8223 |
% 最后一个浮动对象顶端或第一个浮动对象底端与正文之间的距离 |
| 8224 |
% \begin{macrocode} |
| 8225 |
\skip_set:Nn \textfloatsep { 16pt plus 2pt minus 4pt } |
| 8226 |
\allowdisplaybreaks[4] |
| 8227 |
\ctex_after_end_preamble:n |
| 8228 |
{ |
| 8229 |
% \end{macrocode} |
| 8230 |
% 公式前的距离 |
| 8231 |
% \begin{macrocode} |
| 8232 |
\skip_set:Nn \abovedisplayskip { 5pt plus 1pt minus 1pt } |
| 8233 |
% \end{macrocode} |
| 8234 |
% 公式后的距离 |
| 8235 |
% \begin{macrocode} |
| 8236 |
\skip_set:Nn \belowdisplayskip { 5pt plus 1pt minus 1pt } |
| 8237 |
% \end{macrocode} |
| 8238 |
% 公式前与文本的距离 |
| 8239 |
% \begin{macrocode} |
| 8240 |
\skip_set:Nn \abovedisplayshortskip { 0pt } |
| 8241 |
% \end{macrocode} |
| 8242 |
% 公式后与文本的距离 |
| 8243 |
% \begin{macrocode} |
| 8244 |
\skip_set:Nn \belowdisplayshortskip { 5pt plus 1pt minus 1pt } |
| 8245 |
% \end{macrocode} |
| 8246 |
% 盲审致谢与个人简历的处理 |
| 8247 |
% \begin{macrocode} |
| 8248 |
% 盲审时重定义致谢和个人简历为空环境 |
| 8249 |
\bool_if:NT \g_@@_anonymous_bool |
| 8250 |
{ |
| 8251 |
\RenewDocumentEnvironment { acknowledgement } { } { } { } |
| 8252 |
\RenewDocumentEnvironment { resume } { } { } { } |
| 8253 |
} |
| 8254 |
} |
| 8255 |
% \end{macrocode} |
| 8256 |
% |
| 8257 |
% \changes{v2.13}{2026/05/12}{按2026年研究生撰写规范修订研究生图表题注为宋体。} |
| 8258 |
% \changes{v2.00}{2026/04/29}{修订本科图表题注为宋体。} |
| 8259 |
% \changes{v1.12}{2022/05/24}{修订图表题注西文为加粗。} |
| 8260 |
% |
| 8261 |
% \subsection{图表及其浮动体} |
| 8262 |
% |
| 8263 |
% \subsubsection{图表题注设置} |
| 8264 |
% |
| 8265 |
% 分别设置浮动体 \env{figure} 和 \env{table} 的标题样式。 |
| 8266 |
% \begin{macrocode} |
| 8267 |
\DeclareCaptionLabelSeparator{ccwd}{\hspace{0.5\ccwd}} |
| 8268 |
\DeclareCaptionLabelFormat{parens}{\bothIfFirst{#1}{~}(#2)} |
| 8269 |
\DeclareCaptionFont{nwafu@table@font}{\small} |
| 8270 |
\DeclareCaptionFont{nwafu@figure@font}{\small} |
| 8271 |
\DeclareCaptionFont{nwafu@subtable@font}{\small} |
| 8272 |
\DeclareCaptionFont{nwafu@subfigure@font}{\small} |
| 8273 |
% \end{macrocode} |
| 8274 |
% 图表题注设置。 |
| 8275 |
% \begin{macrocode} |
| 8276 |
\captionsetup |
| 8277 |
{ |
| 8278 |
format = hang, |
| 8279 |
font = {stretch = 1}, |
| 8280 |
labelsep = ccwd, |
| 8281 |
singlelinecheck = true, |
| 8282 |
skip = 4bp, |
| 8283 |
} |
| 8284 |
% \end{macrocode} |
| 8285 |
% 图表题注字体设置。 |
| 8286 |
% \begin{macrocode} |
| 8287 |
\captionsetup[table]{font += nwafu@table@font} |
| 8288 |
\captionsetup[figure]{font += nwafu@figure@font} |
| 8289 |
% \end{macrocode} |
| 8290 |
% 子图题注设置。 |
| 8291 |
% \begin{macrocode} |
| 8292 |
\captionsetup[subfigure] |
| 8293 |
{ |
| 8294 |
labelformat = parens, |
| 8295 |
font = nwafu@subfigure@font, |
| 8296 |
belowskip = 2pt, |
| 8297 |
aboveskip = 6pt |
| 8298 |
} |
| 8299 |
% \end{macrocode} |
| 8300 |
% |
| 8301 |
% \subsubsection{双语图表题注设置} |
| 8302 |
% |
| 8303 |
% 设置双语标题前缀 |
| 8304 |
% |
| 8305 |
% 直接采用类似\cs{captionsetup}[figure][bi-first]|{|name=图|}| |
| 8306 |
% |
| 8307 |
% \begin{macrocode} |
| 8308 |
\DeclareCaptionOption{bi-first}[format=hang,hangindent=-0.5em]{ |
| 8309 |
\def\tablename{表} |
| 8310 |
\def\figurename{图} |
| 8311 |
} |
| 8312 |
\DeclareCaptionOption{bi-second}[format=hang,hangindent=-2em]{ |
| 8313 |
\def\tablename{Tab.} |
| 8314 |
\def\figurename{Fig.} |
| 8315 |
} |
| 8316 |
\captionsetup[bi-first]{bi-first} |
| 8317 |
\captionsetup[bi-second]{bi-second} |
| 8318 |
% \end{macrocode} |
| 8319 |
% |
| 8320 |
% \subsubsection{图表环境内容居中钩子} |
| 8321 |
% |
| 8322 |
% 在环境结束前最后执行,对环境中所有内容有效 |
| 8323 |
% \begin{macrocode} |
| 8324 |
\AddToHook { env/figure/end } |
| 8325 |
{ \centering } |
| 8326 |
\AddToHook { env/table/end } |
| 8327 |
{ \centering } |
| 8328 |
% |
| 8329 |
% \end{macrocode} |
| 8330 |
% |
| 8331 |
% \subsubsection{表格行距和字号设置} |
| 8332 |
% |
| 8333 |
% 在tabular环境开始处添加代码, |
| 8334 |
% 设置表格行距和字号。 |
| 8335 |
% |
| 8336 |
% 注意:\cs{linespread}|{|1.05|}|需要在 \cs{small}\cs{selectfont} 之前使用, |
| 8337 |
% 这样行距倍数会基于 \cs{small} 字号计算。 |
| 8338 |
% \begin{macrocode} |
| 8339 |
\@@_at_begin_environment:nn { tabular } |
| 8340 |
{ |
| 8341 |
\exp_args:Nx \linespread { 1.15 } |
| 8342 |
\small\selectfont\ignorespaces |
| 8343 |
} |
| 8344 |
% \end{macrocode} |
| 8345 |
% |
| 8346 |
% \subsubsection{图表编号格式设置} |
| 8347 |
% |
| 8348 |
% \begin{macro}{\thefigure,\thetable} |
| 8349 |
% 重定义图表编号。 |
| 8350 |
% \begin{macrocode} |
| 8351 |
\cs_set:Npn \thefigure { \thechapter - \@@_arabic:n { figure } } |
| 8352 |
\cs_set:Npn \thetable { \thechapter - \@@_arabic:n { table } } |
| 8353 |
% \end{macrocode} |
| 8354 |
% \end{macro} |
| 8355 |
% |
| 8356 |
% \changes{v2.14}{2026/05/13}{添加tabularray宏包支持。} |
| 8357 |
% |
| 8358 |
% \subsubsection{\pkg{tabularray}宏包设置} |
| 8359 |
% |
| 8360 |
% 设置tabularray表格参数 |
| 8361 |
% \begin{macrocode} |
| 8362 |
\SetTblrDefault |
| 8363 |
{ |
| 8364 |
% \end{macrocode} |
| 8365 |
% 字号和行距 |
| 8366 |
% \begin{macrocode} |
| 8367 |
cells = { font = \small }, |
| 8368 |
stretch = 0.90, |
| 8369 |
rowsep = 0pt, |
| 8370 |
colsep = 6pt, |
| 8371 |
% \end{macrocode} |
| 8372 |
% 表格线宽度: |
| 8373 |
% |
| 8374 |
% 设置tabularray三线表顶线和底线表格水平线宽度和线型。 |
| 8375 |
% 由于在复杂表头中无法确定tabularray三线表中线的位置, |
| 8376 |
% 因此由用户根据需要设置水平线宽度。 |
| 8377 |
% \begin{macrocode} |
| 8378 |
hline = { \lightrulewidth }, |
| 8379 |
vline = { \lightrulewidth }, |
| 8380 |
hline{1,Z} = { \heavyrulewidth, solid }, |
| 8381 |
} |
| 8382 |
% \end{macrocode} |
| 8383 |
% 设置tabularray跨页长表格主题参数 |
| 8384 |
% \begin{macrocode} |
| 8385 |
\DefTblrTemplate{caption-tag}{default}{表\hspace{0.25em}\thetable} |
| 8386 |
\DefTblrTemplate{contfoot-text}{default}{接下页} |
| 8387 |
\DefTblrTemplate{caption-sep}{default}{\enskip} |
| 8388 |
\DefTblrTemplate{conthead-text}{default}{\!(续)} |
| 8389 |
|
| 8390 |
\NewTblrTheme{fancy}{ |
| 8391 |
\SetTblrStyle{firsthead,mddlehead,lasthead}{font=\centering\small} |
| 8392 |
\SetTblrStyle{firstfoot}{font=\small} |
| 8393 |
\SetTblrStyle{middlefoot}{font=\small} |
| 8394 |
\SetTblrStyle{lastfoot}{font=\small} |
| 8395 |
} |
| 8396 |
% \end{macrocode} |
| 8397 |
% 设置talltblr,longtblr跨页表格内部参数 |
| 8398 |
% \begin{macrocode} |
| 8399 |
\SetTblrInner[talltblr, longtblr]{ |
| 8400 |
hline = { \lightrulewidth }, |
| 8401 |
vline = { \lightrulewidth }, |
| 8402 |
hline{1,Z} = { \heavyrulewidth, solid }, |
| 8403 |
cells = {font=\small}, |
| 8404 |
rowhead = 1, |
| 8405 |
stretch = 0.90, |
| 8406 |
rowsep = 0pt, |
| 8407 |
colsep = 6pt, |
| 8408 |
} |
| 8409 |
% \end{macrocode} |
| 8410 |
% 为tabularray宏包引入booktabs库 |
| 8411 |
% \begin{macrocode} |
| 8412 |
\UseTblrLibrary{booktabs} |
| 8413 |
% \end{macrocode} |
| 8414 |
% |
| 8415 |
% \changes{v1.11}{2022/04/02}{修订本科enumerate编号两端括号为中文全角括号。} |
| 8416 |
% |
| 8417 |
% \subsection{\env{enumerate}列表环境设置} |
| 8418 |
% |
| 8419 |
% \begin{macrocode} |
| 8420 |
\cs_new_protected:Npn \@@_enumitem_label_set:nn #1#2 |
| 8421 |
{ \SetEnumitemValue{label}{#1}{#2} } |
| 8422 |
\clist_map_inline:nn |
| 8423 |
{ |
| 8424 |
{ bullet } { \textbullet }, |
| 8425 |
{ endash } { \normalfont\bfseries\textendash }, |
| 8426 |
{ asterisk } { \textasteriskcentered }, |
| 8427 |
{ arabic } { \c_@@_fwid_left_paren_tl\arabic*\c_@@_fwid_right_paren_tl }, |
| 8428 |
{ alph } { \c_@@_fwid_left_paren_tl\alph*\c_@@_fwid_right_paren_tl }, |
| 8429 |
{ roman } { \c_@@_fwid_left_paren_tl\roman*\c_@@_fwid_right_paren_tl }, |
| 8430 |
{ alph } { \c_@@_fwid_left_paren_tl\alph*\c_@@_fwid_right_paren_tl }, |
| 8431 |
{ roman } { \roman*. }, |
| 8432 |
{ outline } { \upshape\ding{111} } |
| 8433 |
} |
| 8434 |
{ \@@_enumitem_label_set:nn #1 } |
| 8435 |
\SetEnumitemValue{font}{sf}{\normalfont\sffamily} |
| 8436 |
\SetEnumitemValue{ref}{enumii}{\arabic{enumi}.\alph*} |
| 8437 |
\SetEnumitemValue{ref}{enumiii}{\arabic{enumi}.\alph{enumii}.\roman*} |
| 8438 |
\setlist |
| 8439 |
{ |
| 8440 |
nosep, |
| 8441 |
leftmargin = *, |
| 8442 |
labelindent = \dimexpr\parindent+0pt\relax, |
| 8443 |
labelsep = 0pt, |
| 8444 |
wide = \parindent, |
| 8445 |
} |
| 8446 |
\setlist[itemize,1]{label = bullet} |
| 8447 |
\setlist[itemize,2]{label = endash} |
| 8448 |
\setlist[itemize,3]{label = asterisk} |
| 8449 |
\setlist[enumerate,1]{label = arabic,ref = \arabic*} |
| 8450 |
\setlist[enumerate,2]{label = alph,ref = enumii} |
| 8451 |
\setlist[enumerate,3]{label = roman,ref = enumiii,labelwidth = *} |
| 8452 |
\setlist[description]{font = sf,labelwidth = *,leftmargin = 2\ccwd} |
| 8453 |
% \end{macrocode} |
| 8454 |
% |
| 8455 |
% \subsection{\pkg{hyperref} 相关配置} |
| 8456 |
% |
| 8457 |
% \begin{macro}{\hypersetup,\nwafu_hyperref_setup:n} |
| 8458 |
% \pkg{hyperref} 宏包是在导言区之后才引入的。若要在导言区中使用 |
| 8459 |
% \tn{hypersetup} 命令,必须另行定义。 |
| 8460 |
% \begin{macrocode} |
| 8461 |
\NewDocumentCommand \hypersetup { m } |
| 8462 |
{ \nwafu_hyperref_setup:n {#1} } |
| 8463 |
\cs_new_protected:Npn \nwafu_hyperref_setup:n #1 |
| 8464 |
{ \clist_gput_right:Nn \g_@@_to_hyperref_clist {#1} } |
| 8465 |
% \end{macrocode} |
| 8466 |
% \end{macro} |
| 8467 |
% |
| 8468 |
% \begin{macro}{\@@_set_hyperlink_color_key:n} |
| 8469 |
% 设置超链接颜色选项。最后的逗号用于确保 \pkg{l3keys} 可以正确解析,不能省去。 |
| 8470 |
% \begin{macrocode} |
| 8471 |
\cs_new:Npn \@@_set_hyperlink_color_key:n #1 |
| 8472 |
{ |
| 8473 |
hyperlink-color / \clist_item:nn {#1} {1} .code:n = |
| 8474 |
{ |
| 8475 |
\@@_define_hyperlink_color:nnn |
| 8476 |
{ \clist_item:nn {#1} {2} } |
| 8477 |
{ \clist_item:nn {#1} {3} } |
| 8478 |
{ \clist_item:nn {#1} {4} } |
| 8479 |
\nwafu_hyperref_setup:n |
| 8480 |
{ |
| 8481 |
linkcolor = nwafu@link, linkbordercolor = nwafu@link, |
| 8482 |
urlcolor = nwafu@url, urlbordercolor = nwafu@url, |
| 8483 |
citecolor = nwafu@cite, citebordercolor = nwafu@cite |
| 8484 |
} |
| 8485 |
}, |
| 8486 |
} |
| 8487 |
% \end{macrocode} |
| 8488 |
% \end{macro} |
| 8489 |
% |
| 8490 |
% \begin{macro}{\@@_define_hyperlink_color:nnn} |
| 8491 |
% 定义超链接颜色。 |
| 8492 |
% \begin{macrocode} |
| 8493 |
\cs_new_protected:Npn \@@_define_hyperlink_color:nnn #1#2#3 |
| 8494 |
{ |
| 8495 |
\definecolorset { HTML } { nwafu@ } { } |
| 8496 |
{ link, #1; url, #2; cite, #3 } |
| 8497 |
} |
| 8498 |
% \end{macrocode} |
| 8499 |
% \end{macro} |
| 8500 |
% |
| 8501 |
% \begin{macrocode} |
| 8502 |
\keys_define:nx { nwafu / style } |
| 8503 |
{ |
| 8504 |
% \end{macrocode} |
| 8505 |
% |
| 8506 |
% \begin{macro}{style/hyperlink} |
| 8507 |
% 超链接样式。 |
| 8508 |
% \begin{macrocode} |
| 8509 |
hyperlink .choice:, |
| 8510 |
hyperlink .value_required:n = true, |
| 8511 |
hyperlink / border .code:n = { }, |
| 8512 |
hyperlink / color .code:n = |
| 8513 |
{ \nwafu_hyperref_setup:n { colorlinks = true } }, |
| 8514 |
hyperlink / none .code:n = |
| 8515 |
{ \nwafu_hyperref_setup:n { hidelinks = true } }, |
| 8516 |
% \end{macrocode} |
| 8517 |
% \end{macro} |
| 8518 |
% |
| 8519 |
% \begin{macro}{style/hyperlink-color} |
| 8520 |
% 超链接颜色。 |
| 8521 |
% \begin{macrocode} |
| 8522 |
hyperlink-color .choice:, |
| 8523 |
hyperlink-color .value_required:n = true, |
| 8524 |
\clist_map_function:nN |
| 8525 |
{ |
| 8526 |
{ autumn, D70000, D75F00, AF8700 }, |
| 8527 |
{ business, D14542, 295497, 1F6E43 }, |
| 8528 |
{ classic, FF0000, 0000FF, 00FF00 }, |
| 8529 |
{ default, 990000, 0000B2, 007F00 }, |
| 8530 |
{ elegant, 961212, C31818, 9B764F }, |
| 8531 |
{ fantasy, FF4A19, FF3F94, 934BA1 }, |
| 8532 |
{ material, E91E63, 009688, 4CAF50 }, |
| 8533 |
{ science, CA0619, 389F9D, FF8920 }, |
| 8534 |
{ summer, 00AFAF, 5F5FAF, 5F8700 }, |
| 8535 |
{ graylevel, 616161, 616161, 616161 }, |
| 8536 |
{ prl, 2D3092, 2D3092, 2D3092 } |
| 8537 |
} |
| 8538 |
\@@_set_hyperlink_color_key:n |
| 8539 |
} |
| 8540 |
% \end{macrocode} |
| 8541 |
% \end{macro} |
| 8542 |
% |
| 8543 |
% \begin{macro}{\nwafu_allow_url_break:,\@@_add_url_break_points:} |
| 8544 |
% 允许 URL 在字母、数字和一些特殊符号处断行。见 |
| 8545 |
% \url{https://bit.ly/2hhIjLW}。 |
| 8546 |
% \begin{macrocode} |
| 8547 |
\cs_new:Npn \nwafu_allow_url_break: |
| 8548 |
{ |
| 8549 |
\cs_new:Npn \@@_add_url_break_points: |
| 8550 |
{ \tl_map_function:NN \c_@@_url_break_points_tl \do } |
| 8551 |
\@@_appto_cmd:Nn \UrlBreaks |
| 8552 |
{ \UrlOrds \@@_add_url_break_points: } |
| 8553 |
} |
| 8554 |
% \end{macrocode} |
| 8555 |
% \end{macro} |
| 8556 |
% |
| 8557 |
% \begin{variable}{\c_@@_url_break_points_tl} |
| 8558 |
% 额外的断行位置是 26 个英文字母(大小写)以及 10 个阿拉伯数字。 |
| 8559 |
% \pkg{url} 提供的宏 \tn{UrlBreaks} 还包含了特殊符号 |*|、|-|、 |
| 8560 |
% |~|、|'|、|"|、|-|,也被设置为允许断行。 |
| 8561 |
% \begin{macrocode} |
| 8562 |
\tl_const:Nn \c_@@_url_break_points_tl |
| 8563 |
{ |
| 8564 |
abcdefghijklmnopqrstuvwxyz |
| 8565 |
ABCDEFGHIJKLMNOPQRSTUVWXYZ |
| 8566 |
0123456789 |
| 8567 |
} |
| 8568 |
% \end{macrocode} |
| 8569 |
% \end{variable} |
| 8570 |
% |
| 8571 |
% 在导言区末尾引入 \pkg{hyperref} 宏包。 |
| 8572 |
% \begin{macrocode} |
| 8573 |
\ctex_at_end_preamble:n |
| 8574 |
{ |
| 8575 |
\RequirePackage { hyperref } |
| 8576 |
% \end{macrocode} |
| 8577 |
% 此后 \tn{hypersetup} 命令由 \pkg{hyperref} 宏包接管。 |
| 8578 |
% \begin{macrocode} |
| 8579 |
\tl_set_eq:NN \l_tmpa_tl \l_@@_info_title_tl |
| 8580 |
\tl_replace_all:Nnn \l_tmpa_tl { \\ } { ~ } |
| 8581 |
\hypersetup |
| 8582 |
{ |
| 8583 |
bookmarksnumbered = true, |
| 8584 |
psdextra = true, |
| 8585 |
unicode = true, |
| 8586 |
% \end{macrocode} |
| 8587 |
% 填写 PDF 元信息。 |
| 8588 |
% \begin{macrocode} |
| 8589 |
%<*class> |
| 8590 |
pdftitle = \l_tmpa_tl, |
| 8591 |
pdfauthor = \l_@@_info_author_tl, |
| 8592 |
pdfkeywords = \l_@@_abstract_keywords_clist, |
| 8593 |
%</class> |
| 8594 |
% pdfsubject = , |
| 8595 |
pdfcreator = \c_@@_name_pdf_creator_tl |
| 8596 |
} |
| 8597 |
% \end{macrocode} |
| 8598 |
% 将导言区中通过 \cs{nwafu_hyperref_setup:n} 进行的设置传入 |
| 8599 |
% \tn{hypersetup}。 |
| 8600 |
% \begin{macrocode} |
| 8601 |
\exp_args:NV \hypersetup \g_@@_to_hyperref_clist |
| 8602 |
% \end{macrocode} |
| 8603 |
% URL 断行处理。 |
| 8604 |
% \begin{macrocode} |
| 8605 |
\nwafu_allow_url_break: |
| 8606 |
% \end{macrocode} |
| 8607 |
% 手动开启 \pkg{biblatex} 的 \pkg{hyperref} 支持。 |
| 8608 |
% \begin{macrocode} |
| 8609 |
\BiblatexManualHyperrefOn |
| 8610 |
} |
| 8611 |
% \end{macrocode} |
| 8612 |
% |
| 8613 |
% 在 PDF 字符串中设置 \tn{nwafu@kai} 命令为空,以抑制 \pkg{hyperref} |
| 8614 |
% 的警告信息。 |
| 8615 |
% \begin{macrocode} |
| 8616 |
\ctex_at_end_package:nn { hyperref } |
| 8617 |
{ |
| 8618 |
\pdfstringdefDisableCommands |
| 8619 |
{ |
| 8620 |
\cs_set_eq:NN \nwafu@kai \prg_do_nothing: |
| 8621 |
\cs_set_eq:NN \quad \c_space_tl |
| 8622 |
\cs_set_eq:NN \qquad \c_space_tl |
| 8623 |
} |
| 8624 |
} |
| 8625 |
% \end{macrocode} |
| 8626 |
% |
| 8627 |
% 引用标题配置。 |
| 8628 |
% \begin{macrocode} |
| 8629 |
\labelformat{part}{\CTEXthepart} |
| 8630 |
\labelformat{chapter}{\CTEXthechapter} |
| 8631 |
\labelformat{figure}{\figurename~#1} |
| 8632 |
\labelformat{table}{\tablename~#1} |
| 8633 |
\def\figureautorefname{图} |
| 8634 |
\def\tableautorefname{表} |
| 8635 |
\keys_set_known:nn { ctex } |
| 8636 |
{ |
| 8637 |
figurename = 图, |
| 8638 |
tablename = 表, |
| 8639 |
} |
| 8640 |
\labelformat{equation}{式(#1)} |
| 8641 |
\labelformat{section}{第 #1 节} |
| 8642 |
\labelformat{subsection}{第 #1 小节} |
| 8643 |
% \end{macrocode} |
| 8644 |
% |
| 8645 |
% \subsection{用户接口} |
| 8646 |
% |
| 8647 |
% \begin{macro}{abstract,info,style} |
| 8648 |
% 定义元(meta)键值对。 |
| 8649 |
% \begin{macrocode} |
| 8650 |
\keys_define:nn { nwafu } |
| 8651 |
{ |
| 8652 |
abstract .meta:nn = { nwafu / abstract } {#1}, |
| 8653 |
info .meta:nn = { nwafu / info } {#1}, |
| 8654 |
style .meta:nn = { nwafu / style } {#1} |
| 8655 |
} |
| 8656 |
% \end{macrocode} |
| 8657 |
% \end{macro} |
| 8658 |
% |
| 8659 |
% 文档类初始设置。 |
| 8660 |
% \begin{macrocode} |
| 8661 |
\keys_set:nn { nwafu } |
| 8662 |
{ |
| 8663 |
style / font-size = -4, |
| 8664 |
style / fullwidth-stop = false, |
| 8665 |
style / auto-make-cover = true, |
| 8666 |
style / logo = { logo/nwafu-bar.pdf }, |
| 8667 |
style / logo-size = { 0.65 \textwidth }, |
| 8668 |
style / hyperlink = none, |
| 8669 |
style / hyperlink-color = default, |
| 8670 |
info / ptype = academic, |
| 8671 |
info / secret-level = none, |
| 8672 |
info / school-id = { 10712 }, |
| 8673 |
info / date = { \zhtoday }, |
| 8674 |
theorem / header-font = { \sffamily }, |
| 8675 |
theorem / body-font = { \nwafu@kai }, |
| 8676 |
theorem / counter = { chapter }, |
| 8677 |
} |
| 8678 |
% \end{macrocode} |
| 8679 |
% 根据论文类型设置脚注样式 |
| 8680 |
% \begin{macrocode} |
| 8681 |
\int_compare:nNnTF { \g_@@_thesis_type_int } = { 3 } |
| 8682 |
{ \keys_set:nn { nwafu } { style / footnote-style = circled } } |
| 8683 |
{ \keys_set:nn { nwafu } { style / footnote-style = plain } } |
| 8684 |
% \end{macrocode} |
| 8685 |
% |
| 8686 |
% \begin{macro}{\nwafuset} |
| 8687 |
% 用户设置接口。 |
| 8688 |
% \begin{macrocode} |
| 8689 |
\NewDocumentCommand \nwafuset { m } |
| 8690 |
{ \keys_set:nn { nwafu } {#1} } |
| 8691 |
% \end{macrocode} |
| 8692 |
% \end{macro} |
| 8693 |
% |
| 8694 |
% \begin{environment}{proof} |
| 8695 |
% \begin{environment}{axiom} |
| 8696 |
% \begin{environment}{corollary} |
| 8697 |
% \begin{environment}{definition} |
| 8698 |
% \begin{environment}{example} |
| 8699 |
% \begin{environment}{lemma} |
| 8700 |
% \begin{environment}{theorem} |
| 8701 |
% 模板预定义的常用数学环境。 |
| 8702 |
% 其中的“证明”比较特殊,它不编号,但会添加证毕符号。 |
| 8703 |
% \begin{macrocode} |
| 8704 |
\newtheorem* { proof } { \c_@@_name_proof_tl } |
| 8705 |
\newtheorem { axiom } { \c_@@_name_axiom_tl } |
| 8706 |
\newtheorem { corollary } { \c_@@_name_corollary_tl } |
| 8707 |
\newtheorem { definition } { \c_@@_name_definition_tl } |
| 8708 |
\newtheorem { example } { \c_@@_name_example_tl } |
| 8709 |
\newtheorem { lemma } { \c_@@_name_lemma_tl } |
| 8710 |
\newtheorem { theorem } { \c_@@_name_theorem_tl } |
| 8711 |
%</class> |
| 8712 |
% \end{macrocode} |
| 8713 |
% \end{environment} |
| 8714 |
% \end{environment} |
| 8715 |
% \end{environment} |
| 8716 |
% \end{environment} |
| 8717 |
% \end{environment} |
| 8718 |
% \end{environment} |
| 8719 |
% \end{environment} |
| 8720 |
% |
| 8721 |
% \begin{macrocode} |
| 8722 |
%<@@=> |
| 8723 |
% \end{macrocode} |
| 8724 |
% |
| 8725 |
% \clearpage |
| 8726 |
% |
| 8727 |
% \end{implementation} |
| 8728 |
% |