From 87b1aeb58c60181f8883723a99941319d51c3cd0 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 23 May 2022 19:56:58 +0000 Subject: njuthesis (23may22) git-svn-id: svn://tug.org/texlive/trunk@63382 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/doc/latex/njuthesis/njuthesis.pdf | Bin 1261937 -> 1275071 bytes .../source/latex/njuthesis/njuthesis.dtx | 324 ++++++++++++++------- .../source/latex/njuthesis/njuthesis.ins | 12 - .../tex/latex/njuthesis/njuthesis-graduate.def | 36 +-- .../latex/njuthesis/njuthesis-undergraduate.def | 46 ++- .../texmf-dist/tex/latex/njuthesis/njuthesis.cls | 107 ++++--- 6 files changed, 331 insertions(+), 194 deletions(-) diff --git a/Master/texmf-dist/doc/latex/njuthesis/njuthesis.pdf b/Master/texmf-dist/doc/latex/njuthesis/njuthesis.pdf index 97e90151065..3ed1bf2a66a 100644 Binary files a/Master/texmf-dist/doc/latex/njuthesis/njuthesis.pdf and b/Master/texmf-dist/doc/latex/njuthesis/njuthesis.pdf differ diff --git a/Master/texmf-dist/source/latex/njuthesis/njuthesis.dtx b/Master/texmf-dist/source/latex/njuthesis/njuthesis.dtx index faeaa2defc0..193ef959f89 100644 --- a/Master/texmf-dist/source/latex/njuthesis/njuthesis.dtx +++ b/Master/texmf-dist/source/latex/njuthesis/njuthesis.dtx @@ -109,9 +109,16 @@ To produce the documentation run the original source files ending with \fi % % +% ^^A 故意留白 +% ^^A 故意留白 +% ^^A 故意留白 +% ^^A 故意留白 +% %\NeedsTeXFormat{LaTeX2e} %<*!(driver|install)> -%<+!driver>\GetIdInfo $Id: njuthesis.dtx 0.18.0 2022-05-01 12:40:00 +0800 NJU LUG $ +% ^^A 诚耀百廿,雄创一流 +% ^^A 南京大学一百二十周年华诞邀您共襄盛举! +%<+!driver>\GetIdInfo $Id: njuthesis.dtx 0.19.0 2022-05-23 11:33:00 +0800 NJU LUG $ % {Thesis template for Nanjing University} %\ProvidesExplClass{njuthesis} % {Undergraduate definition file for njuthesis} @@ -203,7 +210,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.18.0 \quad 2022-05-01} +% \date{v0.19.0 \quad 2022-05-23} % % \changes{v0.1}{2021/09/04}{开始开发。} % \changes{v0.2}{2021/09/07}{初步搭建了可用的模板。} @@ -227,6 +234,8 @@ To produce the documentation run the original source files ending with % \changes{v0.13}{2021/12/15}{适配2022届本科生毕业毕业论文(设计)规范。} % \changes{v0.14}{2022/01/13}{将本模板内嵌入南大 \hologo{TeX} 网站。} % \changes{v0.16}{2022/03/01}{分离本科生和研究生模板配置。} +% \changes{v0.19}{2022/05/23}{对研究生普通封面进行若干细节修改。} +% \changes{v0.19}{2022/05/23}{对国家图书馆封面进行若干细节修改。} % % % \maketitle @@ -284,7 +293,8 @@ To produce the documentation run the original source files ending with % \subsection{开始之前} % \label{subsec:first-things-first} % -% 在本文正式介绍 \cls{njuthesis} 论文模板前,您也许并不熟悉 \hologo{TeX} 排版系统。话不多说,请先完整体验一遍下述的工作流程: +% 在本文正式介绍 \cls{njuthesis} 论文模板前,您也许并不熟悉 \hologo{TeX} +% 排版系统。话不多说,请先按部就班体验一遍下述的工作流程: % % \bigskip % \fcolorbox{olgreen}{gray!5}{\parbox{\textwidth-5em}{% @@ -302,7 +312,7 @@ To produce the documentation run the original source files ending with % % \bigskip % 稍等片刻,您会在浏览器右侧发现一份新生成的空白论文。 -% 如果它的效果令您满意,不妨以此为基础开始写作。 +% 如果它的效果令您满意,不妨以本模板为基础开始写作。 % % \subparagraph{我一定要体验上述流程吗?} % 是,但也不一定。有人坚持认为应该做一些\emph{直观、清晰、有手就行、一 @@ -318,13 +328,13 @@ To produce the documentation run the original source files ending with % 本校\href{https://itsc.nju.edu.cn}{信息化管理建设服务中心}和该网站 % 的维护者\href{mailto:my@yaoge123.cn}{姚舸老师};如果\emph{报错},请 % 点击左上角的菜单按钮,查看编译器是否显示为 |XeLaTeX|; -% 再如果\emph{还有其他原因},通过这几分钟的实验我们也可以得到一个相当 +% 再如果\emph{还有其他原因},通过这几分钟的实验我们也可以得到一个极其 % 有益的结论:\emph{也许 Word 模板更加适合您}。这可以节省下熟悉 % \hologo{TeX} 排版软件使用方法所需的可观时间。 % % \subparagraph{但我依然对 \hologo{LaTeX} 一无所知!} -% 这意味着您也许得花些时间在\emph{长篇累牍的精细介绍}上。 -% 请接着向后阅读,有需要时善用搜索。 +% 这意味着您真的得花些时间在\emph{长篇累牍的精细介绍}上。 +% 如果您已经下定决心,请接着向后阅读,有需要时善用搜索引擎。 % % % \subsection{历史沿革} @@ -405,7 +415,8 @@ To produce the documentation run the original source files ending with % % \subsection{许可说明} % -% \file{njuthesis.dtx} 文件以及由其直接产生的所有文件被称为 \cls{njuthesis} 文档类,或者在本文中简称为本模板。 +% \file{njuthesis.dtx} 文件以及由其直接产生的所有文件被称为 +% \cls{njuthesis} 文档类,或者在本文中简称为本模板。 % % \subparagraph{版权信息} % 本模板之版权隶属于 © 2021 - 2022 南京大学 Linux 用户组。 @@ -684,13 +695,17 @@ To produce the documentation run the original source files ending with % \subsection{在线编译} % \label{subsec:onlinecompile} % -% 相信您在接触了本地编译以后,很快就会意识到一些十分显然的事实,譬如 \hologo{TeX} 编译器安装过程较为漫长\footnote{因此对于 Windows 推荐 \hologo{MiKTeX}。},占用空间过大\footnote{事实上,可以通过 |scheme-infraonly| 模式安装 \hologo{TeX}\,Live,随后利用 \pkg{tlmgr} 安装依赖宏包,这份宏包列表可以在 Git 仓库的 \file{.github/workflows/build.yml} 找到。},而且在一部分处理器性能不佳的电脑上需要较长编译时间\footnote{出于文件 IO 速度的差异,同一个模板在 Linux 编译可以相对 Windows 节省约一半耗时。}。拒绝接受这些麻烦的同学不妨尝试本节介绍的在线编译方法。 +% 相信您在接触了本地编译以后,很快就会意识到一些十分显然的事实,譬如 \hologo{TeX} 编译器安装过程较为漫长\footnote{因此对于 Windows 推荐 \hologo{MiKTeX}。},占用空间过大\footnote{事实上,可以通过 |scheme-infraonly| 模式安装 \hologo{TeX}\,Live,随后利用 \pkg{tlmgr} 安装依赖宏包,这份宏包列表可以在 Git 仓库的 \file{.github/workflows/build.yml} 找到。},而且在一部分处理器性能不佳的电脑上需要较长编译时间\footnote{出于文件 IO 速度的差异,同一个模板在 Linux 编译可以相对 Windows 节省约一半耗时。}。拒绝接受这些麻烦的同学可以尝试本节介绍的在线编译方法。 +% +% {\color{red}|[!]|} 请注意,在线编辑器不一定提供良好的文件恢复和版本管理机制。 +% 请谨慎备份您的心血结晶。 % % \subsubsection{南大\hologo{TeX}平台简介} % \changes{v0.2}{2021/09/07}{添加对南大 \hologo{TeX} 的支持。} % -% \href{https://tex.nju.edu.cn}{南大 \hologo{TeX}} 基于开源的 ShareLaTeX 平台构建\footnote{理论上在\href{https://doc.nju.edu.cn/books/latex}{这个网站}能找到一段平台简介,实际上大家都有意无意地鸽了,下次一定补上。},于2021年3月4日正式上线,是 \href{https://sci.nju.edu.cn/}{eScience 中心}为南大在校师生提供的 \hologo{LaTeX} 在线编辑器,首次使用需凭学校邮箱自助注册账号。 +% \href{https://tex.nju.edu.cn}{南大 \hologo{TeX}} 基于开源的 Overleaf 社区版平台构建\footnote{理论上在\href{https://doc.nju.edu.cn/books/latex}{这个网站}能找到一段平台简介,实际上大家都有意无意地鸽了,下次一定补上。},于2021年3月4日正式上线,是 \href{https://sci.nju.edu.cn/}{eScience 中心}为南大在校师生提供的 \hologo{LaTeX} 在线编辑器,首次使用需凭学校邮箱自助注册账号。 % +% {\color{red}|[!]|} 在 2022 年 5 月的运行中,该网站出现了多次崩溃事件,初步判断原因是由社区版并没有为高并发数做优化引发的。高峰时期,仍然建议在本地部署 \hologo{TeX} 发行版。 % % \subsubsection{操作步骤} % @@ -807,7 +822,7 @@ To produce the documentation run the original source files ending with % 对于研究生模板可在封面后添加原创性声明,并且在最后一页添加学位论文出版授权书。 % % 对于需要手动插入承诺书扫描页的情况,可以在导言区载入 \pkg{pdfpages} 宏包, -% 并在所需位置使用该红包提供的 \cs{includepdf} 命令。 +% 并在所需位置使用该宏包提供的 \cs{includepdf} 命令。 % 例如,可以用如下所示的命令插入扫描件的第一页,并插入紧随的一个空白页。 % \begin{latexexample}[moretexcs={\includepdf},emph={[2]pages}] % \includepdf[pages={1,{}}]{scanned.pdf} @@ -1095,13 +1110,27 @@ To produce the documentation run the original source files ending with % 提交日期。中英文日期现在可以由 ISO 日期格式\cite{gb-t-7408-2005}的字符串统一生成。如果留空,则自动使用编译当天日期。 % \end{function} % -% \begin{function}[updated=2021-01-14]{info/defend-date} +% \begin{function}[updated=2022-01-14]{info/defend-date} % \begin{syntax} % defend-date = \Arg{yyyy-mm-dd} % \end{syntax} % 答辩日期,只对研究生有效,要求同提交日期。 % \end{function} % +% \begin{function}[updated=2022-05-23]{info/confer-date} +% \begin{syntax} +% confer-date = \Arg{yyyy-mm-dd} +% \end{syntax} +% 学位授予日期,只用于国家图书馆封面,要求同提交日期。 +% \end{function} +% +% \begin{function}[updated=2021-05-23]{info/bottom-date} +% \begin{syntax} +% bottom-date = \Arg{yyyy-mm-dd} +% \end{syntax} +% 底部日期,只用于国家图书馆封面,要求同提交日期。 +% \end{function} +% % \begin{function}[updated=2021-10-01]{info/chairman,info/reviewer} % \begin{syntax} % chairman = \Arg{答辩主席} @@ -1181,7 +1210,18 @@ 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}, +% email = {git+nju-lug-email-3104-issue-@yaoge123.cn} +% } +% } +% \end{latexexample} +% +% 如果需要国家图书馆封面,还需要加入如下信息 +% +% \begin{latexexample}[moretexcs={\njusetup},emph={[2]info}] +% \njusetup { +% info = { +% confer-date = {2022-05-20}, +% bottom-date = {2022-05-21}, % chairman = {张晓山~教授}, % reviewer = {王瑞希~教授,郭德纲~副教授,华芈库~教授,戴菲菲~教授}, % clc = {0175.2}, @@ -1463,8 +1503,8 @@ To produce the documentation run the original source files ending with % \item 数学常数和特殊函数名用正体,如 % \begin{itemize} % \item $\uppi$ 使用 |$\uppi$| -% \item $\symup{i}$ 使用 |$\symup{e}$| -% \item $\symup{e}$ 使用 |$\symup{i}$| +% \item $\symup{i}$ 使用 |$\symup{i}$| +% \item $\symup{e}$ 使用 |$\symup{e}$| % \end{itemize} % \item 微分号使用正体,如 % \begin{itemize} @@ -2025,10 +2065,10 @@ To produce the documentation run the original source files ending with % % \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{内容} +% \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} 与 @@ -2046,8 +2086,8 @@ To produce the documentation run the original source files ending with % % \begin{function}{\njusetlength,\njusetlength*} % \begin{syntax} -% \tn{njusetlength} = \marg{名称}\marg{长度} -% \tn{njusetlength*} = \marg{名称}\marg{长度} +% \tn{njusetlength}\marg{名称}\marg{长度} +% \tn{njusetlength*}\marg{名称}\marg{长度} % \end{syntax} % 修改长度值,默认为修改固定长度(|dim| 类型), % 带星号的命令表示修改弹性长度(|skip| 类型,目前未涉及)。 @@ -2065,7 +2105,7 @@ To produce the documentation run the original source files ending with % % \begin{function}{\njusetformat} % \begin{syntax} -% \tn{njusetformat} = \marg{名称}\marg{样式} +% \tn{njusetformat}\marg{名称}\marg{样式} % \end{syntax} % 修改样式。默认样式可以参见 \ref{subsubsec:constant-format} 节。 % \end{function} @@ -2073,7 +2113,7 @@ To produce the documentation run the original source files ending with % 譬如,将章标题字号加大到小二号,示例如下: % % \begin{latexexample}[moretexcs={\njusetformat,\zihao}] -% \njusetformat{chapter}{\zihao{-2}\normalfont\sffamily\centering} +% \njusetformat{chapter}{\zihao{-2}\sffamily\centering} % \end{latexexample} % % @@ -2527,16 +2567,6 @@ To produce the documentation run the original source files ending with % \end{macrocode} % \end{variable} % -% \begin{variable}{\g_@@_info_submitdate_tl,\g_@@_info_submitdate_en_tl, -% \g_@@_info_defenddate_tl} -% 用于存储格式化后的论文提交日期和答辩日期的变量。 -% \begin{macrocode} -\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} -% % \begin{variable}{\c_@@_today_tl} % 编译当天日期,格式为 |yyyy-mm-dd|。 % \begin{macrocode} @@ -2692,7 +2722,10 @@ To produce the documentation run the original source files ending with % \end{macro} % % \begin{macro}{\@@_spread_box:nnn,\@@_spread_box:nnV,\@@_spread_box:nnx} -% 分散对齐的水平盒子。 +% \changes{v0.19}{2022/05/16}{对超出盒子宽度的文字进行水平压缩。} +% 分散对齐的水平盒子,拉伸算法来自 \cls{fduthesis}。 +% 在文字宽度小于给定宽度时,在字符中间填补 \tn{hfil} 以增大字距。 +% 在文字宽度超出限制时,进行整体水平压缩。 % \begin{arguments} % \item 宽度,|dim| 型变量 % \item 格式 @@ -2702,15 +2735,29 @@ To produce the documentation run the original source files ending with \cs_new_protected:Npn \@@_spread_box:nnn #1#2#3 { \mode_leave_vertical: + \@@_get_text_width:Nn \l_@@_tmpa_dim { #2 #3 } \hbox_to_wd:nn { #1 } - { #2 \tl_map_inline:nn { #3 } { ##1 \hfil } \unskip } + { + \dim_compare:nTF { \l_@@_tmpa_dim > #1 } + { + \hfil + \scalebox + { \dim_to_decimal_in_unit:nn { #1 } { \l_@@_tmpa_dim } } + [ 1.0 ] { #2 #3 } + \hfil + } + { + \hbox_to_wd:nn { #1 } + { #2 \tl_map_inline:nn { #3 } { ##1 \hfil } \unskip } + } + } } \cs_generate_variant:Nn \@@_spread_box:nnn { nnV } \cs_generate_variant:Nn \@@_spread_box:nnn { nnx } % \end{macrocode} % \end{macro} % -% \begin{macro}{\@@_multiline_box:nnnn} +% \begin{macro}{\@@_multiline_box:NNnn} % 多行固定长度的下划线内容,用于国家图书馆封面。 % \begin{arguments} % \item 用于循环的 |int| 型变量 @@ -2719,7 +2766,7 @@ To produce the documentation run the original source files ending with % \item 宽度,|dim| 型变量 % \end{arguments} % \begin{macrocode} -\cs_new_protected:Npn \@@_multiline_box:nnnn #1#2#3#4 +\cs_new_protected:Npn \@@_multiline_box:NNnn #1#2#3#4 { \int_set:Nn #1 { 1 } \int_do_until:nn { #1 > #3 } @@ -2849,6 +2896,30 @@ To produce the documentation run the original source files ending with % \end{macrocode} % \end{macro} % +% \begin{macro}{\@@_date:n,\@@_date_en:n} +% 封装 ISO 日期格式字符串的转化命令,该字符串需要进行展开。 +% \begin{macrocode} +\cs_new_protected:Npn \@@_date:n #1 + { + \tl_new:c { g_@@_info_ #1 date_tl } + \tl_set:cn { g_@@_info_ #1 date_tl } + { + \exp_last_unbraced:Nv + \@@_date:www { g_@@_info_ #1 date_raw_tl } \q_stop + } + } +\cs_new_protected:Npn \@@_date_en:n #1 + { + \tl_new:c { g_@@_info_ #1 date_en_tl } + \tl_set:cn { g_@@_info_ #1 date_en_tl } + { + \exp_last_unbraced:Nv + \@@_date:www { g_@@_info_ #1 date_raw_tl } \q_stop + } + } +% \end{macrocode} +% \end{macro} +% % \subsubsection{封面相关} % \changes{v0.16}{2022/03/10}{将封面和摘要内部函数定义移动到前部。} % @@ -3743,6 +3814,24 @@ To produce the documentation run the original source files ending with % \end{macrocode} % \end{macro} % +% \begin{macro}{info/defend-date} +% \changes{v0.19}{2022/05/23}{新增国家图书馆封面的学位授予日期设置项。} +% 学位授予日期。 +% \begin{macrocode} + confer-date .tl_set:N = \g_@@_info_conferdate_raw_tl, + confer-date .initial:V = \c_@@_today_tl, +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{info/bottom-date} +% \changes{v0.19}{2022/05/23}{新增国家图书馆封面的底部日期设置项。} +% 底部日期。 +% \begin{macrocode} + bottom-date .tl_set:N = \g_@@_info_bottomdate_raw_tl, + bottom-date .initial:V = \c_@@_today_tl, +% \end{macrocode} +% \end{macro} +% % \begin{macro}{info/defend-date,info/chairman,info/reviewer} % 答辩委员会信息。 % \begin{macrocode} @@ -3839,31 +3928,42 @@ To produce the documentation run the original source files ending with { \@@_quad: \g_@@_info_supv_ii_en_tl } } % \end{macrocode} -% 将 ISO 格式的原始日期字符串格式化为中文日期表示,该字符串需要进行展开。 +% \begin{variable}{\g_@@_info_submitdate_tl} +% 将 ISO 格式的原始日期字符串格式化为中文日期表示。 % \begin{macrocode} - \tl_set:Nn \g_@@_info_submitdate_tl - { - \exp_last_unbraced:NV - \@@_date:www \g_@@_info_submitdate_raw_tl \q_stop - } + \@@_date:n { submit } % \end{macrocode} +% \end{variable} +% +% \begin{variable}{\g_@@_info_submitdate_en_tl,\g_@@_info_defenddate_tl} % 英文提交日期以及答辩日期仅用于研究生封面。 % \begin{macrocode} \int_compare:nF { \g_@@_info_degree_int == 1 } { - \tl_set:Nn \g_@@_info_submitdate_en_tl - { - \exp_last_unbraced:NV - \@@_date_en:www \g_@@_info_submitdate_raw_tl \q_stop - } - \tl_set:Nn \g_@@_info_defenddate_tl + \@@_date_en:n { submit } + \@@_date:n { defend } +% \end{macrocode} +% \end{variable} +% +% \begin{variable}{\g_@@_info_bottomdate_tl, +% \g_@@_info_conferdate_tl,\g_@@_info_confer_tl} +% 底部日期以及学位授予日期仅用于国家图书馆封面。 +% \begin{macrocode} + \bool_if:NT \g_@@_nlcover_bool { - \exp_last_unbraced:NV - \@@_date:www \g_@@_info_defenddate_raw_tl \q_stop + \@@_date:n { bottom } + \@@_date:n { confer } + \tl_new:N \g_@@_info_confer_tl + \tl_set:Nn \g_@@_info_confer_tl + { + \textbf { \c_@@_name_nju_tl } \hfil + \g_@@_info_conferdate_tl + } } } } % \end{macrocode} +% \end{variable} % % % \subsection{字体设置} @@ -4227,27 +4327,17 @@ To produce the documentation run the original source files ending with % 草稿模式下显示页面文字范围边界以及页眉、页脚线。 % \begin{macrocode} \bool_if:NT \g_@@_draft_bool { \geometry { showframe } } -% % \end{macrocode} % % % \subsubsection{页眉页脚} -% -% \begin{variable}{\c_@@_pagestyle_tl} -% 针对不同学位类型的默认页面样式设置。 -% \begin{macrocode} -%\tl_const:Nn \c_@@_pagestyle_tl { plain } -%\tl_const:Nn \c_@@_pagestyle_tl { headings } -% \end{macrocode} -% \end{variable} -% +% ^^A TODO: 将页眉页脚样式改为使用 \njusetformat 修改 % 提供设置页眉页脚的用户接口。在 \cs{fancyhead} 的可选参数中, % \opt{E} 和 \opt{O} 分别表示在偶数页(even)和奇数页(odd), % 而 \opt{L}、\opt{R} 和 \opt{C} 则分别表示左(left)、右 % (right)和中间(center)。按照通常的排版规则,在双面模式下, % 偶数页的中间页眉文字在左,奇数页则在右。单面模式下,左右页眉都要显示。 % \begin{macrocode} -%<*class> \keys_define:nn { nju / style } { % \end{macrocode} @@ -4374,7 +4464,7 @@ To produce the documentation run the original source files ending with \RenewDocumentCommand \frontmatter { } { \cleardoublepage - \exp_args:NV \pagestyle \c_@@_pagestyle_tl + \exp_args:NV \pagestyle \c_@@_fmt_pagestyle_tl \pagenumbering { Roman } } % \end{macrocode} @@ -4389,7 +4479,7 @@ To produce the documentation run the original source files ending with \RenewDocumentCommand \mainmatter { } { \cleardoublepage - \exp_args:NV \pagestyle \c_@@_pagestyle_tl + \exp_args:NV \pagestyle \c_@@_fmt_pagestyle_tl \pagenumbering { arabic } \normalfont \normalsize } @@ -4401,7 +4491,7 @@ To produce the documentation run the original source files ending with % \begin{macrocode} \AtBeginEnvironment { document } { - \exp_args:NV \pagestyle \c_@@_pagestyle_tl + \exp_args:NV \pagestyle \c_@@_fmt_pagestyle_tl \pagenumbering { Roman } } % \end{macrocode} @@ -4846,12 +4936,13 @@ To produce the documentation run the original source files ending with % \end{macrocode} % % \changes{v0.12}{2021/12/06}{删除了可能导致冲突的 \pkg{floatrow}。} +% \changes{v0.18}{2022/05/08}{图表标题使用粗体。} % 图表标题样式。文字设置为五号宋体,标签设置为粗体,间隔一个全角空格。 % \begin{macrocode} \DeclareCaptionStyle{njucap} { font = small, - labelfont = bf, + font += bf, labelsep = quad, justification = centering } @@ -5255,7 +5346,7 @@ 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 } { } \c_@@_name_title_b_tl, format = \zihao { -0 }, bottom-skip = 0 pt plus 1 fil } @@ -5291,7 +5382,7 @@ To produce the documentation run the original source files ending with % \begin{macrocode} \@@_declare_element:nn { cover / nl / bottom } { - content = \@@_cover_bottom_nl:, + content = \@@_cover_bottom_nl:n { 4 }, bottom-skip = 1 cm, align = r } @@ -5303,7 +5394,7 @@ To produce the documentation run the original source files ending with % \begin{macrocode} \@@_declare_element:nn { cover / nl / date } { - content = \@@_qquad: 年 \@@_quad: 月 \@@_quad: 日, + content = \g_@@_info_bottomdate_tl, format = \kaishu \zihao { 3 } } % \end{macrocode} @@ -5331,7 +5422,7 @@ To produce the documentation run the original source files ending with { \parbox [ b ] { 15 em } { \@@_uline_title: } \par \skip_vertical:n { - 0.5 cm } - { \zihao { 4 } \c_@@_name_title_b_tl } + { \zihao { 4 } \c_@@_name_subtitle_tl } \skip_vertical:N \c_zero_skip \@@_ulined_center_box:nn { 4.5 em } { \g_@@_info_author_tl } \skip_vertical:n { - 0.5 cm } @@ -5342,6 +5433,7 @@ To produce the documentation run the original source files ending with % % \begin{macro}{\@@_cover_info_nl:} % \changes{v0.17}{2022/04/09}{优化国家图书馆封面导师联系方式的输出格式。} +% \changes{v0.19}{2022/05/23}{补充国家图书馆封面的学位授予单位和日期。} % 国家图书馆封面信息栏。 % \begin{macrocode} \cs_new_protected:Npn \@@_cover_info_nl: @@ -5357,22 +5449,22 @@ To produce the documentation run the original source files ending with \@@_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 { \c_@@_name_confer_tl } - \@@_uline:n { \l_@@_tmpa_dim } + \@@_uline_entry:Nnnn \l_@@_tmpa_dim { confer } { confer } { } } % \end{macrocode} % \end{macro} % -% \begin{macro}{\@@_cover_bottom_nl:} +% \begin{macro}{\@@_cover_bottom_nl:n} +% \changes{v0.19}{2022/05/20}{将国家图书馆封面的评审委员会人数分离为单独参数。} % 国家图书馆封面底部信息。 % \begin{macrocode} -\cs_new_protected:Npn \@@_cover_bottom_nl: +\cs_new_protected:Npn \@@_cover_bottom_nl:n #1 { - \@@_name:n { chairman } \@@_hskip: - \@@_ulined_center_box:nn { 9 em } { \@@_info:n { chairman } } \\ - \@@_name:n { reviewer } \@@_hskip: - \@@_multiline_box:nnnn { \l_@@_tmp_int } - { \g_@@_info_reviewer_clist } { 4 } { 9 em } + \c_@@_name_chairman_tl \@@_hskip: + \@@_ulined_center_box:nn { 9 em } { \g_@@_info_chairman_tl } \\ + \c_@@_name_reviewer_tl \@@_hskip: + \@@_multiline_box:NNnn \l_@@_tmp_int + \g_@@_info_reviewer_clist { #1 } { 9 em } } % \end{macrocode} % \end{macro} @@ -5627,12 +5719,22 @@ To produce the documentation run the original source files ending with % % \begin{macro}{\@@_make_origdecl: } % \changes{v0.13}{2021/12/15}{加入本科生的诚信承诺书。} +% \changes{v0.19}{2022/05/22}{跟进新版本科生诚信承诺书样式。} % 生成本科生的诚信承诺书或研究生的学位论文原创性声明。 % \begin{macrocode} \cs_new_protected:Npn \@@_make_origdecl: { - \chapter* { \c_@@_name_origdecl_tl } +% \cleardoublepage +% \chapter* { \c_@@_name_origdecl_tl } \thispagestyle { empty } +%<*definition-ug> + \begin{center} + \njuemblem{2cm}{!}\\ + {\zihao{-1}\sffamily \c__nju_name_origdecl_tl } + \end{center} + \zihao{-3} + \hspace{2em} +% \c_@@_text_origdecl_tl \vfil \begin{flushright} @@ -5776,7 +5878,7 @@ To produce the documentation run the original source files ending with % 在标题页后使用大写罗马字母页码,恢复正常字体设置。 % \begin{macrocode} \cleardoublepage - \exp_args:NV \pagestyle \c_@@_pagestyle_tl + \exp_args:NV \pagestyle \c_@@_fmt_pagestyle_tl \pagenumbering { Roman } } % @@ -5890,6 +5992,7 @@ To produce the documentation run the original source files ending with % \begin{macro}{abstract/mark} % 英文摘要标题实例。 % \begin{macrocode} +%<*definition-g> \@@_declare_element:nn { abstract / mark } { content = \c_@@_name_abstract_b_tl, @@ -5918,7 +6021,6 @@ To produce the documentation run the original source files ending with % \end{arguments} % 研究生中文摘要页包括下划线以及若干特殊的对齐方式,实现方式较为繁琐。使用 \cs{@@_full_uline:NV} 确定内容宽度后,调用 \cs{@@_uline:n} 或 \cs{@@_ulined_center_box:nn} 命令以绘制横穿页面的下划线。前两行为标题。 % \begin{macrocode} -%<*definition-g> \cs_new_protected:Npn \@@_abs_info_g:n #1 { \@@_uline_list:xnn @@ -6139,6 +6241,7 @@ To produce the documentation run the original source files ending with % \begin{macro}{\njupaperlist} % \changes{v0.10}{2021/09/29}{新增了成果列表页面。} % \changes{v0.14}{2021/12/20}{成果列表中可突出指定作者姓名及年份。} +% \changes{v0.19}{2022/05/22}{修复成果列表与章末参考文献表的冲突。} % 成果列表。 % \begin{macrocode} \NewDocumentCommand \njupaperlist @@ -6159,10 +6262,21 @@ To produce the documentation run the original source files ending with % \begin{macrocode} \RenewDocumentCommand \mkbibdateshort { m m m } { \textbf { \thefield { ##1 } } } - \begin{refsection} - \nocite { #2 } - \printbibliography [ heading = subbibliography, title = #1 ] - \end{refsection} +% \end{macrocode} +% 在使用章末参考文献表时,\env{refsection} 的单独一章范围内生效, +% 无需额外添加环境。 ^^A TODO: 待修改为更简洁的形式 +% \begin{macrocode} + \tl_if_eq:NnTF \blx@refsecreset@level { 2 } + { + \nocite { #2 } + \printbibliography [ heading = subbibliography, title = #1 ] + } + { + \begin{refsection} + \nocite { #2 } + \printbibliography [ heading = subbibliography, title = #1 ] + \end{refsection} + } \group_end: } % \end{macrocode} @@ -6301,16 +6415,16 @@ To produce the documentation run the original source files ending with \clist_map_inline:nn { % 用于摘要的作者名称字样 - { author_a } { 本科生姓名 }, - { grade } { 年级 }, - { origdecl } - { \c_@@_name_nju_tl 本科毕业论文(设计)诚信承诺书 }, - { origsign } { 作者签名 }, - { submitdate } { 提交日期 }, - { supv } { 导师 }, - { title } { 题目 }, - { type } { 本科生毕业论文(设计、作品) }, - { ug } { 本科生 } + { author_a } { 本科生姓名 }, + { grade } { 年级 }, + { origdecl } { \c_@@_name_nju_tl + 本科毕业论文(设计) \\ 诚信承诺书 }, + { origsign } { 作者签名 }, + { submitdate } { 提交日期 }, + { supv } { 导师 }, + { title } { 题目 }, + { type } { 本科生毕业论文(设计、作品) }, + { ug } { 本科生 } } { \@@_define_name:nn #1 } \clist_map_inline:nn @@ -6332,6 +6446,8 @@ To produce the documentation run the original source files ending with % % \end{macrocode} % +% \changes{v0.19}{2022/05/22}{更正研究生普通封面专业字样。} +% \changes{v0.19}{2022/05/22}{更正国家图书馆封面学位论文字样。} % 研究生模板默认名称。 % \begin{macrocode} %<*definition-g> @@ -6376,6 +6492,7 @@ To produce the documentation run the original source files ending with \c_@@_name_blankdate_tl ) }, { sign } { (签字) }, { submitdate } { 论文提交日期 }, + { subtitle } { (题名和副题名) }, { supv } { 导师 }, % 用于摘要的导师名称字样 { supv_a } { 指导教师(姓名、职称) }, @@ -6388,7 +6505,7 @@ To produce the documentation run the original source files ending with % 用于摘要的标题名称字样 { title_a } { 题目 }, % 用于国家图书馆封面的标题名称字样 - { title_b } { (题名和副题名) }, + { title_b } { 学位论文 }, % 用于出版授权书的标题名称字样 { title_c } { 论文题名 }, { udc } { U D C }, @@ -6401,10 +6518,16 @@ To produce the documentation run the original source files ending with { \c_@@_name_nju_tl \g_@@_info_type_tl 中文摘要首页用纸 } { \c_@@_name_nju_tl \g_@@_info_type_tl 英文摘要首页用纸 }, { author } { 作者姓名 } { POSTGRADUATE }, - { major } { 专业方向 } { SPECIALIZATION }, + { major } { 专业名称 } { SPECIALIZATION }, { supvfull } { 指导教师 } { MENTOR } } { \@@_define_name:nnn #1 } +% \end{macrocode} +% +% 对专业硕士的封面条目进行临时修改。 +% \begin{macrocode} +\int_compare:nT { \g_@@_info_degree_int == 3 } + { \njusetname{major}{专业学位类别(领域)} } % % \end{macrocode} % @@ -6510,11 +6633,14 @@ To produce the documentation run the original source files ending with % \label{subsubsec:constant-format} % % \changes{v0.17}{2022/04/09}{将样式定义分离到 \file{.def} 文件。} +% \changes{v0.19}{2022/05/11}{简化默认页面样式的修改方式。} % 默认样式。 % \begin{macrocode} \clist_map_inline:nn { - { section } { \large \normalfont \sffamily }, +% { pagestyle } { plain }, +% { pagestyle } { headings }, + { section } { \large \sffamily }, { chapter } { \c_@@_fmt_section_tl \centering }, { chapterintoc } { \c_@@_fmt_section_tl }, { subsection } { \c_@@_fmt_section_tl }, diff --git a/Master/texmf-dist/source/latex/njuthesis/njuthesis.ins b/Master/texmf-dist/source/latex/njuthesis/njuthesis.ins index 5efc57a52f8..1d947d360e7 100644 --- a/Master/texmf-dist/source/latex/njuthesis/njuthesis.ins +++ b/Master/texmf-dist/source/latex/njuthesis/njuthesis.ins @@ -76,18 +76,6 @@ 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 48eed109b75..0aed7c45085 100644 --- a/Master/texmf-dist/tex/latex/njuthesis/njuthesis-graduate.def +++ b/Master/texmf-dist/tex/latex/njuthesis/njuthesis-graduate.def @@ -23,11 +23,10 @@ %% To produce the documentation run the original source files ending with %% `.dtx' through XeTeX. %% -\GetIdInfo $Id: njuthesis.dtx 0.18.0 2022-05-01 12:40:00 +0800 NJU LUG $ +\GetIdInfo $Id: njuthesis.dtx 0.19.0 2022-05-23 11:33:00 +0800 NJU LUG $ {Graduate definition file for njuthesis} \ProvidesExplFile{njuthesis-graduate.def} {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} -\tl_const:Nn \c__nju_pagestyle_tl { headings } \__nju_declare_element:nn { cover / g / emblem-img } { content = \__nju_emblem:N \c__nju_emblemwidthi_dim, @@ -133,7 +132,7 @@ \__nju_declare_element:nn { cover / nl / name } { content = - \__nju_spread_box:nnV { 6 em } { } \c__nju_name_title_tl, + \__nju_spread_box:nnV { 6 em } { } \c__nju_name_title_b_tl, format = \zihao { -0 }, bottom-skip = 0 pt plus 1 fil } @@ -151,13 +150,13 @@ } \__nju_declare_element:nn { cover / nl / bottom } { - content = \__nju_cover_bottom_nl:, + content = \__nju_cover_bottom_nl:n { 4 }, bottom-skip = 1 cm, align = r } \__nju_declare_element:nn { cover / nl / date } { - content = \__nju_qquad: 年 \__nju_quad: 月 \__nju_quad: 日, + content = \g__nju_info_bottomdate_tl, format = \kaishu \zihao { 3 } } \cs_new_protected:Npn \__nju_cover_top_nl: @@ -173,7 +172,7 @@ { \parbox [ b ] { 15 em } { \__nju_uline_title: } \par \skip_vertical:n { - 0.5 cm } - { \zihao { 4 } \c__nju_name_title_b_tl } + { \zihao { 4 } \c__nju_name_subtitle_tl } \skip_vertical:N \c_zero_skip \__nju_ulined_center_box:nn { 4.5 em } { \g__nju_info_author_tl } \skip_vertical:n { - 0.5 cm } @@ -192,16 +191,15 @@ \__nju_uline_bientry:Nnnn \l__nju_tmpa_dim { major_b } { major } { } \\ \__nju_uline_bientry:Nnnn \l__nju_tmpa_dim { submitdate } { submitdate } { } \__nju_uline_bientry:Nnnn \l__nju_tmpa_dim { defenddate } { defenddate } { } \\ - \__nju_full_uline:Nn \l__nju_tmpa_dim { \c__nju_name_confer_tl } - \__nju_uline:n { \l__nju_tmpa_dim } + \__nju_uline_entry:Nnnn \l__nju_tmpa_dim { confer } { confer } { } } -\cs_new_protected:Npn \__nju_cover_bottom_nl: +\cs_new_protected:Npn \__nju_cover_bottom_nl:n #1 { - \__nju_name:n { chairman } \__nju_hskip: - \__nju_ulined_center_box:nn { 9 em } { \__nju_info:n { chairman } } \\ - \__nju_name:n { reviewer } \__nju_hskip: - \__nju_multiline_box:nnnn { \l__nju_tmp_int } - { \g__nju_info_reviewer_clist } { 4 } { 9 em } + \c__nju_name_chairman_tl \__nju_hskip: + \__nju_ulined_center_box:nn { 9 em } { \g__nju_info_chairman_tl } \\ + \c__nju_name_reviewer_tl \__nju_hskip: + \__nju_multiline_box:NNnn \l__nju_tmp_int + \g__nju_info_reviewer_clist { #1 } { 9 em } } \__nju_declare_element:nn { authdecl / g / title } { @@ -496,6 +494,7 @@ \c__nju_name_blankdate_tl ) }, { sign } { (签字) }, { submitdate } { 论文提交日期 }, + { subtitle } { (题名和副题名) }, { supv } { 导师 }, % 用于摘要的导师名称字样 { supv_a } { 指导教师(姓名、职称) }, @@ -508,7 +507,7 @@ % 用于摘要的标题名称字样 { title_a } { 题目 }, % 用于国家图书馆封面的标题名称字样 - { title_b } { (题名和副题名) }, + { title_b } { 学位论文 }, % 用于出版授权书的标题名称字样 { title_c } { 论文题名 }, { udc } { U D C }, @@ -521,10 +520,12 @@ { \c__nju_name_nju_tl \g__nju_info_type_tl 中文摘要首页用纸 } { \c__nju_name_nju_tl \g__nju_info_type_tl 英文摘要首页用纸 }, { author } { 作者姓名 } { POSTGRADUATE }, - { major } { 专业方向 } { SPECIALIZATION }, + { major } { 专业名称 } { SPECIALIZATION }, { supvfull } { 指导教师 } { MENTOR } } { \__nju_define_name:nnn #1 } +\int_compare:nT { \g__nju_info_degree_int == 3 } + { \njusetname{major}{专业学位类别(领域)} } \tl_const:Nn \c__nju_text_origdecl_tl { 本人郑重声明,所提交的学位论文是本人在导师指导下独立进行科学研究工作所 @@ -575,7 +576,8 @@ { \__nju_define_dim:nn #1 } \clist_map_inline:nn { - { section } { \large \normalfont \sffamily }, + { pagestyle } { headings }, + { section } { \large \sffamily }, { chapter } { \c__nju_fmt_section_tl \centering }, { chapterintoc } { \c__nju_fmt_section_tl }, { subsection } { \c__nju_fmt_section_tl }, diff --git a/Master/texmf-dist/tex/latex/njuthesis/njuthesis-undergraduate.def b/Master/texmf-dist/tex/latex/njuthesis/njuthesis-undergraduate.def index bcba1a60219..b1a411d78b2 100644 --- a/Master/texmf-dist/tex/latex/njuthesis/njuthesis-undergraduate.def +++ b/Master/texmf-dist/tex/latex/njuthesis/njuthesis-undergraduate.def @@ -23,11 +23,10 @@ %% To produce the documentation run the original source files ending with %% `.dtx' through XeTeX. %% -\GetIdInfo $Id: njuthesis.dtx 0.18.0 2022-05-01 12:40:00 +0800 NJU LUG $ +\GetIdInfo $Id: njuthesis.dtx 0.19.0 2022-05-23 11:33:00 +0800 NJU LUG $ {Undergraduate definition file for njuthesis} \ProvidesExplFile{njuthesis-undergraduate.def} {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} -\tl_const:Nn \c__nju_pagestyle_tl { plain } \__nju_declare_element:nn { cover / ug / emblem-img } { content = \__nju_emblem:N \c__nju_emblemwidth_dim, @@ -80,8 +79,14 @@ } \cs_new_protected:Npn \__nju_make_origdecl: { - \chapter* { \c__nju_name_origdecl_tl } + \cleardoublepage \thispagestyle { empty } + \begin{center} + \njuemblem{2cm}{!}\\ + {\zihao{-1}\sffamily \c__nju_name_origdecl_tl } + \end{center} + \zihao{-3} + \hspace{2em} \c__nju_text_origdecl_tl \vfil \begin{flushright} @@ -131,18 +136,6 @@ { \__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 } @@ -188,16 +181,16 @@ \clist_map_inline:nn { % 用于摘要的作者名称字样 - { author_a } { 本科生姓名 }, - { grade } { 年级 }, - { origdecl } - { \c__nju_name_nju_tl 本科毕业论文(设计)诚信承诺书 }, - { origsign } { 作者签名 }, - { submitdate } { 提交日期 }, - { supv } { 导师 }, - { title } { 题目 }, - { type } { 本科生毕业论文(设计、作品) }, - { ug } { 本科生 } + { author_a } { 本科生姓名 }, + { grade } { 年级 }, + { origdecl } { \c__nju_name_nju_tl + 本科毕业论文(设计) \\ 诚信承诺书 }, + { origsign } { 作者签名 }, + { submitdate } { 提交日期 }, + { supv } { 导师 }, + { title } { 题目 }, + { type } { 本科生毕业论文(设计、作品) }, + { ug } { 本科生 } } { \__nju_define_name:nn #1 } \clist_map_inline:nn @@ -248,7 +241,8 @@ { \__nju_define_dim:nn #1 } \clist_map_inline:nn { - { section } { \large \normalfont \sffamily }, + { pagestyle } { plain }, + { section } { \large \sffamily }, { chapter } { \c__nju_fmt_section_tl \centering }, { chapterintoc } { \c__nju_fmt_section_tl }, { subsection } { \c__nju_fmt_section_tl }, diff --git a/Master/texmf-dist/tex/latex/njuthesis/njuthesis.cls b/Master/texmf-dist/tex/latex/njuthesis/njuthesis.cls index ea790df30ed..19d70d8e153 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.18.0 2022-05-01 12:40:00 +0800 NJU LUG $ +\GetIdInfo $Id: njuthesis.dtx 0.19.0 2022-05-23 11:33:00 +0800 NJU LUG $ {Thesis template for Nanjing University} \ProvidesExplClass{njuthesis} {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} @@ -77,9 +77,6 @@ \tl_new:N \g__nju_cjk_font_tl \tl_new:N \g__nju_config_tl \clist_new:N \g__nju_theorem_type_clist -\tl_new:N \g__nju_info_submitdate_tl -\tl_new:N \g__nju_info_submitdate_en_tl -\tl_new:N \g__nju_info_defenddate_tl \tl_const:Nx \c__nju_today_tl { \int_to_arabic:n { \c_sys_year_int } - @@ -149,12 +146,26 @@ \cs_new_protected:Npn \__nju_spread_box:nnn #1#2#3 { \mode_leave_vertical: + \__nju_get_text_width:Nn \l__nju_tmpa_dim { #2 #3 } \hbox_to_wd:nn { #1 } - { #2 \tl_map_inline:nn { #3 } { ##1 \hfil } \unskip } + { + \dim_compare:nTF { \l__nju_tmpa_dim > #1 } + { + \hfil + \scalebox + { \dim_to_decimal_in_unit:nn { #1 } { \l__nju_tmpa_dim } } + [ 1.0 ] { #2 #3 } + \hfil + } + { + \hbox_to_wd:nn { #1 } + { #2 \tl_map_inline:nn { #3 } { ##1 \hfil } \unskip } + } + } } \cs_generate_variant:Nn \__nju_spread_box:nnn { nnV } \cs_generate_variant:Nn \__nju_spread_box:nnn { nnx } -\cs_new_protected:Npn \__nju_multiline_box:nnnn #1#2#3#4 +\cs_new_protected:Npn \__nju_multiline_box:NNnn #1#2#3#4 { \int_set:Nn #1 { 1 } \int_do_until:nn { #1 > #3 } @@ -205,6 +216,24 @@ { \__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 } +\cs_new_protected:Npn \__nju_date:n #1 + { + \tl_new:c { g__nju_info_ #1 date_tl } + \tl_set:cn { g__nju_info_ #1 date_tl } + { + \exp_last_unbraced:Nv + \__nju_date:www { g__nju_info_ #1 date_raw_tl } \q_stop + } + } +\cs_new_protected:Npn \__nju_date_en:n #1 + { + \tl_new:c { g__nju_info_ #1 date_en_tl } + \tl_set:cn { g__nju_info_ #1 date_en_tl } + { + \exp_last_unbraced:Nv + \__nju_date:www { g__nju_info_ #1 date_raw_tl } \q_stop + } + } \msg_new:nnn { njuthesis } { missing-title } { The~ title~ should~ not~ be~ left~ blank.\\ @@ -593,6 +622,10 @@ submit-date .initial:V = \c__nju_today_tl, defend-date .tl_set:N = \g__nju_info_defenddate_raw_tl, defend-date .initial:V = \c__nju_today_tl, + confer-date .tl_set:N = \g__nju_info_conferdate_raw_tl, + confer-date .initial:V = \c__nju_today_tl, + bottom-date .tl_set:N = \g__nju_info_bottomdate_raw_tl, + bottom-date .initial:V = \c__nju_today_tl, chairman .tl_set:N = \g__nju_info_chairman_tl, reviewer .clist_set:N = \g__nju_info_reviewer_clist, clc .tl_set:N = \g__nju_info_clc_tl, @@ -648,22 +681,21 @@ \bool_if:NT \l__nju_second_supv_bool { \__nju_quad: \g__nju_info_supv_ii_en_tl } } - \tl_set:Nn \g__nju_info_submitdate_tl - { - \exp_last_unbraced:NV - \__nju_date:www \g__nju_info_submitdate_raw_tl \q_stop - } + \__nju_date:n { submit } \int_compare:nF { \g__nju_info_degree_int == 1 } { - \tl_set:Nn \g__nju_info_submitdate_en_tl - { - \exp_last_unbraced:NV - \__nju_date_en:www \g__nju_info_submitdate_raw_tl \q_stop - } - \tl_set:Nn \g__nju_info_defenddate_tl + \__nju_date_en:n { submit } + \__nju_date:n { defend } + \bool_if:NT \g__nju_nlcover_bool { - \exp_last_unbraced:NV - \__nju_date:www \g__nju_info_defenddate_raw_tl \q_stop + \__nju_date:n { bottom } + \__nju_date:n { confer } + \tl_new:N \g__nju_info_confer_tl + \tl_set:Nn \g__nju_info_confer_tl + { + \textbf { \c__nju_name_nju_tl } \hfil + \g__nju_info_conferdate_tl + } } } } @@ -959,19 +991,19 @@ \RenewDocumentCommand \frontmatter { } { \cleardoublepage - \exp_args:NV \pagestyle \c__nju_pagestyle_tl + \exp_args:NV \pagestyle \c__nju_fmt_pagestyle_tl \pagenumbering { Roman } } \RenewDocumentCommand \mainmatter { } { \cleardoublepage - \exp_args:NV \pagestyle \c__nju_pagestyle_tl + \exp_args:NV \pagestyle \c__nju_fmt_pagestyle_tl \pagenumbering { arabic } \normalfont \normalsize } \AtBeginEnvironment { document } { - \exp_args:NV \pagestyle \c__nju_pagestyle_tl + \exp_args:NV \pagestyle \c__nju_fmt_pagestyle_tl \pagenumbering { Roman } } \cs_new_protected:Npn \__nju_add_tocline:n #1 @@ -1172,7 +1204,7 @@ \DeclareCaptionStyle{njucap} { font = small, - labelfont = bf, + font += bf, labelsep = quad, justification = centering } @@ -1284,21 +1316,9 @@ } } \cleardoublepage - \exp_args:NV \pagestyle \c__nju_pagestyle_tl + \exp_args:NV \pagestyle \c__nju_fmt_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_tmpa_tl { c__nju_name_keywords #1 _tl } @@ -1374,10 +1394,17 @@ { \njuline { \bf ##1 } } { ##1 } } \RenewDocumentCommand \mkbibdateshort { m m m } { \textbf { \thefield { ##1 } } } - \begin{refsection} - \nocite { #2 } - \printbibliography [ heading = subbibliography, title = #1 ] - \end{refsection} + \tl_if_eq:NnTF \blx@refsecreset@level { 2 } + { + \nocite { #2 } + \printbibliography [ heading = subbibliography, title = #1 ] + } + { + \begin{refsection} + \nocite { #2 } + \printbibliography [ heading = subbibliography, title = #1 ] + \end{refsection} + } \group_end: } \cs_new_protected:Npn \__nju_notation_label:n #1 { #1 \hfil } -- cgit v1.2.3