diff options
author | Karl Berry <karl@freefriends.org> | 2022-04-10 20:45:18 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-04-10 20:45:18 +0000 |
commit | c838409227463780c18e57ff86608905024e5c64 (patch) | |
tree | 6262eab3ebdfa618648589a8f9aa7b9f8a3e8ce3 /Master/texmf-dist/source/latex/njuthesis | |
parent | 7ebb9e79dc86ac4a98779b738f459b52b734792c (diff) |
njuthesis
git-svn-id: svn://tug.org/texlive/trunk@62995 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/njuthesis')
-rw-r--r-- | Master/texmf-dist/source/latex/njuthesis/njuthesis.dtx | 1235 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/njuthesis/njuthesis.ins | 4 |
2 files changed, 864 insertions, 375 deletions
diff --git a/Master/texmf-dist/source/latex/njuthesis/njuthesis.dtx b/Master/texmf-dist/source/latex/njuthesis/njuthesis.dtx index 228b53a204a..f333e6d6b3b 100644 --- a/Master/texmf-dist/source/latex/njuthesis/njuthesis.dtx +++ b/Master/texmf-dist/source/latex/njuthesis/njuthesis.dtx @@ -111,7 +111,7 @@ To produce the documentation run the original source files ending with % %<class>\NeedsTeXFormat{LaTeX2e} %<*!(driver|install)> -%<+!driver>\GetIdInfo $Id: njuthesis.dtx 0.16.1 2022-03-27 13:00:00 +0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$ +%<+!driver>\GetIdInfo $Id: njuthesis.dtx 0.17.0 2022-04-09 16:30:00 +0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$ %<class> {Thesis template for Nanjing University} %<class>\ProvidesExplClass{njuthesis} %<definition-ug> {Undergraduate definition file for njuthesis} @@ -200,7 +200,7 @@ To produce the documentation run the original source files ending with % \thanks{E-mail: \href{mailto:git+nju-lug-email-3104-issue-@yaoge123.cn} % {git+nju-lug-email-3104-issue-@yaoge123.cn}}} % -% \date{v0.16.1 \quad 2022-03-27} +% \date{v0.17.0 \quad 2022-04-09} % % \changes{v0.1}{2021/09/04}{开始开发。} % \changes{v0.2}{2021/09/07}{初步搭建了可用的模板。} @@ -429,8 +429,7 @@ To produce the documentation run the original source files ending with % \footnote{\href{https://ctan.org/pkg/njuthesis}{\cls{njuthesis}} 已经于2021年9 % 月12日发布在 CTAN,用于绘制南大图标的 % \href{https://ctan.org/pkg/njuvisual}{\pkg{njuvisual}} 也已于同年11月28日发 -% 布,两者已被 \hologo{TeX}\,Live 和 \hologo{MiKTeX} 收录,将进入 \hologo{TeX}\, -% Live 2022 发行版。}上提供基本的介绍信息,可以下载说明文档(本文档)和宏包源代 +% 布,两者已被 \hologo{TeX} Live 和 \hologo{MiKTeX} 收录。}上提供基本的介绍信息,可以下载说明文档(本文档)和宏包源代 % 码。当然,使用这一来源时并不需要接触后者,请参考 % \ref{subsubsec:standard-installation} 的标准安装方法。 % @@ -571,7 +570,7 @@ To produce the documentation run the original source files ending with % \item 校园网环境中访问\ignorespaces % \href{https://mirror.nju.edu.cn/download/TeX%20排版系统} % {南京大学开源软件镜像站}可以获得最佳的下载体验。 -% \item 使用最新的发行版,即版本号为2021或者21。 +% \item 使用最新的发行版,即版本号为2022或者22。 % \item 对于 Windows 和 macOS 用户,更推荐轻量化的 \hologo{MiKTeX} 套件。 % ^^A \item Linux 用户请尽可能下载 full 版本,如 |texlive-full|。 % ^^A 换言之,下载最大的软件包。 @@ -696,7 +695,7 @@ To produce the documentation run the original source files ending with % % \begin{enumerate} % \item 访问\href{https://tex.nju.edu.cn}{南大 \hologo{TeX} 网站},点击界面右上方“注册”按钮,使用\emph{南京大学邮箱}注册账号并登录 -% \item 新建空白项目,或者上传 \ref{subsubsec:on-the-fly-installation} 得到的压缩文件。 +% \item 新建空白项目,或者上传 \ref{subsubsec:on-the-fly-installation} 节得到的压缩文件。 % \item 在项目页面左上角的“菜单”中,确认编译器为 |XeLaTeX| 或者 |LuaLaTeX| % \item 仿照 \file{njuthesis-sample.tex} 编写论文 % \item 点击“重新编译”按钮进行编译和预览 @@ -715,15 +714,23 @@ To produce the documentation run the original source files ending with % % \subsection{版本升级} % -% 考虑到本模板仍在开发中,将不断发布新版本,您可能需要不定期进行更新以得到对于已知问题的修复补丁。每个版本的更新内容记录于 Git 仓库中的 \file{CHANGELOG.md}。考虑到安装和编译方式的差异,不妨直接将论文内容迁移至新版的 \file{njuthesis-sample.tex}\footnote{请赞美 \hologo{TeX} 系统“样式与内容分离”的原则!},然后按照当前工作文件夹内是否有 \file{.cls} 文件分别进行更新操作。 +% 本模板仍在开发中,将不断发布新版本,您可能需要不定期进行更新以得到 +% 对于已知问题的修复补丁。每个版本的更新内容记录于 Git 仓库中的 +% \file{CHANGELOG.md}。除非特别提到选项变化,升级时一般无需更改 \file{.tex} +% 文件内容\footnote{在确实发生了接口变动,例如选项名称发生了更改, +% 一种稳妥做法是将论文内容迁移至新版的 \file{njuthesis-sample.tex}}。 +% 基于安装和编译方式的差异,可以按照当前工作文件夹内是否有 \file{.cls} +% 文件分别进行更新操作。 % % \subparagraph{有} -% 迁移至 \file{njuthesis-user-v*.zip} 提供的新内容。 +% 下载 \file{njuthesis-user-v*.zip},使用其中新版的 \file{.cls}、\file{.def} +% 文件覆盖旧版本。 % % \subparagraph{没有} -% 如果使用的是南大 \hologo{TeX},更新内置模板时会进行公告,一般为上传 CTAN 后一周。如果是本地安装,请直接使用包管理器进行更新: +% 如果使用的是南大 \hologo{TeX},更新内置模板时会进行公告,一般为上传 CTAN +% 后一周内。如果是本地安装,请直接使用包管理器进行更新: % \begin{shellexample}[morekeywords={tlmgr},emph={update}] -% tlmgr update all +% tlmgr update --all % \end{shellexample} % % @@ -733,7 +740,8 @@ To produce the documentation run the original source files ending with % % 典型的 \cls{njuthesis} 主文件结构应该如下所示: % -% \begin{latexexample}[moretexcs={\njusetup,\graphicspath,\tableofcontents,\maketitle,\mainmatter,\chapter,\printbibliography},emph={[1]document}] +% \begin{latexexample}[moretexcs={\njusetup,\graphicspath,\tableofcontents, +% \maketitle,\mainmatter,\chapter,\printbibliography},emph={[1]document}] % \documentclass{njuthesis} % \njusetup{} % \begin{document} @@ -746,14 +754,15 @@ To produce the documentation run the original source files ending with % \end{document} % \end{latexexample} % -% 如果您尝试编译上面的代码,会发现自己得到了一个5页的 PDF 文档,是一份空白的本科生论文。 -% 当然,这个文档实际上没有任何内容,接下来将会介绍具体填写内容的方法。 +% 如果您尝试编译上面的代码,会发现自己得到了一个5页的 PDF 文档, +% 是一份空白的本科生论文。当然,这个文档实际上没有任何内容, +% 接下来的部分会介绍具体填写内容的方法。 % % % \subsection{模板选项} % % 模板选项位于 \tn{documentclass} 后的方括号内,用于指定模板的行为。 -% 下文中尖括号内列出了若干个允许的选项,其中加粗的为默认选项。 +% 下文中尖括号内列出了若干个允许的选项,其中加粗的为默认选项(缺省值)。 % % \subsubsection{学位信息} % \begin{function}[added=2021-09-07]{degree} @@ -767,7 +776,8 @@ To produce the documentation run the original source files ending with % \begin{syntax} % type = <(thesis)|design> % \end{syntax} -% 用于选择文档类型并将相关字段输出在封面和摘要页,可选值分别为毕业论文和毕业设计,默认为毕业论文。 +% 用于选择文档类型并将相关字段输出在封面和摘要页, +% 可选值分别为毕业论文和毕业设计,默认为毕业论文。 % \end{function} % % @@ -787,10 +797,18 @@ To produce the documentation run the original source files ending with % \begin{syntax} % decl-page = <\TFF> % \end{syntax} -% 是否需要诚信承诺书或原创性声明页面,默认关闭。 +% 是否需要自动生成声明页面,默认关闭。 % \end{function} % -% 通过此项可在封面后添加本科生的诚信承诺书或研究生的原创性声明。 +% 通过此项,对于本科生模板可在封面后添加的诚信承诺书, +% 对于研究生模板可在封面后添加原创性声明,并且在最后一页添加学位论文出版授权书。 +% +% 对于需要手动插入承诺书扫描页的情况,可以在导言区载入 \pkg{pdfpages} 宏包, +% 并在所需位置使用该红包提供的 \cs{includepdf} 命令。 +% 例如,可以用如下所示的命令插入扫描件的第一页,并插入紧随的一个空白页。 +% \begin{latexexample}[moretexcs={\includepdf},emph={[2]pages}] +% \includepdf[pages={1,{}}]{scanned.pdf} +% \end{latexexample} % % % \subsubsection{单双面模式} @@ -802,7 +820,10 @@ To produce the documentation run the original source files ending with % 开启单面或双面模式,默认为双面模式。 % \end{function} % -% 本选项继承自 \hologo{LaTeX2e} \cls{book} 标准文档类。单双面选项为全局选项,开启后会改变页码编号,以及部分宏包的行为。在单面模式下,页面是连续的,不会产生空白页;在双面模式下,封面、摘要、参考文献列表等特殊页面以及新的章节都会从奇数页开始,更适合印刷输出。 +% 本选项继承自 \hologo{LaTeX2e} \cls{book} 标准文档类。 +% 单双面选项为全局选项,开启后会改变页码编号,以及部分宏包的行为。 +% 在单面模式下,页面是连续的,不会产生空白页;在双面模式下,封面、摘要、 +% 参考文献表等特殊页面,以及新的章节都会从奇数页开始,更适合印刷输出。 % % % \subsubsection{草稿模式} @@ -814,7 +835,8 @@ To produce the documentation run the original source files ending with % 选择是否开启草稿模式,默认关闭。 % \end{function} % -% 本选项继承自 \hologo{LaTeX2e} \cls{book} 标准文档类。草稿模式为全局选项,启用这一选项将产生以下整体影响: +% 本选项继承自 \hologo{LaTeX2e} \cls{book} 标准文档类。 +% 草稿模式为全局选项,启用这一选项将产生以下整体影响: % \begin{itemize} % \item 禁用封面的绘制(包括承诺和声明) % \item 显示页面文字范围边框以及页眉页脚线 @@ -855,10 +877,13 @@ To produce the documentation run the original source files ending with % 手动指定字体。 % \end{function} % -% 根据学校论文格式的要求,本模板使用的中文字体主要有{\songti 宋体}、{\heiti 黑体}、{\kaishu 楷体}、{\fangsong 仿宋}四种; -% 西文字体主要有衬线体(\textup{serif})、无衬线体(\textsf{sans-serif})和等宽字体(\texttt{monospace})三种。 -% 在生成论文时,需要将每一种字体(宋体、楷体)与一种字库(操作系统中的 ttf 文件)相对应。 -% 由于不同操作系统自带的字库不同,在不同的操作系统上使用同一套配置会导致缺字、编译出错等后果。 +% 根据学校论文格式的要求,本模板使用的中文字体主要有{\songti 宋体}、 +% {\heiti 黑体}、{\kaishu 楷体}、{\fangsong 仿宋}四种; +% 西文字体主要有衬线体(\textup{serif})、无衬线体(\textsf{sans-serif}) +% 和等宽字体(\texttt{monospace})三种。 +% 在生成论文时,需要将每一种字体(宋体、楷体)与一种字库(操作系统中的 +% \file{.ttf} 文件)相对应。由于不同操作系统自带的字库不同, +% 在不同的操作系统上使用同一套配置会导致缺字、编译出错等后果。 % 因此,本模板对于中文字体和西文字体都提供了多种字体配置。 % % 本模板提供的中文字体配置如表 \ref{tab:cjk-fontset} 所示。 @@ -948,17 +973,24 @@ To produce the documentation run the original source files ending with % \begin{syntax} % \tn{njusetup} \Arg{键值列表} % \end{syntax} -% 是 \cls{njuthesis} 文档类的通用设置命令,用来设置各项功能。\tn{njusetup} 的参数是一个使用英文半角逗号分隔的键值列表,通常形如 \meta{key}|=|\meta{value}。 +% 是 \cls{njuthesis} 文档类的通用设置命令,用来设置各项功能。 +% \tn{njusetup} 的参数是一个使用英文半角逗号分隔的键值列表, +% 通常形如 \meta{key}|=|\meta{value}。 % \end{function} % -% 目前,\tn{njusetup} 仅包含用于设置个人信息的 |info| 类。以下为全部的个人信息参数,其中带有星号的为对应的英文字段。请注意,部分参数已被弃置,列于后方。 +% 目前,\tn{njusetup} 仅包含用于设置个人信息的 |info| 类。 +% 以下为全部的个人信息参数,其中带有星号的为对应的英文字段。 +% 请注意,部分参数已被弃置,列于后方。 % % \begin{function}[updated=2022-01-14]{info/title,info/title*} % \begin{syntax} % title = \Arg{标题} % title* = \Arg{英文标题} % \end{syntax} -% 题目。由于封面上提供给中文题目的横线长度有限\footnote{单行最长为15个汉字,建议总长度不超过45字},本模板默认会自动对标题进行换行。如果需要手动指定换行位点,请使用换行控制符( |\\| ),最多两处。 +% 题目。由于封面上提供给中文题目的横线长度有限\footnote{单行最长约为15 +% 个汉字,建议总长度不超过45字,当然你也可以对照 \ref{subsubsec:modify-length} +% 节修改横线长度},本模板默认会自动对标题进行换行。 +% 如果需要手动指定换行位点,请使用换行控制符( |\\| )。 % \end{function} % % 绘制封面及摘要中的标题涉及断行处理,无法对空字符串产生正确结果。 @@ -974,7 +1006,8 @@ To produce the documentation run the original source files ending with % keywords = \Arg{关键词} % keywords* = \Arg{英文关键词} % \end{syntax} -% 关键词列表。关键词之间需要使用英文半角逗号隔开,含有空格的关键字需要使用花括号包裹以避免歧义。可以参照下方的填写示例。 +% 关键词列表。关键词之间需要使用英文半角逗号隔开, +% 含有空格的关键字需要使用花括号包裹以避免歧义。可以参照下方的填写示例。 % \end{function} % % \begin{function}[updated=2021-10-01]{info/grade} @@ -988,7 +1021,8 @@ To produce the documentation run the original source files ending with % \begin{syntax} % student-id = \Arg{学号} % \end{syntax} -% 学号。南京大学本科生为9位数字学号,研究生为两位大写字母标识加上八位数字组成的学号。 +% 学号。南京大学本科生为9位数字学号, +% 研究生为两位大写字母标识加上数字组成的学号。 % \end{function} % % \begin{function}[updated=2021-10-01]{info/author,info/author*} @@ -1058,10 +1092,13 @@ To produce the documentation run the original source files ending with % chairman = \Arg{答辩主席} % reviewer = \Arg{评委姓名职称} % \end{syntax} -% 答辩委员会信息,分别为评审委员会主席及四位成员的姓名加职称,只对研究生有效。四位评审成员是以列表的形式存储的,填写方法同关键词。如果是盲审,填入“盲审”二字即可。 +% 答辩委员会信息,分别为评审委员会主席及四位成员的姓名加职称,只对研究生有效。 +% 四位评审成员是以列表的形式存储的,填写方法同关键词。 +% 如果是盲审,填入“盲审”二字即可。 % \end{function} % -% \begin{function}[updated=2021-10-01]{info/clc,info/secret-level,info/udc,info/supervisor-contact} +% \begin{function}[updated=2021-10-01]{info/clc,info/secret-level, +% info/udc,info/supervisor-contact} % \begin{syntax} % clc = \Arg{中图分类号} % secret-level = <不涉密|秘密|机密|绝密> @@ -1129,6 +1166,7 @@ To produce the documentation run the original source files ending with % supervisor*= {Professor Li Chengdian}, % submit-date = {2021-09-12}, % defend-date = {2022-01-15}, +% email = {git+nju-lug-email-3104-issue-@yaoge123.cn}, % chairman = {张晓山~教授}, % reviewer = {王瑞希~教授,郭德纲~副教授,华芈库~教授,戴菲菲~教授}, % clc = {0175.2}, @@ -1158,6 +1196,16 @@ To produce the documentation run the original source files ending with % 对于过长的标题,目录和页眉中会使用其短描述。 % \end{function} % +% \begin{function}{\chaptermark,\sectionmark} +% \begin{syntax} +% \tn{chapter}\oarg{用在页眉的章标题}\marg{完整的章标题} +% \tn{sectionmark}\marg{用在目录的章标题} +% \tn{section}\oarg{用在页眉的章标题}\marg{完整的节标题} +% \tn{sectionmark}\marg{用在目录节标题} +% \end{syntax} +% 如果页眉内容发生了冲突,可使用这两个命令细化定制。 +% \end{function} +% % % \subsubsection{页面} % @@ -1637,7 +1685,7 @@ To produce the documentation run the original source files ending with % % \subparagraph{使用 JabRef} % -% \href{https://www.jabref.org/}{jabRef} 是一款开源、跨平台的文献管理软件。 +% \href{https://www.jabref.org/}{JabRef} 是一款开源、跨平台的文献管理软件。 % JabRef 提供了对 \hologo{BibTeX} 和 \pkg{biblatex} 的原生支持, % 能够直接管理 \file{.bib} 文件, 还可以向 TeXstudio 等外部软件推送引用命令。 % @@ -1776,7 +1824,7 @@ To produce the documentation run the original source files ending with % \quad\tn{item}\oarg{符号} \meta{说明} % \tn{end}\{notation\} % \end{syntax} -% 符号表。带有星号的符号表环境不会插入目录。 +% 符号表,或者称为术语表、缩略词对照表。带有星号的符号表环境不会插入目录。 % \end{function} % % @@ -1806,9 +1854,18 @@ To produce the documentation run the original source files ending with % \begin{syntax} % \tn{njupaperlist}\oarg{标题}\marg{文献} % \end{syntax} -% 成果列表,默认标题为发表文章目录。\Arg{文献} 的填写方式同 \tn{cite},多个文献需要使用英文半角逗号隔开。 +% 成果列表,生成一个列举文献条目的无编号节。可选参数为标题, +% 默认为“发表文章目录”。\Arg{文献} 的填写方式同 \tn{cite}, +% 多个文献需要使用英文半角逗号隔开。 % \end{function} % +% 一个简单的例子如下所示: +% \begin{latexexample}[moretexcs={\njuchapter,\njupaperlist}] +% \njuchapter{攻读博士学位期间研究成果} +% \njupaperlist[攻读博士学位期间发表的学术论文]{ +% Nemec1997-209-214,Chiani1998-2998-3008,Chiani1998a} +% \end{latexexample} +% % 为了便于识别,成果列表中默认对发表年份进行加粗处理。而对作者姓名的处理较为复杂。利用 \pkg{biblatex} 的数据注解机制可以实现对特定文献信息的样式修改\footnote{\url{https://blog.csdn.net/xenonhu/article/details/120853247}},在此可以用来实现指定作者姓名的突出。经过注解后的一则参考文献条目如下所示: % \begin{latexexample}[emph={[1]@inproceedings},emph={[2]author}] % @inproceedings{Nemec1997-209-214, @@ -1826,14 +1883,76 @@ To produce the documentation run the original source files ending with % % 除手动进行标记以外,以下也提供一种自动化处理办法。下载 \href{https://github.com/hushidong/biblatex-map}{bibmap} 全部文件后,修改主目录下的 \file{bibmapaddauthoran.py} 中 |fieldsource| 为需要匹配的姓名,将需要进行标记的 \file{.bib} 文件拷贝至本目录(此处使用 \file{test.bib} 进行示范),运行以下命令生成的参考文献数据源即可被成果列表识别加粗。 % -% \begin{shellexample}[morekeywords={python}] +% \begin{shellexample}[morekeywords={python},deletekeywords={test}] % python bibmap.py test.bib -m bibmapaddauthoran.py % \end{shellexample} % % +% \subsection{额外定制} +% +% 在研究生院松散的规定下,本模板仅能提供一个大体适用的框架, +% 势必需要为用户修改留出空间。这一节将提供一些定制方法。 +% +% \subsubsection{固定文本} +% +% \begin{function}{\njusetname,\njusetname*,\njusettext,\njusettext*} +% \begin{syntax} +% \tn{njusetname} = \marg{名称}\oarg{变体}\marg{内容} +% \tn{njusetname*} = \marg{名称}\oarg{变体}\marg{内容} +% \tn{njusettext} = \marg{名称}\oarg{变体}\marg{内容} +% \tn{njusettext*} = \marg{名称}\oarg{变体}\marg{内容} +% \end{syntax} +% 修改固定文本内容,带星号的命令表示修改对应的英文字段。 +% 名称对应的默认内容可以参见 \ref{subsubsec:constant-name} 与 +% \ref{subsubsec:constant-text} 节。 +% \end{function} +% +% 譬如,将英文摘要页的小标题修改为仅首字母大写的样式,示例如下: +% +% \begin{latexexample}[moretexcs={\njusetname*}] +% \njusetname*{abstract}[b]{Abstract} +% \end{latexexample} +% +% \subsubsection{长度值} +% \label{subsubsec:modify-length} +% +% \begin{function}{\njusetlength,\njusetlength*} +% \begin{syntax} +% \tn{njusetlength} = \marg{名称}\marg{长度} +% \tn{njusetlength*} = \marg{名称}\marg{长度} +% \end{syntax} +% 修改长度值,默认为修改固定长度(|dim| 类型), +% 带星号的命令表示修改弹性长度(|skip| 类型,目前未涉及)。 +% 默认长度值可以参见 \ref{subsubsec:constant-length} 节。 +% \end{function} +% +% 譬如,将封面页填写个人信息的横线加长,示例如下: +% +% \begin{latexexample}[moretexcs={\njusetlength}] +% \njusetlength{coveruline}{330pt} +% \end{latexexample} +% +% \subsubsection{样式} +% \label{subsubsec:modify-format} +% +% \begin{function}{\njusetformat} +% \begin{syntax} +% \tn{njusetformat} = \marg{名称}\marg{样式} +% \end{syntax} +% 修改样式。默认样式可以参见 \ref{subsubsec:constant-format} 节。 +% \end{function} +% +% 譬如,将章标题字号加大到小二号,示例如下: +% +% \begin{latexexample}[moretexcs={\njusetformat,\zihao}] +% \njusetformat{chapter}{\zihao{-2}\normalfont\sffamily\centering} +% \end{latexexample} +% +% % \subsection{视觉识别系统} % -% 视觉识别系统 \pkg{njuvisual} 现已被分离为独立宏包\cite{njuvisual},基本使用方法举例如下: +% 视觉识别系统 \pkg{njuvisual} 现已被分离为独立宏包\cite{njuvisual}, +% 基本使用方法举例如下: % \begin{latexexample}[moretexcs={\njuemblem,\njuname,\njuname*}] % \njuemblem{!}{3cm} % 生成高 3cm 的紫色校徽 % \njuname{4cm}{!} % 生成宽 4cm 的紫色中文校名 @@ -1884,6 +2003,7 @@ To produce the documentation run the original source files ending with % \item \pkg{fandol}、\pkg{tex-gyre} 和 \pkg{tex-gyre-math},提供自由字体。 % \item \pkg{emptypage},在双面模式下清空空白页的页眉、页脚和页码。 % \item \pkg{njuvisual},用于绘制封面的校名校徽。 +% \item \pkg{tabularray},用于绘制研究生的出版授权书信息表格。 % \item \pkg{xeCJKfntef} 或 \pkg{lua-ul},用于在对应引擎下绘制下划线。 % \end{itemize} % @@ -2174,37 +2294,40 @@ To produce the documentation run the original source files ending with % % 在变量名称中,|l| 代表局部变量,|g| 代表全局变量,|c| 代表常量,最后一个下划线后的内容指示其类型。 % -% \begin{variable}{\l_@@_tmp_box,\l_@@_tmp_clist,\l_@@_tmp_dim, -% \l_@@_tmp_int,\l_@@_tmp_seq,\l_@@_tmp_tl} +% \begin{variable}{\l_@@_tmp_box,\l_@@_tmp_clist, +% \l_@@_tmpa_dim,\l_@@_tmpb_dim,\l_@@_tmp_int, +% \l_@@_tmp_seq,\l_@@_tmpa_tl,\l_@@_tmpb_tl} % 临时变量。 % \begin{macrocode} \box_new:N \l_@@_tmp_box \clist_new:N \l_@@_tmp_clist -\dim_new:N \l_@@_tmp_dim +\dim_new:N \l_@@_tmpa_dim +\dim_new:N \l_@@_tmpb_dim \int_new:N \l_@@_tmp_int \seq_new:N \l_@@_tmp_seq -\tl_new:N \l_@@_tmp_tl +\tl_new:N \l_@@_tmpa_tl +\tl_new:N \l_@@_tmpb_tl % \end{macrocode} % \end{variable} % % \begin{variable}{\g_@@_info_degree_int, -% \l_@@_info_diploma_int,\g_@@_info_type_int} +% \g_@@_info_diploma_int,\g_@@_info_type_int} % 用于存储学位类型的变量。 % \begin{macrocode} \int_new:N \g_@@_info_degree_int -\int_new:N \l_@@_info_diploma_int +\int_new:N \g_@@_info_diploma_int \int_new:N \g_@@_info_type_int % \end{macrocode} % \end{variable} % -% \begin{variable}{\l_@@_info_degree_tl,\l_@@_info_diploma_tl, -% \l_@@_info_type_tl,\l_@@_info_type_en_tl} +% \begin{variable}{\g_@@_info_degree_tl,\g_@@_info_diploma_tl, +% \g_@@_info_type_tl,\g_@@_info_type_en_tl} % 用于存储学位名称的变量。 % \begin{macrocode} -\tl_new:N \l_@@_info_degree_tl -\tl_new:N \l_@@_info_diploma_tl -\tl_new:N \l_@@_info_type_tl -\tl_new:N \l_@@_info_type_en_tl +\tl_new:N \g_@@_info_degree_tl +\tl_new:N \g_@@_info_diploma_tl +\tl_new:N \g_@@_info_type_tl +\tl_new:N \g_@@_info_type_en_tl % \end{macrocode} % \end{variable} % @@ -2223,11 +2346,11 @@ To produce the documentation run the original source files ending with % \end{macrocode} % \end{variable} % -% \begin{variable}{\l_@@_info_supv_full_tl,\l_@@_info_supv_full_en_tl} +% \begin{variable}{\g_@@_info_supvfull_tl,\g_@@_info_supvfull_en_tl} % 用于存储导师姓名加职称的变量。 % \begin{macrocode} -\tl_new:N \l_@@_info_supv_full_tl -\tl_new:N \l_@@_info_supv_full_en_tl +\tl_new:N \g_@@_info_supvfull_tl +\tl_new:N \g_@@_info_supvfull_en_tl % \end{macrocode} % \end{variable} % @@ -2253,13 +2376,13 @@ To produce the documentation run the original source files ending with % \end{macrocode} % \end{variable} % -% \begin{variable}{\l_@@_info_sm_date_tl,\l_@@_info_sm_date_en_tl, -% \l_@@_info_df_date_tl} +% \begin{variable}{\g_@@_info_submitdate_tl,\g_@@_info_submitdate_en_tl, +% \g_@@_info_defenddate_tl} % 用于存储格式化后的论文提交日期和答辩日期的变量。 % \begin{macrocode} -\tl_new:N \l_@@_info_sm_date_tl -\tl_new:N \l_@@_info_sm_date_en_tl -\tl_new:N \l_@@_info_df_date_tl +\tl_new:N \g_@@_info_submitdate_tl +\tl_new:N \g_@@_info_submitdate_en_tl +\tl_new:N \g_@@_info_defenddate_tl % \end{macrocode} % \end{variable} % @@ -2275,17 +2398,17 @@ To produce the documentation run the original source files ending with % \end{macrocode} % \end{variable} % -% \begin{variable}{\c_@@_name_type_clist,\c_@@_name_type_en_clist, -% \c_@@_name_degree_clist,\c_@@_name_degree_en_clist} +% \begin{variable}{\g_@@_name_type_clist,\g_@@_name_type_en_clist, +% \g_@@_name_degree_clist,\g_@@_name_degree_en_clist} % 论文类型与学位类型。 % \begin{macrocode} -\clist_const:Nn \c_@@_name_type_clist +\clist_const:Nn \g_@@_name_type_clist { 毕业论文, 毕业设计 } -\clist_const:Nn \c_@@_name_type_en_clist +\clist_const:Nn \g_@@_name_type_en_clist { THESIS, DESIGN } -\clist_const:Nn \c_@@_name_degree_clist +\clist_const:Nn \g_@@_name_degree_clist { 学士, 硕士, 硕士专业, 博士 } -\clist_const:Nn \c_@@_name_degree_en_clist +\clist_const:Nn \g_@@_name_degree_en_clist { Bachelor, Master, Master, Doctor~of~Philosophy } % \end{macrocode} % \end{variable} @@ -2315,8 +2438,8 @@ To produce the documentation run the original source files ending with % \begin{macro}{\@@_vskip:,\@@_hskip:} % 生成一个较小的 skip。 % \begin{macrocode} -\cs_new:Nn \@@_vskip: { \skip_vertical:n { 1 ex } } -\cs_new:Nn \@@_hskip: { \skip_horizontal:n { 0.3 em } } +\cs_new:Nn \@@_vskip: { \skip_vertical:N \g_@@_smallvskip_dim } +\cs_new:Nn \@@_hskip: { \skip_horizontal:N \g_@@_smallhskip_dim } % \end{macrocode} % \end{macro} % @@ -2338,11 +2461,43 @@ To produce the documentation run the original source files ending with % 用来定义默认名称的辅助函数。 % \begin{macrocode} \cs_new_protected:Npn \@@_define_name:nn #1#2 - { \tl_const:cn { c_@@_name_ #1 _tl } { #2 } } + { + \tl_new:c { g_@@_name_ #1 _tl } + \tl_gset:cn { g_@@_name_ #1 _tl } { #2 } + } \cs_new_protected:Npn \@@_define_name:nnn #1#2#3 { - \tl_const:cn { c_@@_name_ #1 _tl } { #2 } - \tl_const:cn { c_@@_name_ #1 _en_tl } { #3 } + \tl_new:c { g_@@_name_ #1 _tl } + \tl_gset:cn { g_@@_name_ #1 _tl } { #2 } + \tl_new:c { g_@@_name_ #1 _en_tl } + \tl_gset:cn { g_@@_name_ #1 _en_tl } { #3 } + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@@_define_fmt:nn} +% 用来定义默认样式的辅助函数。 +% \begin{macrocode} +\cs_new_protected:Npn \@@_define_fmt:nn #1#2 + { + \tl_new:c { g_@@_fmt_ #1 _tl } + \tl_gset:cn { g_@@_fmt_ #1 _tl } { #2 } + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@@_define_dim:nn,\@@_define_skip:nn} +% 用来定义默认间距的辅助函数。 +% \begin{macrocode} +\cs_new_protected:Npn \@@_define_dim:nn #1#2 + { + \dim_new:c { g_@@_ #1 _dim } + \dim_gset:cn { g_@@_ #1 _dim } { #2 } + } +\cs_new_protected:Npn \@@_define_skip:nn #1#2 + { + \skip_new:c { g_@@_ #1 _skip } + \skip_gset:cn { g_@@_ #1 _skip } { #2 } } % \end{macrocode} % \end{macro} @@ -2361,8 +2516,8 @@ To produce the documentation run the original source files ending with % \begin{macro}{\@@_name:n,\@@_info:n} % 根据变量名调用名称和内容信息。 % \begin{macrocode} -\cs_new:Npn \@@_name:n #1 { \tl_use:c { c_@@_name_ #1 _tl } } -\cs_new:Npn \@@_info:n #1 { \tl_use:c { l_@@_info_ #1 _tl } } +\cs_new:Npn \@@_name:n #1 { \tl_use:c { g_@@_name_ #1 _tl } } +\cs_new:Npn \@@_info:n #1 { \tl_use:c { g_@@_info_ #1 _tl } } % \end{macrocode} % \end{macro} % @@ -2434,10 +2589,10 @@ To produce the documentation run the original source files ending with % \begin{macrocode} \cs_new_protected:Npn \@@_put_inempty_seg:nnn #1#2#3 { - \tl_set:Nx \l_@@_tmp_tl + \tl_set:Nx \l_@@_tmpa_tl { \tl_range:Nnn { #1 } { #2 } { #2 + #3 - 1 } } - \tl_if_empty:NF \l_@@_tmp_tl - { \clist_put_right:NV \l_@@_tmp_clist { \l_@@_tmp_tl } } + \tl_if_empty:NF \l_@@_tmpa_tl + { \clist_put_right:NV \l_@@_tmp_clist { \l_@@_tmpa_tl } } } % \end{macrocode} % \end{macro} @@ -2572,49 +2727,53 @@ To produce the documentation run the original source files ending with } % \end{macrocode} % -% \begin{macro}{\@@_split_title:n,\@@_split_title:V} -% 分割标题。 +% \begin{macro}{\@@_uline_title:} +% \changes{v0.17}{2022/04/09}{优化封面标题的断行方式。} +% 多行带下划线标题。使用 \hologo{TeX} 原生断行算法实现。 % \begin{macrocode} -\cs_new_protected:Npn \@@_split_title:n #1 +\cs_new_protected:Npn \@@_uline_title: { - \tl_if_in:nnTF { #1 } { \\ } - { -% \end{macrocode} -% 从 |\\| 进行分割,存入 |clist|。 -% \begin{macrocode} - \seq_set_split:Nnn \l_@@_tmp_seq { \\ } { #1 } - \clist_set_from_seq:NN \l_@@_tmp_clist \l_@@_tmp_seq - } - { -% \end{macrocode} -% 如果没找到换行符,则手动从固定宽度的位置进行分割。 -% \begin{macrocode} - \@@_put_inempty_seg:nnn { #1 } { 1 } { 15 } - \@@_put_inempty_seg:nnn { #1 } { 16 } { 15 } - \@@_put_inempty_seg:nnn { #1 } { 31 } { 15 } + \setbox0 = \vbox{ + \leftskip=0.5em plus 1 fill + \rightskip=\leftskip \parskip=1cm + \parindent=\z@ \g_@@_info_title_tl \par + \global\setbox2=\hbox{} + \loop + \setbox1=\lastbox \unskip\unpenalty + \unless\ifvoid1 + \global\setbox2=\hbox{\@@_uline_box:\penalty0\unhbox2} + \repeat } + { \noindent \unhbox2 \par } } -\cs_generate_variant:Nn \@@_split_title:n { V } % \end{macrocode} % \end{macro} % -% \begin{macro}{\@@_multiline_title:nnn} -% 生成多行标题。 +% \begin{macro}{\@@_cover_entry_title:nnn} +% 生成普通封面页的标题条目,包括标签和标题本身。 % \begin{arguments} % \item 内容格式 % \item 名称盒子宽度,|dim| 型变量 % \item 内容盒子宽度,|dim| 型变量 % \end{arguments} % \begin{macrocode} -\cs_new_protected:Npn \@@_multiline_title:nnn #1#2#3 +\cs_new_protected:Npn \@@_cover_entry_title:nnn #1#2#3 { - \tl_if_empty:NT \l_@@_info_title_tl + \tl_if_empty:NT \g_@@_info_title_tl { \msg_error:nn { njuthesis } { missing-title } } - \@@_split_title:V \l_@@_info_title_tl - \@@_spread_box:nnV { #2 } { \kaishu } \c_@@_name_title_tl - \@@_hskip: - \clist_map_inline:Nn \l_@@_tmp_clist - { \@@_ulined_center_box:nn { #3 } { #1 ##1 } \@@_vskip: } + \@@_spread_box:nnV { #2 } { \kaishu } \g_@@_name_title_tl + \mode_leave_vertical: \@@_hskip: +% \end{macrocode} +% 这里需要存储 \tn{baselineskip} 的值,以使 \tn{parbox} 后行距正确。 +% \footnote{\url{https://tex.stackexchange.com/questions/34971/how-to-keep-a-constant-baselineskip-when-using-minipages-or-parboxes}} +% \begin{macrocode} + \parbox [ t ] { #3 } + { + \dim_set_eq:NN \baselineskip \g_@@_coverlineskip_dim + #1 \@@_uline_title: + \dim_set_eq:NN \l_@@_tmpa_dim \prevdepth + } + \par \prevdepth \l_@@_tmpa_dim } % \end{macrocode} % \end{macro} @@ -2632,7 +2791,7 @@ To produce the documentation run the original source files ending with \@@_spread_box:nnx { #2 } { \kaishu } { \@@_name:n { #1 } } \@@_hskip: \@@_ulined_center_box:nn { #3 } { \@@_info:n { #1 } } - \@@_vskip: + \par } % \end{macrocode} % \end{macro} @@ -2651,16 +2810,16 @@ To produce the documentation run the original source files ending with \@@_spread_box:nnx { #3 } { \kaishu } { \@@_name:n { #1 } } \@@_hskip: \@@_ulined_center_box:nn { #4 } { \@@_info:n { #1 } } - \skip_horizontal:n { 0.5 em } + \@@_hskip: \@@_spread_box:nnx { #3 } { \kaishu } { \@@_name:n { #2 } } \@@_hskip: \@@_ulined_center_box:nn { #4 } { \@@_info:n { #2 } } - \@@_vskip: + \par } % \end{macrocode} % \end{macro} % -% \begin{macro}{\@@_cover_supv_entry:nnn} +% \begin{macro}{\@@_cover_entry_supv:nnn} % 生成两项导师信息条目,仅用于本科生封面。 % \begin{arguments} % \item 条目名称 @@ -2668,18 +2827,18 @@ To produce the documentation run the original source files ending with % \item 短内容盒子宽度,|dim| 型变量 % \end{arguments} % \begin{macrocode} -\cs_new_protected:Npn \@@_cover_supv_entry:nnn #1#2#3 +\cs_new_protected:Npn \@@_cover_entry_supv:nnn #1#2#3 { \@@_spread_box:nnx { #2 } { \kaishu } { \@@_name:n { #1 } } \@@_hskip: \@@_ulined_center_box:nn { #3 } - { \clist_item:cn { l_@@_info_ #1 _clist } { 1 } } - \skip_horizontal:n { 0.5 em } - \@@_spread_box:nnV { #2 } { \kaishu } \c_@@_name_supv_ttl_tl + { \clist_item:cn { g_@@_info_ #1 _clist } { 1 } } + \@@_hskip: + \@@_spread_box:nnV { #2 } { \kaishu } \g_@@_name_supv_ttl_tl \@@_hskip: \@@_ulined_center_box:nn { #3 } - { \clist_item:cn { l_@@_info_ #1 _clist } { 2 } } - \@@_vskip: + { \clist_item:cn { g_@@_info_ #1 _clist } { 2 } } + \par } % \end{macrocode} % \end{macro} @@ -2710,8 +2869,8 @@ To produce the documentation run the original source files ending with % \begin{macrocode} \cs_new_protected:Npn \@@_abs_title:n #1 { - \@@_get_text_width:Nn \l_@@_tmp_dim {#1} - \@@_uuline:n { \l_@@_tmp_dim } #1 + \@@_get_text_width:Nn \l_@@_tmpa_dim {#1} + \@@_uuline:n { \l_@@_tmpa_dim } #1 } \cs_generate_variant:Nn \@@_abs_title:n { V } % \end{macrocode} @@ -2752,7 +2911,7 @@ To produce the documentation run the original source files ending with \cs_new_protected:Npn \@@_uline_list:nnn #1#2#3 { \hbox_set:Nn \l_@@_tmp_box {#1} - \setbox0=\vbox{\hangindent=\wd\l_@@_tmp_box \hangafter=-1 + \setbox0 = \vbox{\hangindent=\wd\l_@@_tmp_box \hangafter=-1 \leftskip=#3 \rightskip=\leftskip \parindent=\z@ #2\par \global\setbox2=\hbox{} \int_gzero:N \l_@@_tmp_int @@ -2794,7 +2953,13 @@ To produce the documentation run the original source files ending with % % 本模板使用 \pkg{xtemplate} 提供的面向对象方法简化封面和摘要的绘制过程。 % -% 以下分别从页面元素(element)和页面整体(page)的层次进行了抽象。当我们把页面部件考虑为一个对象时,它天然地只具备有限数量的属性:内容、格式、边距、对齐方式等。而具体的页面是这些对象的实例的集合,附加边距、行距等属性,创建页面只需传入一个列表调用各个 Instance 即可。通过 \pkg{xtemplate} 提供的功能,我们可以根据这些属性创建模板(template),进而能大量构建具有\emph{相似行为}的实例(instance)。这种做法能充分分离内容和样式,极大优化代码的可读性。 +% 以下分别从页面元素(element)和页面整体(page)的层次进行了抽象。 +% 当我们把页面部件考虑为一个对象时,它天然地只具备有限数量的属性: +% 内容、格式、边距、对齐方式等。而具体的页面是这些对象的实例的集合, +% 附加边距、行距等属性,创建页面只需传入一个列表调用各个 Instance +% 即可。通过 \pkg{xtemplate} 提供的功能,我们可以根据这些属性创建模板 +% (template),进而能大量构建具有\emph{相似行为}的实例(instance)。 +% 这种做法能充分分离内容和样式,极大优化代码的可读性。 % % 声明对象类型。此类对象不需要参数。 % \begin{macrocode} @@ -2807,7 +2972,8 @@ To produce the documentation run the original source files ending with % \end{macrocode} % % 声明页面元素模板接口。 -% 元素是一个页面的基本组成单位,包括文段、图片等等。一个抽象的元素应当具备以下属性: +% 元素是一个页面的基本组成单位,包括文段、图片等等。 +% 一个抽象的元素应当具备以下属性: % \begin{description} % \item[\opt{content}] 内容,即剥离样式的元素本身 % \item[\opt{format}] 格式,例如字号、字体 @@ -2962,9 +3128,10 @@ To produce the documentation run the original source files ending with % \changes{v0.13}{2021/12/15}{新增诚信承诺书选项。} % \changes{v0.14}{2022/01/06}{修改选项名称。} % 是否需要诚信承诺书或原创性声明(默认关闭)。 -% \footnote{原创性声明的英文翻译为 Declaration of Originality,为了使选项表义更清晰同时缩减名称长度,将其修改为“声明页”这一名称。} +% \footnote{原创性声明的英文翻译为 Declaration of Originality, +% 为了使选项表义更清晰同时缩减名称长度,将其修改为“声明页”这一名称。} % \begin{macrocode} - decl-page .bool_set:N = \g_@@_orig_decl_bool, + decl-page .bool_set:N = \g_@@_decl_bool, decl-page .initial:n = false, % \end{macrocode} % \end{macro} @@ -3038,6 +3205,62 @@ To produce the documentation run the original source files ending with % \end{macrocode} % \end{macro} % +% \begin{macro}{\njusetformat} +% \changes{v0.17}{2022/04/09}{提供修改默认样式的接口。} +% 定义修改固定文本的接口。 +% \begin{macrocode} +\NewDocumentCommand \njusetformat { m m } + { \tl_gset:cn { g_@@_fmt_ #1 _tl } { #2 } } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\njusetlength,\njusetlength*} +% \changes{v0.17}{2022/04/09}{提供修改长度值的接口。} +% 定义修改长度值的接口。可选星号表示修改弹性长度。 +% \begin{macrocode} +\NewDocumentCommand \njusetlength { s m m } + { + \bool_if:nTF { #1 } + { \skip_gset:cn { g_@@_ #2 _skip } { #3 } } + { \dim_gset:cn { g_@@_ #2 _dim } { #3 } } + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\njusetname,\njusetname*,\njusettext,\njusettext*} +% \changes{v0.17}{2022/04/01}{提供修改固定文本的接口。} +% 定义修改固定文本的接口。 +% \begin{macrocode} +\NewDocumentCommand \njusetname { s m o m } + { \@@_set_tokenlist:nnnnn {#1} {#2} {#3} {#4} { name } } +\NewDocumentCommand \njusettext { s m o m } + { \@@_set_tokenlist:nnnnn {#1} {#2} {#3} {#4} { text } } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@@_set_tokenlist:nnnnn} +% 用于修改名称、文字常量的辅助函数。 +% \begin{arguments} +% \item 是否含有可选星号,传入 |bool| 型变量 +% \item 被修改变量名称 +% \item 可选的变体,用字母标记 +% \item 修改后的内容 +% \item 类别,name 或者 text +% \end{arguments} +% \begin{macrocode} +\cs_new_protected:Npn \@@_set_tokenlist:nnnnn #1#2#3#4#5 + { + \tl_if_novalue:nTF { #3 } + { \tl_clear:N \l_@@_tmpa_tl } + { \tl_set:Nn \l_@@_tmpa_tl { _ #3 } } + \bool_if:nTF { #1 } + { \tl_set:Nn \l_@@_tmpb_tl { _en } } + { \tl_clear:N \l_@@_tmpb_tl } + \tl_gset:cn { g_@@_ #5 _ #2 \l_@@_tmpa_tl \l_@@_tmpb_tl _tl } {#4} + } +% \end{macrocode} +% \end{macro} +% % % \subsection{载入宏包} % @@ -3163,6 +3386,14 @@ To produce the documentation run the original source files ending with % \end{macrocode} % \end{macro} % +% 使用 \pkg{tabularray} 绘制研究生的出版授权书。 +% \begin{macrocode} +\bool_lazy_and:nnT + { \g_@@_decl_bool } + { !\int_compare_p:n { \g_@@_info_degree_int == 1 } } + { \RequirePackage { tabularray } } +% \end{macrocode} +% % \begin{macro}{\@@_check_package:nnn} % 检查过时宏包。 % \begin{macrocode} @@ -3233,9 +3464,9 @@ To produce the documentation run the original source files ending with % \changes{v0.14}{2022/01/14}{将标题断行控制符修改为 |\\|。} % 题目。中文题目可使用 |\\| 手动断行。以下标注星号(|*|)的皆为对应的英文字段。 % \begin{macrocode} - title .tl_set:N = \l_@@_info_title_tl, + title .tl_set:N = \g_@@_info_title_tl, title .initial:n = { 空 }, - title* .tl_set:N = \l_@@_info_title_en_tl, + title* .tl_set:N = \g_@@_info_title_en_tl, title* .initial:n = { Empty }, % \end{macrocode} % \end{macro} @@ -3244,30 +3475,30 @@ To produce the documentation run the original source files ending with % \changes{v0.11}{2021/10/01}{修改了添加关键词的方式。} % 关键词列表。 % \begin{macrocode} - keywords .clist_set:N = \l_@@_info_keywords_clist, - keywords* .clist_set:N = \l_@@_info_keywords_en_clist, + keywords .clist_set:N = \g_@@_info_keywords_clist, + keywords* .clist_set:N = \g_@@_info_keywords_en_clist, % \end{macrocode} % \end{macro} % % \begin{macro}{info/grade,info/student-id,info/author,info/author*} % 年级、学号、姓名。 % \begin{macrocode} - grade .tl_set:N = \l_@@_info_grade_tl, - student-id .tl_set:N = \l_@@_info_id_tl, - author .tl_set:N = \l_@@_info_author_tl, - author* .tl_set:N = \l_@@_info_author_en_tl, + grade .tl_set:N = \g_@@_info_grade_tl, + student-id .tl_set:N = \g_@@_info_id_tl, + author .tl_set:N = \g_@@_info_author_tl, + author* .tl_set:N = \g_@@_info_author_en_tl, % \end{macrocode} % \end{macro} % % \begin{macro}{info/department,info/department*,info/major,info/major*,info/field,info/field*} % 院系、专业、方向。 % \begin{macrocode} - department .tl_set:N = \l_@@_info_dept_tl, - department* .tl_set:N = \l_@@_info_dept_en_tl, - major .tl_set:N = \l_@@_info_major_tl, - major* .tl_set:N = \l_@@_info_major_en_tl, - field .tl_set:N = \l_@@_info_field_tl, - field* .tl_set:N = \l_@@_info_field_en_tl, + department .tl_set:N = \g_@@_info_dept_tl, + department* .tl_set:N = \g_@@_info_dept_en_tl, + major .tl_set:N = \g_@@_info_major_tl, + major* .tl_set:N = \g_@@_info_major_en_tl, + field .tl_set:N = \g_@@_info_field_tl, + field* .tl_set:N = \g_@@_info_field_en_tl, % \end{macrocode} % \end{macro} % @@ -3276,16 +3507,16 @@ To produce the documentation run the original source files ending with % \changes{v0.14}{2022/01/12}{精简导师信息选项。} % 导师信息。中文导师全称使用 |clist| 存储,便于在本科生封面中进行分割。 % \begin{macrocode} - supervisor .clist_set:N = \l_@@_info_supv_clist, - supervisor* .tl_set:N = \l_@@_info_supv_en_tl, + supervisor .clist_set:N = \g_@@_info_supv_clist, + supervisor* .tl_set:N = \g_@@_info_supv_en_tl, % \end{macrocode} % \end{macro} % % \begin{macro}{info/supervisor-ii,info/supervisor-ii*} % 第二导师信息。 % \begin{macrocode} - supervisor-ii .clist_set:N = \l_@@_info_supv_ii_clist, - supervisor-ii* .tl_set:N = \l_@@_info_supv_ii_en_tl, + supervisor-ii .clist_set:N = \g_@@_info_supv_ii_clist, + supervisor-ii* .tl_set:N = \g_@@_info_supv_ii_en_tl, % \end{macrocode} % \end{macro} % @@ -3293,7 +3524,7 @@ To produce the documentation run the original source files ending with % \changes{v0.14}{2022/01/14}{精简提交日期选项。} % 提交日期,初始值为编译当天日期。 % \begin{macrocode} - submit-date .tl_set:N = \l_@@_info_sm_date_raw_tl, + submit-date .tl_set:N = \g_@@_info_submitdate_raw_tl, submit-date .initial:V = \c_@@_today_tl, % \end{macrocode} % \end{macro} @@ -3302,7 +3533,7 @@ To produce the documentation run the original source files ending with % \changes{v0.14}{2022/01/14}{精简答辩日期选项。} % 答辩日期。 % \begin{macrocode} - defend-date .tl_set:N = \l_@@_info_df_date_raw_tl, + defend-date .tl_set:N = \g_@@_info_defenddate_raw_tl, defend-date .initial:V = \c_@@_today_tl, % \end{macrocode} % \end{macro} @@ -3310,18 +3541,26 @@ To produce the documentation run the original source files ending with % \begin{macro}{info/defend-date,info/chairman,info/reviewer} % 答辩委员会信息。 % \begin{macrocode} - chairman .tl_set:N = \l_@@_info_chairman_tl, - reviewer .clist_set:N = \l_@@_info_reviewer_clist, + chairman .tl_set:N = \g_@@_info_chairman_tl, + reviewer .clist_set:N = \g_@@_info_reviewer_clist, % \end{macrocode} % \end{macro} % % \begin{macro}{info/clc,info/secret-level,info/udc,info/supervisor-contact} % 国家图书馆封面相关信息。 % \begin{macrocode} - clc .tl_set:N = \l_@@_info_clc_tl, - secret-level .tl_set:N = \l_@@_info_seclv_tl, - udc .tl_set:N = \l_@@_info_udc_tl, - supervisor-contact .tl_set:N = \l_@@_info_supv_cont_tl, + clc .tl_set:N = \g_@@_info_clc_tl, + secret-level .tl_set:N = \g_@@_info_secretlv_tl, + udc .tl_set:N = \g_@@_info_udc_tl, + supervisor-contact .tl_set:N = \g_@@_info_supv_cont_tl, +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{info/email} +% \changes{v0.14}{2022/01/12}{新增电邮地址信息项。} +% 用于学位论文出版授权书的电子邮件地址。 +% \begin{macrocode} + email .tl_set:N = \g_@@_info_email_tl } % \end{macrocode} % \end{macro} @@ -3330,24 +3569,24 @@ To produce the documentation run the original source files ending with % 设置学位信息。该设置需要放在 \cs{ProcessKeysOptions} % 命令以及载入配置文件中的常量信息后进行。 % \begin{macrocode} -\tl_set:Nx \l_@@_info_degree_tl +\tl_set:Nx \g_@@_info_degree_tl { - \clist_item:Nn \c_@@_name_degree_clist + \clist_item:Nn \g_@@_name_degree_clist { \g_@@_info_degree_int } } \int_compare:nTF { \g_@@_info_degree_int == 1 } - { \tl_set:Nn \l_@@_info_diploma_tl { ug } } - { \tl_set:Nn \l_@@_info_diploma_tl { g } } + { \tl_set:Nn \g_@@_info_diploma_tl { ug } } + { \tl_set:Nn \g_@@_info_diploma_tl { g } } % \end{macrocode} % % 设置类型信息。 % \begin{macrocode} -\tl_set:Nx \l_@@_info_type_tl - { \clist_item:Nn \c_@@_name_type_clist { \g_@@_info_type_int } } -\tl_set:Nx \l_@@_info_type_en_tl - { \clist_item:Nn \c_@@_name_type_en_clist { \g_@@_info_type_int } } -\tl_put_left:Nx \l_@@_info_type_tl - { \tl_use:c { c_@@_name_ \l_@@_info_diploma_tl _tl } } +\tl_set:Nx \g_@@_info_type_tl + { \clist_item:Nn \g_@@_name_type_clist { \g_@@_info_type_int } } +\tl_set:Nx \g_@@_info_type_en_tl + { \clist_item:Nn \g_@@_name_type_en_clist { \g_@@_info_type_int } } +\tl_put_left:Nx \g_@@_info_type_tl + { \tl_use:c { g_@@_name_ \g_@@_info_diploma_tl _tl } } % \end{macrocode} % % \changes{v0.15}{2022/01/22}{正确处理双导师信息。} @@ -3360,44 +3599,44 @@ To produce the documentation run the original source files ending with % 拼合双导师的姓名和职称。 % \begin{macrocode} \bool_set:Nn \l_@@_second_supv_bool - { ! \clist_if_empty_p:N \l_@@_info_supv_ii_clist } - \tl_set:Nx \l_@@_info_supv_full_tl + { ! \clist_if_empty_p:N \g_@@_info_supv_ii_clist } + \tl_set:Nx \g_@@_info_supvfull_tl { - \clist_use:Nn \l_@@_info_supv_clist { \@@_hskip: } + \clist_use:Nn \g_@@_info_supv_clist { \@@_hskip: } \bool_if:NT \l_@@_second_supv_bool { \@@_quad: - \clist_use:Nn \l_@@_info_supv_ii_clist { \@@_hskip: } + \clist_use:Nn \g_@@_info_supv_ii_clist { \@@_hskip: } } } - \tl_set:Nx \l_@@_info_supv_full_en_tl + \tl_set:Nx \g_@@_info_supvfull_en_tl { - \l_@@_info_supv_en_tl + \g_@@_info_supv_en_tl \bool_if:NT \l_@@_second_supv_bool - { \@@_quad: \l_@@_info_supv_ii_en_tl } + { \@@_quad: \g_@@_info_supv_ii_en_tl } } % \end{macrocode} % 将 ISO 格式的原始日期字符串格式化为中文日期表示,该字符串需要进行展开。 % \begin{macrocode} - \tl_set:Nn \l_@@_info_sm_date_tl + \tl_set:Nn \g_@@_info_submitdate_tl { \exp_last_unbraced:NV - \@@_date:www \l_@@_info_sm_date_raw_tl \q_stop + \@@_date:www \g_@@_info_submitdate_raw_tl \q_stop } % \end{macrocode} % 英文提交日期以及答辩日期仅用于研究生封面。 % \begin{macrocode} \int_compare:nF { \g_@@_info_degree_int == 1 } { - \tl_set:Nn \l_@@_info_sm_date_en_tl + \tl_set:Nn \g_@@_info_submitdate_en_tl { \exp_last_unbraced:NV - \@@_date_en:www \l_@@_info_sm_date_raw_tl \q_stop + \@@_date_en:www \g_@@_info_submitdate_raw_tl \q_stop } - \tl_set:Nn \l_@@_info_df_date_tl + \tl_set:Nn \g_@@_info_defenddate_tl { \exp_last_unbraced:NV - \@@_date:www \l_@@_info_df_date_raw_tl \q_stop + \@@_date:www \g_@@_info_defenddate_raw_tl \q_stop } } } @@ -3866,9 +4105,9 @@ To produce the documentation run the original source files ending with % 对 \pkg{fancyhdr} 的命令进行包装,便于设置页眉页脚。 % \begin{macrocode} \cs_new_protected:Npn \@@_header:nn #1#2 - { \fancyhead [#1] { \g_@@_header_format_tl #2 } } + { \fancyhead [#1] { \g_@@_header_format_tl \nouppercase {#2} } } \cs_new_protected:Npn \@@_footer:nn #1#2 - { \fancyfoot [#1] { \g_@@_footer_format_tl #2 } } + { \fancyfoot [#1] { \g_@@_footer_format_tl \nouppercase {#2} } } % \end{macrocode} % \end{macro} % @@ -3947,18 +4186,11 @@ To produce the documentation run the original source files ending with % % \subsection{章节标题格式} % -% \begin{macro}{\c_@@_sec_format_tl} -% 各部分章节以及目录中章标题的格式。设置为四号、不加粗、黑体。 -% \begin{macrocode} -\tl_const:Nn \c_@@_sec_format_tl { \large \normalfont \sffamily } -% \end{macrocode} -% \end{macro} -% % \begin{macro}{\@@_add_tocline:n,\@@_add_tocline:V} -% 添加目录条目。 +% 为无编号章添加目录条目,需手动指定格式为四号、不加粗、黑体。 % \begin{macrocode} \cs_new_protected:Npn \@@_add_tocline:n #1 - { \addcontentsline { toc } { chapter } { \c_@@_sec_format_tl #1 } } + { \addcontentsline { toc } { chapter } { \g_@@_fmt_chapterintoc_tl #1 } } \cs_generate_variant:Nn \@@_add_tocline:n { V } % \end{macrocode} % \end{macro} @@ -4002,10 +4234,10 @@ To produce the documentation run the original source files ending with { chapter / beforeskip = 10 pt, chapter / afterskip = 60 pt, - chapter / format = \c_@@_sec_format_tl \centering, - section / format = \c_@@_sec_format_tl, - subsection / format = \c_@@_sec_format_tl, - subsubsection / format = \c_@@_sec_format_tl, + chapter / format = \g_@@_fmt_chapter_tl, + section / format = \g_@@_fmt_section_tl, + subsection / format = \g_@@_fmt_subsection_tl, + subsubsection / format = \g_@@_fmt_subsubsection_tl, % \end{macrocode} % % @@ -4014,13 +4246,13 @@ To produce the documentation run the original source files ending with % % 设置目录标题默认名称。 % \begin{macrocode} - contentsname = { 目\hspace{2em}录 }, - listfigurename = { 插图目录 }, - listtablename = { 表格目录 }, + contentsname = \g_@@_name_tableofcontents_tl, + listfigurename = \g_@@_name_listoffigures_tl, + listtablename = \g_@@_name_listoftables_tl, % \end{macrocode} % 设置目录中章标题的样式。 % \begin{macrocode} - chapter / tocline = \c_@@_sec_format_tl \CTEXnumberline { #1 } #2 + chapter / tocline = \g_@@_fmt_chapterintoc_tl \CTEXnumberline { #1 } #2 } % \end{macrocode} % @@ -4047,7 +4279,7 @@ To produce the documentation run the original source files ending with { \group_begin: \keys_set:nn { ctex } - { chapter/format = \centering \zihao { 3 } \bfseries } + { chapter/format = \g_@@_fmt_toctitle_tl } \bool_if:NTF \g_@@_toc_in_toc_bool { \@@_chapter:n { #1 } } { @@ -4229,6 +4461,7 @@ To produce the documentation run the original source files ending with % % 在导言区末尾进行 \pkg{hyperref} 设置。 % \changes{v0.11}{2021/10/01}{写入 PDF 元数据。} +% \changes{v0.17}{2022/04/09}{PDF 书签中不生成额外空格。} % \begin{macrocode} \ctex_at_end_preamble:n { @@ -4236,7 +4469,11 @@ To produce the documentation run the original source files ending with % 忽略 PDF 字符串中的换行符,从而抑制 \pkg{hyperref} 警告。 % \begin{macrocode} \pdfstringdefDisableCommands - { \cs_set_eq:NN \\ \prg_do_nothing: } + { + \cs_set_eq:NN \\ \prg_do_nothing: + \cs_set_eq:NN \quad \prg_do_nothing: + \cs_set_eq:NN \qquad \prg_do_nothing: + } \hypersetup { bookmarksnumbered = true, @@ -4246,10 +4483,10 @@ To produce the documentation run the original source files ending with % \end{macrocode} % 填写 PDF 元信息。 % \begin{macrocode} - pdftitle = \l_@@_info_title_tl, - pdfauthor = \l_@@_info_author_tl, - pdfkeywords = \l_@@_info_keywords_clist, - pdfcreator = \c_@@_name_pdf_creator_tl + pdftitle = \g_@@_info_title_tl, + pdfauthor = \g_@@_info_author_tl, + pdfkeywords = \g_@@_info_keywords_clist, + pdfcreator = \g_@@_name_pdfcreator_tl } } % \end{macrocode} @@ -4345,7 +4582,7 @@ To produce the documentation run the original source files ending with % \footnote{\url{https://tex.stackexchange.com/questions/567135/how-get-box-like-symbol-with-xelatex}}。 % \begin{macrocode} \theoremsymbol { \ensuremath { \mdwhtsquare } } -\newtheorem* { proof } { \c_@@_name_proof_tl } +\newtheorem* { proof } { \g_@@_name_proof_tl } % \end{macrocode} % % 定义普通定理环境,需要排除 \env{proof}。 @@ -4397,7 +4634,7 @@ To produce the documentation run the original source files ending with \@@_declare_element:nn { cover / ug / title } { content = - \@@_spread_box:nnV { 9 em } { \bf } \l_@@_info_type_tl, + \@@_spread_box:nnV { 9 em } { \bf } \g_@@_info_type_tl, format = \zihao { -1 }, bottom-skip = 0 pt plus 1.5 fill } @@ -4410,33 +4647,34 @@ To produce the documentation run the original source files ending with \@@_declare_element:nn { cover / ug / info } { content = - \@@_cover_info_ug:nnn { 4.2 em } { 16 em } { 5.5 em }, + \@@_cover_info_ug:NN \g_@@_coverlabel_dim \g_@@_coveruline_dim, format = \zihao { 3 } } % \end{macrocode} % \end{macro} % -% \begin{macro}{\@@_cover_info_ug:nnn} +% \begin{macro}{\@@_cover_info_ug:NN} % 本科生封面信息栏。 % \begin{arguments} % \item 名称盒子宽度,|dim| 型变量 % \item 长内容盒子宽度,|dim| 型变量 -% \item 短内容盒子宽度,|dim| 型变量 % \end{arguments} +% 短内容盒子的长度值是通过计算得到的。 % \begin{macrocode} -\cs_new_protected:Npn \@@_cover_info_ug:nnn #1#2#3 +\cs_new_protected:Npn \@@_cover_info_ug:NN #1#2 { - \begin{minipage} { #1 + #2 + 0.3 em } - \raggedleft + \begin{minipage} { #1 + #2 + \g_@@_smallhskip_dim } + \dim_set_eq:NN \baselineskip \g_@@_coverlineskip_dim + \dim_set:Nn \l_@@_tmpb_dim { .5 #2 - .5 #1 - \g_@@_smallhskip_dim } \@@_cover_entry:nnn { dept } { #1 } { #2 } \@@_cover_entry:nnn { major } { #1 } { #2 } - \@@_multiline_title:nnn { \bf } { #1 } { #2 } - \@@_cover_bientry:nnnn { grade } { id } { #1 } { #3 } + \@@_cover_entry_title:nnn { \bf } { #1 } { #2 } + \@@_cover_bientry:nnnn { grade } { id } { #1 } { \l_@@_tmpb_dim } \@@_cover_entry:nnn { author } { #1 } { #2 } - \@@_cover_supv_entry:nnn { supv } { #1 } { #3 } + \@@_cover_entry_supv:nnn { supv } { #1 } { \l_@@_tmpb_dim } \bool_if:NT \l_@@_second_supv_bool - { \@@_cover_supv_entry:nnn { supv_ii } { #1 } { #3 } } - \@@_cover_entry:nnn { sm_date } { #1 } { #2 } + { \@@_cover_entry_supv:nnn { supv_ii } { #1 } { \l_@@_tmpb_dim } } + \@@_cover_entry:nnn { submitdate } { #1 } { #2 } \end{minipage} } %</definition-ug> @@ -4476,7 +4714,7 @@ To produce the documentation run the original source files ending with \@@_declare_element:nn { cover / g / type } { content = - \@@_spread_box:nnV { 9 em } { } \l_@@_info_type_tl, + \@@_spread_box:nnV { 9 em } { } \g_@@_info_type_tl, format = \zihao { -1 } \bfseries, bottom-skip = 1 cm } @@ -4488,7 +4726,7 @@ To produce the documentation run the original source files ending with % \begin{macrocode} \@@_declare_element:nn { cover / g / degree } { - content = \c_@@_name_apply_tl, + content = \g_@@_name_apply_tl, format = \zihao { -1 } \bfseries, bottom-skip = 1 cm plus 1.5 fil } @@ -4500,7 +4738,8 @@ To produce the documentation run the original source files ending with % \begin{macrocode} \@@_declare_element:nn { cover / g / info } { - content = \@@_cover_info_g:nn { 6.2 em } { 18 em }, + content = + \@@_cover_info_g:NN \g_@@_coverlabel_dim \g_@@_coveruline_dim, bottom-skip = 0 pt plus 1.5 fil } % \end{macrocode} @@ -4510,23 +4749,23 @@ To produce the documentation run the original source files ending with % 研究封面日期实例。 % \begin{macrocode} \@@_declare_element:nn { cover / g / date } - { content = \l_@@_info_sm_date_tl } + { content = \g_@@_info_submitdate_tl } % \end{macrocode} % \end{macro} % -% \begin{macro}{\@@_cover_info_g:nn} +% \begin{macro}{\@@_cover_info_g:NN} % 研究生封面信息栏。 % \begin{arguments} % \item 名称盒子宽度,|dim| 型变量 % \item 内容盒子宽度,|dim| 型变量 % \end{arguments} % \begin{macrocode} -\cs_new_protected:Npn \@@_cover_info_g:nn #1#2 +\cs_new_protected:Npn \@@_cover_info_g:NN #1#2 { - \begin{minipage} { #1 + #2 + 0.3 em } - \raggedleft - \@@_multiline_title:nnn { } { #1 } { #2 } - \clist_map_inline:nn { author, major, field, supv_full } + \begin{minipage} { #1 + #2 + \g_@@_smallhskip_dim } + \dim_set_eq:NN \baselineskip \g_@@_coverlineskip_dim + \@@_cover_entry_title:nnn { } { #1 } { #2 } + \clist_map_inline:nn { author, major, field, supvfull } { \@@_cover_entry:nnn { ##1 } { #1 } { #2 } } \end{minipage} } @@ -4551,14 +4790,14 @@ To produce the documentation run the original source files ending with % \begin{macrocode} \cs_new_protected:Npn \@@_cover_back_g: { - \@@_spread_box:nnV { 6.2 em } { \kaishu } \c_@@_name_id_tl - { : \@@_quad: } \l_@@_info_id_tl + \@@_spread_box:nnV { 6.2 em } { \kaishu } \g_@@_name_id_tl + { : \@@_quad: } \g_@@_info_id_tl \@@_vskip: - \@@_spread_box:nnV { 6.2 em } { \kaishu } \c_@@_name_df_date_tl - { : \@@_quad: } \l_@@_info_df_date_tl + \@@_spread_box:nnV { 6.2 em } { \kaishu } \g_@@_name_defenddate_tl + { : \@@_quad: } \g_@@_info_defenddate_tl \@@_vskip: - \@@_spread_box:nnV { 6.2 em } { \kaishu } \c_@@_name_supv_full_tl - { : \@@_quad: } \skip_horizontal:n { 8 em } \c_@@_name_sign_tl + \@@_spread_box:nnV { 6.2 em } { \kaishu } \g_@@_name_supvfull_tl + { : \@@_quad: } \skip_horizontal:n { 8 em } \g_@@_name_sign_tl } % \end{macrocode} % \end{macro} @@ -4570,7 +4809,7 @@ To produce the documentation run the original source files ending with % \begin{macrocode} \@@_declare_element:nn { cover / g / en / title } { - content = \l_@@_info_title_en_tl, + content = \g_@@_info_title_en_tl, format = \bf \sffamily \zihao { 2 }, bottom-skip = 2 cm } @@ -4585,11 +4824,11 @@ To produce the documentation run the original source files ending with content = { by } \skip_vertical:N \c_zero_skip - \textbf { \sffamily \l_@@_info_author_en_tl } + \textbf { \sffamily \g_@@_info_author_en_tl } \skip_vertical:n { .5 cm } { Supervised~ by } \skip_vertical:N \c_zero_skip - \textsf { \l_@@_info_supv_full_en_tl }, + \textsf { \g_@@_info_supvfull_en_tl }, format = \zihao { 4 }, bottom-skip = 0 pt plus 1.2 fil } @@ -4602,11 +4841,11 @@ To produce the documentation run the original source files ending with \@@_declare_element:nn { cover / g / en / middle } { content = - \c_@@_cover_en_text_tl \@@_vskip: - \textsc { \clist_item:Nn \c_@@_name_degree_en_clist + \g_@@_text_cover_en_tl \@@_vskip: + \textsc { \clist_item:Nn \g_@@_name_degree_en_clist { \g_@@_info_degree_int } } \@@_vskip: { in } \@@_vskip: - \l_@@_info_major_en_tl, + \g_@@_info_major_en_tl, bottom-skip = 2 cm } % \end{macrocode} @@ -4629,9 +4868,9 @@ To produce the documentation run the original source files ending with \@@_declare_element:nn { cover / g / en / bottom } { content = - \l_@@_info_dept_en_tl \skip_vertical:N \c_zero_skip - \c_@@_name_nju_en_tl \skip_vertical:n { 1 cm } - \l_@@_info_sm_date_en_tl + \g_@@_info_dept_en_tl \skip_vertical:N \c_zero_skip + \g_@@_name_nju_en_tl \skip_vertical:n { 1 cm } + \g_@@_info_submitdate_en_tl } % \end{macrocode} % \end{macro} @@ -4655,9 +4894,9 @@ To produce the documentation run the original source files ending with \@@_declare_element:nn { cover / nl / name } { content = - \@@_spread_box:nnV { 6 em } { } \c_@@_name_title_tl, + \@@_spread_box:nnV { 6 em } { } \g_@@_name_title_tl, format = \zihao { -0 }, - bottom-skip = 0 pt plus 1.2 fil + bottom-skip = 0 pt plus 1 fil } % \end{macrocode} % \end{macro} @@ -4669,7 +4908,7 @@ To produce the documentation run the original source files ending with { content = \@@_cover_title_nl:, format = \zihao { 1 }, - bottom-skip = 1 cm + bottom-skip = 0 pt plus 1 fil } % \end{macrocode} % \end{macro} @@ -4714,12 +4953,12 @@ To produce the documentation run the original source files ending with % \begin{macrocode} \cs_new_protected:Npn \@@_cover_top_nl: { - \@@_spread_box:nnV { 3.2 em } { } \c_@@_name_clc_tl \@@_hskip: - \@@_ulined_center_box:nn { 9 em } { \l_@@_info_clc_tl } \hfill - \@@_spread_box:nnV { 3.2 em } { } \c_@@_name_seclv_tl \@@_hskip: - \@@_ulined_center_box:nn { 9 em } { \l_@@_info_seclv_tl } \\ - \@@_spread_box:nnV { 3.2 em } { } \c_@@_name_udc_tl \@@_hskip: - \@@_ulined_center_box:nn { 9 em } { \l_@@_info_udc_tl } \hfill \null + \@@_spread_box:nnV { 3.2 em } { } \g_@@_name_clc_tl \@@_hskip: + \@@_ulined_center_box:nn { 9 em } { \g_@@_info_clc_tl } \hfill + \@@_spread_box:nnV { 3.2 em } { } \g_@@_name_secretlv_tl \@@_hskip: + \@@_ulined_center_box:nn { 9 em } { \g_@@_info_secretlv_tl } \\ + \@@_spread_box:nnV { 3.2 em } { } \g_@@_name_udc_tl \@@_hskip: + \@@_ulined_center_box:nn { 9 em } { \g_@@_info_udc_tl } \hfill \null } % \end{macrocode} % \end{macro} @@ -4729,36 +4968,36 @@ To produce the documentation run the original source files ending with % \begin{macrocode} \cs_new_protected:Npn \@@_cover_title_nl: { - \@@_split_title:V \l_@@_info_title_tl - \@@_multiline_box:nnnn { \l_@@_tmp_int } \l_@@_tmp_clist { 3 } { 15 em } + \parbox [ b ] { 15 em } { \@@_uline_title: } \par \skip_vertical:n { - 0.5 cm } - { \zihao { 4 } \c_@@_name_title_b_tl } + { \zihao { 4 } \g_@@_name_title_b_tl } \skip_vertical:N \c_zero_skip - \@@_ulined_center_box:nn { 4.5 em } { \l__nju_info_author_tl } + \@@_ulined_center_box:nn { 4.5 em } { \g_@@_info_author_tl } \skip_vertical:n { - 0.5 cm } - { \zihao { 4 } { ( } \c_@@_name_author_tl { ) } } + { \zihao { 4 } { ( } \g_@@_name_author_tl { ) } } } % \end{macrocode} % \end{macro} % % \begin{macro}{\@@_cover_info_nl:} +% \changes{v0.17}{2022/04/09}{优化国家图书馆封面导师联系方式的输出格式。} % 国家图书馆封面信息栏。 % \begin{macrocode} \cs_new_protected:Npn \@@_cover_info_nl: { - \tl_set:Nn \l_@@_info_supv_tl - { \clist_item:Nn \l_@@_info_supv_clist { 1 } } - \tl_set:Nn \l_@@_info_supv_ttl_tl - { \clist_item:Nn \l_@@_info_supv_clist { 2 } } - \@@_uline_entry:Nnnn \l_@@_tmp_dim { supv_info } { supv } { } \\ - \@@_ulined_center_box:nn { \textwidth } { \@@_info:n { supv_ttl } - \@@_quad: \@@_info:n { supv_cont } } \\ - \@@_uline_bientry:Nnnn \l_@@_tmp_dim { degree } { degree } { } - \@@_uline_bientry:Nnnn \l_@@_tmp_dim { major_b } { major } { } \\ - \@@_uline_bientry:Nnnn \l_@@_tmp_dim { sm_date } { sm_date } { } - \@@_uline_bientry:Nnnn \l_@@_tmp_dim { df_date } { df_date } { } \\ - \@@_full_uline:Nn \l_@@_tmp_dim { \c_@@_name_confer_tl } - \@@_uline:n { \l_@@_tmp_dim } + \@@_uline_list:nnn { \g_@@_name_supvinfo_tl } + { + \clist_use:Nn \g_@@_info_supv_clist { ~ } + \clist_use:Nn \g_@@_info_supv_ii_clist { ~ } ~ + \g_@@_info_supv_cont_tl + } + { 1 em plus 1 fill } + \@@_uline_bientry:Nnnn \l_@@_tmpa_dim { degree } { degree } { } + \@@_uline_bientry:Nnnn \l_@@_tmpa_dim { major_b } { major } { } \\ + \@@_uline_bientry:Nnnn \l_@@_tmpa_dim { submitdate } { submitdate } { } + \@@_uline_bientry:Nnnn \l_@@_tmpa_dim { defenddate } { defenddate } { } \\ + \@@_full_uline:Nn \l_@@_tmpa_dim { \g_@@_name_confer_tl } + \@@_uline:n { \l_@@_tmpa_dim } } % \end{macrocode} % \end{macro} @@ -4772,7 +5011,141 @@ To produce the documentation run the original source files ending with \@@_ulined_center_box:nn { 9 em } { \@@_info:n { chairman } } \\ \@@_name:n { reviewer } \@@_hskip: \@@_multiline_box:nnnn { \l_@@_tmp_int } - { \l_@@_info_reviewer_clist } { 4 } { 9 em } + { \g_@@_info_reviewer_clist } { 4 } { 9 em } + } +% \end{macrocode} +% \end{macro} +% +% \subparagraph{出版授权书} +% +% \begin{macro}{authdecl/g/title} +% 出版授权书标题实例。 +% \begin{macrocode} +\@@_declare_element:nn { authdecl / g / title } + { + content = \g_@@_name_authdecl_tl, + format = \g_@@_fmt_chapter_tl, + bottom-skip = 3 cm + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{authdecl/g/text} +% 出版授权书文本实例。 +% \begin{macrocode} +\@@_declare_element:nn { authdecl / g / text } + { + content = \g_@@_text_authdecl_tl, + align = n, + bottom-skip = 2 cm + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{authdecl/g/sign} +% 出版授权书签名区实例。 +% \begin{macrocode} +\@@_declare_element:nn { authdecl / g / sign } + { + content = \@@_authdecl_sign_g:, + align = r, + bottom-skip = 0pt plus 1 fill + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{authdecl/g/info} +% 出版授权书信息表格实例。 +% \begin{macrocode} +\@@_declare_element:nn { authdecl / g / info } + { + content = \@@_authdecl_info_g:, + format = \zihao { 5 } , + align = l, + bottom-skip = 2 cm + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{authdecl/g/date} +% 出版授权书保密信息实例。 +% \begin{macrocode} +\@@_declare_element:nn { authdecl / g / date } + { + content = \@@_authdecl_secretlv_g:, + format = \zihao { 5 } , + align = l + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@@_degree_checkbox:n} +% 信息栏的学位复选框。 +% \begin{macrocode} +\cs_new_protected:Npn \@@_degree_checkbox:n #1 + { + \int_compare:nNnTF { #1 } { = } { \g_@@_info_degree_int } + { + \makebox [ 0 pt ] [l] { \ensuremath { \mdwhtsquare } } + \hspace { 0.1 em } \ensuremath { \checkmark } + } + { \ensuremath { \mdwhtsquare } } + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@@_authdecl_info_g:} +% 信息栏内容。 +% \begin{macrocode} +\cs_new_protected:Npn \@@_authdecl_info_g: + { + \begin{tblr} + { + hlines, vlines, hspan=minimal, + colspec = {cX[c]cX[c]cX[c]}, + cell{1}{2} = {c=5}{m}, cell{3}{2} = {c=5}{m}, + cell{4}{2} = {c=5}{m}, cell{5}{2} = {c=5}{m} + } + \g_@@_name_title_c_tl & \g_@@_info_title_tl \\ + \g_@@_name_id_a_tl & \g_@@_info_id_tl & + \g_@@_name_dept_a_tl & \g_@@_info_dept_tl & + \g_@@_name_year_tl & + \tl_range:Nnn \g_@@_info_submitdate_raw_tl {1} {4} \\ + \g_@@_name_degree_a_tl & + { + \@@_degree_checkbox:n { 2 } 学术学位硕士 \qquad{} + \@@_degree_checkbox:n { 3 } 专业学位硕士 \\ + \@@_degree_checkbox:n { 4 } 学术学位博士 \qquad{} + \@@_degree_checkbox:n { 5 } 专业学位博士 + } \\ + \g_@@_name_email_tl & \g_@@_info_email_tl \\ + \g_@@_name_supv_b_tl & + \clist_item:Nn \g_@@_info_supv_clist {1} + \clist_item:Nn \g_@@_info_supv_ii_clist {1} \\ + \end{tblr} + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@@_authdecl_sign_g:} +% 签名区内容。 +% \begin{macrocode} +\cs_new_protected:Npn \@@_authdecl_sign_g: + { + \g_@@_name_authsign_tl \par + \g_@@_name_blankdate_tl + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@@_authdecl_secretlv_g:} +% 保密信息内容。 +% \begin{macrocode} +\cs_new_protected:Npn \@@_authdecl_secretlv_g: + { + \g_@@_name_secretstatus_tl \par + \ensuremath { \mdwhtsquare } \g_@@_name_secretfree_tl \par + \ensuremath { \mdwhtsquare } \g_@@_name_secretdate_tl } %</definition-g> % \end{macrocode} @@ -4849,6 +5222,19 @@ To produce the documentation run the original source files ending with prefix = cover / nl /, format = \kaishu } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{authdecl-g-default} +% 默认出版授权书实例。 +% \begin{macrocode} +\@@_declare_page:nn { authdecl-g-default } + { + element = { title, text, sign, info, date }, + prefix = authdecl / g /, + top-skip = 1 cm, + bottom-skip = 0.5 cm plus 1.5 fill + } %</definition-g> % \end{macrocode} % \end{macro} @@ -4874,23 +5260,39 @@ To produce the documentation run the original source files ending with % \end{macrocode} % \end{macro} % -% \begin{macro}{\@@_make_orig_decl: } +% \begin{macro}{\@@_make_origdecl: } % \changes{v0.13}{2021/12/15}{加入本科生的诚信承诺书。} -% 生成生成本科生的诚信承诺书或研究生的学位论文原创性声明。 +% 生成本科生的诚信承诺书或研究生的学位论文原创性声明。 % \begin{macrocode} -\cs_new_protected:Npn \@@_make_orig_decl: +\cs_new_protected:Npn \@@_make_origdecl: { - \chapter* { \c_@@_name_orig_decl_tl } + \chapter* { \g_@@_name_origdecl_tl } \thispagestyle { empty } - \c_@@_orig_decl_text_tl + \g_@@_text_origdecl_tl \vfil \begin{flushright} -%<definition-ug> \clist_map_inline:nn { orig_sign, id, orig_date } -%<definition-g> \clist_map_inline:nn { orig_sign, orig_date } +%<definition-ug> \clist_map_inline:nn { origsign, id, origdate } +%<definition-g> \clist_map_inline:nn { origsign, origdate } { \@@_vskip: \@@_name:n { ##1 } : \@@_uline:n { 7 em } } \end{flushright} \vfil } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@@_make_authdecl: } +% \changes{v0.17}{2022/04/04}{加入研究生的学位论文出版授权书。} +% 生成研究生的学位论文出版授权书。 +% \begin{macrocode} +\cs_new_protected:Npn \@@_make_authdecl: + { +%<definition-ug> \prg_do_nothing: +%<*definition-g> + \thispagestyle{empty} + \UseInstance { nju } { authdecl-g-default } + \cleardoublepage +%</definition-g> + } %</(definition-ug|definition-g)> % \end{macrocode} % \end{macro} @@ -4974,7 +5376,6 @@ To produce the documentation run the original source files ending with { \bool_if:NF \g_@@_draft_bool { - \pagestyle { empty } \pagenumbering { gobble } % \end{macrocode} % 如果在研究生模板中选择了 \opt{nlcover},就生成用于申请学位的国家图书馆封面, @@ -4983,15 +5384,24 @@ To produce the documentation run the original source files ending with \bool_if:NTF \g_@@_nlcover_bool { \@@_make_cover_nl: } { \@@_make_cover: } -% \end{macrocode} -% 如果在选择了 \opt{decl-page},就生成本科生的诚信承诺书或研究生的原创性声明。 -% \begin{macrocode} - \bool_if:NT \g_@@_orig_decl_bool { \@@_make_orig_decl: } } % \end{macrocode} % 生成封面后清除标题中的换行控制符,便于在摘要中输出。 % \begin{macrocode} - \tl_remove_all:Nn \l_@@_info_title_tl { \\ } + \tl_remove_all:Nn \g_@@_info_title_tl { \\ } +% \end{macrocode} +% 如果在选择了 \opt{decl-page},就生成本科生的诚信承诺书, +% 或研究生的原创性声明和出版授权书。 +% \begin{macrocode} +\bool_if:NF \g_@@_draft_bool + { + \bool_if:NT \g_@@_decl_bool + { + \@@_make_origdecl: + \AtEndEnvironment { document } + { \@@_make_authdecl: } + } + } % \end{macrocode} % 在标题页后使用大写罗马字母页码,恢复正常字体设置。 % \begin{macrocode} @@ -5016,7 +5426,7 @@ To produce the documentation run the original source files ending with %<*(definition-ug|definition-g)> \@@_declare_element:nn { abstract / title } { - content = \@@_abs_title:V \c_@@_name_abstract_title_tl, + content = \@@_abs_title:V \g_@@_name_abstracttitle_tl, format = \bfseries \kaishu \zihao { -2 }, bottom-skip = 1.2 cm } @@ -5044,7 +5454,7 @@ To produce the documentation run the original source files ending with % \begin{macrocode} \@@_declare_element:nn { abstract / en / title } { - content = \@@_abs_title:V \c_@@_name_abstract_title_en_tl, + content = \@@_abs_title:V \g_@@_name_abstracttitle_en_tl, format = \bfseries \kaishu \zihao { -2 }, bottom-skip = 1.2 cm } @@ -5086,17 +5496,17 @@ To produce the documentation run the original source files ending with % 确定标题类型。 % \begin{macrocode} \tl_if_blank:eTF { #1 } - { \c_@@_name_title_tl } - { \clist_item:Nn \c_@@_name_type_en_clist { \g_@@_info_type_int } } - #2 \tl_use:c { l_@@_info_title #1 _tl } \\ + { \g_@@_name_title_tl } + { \clist_item:Nn \g_@@_name_type_en_clist { \g_@@_info_type_int } } + #2 \tl_use:c { g_@@_info_title #1 _tl } \\ % \end{macrocode} % 由于作者姓名使用的字样发生了变动,这里进行替换以便嵌入循环。 % \begin{macrocode} - \tl_set_eq:NN \c_@@_name_author_tl \c_@@_name_author_a_tl + \tl_set_eq:NN \g_@@_name_author_tl \g_@@_name_author_a_tl % \end{macrocode} % 使用循环输出院系、专业、作者、导师信息。 % \begin{macrocode} - \clist_map_inline:nn { dept, major, author, supv_full } + \clist_map_inline:nn { dept, major, author, supvfull } { \@@_name:n { ##1 #1 } #2 \@@_info:n { ##1 #1 } \\ } \@@_name:n { abstract #1 } #2 } @@ -5112,7 +5522,7 @@ To produce the documentation run the original source files ending with % \begin{macrocode} \@@_declare_element:nn { abstract / mark } { - content = \c_@@_name_abstract_b_tl, + content = \g_@@_name_abstract_b_tl, format = \sffamily \zihao { -3 }, bottom-skip = 1 cm } @@ -5124,7 +5534,7 @@ To produce the documentation run the original source files ending with % \begin{macrocode} \@@_declare_element:nn { abstract / en / mark } { - content = \c_@@_name_abstract_b_en_tl, + content = \g_@@_name_abstract_b_en_tl, format = \sffamily \zihao { -3 }, bottom-skip = 1 cm } @@ -5143,29 +5553,29 @@ To produce the documentation run the original source files ending with { \@@_uline_list:xnn { - \clist_item:Nn \c_@@_name_type_clist { \g_@@_info_type_int } - \c_@@_name_title_a_tl #1 + \clist_item:Nn \g_@@_name_type_clist { \g_@@_info_type_int } + \g_@@_name_title_a_tl #1 } - { \l_@@_info_title_tl } { \g_@@_abs_title_left_skip } + { \g_@@_info_title_tl } { \g_@@_abs_title_left_skip } % \end{macrocode} % 专业、年级、姓名。 % \begin{macrocode} - \@@_full_uline:NV \l_@@_tmp_dim + \@@_full_uline:NV \l_@@_tmpa_dim { - \@@_ulined_center_box:nn { 11 em } { \l_@@_info_major_tl } - \c_@@_name_major_a_tl - \@@_ulined_center_box:nn { 4 em } { \l_@@_info_grade_tl } - \c_@@_name_grade_tl \c_@@_name_author_a_tl #1 + \@@_ulined_center_box:nn { 11 em } { \g_@@_info_major_tl } + \g_@@_name_major_a_tl + \@@_ulined_center_box:nn { 4 em } { \g_@@_info_grade_tl } + \g_@@_name_grade_tl \g_@@_name_author_a_tl #1 } - \@@_ulined_center_box:nn { \l_@@_tmp_dim } - { \l_@@_info_author_tl } \\ + \@@_ulined_center_box:nn { \l_@@_tmpa_dim } + { \g_@@_info_author_tl } \\ % \end{macrocode} % 导师姓名、职称。 % \begin{macrocode} - \@@_full_uline:NV \l_@@_tmp_dim - { \c_@@_name_supv_a_tl #1 } - \@@_ulined_center_box:nn { \l_@@_tmp_dim } - { \l_@@_info_supv_full_tl } + \@@_full_uline:NV \l_@@_tmpa_dim + { \g_@@_name_supv_a_tl #1 } + \@@_ulined_center_box:nn { \l_@@_tmpa_dim } + { \g_@@_info_supvfull_tl } } % \end{macrocode} % \end{macro} @@ -5179,15 +5589,15 @@ To produce the documentation run the original source files ending with % \begin{macrocode} \cs_new_protected:Npn \@@_abs_info_en_g:n #1 { - \@@_uline_list:xnn { \l_@@_info_type_en_tl #1 } - { \l_@@_info_title_en_tl } { \g_@@_abs_title_left_skip } + \@@_uline_list:xnn { \g_@@_info_type_en_tl #1 } + { \g_@@_info_title_en_tl } { \g_@@_abs_title_left_skip } % \end{macrocode} % 使用循环输出专业、姓名、导师。注意这里将 |\\| 放置在前部, % 以避免末尾生成多余的换行符产生 |Underfull \vbox| 信息。 % \begin{macrocode} - \clist_map_inline:nn { major, author, supv_full } + \clist_map_inline:nn { major, author, supvfull } { - \@@_uline_entry:Nnnn \l_@@_tmp_dim + \@@_uline_entry:Nnnn \l_@@_tmpa_dim { ##1 _en } { ##1 _en } { #1 } \par } } @@ -5208,24 +5618,24 @@ To produce the documentation run the original source files ending with %<*class> \cs_new_protected:Npn \@@_print_keywords:nn #1#2 { - \tl_set:Nv \l_@@_tmp_tl { c_@@_name_keywords #1 _tl } - \@@_get_text_width:NV \l_@@_tmp_dim \l_@@_tmp_tl + \tl_set:Nv \l_@@_tmpa_tl { g_@@_name_keywords #1 _tl } + \@@_get_text_width:NV \l_@@_tmpa_dim \l_@@_tmpa_tl % \end{macrocode} % 关键词列表的悬挂缩进样式由 \tn{list} 环境产生。 % \begin{macrocode} - \list { \l_@@_tmp_tl } + \list { \l_@@_tmpa_tl } { - \labelwidth \l_@@_tmp_dim + \labelwidth \l_@@_tmpa_dim \labelsep \c_zero_dim \leftmargin \c_zero_dim \rightmargin \c_zero_dim - \advance \leftmargin \l_@@_tmp_dim + \advance \leftmargin \l_@@_tmpa_dim % \end{macrocode} % 使用粗体作为标签样式。 % \begin{macrocode} \cs_set_eq:NN \makelabel \textbf } - \item \clist_use:cn { l_@@_info_keywords #1 _clist } { #2 } + \item \clist_use:cn { g_@@_info_keywords #1 _clist } { #2 } \endlist } %</class> @@ -5313,7 +5723,7 @@ To produce the documentation run the original source files ending with { \cleardoublepage \thispagestyle { plain } - \@@_abs_bookmark:Vn \c_@@_name_abstract_a_tl { abstract } + \@@_abs_bookmark:Vn \g_@@_name_abstract_a_tl { abstract } \@@_make_abstract: \group_begin: \kaishu \zihao { -4 } #1 } @@ -5328,7 +5738,7 @@ To produce the documentation run the original source files ending with { \cleardoublepage \thispagestyle { plain } - \@@_abs_bookmark:Vn \c_@@_name_abstract_a_en_tl { abstract-en } + \@@_abs_bookmark:Vn \g_@@_name_abstract_a_en_tl { abstract-en } \@@_make_abstract_en: \group_begin: \zihao { -4 } #1 } @@ -5344,9 +5754,9 @@ To produce the documentation run the original source files ending with % 单独制作的前言致谢页。 % \begin{macrocode} \NewDocumentEnvironment { preface } { +b } - { \@@_chapter:V \c_@@_name_preface_tl #1 } { } + { \@@_chapter:V \g_@@_name_preface_tl #1 } { } \NewDocumentEnvironment { acknowledgement } { +b } - { \@@_chapter:V \c_@@_name_acknowledgement_tl #1 } { } + { \@@_chapter:V \g_@@_name_acknowledgement_tl #1 } { } % \end{macrocode} % \end{environment} % \end{environment} @@ -5360,7 +5770,7 @@ To produce the documentation run the original source files ending with % 成果列表。 % \begin{macrocode} \NewDocumentCommand \njupaperlist - { O { \c_@@_name_paperlist_tl } m } + { O { \g_@@_name_paperlist_tl } m } { \group_begin: % \end{macrocode} @@ -5404,7 +5814,7 @@ To produce the documentation run the original source files ending with % \begin{macrocode} \cs_new_protected:Npn \@@_make_notation:nn #1#2 { - \dim_set:Nn \l_@@_tmp_dim { \textwidth - #1 - #2 } + \dim_set:Nn \l_@@_tmpa_dim { \textwidth - #1 - #2 } \list { } { % \end{macrocode} @@ -5419,7 +5829,7 @@ To produce the documentation run the original source files ending with % 右侧说明文字区域的宽度无法直接指定,而是靠计算左右边距 \tn{leftmargin} 和 % \tn{rightmargin} 得到的。 % \begin{macrocode} - \leftmargin .5\l_@@_tmp_dim + \leftmargin .5\l_@@_tmpa_dim \rightmargin \leftmargin \advance \leftmargin #2 \cs_set_eq:NN \makelabel \@@_notation_label:n @@ -5438,7 +5848,7 @@ To produce the documentation run the original source files ending with % \begin{macrocode} \NewDocumentEnvironment { notation } { O { 10 em } O { 5 em } } { - \@@_chapter:V \c_@@_name_notation_tl + \@@_chapter:V \g_@@_name_notation_tl \@@_make_notation:nn { #1 } { #2 } } { \endlist } @@ -5450,7 +5860,7 @@ To produce the documentation run the original source files ending with % \begin{macrocode} \NewDocumentEnvironment { notation* } { O { 10 em } O { 5 em } } { - \chapter * { \c_@@_name_notation_tl } + \chapter * { \g_@@_name_notation_tl } \@@_make_notation:nn { #1 } { #2 } } { \endlist } @@ -5460,9 +5870,13 @@ To produce the documentation run the original source files ending with % % % \subsection{配置常量} +% \label{subsec:constant-config} % \changes{v0.16}{2022/02/23}{将名称常量分离到 \file{.def} 文件。} % -% 本节内容用于生成名称常量的默认定义,分为本科生和研究生模板两种。 +% 本节内容用于生成常量的默认定义,分为本科生和研究生模板两种。 +% +% \subsubsection{名称} +% \label{subsubsec:constant-name} % % 由于同一名称在不同位置具有不同变体,本模板使用字母后缀名进行了区分, % 并在易混淆处添加了注释。 @@ -5472,13 +5886,16 @@ To produce the documentation run the original source files ending with %<*(definition-ug|definition-g)> \clist_map_inline:nn { - { acknowledgement } { 致\hspace{2em}谢 }, + { acknowledgement } { 致 \qquad{} 谢 }, + { tableofcontents } { 目 \qquad{} 录 }, { id } { 学号 }, + { listoffigures } { 插图目录 }, + { listoftables } { 表格目录 }, { notation } { 符号表 }, - { orig_date } { 日期 }, + { origdate } { 日期 }, { paperlist } { 发表文章目录 }, - { pdf_creator } { LaTeX~ with~ njuthesis~ class }, - { preface } { 前\hspace{2em}言 }, + { pdfcreator } { LaTeX~ with~ njuthesis~ class }, + { preface } { 前 \qquad{} 言 }, { supv_ii } { 第二导师 }, { supv_ttl } { 职称 } } @@ -5503,7 +5920,6 @@ To produce the documentation run the original source files ending with { table } { 表 } { table } } { \@@_define_name:nnn #1 } -%</(definition-ug|definition-g)> % \end{macrocode} % % 本科生模板默认名称。 @@ -5514,10 +5930,10 @@ To produce the documentation run the original source files ending with % 用于摘要的作者名称字样 { author_a } { 本科生姓名 }, { grade } { 年级 }, - { orig_decl } - { \c_@@_name_nju_tl 本科毕业论文(设计)诚信承诺书 }, - { orig_sign } { 作者签名 }, - { sm_date } { 提交日期 }, + { origdecl } + { \g_@@_name_nju_tl 本科毕业论文(设计)诚信承诺书 }, + { origsign } { 作者签名 }, + { submitdate } { 提交日期 }, { supv } { 导师 }, { title } { 题目 }, { type } { 本科生毕业论文(设计、作品) }, @@ -5526,122 +5942,159 @@ To produce the documentation run the original source files ending with { \@@_define_name:nn #1 } \clist_map_inline:nn { - { abstract_title } + { abstracttitle } { - \c_@@_name_nju_tl \c_@@_name_type_tl - \c_@@_name_lang_tl \c_@@_name_abstract_tl + \g_@@_name_nju_tl \g_@@_name_type_tl + \g_@@_name_lang_tl \g_@@_name_abstract_tl } { - \c_@@_name_nju_tl \c_@@_name_type_tl - \c_@@_name_lang_en_tl \c_@@_name_abstract_tl + \g_@@_name_nju_tl \g_@@_name_type_tl + \g_@@_name_lang_en_tl \g_@@_name_abstract_tl }, { author } { 学生姓名 } { UNDERGRADUATE }, { major } { 专业 } { SPECIALIZATION }, - { supv_full } { 指导教师(姓名、职称) } { MENTOR } + { supvfull } { 指导教师(姓名、职称) } { MENTOR } } { \@@_define_name:nnn #1 } -% \end{macrocode} -% -% \begin{variable}{\c_@@_orig_decl_text_tl} -% 学位论文诚信承诺书。 -% \begin{macrocode} -\tl_const:Nn \c_@@_orig_decl_text_tl - { - 本人郑重承诺:所呈交的毕业论文(设计)(题目:)是在指导教师的指导下 - 严格按照学校和院系有关规定由本人独立完成的。本毕业论文(设计)中引用 - 他人观点及参考资源的内容均已标注引用,如出现侵犯他人知识产权的行为, - 由本人承担相应法律责任。本人承诺不存在抄袭、伪造、篡改、代写、买卖毕 - 业论文(设计)等违纪行为。 - } %</definition-ug> % \end{macrocode} -% \end{variable} % % 研究生模板默认名称。 % \begin{macrocode} %<*definition-g> \clist_map_inline:nn { - % 用于摘要的作者名称字样 + { apply } {(申请 \g_@@_info_degree_tl 学位)}, + { authdecl } { 学位论文出版授权书 }, { author_a } - { \tl_item:Nn \l_@@_info_degree_tl { 1 } 士生姓名 }, + { \tl_item:Nn \g_@@_info_degree_tl { 1 } 士生姓名 }, + { authsign } { 作者签名:\njuline{\hspace{6em}} }, + { blankdate } { \njuline{\qquad\qquad} 年 + \njuline{\qquad} 月 \njuline{\qquad} 日 }, + % 用于摘要的作者名称字样 { chairman } { 答辩委员会主席: }, { clc } { 分类号 }, { confer } { 学位授予单位和日期 }, - { df_date } { 论文答辩日期 }, + { defenddate } { 论文答辩日期 }, { degree } { 申请学位级别 }, - { apply } - { (申请 \l_@@_info_degree_tl 学位) }, + % 用于出版授权书的学位名称字样 + { degree_a } { 论文级别 }, + % 用于出版授权书的院系名称字样 + { dept_a } { 所在院系 }, + { email } { 作者 Email }, { field } { 研究方向 }, { g } { 研究生 }, { grade } { 级 }, + % 用于出版授权书的学号名称字样 + { id_a } { 研究生学号 }, % 用于摘要的专业名称字样 { major_a } { 专业 }, % 用于国家图书馆封面的专业名称字样 { major_b } { 专业名称 }, - { orig_decl } - { \c_@@_name_nju_tl 学位论文原创性声明 }, - { orig_sign } { 研究生签名 }, + { origdecl } { 南京大学学位论文原创性声明 }, + { origsign } { 研究生签名 }, { reviewer } { 评阅人: }, - { seclv } { 密级 }, + { secretlv } { 密级 }, + { secretstatus } { 论文涉密情况: }, + { secretfree } { 不保密 }, + { secretdate } + { 保密,保密期( \g_@@_name_blankdate_tl 至 + \g_@@_name_blankdate_tl ) }, { sign } { (签字) }, - { sm_date } { 论文提交日期 }, + { submitdate } { 论文提交日期 }, { supv } { 导师 }, % 用于摘要的导师名称字样 { supv_a } { 指导教师(姓名、职称) }, - { supv_info } + % 用于出版授权书的导师名称字样 + { supv_b } { 导师姓名 }, + { supvinfo } { 指导教师姓名、职务、职称、学位、单位名称及地址 }, % 用于普通封面的标题名称字样 { title } { 论文题目 }, % 用于摘要的标题名称字样 { title_a } { 题目 }, % 用于国家图书馆封面的标题名称字样 - { title_b } { (题名和副题名) }, - { udc } { U D C } + { title_b } { (题名和副题名) }, + % 用于出版授权书的标题名称字样 + { title_c } { 论文题名 }, + { udc } { U D C }, + { year } { 学位年度 } } { \@@_define_name:nn #1 } \clist_map_inline:nn { - { abstract_title } - { 南京大学 \l_@@_info_type_tl 中文摘要首页用纸 } - { 南京大学 \l_@@_info_type_tl 英文摘要首页用纸 }, + { abstracttitle } + { 南京大学 \g_@@_info_type_tl 中文摘要首页用纸 } + { 南京大学 \g_@@_info_type_tl 英文摘要首页用纸 }, { author } { 作者姓名 } { POSTGRADUATE }, { major } { 专业方向 } { SPECIALIZATION }, - { supv_full } { 指导教师 } { MENTOR } + { supvfull } { 指导教师 } { MENTOR } } { \@@_define_name:nnn #1 } +%</definition-g> % \end{macrocode} % -% \begin{variable}{\c_@@_cover_en_text_tl} -% 英文封面字样。 -% \begin{macrocode} -\tl_const:Nn \c_@@_cover_en_text_tl - { - A~ dissertation~ submitted~ to \\ - the~ graduate~ school~ of~ Nanjing~ University \\ - in~ partial~ fulfilment~ of~ the~ requirements~ for~ the~ degree~ of - } -% \end{macrocode} -% \end{variable} +% \subsubsection{文本} +% \label{subsubsec:constant-text} % -% \begin{variable}{\c_@@_orig_decl_text_tl} -% 学位论文原创性声明。 +% \begin{variable}{\g_@@_text_origdecl_tl} +% 本科生的学位论文诚信承诺书,或研究生的学位论文原创性声明。 % \begin{macrocode} -\tl_const:Nn \c_@@_orig_decl_text_tl +\tl_const:Nn \g_@@_text_origdecl_tl { +%<*definition-ug> + 本人郑重承诺:所呈交的毕业论文(设计)(题目: \g_@@_info_title_tl ) + 是在指导教师的指导下严格按照学校和院系有关规定由本人独立完成的。 + 本毕业论文(设计)中引用他人观点及参考资源的内容均已标注引用, + 如出现侵犯他人知识产权的行为,由本人承担相应法律责任。 + 本人承诺不存在抄袭、伪造、篡改、代写、买卖毕业论文(设计)等违纪行为。 +%</definition-ug> +%<*definition-g> 本人郑重声明,所提交的学位论文是本人在导师指导下独立进行科学研究工作 所取得的成果。除本论文中已经注明引用的内容外,本论文不包含其他个人或 集体已经发表或撰写过的研究成果,也不包含为获得南京大学或其他教育机构 的学位证书而使用过的材料。对本文的研究做出重要贡献的个人和集体,均已 在论文的致谢部分明确标明。本人郑重申明愿承担本声明的法律责任。 +%</definition-g> + } +% \end{macrocode} +% \end{variable} +% +% \begin{variable}{\g_@@_text_authdecl_tl} +% 研究生的学位论文出版授权书。 +% \begin{macrocode} +%<*definition-g> +\tl_gset:Nn \g_@@_text_authdecl_tl + { + 本人完全同意《中国优秀博硕士学位论文全文数据库出版章程》 + (以下简称“章程”),愿意将本人的学位论文提交“中国学术期刊 + (光盘版)电子杂志社”在《中国博士学位论文全文数据库》、 + 《中国优秀硕士学位论文全文数据库》中全文发表。《中国博士 + 学位论文全文数据库》、《中国优秀硕士学位论文全文数据库》 + 可以以电子、网络及其他数字媒体形式公开出版,并同意编入 + 《中国知识资源总库》,在《中国博硕士学位论文评价数据库》 + 中使用和在互联网上传播,同意按“章程”规定享受相关权益。 + } +% \end{macrocode} +% \end{variable} +% +% \begin{variable}{\g_@@_text_cover_en_tl} +% 研究生的英文封面字样。 +% \begin{macrocode} +\tl_gset:Nn \g_@@_text_cover_en_tl + { + A~ dissertation~ submitted~ to \\ + the~ graduate~ school~ of~ Nanjing~ University \\ + in~ partial~ fulfilment~ of~ the~ requirements~ for~ the~ degree~ of } %</definition-g> % \end{macrocode} % \end{variable} % +% \subsubsection{定理} +% % 默认定理类型和头名称。 % \begin{macrocode} -%<*(definition-ug|definition-g)> \clist_map_inline:nn { { axiom } { 公理 } { Axiom }, @@ -5653,6 +6106,42 @@ To produce the documentation run the original source files ending with { theorem } { 定理 } { Theorem } } { \@@_add_theorem_type:nnn #1 } +% \end{macrocode} +% +% \subsubsection{长度} +% \label{subsubsec:constant-length} +% +% \changes{v0.17}{2022/04/09}{将长度值分离到 \file{.def} 文件。} +% 默认长度值。 +% \begin{macrocode} +\clist_map_inline:nn + { +%<definition-ug> { coverlabel } { 68 pt }, +%<definition-g> { coverlabel } { 100 pt }, + { coverlineskip } { 40 pt }, + { coveruline } { 270 pt }, + { smallhskip } { 5 pt }, + { smallvskip } { 1 ex } + } + { \@@_define_dim:nn #1 } +% \end{macrocode} +% +% \subsubsection{样式} +% \label{subsubsec:constant-format} +% +% \changes{v0.17}{2022/04/09}{将样式定义分离到 \file{.def} 文件。} +% 默认样式。 +% \begin{macrocode} +\clist_map_inline:nn + { + { chapterintoc } { \large \normalfont \sffamily }, + { chapter } { \large \normalfont \sffamily \centering }, + { section } { \large \normalfont \sffamily }, + { subsection } { \large \normalfont \sffamily }, + { subsubsection } { \large \normalfont \sffamily }, + { toctitle } { \centering \zihao { 3 } \bfseries } + } + { \@@_define_fmt:nn #1 } %</(definition-ug|definition-g)> % \end{macrocode} % diff --git a/Master/texmf-dist/source/latex/njuthesis/njuthesis.ins b/Master/texmf-dist/source/latex/njuthesis/njuthesis.ins index 5efc57a52f8..131bf3bb9cf 100644 --- a/Master/texmf-dist/source/latex/njuthesis/njuthesis.ins +++ b/Master/texmf-dist/source/latex/njuthesis/njuthesis.ins @@ -78,13 +78,13 @@ To produce the documentation run the original source files ending with \endbatchfile \__nju_declare_element:nn { abstract / mark } { - content = \c__nju_name_abstract_b_tl, + content = \g__nju_name_abstract_b_tl, format = \sffamily \zihao { -3 }, bottom-skip = 1 cm } \__nju_declare_element:nn { abstract / en / mark } { - content = \c__nju_name_abstract_b_en_tl, + content = \g__nju_name_abstract_b_en_tl, format = \sffamily \zihao { -3 }, bottom-skip = 1 cm } |