summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-04-05 22:09:37 +0000
committerKarl Berry <karl@freefriends.org>2022-04-05 22:09:37 +0000
commit44c7e92cd62a724d239c17b52359d86abaf22615 (patch)
treefd4cf4a728e8f20ed7d31171b6bcdb8002f30abc
parent43498062297432f6e77404bad0ad54f0fb991a05 (diff)
njuthesis (27mar22)
git-svn-id: svn://tug.org/texlive/trunk@62939 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/njuthesis/njuthesis.pdfbin1146496 -> 1159001 bytes
-rw-r--r--Master/texmf-dist/source/latex/njuthesis/njuthesis.dtx514
-rw-r--r--Master/texmf-dist/source/latex/njuthesis/njuthesis.ins12
-rw-r--r--Master/texmf-dist/tex/latex/njuthesis/njuthesis-graduate.def46
-rw-r--r--Master/texmf-dist/tex/latex/njuthesis/njuthesis-undergraduate.def24
-rw-r--r--Master/texmf-dist/tex/latex/njuthesis/njuthesis.cls106
6 files changed, 525 insertions, 177 deletions
diff --git a/Master/texmf-dist/doc/latex/njuthesis/njuthesis.pdf b/Master/texmf-dist/doc/latex/njuthesis/njuthesis.pdf
index 1430d0d6ab8..578bddd52d6 100644
--- a/Master/texmf-dist/doc/latex/njuthesis/njuthesis.pdf
+++ b/Master/texmf-dist/doc/latex/njuthesis/njuthesis.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/njuthesis/njuthesis.dtx b/Master/texmf-dist/source/latex/njuthesis/njuthesis.dtx
index ff8521dd9de..228b53a204a 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.0 2022-03-19 12:00:00 +0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
+%<+!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>$
%<class> {Thesis template for Nanjing University}
%<class>\ProvidesExplClass{njuthesis}
%<definition-ug> {Undergraduate definition file for njuthesis}
@@ -142,6 +142,7 @@ To produce the documentation run the original source files ending with
\UseTblrLibrary{booktabs,diagbox,siunitx}
\DefTblrTemplate{caption-tag}{default}{表\hspace{0.25em}\thetable}
\SetTblrStyle{caption-tag}{font=\bfseries}
+\SetTblrInner{row{1}={font=\bfseries}}
\DefTblrTemplate{caption-sep}{default}{\quad}
\lstdefinestyle{style@base}
{
@@ -191,13 +192,15 @@ To produce the documentation run the original source files ending with
%</driver>
% \fi
%
-% \title{\color{njuviolet}{The \cls{njuthesis} class\\ \textbf{南京大学学位论文模板}}}
+% \title{\color{njuviolet}{The \cls{njuthesis} class\\
+% \textbf{南京大学学位论文模板}}}
%
% \author{^^A
% 南京大学 Linux 用户组
-% \thanks{E-mail: \href{mailto:git+nju-lug-email-3104-issue-@yaoge123.cn}{git+nju-lug-email-3104-issue-@yaoge123.cn}}}
+% \thanks{E-mail: \href{mailto:git+nju-lug-email-3104-issue-@yaoge123.cn}
+% {git+nju-lug-email-3104-issue-@yaoge123.cn}}}
%
-% \date{v0.16.0 \quad 2022-03-19}
+% \date{v0.16.1 \quad 2022-03-27}
%
% \changes{v0.1}{2021/09/04}{开始开发。}
% \changes{v0.2}{2021/09/07}{初步搭建了可用的模板。}
@@ -245,12 +248,13 @@ To produce the documentation run the original source files ending with
% 在使用本模板时,我们默认您同意以下内容:
% \begin{enumerate}
% \item 本模板通过 LPPL 1.3c 协议开放源代码,您可以随意使用编译出的 PDF 文件。
-% \item 本模板与学校官方部门并不存在合作关系,作者不对使用本模板产生的格式审查问题负责。
+% \item 本模板与学校官方部门并不存在合作关系,
+% 作者不对使用本模板产生的格式审查问题负责。
% \item 遇到本文档没有覆盖的问题属于正常情况,欢迎提交反馈意见。
% \end{enumerate}
%
-% 我们的 \href{https://git.nju.edu.cn/nju-lug/lug-introduction}{Linux 用户组}始终欢迎
-% 您的加入!
+% 我们的 \href{https://git.nju.edu.cn/nju-lug/lug-introduction}
+% {Linux 用户组}始终欢迎您的加入!
% \end{abstract}
%
% \clearpage
@@ -266,9 +270,12 @@ To produce the documentation run the original source files ending with
%
% \section{模板介绍}
%
-% \cls{njuthesis},即南京大学学位论文模板,是一个由南京大学 Linux 用户组维护的,用于处理本校学生毕业论文排版需求的 \hologo{LaTeX} 模板。
+% \cls{njuthesis},即南京大学学位论文模板,是一个由南京大学 Linux
+% 用户组维护的,用于处理本校学生毕业论文排版需求的 \hologo{LaTeX} 模板。
%
-% 本模板使用的本科生毕业论文模板格式依据《关于启动南京大学2022届本科毕业论文(设计)工作的通知》\cite{nju2021},研究生学位论文格式依据研究生院提供的材料包。
+% 本模板使用的本科生毕业论文模板格式依据
+% 《关于启动南京大学2022届本科毕业论文(设计)工作的通知》\cite{nju2021},
+% 研究生学位论文格式依据研究生院提供的材料包。
%
%
% \subsection{开始之前}
@@ -280,51 +287,68 @@ To produce the documentation run the original source files ending with
% \fcolorbox{olgreen}{gray!5}{\parbox{\textwidth-5em}{%
% \hspace{2em}\begin{minipage}[c]{10cm}
% \begin{enumerate}
-% \item 访问 \url{https://tex.nju.edu.cn}
-% \item 点击右上角~\olbutton{注册}~按钮,用\href{https://itsc.nju.edu.cn/1b/ce/c21586a334798/page.htm}{南大邮箱}注册账号
-% \item 登录您的账号
-% \item 点击左上角~\olbutton{创建新项目}~按钮,选择~\olbutton{论文模板}
-% \item 随意取名,点击~\olbutton{创建}~按钮
+% \item 访问 \url{https://tex.nju.edu.cn}
+% \item 点击右上角~\olbutton{注册}~按钮,
+% 用\href{https://itsc.nju.edu.cn/1b/ce/c21586a334798/page.htm}
+% {南大邮箱}注册账号
+% \item 登录您的账号
+% \item 点击左上角~\olbutton{创建新项目}~按钮,选择~\olbutton{论文模板}
+% \item 随意取名,点击~\olbutton{创建}~按钮
% \end{enumerate}
% \end{minipage}}}
%
% \bigskip
-% 稍等片刻,您会在浏览器右侧发现一份新生成的空白论文。如果它的效果令您满意,不妨以此为基础开始写作。
+% 稍等片刻,您会在浏览器右侧发现一份新生成的空白论文。
+% 如果它的效果令您满意,不妨以此为基础开始写作。
%
% \subparagraph{我一定要体验上述流程吗?}
-% 是,但也不一定。有人坚持认为应该做一些\emph{直观、清晰、有手就行、一条路走到底}的教程,而不是
-% \emph{长篇累牍的精细介绍},其核心论据在于:现代人类总体上需要快速取得成就感,而且大部分可能用
-% 到本模板的同学不会具备必要的基础知识。反驳的观点在于过分简单的实验总是浪费时间的,尤其是在您
-% 可能早已掌握基本用法的情况下。但,不论如何,这番操作总会使您预览到 \cls{njuthesis} 论文模板的
-% 实际样式。
+% 是,但也不一定。有人坚持认为应该做一些\emph{直观、清晰、有手就行、一
+% 条路走到底}的教程,而不是\emph{长篇累牍的精细介绍},其核心论据在于:
+% 现代人类总体上需要快速取得成就感,而且大部分可能用到本模板的同学不
+% 会具备必要的基础知识。反驳的观点在于过分简单的实验总是浪费时间的,
+% 尤其是在您可能早已掌握基本用法的情况下。但,不论如何,这番操作总会
+% 使您预览到 \cls{njuthesis} 论文模板的实际样式。
%
% \subparagraph{我并没有见到理想的结果。}
-% 具体是哪里不满意?如果是\emph{样式存在偏差},请联系模板的作者;如果\emph{不能访问前文提到的在
-% 线编译网站},请考虑检查网络连接,依次咨询本校
-% \href{https://itsc.nju.edu.cn}{信息化管理建设服务中心} 和该网站的维护者
-% \href{mailto:my@yaoge123.cn}{姚舸老师};如果\emph{报错},请点击左上角的菜单按钮,查看编译器是
-% 否显示为 |XeLaTeX|;再如果\emph{还有其他原因},通过这几分钟的实验我们也可以得到一个相当有益的
-% 结论:\emph{也许 Word 模板更加适合您}。这可以节省下熟悉 \hologo{TeX} 排版软件使用方法所需的可
-% 观时间。
+% 具体是哪里不满意?如果是\emph{样式存在偏差},请联系模板的作者;如果
+% \emph{不能访问前文提到的在线编译网站},请考虑检查网络连接,依次咨询
+% 本校\href{https://itsc.nju.edu.cn}{信息化管理建设服务中心}和该网站
+% 的维护者\href{mailto:my@yaoge123.cn}{姚舸老师};如果\emph{报错},请
+% 点击左上角的菜单按钮,查看编译器是否显示为 |XeLaTeX|;
+% 再如果\emph{还有其他原因},通过这几分钟的实验我们也可以得到一个相当
+% 有益的结论:\emph{也许 Word 模板更加适合您}。这可以节省下熟悉
+% \hologo{TeX} 排版软件使用方法所需的可观时间。
%
% \subparagraph{但我依然对 \hologo{LaTeX} 一无所知!}
-% 这意味着您也许得花些时间在\emph{长篇累牍的精细介绍}上。请接着向后阅读,有需要时善用搜索。
+% 这意味着您也许得花些时间在\emph{长篇累牍的精细介绍}上。
+% 请接着向后阅读,有需要时善用搜索。
%
%
% \subsection{历史沿革}
%
% 十几年来,多位热心校友发布过自己编写的模板,在 GitHub 网站上可考的包括:
% \begin{enumerate}
-% \item 杨文博(\href{http://yangwenbo.com/}{@solrex})的 njuthesis(2010 - 2018) \cite{wenboyang2013}
-% \item \href{https://github.com/fireblue}{@fireblue} 基于杨文博模板的 NJUThesis(2013)\cite{fireblue2013}
-% \item \href{https://github.com/wenhai-zheng}{@wenhai-zheng} 的 NJUThesis(2013)\cite{wenhai-zheng2013}
-% \item 曹增乐(\href{https://github.com/ZLCao}{@ZLCao})的 NJUBachelor(2013 - 2016)\cite{zenglecao2013}
-% \item 胡海星(\href{http://haixing-hu.github.io/}{@Haixing-Hu})的 NJU-Thesis(2013 - 2018)\cite{haixinghu2013}
-% \item 张楚珩(\href{https://github.com/zhangchuheng123}{@zhangchuheng123})基于胡海星模板的 NJUThesis(2016)\cite{chuhengzhang2016}
-% \item 蒋炎岩(\href{http://ics.nju.edu.cn/~jyy/}{@jiangyy})的 njuthesis(2017 - 2019)\cite{yanyanjiang2017}
-% \item \href{https://github.com/njuHan}{@njuHan} 基于胡海星模板的 NJU-Thesis(2018 - 2021)
-% \item 饶安逸(\href{https://anyirao.com/}{@AnyiRao})基于张楚珩模板的 NJU Thesis 2018(2018)\cite{anyirao2018}
-% \item 赵懿晨(\href{https://fengchendian.github.io/about.html}{@FengChendian})基于饶安逸模板的 NJU Thesis 2021(2021)\cite{yichenzhao2021}
+% \item 杨文博(\href{http://yangwenbo.com/}{@solrex})的
+% njuthesis(2010 - 2018) \cite{wenboyang2013}
+% \item \href{https://github.com/fireblue}{@fireblue} 基于杨文博模板的
+% NJUThesis(2013)\cite{fireblue2013}
+% \item \href{https://github.com/wenhai-zheng}{@wenhai-zheng} 的
+% NJUThesis(2013)\cite{wenhai-zheng2013}
+% \item 曹增乐(\href{https://github.com/ZLCao}{@ZLCao})的
+% NJUBachelor(2013 - 2016)\cite{zenglecao2013}
+% \item 胡海星(\href{http://haixing-hu.github.io/}{@Haixing-Hu})的
+% NJU-Thesis(2013 - 2018)\cite{haixinghu2013}
+% \item 张楚珩(\href{https://github.com/zhangchuheng123}{@zhangchuheng123})
+% 基于胡海星模板的 NJUThesis(2016)\cite{chuhengzhang2016}
+% \item 蒋炎岩(\href{http://ics.nju.edu.cn/~jyy/}{@jiangyy})的
+% njuthesis(2017 - 2019)\cite{yanyanjiang2017}
+% \item \href{https://github.com/njuHan}{@njuHan} 基于胡海星模板的
+% NJU-Thesis(2018 - 2021)
+% \item 饶安逸(\href{https://anyirao.com/}{@AnyiRao})基于张楚珩模板的
+% NJU Thesis 2018(2018)\cite{anyirao2018}
+% \item 赵懿晨(\href{https://fengchendian.github.io/about.html}
+% {@FengChendian})基于饶安逸模板的
+% NJU Thesis 2021(2021)\cite{yichenzhao2021}
% \end{enumerate}
% 至于不幸而未进行代码版本管理的,甚至于说以压缩包形式流传于各人硬盘中的,就更不可计数了。
%
@@ -415,28 +439,37 @@ To produce the documentation run the original source files ending with
% \href{https://github.com/nju-lug/NJUThesis}{Github仓库}。仓库内仅包含源代码、
% 空白模板及测试文件,不可直接用于写作。这些文件对应的使用方法请参考
% \ref{subsubsec:on-the-fly-installation}。如果由于网络原因不便访问主仓库,也可
-% 以从\href{https://git.nju.edu.cn/nju-lug/nju-latex-templates/njuthesis}{NJU Git 同步镜像} 获取项目工程文件。
+% 以从 \href{https://git.nju.edu.cn/nju-lug/nju-latex-templates/njuthesis}
+% {NJU Git 同步镜像}获取项目工程文件。
%
% \subparagraph{GitHub Releases}
-% 本模板不定期将已有的新功能和问题修复打包为新的正式发行版,赋以更改后的版本号,发布在 \href{https://github.com/nju-lug/NJUThesis/releases/latest}{Github Releases 页面}。如果由于网络原因不便访问主仓库,也可以从\href{https://mirror.nju.edu.cn/github-release/nju-lug/NJUThesis/LatestRelease/}{南京大学镜像站下载页面}获取。可供下载的文件包括下列三种:
+% 本模板不定期将已有的新功能和问题修复打包为新的正式发行版,赋以更改后的版本号,
+% 发布在 \href{https://github.com/nju-lug/NJUThesis/releases/latest}{Github
+% Releases 页面}。如果由于网络原因不便访问主仓库,也可以从\ignorespaces
+% \href{https://mirror.nju.edu.cn/github-release/nju-lug/NJUThesis/LatestRelease/}
+% {南京大学镜像站下载页面}获取。可供下载的文件包括下列三种:
% \begin{description}
% \item[\file{njuthesis-v*.pdf}] 模板说明文档(本文档)。
-% \item[\file{njuthesis-user-v*.zip}] 交付给用户的完整模板包,包括格式文件和范本文档,可在解压后用于本地编译,也可直接上传至在线编译网站。
-% \item[\file{njuthesis-ctan-v*.zip}] 交付给 CTAN 的源代码包,普通用户请忽略。
+% \item[\file{njuthesis-user-v*.zip}] 交付给用户的完整模板包,
+% 包括格式文件和范本文档,可在解压后用于本地编译,
+% 也可直接上传至在线编译网站。
+% \item[\file{njuthesis-ctan-v*.zip}] 交付给 CTAN 的源代码包,
+% 普通用户请忽略。
% \end{description}
%
%
% \subsubsection{文件构成}
%
-% 本模板由数量众多的文件组成,\emph{所有可能遇到的}文件如表 \ref{tab:njuthesis-files} 所示。
+% 本模板由数量众多的文件组成,\emph{所有可能遇到的}文件如表
+% \ref{tab:njuthesis-files} 所示。
%
% \begin{table}[ht]
% \centering
% \begin{talltblr}[
-% caption = {\cls{njuthesis}文件构成},
-% label = {tab:njuthesis-files},
-% note{a} = {仅供开发使用,并不会在发布版本中出现。}
-% ] {ll}
+% caption = {\cls{njuthesis}文件构成},
+% label = {tab:njuthesis-files},
+% note{a} = {仅供开发使用,并不会在发布版本中出现。}
+% ] { row{1} = {font=\bfseries}, colspec = {ll} }
% \toprule
% 名称 & 说明 \\
% \midrule
@@ -513,8 +546,10 @@ To produce the documentation run the original source files ending with
%
% \subsubsection{安装\hologo{TeX}发行版}
%
-% 首先需要下载并安装 \hologo{TeX} 软件发行版,其中包括引擎、宏包、字体、文档等。各操作系统适用情况请参考表~\ref {tab:texdistribution}。第一次编译前请务必通过 MiKTeX Console、TeX Live
-% Manager 等图形化程序或 \pkg{tlmgr} \emph{手动更新全部宏包}以避免潜在的兼容性问题。
+% 首先需要下载并安装 \hologo{TeX} 软件发行版,其中包括引擎、宏包、字体、
+% 文档等。各操作系统适用情况请参考表~\ref {tab:texdistribution}。第一次
+% 编译前请务必通过 MiKTeX Console、TeX LiveManager 等图形化程序或
+% \pkg{tlmgr} \emph{手动更新全部宏包}以避免潜在的兼容性问题。
% \begin{table}[ht]
% \centering
% \caption{\hologo{TeX} 软件发行版一览}
@@ -533,11 +568,16 @@ To produce the documentation run the original source files ending with
% 以下是一些值得注意的要点:
% \begin{itemize}
% \item 可以参照这份\emph{手把手的教程}\cite{install-latex-guide-zh-cn}。
-% \item 校园网环境中访问\href{https://mirror.nju.edu.cn/download/TeX%20%E6%8E%92%E7%89%88%E7%B3%BB%E7%BB%9F}{南京大学开源软件镜像站}可以获得最佳的下载体验。
+% \item 校园网环境中访问\ignorespaces
+% \href{https://mirror.nju.edu.cn/download/TeX%20排版系统}
+% {南京大学开源软件镜像站}可以获得最佳的下载体验。
% \item 使用最新的发行版,即版本号为2021或者21。
% \item 对于 Windows 和 macOS 用户,更推荐轻量化的 \hologo{MiKTeX} 套件。
-% \item Linux 用户请尽可能下载 full 版本,如 |texlive-full|。换言之,下载最大的软件包。
-% \item 对于一部分用到新版本特性的宏包,\cls{njuthesis} 内置了版本检查\footnote{譬如遇到 l3 过时问题请运行 |tlmgr update l3packages|。},请确认各宏包已升级至最新版。
+% ^^A \item Linux 用户请尽可能下载 full 版本,如 |texlive-full|。
+% ^^A 换言之,下载最大的软件包。
+% \item 对于一部分用到新版本特性的宏包,\cls{njuthesis} 内置了版本检查
+% \footnote{譬如遇到 l3 过时问题请运行 |tlmgr update l3packages|。}
+% ,请确认各宏包已升级至最新版。
% \end{itemize}
%
%
@@ -546,22 +586,30 @@ To produce the documentation run the original source files ending with
%
% 配置完编译器后,还需要一个\emph{文本编辑器}来完成 \file{.tex} 文件内容的写作。
%
-% 关于具体使用哪一种,至今仍有相当一部分人认为Windows自带的\emph{记事本}是最好的
-% 文本编辑器。但对于本项目而言,在此诚心诚意地推荐您使用\emph{更现代更美观更多功
-% 能}的编辑器,譬如\emph{安装了 LaTeX Workshop 插件的 \href{https://code.visualstudio.com/}{Visual Studio Code}}。您也可以根据个人的喜好随意使用 TeXworks、TeXstudio 等编辑器,顺手就行。
+% 关于具体使用哪一种,至今仍有相当一部分人认为Windows自带的\emph{记事本}是
+% 最好的文本编辑器。但对于本项目而言,在此诚心诚意地推荐您使用\emph{更现代
+% 更美观更多功能}的编辑器,譬如\emph{安装了 \hologo{LaTeX} Workshop 插件的
+% \href{https://code.visualstudio.com/}{Visual Studio Code}}。您也可以根据
+% 个人的喜好随意使用 TeXworks、TeXstudio 等编辑器,顺手就行。
%
% \cls{njuthesis} 为一些常见编辑器提供了配置文件,如
% \begin{description}
-% \item[Visual Studio Code] 本模板在 \file{.vscode/} 中提供一份 \hologo{LaTeX} Workshop 插件的简易配置,在打开文件夹后将自动导入,可以省略初始配置步骤直接使用。
-% \item[TeXstudio] 本模板提供 \file{conf.txsprofile},可以使用快捷键 |alt+O+P| 导入配置文件。为了简化流程\footnote{当然,也可以设置为使用 \hologo{XeLaTeX} 编译,然后按照 \ref{subsubsec:compileseq} 内容使用快捷键 |F8| 手动编译参考文献。},该配置文件使用 \pkg{latexmk},第一次编译前请参考下一节内容安装 Perl。
+% \item[Visual Studio Code] 本模板在 \file{.vscode/} 中提供一份
+% \hologo{LaTeX} Workshop 插件的简易配置,在打开文件夹后将自动导入,
+% 可以省略初始配置步骤直接使用。
+% \item[TeXstudio] 本模板提供 \file{conf.txsprofile},可以使用快捷键
+% |alt+O+P| 导入配置文件。为了简化流程\footnote{当然,也可以设置
+% 为使用 \hologo{XeLaTeX} 编译,然后按照 \ref{subsubsec:compileseq}
+% 内容使用快捷键 |F8| 手动编译参考文献。},该配置文件使用
+% \pkg{latexmk},第一次编译前请参考下一节内容安装 Perl。
% \end{description}
%
%
% \subsubsection{编译顺序}
% \label{subsubsec:compileseq}
-% \hologo{TeX} 本身是命令行程序,通过不同的命令调用所需的编译引擎,编辑器提供的
-% 快捷按钮实际只是做了包装。为了便于排查运行错误,以下通过具体终端命令简要描述编
-% 译过程。
+% \hologo{TeX} 本身是命令行程序,通过不同的命令调用所需的编译引擎,
+% 编辑器提供的快捷按钮实际只是做了包装。为了便于排查运行错误,
+% 以下通过具体终端命令简要描述编译过程。
%
% 编译本模板的过程可以概括为下述步骤:
% \begin{enumerate}
@@ -570,8 +618,9 @@ To produce the documentation run the original source files ending with
% \item 生成页码、编号、目录
% \item 将参考文献列表页插入目录
% \end{enumerate}
-% 总计需要编译四次。\emph{假设即将使用的主文件名为 \file{njuthesis-sample.tex}},应采用以
-% 下命令顺序进行编译,以生成内容正确的 \file{njuthesis-sample.pdf}。输出的 PDF
+% 总计需要编译四次。\emph{假设即将使用的主文件名为
+% \file{njuthesis-sample.tex}},应采用以下命令顺序进行编译,
+% 以生成内容正确的 \file{njuthesis-sample.pdf}。输出的 PDF
% 文档位于同一目录下。该目录下同时会生成若干中间文件。
%
% 编译命令具体为引擎名称加主文件名,在编译 \file{.tex} 文件时,
@@ -604,10 +653,13 @@ To produce the documentation run the original source files ending with
%
%
% \subparagraph{使用 \pkg{latexmk}}
-% \pkg{latexmk}\cite{latexmk} 是一个基于 Perl 脚本的自动编译工具,宗旨是通过单一命令简化上述的多次编译流程。在使用该命令前,请确保安装了以下软件:
+% \pkg{latexmk}\cite{latexmk} 是一个基于 Perl 脚本的自动编译工具,
+% 宗旨是通过单一命令简化上述的多次编译流程。
+% 在使用该命令前,请确保安装了以下软件:
% \begin{description}
-% \item[Perl] 一般预装于 macOS 和 Linux,而 Windows 用户需要单独安装 \href{https://strawberryperl.com/}{Strawberry Perl}。
-% \item[\pkg{latexmk}] \hologo{MiKTeX} 已预装;如果终端找不到 |latexmk| 命令,\hologo{TeX}\,Live 用户需使用 \pkg{tlmgr} 单独安装。
+% \item[Perl] 一般预装于 macOS 和 Linux,而 Windows 用户需要单独安装
+% \href{https://strawberryperl.com/}{Strawberry Perl}。
+% \item[\pkg{latexmk}] 如果终端找不到 |latexmk| 命令,需使用包管理器单独安装。
% \end{description}
%
% 该命令的使用方法为
@@ -817,23 +869,26 @@ To produce the documentation run the original source files ending with
% \begin{table}[htbp]
% \centering
% \begin{talltblr}[
-% caption = {中文字体配置列表},
-% label = {tab:cjk-fontset},
-% note{a} = {请下载简繁扩展(即 GBK 编码)版本},
-% note{b} = {使用
-% \href{http://www.foundertype.com/index.php/FontInfo/index/id/164}{方正小标宋}
-% 作为方正书宋的粗体},
-% note{c} = {使用
-% \href{http://www.foundertype.com/index.php/FontInfo/index/id/131}{方正黑体}
-% 作为方正细黑一的粗体},
-% note{d} = {在部分操作系统中可能已经预装 Google Noto 字体。考虑到获取字体的难易程度,单独安装时请采用
+% caption = {中文字体配置列表},
+% label = {tab:cjk-fontset},
+% note{a} = {请下载简繁扩展(即 GBK 编码)版本},
+% note{b} = {使用\ignorespaces
+% \href{http://www.foundertype.com/index.php/FontInfo/index/id/164}
+% {方正小标宋}作为方正书宋的粗体},
+% note{c} = {使用\ignorespaces
+% \href{http://www.foundertype.com/index.php/FontInfo/index/id/131}
+% {方正黑体}作为方正细黑一的粗体},
+% note{d} = {在部分操作系统中可能已经预装 Google Noto 字体。
+% 考虑到获取字体的难易程度,单独安装时请采用
% \href{https://mirrors.nju.edu.cn/download/Adobe%20Source%20Han}{Adobe Source Han}
% 字体表示思源字体,请下载 Simplified Chinese(即后缀名为 SC)的版本},
% note{e} = {思源字体并不包含楷书和仿宋,而 Adobe 楷体和仿宋难以直接下载,
-% 因此使用方正字体代替},
-% ] { cell{2}{2,4} = {white!70!njuyellow}, cell{4}{4} = {white!70!njuyellow}, colspec = {ccccc} }
+% 因此使用方正字体代替} ]
+% { cell{2}{2,4} = {white!70!njuyellow},
+% cell{4}{4} = {white!70!njuyellow},
+% row{1} = {font=\bfseries}, colspec = {ccccc} }
% \toprule
-% \bf 配置名称 & \bf 宋体 & \bf 黑体 & \bf 楷书 & \bf 仿宋 \\
+% 配置名称 & 宋体 & 黑体 & 楷书 & 仿宋 \\
% \midrule
% Windows & 中易宋体 & 中易黑体 & 中易楷体 & 中易仿宋 \\
% macOS & 华文宋体 & 华文黑体 & 华文楷体 & 华文仿宋 \\
@@ -847,7 +902,7 @@ To produce the documentation run the original source files ending with
% \href{https://github.com/adobe-fonts}{思源}\TblrNote{d}
% & \href{https://mirrors.nju.edu.cn/adobe-fonts/source-han-serif/OTF/SimplifiedChinese/}{思源宋体}
% & \href{https://mirrors.nju.edu.cn/adobe-fonts/source-han-sans/OTF/SimplifiedChinese/}{思源黑体}
-% & 方正楷体\TblrNote{e} & 方正仿宋 \\
+% & 方正楷体\TblrNote{e} & 方正仿宋 \\
% \bottomrule
% \end{talltblr}
% \end{table}
@@ -903,9 +958,17 @@ To produce the documentation run the original source files ending with
% title = \Arg{标题}
% title* = \Arg{英文标题}
% \end{syntax}
-% 题目。由于封面上提供给中文题目的横线长度有限\footnote{单行最长为15个汉字,建议总长度不超过45字},本模板默认会自动对标题进行换行。如果需要手动制定换行位点,请使用换行控制符( |\\| ),最多两处。
+% 题目。由于封面上提供给中文题目的横线长度有限\footnote{单行最长为15个汉字,建议总长度不超过45字},本模板默认会自动对标题进行换行。如果需要手动指定换行位点,请使用换行控制符( |\\| ),最多两处。
% \end{function}
%
+% 绘制封面及摘要中的标题涉及断行处理,无法对空字符串产生正确结果。
+% 因而在手动将标题设置为空时,本模板将抛出如下错误:
+% \begin{shellexample}[deletekeywords={in}]
+% ! Package njuthesis Error: The title should not be left blank.
+% (njuthesis) Please check whether you have fill in both
+% (njuthesis) Chinese and English titles.
+% \end{shellexample}
+%
% \begin{function}[updated=2021-10-01]{info/keywords,info/keywords*}
% \begin{syntax}
% keywords = \Arg{关键词}
@@ -1434,7 +1497,8 @@ To produce the documentation run the original source files ending with
% \item[著者-出版年制] 正文引用的文献采用著者-出版年制时,各篇文献的标注内容由著者姓氏与出版年构成,并置于"()"内。参考文献表采用著者-出版年制组织时,各篇文献首先按文种集中,然后按著者字顺和出版年排列。
% \end{description}
%
-% 对于本科生而言,学校规定文件表明参考文献表应当“用数字加方括号表示”\cite{nju2021},符合顺序编码制的格式,保持默认设置即可。
+% 对于本科生而言,学校规定文件表明参考文献表应当“用数字加方括号
+% 表示”\cite{nju2021},符合顺序编码制的格式,保持默认设置即可。
%
% \begin{function}[added=2022-02-15]{bib/option}
% \begin{syntax}
@@ -1450,18 +1514,22 @@ To produce the documentation run the original source files ending with
% \begin{syntax}
% resource = \Arg{文件}
% \end{syntax}
-% 参考文献数据源。类似于 \tn{addbibresource} 命令,但可以使用逗号分隔的列表形式。必须使用带扩展名(\file{.bib})的完整文件名。
+% 参考文献数据源。类似于 \tn{addbibresource} 命令,但可以使用逗号分隔的
+% 列表形式。必须使用带扩展名(\file{.bib})的完整文件名。
% \end{function}
%
% \begin{function}{\addbibresource}
% \begin{syntax}
% \tn{addbibresource}\Arg{文件}
% \end{syntax}
-% 添加参考文献源文件。为了与 \pkg{biblatex} 进行兼容,也可使用本命令添加数据源。本命令不支持逗号分隔多个文件的形式,如果希望额外添加参考文献列表,需要在导言区中多次调用。
+% 添加参考文献源文件。为了与 \pkg{biblatex} 进行兼容,也可使用本命令
+% 添加数据源。本命令不支持逗号分隔多个文件的形式,如果希望额外添加参
+% 考文献列表,需要在导言区中多次调用。
% \end{function}
%
% 可以参考如下范例进行参考文献设置。
-% 其中 \opt{bib/option} 的内容旨在关闭部分不需显示的文献信息,可根据需要使用。
+% 其中 \opt{bib/option} 的内容旨在关闭部分不需显示的文献信息,
+% 并采取仅首字母大写的作者姓名格式,可根据需要使用。
% \begin{latexexample}[moretexcs={\njusetup},emph={[2]bib}]
% \njusetup {
% bib = {
@@ -1471,7 +1539,8 @@ To produce the documentation run the original source files ending with
% doi = false,
% isbn = false,
% url = false,
-% eprint = false
+% eprint = false,
+% gbnamefmt = lowercase
% }
% }
% }
@@ -1516,40 +1585,43 @@ To produce the documentation run the original source files ending with
% 引用命令 \tn{cite} 含有多个变体,以便使用文献条目中不同的信息域。在两种参考文献样式下,这些命令的行为具体存在一些差异,详见表 \ref{tab:numeric-style} 和表 \ref{tab:author-year-style}。
%
% \begin{table}[ht]
-% \caption{顺序编码制下的引用样式}
-% \label{tab:numeric-style}
% \centering
-% \begin{tblr}{cll}
+% \begin{talltblr} [
+% caption = {顺序编码制下的引用样式},
+% label = {tab:numeric-style} ]
+% { row{1} = {font=\bfseries}, colspec = {cll} }
% \toprule
-% \bf 引用方式 & \bf 命令 & \bf 排版效果 \\
+% 引用方式 & 命令 & 排版效果 \\
% \midrule
-% 单篇文献 & \tn{cite} & 上标可设置页码 \\
-% 单篇文献 & \tn{parencite} & 非上标可设置页码 \\
-% 多篇文献 & \tn{cite} & 上标,逗号隔开或短横线连接 \\
-% 标注页码 & \tn{pagescite} & 上标加自动页码 \\
-% 标注作者 & \tn{textcite} & 作者为主语加非上标编号 \\
-% 标注作者 & \tn{authornumcite} & 作者为主语加上标编号 \\
-% 完整脚注 & \tn{footfullcite} & 脚注方式 \\
+% 单篇文献 & \tn{cite} & 上标可设置页码 \\
+% 单篇文献 & \tn{parencite} & 非上标可设置页码 \\
+% 多篇文献 & \tn{cite} & 上标,逗号隔开或短横线连接 \\
+% 标注页码 & \tn{pagescite} & 上标加自动页码 \\
+% 标注作者 & \tn{textcite} & 作者为主语加非上标编号 \\
+% 标注作者 & \tn{authornumcite} & 作者为主语加上标编号 \\
+% 完整脚注 & \tn{footfullcite} & 脚注方式 \\
% \bottomrule
-% \end{tblr}
+% \end{talltblr}
% \end{table}
%
% \begin{table}[ht]
% \centering
-% \begin{talltblr}[
-% caption = {著者-出版年制下的引用样式},
-% label = {tab:author-year-style},
-% note{a} = {在此样式下 \tn{parencite} 效果等同于 \tn{cite}} ] {cll}
+% \begin{talltblr} [
+% caption = {著者-出版年制下的引用样式},
+% label = {tab:author-year-style},
+% note{a} = {在此样式下 \tn{parencite} 效果等同于 \tn{cite}。} ]
+% { row{1} = {font=\bfseries}, colspec = {cll} }
% \toprule
-% \bf 引用方式 & \bf 命令 & \bf 排版效果 \\
+% 引用方式 & 命令 & 排版效果 \\
% \midrule
-% 单篇文献 & \tn{cite}\TblrNote{a} & 作者加年份用括号包围可设置页码 \\
-% 多篇文献 & \tn{cite} & 分号隔开 \\
-% 标注页码 & \tn{pagescite} & 作者加年份用括号包围自动页码 \\
-% 标注年份 & \tn{yearcite} & 用括号包围的年份 \\
-% 标注年份、页码 & \tn{yearpagescite} & 提供年份用括号包围自动页码 \\
-% 标注作者 & \tn{textcite} & 作者为主语加加括号包围年份 \\
-% 完整脚注 & \tn{footfullcite} & 脚注方式 \\
+% 单篇文献 & \tn{cite}\TblrNote{a} &
+% 作者加年份用括号包围可设置页码 \\
+% 多篇文献 & \tn{cite} & 分号隔开 \\
+% 标注页码 & \tn{pagescite} & 作者加年份用括号包围自动页码 \\
+% 标注年份 & \tn{yearcite} & 用括号包围的年份 \\
+% 标注年份、页码 & \tn{yearpagescite} & 提供年份用括号包围自动页码 \\
+% 标注作者 & \tn{textcite} & 作者为主语加加括号包围年份 \\
+% 完整脚注 & \tn{footfullcite} & 脚注方式 \\
% \bottomrule
% \end{talltblr}
% \end{table}
@@ -1632,6 +1704,24 @@ To produce the documentation run the original source files ending with
% 关闭此选项后摘要页将不会出现在目录中,仅保留其 PDF 书签。
% \end{function}
%
+% \begin{function}[added=2022-03-26]{style/abstract-title}
+% \begin{syntax}
+% abstract-title = <(strict)|centered|natural>
+% \end{syntax}
+% 选择研究生摘要标题样式。
+% 默认为严格模式(\opt{strict}),即完全模仿材料包要求。
+% \end{function}
+%
+% 材料包中的 Word 空白模板仅有两行空白下划线。
+% 根据填写习惯的不同,模板预置了三种样式:
+% \begin{itemize}
+% \item \opt{strict},在两行空白下划线上左对齐填写标题。
+% 如果该标题不足一行,则第二行下划线留空;
+% 如果长度超出两行,则向后延伸并抛出一个警告信息。
+% \item \opt{centered},将严格模式的左对齐改为居中。
+% \item \opt{natural},仅居中标题,不做行数检查。
+% 本模式更适合较短的题目。
+% \end{itemize}
%
% \subsubsection{前言页}
%
@@ -1801,6 +1891,8 @@ To produce the documentation run the original source files ending with
% \begin{itemize}
% \item \pkg{natbib} 和 \pkg{gbt7714} 等 \hologo{BibTeX} 相关的参考文献宏包。
% \item \pkg{bm} 等使用传统数学字体配置方案的宏包。
+% \item \pkg{babel} 在直接使用时会覆盖默认的中文名称设置。
+% \item \pkg{microtype} 在 \hologo{XeTeX} 和 \hologo{LuaTeX} 下支持有限。
% \end{itemize}
%
%
@@ -2014,7 +2106,7 @@ To produce the documentation run the original source files ending with
%
%
% \end{documentation}
-%
+% \clearpage
%
% \begin{implementation}
%
@@ -2106,12 +2198,13 @@ To produce the documentation run the original source files ending with
% \end{variable}
%
% \begin{variable}{\l_@@_info_degree_tl,\l_@@_info_diploma_tl,
-% \l_@@_info_type_tl}
+% \l_@@_info_type_tl,\l_@@_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
% \end{macrocode}
% \end{variable}
%
@@ -2283,7 +2376,7 @@ To produce the documentation run the original source files ending with
\cs_new_protected:Npn \@@_ulined_center_box:nn #1#2
{
\mode_leave_vertical:
- \rule [ -0.5 ex ] { #1 } { 0.4 pt }
+ \rule [ -0.55 ex ] { #1 } { 0.4 pt }
\skip_horizontal:n { -#1 }
\hbox_to_wd:nn { #1 } { \hfil #2 \hfil }
}
@@ -2358,7 +2451,7 @@ To produce the documentation run the original source files ending with
\cs_new_protected:Npn \@@_uline:n #1
{
\mode_leave_vertical:
- \rule [ -0.5 ex ] { #1 } { 0.4 pt }
+ \rule [ -0.55 ex ] { #1 } { 0.4 pt }
\skip_horizontal:n { -#1 }
}
% \end{macrocode}
@@ -2469,6 +2562,16 @@ To produce the documentation run the original source files ending with
% \subsubsection{封面相关}
% \changes{v0.16}{2022/03/10}{将封面和摘要内部函数定义移动到前部。}
%
+% 定义关于标题的报错信息。
+% \begin{macrocode}
+\msg_new:nnn { njuthesis } { missing-title }
+ {
+ The~ title~ should~ not~ be~ left~ blank.\\
+ Please~ check~ whether~ you~ have~ fill~ in~
+ both~ Chinese~ and~ English~ titles.
+ }
+% \end{macrocode}
+%
% \begin{macro}{\@@_split_title:n,\@@_split_title:V}
% 分割标题。
% \begin{macrocode}
@@ -2505,6 +2608,8 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\cs_new_protected:Npn \@@_multiline_title:nnn #1#2#3
{
+ \tl_if_empty:NT \l_@@_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:
@@ -2612,6 +2717,77 @@ To produce the documentation run the original source files ending with
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\@@_uline_box:}
+% 用于摘要标题的下划线盒子。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_uline_box:
+ { \vtop{\box1\kern-\prevdepth\kern0.5ex\hrule} }
+% \end{macrocode}
+% \end{macro}
+%
+% 定义关于标题的报错信息。
+% \begin{macrocode}
+\msg_new:nnn { njuthesis } { abs-title-too-long }
+ {
+ Your~ title~ is~ too~ long~ to~ fit~ in~ two~ lines.\\
+ I~ have~ drawn~ additional~ lines~ to~ contain~ it,~
+ which~ will~ probably~ make~ your~ abstract~ page~
+ look~ slightly~ different~ from~ the~ standard.\\
+ You~ can~ use~ the~ "style/abstract-title"~ key~
+ to~ disable~ this~ message.
+ }
+% \end{macrocode}
+%
+% \begin{macro}{\@@_uline_list:nnn,\@@_uline_list:xnn}
+% \changes{v0.16}{2022/03/25}{使用原生断行算法处理摘要页标题。}
+% 用于研究生摘要页面的多行标题。
+% \begin{arguments}
+% \item 标签名
+% \item 内容
+% \item 左边距
+% \end{arguments}
+% 这里使用了 Primitive \TeX{} 语法以利用原生的断行算法\footnote{\url{https://tex.stackexchange.com/questions/637861/underline-list-item-to-page-width}}。
+% 对其语法的简要介绍可以参考 \href{http://petr.olsak.net/ftp/olsak/optex/tex-nutshell.pdf}{\file{tex-nutshell.pdf}}。
+% \begin{macrocode}
+\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
+ \leftskip=#3 \rightskip=\leftskip \parindent=\z@ #2\par
+ \global\setbox2=\hbox{}
+ \int_gzero:N \l_@@_tmp_int
+ \loop
+ \setbox1=\lastbox \unskip\unpenalty
+ \unless\ifvoid1
+ \global\setbox2=\hbox{\@@_uline_box:\penalty0\unhbox2}
+ \int_gincr:N \l_@@_tmp_int
+ \repeat
+ }
+ {
+ \noindent\copy\l_@@_tmp_box\unhbox2
+% \end{macrocode}
+% 在使用自然断行算法后,研究生的摘要标题可选择 \opt{strict}
+% 或者 \opt{natural} 模式。前者会为少于两行的标题补齐下划线,
+% 并对多于三行的标题生成警告信息。这里通过行数处理边界条件,
+% 包括标题未填写、标题只有一行,以及标题过长的情况。
+% \begin{macrocode}
+ \bool_if:NT \g_@@_strict_abs_title_bool
+ {
+ \int_case:nnF { \l_@@_tmp_int }
+ {
+ { 0 } { \msg_error:nn { njuthesis } { missing-title } }
+ { 1 } { \@@_uline:n { \textwidth } }
+ { 2 } { \prg_do_nothing: }
+ }
+ { \msg_warning:nn { njuthesis } { abs-title-too-long } }
+ \par
+ }
+ }
+ }
+\cs_generate_variant:Nn \@@_uline_list:nnn { xnn }
+% \end{macrocode}
+% \end{macro}
+%
%
% \subsection{页面对象}
% \changes{v0.15}{2022/01/24}{使用 \pkg{xtemplate} 重构封面。}
@@ -3035,10 +3211,10 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\msg_new:nnn { njuthesis } { load-config }
{ I~ am~ loading~ config~ file~ "#1". }
-\clist_if_empty:NF \g_@@_config_clist
+\clist_map_inline:Nn \g_@@_config_clist
{
- \msg_info:nnx { njuthesis } { load-config } { \g_@@_config_tl }
- \clist_map_inline:Nn \g_@@_config_clist { \file_input:n { #1 } }
+ \msg_info:nnn { njuthesis } { load-config } { #1 }
+ \file_input:n { #1 }
}
% \end{macrocode}
%
@@ -3060,6 +3236,7 @@ To produce the documentation run the original source files ending with
title .tl_set:N = \l_@@_info_title_tl,
title .initial:n = { 空 },
title* .tl_set:N = \l_@@_info_title_en_tl,
+ title* .initial:n = { Empty },
% \end{macrocode}
% \end{macro}
%
@@ -3166,7 +3343,9 @@ To produce the documentation run the original source files ending with
% 设置类型信息。
% \begin{macrocode}
\tl_set:Nx \l_@@_info_type_tl
- { \clist_item:Nn \c_@@_name_type_clist { \g_@@_info_type_int } }
+ { \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 } }
% \end{macrocode}
@@ -4539,7 +4718,7 @@ To produce the documentation run the original source files ending with
\@@_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 } \\
- V { 3.2 em } { } { \c_@@_name_udc_tl } \@@_hskip:
+ \@@_spread_box:nnV { 3.2 em } { } \c_@@_name_udc_tl \@@_hskip:
\@@_ulined_center_box:nn { 9 em } { \l_@@_info_udc_tl } \hfill \null
}
% \end{macrocode}
@@ -4853,8 +5032,9 @@ To produce the documentation run the original source files ending with
%<definition-g> content = \@@_abs_info_g:n { : },
%<definition-ug> format = \zihao { -4 } \kaishu,
%<definition-g> format = \zihao { 4 } \kaishu,
- align = l,
- bottom-skip = 1 cm
+%<definition-ug> bottom-skip = 1 cm,
+%<definition-g> bottom-skip = 2 cm,
+ align = l
}
% \end{macrocode}
% \end{macro}
@@ -4880,8 +5060,9 @@ To produce the documentation run the original source files ending with
%<definition-g> content = \@@_abs_info_en_g:n { :~ },
%<definition-ug> format = \zihao { -4 },
%<definition-g> format = \zihao { 4 },
- align = l,
- bottom-skip = 1 cm
+%<definition-ug> bottom-skip = 1 cm,
+%<definition-g> bottom-skip = 2 cm,
+ align = l
}
%</(definition-ug|definition-g)>
% \end{macrocode}
@@ -4926,6 +5107,30 @@ To produce the documentation run the original source files ending with
% \paragraph{研究生}
% \changes{v0.13}{2021/12/12}{使用 \hologo{LaTeX3} 语法重构研究生摘要。}
%
+% \begin{macro}{abstract/mark}
+% 英文摘要标题实例。
+% \begin{macrocode}
+\@@_declare_element:nn { abstract / mark }
+ {
+ content = \c_@@_name_abstract_b_tl,
+ format = \sffamily \zihao { -3 },
+ bottom-skip = 1 cm
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{abstract/en/mark}
+% 英文摘要标题实例。
+% \begin{macrocode}
+\@@_declare_element:nn { abstract / en / mark }
+ {
+ content = \c_@@_name_abstract_b_en_tl,
+ format = \sffamily \zihao { -3 },
+ bottom-skip = 1 cm
+ }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\@@_abs_info_g:n}
% 绘制研究生中文摘要信息栏。
% \begin{arguments}
@@ -4936,15 +5141,12 @@ To produce the documentation run the original source files ending with
%<*definition-g>
\cs_new_protected:Npn \@@_abs_info_g:n #1
{
- \@@_full_uline:NV \l_@@_tmp_dim
+ \@@_uline_list:xnn
{
\clist_item:Nn \c_@@_name_type_clist { \g_@@_info_type_int }
\c_@@_name_title_a_tl #1
}
- \@@_ulined_center_box:nn { \l_@@_tmp_dim }
- { \tl_range:Nnn \l_@@_info_title_tl { 1 } { 20 } } \\
- \@@_uline:n { \textwidth } \@@_qquad:
- \tl_range:Nnn \l_@@_info_title_tl { 21 } { -1 } \\
+ { \l_@@_info_title_tl } { \g_@@_abs_title_left_skip }
% \end{macrocode}
% 专业、年级、姓名。
% \begin{macrocode}
@@ -4977,21 +5179,16 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\cs_new_protected:Npn \@@_abs_info_en_g:n #1
{
- \@@_full_uline:NV \l_@@_tmp_dim
- { \clist_item:Nn \c_@@_name_type_en_clist
- { \g_@@_info_type_int } #1 }
- \@@_ulined_center_box:nn { \l_@@_tmp_dim }
- { \tl_range:Nnn \l_@@_info_title_en_tl { 1 } { 40 } } \\
- \@@_uline:n { \textwidth } \@@_qquad:
- \tl_range:Nnn \l_@@_info_title_en_tl { 41 } { -1 }
+ \@@_uline_list:xnn { \l_@@_info_type_en_tl #1 }
+ { \l_@@_info_title_en_tl } { \g_@@_abs_title_left_skip }
% \end{macrocode}
% 使用循环输出专业、姓名、导师。注意这里将 |\\| 放置在前部,
% 以避免末尾生成多余的换行符产生 |Underfull \vbox| 信息。
% \begin{macrocode}
\clist_map_inline:nn { major, author, supv_full }
- { \\
+ {
\@@_uline_entry:Nnnn \l_@@_tmp_dim
- { ##1 _en } { ##1 _en } { #1 }
+ { ##1 _en } { ##1 _en } { #1 } \par
}
}
%</definition-g>
@@ -5016,7 +5213,7 @@ To produce the documentation run the original source files ending with
% \end{macrocode}
% 关键词列表的悬挂缩进样式由 \tn{list} 环境产生。
% \begin{macrocode}
- \list { }
+ \list { \l_@@_tmp_tl }
{
\labelwidth \l_@@_tmp_dim
\labelsep \c_zero_dim
@@ -5028,8 +5225,7 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\cs_set_eq:NN \makelabel \textbf
}
- \item [ \l_@@_tmp_tl ]
- \clist_use:cn { l_@@_info_keywords #1 _clist } { #2 }
+ \item \clist_use:cn { l_@@_info_keywords #1 _clist } { #2 }
\endlist
}
%</class>
@@ -5038,6 +5234,7 @@ To produce the documentation run the original source files ending with
%
%
% \subsubsection{绘制摘要}
+% \changes{v0.16}{2022/03/26}{补上研究生摘要页面的小标题。}
%
% \begin{macro}{\@@_make_abstract:,\@@_make_abstract_en:}
% 绘制摘要页面。
@@ -5047,11 +5244,13 @@ To produce the documentation run the original source files ending with
{
\UseInstance { nju } { abstract / title }
\UseInstance { nju } { abstract / info }
+%<definition-g> \UseInstance { nju } { abstract / mark }
}
\cs_new_protected:Npn \@@_make_abstract_en:
{
\UseInstance { nju } { abstract / en / title }
\UseInstance { nju } { abstract / en / info }
+%<definition-g> \UseInstance { nju } { abstract / en / mark }
}
%</(definition-ug|definition-g)>
% \end{macrocode}
@@ -5060,8 +5259,15 @@ To produce the documentation run the original source files ending with
%
% \subsubsection{用户接口}
%
+% \begin{macro}{\g_@@_abs_title_left_skip}
+% 研究生摘要标题左边距。
% \begin{macrocode}
%<*class>
+\skip_new:N \g_@@_abs_title_left_skip
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
\keys_define:nn { nju / style }
{
% \end{macrocode}
@@ -5069,8 +5275,32 @@ To produce the documentation run the original source files ending with
% \changes{v0.15}{2022/02/04}{可选择摘要是否出现在目录中。}
% 是否将摘要添加到目录。
% \begin{macrocode}
- abstract-in-toc .bool_gset:N = \g_@@_abs_in_toc_bool,
- abstract-in-toc .initial:n = true
+ abstract-in-toc .bool_gset:N = \g_@@_abs_in_toc_bool,
+ abstract-in-toc .initial:n = true,
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{style/abstract-title}
+% \changes{v0.16}{2022/03/26}{可选择研究生摘要标题样式。}
+% 选择摘要样式,默认为 \opt{strict}。
+% \begin{macrocode}
+ abstract-title .choice:,
+ abstract-title / strict .code:n =
+ {
+ \bool_gset_true:N \g_@@_strict_abs_title_bool
+ \skip_gset:Nn \g_@@_abs_title_left_skip { 1 em }
+ },
+ abstract-title / centered .code:n =
+ {
+ \bool_gset_true:N \g_@@_strict_abs_title_bool
+ \skip_gset:Nn \g_@@_abs_title_left_skip { 0 pt plus 1 fill }
+ },
+ abstract-title / natural .code:n =
+ {
+ \bool_gset_false:N \g_@@_strict_abs_title_bool
+ \skip_gset:Nn \g_@@_abs_title_left_skip { 0 pt plus 1 fill }
+ },
+ abstract-title .initial:n = strict
}
% \end{macrocode}
% \end{macro}
@@ -5262,6 +5492,8 @@ To produce the documentation run the original source files ending with
{ abstract } { 摘要 } { ABSTRACT },
% 用于书签的摘要名称字样
{ abstract_a } { 中文摘要 } { ABSTRACT },
+ % 用于小标题的摘要名称字样
+ { abstract_b } { 摘\qquad{}要 } { ABSTRACT },
{ appendix } { 附录 } { appendix },
{ dept } { 院系 } { DEPARTMENT },
{ figure } { 图 } { figure },
diff --git a/Master/texmf-dist/source/latex/njuthesis/njuthesis.ins b/Master/texmf-dist/source/latex/njuthesis/njuthesis.ins
index 1d947d360e7..5efc57a52f8 100644
--- a/Master/texmf-dist/source/latex/njuthesis/njuthesis.ins
+++ b/Master/texmf-dist/source/latex/njuthesis/njuthesis.ins
@@ -76,6 +76,18 @@ To produce the documentation run the original source files ending with
\Msg{*************************************************************}
\endbatchfile
+\__nju_declare_element:nn { abstract / mark }
+ {
+ content = \c__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,
+ format = \sffamily \zihao { -3 },
+ bottom-skip = 1 cm
+ }
\endinput
%%
%% End of file `njuthesis.ins'.
diff --git a/Master/texmf-dist/tex/latex/njuthesis/njuthesis-graduate.def b/Master/texmf-dist/tex/latex/njuthesis/njuthesis-graduate.def
index 157092684d5..b9dcd1d837a 100644
--- a/Master/texmf-dist/tex/latex/njuthesis/njuthesis-graduate.def
+++ b/Master/texmf-dist/tex/latex/njuthesis/njuthesis-graduate.def
@@ -23,7 +23,7 @@
%% To produce the documentation run the original source files ending with
%% `.dtx' through XeTeX.
%%
-\GetIdInfo $Id: njuthesis.dtx 0.16.0 2022-03-19 12:00:00 +0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
+\GetIdInfo $Id: njuthesis.dtx 0.16.1 2022-03-27 13:00:00 +0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
{Graduate definition file for njuthesis}
\ProvidesExplFile{njuthesis-graduate.def}
{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
@@ -165,7 +165,7 @@
\__nju_ulined_center_box:nn { 9 em } { \l__nju_info_clc_tl } \hfill
\__nju_spread_box:nnV { 3.2 em } { } \c__nju_name_seclv_tl \__nju_hskip:
\__nju_ulined_center_box:nn { 9 em } { \l__nju_info_seclv_tl } \\
- V { 3.2 em } { } { \c__nju_name_udc_tl } \__nju_hskip:
+ \__nju_spread_box:nnV { 3.2 em } { } \c__nju_name_udc_tl \__nju_hskip:
\__nju_ulined_center_box:nn { 9 em } { \l__nju_info_udc_tl } \hfill \null
}
\cs_new_protected:Npn \__nju_cover_title_nl:
@@ -258,8 +258,8 @@
{
content = \__nju_abs_info_g:n { : },
format = \zihao { 4 } \kaishu,
- align = l,
- bottom-skip = 1 cm
+ bottom-skip = 2 cm,
+ align = l
}
\__nju_declare_element:nn { abstract / en / title }
{
@@ -271,20 +271,29 @@
{
content = \__nju_abs_info_en_g:n { :~ },
format = \zihao { 4 },
- align = l,
+ bottom-skip = 2 cm,
+ align = l
+ }
+\__nju_declare_element:nn { abstract / mark }
+ {
+ content = \c__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,
+ format = \sffamily \zihao { -3 },
bottom-skip = 1 cm
}
\cs_new_protected:Npn \__nju_abs_info_g:n #1
{
- \__nju_full_uline:NV \l__nju_tmp_dim
+ \__nju_uline_list:xnn
{
\clist_item:Nn \c__nju_name_type_clist { \g__nju_info_type_int }
\c__nju_name_title_a_tl #1
}
- \__nju_ulined_center_box:nn { \l__nju_tmp_dim }
- { \tl_range:Nnn \l__nju_info_title_tl { 1 } { 20 } } \\
- \__nju_uline:n { \textwidth } \__nju_qquad:
- \tl_range:Nnn \l__nju_info_title_tl { 21 } { -1 } \\
+ { \l__nju_info_title_tl } { \g__nju_abs_title_left_skip }
\__nju_full_uline:NV \l__nju_tmp_dim
{
\__nju_ulined_center_box:nn { 11 em } { \l__nju_info_major_tl }
@@ -301,28 +310,25 @@
}
\cs_new_protected:Npn \__nju_abs_info_en_g:n #1
{
- \__nju_full_uline:NV \l__nju_tmp_dim
- { \clist_item:Nn \c__nju_name_type_en_clist
- { \g__nju_info_type_int } #1 }
- \__nju_ulined_center_box:nn { \l__nju_tmp_dim }
- { \tl_range:Nnn \l__nju_info_title_en_tl { 1 } { 40 } } \\
- \__nju_uline:n { \textwidth } \__nju_qquad:
- \tl_range:Nnn \l__nju_info_title_en_tl { 41 } { -1 }
+ \__nju_uline_list:xnn { \l__nju_info_type_en_tl #1 }
+ { \l__nju_info_title_en_tl } { \g__nju_abs_title_left_skip }
\clist_map_inline:nn { major, author, supv_full }
- { \\
+ {
\__nju_uline_entry:Nnnn \l__nju_tmp_dim
- { ##1 _en } { ##1 _en } { #1 }
+ { ##1 _en } { ##1 _en } { #1 } \par
}
}
\cs_new_protected:Npn \__nju_make_abstract:
{
\UseInstance { nju } { abstract / title }
\UseInstance { nju } { abstract / info }
+ \UseInstance { nju } { abstract / mark }
}
\cs_new_protected:Npn \__nju_make_abstract_en:
{
\UseInstance { nju } { abstract / en / title }
\UseInstance { nju } { abstract / en / info }
+ \UseInstance { nju } { abstract / en / mark }
}
\clist_map_inline:nn
{
@@ -342,6 +348,8 @@
{ abstract } { 摘要 } { ABSTRACT },
% 用于书签的摘要名称字样
{ abstract_a } { 中文摘要 } { ABSTRACT },
+ % 用于小标题的摘要名称字样
+ { abstract_b } { 摘\qquad{}要 } { ABSTRACT },
{ appendix } { 附录 } { appendix },
{ dept } { 院系 } { DEPARTMENT },
{ figure } { 图 } { figure },
diff --git a/Master/texmf-dist/tex/latex/njuthesis/njuthesis-undergraduate.def b/Master/texmf-dist/tex/latex/njuthesis/njuthesis-undergraduate.def
index 590a83fc8c6..bdbf15f9ae5 100644
--- a/Master/texmf-dist/tex/latex/njuthesis/njuthesis-undergraduate.def
+++ b/Master/texmf-dist/tex/latex/njuthesis/njuthesis-undergraduate.def
@@ -23,7 +23,7 @@
%% To produce the documentation run the original source files ending with
%% `.dtx' through XeTeX.
%%
-\GetIdInfo $Id: njuthesis.dtx 0.16.0 2022-03-19 12:00:00 +0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
+\GetIdInfo $Id: njuthesis.dtx 0.16.1 2022-03-27 13:00:00 +0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
{Undergraduate definition file for njuthesis}
\ProvidesExplFile{njuthesis-undergraduate.def}
{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
@@ -99,8 +99,8 @@
{
content = \__nju_abs_info_ug:nn { } { : },
format = \zihao { -4 } \kaishu,
- align = l,
- bottom-skip = 1 cm
+ bottom-skip = 1 cm,
+ align = l
}
\__nju_declare_element:nn { abstract / en / title }
{
@@ -112,8 +112,8 @@
{
content = \__nju_abs_info_ug:nn { _en } { :~ },
format = \zihao { -4 },
- align = l,
- bottom-skip = 1 cm
+ bottom-skip = 1 cm,
+ align = l
}
\cs_new_protected:Npn \__nju_abs_info_ug:nn #1#2
{
@@ -126,6 +126,18 @@
{ \__nju_name:n { ##1 #1 } #2 \__nju_info:n { ##1 #1 } \\ }
\__nju_name:n { abstract #1 } #2
}
+\__nju_declare_element:nn { abstract / mark }
+ {
+ content = \c__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,
+ format = \sffamily \zihao { -3 },
+ bottom-skip = 1 cm
+ }
\cs_new_protected:Npn \__nju_make_abstract:
{
\UseInstance { nju } { abstract / title }
@@ -154,6 +166,8 @@
{ abstract } { 摘要 } { ABSTRACT },
% 用于书签的摘要名称字样
{ abstract_a } { 中文摘要 } { ABSTRACT },
+ % 用于小标题的摘要名称字样
+ { abstract_b } { 摘\qquad{}要 } { ABSTRACT },
{ appendix } { 附录 } { appendix },
{ dept } { 院系 } { DEPARTMENT },
{ figure } { 图 } { figure },
diff --git a/Master/texmf-dist/tex/latex/njuthesis/njuthesis.cls b/Master/texmf-dist/tex/latex/njuthesis/njuthesis.cls
index 28129f7a647..8d68ed28e3a 100644
--- a/Master/texmf-dist/tex/latex/njuthesis/njuthesis.cls
+++ b/Master/texmf-dist/tex/latex/njuthesis/njuthesis.cls
@@ -24,7 +24,7 @@
%% `.dtx' through XeTeX.
%%
\NeedsTeXFormat{LaTeX2e}
-\GetIdInfo $Id: njuthesis.dtx 0.16.0 2022-03-19 12:00:00 +0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
+\GetIdInfo $Id: njuthesis.dtx 0.16.1 2022-03-27 13:00:00 +0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
{Thesis template for Nanjing University}
\ProvidesExplClass{njuthesis}
{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
@@ -65,6 +65,7 @@
\tl_new:N \l__nju_info_degree_tl
\tl_new:N \l__nju_info_diploma_tl
\tl_new:N \l__nju_info_type_tl
+\tl_new:N \l__nju_info_type_en_tl
\bool_new:N \g__nju_twoside_bool
\bool_set_true:N \g__nju_twoside_bool
\bool_new:N \l__nju_second_supv_bool
@@ -124,7 +125,7 @@
\cs_new_protected:Npn \__nju_ulined_center_box:nn #1#2
{
\mode_leave_vertical:
- \rule [ -0.5 ex ] { #1 } { 0.4 pt }
+ \rule [ -0.55 ex ] { #1 } { 0.4 pt }
\skip_horizontal:n { -#1 }
\hbox_to_wd:nn { #1 } { \hfil #2 \hfil }
}
@@ -156,7 +157,7 @@
\cs_new_protected:Npn \__nju_uline:n #1
{
\mode_leave_vertical:
- \rule [ -0.5 ex ] { #1 } { 0.4 pt }
+ \rule [ -0.55 ex ] { #1 } { 0.4 pt }
\skip_horizontal:n { -#1 }
}
\cs_new_protected:Npn \__nju_uuline:n #1
@@ -194,6 +195,12 @@
{ \__zhnum_date_aux:nnn { #1 } { #2 } { #3 } }
\cs_new:Npn \__nju_date_en:www #1-#2-#3 \q_stop
{ \clist_item:Nn \c__nju_month_en_clist { #2 } ~#3 , ~#1 }
+\msg_new:nnn { njuthesis } { missing-title }
+ {
+ The~ title~ should~ not~ be~ left~ blank.\\
+ Please~ check~ whether~ you~ have~ fill~ in~
+ both~ Chinese~ and~ English~ titles.
+ }
\cs_new_protected:Npn \__nju_split_title:n #1
{
\tl_if_in:nnTF { #1 } { \\ }
@@ -210,6 +217,8 @@
\cs_generate_variant:Nn \__nju_split_title:n { V }
\cs_new_protected:Npn \__nju_multiline_title:nnn #1#2#3
{
+ \tl_if_empty:NT \l__nju_info_title_tl
+ { \msg_error:nn { njuthesis } { missing-title } }
\__nju_split_title:V \l__nju_info_title_tl
\__nju_spread_box:nnV { #2 } { \kaishu } \c__nju_name_title_tl
\__nju_hskip:
@@ -262,6 +271,47 @@
\__nju_uuline:n { \l__nju_tmp_dim } #1
}
\cs_generate_variant:Nn \__nju_abs_title:n { V }
+\cs_new_protected:Npn \__nju_uline_box:
+ { \vtop{\box1\kern-\prevdepth\kern0.5ex\hrule} }
+\msg_new:nnn { njuthesis } { abs-title-too-long }
+ {
+ Your~ title~ is~ too~ long~ to~ fit~ in~ two~ lines.\\
+ I~ have~ drawn~ additional~ lines~ to~ contain~ it,~
+ which~ will~ probably~ make~ your~ abstract~ page~
+ look~ slightly~ different~ from~ the~ standard.\\
+ You~ can~ use~ the~ "style/abstract-title"~ key~
+ to~ disable~ this~ message.
+ }
+\cs_new_protected:Npn \__nju_uline_list:nnn #1#2#3
+ {
+ \hbox_set:Nn \l__nju_tmp_box {#1}
+ \setbox0=\vbox{\hangindent=\wd\l__nju_tmp_box \hangafter=-1
+ \leftskip=#3 \rightskip=\leftskip \parindent=\z@ #2\par
+ \global\setbox2=\hbox{}
+ \int_gzero:N \l__nju_tmp_int
+ \loop
+ \setbox1=\lastbox \unskip\unpenalty
+ \unless\ifvoid1
+ \global\setbox2=\hbox{\__nju_uline_box:\penalty0\unhbox2}
+ \int_gincr:N \l__nju_tmp_int
+ \repeat
+ }
+ {
+ \noindent\copy\l__nju_tmp_box\unhbox2
+ \bool_if:NT \g__nju_strict_abs_title_bool
+ {
+ \int_case:nnF { \l__nju_tmp_int }
+ {
+ { 0 } { \msg_error:nn { njuthesis } { missing-title } }
+ { 1 } { \__nju_uline:n { \textwidth } }
+ { 2 } { \prg_do_nothing: }
+ }
+ { \msg_warning:nn { njuthesis } { abs-title-too-long } }
+ \par
+ }
+ }
+ }
+\cs_generate_variant:Nn \__nju_uline_list:nnn { xnn }
\DeclareObjectType { nju } { \c_zero_int }
\DeclareTemplateInterface { nju } { element } { \c_zero_int }
{
@@ -436,16 +486,17 @@
{ \file_input:n { njuthesis- graduate.def } }
\msg_new:nnn { njuthesis } { load-config }
{ I~ am~ loading~ config~ file~ "#1". }
-\clist_if_empty:NF \g__nju_config_clist
+\clist_map_inline:Nn \g__nju_config_clist
{
- \msg_info:nnx { njuthesis } { load-config } { \g__nju_config_tl }
- \clist_map_inline:Nn \g__nju_config_clist { \file_input:n { #1 } }
+ \msg_info:nnn { njuthesis } { load-config } { #1 }
+ \file_input:n { #1 }
}
\keys_define:nn { nju / info }
{
title .tl_set:N = \l__nju_info_title_tl,
title .initial:n = { 空 },
title* .tl_set:N = \l__nju_info_title_en_tl,
+ title* .initial:n = { Empty },
keywords .clist_set:N = \l__nju_info_keywords_clist,
keywords* .clist_set:N = \l__nju_info_keywords_en_clist,
grade .tl_set:N = \l__nju_info_grade_tl,
@@ -482,7 +533,9 @@
{ \tl_set:Nn \l__nju_info_diploma_tl { ug } }
{ \tl_set:Nn \l__nju_info_diploma_tl { g } }
\tl_set:Nx \l__nju_info_type_tl
- { \clist_item:Nn \c__nju_name_type_clist { \g__nju_info_type_int } }
+ { \clist_item:Nn \c__nju_name_type_clist { \g__nju_info_type_int } }
+\tl_set:Nx \l__nju_info_type_en_tl
+ { \clist_item:Nn \c__nju_name_type_en_clist { \g__nju_info_type_int } }
\tl_put_left:Nx \l__nju_info_type_tl
{ \tl_use:c { c__nju_name_ \l__nju_info_diploma_tl _tl } }
\ctex_at_end_preamble:n
@@ -1059,11 +1112,23 @@
\exp_args:NV \pagestyle \c__nju_pagestyle_tl
\pagenumbering { Roman }
}
+\__nju_declare_element:nn { abstract / mark }
+ {
+ content = \c__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,
+ format = \sffamily \zihao { -3 },
+ bottom-skip = 1 cm
+ }
\cs_new_protected:Npn \__nju_print_keywords:nn #1#2
{
\tl_set:Nv \l__nju_tmp_tl { c__nju_name_keywords #1 _tl }
\__nju_get_text_width:NV \l__nju_tmp_dim \l__nju_tmp_tl
- \list { }
+ \list { \l__nju_tmp_tl }
{
\labelwidth \l__nju_tmp_dim
\labelsep \c_zero_dim
@@ -1072,14 +1137,31 @@
\advance \leftmargin \l__nju_tmp_dim
\cs_set_eq:NN \makelabel \textbf
}
- \item [ \l__nju_tmp_tl ]
- \clist_use:cn { l__nju_info_keywords #1 _clist } { #2 }
+ \item \clist_use:cn { l__nju_info_keywords #1 _clist } { #2 }
\endlist
}
+\skip_new:N \g__nju_abs_title_left_skip
\keys_define:nn { nju / style }
{
- abstract-in-toc .bool_gset:N = \g__nju_abs_in_toc_bool,
- abstract-in-toc .initial:n = true
+ abstract-in-toc .bool_gset:N = \g__nju_abs_in_toc_bool,
+ abstract-in-toc .initial:n = true,
+ abstract-title .choice:,
+ abstract-title / strict .code:n =
+ {
+ \bool_gset_true:N \g__nju_strict_abs_title_bool
+ \skip_gset:Nn \g__nju_abs_title_left_skip { 1 em }
+ },
+ abstract-title / centered .code:n =
+ {
+ \bool_gset_true:N \g__nju_strict_abs_title_bool
+ \skip_gset:Nn \g__nju_abs_title_left_skip { 0 pt plus 1 fill }
+ },
+ abstract-title / natural .code:n =
+ {
+ \bool_gset_false:N \g__nju_strict_abs_title_bool
+ \skip_gset:Nn \g__nju_abs_title_left_skip { 0 pt plus 1 fill }
+ },
+ abstract-title .initial:n = strict
}
\NewDocumentEnvironment { abstract } { +b }
{