summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2024-03-19 20:38:58 +0000
committerKarl Berry <karl@freefriends.org>2024-03-19 20:38:58 +0000
commit164d3fae5bf2c573dc2260fca75dce114ddd51cf (patch)
tree4dbb02bb06fef6305db9ec2ea3c9a5d11d54fc76
parent96e5952276ff4da2ecceacb9544371590343c126 (diff)
njuthesis (19mar24)
git-svn-id: svn://tug.org/texlive/trunk@70705 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/njuthesis/README.md2
-rw-r--r--Master/texmf-dist/doc/latex/njuthesis/njuthesis.pdfbin1250193 -> 1261076 bytes
-rw-r--r--Master/texmf-dist/source/latex/njuthesis/njuthesis.dtx1058
-rw-r--r--Master/texmf-dist/source/latex/njuthesis/njuthesis.ins4
-rw-r--r--Master/texmf-dist/tex/latex/njuthesis/njuthesis-doc.cls23
-rw-r--r--Master/texmf-dist/tex/latex/njuthesis/njuthesis-graduate.def173
-rw-r--r--Master/texmf-dist/tex/latex/njuthesis/njuthesis-postdoctoral.def67
-rw-r--r--Master/texmf-dist/tex/latex/njuthesis/njuthesis-undergraduate.def48
-rw-r--r--Master/texmf-dist/tex/latex/njuthesis/njuthesis.cls561
9 files changed, 1095 insertions, 841 deletions
diff --git a/Master/texmf-dist/doc/latex/njuthesis/README.md b/Master/texmf-dist/doc/latex/njuthesis/README.md
index a0f6cf81950..99173cd122b 100644
--- a/Master/texmf-dist/doc/latex/njuthesis/README.md
+++ b/Master/texmf-dist/doc/latex/njuthesis/README.md
@@ -46,4 +46,4 @@ version.
-----
-Copyright (C) 2021 - 2023 by NJU LUG.
+Copyright (C) 2021 - 2024 by NJU LUG.
diff --git a/Master/texmf-dist/doc/latex/njuthesis/njuthesis.pdf b/Master/texmf-dist/doc/latex/njuthesis/njuthesis.pdf
index 36778dd442f..f7bec4075fc 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 fde426c1d8a..5a0f1720405 100644
--- a/Master/texmf-dist/source/latex/njuthesis/njuthesis.dtx
+++ b/Master/texmf-dist/source/latex/njuthesis/njuthesis.dtx
@@ -2,7 +2,7 @@
% !TeX program = XeLaTeX
% !TeX encoding = UTF-8
%
-% Copyright (C) 2021 - 2023
+% Copyright (C) 2021 - 2024
% by Nanjing University Linux User Group
% <git+nju-lug-email-3104-issue-@yaoge123.cn>
%
@@ -49,7 +49,7 @@
\preamble
-Copyright (C) 2021 - 2023
+Copyright (C) 2021 - 2024
by Nanjing University Linux User Group
<git+nju-lug-email-3104-issue-@yaoge123.cn>
@@ -112,16 +112,16 @@ To produce the documentation run the original source files ending with
%
%<class>\NeedsTeXFormat{LaTeX2e}
%<*!(driver|install)>
-%<+!driver>\GetIdInfo $Id: njuthesis.dtx 1.3.2 2023-12-05 16:30:00
+%<+!driver>\GetIdInfo $Id: njuthesis.dtx 1.4.0 2024-03-19 20:30:00
%<+!driver> +0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
%<class> {Thesis template for Nanjing University}
%<class>\ProvidesExplClass{njuthesis}
%<def-u> {Undergraduate definition file for njuthesis}
+% ^^A 诚耀百廿,雄创一流
+% ^^A 南京大学一百二十周年华诞邀您共襄盛举!
%<def-u>\ProvidesExplFile{njuthesis-undergraduate.def}
%<def-g> {Graduate definition file for njuthesis}
%<def-g>\ProvidesExplFile{njuthesis-graduate.def}
-% ^^A 诚耀百廿,雄创一流
-% ^^A 南京大学一百二十周年华诞邀您共襄盛举!
%<def-p> {Postdoctoral definition file for njuthesis}
%<def-p>\ProvidesExplFile{njuthesis-postdoctoral.def}
%<doc-cls> {Documentation style for njuthesis}
@@ -148,7 +148,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{v1.3.2 \quad 2023-12-05}
+% \date{v1.4.0 \quad 2024-03-19}
%
% \changes{v0.1}{2021/09/04}{开始开发。}
% \changes{v0.2}{2021/09/07}{初步搭建了可用的模板。}
@@ -183,6 +183,8 @@ To produce the documentation run the original source files ending with
% \changes{v1.0}{2022/08/02}{删除 \LaTeX 基础用法的说明。}
% \changes{v1.1}{2023/01/05}{适配2023届本科生毕业毕业论文(设计)规范。}
% \changes{v1.1}{2023/01/05}{适配新版南大 \LaTeX 在线编辑器。}
+% \changes{v1.4}{2024/03/11}{总是全局修改全局变量。}
+% \changes{v1.4}{2024/03/18}{将变量统一为 |l| 类型。}
%
% \maketitle
%
@@ -232,7 +234,7 @@ To produce the documentation run the original source files ending with
% 用户组维护的,用于处理本校学生毕业论文排版需求的 \LaTeX 模板。
%
% 本模板使用的本科生毕业论文模板格式依据
-% 《关于启动南京大学2023届本科毕业论文(设计)工作的通知》\cite{nju-bachelor-2023},
+% 《关于启动南京大学2024届本科毕业论文(设计)工作的通知》\cite{nju-bachelor-2024},
% 研究生学位论文格式依据研究生院提供的材料包\cite{nju-graduate-2023}。
% 博士后出站报告格式要求与博士学位论文一致\cite{nju-postdoc-2022},
% 封面、摘要的设计参考了部分既有报告。
@@ -799,9 +801,9 @@ To produce the documentation run the original source files ending with
% 新的一章以及封面、摘要、参考文献表等特殊页面都会从奇数页开始,
% 在奇数页结束的内容后会补上一页空页,更适合印刷输出。
%
-% \begin{function}[added=2021-12-15]{draft}
+% \begin{function}[added=2021-12-15,updated=2024-03-19]{draft}
% \begin{syntax}
-% \OPT{draft} = <\TFF>
+% <\OPT{draft}>
% \end{syntax}
% 是否开启草稿模式,默认关闭。
% \end{function}
@@ -894,14 +896,23 @@ To produce the documentation run the original source files ending with
%
% 学校论文格式要求使用的字体一般已经预装在各个操作系统,
% 本模板针对不同平台进行了自动检测适配,可以开箱即用。
-% 如果希望更改本模板使用的字体,请填写以下两个选项以覆盖默认设置。
+% 如果希望更改本模板使用的字体,请填写以下选项以覆盖默认设置。
+%
+% \begin{function}[added=2023-12-15]{fontset}
+% \begin{syntax}
+% \OPT{fontset} = <win|macoffice|mac|fandol|none>
+% \end{syntax}
+% 手动指定字体库。
+% \end{function}
+%
+% \opt{fontset} 这个选项名继承自 \pkg{ctex},相当于在本模板中分别填写以下两项。
%
% \begin{function}[added=2021-09-07,updated=2021-12-18]{cjk-font,latin-font}
% \begin{syntax}
% \OPT{cjk-font} = <win|mac|fandol|founder|noto|source|none>
% \OPT{latin-font} = <win|mac|gyre|none>
% \end{syntax}
-% 手动指定字体。
+% 更精细的字体库设定。
% \end{function}
%
% 根据学校论文格式的要求,本模板使用的中文字体主要有{\songti 宋体}、
@@ -923,16 +934,17 @@ To produce the documentation run the original source files ending with
% 字体文件目录。
% \end{function}
%
-% 模板用到的部分字体(例如华文中宋)可能尚未安装在操作系统,
-% 可以使用此选项手动指定搜索路径。
-%
-% ^^A 本模板默认使用操作系统安装的字体。可以使用本选项从任意目录载入字体。
+% 模板用到的部分字体可能尚未安装在操作系统,可以使用此选项手动指定搜索路径。
+% 例如,研究生模板封面上使用到了华文中宋,该字体默认只存在于
+% \opt{win} 和 \opt{macoffice} 对应的系统配置,
+% 在其他平台编译需使用此选项手动指向 \file{STZHONGS.TTF}。
%
% \paragraph{中文}
%
% 本模板提供的中文字体配置如表 \ref{tab:cjk-fontset} 所示。
% 在不指定字体配置的情况下,本模板默认使用与操作系统相对应的字体配置
-% (见表中前三行,Windows 和 macOS 以外的系统采用
+% (见表中前四行,在装有 MS Office 的 macOS 上优先使用 Office 字体库。
+% Windows 和 macOS 以外的系统采用
% \href{https://www.ctan.org/pkg/fandol}{Fandol} 配置)。
% 此外,我们也单独提供了\href{https://www.foundertype.com}
% {方正}和\href{https://github.com/adobe-fonts}{思源}两套中文字体配置。
@@ -955,13 +967,15 @@ To produce the documentation run the original source files ending with
% 表示思源字体,请下载 Simplified Chinese(即后缀名为 SC)的版本},
% note{e} = {思源字体并不包含楷书和仿宋,而 Adobe
% 楷体和仿宋难以直接下载,因此使用方正字体代替} ]
-% { cell{2}{2,4} = {white!70!njuyellow},
-% cell{4}{4} = {white!70!njuyellow},
+% { cell{2}{2-5} = {white!70!njuyellow},
+% cell{3}{2-5} = {white!70!njuyellow},
+% cell{5-8}{4} = {white!70!njuyellow},
% colspec = {ccccc} }
% \toprule
% 配置名称 & 宋体 & 黑体 & 楷书 & 仿宋 \\
% \midrule
% \opt{win} & 中易宋体 & 中易黑体 & 中易楷体 & 中易仿宋 \\
+% \opt{macoffice} & 中易宋体 & 中易黑体 & 中易楷体 & 中易仿宋 \\
% \opt{mac} & 华文宋体 & 华文黑体 & 华文楷体 & 华文仿宋 \\
% \opt{fandol} & Fandol 宋体 & Fandol 黑体 & Fandol 楷体 & Fandol 仿宋 \\
% \opt{founder}\TA & \FZ{51}{书宋}\TB & \FZ{61}{细黑一}\TC & \FZ{37}{楷体} & \FZ{28}{仿宋} \\
@@ -993,16 +1007,17 @@ To produce the documentation run the original source files ending with
% note{a} = {TG 表示 \href{http://www.gust.org.pl/projects/e-foundry/tex-gyre}{\TeX~Gyre}。} ]
% { colspec = {cccc} }
% \toprule
-% 配置名称 & 衬线体 & 无衬线体 & 等宽字体 \\
+% 配置名称 & 衬线体 & 无衬线体 & 等宽字体 \\
% \midrule
-% \opt{win} & Times~New~Roman & Arial & Courier~New \\
-% \opt{mac} & Times~New~Roman & Arial & Menlo \\
-% \opt{gyre} & \TG{Termes} & \TG{Heros} & \TG{Cursor} \\
+% \opt{win} & Times~New~Roman & Arial & Courier~New \\
+% \opt{macoffice} & Times~New~Roman & Arial & Menlo \\
+% \opt{mac} & Times~New~Roman & Arial & Menlo \\
+% \opt{gyre} & \TG{Termes} & \TG{Heros} & \TG{Cursor} \\
% \bottomrule
% \end{talltblr}
% \end{table}
%
-% macOS 用户需要额外注意的是,此系统内置的 Times New Roman 并没有 smcp
+% macOS 用户需要额外注意的是,系统内置的 Times New Roman 并没有 smcp
% 这一特性,所以 \tn{textsc} 命令无法产生正确的小型大写字母字型,导致
% 研究生模板英文封面的部分内容不能正确显示。另外,macOS 中的 Times 字体
% 也不包含 smcp 特性。
@@ -2393,11 +2408,11 @@ To produce the documentation run the original source files ending with
% \newblock \textit{信息与文献\quad 参考文献著录规则: GB/T 7714--2015} [S].
% \newblock 北京: 中国标准出版社, 2015
%
-% \bibitem{nju-bachelor-2023}
+% \bibitem{nju-bachelor-2024}
% 南京大学本科生院.
-% \newblock \textit{关于启动南京大学2022届本科毕业论文(设计)工作的通知} [EB/OL].
-% \newblock (2022-12-19)
-% \urlprefix\url{https://jw.nju.edu.cn/29/d8/c26263a600536/page.htm}
+% \newblock \textit{关于启动南京大学2024届本科毕业论文(设计)工作的通知} [EB/OL].
+% \newblock (2023-12-19)
+% \urlprefix\url{https://jw.nju.edu.cn/db/23/c26263a645923/page.htm}
%
% \bibitem{nju-graduate-2023}
% 南京大学研究生院.
@@ -2637,6 +2652,7 @@ To produce the documentation run the original source files ending with
\@ifpackagelater { expl3 } { 2023/10/10 } { }
{
\cs_generate_variant:Nn \tl_set:Nn { Ne }
+ \cs_generate_variant:Nn \tl_gset:Nn { Ne }
\cs_generate_variant:Nn \tl_const:Nn { Ne }
\cs_generate_variant:Nn \tl_gput_right:Nn { Ne }
}
@@ -2700,11 +2716,11 @@ To produce the documentation run the original source files ending with
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}{\g_@@_opt_twoside_bool}
-% 定义用于判断是否使用双面模式的变量,初始值为使用双面模式。
+% \begin{variable}{\g_@@_opt_draft_bool}
+% 用于判断草稿模式的变量。
% \begin{macrocode}
-\bool_new:N \g_@@_opt_twoside_bool
-\bool_set_true:N \g_@@_opt_twoside_bool
+\bool_new:N \g_@@_opt_draft_bool
+\bool_gset_false:N \g_@@_opt_draft_bool
% \end{macrocode}
% \end{variable}
%
@@ -2726,11 +2742,23 @@ To produce the documentation run the original source files ending with
% \end{variable}
%
% \begin{variable}{
+% \g_@@_info_major_tl,
+% \g_@@_info_majorc_tl}
+% 用于存储专业名称的变量。
+% \begin{macrocode}
+\tl_new:N \g_@@_info_major_tl
+\tl_new:N \g_@@_info_majorc_tl
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{variable}{
+% \g_@@_font_set_tl,
% \g_@@_font_latin_tl,
% \g_@@_font_cjk_tl,
% \g_@@_font_math_tl}
% 存储所使用字体名称的全局变量。
% \begin{macrocode}
+\tl_new:N \g_@@_font_set_tl
\tl_new:N \g_@@_font_latin_tl
\tl_new:N \g_@@_font_cjk_tl
\tl_new:N \g_@@_font_math_tl
@@ -2815,19 +2843,20 @@ To produce the documentation run the original source files ending with
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_quad:,\@@_qquad:}
+% \begin{macro}{\@@_space:,\@@_quad:,\@@_qquad:}
% 等价于 \LaTeXe{} 中的 \tn{quad} 和 \tn{qquad}。
% \begin{macrocode}
-\cs_new:Nn \@@_quad: { \skip_horizontal:n { 1 em } }
-\cs_new:Nn \@@_qquad: { \skip_horizontal:n { 2 em } }
+\cs_new:Nn \@@_space: { \skip_horizontal:n { .5 em } }
+\cs_new:Nn \@@_quad: { \skip_horizontal:n { 1 em } }
+% \cs_new:Nn \@@_qquad: { \skip_horizontal:n { 2 em } }
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_vskip:,\@@_hskip:}
% 生成一个较小的 skip。
% \begin{macrocode}
-\cs_new:Nn \@@_vskip: { \skip_vertical:N \c_@@_vsep_dim }
-\cs_new:Nn \@@_hskip: { \skip_horizontal:N \c_@@_hsep_dim }
+\cs_new:Nn \@@_vskip: { \skip_vertical:N \l_@@_vsep_dim }
+\cs_new:Nn \@@_hskip: { \skip_horizontal:N \l_@@_hsep_dim }
% \end{macrocode}
% \end{macro}
%
@@ -2849,12 +2878,15 @@ To produce the documentation run the original source files ending with
% \begin{macro}{\@@_define_name:nn,\@@_define_name:nnn}
% 用来定义默认名称的辅助函数。
% \begin{macrocode}
-\cs_new_protected:Npn \@@_define_name:nn #1#2
- { \tl_const:cn { c_@@_name_ #1 _tl } {#2} }
-\cs_new_protected:Npn \@@_define_name:nnn #1#2#3
+\cs_new:Npn \@@_define_name:nn #1
+ {
+ \tl_new:c { l_@@_name_ #1 _tl }
+ \tl_set:cn { l_@@_name_ #1 _tl }
+ }
+\cs_new:Npn \@@_define_name:nnn #1#2#3
{
- \tl_const:cn { c_@@_name_ #1 _tl } {#2}
- \tl_const:cn { c_@@_name_ #1 _en_tl } {#3}
+ \@@_define_name:nn { #1 } {#2}
+ \@@_define_name:nn { #1 _en } {#3}
}
% \end{macrocode}
% \end{macro}
@@ -2862,27 +2894,32 @@ To produce the documentation run the original source files ending with
% \begin{macro}{\@@_define_fmt:nn}
% 用来定义默认样式的辅助函数。
% \begin{macrocode}
-\cs_new_protected:Npn \@@_define_fmt:nn #1#2
- { \tl_const:cn { c_@@_fmt_ #1 _tl } {#2} }
+\cs_new:Npn \@@_define_fmt:nn #1 { \tl_set:cn { l_@@_fmt_ #1 _tl } }
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_define_dim:nn,\@@_define_skip:nn}
% 用来定义默认间距的辅助函数。
% \begin{macrocode}
-\cs_new_protected:Npn \@@_define_dim:nn #1#2
- { \dim_const:cn { c_@@_ #1 _dim } {#2} }
-\cs_new_protected:Npn \@@_define_skip:nn #1#2
- { \skip_const:cn { c_@@_ #1 _skip } {#2} }
+\cs_new:Npn \@@_define_dim:nn #1
+ {
+ \dim_new:c { l_@@_ #1 _dim }
+ \dim_set:cn { l_@@_ #1 _dim }
+ }
+\cs_new:Npn \@@_define_skip:nn #1
+ {
+ \skip_new:c { l_@@_ #1 _skip }
+ \skip_set:cn { l_@@_ #1 _skip }
+ }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_name:n,\@@_info:n,\@@_fmt:n}
+% \begin{macro}{\@@_info:n,\@@_name:n,\@@_fmt: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 { g_@@_info_ #1 _tl } }
-\cs_new:Npn \@@_fmt:n #1 { \tl_use:c { c_@@_fmt_ #1 _tl } }
+\cs_new:Npn \@@_name:n #1 { \tl_use:c { l_@@_name_ #1 _tl } }
+\cs_new:Npn \@@_fmt:n #1 { \tl_use:c { l_@@_fmt_ #1 _tl } }
% \end{macrocode}
% \end{macro}
%
@@ -2951,7 +2988,7 @@ To produce the documentation run the original source files ending with
\cs_new_protected:Npn \@@_box_ulined:NN #1#2
{
\mode_leave_vertical:
- \rule [ \c_@@_ruledpi_dim ] {#1} { \c_@@_rulehti_dim }
+ \rule [ \l_@@_ruledpi_dim ] {#1} { \l_@@_rulehti_dim }
\skip_horizontal:n { -#1 }
\hbox_to_wd:nn {#1} { \tex_hfil:D #2 \tex_hfil:D }
}
@@ -3006,12 +3043,12 @@ To produce the documentation run the original source files ending with
% \end{macro}
%
% \begin{macro}{\@@_box_spread_name:Nn,\@@_box_spread_name:NNn}
-% 以上盒子只用来打印 \cs[no-index]{c_@@_name_\meta{描述}_tl} 变量。
+% 以上盒子只用来打印 \cs[no-index]{l_@@_name_\meta{描述}_tl} 变量。
% \begin{macrocode}
\cs_new_protected:Npn \@@_box_spread_name:Nn #1#2
- { \@@_box_spread:NNv #1 \c_empty_tl { c_@@_name_ #2 _tl } }
+ { \@@_box_spread:NNv #1 \c_empty_tl { l_@@_name_ #2 _tl } }
\cs_new_protected:Npn \@@_box_spread_name:NNn #1#2#3
- { \@@_box_spread:NNv #1 #2 { c_@@_name_ #3 _tl } }
+ { \@@_box_spread:NNv #1 #2 { l_@@_name_ #3 _tl } }
% \end{macrocode}
% \end{macro}
%
@@ -3046,7 +3083,7 @@ To produce the documentation run the original source files ending with
% \changes{v1.1}{2022/11/29}{修复空返回值在国家图书馆封面引发的死循环。}
% 防止空的返回值引发死循环。
% \begin{macrocode}
- \clist_pop:NNF #3 #2 { \tl_set_eq:NN #2 \c_empty_tl }
+ \clist_gpop:NNF #3 #2 { \tl_set_eq:NN #2 \c_empty_tl }
\@@_box_ulined:NN #4 #2 \tex_par:D
}
}
@@ -3069,7 +3106,7 @@ To produce the documentation run the original source files ending with
\cs_new_protected:Npn \@@_uline:n #1
{
\mode_leave_vertical:
- \rule [ \c_@@_ruledpi_dim ] {#1} { \c_@@_rulehti_dim }
+ \rule [ \l_@@_ruledpi_dim ] {#1} { \l_@@_rulehti_dim }
\skip_horizontal:n { -#1 }
}
% \end{macrocode}
@@ -3084,9 +3121,9 @@ To produce the documentation run the original source files ending with
\cs_new_protected:Npn \@@_uuline:N #1
{
\mode_leave_vertical:
- \rule [ \c_@@_ruledpii_dim ] {#1} { \c_@@_rulehtii_dim }
+ \rule [ \l_@@_ruledpii_dim ] {#1} { \l_@@_rulehtii_dim }
\skip_horizontal:n { -#1 }
- \rule [ \c_@@_ruledpiii_dim ] {#1} { \c_@@_rulehtii_dim }
+ \rule [ \l_@@_ruledpiii_dim ] {#1} { \l_@@_rulehtii_dim }
\skip_horizontal:n { -#1 }
}
% \end{macrocode}
@@ -3164,7 +3201,7 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\cs_new_protected:Npn \@@_uline_entry:Nn #1#2
{
- \@@_get_width_print:Nv #1 { c_@@_name_ #2 _tl }
+ \@@_get_width_print:Nv #1 { l_@@_name_ #2 _tl }
\@@_box_ulined_info:Nn #1 {#2}
}
% \end{macrocode}
@@ -3179,7 +3216,7 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\cs_new_protected:Npn \@@_uline_bientry:Nn #1#2
{
- \@@_get_width_print:Nv #1 { c_@@_name_ #2 _tl }
+ \@@_get_width_print:Nv #1 { l_@@_name_ #2 _tl }
\dim_sub:Nn #1 { \textwidth / 2 }
\@@_box_ulined_info:Nn #1 {#2}
}
@@ -3219,7 +3256,7 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\cs_new:Npn \@@_date:nnn #1#2#3
{
- \tl_set:cx { g_@@_info_ #2 date #1 _tl }
+ \tl_gset:cx { g_@@_info_ #2 date #1 _tl }
{
\tl_if_empty:nTF {#3}
{ \@@_name:n { blankdate #1 } }
@@ -3279,7 +3316,7 @@ To produce the documentation run the original source files ending with
\cs_new:Npn \@@_breakpar_loop:n #1
{
\dim_set:Nn \l_@@_tmpa_dim
- { - \tex_prevdepth:D - \c_@@_ruledpi_dim - \c_@@_rulehti_dim }
+ { - \tex_prevdepth:D - \l_@@_ruledpi_dim - \l_@@_rulehti_dim }
\hbox_gset:Nn \l_@@_tmpc_box { }
\@@_loop_until:nnn { \box_if_empty_p:N \l_@@_tmpb_box }
{
@@ -3364,7 +3401,7 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\parbox [ t ] {#3}
{
- \c_@@_fmt_covertitle_tl \@@_uline_title:
+ \l_@@_fmt_covertitle_tl \@@_uline_title:
\dim_gset_eq:NN \l_@@_tmpa_dim \tex_prevdepth:D
}
\tex_par:D
@@ -3443,9 +3480,9 @@ To produce the documentation run the original source files ending with
% 此时 \tn{njuemblem}、\tn{njuname} 和相关长度都是没有定义的。
% \begin{macrocode}
\cs_new_protected:Npn \@@_emblem:N #1
- { \njuemblem [ \c_@@_fmt_emblemcolor_tl ] {#1} { ! } }
+ { \njuemblem [ \l_@@_fmt_emblemcolor_tl ] {#1} { ! } }
\cs_new_protected:Npn \@@_name:N #1
- { \njuname [ \c_@@_fmt_namecolor_tl ] {#1} { ! } }
+ { \njuname [ \l_@@_fmt_namecolor_tl ] {#1} { ! } }
% \end{macrocode}
% \end{macro}
%
@@ -3784,6 +3821,26 @@ To produce the documentation run the original source files ending with
% \subsection{模板选项}
% \changes{v0.11}{2021/11/15}{进行了效率优化。}
%
+% \begin{macro}{\@@_pass_option:nn}
+% 封装 \LaTeXe{} 传参函数。注意参数顺序有变化。
+% \begin{macrocode}
+\cs_new:Npn \@@_pass_option:nn #1#2 { \PassOptionsToClass {#2} {#1} }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_pass_option:n,\@@_pass_option:V,\@@_pass_option:e}
+% \begin{macrocode}
+\cs_new:Npn \@@_pass_option:n { \@@_pass_option:nn { ctexbook } }
+\cs_generate_variant:Nn \@@_pass_option:n { V }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_pass_option:}
+% \begin{macrocode}
+\cs_new:Npn \@@_pass_option: { \@@_pass_option:V \l_keys_key_str }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macrocode}
\keys_define:nn { nju }
{
@@ -3805,9 +3862,9 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
degree .choice:,
degree / academic .code:n =
- { \bool_set_true:N \g_@@_opt_academic_bool },
+ { \bool_gset_true:N \g_@@_opt_academic_bool },
degree / professional .code:n =
- { \bool_set_false:N \g_@@_opt_academic_bool },
+ { \bool_gset_false:N \g_@@_opt_academic_bool },
degree .initial:n = academic,
% \end{macrocode}
% \end{macro}
@@ -3816,7 +3873,7 @@ To produce the documentation run the original source files ending with
% 是否需要国家图书馆封面。本选项仅用于研究生模板,默认关闭。
% \footnote{nl 代表 National Library。}
% \begin{macrocode}
- nl-cover .bool_set:N = \g_@@_opt_nlcover_bool,
+ nl-cover .bool_gset:N = \g_@@_opt_nlcover_bool,
nl-cover .initial:n = false,
% \end{macrocode}
% \end{macro}
@@ -3828,17 +3885,22 @@ To produce the documentation run the original source files ending with
% \footnote{原创性声明的英文翻译为 Declaration of Originality,
% 为了使选项表义更清晰同时缩减名称长度,将其修改为“声明页”这一名称。}
% \begin{macrocode}
- decl-page .bool_set:N = \g_@@_opt_decl_bool,
+ decl-page .bool_gset:N = \g_@@_opt_decl_bool,
decl-page .initial:n = false,
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{draft,\g_@@_opt_draft_bool}
+% \begin{macro}{draft}
% \changes{v0.13}{2021/12/15}{新增草稿模式选项。}
+% \changes{v1.4}{2024/03/19}{草稿模式选项不接受传入值。}
% 是否开启草稿模式(默认关闭)。
% \begin{macrocode}
- draft .bool_gset:N = \g_@@_opt_draft_bool,
- draft .initial:n = false,
+ draft .value_forbidden:n = true,
+ draft .code:n =
+ {
+ \bool_gset_true:N \g_@@_opt_draft_bool
+ \@@_pass_option:
+ },
% \end{macrocode}
% \end{macro}
%
@@ -3848,7 +3910,18 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
oneside .value_forbidden:n = true,
twoside .value_forbidden:n = true,
- oneside .bool_gset_inverse:N = \g_@@_opt_twoside_bool,
+ oneside .code:n =
+ {
+ \bool_gset_false:N \g_@@_opt_twoside_bool
+ \tl_gset:Nn \g_@@_name_pagemode_tl { oneside }
+ \@@_pass_option:
+ },
+ twoside .code:n =
+ {
+ \bool_gset_true:N \g_@@_opt_twoside_bool
+ \tl_gset:Nn \g_@@_name_pagemode_tl { twoside }
+ \@@_pass_option:
+ },
% \end{macrocode}
% \end{macro}
%
@@ -3858,7 +3931,7 @@ To produce the documentation run the original source files ending with
% \begin{macro}{\g_@@_opt_anon_bool}
% 盲审模式。
% \begin{macrocode}
- anonymous .bool_set:N = \g_@@_opt_anon_bool,
+ anonymous .bool_gset:N = \g_@@_opt_anon_bool,
anonymous .initial:n = false,
% \end{macrocode}
% \end{macro}
@@ -3866,14 +3939,24 @@ To produce the documentation run the original source files ending with
%
% \begin{macro}{latin-font,cjk-font}
% \changes{v0.14}{2021/12/12}{简化字体选项名称。}
-% 中英文字体选项。
+% 中英文字体选项。\opt{fandol} 和 \opt{gyre} 是等价的。
% \begin{macrocode}
latin-font .choices:nn =
- { gyre, mac, win, none }
- { \tl_set_eq:NN \g_@@_font_latin_tl \l_keys_choice_tl },
+ { fandol, gyre, mac, macoffice, win, none }
+ { \tl_gset:Nn \g_@@_font_latin_tl {#1} },
cjk-font .choices:nn =
- { fandol, founder, mac, noto, source, win, none }
- { \tl_set_eq:NN \g_@@_font_cjk_tl \l_keys_choice_tl },
+ { fandol, founder, mac, macoffice, noto, source, win, none }
+ { \tl_gset:Nn \g_@@_font_cjk_tl {#1} },
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{latin-font,cjk-font}
+% \changes{v1.4}{2023/12/15}{增加统一的字体选项名称。}
+% 中英文字体选项。\opt{fontset} 这个名称和 \pkg{ctex} 是一致的。
+% \begin{macrocode}
+ fontset .choices:nn =
+ { fandol, mac, macoffice, win, none }
+ { \keys_set:nn { nju } { latin-font = #1, cjk-font = #1 } },
% \end{macrocode}
% \end{macro}
%
@@ -3887,7 +3970,7 @@ To produce the documentation run the original source files ending with
asana, cambria, fira, garamond, lm, libertinus, newcm,
stix, bonum, dejavu, pagella, schola, termes, xits, none
}
- { \tl_set_eq:NN \g_@@_font_math_tl \l_keys_choice_tl },
+ { \tl_gset_eq:NN \g_@@_font_math_tl \l_keys_choice_tl },
math-font .initial:n = xits,
% \end{macrocode}
% \end{macro}
@@ -3897,8 +3980,8 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
font-path .code:n =
{
- \bool_set_true:N \g_@@_font_path_bool
- \tl_set_eq:NN \g_@@_font_path_tl \l_keys_value_tl
+ \bool_gset_true:N \g_@@_font_path_bool
+ \tl_gset_eq:NN \g_@@_font_path_tl \l_keys_value_tl
},
% \end{macrocode}
% \end{macro}
@@ -3908,7 +3991,8 @@ To produce the documentation run the original source files ending with
% \begin{macro}{\g_@@_opt_zihao_tl}
% 字号。默认为小四号。
% \begin{macrocode}
- zihao .tl_set:N = \g_@@_opt_zihao_tl,
+ zihao .code:n =
+ { \@@_pass_option:n { zihao = #1 } },
zihao .initial:n = -4,
% \end{macrocode}
% \end{macro}
@@ -3921,7 +4005,8 @@ To produce the documentation run the original source files ending with
% Word 行距,故默认值为 $1.5\times\frac{1.3}{1.2} = 1.625$。
% 更详细的说明请参考 \pkg{zhlineskip} 宏包文档。
% \begin{macrocode}
- linespread .tl_set:N = \g_@@_opt_linespread_tl,
+ linespread .code:n =
+ { \@@_pass_option:n { linespread = #1 } },
linespread .initial:n = 1.625,
% \end{macrocode}
% \end{macro}
@@ -3931,11 +4016,16 @@ To produce the documentation run the original source files ending with
% \changes{v0.16}{2022/02/23}{新增 \opt{config} 选项。}
% 配置文件路径。
% \begin{macrocode}
- config .clist_set:N = \g_@@_config_clist
+ config .clist_gset:N = \g_@@_config_clist
}
% \end{macrocode}
% \end{macro}
%
+% 初始化为双页模式。
+% \begin{macrocode}
+\keys_set:nn { nju } { twoside }
+% \end{macrocode}
+%
% \begin{macro}{\g_@@_name_optional_pkg_clist}
% \begin{macrocode}
\clist_new:N \g_@@_name_optional_pkg_clist
@@ -3962,7 +4052,7 @@ To produce the documentation run the original source files ending with
\bool_if:cT { g_@@_opt_load_ #2 _bool }
{ \RequirePackage {#1} }
}
- \clist_put_right:Nn \g_@@_name_optional_pkg_clist {#1}
+ \clist_gput_right:Nn \g_@@_name_optional_pkg_clist {#1}
}
% \end{macrocode}
% \end{macro}
@@ -4022,18 +4112,11 @@ To produce the documentation run the original source files ending with
\ProcessKeysOptions { nju }
% \end{macrocode}
%
-% 处理单双面模式选项。
-% \begin{macrocode}
-\bool_if:NTF \g_@@_opt_twoside_bool
- { \tl_const:Nn \c_@@_name_pagemode_tl { twoside } }
- { \tl_const:Nn \c_@@_name_pagemode_tl { oneside } }
-% \end{macrocode}
-%
% \changes{v1.1}{2022/09/26}{盲审模式下不显示声明页。}
% 盲审模式下不显示声明页。
% \begin{macrocode}
\bool_if:NT \g_@@_opt_anon_bool
- { \bool_set_false:N \g_@@_opt_decl_bool }
+ { \bool_gset_false:N \g_@@_opt_decl_bool }
% \end{macrocode}
%
%
@@ -4106,7 +4189,7 @@ To produce the documentation run the original source files ending with
% 定义修改默认样式的接口。
% \begin{macrocode}
\NewDocumentCommand \njusetformat { m m }
- { \tl_gset:cn { c_@@_fmt_ #1 _tl } {#2} }
+ { \@@_define_fmt:nn {#1} {#2} }
% \end{macrocode}
% \end{macro}
%
@@ -4118,8 +4201,8 @@ To produce the documentation run the original source files ending with
\NewDocumentCommand \njusetlength { s m m }
{
\bool_if:nTF {#1}
- { \skip_gset:cn { c_@@_ #2 _skip } {#3} }
- { \dim_gset:cn { c_@@_ #2 _dim } {#3} }
+ { \skip_gset:cn { l_@@_ #2 _skip } {#3} }
+ { \dim_gset:cn { l_@@_ #2 _dim } {#3} }
}
% \end{macrocode}
% \end{macro}
@@ -4149,9 +4232,9 @@ To produce the documentation run the original source files ending with
\cs_new_protected:Npn \@@_set_tokenlist:nnnnn #1#2#3#4#5
{
\bool_if:nTF {#1}
- { \tl_set_eq:NN \l_@@_tmpb_tl \c_@@_name_suffix_en_tl }
+ { \tl_set_eq:NN \l_@@_tmpb_tl \l_@@_name_suffix_en_tl }
{ \tl_clear:N \l_@@_tmpb_tl }
- \tl_gset:cn { c_@@_ #5 _ #2 #3 \l_@@_tmpb_tl _tl } {#4}
+ \tl_gset:cn { l_@@_ #5 _ #2 #3 \l_@@_tmpb_tl _tl } {#4}
}
% \end{macrocode}
% \end{macro}
@@ -4164,33 +4247,16 @@ To produce the documentation run the original source files ending with
% \changes{v0.12}{2021/12/07}{重新组织宏包载入顺序。}
% 将选项传入 \cls{ctexbook} 文档类。
% \begin{macrocode}
-\exp_args:Ne \PassOptionsToClass
+\@@_pass_option:n
{
a4paper,
UTF8,
scheme = chinese,
% \end{macrocode}
-% 传入单双面模式选项。
-% \begin{macrocode}
- \c_@@_name_pagemode_tl,
-% \end{macrocode}
-% 开启草稿模式后传入 |draft| 选项。
-% \begin{macrocode}
- \bool_if:NT \g_@@_opt_draft_bool { draft, }
-% \end{macrocode}
-% 行距。
-% \begin{macrocode}
- linespread = \g_@@_opt_linespread_tl,
-% \end{macrocode}
% 默认不载入任何字体,供本模板自行设置。
% \begin{macrocode}
- fontset = none,
-% \end{macrocode}
-% 正文字号设置。
-% \begin{macrocode}
- zihao = \g_@@_opt_zihao_tl
+ fontset = none
}
- { ctexbook }
% \end{macrocode}
%
% 传入各宏包选项。
@@ -4200,10 +4266,14 @@ To produce the documentation run the original source files ending with
% \end{macrocode}
% 隐藏 |does not contain script "CJK"| 警告。
% \begin{macrocode}
- { quiet } { xeCJK },
+% { quiet } { xeCJK },
{ no-math } { fontspec },
{ perpage } { footmisc },
- { capitalise, nameinlink, noabbrev } { cleveref }
+ { capitalise, nameinlink, noabbrev } { cleveref },
+% \end{macrocode}
+% \pkg{ntheorem} 依赖 \pkg{amsthm} 和 \pkg{thmmarks} 实现 QED 符号等功能。
+% \begin{macrocode}
+ { amsmath, thmmarks, noconfig } { ntheorem }
}
{ \PassOptionsToPackage #1 }
% \end{macrocode}
@@ -4261,23 +4331,18 @@ To produce the documentation run the original source files ending with
booktabs,
caption,
graphicx,
+ }
+\@@_loadpkg_nthm:
% \end{macrocode}
-% 按以下顺序加载两个关于引用的包。
% \pkg{hyperref} 覆写了大量命令,因此需要在其他包最后载入。
-% 仅有 \pkg{cleveref} 需要在 \pkg{hyperref} 后载入,否则会报错。
% \begin{macrocode}
- hyperref
- }
-\@@_loadpkg_cref:
+\RequirePackage { hyperref }
% \end{macrocode}
%
-% \pkg{ntheorem} 依赖 \pkg{amsthm} 和 \pkg{thmmarks} 实现 QED 符号等功能。
+% \changes{v1.3}{2024/01/16}{调整 \pkg{cleveref} 到 \pkg{ntheorem} 后载入。}
+% \pkg{cleveref} 需要在 \pkg{ntheorem} 和 \pkg{hyperref} 后载入。
% \begin{macrocode}
-\bool_if:NT \g_@@_opt_load_nthm_bool
- {
- \PassOptionsToPackage { amsmath, thmmarks, noconfig } { ntheorem }
- \RequirePackage { ntheorem }
- }
+\@@_loadpkg_cref:
% \end{macrocode}
%
% 在双面模式下,使用 \pkg{emptypage} 清除空白页的页眉、页脚和页码。
@@ -4409,9 +4474,9 @@ To produce the documentation run the original source files ending with
% \changes{v0.14}{2022/01/14}{将标题断行控制符修改为 |\\|。}
% 题目。中文题目可使用 |\\| 手动断行。以下标注星号(|*|)的皆为对应的英文字段。
% \begin{macrocode}
- title .tl_set:N = \g_@@_info_title_tl ,
+ title .tl_gset:N = \g_@@_info_title_tl ,
title .initial:n = { 空 } ,
- title* .tl_set:N = \g_@@_info_title_en_tl ,
+ title* .tl_gset:N = \g_@@_info_title_en_tl ,
title* .initial:n = { Empty } ,
% \end{macrocode}
% \end{macro}
@@ -4420,18 +4485,18 @@ To produce the documentation run the original source files ending with
% \changes{v0.11}{2021/10/01}{修改了添加关键词的方式。}
% 关键词列表。
% \begin{macrocode}
- keywords .clist_set:N = \g_@@_info_keywords_clist ,
- keywords* .clist_set:N = \g_@@_info_keywords_en_clist ,
+ keywords .clist_gset:N = \g_@@_info_keywords_clist ,
+ keywords* .clist_gset: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 = \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 ,
+ grade .tl_gset:N = \g_@@_info_grade_tl ,
+ student-id .tl_gset:N = \g_@@_info_id_tl ,
+ author .tl_gset:N = \g_@@_info_author_tl ,
+ author* .tl_gset:N = \g_@@_info_author_en_tl ,
% \end{macrocode}
% \end{macro}
%
@@ -4439,11 +4504,11 @@ To produce the documentation run the original source files ending with
% info/major*,info/field,info/field*}
% 院系、专业、方向。
% \begin{macrocode}
- department .tl_set:N = \g_@@_info_dept_tl ,
- department* .tl_set:N = \g_@@_info_dept_en_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 ,
+ department .tl_gset:N = \g_@@_info_dept_tl ,
+ department* .tl_gset:N = \g_@@_info_dept_en_tl ,
+ major* .tl_gset:N = \g_@@_info_major_en_tl ,
+ field .tl_gset:N = \g_@@_info_field_tl ,
+ field* .tl_gset:N = \g_@@_info_field_en_tl ,
% \end{macrocode}
% \end{macro}
%
@@ -4455,11 +4520,16 @@ To produce the documentation run the original source files ending with
major .code:n =
{
\bool_if:NTF \g_@@_opt_academic_bool
- { \clist_pop:NN \l_keys_value_tl \g_@@_info_major_tl }
{
- \clist_pop:NN \l_keys_value_tl \g_@@_info_majorc_tl
- \clist_pop:NNF \l_keys_value_tl \g_@@_info_major_tl
- { \tl_set_eq:NN \g_@@_info_major_tl \g_@@_info_majorc_tl }
+ \clist_pop:NN \l_keys_value_tl \l_@@_tmpa_tl
+ \tl_gset_eq:NN \g_@@_info_major_tl \l_@@_tmpa_tl
+ }
+ {
+ \clist_pop:NN \l_keys_value_tl \l_@@_tmpa_tl
+ \tl_gset_eq:NN \g_@@_info_majorc_tl \l_@@_tmpa_tl
+ \clist_pop:NNTF \l_keys_value_tl \l_@@_tmpa_tl
+ { \tl_gset_eq:NN \g_@@_info_major_tl \l_@@_tmpa_tl }
+ { \tl_gset_eq:NN \g_@@_info_major_tl \g_@@_info_majorc_tl }
}
},
% \end{macrocode}
@@ -4470,46 +4540,46 @@ To produce the documentation run the original source files ending with
% \changes{v0.14}{2022/01/12}{精简导师信息选项。}
% 导师信息。中文导师全称使用 |clist| 存储,便于在本科生封面中进行分割。
% \begin{macrocode}
- supervisor .clist_set:N = \g_@@_info_supv_clist ,
- supervisor* .tl_set:N = \g_@@_info_supv_en_tl ,
+ supervisor .clist_gset:N = \g_@@_info_supv_clist ,
+ supervisor* .tl_gset: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 = \g_@@_info_supvii_clist ,
- supervisor-ii* .tl_set:N = \g_@@_info_supvii_en_tl ,
+ supervisor-ii .clist_gset:N = \g_@@_info_supvii_clist ,
+ supervisor-ii* .tl_gset:N = \g_@@_info_supvii_en_tl ,
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/chairman,info/reviewer}
% 答辩委员会信息。
% \begin{macrocode}
- chairman .tl_set:N = \g_@@_info_chairman_tl ,
- reviewer .clist_set:N = \g_@@_info_reviewer_clist ,
+ chairman .tl_gset:N = \g_@@_info_chairman_tl ,
+ reviewer .clist_gset:N = \g_@@_info_reviewer_clist ,
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/clc,info/udc}
% 分类号。
% \begin{macrocode}
- clc .tl_set:N = \g_@@_info_clc_tl ,
- udc .tl_set:N = \g_@@_info_udc_tl ,
+ clc .tl_gset:N = \g_@@_info_clc_tl ,
+ udc .tl_gset:N = \g_@@_info_udc_tl ,
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/secret-level}
% 密级。
% \begin{macrocode}
- secret-level .tl_set:N = \g_@@_info_secretlv_tl ,
+ secret-level .tl_gset:N = \g_@@_info_secretlv_tl ,
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/supervisor-contact}
% 导师联系方式。
% \begin{macrocode}
- supervisor-contact .tl_set:N = \g_@@_info_supvcont_tl ,
+ supervisor-contact .tl_gset:N = \g_@@_info_supvcont_tl ,
% \end{macrocode}
% \end{macro}
%
@@ -4517,7 +4587,7 @@ To produce the documentation run the original source files ending with
% \changes{v0.14}{2022/01/12}{新增电邮地址设置项。}
% 用于学位论文出版授权书的电子邮件地址。
% \begin{macrocode}
- email .tl_set:N = \g_@@_info_email_tl ,
+ email .tl_gset:N = \g_@@_info_email_tl ,
% \end{macrocode}
% \end{macro}
%
@@ -4525,7 +4595,7 @@ To produce the documentation run the original source files ending with
% \changes{v1.2}{2023/04/27}{新增学校代码设置项。}
% 学校代码。
% \begin{macrocode}
- school-code .tl_set:N = \g_@@_info_code_tl ,
+ school-code .tl_gset:N = \g_@@_info_code_tl ,
school-code .initial:n = { 10284 } ,
% \end{macrocode}
% \end{macro}
@@ -4534,8 +4604,8 @@ To produce the documentation run the original source files ending with
% \changes{v1.2}{2023/04/24}{新增学位名称设置项。}
% 覆盖预定义的学位字段。
% \begin{macrocode}
- degree .tl_set:N = \g_@@_info_degree_tl ,
- degree* .tl_set:N = \g_@@_info_degree_en_tl ,
+ degree .tl_gset:N = \g_@@_info_degree_tl ,
+ degree* .tl_gset:N = \g_@@_info_degree_en_tl ,
% \end{macrocode}
% \end{macro}
%
@@ -4591,15 +4661,15 @@ To produce the documentation run the original source files ending with
% \end{macrocode}
% 拼合双导师的姓名和职称。
% \begin{macrocode}
- \tl_set:Ne \g_@@_info_supvfull_tl
- { \clist_use:Nn \g_@@_info_supv_clist { \@@_hskip: } }
+ \tl_gset:Ne \g_@@_info_supvfull_tl
+ { \clist_use:Nn \g_@@_info_supv_clist { \@@_quad: } }
\clist_if_empty:NF \g_@@_info_supvii_clist
{
\bool_gset_true:N \g_@@_opt_supvii_bool
\tl_gput_right:Ne \g_@@_info_supvfull_tl
- { \@@_quad: \clist_use:Nn \g_@@_info_supvii_clist { \@@_hskip: } }
+ { \@@_quad: \clist_use:Nn \g_@@_info_supvii_clist { \@@_quad: } }
}
- \tl_set_eq:NN \g_@@_info_supvfull_en_tl \g_@@_info_supv_en_tl
+ \tl_gset_eq:NN \g_@@_info_supvfull_en_tl \g_@@_info_supv_en_tl
\tl_if_empty:NF \g_@@_info_supvii_en_tl
{
\tl_gput_right:Ne \g_@@_info_supvfull_en_tl
@@ -4621,9 +4691,9 @@ To produce the documentation run the original source files ending with
% \begin{variable}{\g_@@_info_confer_tl}
% \begin{macrocode}
\tl_new:N \g_@@_info_confer_tl
-\tl_set:Nn \g_@@_info_confer_tl
+\tl_gset:Nn \g_@@_info_confer_tl
{
- \textbf { \c_@@_name_nju_tl } \hfil
+ \textbf { \l_@@_name_nju_tl } \hfil
\g_@@_info_conferdate_tl
}
% \end{macrocode}
@@ -4636,7 +4706,7 @@ To produce the documentation run the original source files ending with
% 文档类型字样。
% \begin{macrocode}
\tl_new:N \g_@@_info_type_tl
-\tl_set:Ne \g_@@_info_type_tl
+\tl_gset:Ne \g_@@_info_type_tl
{ \clist_item:Nn \c_@@_name_type_clist { \g_@@_info_type_int } }
% \end{macrocode}
% \end{variable}
@@ -4645,9 +4715,9 @@ To produce the documentation run the original source files ending with
% 学位类型字样。
% \begin{macrocode}
\tl_new:N \g_@@_info_degree_tl
-\tl_set_eq:NN \g_@@_info_degree_tl \g_@@_info_type_tl
+\tl_gset_eq:NN \g_@@_info_degree_tl \g_@@_info_type_tl
\bool_if:NF \g_@@_opt_academic_bool
- { \tl_put_right:Nn \g_@@_info_degree_tl { 专业 } }
+ { \tl_gput_right:Nn \g_@@_info_degree_tl { 专业 } }
% \end{macrocode}
% \end{variable}
%
@@ -4655,7 +4725,7 @@ To produce the documentation run the original source files ending with
% 英文的学位字样。
% \begin{macrocode}
\tl_new:N \g_@@_info_degree_en_tl
-\tl_set:Ne \g_@@_info_degree_en_tl
+\tl_gset:Ne \g_@@_info_degree_en_tl
{ \clist_item:Nn \c_@@_name_type_en_clist { \g_@@_info_type_int } }
%</def-g>
% \end{macrocode}
@@ -4666,8 +4736,8 @@ To produce the documentation run the original source files ending with
%<*class>
\bool_if:NT \g_@@_opt_anon_bool
{
- \tl_gclear:N \c_@@_name_nju_tl
- \tl_gclear:N \c_@@_name_nju_en_tl
+ \tl_clear:N \l_@@_name_nju_tl
+ \tl_clear:N \l_@@_name_nju_en_tl
}
% \end{macrocode}
%
@@ -4678,18 +4748,37 @@ To produce the documentation run the original source files ending with
%
% \subsubsection{操作系统检测}
%
-% 调用 \pkg{ctex} 提供的操作系统检测。
+% \begin{variable}{\c_@@_path_macoffice_tl}
+% mac Office 字体路径。
% \begin{macrocode}
-\ctex_detect_platform:
+\tl_const:Nn \c_@@_path_macoffice_tl
+ { /Applications/Microsoft~ Word.app/Contents/Resources/DFonts/ }
+% \end{macrocode}
+% \end{variable}
+%
+% 操作系统检测。相较于 \pkg{ctex} 提供的 \cs{ctex_detect_platform:},
+% 额外增加了对 macOS 上 MS Office 的检测。
+% \begin{macrocode}
+\sys_if_platform_windows:TF
+ { \tl_gset:Nn \g_@@_font_set_tl { win } }
+ {
+ \ctex_if_platform_macos:TF
+ {
+ \file_if_exist:nTF { \c_@@_path_macoffice_tl times.ttf }
+ { \tl_gset:Nn \g_@@_font_set_tl { macoffice } }
+ { \tl_gset:Nn \g_@@_font_set_tl { mac } }
+ }
+ { \tl_gset:Nn \g_@@_font_set_tl { fandol } }
+ }
% \end{macrocode}
% 判断用户是否自定义了中英文字体。如果其中任意一种未被定义,
% 则使用系统预装字体覆盖字体选项。
% Windows 或 macOS 外的系统被判断为 Linux,一律使用自由字体。
% \begin{macrocode}
\tl_if_empty:NT \g_@@_font_latin_tl
- { \tl_gset_eq:NN \g_@@_font_latin_tl \g__ctex_fontset_tl }
+ { \tl_gset_eq:NN \g_@@_font_latin_tl \g_@@_font_set_tl }
\tl_if_empty:NT \g_@@_font_cjk_tl
- { \tl_gset_eq:NN \g_@@_font_cjk_tl \g__ctex_fontset_tl }
+ { \tl_gset_eq:NN \g_@@_font_cjk_tl \g_@@_font_set_tl }
% \end{macrocode}
%
%
@@ -4701,7 +4790,7 @@ To produce the documentation run the original source files ending with
% \@@_loadfont_latin_win:,\@@_loadfont_latin_mac:}
% Windows 与 macOS 西文字体的区别主要在于默认等宽字体。
% \begin{macrocode}
-\cs_new_protected:Npn \@@_loadfont_latin:n #1
+\cs_new:Npn \@@_loadfont_latin:n #1
{
\__fontspec_main_setmainfont:nn { } { Times~New~Roman }
\__fontspec_main_setsansfont:nn { } { Arial }
@@ -4727,6 +4816,36 @@ To produce the documentation run the original source files ending with
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\@@_loadfont_latin_macoffice:}
+% mac Office 西文字体。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_loadfont_latin_macoffice:
+ {
+ \__fontspec_main_setmainfont:nn
+ { \l_@@_name_macofficefeature_clist } { times }
+ \__fontspec_main_setsansfont:nn
+ { \l_@@_name_macofficefeature_clist } { arial }
+ \__fontspec_main_setmonofont:nn
+ { Scale = MatchLowercase } { Menlo }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{variable}{\l_@@_name_macofficefeature_clist}
+% 用于 \pkg{fontspec} 的 mac Office 字体特性列表。
+% \begin{macrocode}
+\clist_const:Nn \c_@@_name_macofficefeature_clist
+ {
+ Path = \c_@@_path_macoffice_tl,
+ Extension = .ttf,
+ UprightFont = *,
+ BoldFont = *bd,
+ ItalicFont = *i,
+ BoldItalicFont = *bi
+ }
+% \end{macrocode}
+% \end{variable}
+%
% \begin{macro}{\@@_loadfont_latin_gyre:}
% 开源的 \TeX Gyre 西文字体。
% \begin{macrocode}
@@ -4747,6 +4866,13 @@ To produce the documentation run the original source files ending with
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\@@_loadfont_latin_fandol:}
+% 为兼容 \pkg{ctex} 做出的名称改变。
+% \begin{macrocode}
+\cs_new_eq:NN \@@_loadfont_latin_fandol: \@@_loadfont_latin_gyre:
+% \end{macrocode}
+% \end{macro}
+%
% \begin{variable}{\c_@@_name_gyrefeature_clist}
% 用于 \pkg{fontspec} 的 \TeX Gyre 字体特性列表。
% \begin{macrocode}
@@ -4784,6 +4910,7 @@ To produce the documentation run the original source files ending with
\setCJKfamilyfont { zhhei } { SimHei } [#1]
\setCJKfamilyfont { zhfs } { FangSong } [#1]
\setCJKfamilyfont { zhkai } { KaiTi } [#1]
+ \@@_stzhongs:n {#1}
}
\cs_new:Npn \@@_loadfont_cjk_win:
{ \@@_loadfont_cjk_win:N \c_@@_name_fakebold_tl }
@@ -4814,8 +4941,30 @@ To produce the documentation run the original source files ending with
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\@@_loadfont_cjk_macoffice:n,\@@_loadfont_cjk_macoffice:}
+% mac Office 中文字体。
+% \begin{macrocode}
+\cs_new:Npn \@@_loadfont_cjk_macoffice:n #1
+ {
+ \setCJKmainfont { Simsun.ttc } [ ItalicFont = Kaiti.ttf, #1 ]
+ \setCJKsansfont { SimHei.ttf } [#1]
+ \setCJKmonofont { Fangsong.ttf } [#1]
+ \setCJKfamilyfont { zhsong } { Simsun.ttc } [#1]
+ \setCJKfamilyfont { zhhei } { SimHei.ttf } [#1]
+ \setCJKfamilyfont { zhfs } { Fangsong.ttf } [#1]
+ \setCJKfamilyfont { zhkai } { Kaiti.ttf } [#1]
+ \@@_stzhongs:nn { STZHONGS.ttf } {#1}
+ }
+\cs_new:Npn \@@_loadfont_cjk_macoffice:
+ {
+ \@@_loadfont_cjk_macoffice:n
+ { Path = \c_@@_path_macoffice_tl, \c_@@_name_fakebold_tl }
+ }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\@@_loadfont_cjk_fandol:}
-% Fandol 字体
+% Fandol 字体。
% \begin{macrocode}
\cs_new_protected:Npn \@@_loadfont_cjk_fandol:
{
@@ -4895,7 +5044,7 @@ To produce the documentation run the original source files ending with
\setCJKfamilyfont { zhhei } { Noto~Sans~CJK~SC }
\setCJKfamilyfont { zhfs } { FZFangSong-Z02 }
\setCJKfamilyfont { zhkai } { FZKai-Z03 }
- [ \c__nju_name_fakebold_tl ]
+ [ \c_@@_name_fakebold_tl ]
}
% \end{macrocode}
% \end{macro}
@@ -4942,27 +5091,30 @@ To produce the documentation run the original source files ending with
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}{\@@_loadfont_stzhongs:,\@@_stzhongs:}
+% \begin{macro}{\@@_loadfont_stzhongs:,\@@_stzhongs:nn,\@@_stzhongs:n,\@@_stzhongs:}
% \changes{v1.2}{2023/04/30}{在研究生模板载入华文中宋。}
% \changes{v1.3}{2023/10/09}{可以手动指定华文中宋文件位置。}
% 研究生封面额外需要的华文中宋。
% \begin{macrocode}
-\cs_new:Npn \@@_loadfont_stzhongs:
+\cs_new:Npn \@@_stzhongs:nn #1#2
+ { \newCJKfontfamily \@@_stzhongs: {#1} [#2] }
+\cs_new:Npn \@@_stzhongs:n { \@@_stzhongs:nn { 华文中宋 } }
+\cs_new_protected:Npn \@@_loadfont_stzhongs:
{
- \fontspec_font_if_exist:nTF { 华文中宋 }
+ \cs_if_exist_use:NF \@@_stzhongs:
{
- \newCJKfontfamily \@@_stzhongs: { 华文中宋 }
- [ \c_@@_name_fakebold_tl ]
- }
- {
- \bool_if:NTF \g_@@_font_path_bool
+ \fontspec_font_if_exist:nTF { 华文中宋 }
+ { \@@_stzhongs:n { \c_@@_name_fakebold_tl } }
{
- \newCJKfontfamily \@@_stzhongs: { \c_@@_name_stzhongsfile_tl }
- [ Path = \g_@@_font_path_tl, \c_@@_name_fakebold_tl ]
- }
- {
- \cs_set_eq:NN \@@_stzhongs: \rmfamily
- \msg_warning:nn { njuthesis } { missing-stzhongs }
+ \bool_if:NTF \g_@@_font_path_bool
+ {
+ \@@_stzhongs:nn { \l_@@_name_stzhongsfile_tl }
+ { Path = \g_@@_font_path_tl, \c_@@_name_fakebold_tl }
+ }
+ {
+ \cs_set_eq:NN \@@_stzhongs: \rmfamily
+ \msg_warning:nn { njuthesis } { missing-stzhongs }
+ }
}
}
}
@@ -5120,16 +5272,6 @@ To produce the documentation run the original source files ending with
% \subsubsection{载入指定字库}
% \changes{v0.10}{2021/09/28}{修正了数学字体。}
%
-% \begin{macro}{\@@_loadfont_latin_windows:
-% \@@_loadfont_latin_fandol:,\@@_loadfont_cjk_windows:}
-% 为兼容 \pkg{ctex} 做出的名称改变。
-% \begin{macrocode}
-\cs_new_eq:NN \@@_loadfont_latin_windows: \@@_loadfont_latin_win:
-\cs_new_eq:NN \@@_loadfont_latin_fandol: \@@_loadfont_latin_gyre:
-\cs_new_eq:NN \@@_loadfont_cjk_windows: \@@_loadfont_cjk_win:
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macro}{\@@_loadfont:}
% 载入字体命令。
% \begin{macrocode}
@@ -5246,10 +5388,10 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\ctex_at_end_preamble:n
{
- \clist_set_eq:Nc \g_@@_header_clist
- { g_@@_header_ \c_@@_name_pagemode_tl _clist }
- \clist_set_eq:Nc \g_@@_footer_clist
- { g_@@_footer_ \c_@@_name_pagemode_tl _clist }
+ \clist_gset_eq:Nc \g_@@_header_clist
+ { g_@@_header_ \g_@@_name_pagemode_tl _clist }
+ \clist_gset_eq:Nc \g_@@_footer_clist
+ { g_@@_footer_ \g_@@_name_pagemode_tl _clist }
}
% \end{macrocode}
%
@@ -5257,9 +5399,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] { \c_@@_fmt_header_tl \nouppercase {#2} } }
+ { \fancyhead [#1] { \l_@@_fmt_header_tl \nouppercase {#2} } }
\cs_new_protected:Npn \@@_footer:nn #1#2
- { \fancyfoot [#1] { \c_@@_fmt_footer_tl \nouppercase {#2} } }
+ { \fancyfoot [#1] { \l_@@_fmt_footer_tl \nouppercase {#2} } }
% \end{macrocode}
% \end{macro}
%
@@ -5303,7 +5445,7 @@ To produce the documentation run the original source files ending with
\RenewDocumentCommand \frontmatter { }
{
\cleardoublepage
- \exp_args:NV \pagestyle \c_@@_fmt_pagestyle_tl
+ \exp_args:NV \pagestyle \l_@@_fmt_pagestyle_tl
\pagenumbering { Roman }
}
% \end{macrocode}
@@ -5318,7 +5460,7 @@ To produce the documentation run the original source files ending with
\RenewDocumentCommand \mainmatter { }
{
\cleardoublepage
- \exp_args:NV \pagestyle \c_@@_fmt_pagestyle_tl
+ \exp_args:NV \pagestyle \l_@@_fmt_pagestyle_tl
\pagenumbering { arabic }
\normalfont \normalsize
}
@@ -5330,7 +5472,7 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\AtBeginEnvironment { document }
{
- \exp_args:NV \pagestyle \c_@@_fmt_pagestyle_tl
+ \exp_args:NV \pagestyle \l_@@_fmt_pagestyle_tl
\pagenumbering { Roman }
}
% \end{macrocode}
@@ -5342,7 +5484,7 @@ To produce the documentation run the original source files ending with
% 为无编号章添加目录条目,需手动指定格式为四号、不加粗、黑体。
% \begin{macrocode}
\cs_new:Npn \@@_bookmark_toc:n #1
- { \addcontentsline { toc } { chapter } { \c_@@_fmt_chapterintoc_tl #1 } }
+ { \addcontentsline { toc } { chapter } { \l_@@_fmt_chapterintoc_tl #1 } }
\cs_generate_variant:Nn \@@_bookmark_toc:n { V }
% \end{macrocode}
% \end{macro}
@@ -5358,10 +5500,9 @@ To produce the documentation run the original source files ending with
% \begin{macro}{\@@_bookmark_pdf_nosec:nn,\@@_bookmark_pdf:nn}
% 封装 \pkg{hyperref} 的 PDF 书签命令。
% \begin{macrocode}
-\cs_new:Npn \@@_bookmark_pdf_nosec:nn #1#2
- { \pdfbookmark [0] {#1} {#2} }
-\cs_new:Npn \@@_bookmark_pdf:nn #1#2
- { \phantomsection \@@_bookmark_pdf_nosec:nn {#1} {#2} }
+\cs_new:Npn \@@_bookmark_pdf_nosec:nn { \pdfbookmark [0] }
+\cs_new:Npn \@@_bookmark_pdf:nn
+ { \phantomsection \@@_bookmark_pdf_nosec:nn }
% \end{macrocode}
% \end{macro}
%
@@ -5417,14 +5558,14 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\keys_set:nn { ctex }
{
- chapter / beforeskip = \c_@@_chapterbefore_dim,
- chapter / afterskip = \c_@@_chapterafter_dim,
- chapter / format = \c_@@_fmt_chapter_tl,
- section / format = \c_@@_fmt_section_tl,
- subsection / format = \c_@@_fmt_subsection_tl,
- subsubsection / format = \c_@@_fmt_subsubsection_tl,
- paragraph / format = \c_@@_fmt_paragraph_tl,
- subparagraph / format = \c_@@_fmt_subparagraph_tl,
+ chapter / beforeskip = \l_@@_chapterbefore_dim,
+ chapter / afterskip = \l_@@_chapterafter_dim,
+ chapter / format = \l_@@_fmt_chapter_tl,
+ section / format = \l_@@_fmt_section_tl,
+ subsection / format = \l_@@_fmt_subsection_tl,
+ subsubsection / format = \l_@@_fmt_subsubsection_tl,
+ paragraph / format = \l_@@_fmt_paragraph_tl,
+ subparagraph / format = \l_@@_fmt_subparagraph_tl,
% \end{macrocode}
%
%
@@ -5433,13 +5574,13 @@ To produce the documentation run the original source files ending with
%
% 设置目录标题默认名称。
% \begin{macrocode}
- contentsname = \c_@@_name_tableofcontents_tl,
- listfigurename = \c_@@_name_listoffigures_tl,
- listtablename = \c_@@_name_listoftables_tl,
+ contentsname = \l_@@_name_tableofcontents_tl,
+ listfigurename = \l_@@_name_listoffigures_tl,
+ listtablename = \l_@@_name_listoftables_tl,
% \end{macrocode}
% 设置目录中章标题的样式。
% \begin{macrocode}
- chapter / tocline = \c_@@_fmt_chapterintoc_tl \CTEXnumberline {#1} #2
+ chapter / tocline = \l_@@_fmt_chapterintoc_tl \CTEXnumberline {#1} #2
}
% \end{macrocode}
%
@@ -5453,7 +5594,7 @@ To produce the documentation run the original source files ending with
{
\group_begin:
\keys_set:nn { ctex }
- { chapter/format = \c_@@_fmt_toctitle_tl }
+ { chapter/format = \l_@@_fmt_toctitle_tl }
\@@_chapter:cnn { g_@@_ #2 _showentry_bool } {#1} {#2}
\group_end:
\@starttoc {#2}
@@ -5470,7 +5611,7 @@ To produce the documentation run the original source files ending with
{
\keys_define:nn { nju / #1 }
{
- toc-entry .bool_set:c = { g_@@_ #3 _showentry_bool },
+ toc-entry .bool_gset:c = { g_@@_ #3 _showentry_bool },
toc-entry .initial:n = true
}
\exp_args:Nc \RenewDocumentCommand {#1} { }
@@ -5504,8 +5645,8 @@ To produce the documentation run the original source files ending with
{
\bool_if:NF \g_@@_toc_showentry_bool
{
- \bool_set_false:N \g_@@_lof_showentry_bool
- \bool_set_false:N \g_@@_lot_showentry_bool
+ \bool_gset_false:N \g_@@_lof_showentry_bool
+ \bool_gset_false:N \g_@@_lot_showentry_bool
}
}
% \end{macrocode}
@@ -5585,10 +5726,7 @@ To produce the documentation run the original source files ending with
% |\PassoptionsToPackage{|\meta{key}|=|\meta{value}|}{biblatex}| 命令。
% \begin{macrocode}
option .code:n =
- {
- \clist_gput_right:NV \g_@@_blx_option_clist
- \l_keys_value_tl
- },
+ { \clist_gput_right:NV \g_@@_blx_option_clist \l_keys_value_tl },
% \end{macrocode}
% \end{macro}
%
@@ -5640,15 +5778,14 @@ To produce the documentation run the original source files ending with
% 如果需要在每章后附上一个参考文献表,即对 \pkg{biblatex} 传入了
% |refsection = chapter| 选项,则默认为 |section| 级别。
% \begin{macrocode}
- \defbibheading { njubibintoc } [ \bibname ] { \@@_chapter:n { ##1 } }
+ \defbibheading { njubibintoc } [ \bibname ] { \@@_chapter:n {##1} }
\tl_if_eq:NnTF \blx@refsecreset@level { 2 }
{ \DeclarePrintbibliographyDefaults { heading = subbibintoc } }
{ \DeclarePrintbibliographyDefaults { heading = njubibintoc } }
% \end{macrocode}
% 传入参考文献源文件,此时可正常使用 \tn{addbibresource} 命令。
% \begin{macrocode}
- \clist_map_inline:Nn \g_@@_blx_resource_clist
- { \addbibresource { ##1 } }
+ \clist_map_inline:Nn \g_@@_blx_resource_clist { \addbibresource {##1} }
}
% \end{macrocode}
% \end{macro}
@@ -5670,34 +5807,38 @@ To produce the documentation run the original source files ending with
%
% \subsection{引用}
%
-% 在导言区末尾进行 \pkg{hyperref} 设置。
-% \changes{v0.11}{2021/10/01}{写入 PDF 元数据。}
-% \changes{v0.17}{2022/04/09}{PDF 书签中不生成额外空格。}
+% \changes{v1.4}{2024/03/06}{将可能需要覆盖的 \pkg{hyperref} 设置移动到导言区前。}
% \begin{macrocode}
-\ctex_at_end_preamble:n
+\hypersetup
{
+ bookmarksnumbered = true,
+ psdextra = true,
+ unicode = true,
+ hidelinks
+ }
% \end{macrocode}
+% \changes{v0.17}{2022/04/09}{PDF 书签中不生成额外空格。}
% 忽略 PDF 字符串中的特定命令,从而抑制 \pkg{hyperref} 警告。
% \begin{macrocode}
- \pdfstringdefDisableCommands
- {
- \clist_map_inline:nn
- { \\, \quad, \qquad, \bigger }
- { \@@_cs_clear:N #1 }
- }
- \hypersetup
- {
- bookmarksnumbered = true,
- psdextra = true,
- unicode = true,
- hidelinks,
+\pdfstringdefDisableCommands
+ {
+ \clist_map_inline:nn
+ { \\, \quad, \qquad, \bigger }
+ { \@@_cs_clear:N #1 }
+ \cs_set_eq:NN \zihao \use_none:n
+ }
% \end{macrocode}
-% 填写 PDF 元信息。
+% 在导言区末尾进行 \pkg{hyperref} 设置。填写 PDF 元信息。
+% \changes{v0.11}{2021/10/01}{写入 PDF 元数据。}
% \begin{macrocode}
+\ctex_at_end_preamble:n
+ {
+ \hypersetup
+ {
pdftitle = \g_@@_info_title_tl,
pdfauthor = \g_@@_info_author_tl,
pdfkeywords = \g_@@_info_keywords_clist,
- pdfcreator = \c_@@_name_pdfcreator_tl
+ pdfcreator = \l_@@_name_pdfcreator_tl
}
}
% \end{macrocode}
@@ -5726,7 +5867,7 @@ To produce the documentation run the original source files ending with
% \end{macrocode}
% 修改 \pkg{cleveref} 的标签名称。
% \begin{macrocode}
- \clist_map_inline:nn { figure, table, appendix, proof }
+ \clist_map_inline:nn { figure, table, appendix }
{ \@@_cref_name:n {#1} }
}
% \end{macrocode}
@@ -5740,7 +5881,7 @@ To produce the documentation run the original source files ending with
% 存储传入 \pkg{circledtext} 宏包的选项列表。
% 由于当前版本放在编号位置的带圈数字无法正确缩放,这里手动指定了字体大小。
% \begin{macrocode}
-\clist_set:Nn \g_@@_fn_ctext_option_clist { charf = \scriptsize }
+\clist_gset:Nn \g_@@_fn_ctext_option_clist { charf = \scriptsize }
% \end{macrocode}
% \end{variable}
%
@@ -5807,7 +5948,7 @@ To produce the documentation run the original source files ending with
\cs_set:Npn \@@_fn_hang:
{
\int_set:Nn \tex_hangafter:D { 1 }
- \dim_set_eq:NN \tex_hangindent:D \c_@@_fnhang_dim
+ \dim_set_eq:NN \tex_hangindent:D \l_@@_fnhang_dim
}
},
hang / false .code:n = { \@@_cs_clear:N \@@_fn_hang: },
@@ -5865,7 +6006,7 @@ To produce the documentation run the original source files ending with
\cs_set:Npn \@makefntext #1
{
\mode_leave_vertical:
- \hbox_to_wd:nn { \c_@@_fnhang_dim } { \@thefnmark \tex_hfil:D }
+ \hbox_to_wd:nn { \l_@@_fnhang_dim } { \@thefnmark \tex_hfil:D }
\tex_penalty:D \@M
\@@_fn_hang:
#1
@@ -5892,9 +6033,10 @@ To produce the documentation run the original source files ending with
%
% \changes{v0.16}{2022/03/11}{表格内字体设为五号。}
% \changes{v1.0}{2022/08/06}{兼容 \pkg{tabularray} 设置。}
+% \changes{v1.4}{2024/03/06}{调整 \pkg{tabularray} 设置。}
% 表格默认居中,字号设置为五号。^^A https://www.zhihu.com/question/366803177/answer/977853129
% \begin{macrocode}
-\BeforeBeginEnvironment { tabular } { \centering \c_@@_fmt_tabular_tl }
+\BeforeBeginEnvironment { tabular } { \centering \l_@@_fmt_tabular_tl }
\ctex_at_end_package:nn { tabularray }
{
% \end{macrocode}
@@ -5902,16 +6044,21 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\__tblr_use_lib_booktabs:
\tl_set:Nn \l_@@_tmpb_tl
- { , abovesep = 4 pt, stretch = 0.8, cells = { font = \c_@@_fmt_tabular_tl } }
+ { , abovesep = 4 pt, stretch = 0.8, cells = { font = \l_@@_fmt_tabular_tl } }
\tl_put_right:NV \l__tblr_default_tblr_inner_tl \l_@@_tmpb_tl
\tl_put_right:NV \l__tblr_default_talltblr_inner_tl \l_@@_tmpb_tl
- \tl_put_right:Nn \l__tblr_default_talltblr_outer_tl { , headsep = -4 pt }
+ \tl_put_right:NV \l__tblr_default_longtblr_inner_tl \l_@@_tmpb_tl
+% \end{macrocode}
+% 为了和标准文档类中的间距一致,文档介绍的值为 \qty{10}{pt},实际是 \qty{12.63}{pt}。
+% \begin{macrocode}
+ \tl_put_right:Nn \l__tblr_default_talltblr_outer_tl { , headsep = 12.63 pt }
+ \tl_put_right:Nn \l__tblr_default_longtblr_outer_tl { , headsep = 12.63 pt }
% \end{macrocode}
% 处理 \env{talltblr} 表注的限宽问题。
% \footnote{\url{https://github.com/lvjr/tabularray/issues/255}}
% \begin{macrocode}
\DefTblrTemplate { caption-tag } { default }
- { \c_@@_name_table_tl \hspace { 0.25em } \thetable }
+ { \l_@@_name_table_tl \hspace { 0.25em } \thetable }
\DefTblrTemplate { caption-sep } { default } { \quad }
\DefTblrTemplate { firsthead } { caption }
{
@@ -5921,6 +6068,7 @@ To produce the documentation run the original source files ending with
\SetTblrTemplate { firsthead } { caption }
\SetTblrStyle { caption } { font = \normalfont \bfseries \small }
\SetTblrStyle { note } { font = \normalfont \footnotesize }
+ \SetTblrStyle { remark } { font = \normalfont \footnotesize }
}
% \end{macrocode}
%
@@ -5930,8 +6078,7 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\DeclareCaptionStyle{njucap}
{
- font = small,
- font += bf,
+ font = {small, bf},
labelsep = quad,
justification = centering
}
@@ -5954,7 +6101,7 @@ To produce the documentation run the original source files ending with
{
\keys_define:nn { nju / label-sep }
{
- #1 .tl_set:c = { g_@@_sep_ #1 _tl },
+ #1 .tl_gset:c = { g_@@_sep_ #1 _tl },
% \end{macrocode}
% 根据本科生撰写规范的建议,默认连接符为短横线(en dash)。
% \begin{macrocode}
@@ -6169,12 +6316,12 @@ To produce the documentation run the original source files ending with
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}{\c_@@_name_integral_tl}
+% \begin{variable}{\l_@@_name_integral_tl}
% 保存 \pkg{unicode-math} 内置的所有积分号命令。
% \begin{macrocode}
\bool_if:NTF \g_@@_opt_load_um_bool
- { \tl_set_eq:NN \c_@@_name_integral_tl \l__um_nolimits_tl }
- { \tl_set_eq:NN \c_@@_name_integral_tl \c_empty_tl }
+ { \tl_set_eq:NN \l_@@_name_integral_tl \l__um_nolimits_tl }
+ { \tl_set_eq:NN \l_@@_name_integral_tl \c_empty_tl }
% \end{macrocode}
% \end{variable}
%
@@ -6197,9 +6344,9 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
integral .choice:,
integral / upright .code:n =
- { \bool_set_true:N \g_@@_opt_math_int_bool },
+ { \bool_gset_true:N \g_@@_opt_math_int_bool },
integral / slanted .code:n =
- { \bool_set_false:N \g_@@_opt_math_int_bool },
+ { \bool_gset_false:N \g_@@_opt_math_int_bool },
% \end{macrocode}
% \end{macro}
%
@@ -6211,7 +6358,7 @@ To produce the documentation run the original source files ending with
integral-limits / true .code:n =
{ \tl_clear:N \l__um_nolimits_tl },
integral-limits / false .code:n =
- { \tl_set_eq:NN \l__um_nolimits_tl \c_@@_name_integral_tl },
+ { \tl_set_eq:NN \l__um_nolimits_tl \l_@@_name_integral_tl },
% \end{macrocode}
% \end{macro}
%
@@ -6220,9 +6367,9 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
less-than-or-equal .choice:,
less-than-or-equal / slanted .code:n =
- { \bool_set_true:N \g_@@_opt_math_leq_bool },
+ { \bool_gset_true:N \g_@@_opt_math_leq_bool },
less-than-or-equal / horizontal .code:n =
- { \bool_set_false:N \g_@@_opt_math_leq_bool },
+ { \bool_gset_false:N \g_@@_opt_math_leq_bool },
% \end{macrocode}
% \end{macro}
%
@@ -6267,9 +6414,9 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
vector .choice:,
vector / boldfont .code:n =
- { \bool_set_true:N \g_@@_opt_math_vec_bool },
+ { \bool_gset_true:N \g_@@_opt_math_vec_bool },
vector / arrow .code:n =
- { \bool_set_false:N \g_@@_opt_math_vec_bool },
+ { \bool_gset_false:N \g_@@_opt_math_vec_bool },
% \end{macrocode}
% \end{macro}
%
@@ -6384,7 +6531,7 @@ To produce the documentation run the original source files ending with
%<*def-u>
\@@_declare_element:nn { u / cover / emblem-img }
{
- content = \@@_emblem:N \c_@@_emblemwd_dim,
+ content = \@@_emblem:N \l_@@_emblemwd_dim,
bottom-skip = 1.2 cm
}
% \end{macrocode}
@@ -6395,7 +6542,7 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\@@_declare_element:nn { u / cover / name-img }
{
- content = \@@_name:N \c_@@_namewd_dim,
+ content = \@@_name:N \l_@@_namewd_dim,
bottom-skip = 1 cm,
}
% \end{macrocode}
@@ -6458,8 +6605,8 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\cs_new:Npn \@@_u_cover_info:
{
- \@@_u_cover_info:NNNN \c_@@_clabelwd_dim \c_@@_crulewd_dim
- \c_@@_hsep_dim \kaishu
+ \@@_u_cover_info:NNNN \l_@@_clabelwd_dim \l_@@_crulewd_dim
+ \l_@@_hsep_dim \kaishu
}
% \end{macrocode}
% \end{macro}
@@ -6472,7 +6619,7 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\@@_declare_element:nn { u / decl / orig / emblem }
{
- content = \@@_emblem:N \c_@@_emblemwdi_dim,
+ content = \@@_emblem:N \l_@@_emblemwdi_dim,
bottom-skip = 30 pt
}
% \end{macrocode}
@@ -6484,7 +6631,7 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\@@_declare_element:nn { u / decl / orig / title }
{
- content = \c_@@_name_origdecl_tl,
+ content = \l_@@_name_origdecl_tl,
format = \sffamily \@@_fontsize:nn { 24 bp } { 22.15 bp } \bfseries,
bottom-skip = 50 pt
}
@@ -6496,7 +6643,7 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\@@_declare_element:nn { u / decl / orig / text }
{
- content = \c_@@_text_origdecl_tl,
+ content = \l_@@_text_origdecl_tl,
format = \@@_zihao:nn { 1.9 } { -3 },
align = n,
bottom-skip = 2.7 cm
@@ -6525,7 +6672,7 @@ To produce the documentation run the original source files ending with
{
%<def-u> \clist_map_inline:nn { origsign, id, date }
%<def-g> \clist_map_inline:nn { origsign, date }
- { \tex_par:D \@@_name:n { ##1 } : \hbox_to_wd:nn { 6 em } { } }
+ { \tex_par:D \@@_name:n {##1} : \hbox_to_wd:nn { 6 em } { } }
}
%</(def-u|def-g)>
% \end{macrocode}
@@ -6559,7 +6706,7 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\@@_declare_element:nn { g / cover-front / emblem-img }
{
- content = \@@_emblem:N \c_@@_emblemwd_dim,
+ content = \@@_emblem:N \l_@@_emblemwd_dim,
bottom-skip = .47 cm
}
% \end{macrocode}
@@ -6570,7 +6717,7 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\@@_declare_element:nn { g / cover-front / name-img }
{
- content = \@@_name:N \c_@@_namewd_dim,
+ content = \@@_name:N \l_@@_namewd_dim,
bottom-skip = 2.25 cm
}
% \end{macrocode}
@@ -6622,8 +6769,8 @@ To produce the documentation run the original source files ending with
\@@_get_width:NV \l_@@_tmpb_dim \g_@@_info_id_tl
\clist_map_inline:nn { code, clc, secretlv, udc, id }
{
- \@@_cover_entry:NNNNn \c_@@_name_colon_tl \l_@@_tmpa_dim
- \l_@@_tmpb_dim \tex_relax:D { ##1 }
+ \@@_cover_entry:NNNNn \l_@@_name_colon_tl \l_@@_tmpa_dim
+ \l_@@_tmpb_dim \tex_relax:D {##1}
}
}
% \end{macrocode}
@@ -6639,7 +6786,7 @@ To produce the documentation run the original source files ending with
{ \clist_set:Nn #1 { author, majorc, field, supvfull } }
\@@_cover_entry_title:NNNN #2 #3 #4 #5
\clist_map_inline:Nn #1
- { \@@_cover_entry:NNNNn #2 #3 #4 #5 { ##1 } }
+ { \@@_cover_entry:NNNNn #2 #3 #4 #5 {##1} }
}
% \end{macrocode}
% \end{macro}
@@ -6650,7 +6797,7 @@ To produce the documentation run the original source files ending with
{
\tl_set:Nn \l_@@_tmpa_tl { \skip_horizontal:n { .7 cm } }
\@@_g_cover_info:NNNNN \l_@@_tmp_clist \l_@@_tmpa_tl
- \c_@@_clabelwd_dim \c_@@_crulewd_dim \c_@@_fmt_coverlabel_tl
+ \l_@@_clabelwd_dim \l_@@_crulewd_dim \l_@@_fmt_coverlabel_tl
}
% \end{macrocode}
% \end{macro}
@@ -6704,8 +6851,8 @@ To produce the documentation run the original source files ending with
}
\cs_new:Npn \@@_g_cover_back:
{
- \@@_g_cover_back:NNN \c_@@_clabelwdi_dim
- \c_@@_crulewdi_dim \c_@@_fmt_coverlabel_tl
+ \@@_g_cover_back:NNN \l_@@_clabelwdi_dim
+ \l_@@_crulewdi_dim \l_@@_fmt_coverlabel_tl
}
% \end{macrocode}
% \end{macro}
@@ -6725,8 +6872,8 @@ To produce the documentation run the original source files ending with
}
\cs_new:Npn \@@_g_cover_sign:
{
- \@@_g_cover_sign:NNN \c_@@_clabelwdii_dim
- \c_@@_fmt_coverlabel_tl \c_@@_name_colon_tl
+ \@@_g_cover_sign:NNN \l_@@_clabelwdii_dim
+ \l_@@_fmt_coverlabel_tl \l_@@_name_colon_tl
}
% \end{macrocode}
% \end{macro}
@@ -6772,7 +6919,7 @@ To produce the documentation run the original source files ending with
\@@_declare_element:nn { g / cover-en / middle }
{
content =
- \c_@@_text_cover_en_tl \@@_vskip:
+ \l_@@_text_cover_en_tl \@@_vskip:
\group_begin: \scshape \g_@@_info_degree_en_tl \group_end:
\@@_vskip: { in } \@@_vskip: \g_@@_info_major_en_tl,
bottom-skip = .5 cm plus 1 fil
@@ -6785,7 +6932,7 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\@@_declare_element:nn { g / cover-en / emblem-img }
{
- content = \@@_emblem:N \c_@@_emblemwdii_dim,
+ content = \@@_emblem:N \l_@@_emblemwdii_dim,
bottom-skip = 1 cm minus .5 cm
}
% \end{macrocode}
@@ -6798,7 +6945,7 @@ To produce the documentation run the original source files ending with
{
content =
\g_@@_info_dept_en_tl \skip_vertical:N \c_zero_skip
- \c_@@_name_nju_en_tl \skip_vertical:n { 1 cm }
+ \l_@@_name_nju_en_tl \skip_vertical:n { 1 cm }
\g_@@_info_submitdate_en_tl
}
% \end{macrocode}
@@ -6878,19 +7025,21 @@ To produce the documentation run the original source files ending with
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_cover_top_nl:}
+% \begin{macro}{\@@_cover_top_nl:,\@@_cover_top_nl:NN}
% 国家图书馆封面顶部信息。
% \begin{macrocode}
-\cs_new_protected:Npn \@@_cover_top_nl:
- {
- \dim_set:Nn \l_@@_tmpa_dim { 38.6 pt }
- \dim_set:Nn \l_@@_tmpb_dim { 109 pt }
- \@@_box_spread_name:Nn \l_@@_tmpa_dim { clc } \@@_hskip:
- \@@_box_ulined_info:Nn \l_@@_tmpb_dim { clc } \tex_hfill:D
- \@@_box_spread_name:Nn \l_@@_tmpa_dim { secretlv } \@@_hskip:
- \@@_box_ulined_info:Nn \l_@@_tmpb_dim { secretlv } \tex_par:D
- \@@_box_spread_name:Nn \l_@@_tmpa_dim { udc } \@@_hskip:
- \@@_box_ulined_info:Nn \l_@@_tmpb_dim { udc } \tex_hfill:D
+\cs_new:Npn \@@_cover_top_nl:
+ { \@@_cover_top_nl:NN \l_@@_tmpa_dim \l_@@_tmpb_dim }
+\cs_new_protected:Npn \@@_cover_top_nl:NN #1#2
+ {
+ \dim_set:Nn #1 { 38.6 pt }
+ \dim_set:Nn #2 { 109 pt }
+ \@@_box_spread_name:Nn #1 { clc } \@@_hskip:
+ \@@_box_ulined_info:Nn #2 { clc } \tex_hfill:D
+ \@@_box_spread_name:Nn #1 { secretlv } \@@_hskip:
+ \@@_box_ulined_info:Nn #2 { secretlv } \tex_par:D
+ \@@_box_spread_name:Nn #1 { udc } \@@_hskip:
+ \@@_box_ulined_info:Nn #2 { udc } \tex_hfill:D
\@@_null:
}
% \end{macrocode}
@@ -6903,12 +7052,12 @@ To produce the documentation run the original source files ending with
{
\parbox [ b ] { 15 em } { \@@_uline_title: } \tex_par:D
\skip_vertical:n { - 0.5 cm }
- { \zihao { 4 } \c_@@_name_subtitle_tl }
+ { \zihao { 4 } \l_@@_name_subtitle_tl }
\skip_vertical:N \c_zero_skip
\dim_set:Nn \l_@@_tmpa_dim { 4.5 em }
\@@_box_ulined_info:Nn \l_@@_tmpa_dim { author }
\skip_vertical:n { - 0.5 cm }
- { \zihao { 4 } { ( } \c_@@_name_author_tl { ) } }
+ { \zihao { 4 } { ( } \l_@@_name_author_tl { ) } }
}
% \end{macrocode}
% \end{macro}
@@ -6928,12 +7077,12 @@ To produce the documentation run the original source files ending with
}
\skip_set:Nn \l_@@_tmp_skip { .5 em plus 1 fill }
\@@_uline_list:NNn \l_@@_tmpa_tl \l_@@_tmp_skip
- { \c_@@_name_supvinfo_tl }
+ { \l_@@_name_supvinfo_tl }
% \end{macrocode}
% 临时替换显示的名称字样。
% \begin{macrocode}
\group_begin:
- \tl_set_eq:NN \c_@@_name_major_tl \c_@@_name_majorb_tl
+ \tl_set_eq:NN \l_@@_name_major_tl \l_@@_name_majorb_tl
\@@_uline_bientry:Nn \l_@@_tmpa_dim { degree }
\@@_uline_bientry:Nn \l_@@_tmpa_dim { major }
\tex_par:D
@@ -6969,9 +7118,9 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\@@_declare_element:nn { g / decl / orig / title }
{
- content = \c_@@_name_origdecl_tl,
- format = \c_@@_fmt_chapter_tl,
- bottom-skip = \c_@@_chapterafter_dim
+ content = \l_@@_name_origdecl_tl,
+ format = \l_@@_fmt_chapter_tl,
+ bottom-skip = \l_@@_chapterafter_dim
}
% \end{macrocode}
% \end{macro}
@@ -6981,7 +7130,7 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\@@_declare_element:nn { g / decl / orig / text }
{
- content = \c_@@_text_origdecl_tl,
+ content = \l_@@_text_origdecl_tl,
align = n,
bottom-skip = 0 pt plus 1 fil
}
@@ -7006,9 +7155,9 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\@@_declare_element:nn { g / decl / auth / title }
{
- content = \c_@@_name_authdecl_tl,
- format = \c_@@_fmt_chapter_tl,
- bottom-skip = \c_@@_chapterafter_dim
+ content = \l_@@_name_authdecl_tl,
+ format = \l_@@_fmt_chapter_tl,
+ bottom-skip = \l_@@_chapterafter_dim
}
% \end{macrocode}
% \end{macro}
@@ -7018,7 +7167,7 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\@@_declare_element:nn { g / decl / auth / text }
{
- content = \c_@@_text_authdecl_tl,
+ content = \l_@@_text_authdecl_tl,
align = n,
bottom-skip = 2 cm
}
@@ -7093,20 +7242,20 @@ To produce the documentation run the original source files ending with
cell{1}{2} = {c=5}{m}, cell{3}{2} = {c=5}{m},
cell{4}{2} = {c=5}{m}, cell{5}{2} = {c=5}{m}
}
- \c_@@_name_titlec_tl & \g_@@_info_title_tl \\
- \c_@@_name_ida_tl & \g_@@_info_id_tl &
- \c_@@_name_depta_tl & \g_@@_info_dept_tl &
- \c_@@_name_year_tl &
+ \l_@@_name_titlec_tl & \g_@@_info_title_tl \\
+ \l_@@_name_ida_tl & \g_@@_info_id_tl &
+ \l_@@_name_depta_tl & \g_@@_info_dept_tl &
+ \l_@@_name_year_tl &
\tl_range:Nnn \g_@@_info_submitdate_tl {1} {4} \\
- \c_@@_name_degreea_tl &
+ \l_@@_name_degreea_tl &
{
\@@_degree_checkbox:nn { } { 2 } 学术学位硕士 \qquad
\@@_degree_checkbox:nn { ! } { 2 } 专业学位硕士 \\
\@@_degree_checkbox:nn { } { 3 } 学术学位博士 \qquad
\@@_degree_checkbox:nn { ! } { 3 } 专业学位博士
} \\
- \c_@@_name_email_tl & \g_@@_info_email_tl \\
- \c_@@_name_supvb_tl &
+ \l_@@_name_email_tl & \g_@@_info_email_tl \\
+ \l_@@_name_supvb_tl &
\clist_item:Nn \g_@@_info_supv_clist { 1 }
\bool_if:NT \g_@@_opt_supvii_bool
{ \@@_quad: \clist_item:Nn \g_@@_info_supvii_clist { 1 } } \\
@@ -7119,10 +7268,7 @@ To produce the documentation run the original source files ending with
% 签名区内容。
% \begin{macrocode}
\cs_new_protected:Npn \@@_g_decl_auth_sign:
- {
- \c_@@_name_authsign_tl \tex_par:D
- \c_@@_name_blankdatea_tl
- }
+ { \l_@@_name_authsign_tl \tex_par:D \l_@@_name_blankdatea_tl }
% \end{macrocode}
% \end{macro}
%
@@ -7131,9 +7277,9 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\cs_new_protected:Npn \@@_g_decl_auth_secretlv:
{
- \c_@@_name_secretstatus_tl \tex_par:D
- \ensuremath { \mdwhtsquare } \c_@@_name_secretfree_tl \tex_par:D
- \ensuremath { \mdwhtsquare } \c_@@_name_secretdate_tl
+ \l_@@_name_secretstatus_tl \tex_par:D
+ \ensuremath { \mdwhtsquare } \l_@@_name_secretfree_tl \tex_par:D
+ \ensuremath { \mdwhtsquare } \l_@@_name_secretdate_tl
}
%</def-g>
% \end{macrocode}
@@ -7147,7 +7293,7 @@ To produce the documentation run the original source files ending with
%<*def-p>
\@@_declare_element:nn { p / cover / name-img }
{
- content = \@@_name:N \c_@@_namewd_dim,
+ content = \@@_name:N \l_@@_namewd_dim,
bottom-skip = 40 pt
}
% \end{macrocode}
@@ -7158,7 +7304,7 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\@@_declare_element:nn { p / cover / report }
{
- content = \c_@@_name_report_tl,
+ content = \l_@@_name_report_tl,
format = \zihao { 0 } \sffamily,
bottom-skip = 40 pt plus 1.5 fil
}
@@ -7171,8 +7317,8 @@ To produce the documentation run the original source files ending with
\@@_declare_element:nn { p / cover / title }
{
content =
- \c_@@_name_title_tl
- \c_@@_name_colon_tl
+ \l_@@_name_title_tl
+ \l_@@_name_colon_tl
\g_@@_info_title_tl,
format = \zihao { 4 },
bottom-skip = 80 pt
@@ -7185,23 +7331,22 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\@@_declare_element:nn { p / cover / info }
{
- content =
- \@@_p_cover_info:NN
- \c_@@_clabelwd_dim
- \c_@@_fmt_coverlabel_tl,
+ content = \@@_p_cover_info:,
format = \zihao { -4 },
bottom-skip = 0 pt
}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_p_cover_info:NN}
+% \begin{macro}{\@@_p_cover_info:,\@@_p_cover_info:NN}
% 博士后封面信息栏。
% \begin{arguments}
% \item 名称盒子宽度,|dim| 型变量
% \item 标签格式
% \end{arguments}
% \begin{macrocode}
+\cs_new:Npn \@@_p_cover_info:
+ { \@@_p_cover_info:NN \l_@@_clabelwd_dim \l_@@_fmt_coverlabel_tl }
\cs_new_protected:Npn \@@_p_cover_info:NN #1#2
{
\clist_set:Nn \l_@@_tmp_clist
@@ -7216,9 +7361,9 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\clist_map_inline:Nn \l_@@_tmp_clist
{
- \@@_box_spread_name:NNn #1 #2 { ##1 }
- \c_@@_name_colon_tl
- \@@_box_center:Nn \l_@@_tmpb_dim { \@@_info:n { ##1 } }
+ \@@_box_spread_name:NNn #1 #2 {##1}
+ \l_@@_name_colon_tl
+ \@@_box_center:Nn \l_@@_tmpb_dim { \@@_info:n {##1} }
\tex_par:D
}
}
@@ -7232,9 +7377,9 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\@@_declare_element:nn { p / decl / orig / title }
{
- content = \c_@@_name_origdecl_tl,
- format = \c_@@_fmt_chapter_tl,
- bottom-skip = \c_@@_chapterafter_dim
+ content = \l_@@_name_origdecl_tl,
+ format = \l_@@_fmt_chapter_tl,
+ bottom-skip = \l_@@_chapterafter_dim
}
% \end{macrocode}
% \end{macro}
@@ -7244,7 +7389,7 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\@@_declare_element:nn { p / decl / orig / text }
{
- content = \c_@@_text_origdecl_tl,
+ content = \l_@@_text_origdecl_tl,
align = n,
bottom-skip = 2 cm
}
@@ -7267,9 +7412,9 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\@@_declare_element:nn { p / decl / auth / title }
{
- content = \c_@@_name_authdecl_tl,
- format = \c_@@_fmt_chapter_tl,
- bottom-skip = \c_@@_chapterafter_dim
+ content = \l_@@_name_authdecl_tl,
+ format = \l_@@_fmt_chapter_tl,
+ bottom-skip = \l_@@_chapterafter_dim
}
% \end{macrocode}
% \end{macro}
@@ -7279,7 +7424,7 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\@@_declare_element:nn { p / decl / auth / text }
{
- content = \c_@@_text_authdecl_tl,
+ content = \l_@@_text_authdecl_tl,
align = n,
bottom-skip = 2 cm
}
@@ -7304,8 +7449,8 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\cs_new_protected:Npn \@@_p_decl_sign:nn #1#2
{
- \@@_name:n {#1} \c_@@_name_colon_tl \tex_hfill:D
- \@@_name:n {#2} \c_@@_name_colon_tl
+ \@@_name:n {#1} \l_@@_name_colon_tl \tex_hfill:D
+ \@@_name:n {#2} \l_@@_name_colon_tl
\skip_horizontal:n { 160 pt } \@@_null: \@@_vskip:
}
%</def-p>
@@ -7407,9 +7552,9 @@ To produce the documentation run the original source files ending with
{
element = { title, text, sign },
prefix = g / decl / orig /,
- top-skip = \c_@@_chapterbefore_dim,
+ top-skip = \l_@@_chapterbefore_dim,
bottom-skip = 0 pt plus 1 fil,
- bm-text = \c_@@_name_origdecl_tl,
+ bm-text = \l_@@_name_origdecl_tl,
bm-name = origdecl
}
% \end{macrocode}
@@ -7422,9 +7567,9 @@ To produce the documentation run the original source files ending with
{
element = { title, text, sign, info, date },
prefix = g / decl / auth /,
- top-skip = \c_@@_chapterbefore_dim,
+ top-skip = \l_@@_chapterbefore_dim,
bottom-skip = 0.5 cm plus 1.5 fill,
- bm-text = \c_@@_name_authdecl_tl,
+ bm-text = \l_@@_name_authdecl_tl,
bm-name = authdecl,
bookmark = toc
}
@@ -7459,7 +7604,7 @@ To produce the documentation run the original source files ending with
prefix = p / decl /,
bm-text = 声明页,
bm-name = decl,
- top-skip = \c_@@_chapterbefore_dim,
+ top-skip = \l_@@_chapterbefore_dim,
bottom-skip = 0 pt
}
%</def-p>
@@ -7595,6 +7740,7 @@ To produce the documentation run the original source files ending with
% \changes{v0.12}{2021/12/01}{仅会生成国家图书馆封面或者普通封面之一。}
% \changes{v0.13}{2021/12/12}{重新绘制封面。}
% \changes{v0.13}{2021/12/15}{草稿模式下不绘制封面。}
+% \changes{v1.4}{2024/03/12}{在生成封面时删除标题换行符。}
% 重定义 \tn{maketitle} 以生成封面。
% 在草稿模式下,封面绘制将被禁用,有助于提升编译速度。
% \begin{macrocode}
@@ -7605,23 +7751,21 @@ To produce the documentation run the original source files ending with
\pagenumbering { gobble }
\@@_make_cover:
}
+ \tl_gremove_all:Nn \g_@@_info_title_tl { \\ }
+ \tl_gremove_all:Nn \g_@@_info_title_en_tl { \\ }
% \end{macrocode}
% 如果在选择了 \opt{decl-page},就生成本科生的诚信承诺书,
% 或研究生的原创性声明和出版授权书。
% \begin{macrocode}
- \bool_if:NF \g_@@_opt_draft_bool
- {
- \bool_if:NT \g_@@_opt_decl_bool
- {
- \@@_make_decl_i:
- \@@_make_decl_ii:
- }
- }
+ \bool_lazy_and:nnT
+ { ! \g_@@_opt_draft_bool }
+ { \g_@@_opt_decl_bool }
+ { \@@_make_decl_i: \@@_make_decl_ii: }
% \end{macrocode}
% 在标题页后使用大写罗马字母页码,恢复正常字体设置。
% \begin{macrocode}
\cleardoublepage
- \exp_args:NV \pagestyle \c_@@_fmt_pagestyle_tl
+ \exp_args:NV \pagestyle \l_@@_fmt_pagestyle_tl
\pagenumbering { Roman }
}
%</class>
@@ -7641,7 +7785,7 @@ To produce the documentation run the original source files ending with
%<*(def-u|def-g|def-p)>
\@@_declare_element:nn { abstract / title }
{
-%<def-u|def-g> content = \@@_abs_title:N \c_@@_name_abstracttitle_tl,
+%<def-u|def-g> content = \@@_abs_title:N \l_@@_name_abstracttitle_tl,
%<def-p> content = \g_@@_info_title_tl,
%<def-u|def-g> format = \bfseries \kaishu \zihao { -2 },
%<def-p> format = \bfseries,
@@ -7655,7 +7799,7 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\@@_declare_element:nn { abstract / en / title }
{
-%<def-u|def-g> content = \@@_abs_title:N \c_@@_name_abstracttitle_en_tl,
+%<def-u|def-g> content = \@@_abs_title:N \l_@@_name_abstracttitle_en_tl,
%<def-p> content = \g_@@_info_title_en_tl,
%<def-u|def-g> format = \bfseries \kaishu \zihao { -2 },
%<def-p> format = \bfseries,
@@ -7705,7 +7849,7 @@ To produce the documentation run the original source files ending with
%<*(def-g|def-p)>
\@@_declare_element:nn { abstract / mark }
{
- content = \c_@@_name_abstractb_tl,
+ content = \l_@@_name_abstractb_tl,
format = \sffamily \zihao { -3 },
bottom-skip = 15 pt
}
@@ -7717,7 +7861,7 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\@@_declare_element:nn { abstract / en / mark }
{
- content = \c_@@_name_abstractb_en_tl,
+ content = \l_@@_name_abstractb_en_tl,
format = \sffamily \zihao { -3 },
bottom-skip = 15 pt
}
@@ -7734,9 +7878,9 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
%<*def-u>
\cs_new_protected:Npn \@@_abs_info_u:
- { \@@_abs_info_u:nn { } { \c_@@_name_colon_tl } }
+ { \@@_abs_info_u:nn { } { \l_@@_name_colon_tl } }
\cs_new_protected:Npn \@@_abs_info_en_u:
- { \@@_abs_info_u:nn { _en } { \c_@@_name_colon_en_tl } }
+ { \@@_abs_info_u:nn { _en } { \l_@@_name_colon_en_tl } }
% \end{macrocode}
% \end{macro}
%
@@ -7753,7 +7897,7 @@ To produce the documentation run the original source files ending with
% \end{macrocode}
% 由于作者姓名使用的字样发生了变动,这里进行替换以便嵌入循环。
% \begin{macrocode}
- \tl_set_eq:NN \c_@@_name_author_tl \c_@@_name_authora_tl
+ \tl_set_eq:NN \l_@@_name_author_tl \l_@@_name_authora_tl
% \end{macrocode}
% 使用循环输出院系、专业、作者、导师信息。
% \begin{macrocode}
@@ -7776,9 +7920,9 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
%<*def-g>
\cs_new_protected:Npn \@@_abs_info_g:
- { \@@_abs_info_g:N \c_@@_name_colon_tl }
+ { \@@_abs_info_g:N \l_@@_name_colon_tl }
\cs_new_protected:Npn \@@_abs_info_en_g:
- { \@@_abs_info_en_g:N \c_@@_name_colon_en_tl }
+ { \@@_abs_info_en_g:N \l_@@_name_colon_en_tl }
% \end{macrocode}
% \end{macro}
%
@@ -7795,7 +7939,7 @@ To produce the documentation run the original source files ending with
\cs_new_protected:Npn \@@_abs_info_g:N #1
{
\@@_uline_list:NNe \g_@@_info_title_tl \g_@@_abs_title_left_skip
- { \c_@@_name_titlea_tl #1 }
+ { \l_@@_name_titlea_tl #1 }
% \end{macrocode}
% 专业、年级、姓名。
% \begin{macrocode}
@@ -7804,15 +7948,15 @@ To produce the documentation run the original source files ending with
\dim_set:Nn \l_@@_tmpa_dim { 11 em }
\dim_set:Nn \l_@@_tmpb_dim { 4 em }
\@@_box_ulined_info:Nn \l_@@_tmpa_dim { major }
- \c_@@_name_majora_tl
+ \l_@@_name_majora_tl
\@@_box_ulined_info:Nn \l_@@_tmpb_dim { grade }
- \c_@@_name_grade_tl \c_@@_name_authora_tl #1
+ \l_@@_name_grade_tl \l_@@_name_authora_tl #1
}
\@@_box_ulined_info:Nn \l_@@_tmp_skip { author } \tex_par:D
% \end{macrocode}
% 导师姓名、职称。
% \begin{macrocode}
- \@@_get_width_print:Ne \l_@@_tmpa_dim { \c_@@_name_supva_tl #1 }
+ \@@_get_width_print:Ne \l_@@_tmpa_dim { \l_@@_name_supva_tl #1 }
\@@_box_ulined_info:Nn \l_@@_tmpa_dim { supvfull }
}
% \end{macrocode}
@@ -7832,7 +7976,7 @@ To produce the documentation run the original source files ending with
\bool_if:NTF \g_@@_abs_underline_bool
{
\@@_uline_list:NNe \g_@@_info_title_en_tl
- \g_@@_abs_title_left_skip { \c_@@_name_title_en_tl #1 }
+ \g_@@_abs_title_left_skip { \l_@@_name_title_en_tl #1 }
\clist_map_inline:nn { major, author, supvfull }
{
\tex_par:D
@@ -7853,8 +7997,6 @@ To produce the documentation run the original source files ending with
% \paragraph{关键词列表}
%
% \begin{macro}{\@@_print_keywords:nn}
-% \changes{v0.15}{2022/01/26}{为关键词列表添加悬挂缩进。}
-% \changes{v0.20}{2022/05/26}{修复英文关键词列表不整齐的缩进间距。}
% 生成中英文关键词列表。
% \begin{arguments}
% \item 语言,空置为中文,|_en| 为英文
@@ -7862,30 +8004,39 @@ To produce the documentation run the original source files ending with
% \end{arguments}
% \begin{macrocode}
%<*class>
-\cs_new_protected:Npn \@@_print_keywords:nn #1#2
+\cs_new_protected:Npn \@@_print_keywords:nn
+ { \@@_print_keywords:NNnn \l_@@_tmpa_tl \l_@@_tmpa_dim }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_print_keywords:NNnn}
+% \begin{arguments}
+% \item |tl| 临时变量
+% \item |dim| 临时变量
+% \end{arguments}
+% \begin{macrocode}
+\cs_new:Npn \@@_print_keywords:NNnn #1#2#3#4
{
- \tl_set:Nv \l_@@_tmpa_tl { c_@@_name_keywords #1 _tl }
- \exp_args:NNv \tl_put_left:Nn
- \l_@@_tmpa_tl { c_@@_fmt_abslabel #1 _tl }
- \exp_args:NNv \tl_put_right:Nn
- \l_@@_tmpa_tl { c_@@_name_colon #1 _tl }
- \@@_get_width:NV \l_@@_tmpa_dim \l_@@_tmpa_tl
+ \tl_set:Nv #1 { l_@@_name_keywords #3 _tl }
+ \exp_args:NNv \tl_put_left:Nn #1 { l_@@_fmt_abslabel #3 _tl }
+ \exp_args:NNv \tl_put_right:Nn #1 { l_@@_name_colon #3 _tl }
+ \@@_get_width:NV #2 #1
% \end{macrocode}
% 关键词列表的悬挂缩进样式由 \tn{list} 环境产生。
% \begin{macrocode}
- \list { \l_@@_tmpa_tl }
+ \list {#1}
{
- \labelwidth \l_@@_tmpa_dim
+ \labelwidth #2
\labelsep \c_zero_dim
\leftmargin \c_zero_dim
\rightmargin \c_zero_dim
- \advance \leftmargin \l_@@_tmpa_dim
+ \advance \leftmargin #2
% \end{macrocode}
% 使用粗体作为标签样式。
% \begin{macrocode}
\__nju_cs_clear:N \makelabel
}
- \item \clist_use:cn { g_@@_info_keywords #1 _clist } {#2}
+ \item \clist_use:cn { g_@@_info_keywords #3 _clist } {#4}
\endlist
}
%</class>
@@ -7936,7 +8087,7 @@ To produce the documentation run the original source files ending with
% \changes{v0.15}{2022/02/04}{可选择摘要是否出现在目录中。}
% 是否将摘要添加到目录。
% \begin{macrocode}
- toc-entry .bool_set:N = \g_@@_abs_showentry_bool,
+ toc-entry .bool_gset:N = \g_@@_abs_showentry_bool,
toc-entry .initial:n = true,
% \end{macrocode}
% \end{macro}
@@ -7945,7 +8096,7 @@ To produce the documentation run the original source files ending with
% \changes{v1.2}{2023/04/23}{新增研究生英文摘要页下划线选项。}
% 是否为研究生英文摘要条目内容添加下划线。
% \begin{macrocode}
- underline .bool_set:N = \g_@@_abs_underline_bool,
+ underline .bool_gset:N = \g_@@_abs_underline_bool,
underline .initial:n = true,
% \end{macrocode}
% \end{macro}
@@ -7957,18 +8108,18 @@ To produce the documentation run the original source files ending with
title-style .choice:,
title-style / strict .code:n =
{
- \bool_set_true:N \g_@@_abs_title_strict_bool
- \skip_set:Nn \g_@@_abs_title_left_skip { .5 em }
+ \bool_gset_true:N \g_@@_abs_title_strict_bool
+ \skip_gset:Nn \g_@@_abs_title_left_skip { .5 em }
},
title-style / centered .code:n =
{
- \bool_set_true:N \g_@@_abs_title_strict_bool
- \skip_set:Nn \g_@@_abs_title_left_skip { .5 em plus 1 fill }
+ \bool_gset_true:N \g_@@_abs_title_strict_bool
+ \skip_gset:Nn \g_@@_abs_title_left_skip { .5 em plus 1 fill }
},
title-style / natural .code:n =
{
- \bool_set_false:N \g_@@_abs_title_strict_bool
- \skip_set:Nn \g_@@_abs_title_left_skip { .5 em plus 1 fill }
+ \bool_gset_false:N \g_@@_abs_title_strict_bool
+ \skip_gset:Nn \g_@@_abs_title_left_skip { .5 em plus 1 fill }
},
title-style .initial:n = strict
}
@@ -7983,7 +8134,7 @@ To produce the documentation run the original source files ending with
{
\cleardoublepage
\thispagestyle { plain }
- \@@_abs_bookmark:Vn \c_@@_name_abstracta_tl { abstract }
+ \@@_abs_bookmark:Vn \l_@@_name_abstracta_tl { abstract }
\tl_gremove_all:Nn \g_@@_info_title_tl { \\ }
\@@_make_abstract:
\group_begin: \kaishu \zihao { -4 } #1
@@ -7999,7 +8150,7 @@ To produce the documentation run the original source files ending with
{
\cleardoublepage
\thispagestyle { plain }
- \@@_abs_bookmark:Vn \c_@@_name_abstracta_en_tl { abstract-en }
+ \@@_abs_bookmark:Vn \l_@@_name_abstracta_en_tl { abstract-en }
% \end{macrocode}
% \changes{v1.3}{2023/08/21}{修复英文标题手动换行与摘要页的冲突。}
% 生成封面后清除标题中的换行控制符,便于在摘要中输出。
@@ -8020,13 +8171,13 @@ 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 \l_@@_name_preface_tl #1 }
{ \cleardoublepage }
\NewDocumentEnvironment { acknowledgement } { +b }
{
\bool_if:NTF \g_@@_opt_anon_bool
- { \@@_bookmark_toc:V \c_@@_name_acknowledgementa_tl }
- { \@@_chapter:V \c_@@_name_acknowledgement_tl #1 }
+ { \@@_bookmark_toc:V \l_@@_name_acknowledgementa_tl }
+ { \@@_chapter:V \l_@@_name_acknowledgement_tl #1 }
}
{ \cleardoublepage }
% \end{macrocode}
@@ -8043,7 +8194,7 @@ To produce the documentation run the original source files ending with
% 成果列表。
% \begin{macrocode}
\NewDocumentCommand \njupaperlist
- { O { \c_@@_name_paperlist_tl } m }
+ { O { \l_@@_name_paperlist_tl } m }
{
\group_begin:
% \end{macrocode}
@@ -8051,15 +8202,15 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\RenewDocumentCommand \mkbibnamegiven { m }
{ \ifitemannotation { thesisauthor }
- { \njuline { \bf ##1 } } { ##1 } }
+ { \njuline { \bf ##1 } } {##1} }
\RenewDocumentCommand \mkbibnamefamily { m }
{ \ifitemannotation { thesisauthor }
- { \njuline { \bf ##1 } } { ##1 } }
+ { \njuline { \bf ##1 } } {##1} }
% \end{macrocode}
% 修改年份的显示方式,默认进行加粗。
% \begin{macrocode}
\RenewDocumentCommand \mkbibdateshort { m m m }
- { \textbf { \thefield { ##1 } } }
+ { \textbf { \thefield {##1} } }
% \end{macrocode}
% \changes{v1.1}{2023/04/07}{修复章末参考文献表与成果列表的冲突问题。}
% 相较于直接使用 \env{refsection} 环境,\tn{newrefsection} 命令可以
@@ -8126,7 +8277,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 \l_@@_name_notation_tl
\@@_make_notation:nn {#1} {#2}
}
{ \endlist \cleardoublepage }
@@ -8138,7 +8289,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 * { \l_@@_name_notation_tl }
\@@_make_notation:nn {#1} {#2}
}
{ \endlist \cleardoublepage }
@@ -8241,8 +8392,8 @@ To produce the documentation run the original source files ending with
%<def-g> { secret status } { 论文涉密情况: },
%<def-g> { secret free } { 不保密 },
%<def-g> { secret date }
-%<def-g> { 保密,保密期( \c_@@_name_blankdatea_tl 至
-%<def-g> \c_@@_name_blankdatea_tl ) },
+%<def-g> { 保密,保密期( \l_@@_name_blankdatea_tl 至
+%<def-g> \l_@@_name_blankdatea_tl ) },
%<def-g> { sign } { (签字) },
%<def-g> { sign a } { 研究生签名 },
%<def-g> { sign b } { 导师签名 },
@@ -8300,10 +8451,10 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
{ abstract b } { 摘\qquad{}要 } { ABSTRACT },
%<def-u|def-g> { abstracttitle }
-%<def-u> { \c_@@_name_nju_tl 本科生毕业论文(设计、作品)中文摘要 }
-%<def-u> { \c_@@_name_nju_tl 本科生毕业论文(设计、作品)英文摘要 },
-%<def-g> { \c_@@_name_nju_tl 研究生毕业论文中文摘要首页用纸 }
-%<def-g> { \c_@@_name_nju_tl 研究生毕业论文英文摘要首页用纸 },
+%<def-u> { \l_@@_name_nju_tl 本科生毕业论文(设计、作品)中文摘要 }
+%<def-u> { \l_@@_name_nju_tl 本科生毕业论文(设计、作品)英文摘要 },
+%<def-g> { \l_@@_name_nju_tl 研究生毕业论文中文摘要首页用纸 }
+%<def-g> { \l_@@_name_nju_tl 研究生毕业论文英文摘要首页用纸 },
{ appendix } { 附录 } { appendix },
%<def-u> { author } { 学生姓名 } { UNDERGRADUATE },
%<def-g> { author } { 作者姓名 } { POSTGRADUATE },
@@ -8333,10 +8484,10 @@ To produce the documentation run the original source files ending with
% \subsubsection{文本}
% \label{subsubsec:constant-text}
%
-% \begin{variable}{\c_@@_text_origdecl_tl}
+% \begin{variable}{\l_@@_text_origdecl_tl}
% 本科生的学位论文诚信承诺书,或研究生的学位论文原创性声明。
% \begin{macrocode}
-\tl_const:Nn \c_@@_text_origdecl_tl
+\tl_set:Nn \l_@@_text_origdecl_tl
{
%<*def-u>
本人郑重承诺:所呈交的毕业论文(设计)(题目: \g_@@_info_title_tl )
@@ -8362,11 +8513,11 @@ To produce the documentation run the original source files ending with
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}{\c_@@_text_authdecl_tl}
+% \begin{variable}{\l_@@_text_authdecl_tl}
% 研究生的学位论文出版授权书。
% \begin{macrocode}
%<*(def-g|def-p)>
-\tl_const:Nn \c_@@_text_authdecl_tl
+\tl_set:Nn \l_@@_text_authdecl_tl
{
%<*def-g>
本人完全同意《中国优秀博硕士学位论文全文数据库出版章程》(以下简称“章
@@ -8389,14 +8540,14 @@ To produce the documentation run the original source files ending with
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}{\c_@@_text_cover_en_tl}
+% \begin{variable}{\l_@@_text_cover_en_tl}
% 研究生的英文封面字样。
% \begin{macrocode}
%<*def-g>
-\tl_const:Nn \c_@@_text_cover_en_tl
+\tl_set:Nn \l_@@_text_cover_en_tl
{
A~ dissertation~ submitted~ to \\
- the~ graduate~ school~ of~ \c_@@_name_nju_en_tl \\
+ the~ graduate~ school~ of~ \l_@@_name_nju_en_tl \\
in~ partial~ fulfilment~ of~ the~ requirements~ for~ the~ degree~ of
}
%</def-g>
@@ -8497,15 +8648,15 @@ To produce the documentation run the original source files ending with
% 各级标题样式。
% \begin{macrocode}
{ section } { \bigger \normalfont \sffamily },
- { chapter } { \c_@@_fmt_section_tl \centering },
- { subsection } { \c_@@_fmt_section_tl },
- { subsubsection } { \c_@@_fmt_section_tl },
- { paragraph } { \c_@@_fmt_section_tl },
- { subparagraph } { \c_@@_fmt_section_tl },
+ { chapter } { \l_@@_fmt_section_tl \centering },
+ { subsection } { \l_@@_fmt_section_tl },
+ { subsubsection } { \l_@@_fmt_section_tl },
+ { paragraph } { \l_@@_fmt_section_tl },
+ { subparagraph } { \l_@@_fmt_section_tl },
% \end{macrocode}
% 目录中的章标题样式。
% \begin{macrocode}
- { chapterintoc } { \c_@@_fmt_section_tl },
+ { chapterintoc } { \l_@@_fmt_section_tl },
% \end{macrocode}
% “目录”二字的样式。
% \begin{macrocode}
@@ -8541,8 +8692,8 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\keys_define:nn { njudoc }
{
- codehigh .bool_set:N = \g_@@_codehigh_bool,
- codehigh .initial:n = false
+ codehigh .bool_gset:N = \g_@@_codehigh_bool,
+ codehigh .initial:n = false
}
\ProcessKeysOptions { njudoc }
% \end{macrocode}
@@ -8585,10 +8736,27 @@ To produce the documentation run the original source files ending with
}
% \end{macrocode}
%
-% 处理 \cls{l3doc} 新追加的 |e| 型展开。
+% 处理丢失的展开类型实现向后兼容。在2023年11月,\cls{l3doc} 进行了一系列展开类型修改。
+% 详见 \href{https://github.com/CTeX-org/ctex-kit/pull/678}{\texttt{CTeX-org/ctex-kit\#678}}
+% 以及 \href{https://github.com/CTeX-org/ctex-kit/pull/700}{\texttt{CTeX-org/ctex-kit\#700}}。
+% \begin{macrocode}
+\cs_generate_variant:Nn \__codedoc_get_hyper_target:nN { x }
+\cs_generate_variant:Nn \tl_replace_all:Nnn { No }
+% \end{macrocode}
+%
+% 处理向后兼容。见 \href{https://github.com/CTeX-org/ctex-kit/pull/703}{\texttt{CTeX-org/ctex-kit\#703}}。
% \begin{macrocode}
-\cs_if_exist:NF \__codedoc_get_hyper_target:xN
- { \cs_new_eq:NN \__codedoc_get_hyper_target:xN \__codedoc_get_hyper_target:eN }
+\cs_if_exist:NF \__codedoc_macroname_prefix:o
+ {
+ \cs_new_protected:Npn \__codedoc_macroname_prefix:n #1
+ {
+ \__codedoc_if_macro_internal:nTF {#1}
+ { \__codedoc_typeset_aux:n {#1} } {#1}
+ }
+ \cs_generate_variant:Nn \__codedoc_macroname_prefix:n { o }
+ \cs_new_protected:Npn \__codedoc_macroname_suffix:N #1
+ { \bool_if:NTF #1 { \__codedoc_typeset_TF: } { } }
+ }
% \end{macrocode}
%
% \subsubsection{杂项}
diff --git a/Master/texmf-dist/source/latex/njuthesis/njuthesis.ins b/Master/texmf-dist/source/latex/njuthesis/njuthesis.ins
index 49f6f539ce9..85360194577 100644
--- a/Master/texmf-dist/source/latex/njuthesis/njuthesis.ins
+++ b/Master/texmf-dist/source/latex/njuthesis/njuthesis.ins
@@ -6,7 +6,7 @@
%%
%% njuthesis.dtx (with options: `install')
%%
-%% Copyright (C) 2021 - 2023
+%% Copyright (C) 2021 - 2024
%% by Nanjing University Linux User Group
%% <git+nju-lug-email-3104-issue-@yaoge123.cn>
%%
@@ -29,7 +29,7 @@
\preamble
-Copyright (C) 2021 - 2023
+Copyright (C) 2021 - 2024
by Nanjing University Linux User Group
<git+nju-lug-email-3104-issue-@yaoge123.cn>
diff --git a/Master/texmf-dist/tex/latex/njuthesis/njuthesis-doc.cls b/Master/texmf-dist/tex/latex/njuthesis/njuthesis-doc.cls
index f1809cda0a5..6ab2fac855c 100644
--- a/Master/texmf-dist/tex/latex/njuthesis/njuthesis-doc.cls
+++ b/Master/texmf-dist/tex/latex/njuthesis/njuthesis-doc.cls
@@ -6,7 +6,7 @@
%%
%% njuthesis.dtx (with options: `doc-cls')
%%
-%% Copyright (C) 2021 - 2023
+%% Copyright (C) 2021 - 2024
%% by Nanjing University Linux User Group
%% <git+nju-lug-email-3104-issue-@yaoge123.cn>
%%
@@ -23,7 +23,7 @@
%% To produce the documentation run the original source files ending with
%% `.dtx' through XeTeX.
%%
-\GetIdInfo $Id: njuthesis.dtx 1.3.2 2023-12-05 16:30:00
+\GetIdInfo $Id: njuthesis.dtx 1.4.0 2024-03-19 20:30:00
+0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
{Documentation style for njuthesis}
\ProvidesExplFile{njuthesis-doc.cls}
@@ -32,8 +32,8 @@
\RequirePackage { l3keys2e }
\keys_define:nn { njudoc }
{
- codehigh .bool_set:N = \g__njudoc_codehigh_bool,
- codehigh .initial:n = false
+ codehigh .bool_gset:N = \g__njudoc_codehigh_bool,
+ codehigh .initial:n = false
}
\ProcessKeysOptions { njudoc }
\PassOptionsToPackage { fontset = fandol } { ctex }
@@ -61,8 +61,19 @@
\NewDocumentCommand \CJKsout { o m }
{ \textcolor { black!50 } {#1} }
}
-\cs_if_exist:NF \__codedoc_get_hyper_target:xN
- { \cs_new_eq:NN \__codedoc_get_hyper_target:xN \__codedoc_get_hyper_target:eN }
+\cs_generate_variant:Nn \__codedoc_get_hyper_target:nN { x }
+\cs_generate_variant:Nn \tl_replace_all:Nnn { No }
+\cs_if_exist:NF \__codedoc_macroname_prefix:o
+ {
+ \cs_new_protected:Npn \__codedoc_macroname_prefix:n #1
+ {
+ \__codedoc_if_macro_internal:nTF {#1}
+ { \__codedoc_typeset_aux:n {#1} } {#1}
+ }
+ \cs_generate_variant:Nn \__codedoc_macroname_prefix:n { o }
+ \cs_new_protected:Npn \__codedoc_macroname_suffix:N #1
+ { \bool_if:NTF #1 { \__codedoc_typeset_TF: } { } }
+ }
\backgroundsetup{
contents={\njuemblem[white!85!gray]{22cm}{!}},
scale=1, angle=0, hshift=-4cm
diff --git a/Master/texmf-dist/tex/latex/njuthesis/njuthesis-graduate.def b/Master/texmf-dist/tex/latex/njuthesis/njuthesis-graduate.def
index f8e42af7e42..2e4bbbaf95d 100644
--- a/Master/texmf-dist/tex/latex/njuthesis/njuthesis-graduate.def
+++ b/Master/texmf-dist/tex/latex/njuthesis/njuthesis-graduate.def
@@ -6,7 +6,7 @@
%%
%% njuthesis.dtx (with options: `def-g')
%%
-%% Copyright (C) 2021 - 2023
+%% Copyright (C) 2021 - 2024
%% by Nanjing University Linux User Group
%% <git+nju-lug-email-3104-issue-@yaoge123.cn>
%%
@@ -23,7 +23,7 @@
%% To produce the documentation run the original source files ending with
%% `.dtx' through XeTeX.
%%
-\GetIdInfo $Id: njuthesis.dtx 1.3.2 2023-12-05 16:30:00
+\GetIdInfo $Id: njuthesis.dtx 1.4.0 2024-03-19 20:30:00
+0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
{Graduate definition file for njuthesis}
\ProvidesExplFile{njuthesis-graduate.def}
@@ -33,26 +33,26 @@
\cs_set:Npn \__nju_date:nn #1#2
{ \__nju_date:nnn { } {#1} {#2} \__nju_date:nnn { _en } {#1} {#2} }
\tl_new:N \g__nju_info_confer_tl
-\tl_set:Nn \g__nju_info_confer_tl
+\tl_gset:Nn \g__nju_info_confer_tl
{
- \textbf { \c__nju_name_nju_tl } \hfil
+ \textbf { \l__nju_name_nju_tl } \hfil
\g__nju_info_conferdate_tl
}
\tl_new:N \g__nju_info_type_tl
-\tl_set:Ne \g__nju_info_type_tl
+\tl_gset:Ne \g__nju_info_type_tl
{ \clist_item:Nn \c__nju_name_type_clist { \g__nju_info_type_int } }
\tl_new:N \g__nju_info_degree_tl
-\tl_set_eq:NN \g__nju_info_degree_tl \g__nju_info_type_tl
+\tl_gset_eq:NN \g__nju_info_degree_tl \g__nju_info_type_tl
\bool_if:NF \g__nju_opt_academic_bool
- { \tl_put_right:Nn \g__nju_info_degree_tl { 专业 } }
+ { \tl_gput_right:Nn \g__nju_info_degree_tl { 专业 } }
\tl_new:N \g__nju_info_degree_en_tl
-\tl_set:Ne \g__nju_info_degree_en_tl
+\tl_gset:Ne \g__nju_info_degree_en_tl
{ \clist_item:Nn \c__nju_name_type_en_clist { \g__nju_info_type_int } }
\ctex_at_end_preamble:n { \__nju_loadfont_stzhongs: }
\cs_new_protected:Npn \__nju_decl_sign:
{
\clist_map_inline:nn { origsign, date }
- { \tex_par:D \__nju_name:n { ##1 } : \hbox_to_wd:nn { 6 em } { } }
+ { \tex_par:D \__nju_name:n {##1} : \hbox_to_wd:nn { 6 em } { } }
}
\__nju_declare_element:nn { g / cover-front / top }
{
@@ -65,12 +65,12 @@
}
\__nju_declare_element:nn { g / cover-front / emblem-img }
{
- content = \__nju_emblem:N \c__nju_emblemwd_dim,
+ content = \__nju_emblem:N \l__nju_emblemwd_dim,
bottom-skip = .47 cm
}
\__nju_declare_element:nn { g / cover-front / name-img }
{
- content = \__nju_name:N \c__nju_namewd_dim,
+ content = \__nju_name:N \l__nju_namewd_dim,
bottom-skip = 2.25 cm
}
\__nju_declare_element:nn { g / cover-front / type }
@@ -97,8 +97,8 @@
\__nju_get_width:NV \l__nju_tmpb_dim \g__nju_info_id_tl
\clist_map_inline:nn { code, clc, secretlv, udc, id }
{
- \__nju_cover_entry:NNNNn \c__nju_name_colon_tl \l__nju_tmpa_dim
- \l__nju_tmpb_dim \tex_relax:D { ##1 }
+ \__nju_cover_entry:NNNNn \l__nju_name_colon_tl \l__nju_tmpa_dim
+ \l__nju_tmpb_dim \tex_relax:D {##1}
}
}
\cs_new_protected:Npn \__nju_g_cover_info:NNNNN #1#2#3#4#5
@@ -108,13 +108,13 @@
{ \clist_set:Nn #1 { author, majorc, field, supvfull } }
\__nju_cover_entry_title:NNNN #2 #3 #4 #5
\clist_map_inline:Nn #1
- { \__nju_cover_entry:NNNNn #2 #3 #4 #5 { ##1 } }
+ { \__nju_cover_entry:NNNNn #2 #3 #4 #5 {##1} }
}
\cs_new:Npn \__nju_g_cover_info:
{
\tl_set:Nn \l__nju_tmpa_tl { \skip_horizontal:n { .7 cm } }
\__nju_g_cover_info:NNNNN \l__nju_tmp_clist \l__nju_tmpa_tl
- \c__nju_clabelwd_dim \c__nju_crulewd_dim \c__nju_fmt_coverlabel_tl
+ \l__nju_clabelwd_dim \l__nju_crulewd_dim \l__nju_fmt_coverlabel_tl
}
\__nju_declare_element:nn { g / cover-back / info }
{
@@ -143,8 +143,8 @@
}
\cs_new:Npn \__nju_g_cover_back:
{
- \__nju_g_cover_back:NNN \c__nju_clabelwdi_dim
- \c__nju_crulewdi_dim \c__nju_fmt_coverlabel_tl
+ \__nju_g_cover_back:NNN \l__nju_clabelwdi_dim
+ \l__nju_crulewdi_dim \l__nju_fmt_coverlabel_tl
}
\cs_new_protected:Npn \__nju_g_cover_sign:NNN #1#2#3
{
@@ -153,8 +153,8 @@
}
\cs_new:Npn \__nju_g_cover_sign:
{
- \__nju_g_cover_sign:NNN \c__nju_clabelwdii_dim
- \c__nju_fmt_coverlabel_tl \c__nju_name_colon_tl
+ \__nju_g_cover_sign:NNN \l__nju_clabelwdii_dim
+ \l__nju_fmt_coverlabel_tl \l__nju_name_colon_tl
}
\__nju_declare_element:nn { g / cover-en / title }
{
@@ -179,21 +179,21 @@
\__nju_declare_element:nn { g / cover-en / middle }
{
content =
- \c__nju_text_cover_en_tl \__nju_vskip:
+ \l__nju_text_cover_en_tl \__nju_vskip:
\group_begin: \scshape \g__nju_info_degree_en_tl \group_end:
\__nju_vskip: { in } \__nju_vskip: \g__nju_info_major_en_tl,
bottom-skip = .5 cm plus 1 fil
}
\__nju_declare_element:nn { g / cover-en / emblem-img }
{
- content = \__nju_emblem:N \c__nju_emblemwdii_dim,
+ content = \__nju_emblem:N \l__nju_emblemwdii_dim,
bottom-skip = 1 cm minus .5 cm
}
\__nju_declare_element:nn { g / cover-en / bottom }
{
content =
\g__nju_info_dept_en_tl \skip_vertical:N \c_zero_skip
- \c__nju_name_nju_en_tl \skip_vertical:n { 1 cm }
+ \l__nju_name_nju_en_tl \skip_vertical:n { 1 cm }
\g__nju_info_submitdate_en_tl
}
\__nju_declare_element:nn { cover-nl / top }
@@ -232,28 +232,30 @@
content = \g__nju_info_bottomdate_tl,
format = \kaishu \zihao { 3 }
}
-\cs_new_protected:Npn \__nju_cover_top_nl:
- {
- \dim_set:Nn \l__nju_tmpa_dim { 38.6 pt }
- \dim_set:Nn \l__nju_tmpb_dim { 109 pt }
- \__nju_box_spread_name:Nn \l__nju_tmpa_dim { clc } \__nju_hskip:
- \__nju_box_ulined_info:Nn \l__nju_tmpb_dim { clc } \tex_hfill:D
- \__nju_box_spread_name:Nn \l__nju_tmpa_dim { secretlv } \__nju_hskip:
- \__nju_box_ulined_info:Nn \l__nju_tmpb_dim { secretlv } \tex_par:D
- \__nju_box_spread_name:Nn \l__nju_tmpa_dim { udc } \__nju_hskip:
- \__nju_box_ulined_info:Nn \l__nju_tmpb_dim { udc } \tex_hfill:D
+\cs_new:Npn \__nju_cover_top_nl:
+ { \__nju_cover_top_nl:NN \l__nju_tmpa_dim \l__nju_tmpb_dim }
+\cs_new_protected:Npn \__nju_cover_top_nl:NN #1#2
+ {
+ \dim_set:Nn #1 { 38.6 pt }
+ \dim_set:Nn #2 { 109 pt }
+ \__nju_box_spread_name:Nn #1 { clc } \__nju_hskip:
+ \__nju_box_ulined_info:Nn #2 { clc } \tex_hfill:D
+ \__nju_box_spread_name:Nn #1 { secretlv } \__nju_hskip:
+ \__nju_box_ulined_info:Nn #2 { secretlv } \tex_par:D
+ \__nju_box_spread_name:Nn #1 { udc } \__nju_hskip:
+ \__nju_box_ulined_info:Nn #2 { udc } \tex_hfill:D
\__nju_null:
}
\cs_new_protected:Npn \__nju_cover_title_nl:
{
\parbox [ b ] { 15 em } { \__nju_uline_title: } \tex_par:D
\skip_vertical:n { - 0.5 cm }
- { \zihao { 4 } \c__nju_name_subtitle_tl }
+ { \zihao { 4 } \l__nju_name_subtitle_tl }
\skip_vertical:N \c_zero_skip
\dim_set:Nn \l__nju_tmpa_dim { 4.5 em }
\__nju_box_ulined_info:Nn \l__nju_tmpa_dim { author }
\skip_vertical:n { - 0.5 cm }
- { \zihao { 4 } { ( } \c__nju_name_author_tl { ) } }
+ { \zihao { 4 } { ( } \l__nju_name_author_tl { ) } }
}
\cs_new_protected:Npn \__nju_cover_info_nl:
{
@@ -265,9 +267,9 @@
}
\skip_set:Nn \l__nju_tmp_skip { .5 em plus 1 fill }
\__nju_uline_list:NNn \l__nju_tmpa_tl \l__nju_tmp_skip
- { \c__nju_name_supvinfo_tl }
+ { \l__nju_name_supvinfo_tl }
\group_begin:
- \tl_set_eq:NN \c__nju_name_major_tl \c__nju_name_majorb_tl
+ \tl_set_eq:NN \l__nju_name_major_tl \l__nju_name_majorb_tl
\__nju_uline_bientry:Nn \l__nju_tmpa_dim { degree }
\__nju_uline_bientry:Nn \l__nju_tmpa_dim { major }
\tex_par:D
@@ -287,13 +289,13 @@
}
\__nju_declare_element:nn { g / decl / orig / title }
{
- content = \c__nju_name_origdecl_tl,
- format = \c__nju_fmt_chapter_tl,
- bottom-skip = \c__nju_chapterafter_dim
+ content = \l__nju_name_origdecl_tl,
+ format = \l__nju_fmt_chapter_tl,
+ bottom-skip = \l__nju_chapterafter_dim
}
\__nju_declare_element:nn { g / decl / orig / text }
{
- content = \c__nju_text_origdecl_tl,
+ content = \l__nju_text_origdecl_tl,
align = n,
bottom-skip = 0 pt plus 1 fil
}
@@ -304,13 +306,13 @@
}
\__nju_declare_element:nn { g / decl / auth / title }
{
- content = \c__nju_name_authdecl_tl,
- format = \c__nju_fmt_chapter_tl,
- bottom-skip = \c__nju_chapterafter_dim
+ content = \l__nju_name_authdecl_tl,
+ format = \l__nju_fmt_chapter_tl,
+ bottom-skip = \l__nju_chapterafter_dim
}
\__nju_declare_element:nn { g / decl / auth / text }
{
- content = \c__nju_text_authdecl_tl,
+ content = \l__nju_text_authdecl_tl,
align = n,
bottom-skip = 2 cm
}
@@ -354,35 +356,32 @@
cell{1}{2} = {c=5}{m}, cell{3}{2} = {c=5}{m},
cell{4}{2} = {c=5}{m}, cell{5}{2} = {c=5}{m}
}
- \c__nju_name_titlec_tl & \g__nju_info_title_tl \\
- \c__nju_name_ida_tl & \g__nju_info_id_tl &
- \c__nju_name_depta_tl & \g__nju_info_dept_tl &
- \c__nju_name_year_tl &
+ \l__nju_name_titlec_tl & \g__nju_info_title_tl \\
+ \l__nju_name_ida_tl & \g__nju_info_id_tl &
+ \l__nju_name_depta_tl & \g__nju_info_dept_tl &
+ \l__nju_name_year_tl &
\tl_range:Nnn \g__nju_info_submitdate_tl {1} {4} \\
- \c__nju_name_degreea_tl &
+ \l__nju_name_degreea_tl &
{
\__nju_degree_checkbox:nn { } { 2 } 学术学位硕士 \qquad
\__nju_degree_checkbox:nn { ! } { 2 } 专业学位硕士 \\
\__nju_degree_checkbox:nn { } { 3 } 学术学位博士 \qquad
\__nju_degree_checkbox:nn { ! } { 3 } 专业学位博士
} \\
- \c__nju_name_email_tl & \g__nju_info_email_tl \\
- \c__nju_name_supvb_tl &
+ \l__nju_name_email_tl & \g__nju_info_email_tl \\
+ \l__nju_name_supvb_tl &
\clist_item:Nn \g__nju_info_supv_clist { 1 }
\bool_if:NT \g__nju_opt_supvii_bool
{ \__nju_quad: \clist_item:Nn \g__nju_info_supvii_clist { 1 } } \\
\end{tblr}
}
\cs_new_protected:Npn \__nju_g_decl_auth_sign:
- {
- \c__nju_name_authsign_tl \tex_par:D
- \c__nju_name_blankdatea_tl
- }
+ { \l__nju_name_authsign_tl \tex_par:D \l__nju_name_blankdatea_tl }
\cs_new_protected:Npn \__nju_g_decl_auth_secretlv:
{
- \c__nju_name_secretstatus_tl \tex_par:D
- \ensuremath { \mdwhtsquare } \c__nju_name_secretfree_tl \tex_par:D
- \ensuremath { \mdwhtsquare } \c__nju_name_secretdate_tl
+ \l__nju_name_secretstatus_tl \tex_par:D
+ \ensuremath { \mdwhtsquare } \l__nju_name_secretfree_tl \tex_par:D
+ \ensuremath { \mdwhtsquare } \l__nju_name_secretdate_tl
}
\__nju_declare_page:nn { cover-g-front }
{
@@ -415,18 +414,18 @@
{
element = { title, text, sign },
prefix = g / decl / orig /,
- top-skip = \c__nju_chapterbefore_dim,
+ top-skip = \l__nju_chapterbefore_dim,
bottom-skip = 0 pt plus 1 fil,
- bm-text = \c__nju_name_origdecl_tl,
+ bm-text = \l__nju_name_origdecl_tl,
bm-name = origdecl
}
\__nju_declare_page:nn { authdecl-g }
{
element = { title, text, sign, info, date },
prefix = g / decl / auth /,
- top-skip = \c__nju_chapterbefore_dim,
+ top-skip = \l__nju_chapterbefore_dim,
bottom-skip = 0.5 cm plus 1.5 fill,
- bm-text = \c__nju_name_authdecl_tl,
+ bm-text = \l__nju_name_authdecl_tl,
bm-name = authdecl,
bookmark = toc
}
@@ -457,13 +456,13 @@
}
\__nju_declare_element:nn { abstract / title }
{
- content = \__nju_abs_title:N \c__nju_name_abstracttitle_tl,
+ content = \__nju_abs_title:N \l__nju_name_abstracttitle_tl,
format = \bfseries \kaishu \zihao { -2 },
bottom-skip = 20 pt
}
\__nju_declare_element:nn { abstract / en / title }
{
- content = \__nju_abs_title:N \c__nju_name_abstracttitle_en_tl,
+ content = \__nju_abs_title:N \l__nju_name_abstracttitle_en_tl,
format = \bfseries \kaishu \zihao { -2 },
bottom-skip = 20 pt
}
@@ -483,35 +482,35 @@
}
\__nju_declare_element:nn { abstract / mark }
{
- content = \c__nju_name_abstractb_tl,
+ content = \l__nju_name_abstractb_tl,
format = \sffamily \zihao { -3 },
bottom-skip = 15 pt
}
\__nju_declare_element:nn { abstract / en / mark }
{
- content = \c__nju_name_abstractb_en_tl,
+ content = \l__nju_name_abstractb_en_tl,
format = \sffamily \zihao { -3 },
bottom-skip = 15 pt
}
\cs_new_protected:Npn \__nju_abs_info_g:
- { \__nju_abs_info_g:N \c__nju_name_colon_tl }
+ { \__nju_abs_info_g:N \l__nju_name_colon_tl }
\cs_new_protected:Npn \__nju_abs_info_en_g:
- { \__nju_abs_info_en_g:N \c__nju_name_colon_en_tl }
+ { \__nju_abs_info_en_g:N \l__nju_name_colon_en_tl }
\cs_new_protected:Npn \__nju_abs_info_g:N #1
{
\__nju_uline_list:NNe \g__nju_info_title_tl \g__nju_abs_title_left_skip
- { \c__nju_name_titlea_tl #1 }
+ { \l__nju_name_titlea_tl #1 }
\__nju_get_width_print:Ne \l__nju_tmp_skip
{
\dim_set:Nn \l__nju_tmpa_dim { 11 em }
\dim_set:Nn \l__nju_tmpb_dim { 4 em }
\__nju_box_ulined_info:Nn \l__nju_tmpa_dim { major }
- \c__nju_name_majora_tl
+ \l__nju_name_majora_tl
\__nju_box_ulined_info:Nn \l__nju_tmpb_dim { grade }
- \c__nju_name_grade_tl \c__nju_name_authora_tl #1
+ \l__nju_name_grade_tl \l__nju_name_authora_tl #1
}
\__nju_box_ulined_info:Nn \l__nju_tmp_skip { author } \tex_par:D
- \__nju_get_width_print:Ne \l__nju_tmpa_dim { \c__nju_name_supva_tl #1 }
+ \__nju_get_width_print:Ne \l__nju_tmpa_dim { \l__nju_name_supva_tl #1 }
\__nju_box_ulined_info:Nn \l__nju_tmpa_dim { supvfull }
}
\cs_new_protected:Npn \__nju_abs_info_en_g:N #1
@@ -519,7 +518,7 @@
\bool_if:NTF \g__nju_abs_underline_bool
{
\__nju_uline_list:NNe \g__nju_info_title_en_tl
- \g__nju_abs_title_left_skip { \c__nju_name_title_en_tl #1 }
+ \g__nju_abs_title_left_skip { \l__nju_name_title_en_tl #1 }
\clist_map_inline:nn { major, author, supvfull }
{
\tex_par:D
@@ -582,8 +581,8 @@
{ secret status } { 论文涉密情况: },
{ secret free } { 不保密 },
{ secret date }
- { 保密,保密期( \c__nju_name_blankdatea_tl 至
- \c__nju_name_blankdatea_tl ) },
+ { 保密,保密期( \l__nju_name_blankdatea_tl 至
+ \l__nju_name_blankdatea_tl ) },
{ sign } { (签字) },
{ sign a } { 研究生签名 },
{ sign b } { 导师签名 },
@@ -611,8 +610,8 @@
{ abstract a } { 中文摘要 } { ABSTRACT },
{ abstract b } { 摘\qquad{}要 } { ABSTRACT },
{ abstracttitle }
- { \c__nju_name_nju_tl 研究生毕业论文中文摘要首页用纸 }
- { \c__nju_name_nju_tl 研究生毕业论文英文摘要首页用纸 },
+ { \l__nju_name_nju_tl 研究生毕业论文中文摘要首页用纸 }
+ { \l__nju_name_nju_tl 研究生毕业论文英文摘要首页用纸 },
{ appendix } { 附录 } { appendix },
{ author } { 作者姓名 } { POSTGRADUATE },
{ blankdate } { \qquad{}年 \quad{}月 \quad{}日 } { },
@@ -632,7 +631,7 @@
{ type } { 学位论文 } { g }
}
{ \__nju_define_name:nnn #1 }
-\tl_const:Nn \c__nju_text_origdecl_tl
+\tl_set:Nn \l__nju_text_origdecl_tl
{
本人郑重声明,所提交的学位论文是本人在导师指导下独立进行科学研究工作所
取得的成果。除本论文中已经注明引用的内容外,本论文不包含其他个人或集体
@@ -640,7 +639,7 @@
证书而使用过的材料。对本文的研究做出重要贡献的个人和集体,均已在论文的
致谢部分明确标明。本人郑重申明愿承担本声明的法律责任。
}
-\tl_const:Nn \c__nju_text_authdecl_tl
+\tl_set:Nn \l__nju_text_authdecl_tl
{
本人完全同意《中国优秀博硕士学位论文全文数据库出版章程》(以下简称“章
程”),愿意将本人的学位论文提交“中国学术期刊(光盘版)电子杂志社”在《
@@ -650,10 +649,10 @@
总库》,在《中国博硕士学位论文评价数据库》中使用和在互联网上传播,同意
按“章程”规定享受相关权益。
}
-\tl_const:Nn \c__nju_text_cover_en_tl
+\tl_set:Nn \l__nju_text_cover_en_tl
{
A~ dissertation~ submitted~ to \\
- the~ graduate~ school~ of~ \c__nju_name_nju_en_tl \\
+ the~ graduate~ school~ of~ \l__nju_name_nju_en_tl \\
in~ partial~ fulfilment~ of~ the~ requirements~ for~ the~ degree~ of
}
\clist_map_inline:nn
@@ -689,12 +688,12 @@
{ emblem color } { black },
{ name color } { black },
{ section } { \bigger \normalfont \sffamily },
- { chapter } { \c__nju_fmt_section_tl \centering },
- { subsection } { \c__nju_fmt_section_tl },
- { subsubsection } { \c__nju_fmt_section_tl },
- { paragraph } { \c__nju_fmt_section_tl },
- { subparagraph } { \c__nju_fmt_section_tl },
- { chapterintoc } { \c__nju_fmt_section_tl },
+ { chapter } { \l__nju_fmt_section_tl \centering },
+ { subsection } { \l__nju_fmt_section_tl },
+ { subsubsection } { \l__nju_fmt_section_tl },
+ { paragraph } { \l__nju_fmt_section_tl },
+ { subparagraph } { \l__nju_fmt_section_tl },
+ { chapterintoc } { \l__nju_fmt_section_tl },
{ tabular } { \zihao { 5 } },
{ toc title } { \centering \zihao { 3 } \bfseries },
{ header } { \small \kaishu },
diff --git a/Master/texmf-dist/tex/latex/njuthesis/njuthesis-postdoctoral.def b/Master/texmf-dist/tex/latex/njuthesis/njuthesis-postdoctoral.def
index 7150de4a320..4fd12af3b1a 100644
--- a/Master/texmf-dist/tex/latex/njuthesis/njuthesis-postdoctoral.def
+++ b/Master/texmf-dist/tex/latex/njuthesis/njuthesis-postdoctoral.def
@@ -6,7 +6,7 @@
%%
%% njuthesis.dtx (with options: `def-p')
%%
-%% Copyright (C) 2021 - 2023
+%% Copyright (C) 2021 - 2024
%% by Nanjing University Linux User Group
%% <git+nju-lug-email-3104-issue-@yaoge123.cn>
%%
@@ -23,7 +23,7 @@
%% To produce the documentation run the original source files ending with
%% `.dtx' through XeTeX.
%%
-\GetIdInfo $Id: njuthesis.dtx 1.3.2 2023-12-05 16:30:00
+\GetIdInfo $Id: njuthesis.dtx 1.4.0 2024-03-19 20:30:00
+0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
{Postdoctoral definition file for njuthesis}
\ProvidesExplFile{njuthesis-postdoctoral.def}
@@ -31,33 +31,32 @@
\__nju_declare_element:nn { p / cover / name-img }
{
- content = \__nju_name:N \c__nju_namewd_dim,
+ content = \__nju_name:N \l__nju_namewd_dim,
bottom-skip = 40 pt
}
\__nju_declare_element:nn { p / cover / report }
{
- content = \c__nju_name_report_tl,
+ content = \l__nju_name_report_tl,
format = \zihao { 0 } \sffamily,
bottom-skip = 40 pt plus 1.5 fil
}
\__nju_declare_element:nn { p / cover / title }
{
content =
- \c__nju_name_title_tl
- \c__nju_name_colon_tl
+ \l__nju_name_title_tl
+ \l__nju_name_colon_tl
\g__nju_info_title_tl,
format = \zihao { 4 },
bottom-skip = 80 pt
}
\__nju_declare_element:nn { p / cover / info }
{
- content =
- \__nju_p_cover_info:NN
- \c__nju_clabelwd_dim
- \c__nju_fmt_coverlabel_tl,
+ content = \__nju_p_cover_info:,
format = \zihao { -4 },
bottom-skip = 0 pt
}
+\cs_new:Npn \__nju_p_cover_info:
+ { \__nju_p_cover_info:NN \l__nju_clabelwd_dim \l__nju_fmt_coverlabel_tl }
\cs_new_protected:Npn \__nju_p_cover_info:NN #1#2
{
\clist_set:Nn \l__nju_tmp_clist
@@ -65,21 +64,21 @@
\__nju_get_max_width:NN \l__nju_tmpb_dim \l__nju_tmp_clist
\clist_map_inline:Nn \l__nju_tmp_clist
{
- \__nju_box_spread_name:NNn #1 #2 { ##1 }
- \c__nju_name_colon_tl
- \__nju_box_center:Nn \l__nju_tmpb_dim { \__nju_info:n { ##1 } }
+ \__nju_box_spread_name:NNn #1 #2 {##1}
+ \l__nju_name_colon_tl
+ \__nju_box_center:Nn \l__nju_tmpb_dim { \__nju_info:n {##1} }
\tex_par:D
}
}
\__nju_declare_element:nn { p / decl / orig / title }
{
- content = \c__nju_name_origdecl_tl,
- format = \c__nju_fmt_chapter_tl,
- bottom-skip = \c__nju_chapterafter_dim
+ content = \l__nju_name_origdecl_tl,
+ format = \l__nju_fmt_chapter_tl,
+ bottom-skip = \l__nju_chapterafter_dim
}
\__nju_declare_element:nn { p / decl / orig / text }
{
- content = \c__nju_text_origdecl_tl,
+ content = \l__nju_text_origdecl_tl,
align = n,
bottom-skip = 2 cm
}
@@ -90,13 +89,13 @@
}
\__nju_declare_element:nn { p / decl / auth / title }
{
- content = \c__nju_name_authdecl_tl,
- format = \c__nju_fmt_chapter_tl,
- bottom-skip = \c__nju_chapterafter_dim
+ content = \l__nju_name_authdecl_tl,
+ format = \l__nju_fmt_chapter_tl,
+ bottom-skip = \l__nju_chapterafter_dim
}
\__nju_declare_element:nn { p / decl / auth / text }
{
- content = \c__nju_text_authdecl_tl,
+ content = \l__nju_text_authdecl_tl,
align = n,
bottom-skip = 2 cm
}
@@ -109,8 +108,8 @@
}
\cs_new_protected:Npn \__nju_p_decl_sign:nn #1#2
{
- \__nju_name:n {#1} \c__nju_name_colon_tl \tex_hfill:D
- \__nju_name:n {#2} \c__nju_name_colon_tl
+ \__nju_name:n {#1} \l__nju_name_colon_tl \tex_hfill:D
+ \__nju_name:n {#2} \l__nju_name_colon_tl
\skip_horizontal:n { 160 pt } \__nju_null: \__nju_vskip:
}
\__nju_declare_page:nn { cover-p }
@@ -130,7 +129,7 @@
prefix = p / decl /,
bm-text = 声明页,
bm-name = decl,
- top-skip = \c__nju_chapterbefore_dim,
+ top-skip = \l__nju_chapterbefore_dim,
bottom-skip = 0 pt
}
\cs_new_protected:Npn \__nju_make_cover:
@@ -160,13 +159,13 @@
}
\__nju_declare_element:nn { abstract / mark }
{
- content = \c__nju_name_abstractb_tl,
+ content = \l__nju_name_abstractb_tl,
format = \sffamily \zihao { -3 },
bottom-skip = 15 pt
}
\__nju_declare_element:nn { abstract / en / mark }
{
- content = \c__nju_name_abstractb_en_tl,
+ content = \l__nju_name_abstractb_en_tl,
format = \sffamily \zihao { -3 },
bottom-skip = 15 pt
}
@@ -227,14 +226,14 @@
{ table } { 表 } { table },
}
{ \__nju_define_name:nnn #1 }
-\tl_const:Nn \c__nju_text_origdecl_tl
+\tl_set:Nn \l__nju_text_origdecl_tl
{
本人郑重声明:所呈交的研究报告,是本人独立进行研究工作所取得的成果。除
文中已经注明引用的内容外,本报告不含任何其他个人或集体已经发表或撰写过
的作品成果。对本报告的研究做出重要贡献的个人和集体,均已在报告中以明确
方式标明。本人完全意识到本声明的法律结果由本人承担。
}
-\tl_const:Nn \c__nju_text_authdecl_tl
+\tl_set:Nn \l__nju_text_authdecl_tl
{
本研究报告作者完全了解南京大学有关保留和使用该报告的规定,即:博士后在
职期间的知识产权单位属南京大学。学校有权保留并向国家有关部门或机构送交
@@ -267,12 +266,12 @@
{ emblem color } { black },
{ name color } { black },
{ section } { \bigger \normalfont \sffamily },
- { chapter } { \c__nju_fmt_section_tl \centering },
- { subsection } { \c__nju_fmt_section_tl },
- { subsubsection } { \c__nju_fmt_section_tl },
- { paragraph } { \c__nju_fmt_section_tl },
- { subparagraph } { \c__nju_fmt_section_tl },
- { chapterintoc } { \c__nju_fmt_section_tl },
+ { chapter } { \l__nju_fmt_section_tl \centering },
+ { subsection } { \l__nju_fmt_section_tl },
+ { subsubsection } { \l__nju_fmt_section_tl },
+ { paragraph } { \l__nju_fmt_section_tl },
+ { subparagraph } { \l__nju_fmt_section_tl },
+ { chapterintoc } { \l__nju_fmt_section_tl },
{ tabular } { \zihao { 5 } },
{ toc title } { \centering \zihao { 3 } \bfseries },
{ header } { \small \kaishu },
diff --git a/Master/texmf-dist/tex/latex/njuthesis/njuthesis-undergraduate.def b/Master/texmf-dist/tex/latex/njuthesis/njuthesis-undergraduate.def
index 9f78082444c..a2120d56bd0 100644
--- a/Master/texmf-dist/tex/latex/njuthesis/njuthesis-undergraduate.def
+++ b/Master/texmf-dist/tex/latex/njuthesis/njuthesis-undergraduate.def
@@ -6,7 +6,7 @@
%%
%% njuthesis.dtx (with options: `def-u')
%%
-%% Copyright (C) 2021 - 2023
+%% Copyright (C) 2021 - 2024
%% by Nanjing University Linux User Group
%% <git+nju-lug-email-3104-issue-@yaoge123.cn>
%%
@@ -23,7 +23,7 @@
%% To produce the documentation run the original source files ending with
%% `.dtx' through XeTeX.
%%
-\GetIdInfo $Id: njuthesis.dtx 1.3.2 2023-12-05 16:30:00
+\GetIdInfo $Id: njuthesis.dtx 1.4.0 2024-03-19 20:30:00
+0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
{Undergraduate definition file for njuthesis}
\ProvidesExplFile{njuthesis-undergraduate.def}
@@ -31,12 +31,12 @@
\__nju_declare_element:nn { u / cover / emblem-img }
{
- content = \__nju_emblem:N \c__nju_emblemwd_dim,
+ content = \__nju_emblem:N \l__nju_emblemwd_dim,
bottom-skip = 1.2 cm
}
\__nju_declare_element:nn { u / cover / name-img }
{
- content = \__nju_name:N \c__nju_namewd_dim,
+ content = \__nju_name:N \l__nju_namewd_dim,
bottom-skip = 1 cm,
}
\__nju_declare_element:nn { u / cover / title }
@@ -65,23 +65,23 @@
}
\cs_new:Npn \__nju_u_cover_info:
{
- \__nju_u_cover_info:NNNN \c__nju_clabelwd_dim \c__nju_crulewd_dim
- \c__nju_hsep_dim \kaishu
+ \__nju_u_cover_info:NNNN \l__nju_clabelwd_dim \l__nju_crulewd_dim
+ \l__nju_hsep_dim \kaishu
}
\__nju_declare_element:nn { u / decl / orig / emblem }
{
- content = \__nju_emblem:N \c__nju_emblemwdi_dim,
+ content = \__nju_emblem:N \l__nju_emblemwdi_dim,
bottom-skip = 30 pt
}
\__nju_declare_element:nn { u / decl / orig / title }
{
- content = \c__nju_name_origdecl_tl,
+ content = \l__nju_name_origdecl_tl,
format = \sffamily \__nju_fontsize:nn { 24 bp } { 22.15 bp } \bfseries,
bottom-skip = 50 pt
}
\__nju_declare_element:nn { u / decl / orig / text }
{
- content = \c__nju_text_origdecl_tl,
+ content = \l__nju_text_origdecl_tl,
format = \__nju_zihao:nn { 1.9 } { -3 },
align = n,
bottom-skip = 2.7 cm
@@ -95,7 +95,7 @@
\cs_new_protected:Npn \__nju_decl_sign:
{
\clist_map_inline:nn { origsign, id, date }
- { \tex_par:D \__nju_name:n { ##1 } : \hbox_to_wd:nn { 6 em } { } }
+ { \tex_par:D \__nju_name:n {##1} : \hbox_to_wd:nn { 6 em } { } }
}
\__nju_declare_page:nn { cover-u }
{
@@ -125,13 +125,13 @@
}
\__nju_declare_element:nn { abstract / title }
{
- content = \__nju_abs_title:N \c__nju_name_abstracttitle_tl,
+ content = \__nju_abs_title:N \l__nju_name_abstracttitle_tl,
format = \bfseries \kaishu \zihao { -2 },
bottom-skip = 20 pt
}
\__nju_declare_element:nn { abstract / en / title }
{
- content = \__nju_abs_title:N \c__nju_name_abstracttitle_en_tl,
+ content = \__nju_abs_title:N \l__nju_name_abstracttitle_en_tl,
format = \bfseries \kaishu \zihao { -2 },
bottom-skip = 20 pt
}
@@ -150,12 +150,12 @@
align = l
}
\cs_new_protected:Npn \__nju_abs_info_u:
- { \__nju_abs_info_u:nn { } { \c__nju_name_colon_tl } }
+ { \__nju_abs_info_u:nn { } { \l__nju_name_colon_tl } }
\cs_new_protected:Npn \__nju_abs_info_en_u:
- { \__nju_abs_info_u:nn { _en } { \c__nju_name_colon_en_tl } }
+ { \__nju_abs_info_u:nn { _en } { \l__nju_name_colon_en_tl } }
\cs_new_protected:Npn \__nju_abs_info_u:nn #1#2
{
- \tl_set_eq:NN \c__nju_name_author_tl \c__nju_name_authora_tl
+ \tl_set_eq:NN \l__nju_name_author_tl \l__nju_name_authora_tl
\clist_map_inline:nn { title, dept, major, author, supvfull }
{
\__nju_name:nn { abslabel #1 } { ##1 #1 } #2
@@ -203,8 +203,8 @@
{ abstract a } { 中文摘要 } { ABSTRACT },
{ abstract b } { 摘\qquad{}要 } { ABSTRACT },
{ abstracttitle }
- { \c__nju_name_nju_tl 本科生毕业论文(设计、作品)中文摘要 }
- { \c__nju_name_nju_tl 本科生毕业论文(设计、作品)英文摘要 },
+ { \l__nju_name_nju_tl 本科生毕业论文(设计、作品)中文摘要 }
+ { \l__nju_name_nju_tl 本科生毕业论文(设计、作品)英文摘要 },
{ appendix } { 附录 } { appendix },
{ author } { 学生姓名 } { UNDERGRADUATE },
{ blankdate } { \qquad{}年 \quad{}月 \quad{}日 } { },
@@ -224,7 +224,7 @@
{ type } { 本科毕业论文 } { u }
}
{ \__nju_define_name:nnn #1 }
-\tl_const:Nn \c__nju_text_origdecl_tl
+\tl_set:Nn \l__nju_text_origdecl_tl
{
本人郑重承诺:所呈交的毕业论文(设计)(题目: \g__nju_info_title_tl )
是在指导教师的指导下严格按照学校和院系有关规定由本人独立完成的。
@@ -261,12 +261,12 @@
{ emblem color } { black },
{ name color } { black },
{ section } { \bigger \normalfont \sffamily },
- { chapter } { \c__nju_fmt_section_tl \centering },
- { subsection } { \c__nju_fmt_section_tl },
- { subsubsection } { \c__nju_fmt_section_tl },
- { paragraph } { \c__nju_fmt_section_tl },
- { subparagraph } { \c__nju_fmt_section_tl },
- { chapterintoc } { \c__nju_fmt_section_tl },
+ { chapter } { \l__nju_fmt_section_tl \centering },
+ { subsection } { \l__nju_fmt_section_tl },
+ { subsubsection } { \l__nju_fmt_section_tl },
+ { paragraph } { \l__nju_fmt_section_tl },
+ { subparagraph } { \l__nju_fmt_section_tl },
+ { chapterintoc } { \l__nju_fmt_section_tl },
{ tabular } { \zihao { 5 } },
{ toc title } { \centering \zihao { 3 } \bfseries },
{ header } { \small \kaishu },
diff --git a/Master/texmf-dist/tex/latex/njuthesis/njuthesis.cls b/Master/texmf-dist/tex/latex/njuthesis/njuthesis.cls
index d860877df20..2560e613a2e 100644
--- a/Master/texmf-dist/tex/latex/njuthesis/njuthesis.cls
+++ b/Master/texmf-dist/tex/latex/njuthesis/njuthesis.cls
@@ -6,7 +6,7 @@
%%
%% njuthesis.dtx (with options: `class')
%%
-%% Copyright (C) 2021 - 2023
+%% Copyright (C) 2021 - 2024
%% by Nanjing University Linux User Group
%% <git+nju-lug-email-3104-issue-@yaoge123.cn>
%%
@@ -24,7 +24,7 @@
%% `.dtx' through XeTeX.
%%
\NeedsTeXFormat{LaTeX2e}
-\GetIdInfo $Id: njuthesis.dtx 1.3.2 2023-12-05 16:30:00
+\GetIdInfo $Id: njuthesis.dtx 1.4.0 2024-03-19 20:30:00
+0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
{Thesis template for Nanjing University}
\ProvidesExplClass{njuthesis}
@@ -46,6 +46,7 @@
\@ifpackagelater { expl3 } { 2023/10/10 } { }
{
\cs_generate_variant:Nn \tl_set:Nn { Ne }
+ \cs_generate_variant:Nn \tl_gset:Nn { Ne }
\cs_generate_variant:Nn \tl_const:Nn { Ne }
\cs_generate_variant:Nn \tl_gput_right:Nn { Ne }
}
@@ -74,11 +75,14 @@
\tl_new:N \l__nju_tmpb_tl
\int_new:N \g__nju_info_type_int
\bool_new:N \g__nju_opt_academic_bool
-\bool_new:N \g__nju_opt_twoside_bool
-\bool_set_true:N \g__nju_opt_twoside_bool
+\bool_new:N \g__nju_opt_draft_bool
+\bool_gset_false:N \g__nju_opt_draft_bool
\bool_new:N \g__nju_opt_supvii_bool
\tl_new:N \g__nju_info_supvfull_tl
\tl_new:N \g__nju_info_supvfull_en_tl
+\tl_new:N \g__nju_info_major_tl
+\tl_new:N \g__nju_info_majorc_tl
+\tl_new:N \g__nju_font_set_tl
\tl_new:N \g__nju_font_latin_tl
\tl_new:N \g__nju_font_cjk_tl
\tl_new:N \g__nju_font_math_tl
@@ -108,10 +112,10 @@
\clist_const:Nn \c__nju_name_anon_en_clist
{ author, supervisor, supervisor-ii }
\cs_new:Nn \__nju_null: { \hbox:n { } }
-\cs_new:Nn \__nju_quad: { \skip_horizontal:n { 1 em } }
-\cs_new:Nn \__nju_qquad: { \skip_horizontal:n { 2 em } }
-\cs_new:Nn \__nju_vskip: { \skip_vertical:N \c__nju_vsep_dim }
-\cs_new:Nn \__nju_hskip: { \skip_horizontal:N \c__nju_hsep_dim }
+\cs_new:Nn \__nju_space: { \skip_horizontal:n { .5 em } }
+\cs_new:Nn \__nju_quad: { \skip_horizontal:n { 1 em } }
+\cs_new:Nn \__nju_vskip: { \skip_vertical:N \l__nju_vsep_dim }
+\cs_new:Nn \__nju_hskip: { \skip_horizontal:N \l__nju_hsep_dim }
\cs_set_protected:Npn \__nju_vskip:N #1
{
\tex_hrule:D \@height \c_zero_dim \scan_stop:
@@ -119,22 +123,30 @@
\skip_vertical:N #1
\skip_vertical:N \c_zero_dim
}
-\cs_new_protected:Npn \__nju_define_name:nn #1#2
- { \tl_const:cn { c__nju_name_ #1 _tl } {#2} }
-\cs_new_protected:Npn \__nju_define_name:nnn #1#2#3
+\cs_new:Npn \__nju_define_name:nn #1
{
- \tl_const:cn { c__nju_name_ #1 _tl } {#2}
- \tl_const:cn { c__nju_name_ #1 _en_tl } {#3}
+ \tl_new:c { l__nju_name_ #1 _tl }
+ \tl_set:cn { l__nju_name_ #1 _tl }
+ }
+\cs_new:Npn \__nju_define_name:nnn #1#2#3
+ {
+ \__nju_define_name:nn { #1 } {#2}
+ \__nju_define_name:nn { #1 _en } {#3}
+ }
+\cs_new:Npn \__nju_define_fmt:nn #1 { \tl_set:cn { l__nju_fmt_ #1 _tl } }
+\cs_new:Npn \__nju_define_dim:nn #1
+ {
+ \dim_new:c { l__nju_ #1 _dim }
+ \dim_set:cn { l__nju_ #1 _dim }
+ }
+\cs_new:Npn \__nju_define_skip:nn #1
+ {
+ \skip_new:c { l__nju_ #1 _skip }
+ \skip_set:cn { l__nju_ #1 _skip }
}
-\cs_new_protected:Npn \__nju_define_fmt:nn #1#2
- { \tl_const:cn { c__nju_fmt_ #1 _tl } {#2} }
-\cs_new_protected:Npn \__nju_define_dim:nn #1#2
- { \dim_const:cn { c__nju_ #1 _dim } {#2} }
-\cs_new_protected:Npn \__nju_define_skip:nn #1#2
- { \skip_const:cn { c__nju_ #1 _skip } {#2} }
-\cs_new:Npn \__nju_name:n #1 { \tl_use:c { c__nju_name_ #1 _tl } }
\cs_new:Npn \__nju_info:n #1 { \tl_use:c { g__nju_info_ #1 _tl } }
-\cs_new:Npn \__nju_fmt:n #1 { \tl_use:c { c__nju_fmt_ #1 _tl } }
+\cs_new:Npn \__nju_name:n #1 { \tl_use:c { l__nju_name_ #1 _tl } }
+\cs_new:Npn \__nju_fmt:n #1 { \tl_use:c { l__nju_fmt_ #1 _tl } }
\cs_new:Npn \__nju_name:nn #1#2
{ \group_begin: \__nju_fmt:n {#1} \__nju_name:n {#2} \group_end: }
\cs_new:Npn \__nju_fontsize:nn #1#2
@@ -158,7 +170,7 @@
\cs_new_protected:Npn \__nju_box_ulined:NN #1#2
{
\mode_leave_vertical:
- \rule [ \c__nju_ruledpi_dim ] {#1} { \c__nju_rulehti_dim }
+ \rule [ \l__nju_ruledpi_dim ] {#1} { \l__nju_rulehti_dim }
\skip_horizontal:n { -#1 }
\hbox_to_wd:nn {#1} { \tex_hfil:D #2 \tex_hfil:D }
}
@@ -184,9 +196,9 @@
\cs_generate_variant:Nn \__nju_box_spread:NNn { NNv }
\cs_generate_variant:Nn \__nju_box_spread:NNn { NNe }
\cs_new_protected:Npn \__nju_box_spread_name:Nn #1#2
- { \__nju_box_spread:NNv #1 \c_empty_tl { c__nju_name_ #2 _tl } }
+ { \__nju_box_spread:NNv #1 \c_empty_tl { l__nju_name_ #2 _tl } }
\cs_new_protected:Npn \__nju_box_spread_name:NNn #1#2#3
- { \__nju_box_spread:NNv #1 #2 { c__nju_name_ #3 _tl } }
+ { \__nju_box_spread:NNv #1 #2 { l__nju_name_ #3 _tl } }
\cs_new_protected:Npn \__nju_box_center:Nn #1#2
{
\mode_leave_vertical:
@@ -197,7 +209,7 @@
\int_set:Nn #1 { \int_max:nn { \clist_count:N #3 } {#5} }
\int_step_inline:nn {#1}
{
- \clist_pop:NNF #3 #2 { \tl_set_eq:NN #2 \c_empty_tl }
+ \clist_gpop:NNF #3 #2 { \tl_set_eq:NN #2 \c_empty_tl }
\__nju_box_ulined:NN #4 #2 \tex_par:D
}
}
@@ -206,15 +218,15 @@
\cs_new_protected:Npn \__nju_uline:n #1
{
\mode_leave_vertical:
- \rule [ \c__nju_ruledpi_dim ] {#1} { \c__nju_rulehti_dim }
+ \rule [ \l__nju_ruledpi_dim ] {#1} { \l__nju_rulehti_dim }
\skip_horizontal:n { -#1 }
}
\cs_new_protected:Npn \__nju_uuline:N #1
{
\mode_leave_vertical:
- \rule [ \c__nju_ruledpii_dim ] {#1} { \c__nju_rulehtii_dim }
+ \rule [ \l__nju_ruledpii_dim ] {#1} { \l__nju_rulehtii_dim }
\skip_horizontal:n { -#1 }
- \rule [ \c__nju_ruledpiii_dim ] {#1} { \c__nju_rulehtii_dim }
+ \rule [ \l__nju_ruledpiii_dim ] {#1} { \l__nju_rulehtii_dim }
\skip_horizontal:n { -#1 }
}
\cs_new:Npn \__nju_get_width:Nn #1#2
@@ -241,12 +253,12 @@
\cs_generate_variant:Nn \__nju_get_width_print:Nn { Ne }
\cs_new_protected:Npn \__nju_uline_entry:Nn #1#2
{
- \__nju_get_width_print:Nv #1 { c__nju_name_ #2 _tl }
+ \__nju_get_width_print:Nv #1 { l__nju_name_ #2 _tl }
\__nju_box_ulined_info:Nn #1 {#2}
}
\cs_new_protected:Npn \__nju_uline_bientry:Nn #1#2
{
- \__nju_get_width_print:Nv #1 { c__nju_name_ #2 _tl }
+ \__nju_get_width_print:Nv #1 { l__nju_name_ #2 _tl }
\dim_sub:Nn #1 { \textwidth / 2 }
\__nju_box_ulined_info:Nn #1 {#2}
}
@@ -257,7 +269,7 @@
\cs_new:Npn \__nju_date:nn { \__nju_date:nnn { } }
\cs_new:Npn \__nju_date:nnn #1#2#3
{
- \tl_set:cx { g__nju_info_ #2 date #1 _tl }
+ \tl_gset:cx { g__nju_info_ #2 date #1 _tl }
{
\tl_if_empty:nTF {#3}
{ \__nju_name:n { blankdate #1 } }
@@ -273,7 +285,7 @@
\cs_new:Npn \__nju_breakpar_loop:n #1
{
\dim_set:Nn \l__nju_tmpa_dim
- { - \tex_prevdepth:D - \c__nju_ruledpi_dim - \c__nju_rulehti_dim }
+ { - \tex_prevdepth:D - \l__nju_ruledpi_dim - \l__nju_rulehti_dim }
\hbox_gset:Nn \l__nju_tmpc_box { }
\__nju_loop_until:nnn { \box_if_empty_p:N \l__nju_tmpb_box }
{
@@ -323,7 +335,7 @@
\mode_leave_vertical: #1
\parbox [ t ] {#3}
{
- \c__nju_fmt_covertitle_tl \__nju_uline_title:
+ \l__nju_fmt_covertitle_tl \__nju_uline_title:
\dim_gset_eq:NN \l__nju_tmpa_dim \tex_prevdepth:D
}
\tex_par:D
@@ -355,9 +367,9 @@
\__nju_box_ulined:NN #2 \l__nju_tmpb_tl \tex_par:D
}
\cs_new_protected:Npn \__nju_emblem:N #1
- { \njuemblem [ \c__nju_fmt_emblemcolor_tl ] {#1} { ! } }
+ { \njuemblem [ \l__nju_fmt_emblemcolor_tl ] {#1} { ! } }
\cs_new_protected:Npn \__nju_name:N #1
- { \njuname [ \c__nju_fmt_namecolor_tl ] {#1} { ! } }
+ { \njuname [ \l__nju_fmt_namecolor_tl ] {#1} { ! } }
\cs_new_protected:Npn \__nju_abs_bookmark:nn #1#2
{
\phantomsection
@@ -547,6 +559,10 @@
The~ font~ is~ normally~ distributed~ with~ MS~ Windows.~
I~ have~ used~ songti~ for~ substitution.
}
+\cs_new:Npn \__nju_pass_option:nn #1#2 { \PassOptionsToClass {#2} {#1} }
+\cs_new:Npn \__nju_pass_option:n { \__nju_pass_option:nn { ctexbook } }
+\cs_generate_variant:Nn \__nju_pass_option:n { V }
+\cs_new:Npn \__nju_pass_option: { \__nju_pass_option:V \l_keys_key_str }
\keys_define:nn { nju }
{
type .choices:nn = { bachelor, master, doctor, postdoc }
@@ -554,45 +570,66 @@
type .initial:n = bachelor,
degree .choice:,
degree / academic .code:n =
- { \bool_set_true:N \g__nju_opt_academic_bool },
+ { \bool_gset_true:N \g__nju_opt_academic_bool },
degree / professional .code:n =
- { \bool_set_false:N \g__nju_opt_academic_bool },
+ { \bool_gset_false:N \g__nju_opt_academic_bool },
degree .initial:n = academic,
- nl-cover .bool_set:N = \g__nju_opt_nlcover_bool,
+ nl-cover .bool_gset:N = \g__nju_opt_nlcover_bool,
nl-cover .initial:n = false,
- decl-page .bool_set:N = \g__nju_opt_decl_bool,
+ decl-page .bool_gset:N = \g__nju_opt_decl_bool,
decl-page .initial:n = false,
- draft .bool_gset:N = \g__nju_opt_draft_bool,
- draft .initial:n = false,
+ draft .value_forbidden:n = true,
+ draft .code:n =
+ {
+ \bool_gset_true:N \g__nju_opt_draft_bool
+ \__nju_pass_option:
+ },
oneside .value_forbidden:n = true,
twoside .value_forbidden:n = true,
- oneside .bool_gset_inverse:N = \g__nju_opt_twoside_bool,
- anonymous .bool_set:N = \g__nju_opt_anon_bool,
+ oneside .code:n =
+ {
+ \bool_gset_false:N \g__nju_opt_twoside_bool
+ \tl_gset:Nn \g__nju_name_pagemode_tl { oneside }
+ \__nju_pass_option:
+ },
+ twoside .code:n =
+ {
+ \bool_gset_true:N \g__nju_opt_twoside_bool
+ \tl_gset:Nn \g__nju_name_pagemode_tl { twoside }
+ \__nju_pass_option:
+ },
+ anonymous .bool_gset:N = \g__nju_opt_anon_bool,
anonymous .initial:n = false,
latin-font .choices:nn =
- { gyre, mac, win, none }
- { \tl_set_eq:NN \g__nju_font_latin_tl \l_keys_choice_tl },
+ { fandol, gyre, mac, macoffice, win, none }
+ { \tl_gset:Nn \g__nju_font_latin_tl {#1} },
cjk-font .choices:nn =
- { fandol, founder, mac, noto, source, win, none }
- { \tl_set_eq:NN \g__nju_font_cjk_tl \l_keys_choice_tl },
+ { fandol, founder, mac, macoffice, noto, source, win, none }
+ { \tl_gset:Nn \g__nju_font_cjk_tl {#1} },
+ fontset .choices:nn =
+ { fandol, mac, macoffice, win, none }
+ { \keys_set:nn { nju } { latin-font = #1, cjk-font = #1 } },
math-font .choices:nn =
{
asana, cambria, fira, garamond, lm, libertinus, newcm,
stix, bonum, dejavu, pagella, schola, termes, xits, none
}
- { \tl_set_eq:NN \g__nju_font_math_tl \l_keys_choice_tl },
+ { \tl_gset_eq:NN \g__nju_font_math_tl \l_keys_choice_tl },
math-font .initial:n = xits,
font-path .code:n =
{
- \bool_set_true:N \g__nju_font_path_bool
- \tl_set_eq:NN \g__nju_font_path_tl \l_keys_value_tl
+ \bool_gset_true:N \g__nju_font_path_bool
+ \tl_gset_eq:NN \g__nju_font_path_tl \l_keys_value_tl
},
- zihao .tl_set:N = \g__nju_opt_zihao_tl,
+ zihao .code:n =
+ { \__nju_pass_option:n { zihao = #1 } },
zihao .initial:n = -4,
- linespread .tl_set:N = \g__nju_opt_linespread_tl,
+ linespread .code:n =
+ { \__nju_pass_option:n { linespread = #1 } },
linespread .initial:n = 1.625,
- config .clist_set:N = \g__nju_config_clist
+ config .clist_gset:N = \g__nju_config_clist
}
+\keys_set:nn { nju } { twoside }
\clist_new:N \g__nju_name_optional_pkg_clist
\cs_new_protected:Npn \__nju_define_pkg_keys:nnn #1#2#3
{
@@ -606,7 +643,7 @@
\bool_if:cT { g__nju_opt_load_ #2 _bool }
{ \RequirePackage {#1} }
}
- \clist_put_right:Nn \g__nju_name_optional_pkg_clist {#1}
+ \clist_gput_right:Nn \g__nju_name_optional_pkg_clist {#1}
}
\clist_map_inline:nn
{
@@ -629,11 +666,8 @@
}
}
\ProcessKeysOptions { nju }
-\bool_if:NTF \g__nju_opt_twoside_bool
- { \tl_const:Nn \c__nju_name_pagemode_tl { twoside } }
- { \tl_const:Nn \c__nju_name_pagemode_tl { oneside } }
\bool_if:NT \g__nju_opt_anon_bool
- { \bool_set_false:N \g__nju_opt_decl_bool }
+ { \bool_gset_false:N \g__nju_opt_decl_bool }
\clist_map_inline:nn
{
abstract, bib, image, footer, footnote, header,
@@ -659,12 +693,12 @@
}
\@onlypreamble \njusetup
\NewDocumentCommand \njusetformat { m m }
- { \tl_gset:cn { c__nju_fmt_ #1 _tl } {#2} }
+ { \__nju_define_fmt:nn {#1} {#2} }
\NewDocumentCommand \njusetlength { s m m }
{
\bool_if:nTF {#1}
- { \skip_gset:cn { c__nju_ #2 _skip } {#3} }
- { \dim_gset:cn { c__nju_ #2 _dim } {#3} }
+ { \skip_gset:cn { l__nju_ #2 _skip } {#3} }
+ { \dim_gset:cn { l__nju_ #2 _dim } {#3} }
}
\NewDocumentCommand \njusetname { s m O{} m }
{ \__nju_set_tokenlist:nnnnn {#1} {#2} {#3} {#4} { name } }
@@ -673,28 +707,23 @@
\cs_new_protected:Npn \__nju_set_tokenlist:nnnnn #1#2#3#4#5
{
\bool_if:nTF {#1}
- { \tl_set_eq:NN \l__nju_tmpb_tl \c__nju_name_suffix_en_tl }
+ { \tl_set_eq:NN \l__nju_tmpb_tl \l__nju_name_suffix_en_tl }
{ \tl_clear:N \l__nju_tmpb_tl }
- \tl_gset:cn { c__nju_ #5 _ #2 #3 \l__nju_tmpb_tl _tl } {#4}
+ \tl_gset:cn { l__nju_ #5 _ #2 #3 \l__nju_tmpb_tl _tl } {#4}
}
-\exp_args:Ne \PassOptionsToClass
+\__nju_pass_option:n
{
a4paper,
UTF8,
scheme = chinese,
- \c__nju_name_pagemode_tl,
- \bool_if:NT \g__nju_opt_draft_bool { draft, }
- linespread = \g__nju_opt_linespread_tl,
- fontset = none,
- zihao = \g__nju_opt_zihao_tl
+ fontset = none
}
- { ctexbook }
\clist_map_inline:nn
{
- { quiet } { xeCJK },
{ no-math } { fontspec },
{ perpage } { footmisc },
- { capitalise, nameinlink, noabbrev } { cleveref }
+ { capitalise, nameinlink, noabbrev } { cleveref },
+ { amsmath, thmmarks, noconfig } { ntheorem }
}
{ \PassOptionsToPackage #1 }
\LoadClass { ctexbook } [ 2018/04/01 ]
@@ -719,14 +748,10 @@
booktabs,
caption,
graphicx,
- hyperref
}
+\__nju_loadpkg_nthm:
+\RequirePackage { hyperref }
\__nju_loadpkg_cref:
-\bool_if:NT \g__nju_opt_load_nthm_bool
- {
- \PassOptionsToPackage { amsmath, thmmarks, noconfig } { ntheorem }
- \RequirePackage { ntheorem }
- }
\bool_if:NT \g__nju_opt_twoside_bool { \RequirePackage { emptypage } }
\sys_if_engine_xetex:T
{
@@ -778,46 +803,51 @@
}
\keys_define:nn { nju / info }
{
- title .tl_set:N = \g__nju_info_title_tl ,
+ title .tl_gset:N = \g__nju_info_title_tl ,
title .initial:n = { 空 } ,
- title* .tl_set:N = \g__nju_info_title_en_tl ,
+ title* .tl_gset:N = \g__nju_info_title_en_tl ,
title* .initial:n = { Empty } ,
- keywords .clist_set:N = \g__nju_info_keywords_clist ,
- keywords* .clist_set:N = \g__nju_info_keywords_en_clist ,
- grade .tl_set:N = \g__nju_info_grade_tl ,
- student-id .tl_set:N = \g__nju_info_id_tl ,
- author .tl_set:N = \g__nju_info_author_tl ,
- author* .tl_set:N = \g__nju_info_author_en_tl ,
- department .tl_set:N = \g__nju_info_dept_tl ,
- department* .tl_set:N = \g__nju_info_dept_en_tl ,
- major* .tl_set:N = \g__nju_info_major_en_tl ,
- field .tl_set:N = \g__nju_info_field_tl ,
- field* .tl_set:N = \g__nju_info_field_en_tl ,
+ keywords .clist_gset:N = \g__nju_info_keywords_clist ,
+ keywords* .clist_gset:N = \g__nju_info_keywords_en_clist ,
+ grade .tl_gset:N = \g__nju_info_grade_tl ,
+ student-id .tl_gset:N = \g__nju_info_id_tl ,
+ author .tl_gset:N = \g__nju_info_author_tl ,
+ author* .tl_gset:N = \g__nju_info_author_en_tl ,
+ department .tl_gset:N = \g__nju_info_dept_tl ,
+ department* .tl_gset:N = \g__nju_info_dept_en_tl ,
+ major* .tl_gset:N = \g__nju_info_major_en_tl ,
+ field .tl_gset:N = \g__nju_info_field_tl ,
+ field* .tl_gset:N = \g__nju_info_field_en_tl ,
major .code:n =
{
\bool_if:NTF \g__nju_opt_academic_bool
- { \clist_pop:NN \l_keys_value_tl \g__nju_info_major_tl }
{
- \clist_pop:NN \l_keys_value_tl \g__nju_info_majorc_tl
- \clist_pop:NNF \l_keys_value_tl \g__nju_info_major_tl
- { \tl_set_eq:NN \g__nju_info_major_tl \g__nju_info_majorc_tl }
+ \clist_pop:NN \l_keys_value_tl \l__nju_tmpa_tl
+ \tl_gset_eq:NN \g__nju_info_major_tl \l__nju_tmpa_tl
+ }
+ {
+ \clist_pop:NN \l_keys_value_tl \l__nju_tmpa_tl
+ \tl_gset_eq:NN \g__nju_info_majorc_tl \l__nju_tmpa_tl
+ \clist_pop:NNTF \l_keys_value_tl \l__nju_tmpa_tl
+ { \tl_gset_eq:NN \g__nju_info_major_tl \l__nju_tmpa_tl }
+ { \tl_gset_eq:NN \g__nju_info_major_tl \g__nju_info_majorc_tl }
}
},
- supervisor .clist_set:N = \g__nju_info_supv_clist ,
- supervisor* .tl_set:N = \g__nju_info_supv_en_tl ,
- supervisor-ii .clist_set:N = \g__nju_info_supvii_clist ,
- supervisor-ii* .tl_set:N = \g__nju_info_supvii_en_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 ,
- udc .tl_set:N = \g__nju_info_udc_tl ,
- secret-level .tl_set:N = \g__nju_info_secretlv_tl ,
- supervisor-contact .tl_set:N = \g__nju_info_supvcont_tl ,
- email .tl_set:N = \g__nju_info_email_tl ,
- school-code .tl_set:N = \g__nju_info_code_tl ,
+ supervisor .clist_gset:N = \g__nju_info_supv_clist ,
+ supervisor* .tl_gset:N = \g__nju_info_supv_en_tl ,
+ supervisor-ii .clist_gset:N = \g__nju_info_supvii_clist ,
+ supervisor-ii* .tl_gset:N = \g__nju_info_supvii_en_tl ,
+ chairman .tl_gset:N = \g__nju_info_chairman_tl ,
+ reviewer .clist_gset:N = \g__nju_info_reviewer_clist ,
+ clc .tl_gset:N = \g__nju_info_clc_tl ,
+ udc .tl_gset:N = \g__nju_info_udc_tl ,
+ secret-level .tl_gset:N = \g__nju_info_secretlv_tl ,
+ supervisor-contact .tl_gset:N = \g__nju_info_supvcont_tl ,
+ email .tl_gset:N = \g__nju_info_email_tl ,
+ school-code .tl_gset:N = \g__nju_info_code_tl ,
school-code .initial:n = { 10284 } ,
- degree .tl_set:N = \g__nju_info_degree_tl ,
- degree* .tl_set:N = \g__nju_info_degree_en_tl ,
+ degree .tl_gset:N = \g__nju_info_degree_tl ,
+ degree* .tl_gset:N = \g__nju_info_degree_en_tl ,
}
\clist_map_inline:nn { submit, defend, confer, bottom }
{
@@ -833,15 +863,15 @@
{ \keys_define:nn { nju / info } { #1 * .groups:n = { anonymous } } }
\__nju_at_begin_document:n
{
- \tl_set:Ne \g__nju_info_supvfull_tl
- { \clist_use:Nn \g__nju_info_supv_clist { \__nju_hskip: } }
+ \tl_gset:Ne \g__nju_info_supvfull_tl
+ { \clist_use:Nn \g__nju_info_supv_clist { \__nju_quad: } }
\clist_if_empty:NF \g__nju_info_supvii_clist
{
\bool_gset_true:N \g__nju_opt_supvii_bool
\tl_gput_right:Ne \g__nju_info_supvfull_tl
- { \__nju_quad: \clist_use:Nn \g__nju_info_supvii_clist { \__nju_hskip: } }
+ { \__nju_quad: \clist_use:Nn \g__nju_info_supvii_clist { \__nju_quad: } }
}
- \tl_set_eq:NN \g__nju_info_supvfull_en_tl \g__nju_info_supv_en_tl
+ \tl_gset_eq:NN \g__nju_info_supvfull_en_tl \g__nju_info_supv_en_tl
\tl_if_empty:NF \g__nju_info_supvii_en_tl
{
\tl_gput_right:Ne \g__nju_info_supvfull_en_tl
@@ -850,15 +880,27 @@
}
\bool_if:NT \g__nju_opt_anon_bool
{
- \tl_gclear:N \c__nju_name_nju_tl
- \tl_gclear:N \c__nju_name_nju_en_tl
+ \tl_clear:N \l__nju_name_nju_tl
+ \tl_clear:N \l__nju_name_nju_en_tl
+ }
+\tl_const:Nn \c__nju_path_macoffice_tl
+ { /Applications/Microsoft~ Word.app/Contents/Resources/DFonts/ }
+\sys_if_platform_windows:TF
+ { \tl_gset:Nn \g__nju_font_set_tl { win } }
+ {
+ \ctex_if_platform_macos:TF
+ {
+ \file_if_exist:nTF { \c__nju_path_macoffice_tl times.ttf }
+ { \tl_gset:Nn \g__nju_font_set_tl { macoffice } }
+ { \tl_gset:Nn \g__nju_font_set_tl { mac } }
+ }
+ { \tl_gset:Nn \g__nju_font_set_tl { fandol } }
}
-\ctex_detect_platform:
\tl_if_empty:NT \g__nju_font_latin_tl
- { \tl_gset_eq:NN \g__nju_font_latin_tl \g__ctex_fontset_tl }
+ { \tl_gset_eq:NN \g__nju_font_latin_tl \g__nju_font_set_tl }
\tl_if_empty:NT \g__nju_font_cjk_tl
- { \tl_gset_eq:NN \g__nju_font_cjk_tl \g__ctex_fontset_tl }
-\cs_new_protected:Npn \__nju_loadfont_latin:n #1
+ { \tl_gset_eq:NN \g__nju_font_cjk_tl \g__nju_font_set_tl }
+\cs_new:Npn \__nju_loadfont_latin:n #1
{
\__fontspec_main_setmainfont:nn { } { Times~New~Roman }
\__fontspec_main_setsansfont:nn { } { Arial }
@@ -876,6 +918,24 @@
{ \c__nju_name_gyrefeature_clist } { texgyretermes }
}
}
+\cs_new_protected:Npn \__nju_loadfont_latin_macoffice:
+ {
+ \__fontspec_main_setmainfont:nn
+ { \l__nju_name_macofficefeature_clist } { times }
+ \__fontspec_main_setsansfont:nn
+ { \l__nju_name_macofficefeature_clist } { arial }
+ \__fontspec_main_setmonofont:nn
+ { Scale = MatchLowercase } { Menlo }
+ }
+\clist_const:Nn \c__nju_name_macofficefeature_clist
+ {
+ Path = \c__nju_path_macoffice_tl,
+ Extension = .ttf,
+ UprightFont = *,
+ BoldFont = *bd,
+ ItalicFont = *i,
+ BoldItalicFont = *bi
+ }
\cs_new_protected:Npn \__nju_loadfont_latin_gyre:
{
\__fontspec_main_setmainfont:nn
@@ -890,6 +950,7 @@
}
{ texgyrecursor }
}
+\cs_new_eq:NN \__nju_loadfont_latin_fandol: \__nju_loadfont_latin_gyre:
\clist_const:Nn \c__nju_name_gyrefeature_clist
{
Extension = .otf,
@@ -909,6 +970,7 @@
\setCJKfamilyfont { zhhei } { SimHei } [#1]
\setCJKfamilyfont { zhfs } { FangSong } [#1]
\setCJKfamilyfont { zhkai } { KaiTi } [#1]
+ \__nju_stzhongs:n {#1}
}
\cs_new:Npn \__nju_loadfont_cjk_win:
{ \__nju_loadfont_cjk_win:N \c__nju_name_fakebold_tl }
@@ -928,6 +990,22 @@
\setCJKfamilyfont { zhfs } { STFangsong }
\setCJKfamilyfont { zhkai } { Kaiti~SC } [ BoldFont = Kaiti~SC~Bold ]
}
+\cs_new:Npn \__nju_loadfont_cjk_macoffice:n #1
+ {
+ \setCJKmainfont { Simsun.ttc } [ ItalicFont = Kaiti.ttf, #1 ]
+ \setCJKsansfont { SimHei.ttf } [#1]
+ \setCJKmonofont { Fangsong.ttf } [#1]
+ \setCJKfamilyfont { zhsong } { Simsun.ttc } [#1]
+ \setCJKfamilyfont { zhhei } { SimHei.ttf } [#1]
+ \setCJKfamilyfont { zhfs } { Fangsong.ttf } [#1]
+ \setCJKfamilyfont { zhkai } { Kaiti.ttf } [#1]
+ \__nju_stzhongs:nn { STZHONGS.ttf } {#1}
+ }
+\cs_new:Npn \__nju_loadfont_cjk_macoffice:
+ {
+ \__nju_loadfont_cjk_macoffice:n
+ { Path = \c__nju_path_macoffice_tl, \c__nju_name_fakebold_tl }
+ }
\cs_new_protected:Npn \__nju_loadfont_cjk_fandol:
{
\__nju_hide_no_script_msg:
@@ -1015,22 +1093,25 @@
ItalicFeatures = FakeSlant,
BoldItalicFeatures = FakeSlant
}
-\cs_new:Npn \__nju_loadfont_stzhongs:
+\cs_new:Npn \__nju_stzhongs:nn #1#2
+ { \newCJKfontfamily \__nju_stzhongs: {#1} [#2] }
+\cs_new:Npn \__nju_stzhongs:n { \__nju_stzhongs:nn { 华文中宋 } }
+\cs_new_protected:Npn \__nju_loadfont_stzhongs:
{
- \fontspec_font_if_exist:nTF { 华文中宋 }
+ \cs_if_exist_use:NF \__nju_stzhongs:
{
- \newCJKfontfamily \__nju_stzhongs: { 华文中宋 }
- [ \c__nju_name_fakebold_tl ]
- }
- {
- \bool_if:NTF \g__nju_font_path_bool
- {
- \newCJKfontfamily \__nju_stzhongs: { \c__nju_name_stzhongsfile_tl }
- [ Path = \g__nju_font_path_tl, \c__nju_name_fakebold_tl ]
- }
+ \fontspec_font_if_exist:nTF { 华文中宋 }
+ { \__nju_stzhongs:n { \c__nju_name_fakebold_tl } }
{
- \cs_set_eq:NN \__nju_stzhongs: \rmfamily
- \msg_warning:nn { njuthesis } { missing-stzhongs }
+ \bool_if:NTF \g__nju_font_path_bool
+ {
+ \__nju_stzhongs:nn { \l__nju_name_stzhongsfile_tl }
+ { Path = \g__nju_font_path_tl, \c__nju_name_fakebold_tl }
+ }
+ {
+ \cs_set_eq:NN \__nju_stzhongs: \rmfamily
+ \msg_warning:nn { njuthesis } { missing-stzhongs }
+ }
}
}
}
@@ -1131,9 +1212,6 @@
{ NewCMMono10 }
}
\__nju_cs_clear:N \__nju_loadfont_math_none:
-\cs_new_eq:NN \__nju_loadfont_latin_windows: \__nju_loadfont_latin_win:
-\cs_new_eq:NN \__nju_loadfont_latin_fandol: \__nju_loadfont_latin_gyre:
-\cs_new_eq:NN \__nju_loadfont_cjk_windows: \__nju_loadfont_cjk_win:
\cs_new_protected:Npn \__nju_loadfont:
{
\use:c { __nju_loadfont_latin_ \g__nju_font_latin_tl : }
@@ -1172,15 +1250,15 @@
\clist_new:N \g__nju_footer_clist
\ctex_at_end_preamble:n
{
- \clist_set_eq:Nc \g__nju_header_clist
- { g__nju_header_ \c__nju_name_pagemode_tl _clist }
- \clist_set_eq:Nc \g__nju_footer_clist
- { g__nju_footer_ \c__nju_name_pagemode_tl _clist }
+ \clist_gset_eq:Nc \g__nju_header_clist
+ { g__nju_header_ \g__nju_name_pagemode_tl _clist }
+ \clist_gset_eq:Nc \g__nju_footer_clist
+ { g__nju_footer_ \g__nju_name_pagemode_tl _clist }
}
\cs_new_protected:Npn \__nju_header:nn #1#2
- { \fancyhead [#1] { \c__nju_fmt_header_tl \nouppercase {#2} } }
+ { \fancyhead [#1] { \l__nju_fmt_header_tl \nouppercase {#2} } }
\cs_new_protected:Npn \__nju_footer:nn #1#2
- { \fancyfoot [#1] { \c__nju_fmt_footer_tl \nouppercase {#2} } }
+ { \fancyfoot [#1] { \l__nju_fmt_footer_tl \nouppercase {#2} } }
\fancypagestyle { plain }
{
\fancyhf { }
@@ -1207,30 +1285,29 @@
\RenewDocumentCommand \frontmatter { }
{
\cleardoublepage
- \exp_args:NV \pagestyle \c__nju_fmt_pagestyle_tl
+ \exp_args:NV \pagestyle \l__nju_fmt_pagestyle_tl
\pagenumbering { Roman }
}
\RenewDocumentCommand \mainmatter { }
{
\cleardoublepage
- \exp_args:NV \pagestyle \c__nju_fmt_pagestyle_tl
+ \exp_args:NV \pagestyle \l__nju_fmt_pagestyle_tl
\pagenumbering { arabic }
\normalfont \normalsize
}
\AtBeginEnvironment { document }
{
- \exp_args:NV \pagestyle \c__nju_fmt_pagestyle_tl
+ \exp_args:NV \pagestyle \l__nju_fmt_pagestyle_tl
\pagenumbering { Roman }
}
\cs_new:Npn \__nju_bookmark_toc:n #1
- { \addcontentsline { toc } { chapter } { \c__nju_fmt_chapterintoc_tl #1 } }
+ { \addcontentsline { toc } { chapter } { \l__nju_fmt_chapterintoc_tl #1 } }
\cs_generate_variant:Nn \__nju_bookmark_toc:n { V }
\cs_new:Npn \__nju_bookmark_toc:nn #1#2
{ \phantomsection \__nju_bookmark_toc:n {#1} }
-\cs_new:Npn \__nju_bookmark_pdf_nosec:nn #1#2
- { \pdfbookmark [0] {#1} {#2} }
-\cs_new:Npn \__nju_bookmark_pdf:nn #1#2
- { \phantomsection \__nju_bookmark_pdf_nosec:nn {#1} {#2} }
+\cs_new:Npn \__nju_bookmark_pdf_nosec:nn { \pdfbookmark [0] }
+\cs_new:Npn \__nju_bookmark_pdf:nn
+ { \phantomsection \__nju_bookmark_pdf_nosec:nn }
\cs_new:Npn \__nju_bookmark:Nnn #1#2#3
{
\bool_if:NTF #1
@@ -1256,24 +1333,24 @@
\NewDocumentCommand \njuchapter { m } { \__nju_chapter:n {#1} }
\keys_set:nn { ctex }
{
- chapter / beforeskip = \c__nju_chapterbefore_dim,
- chapter / afterskip = \c__nju_chapterafter_dim,
- chapter / format = \c__nju_fmt_chapter_tl,
- section / format = \c__nju_fmt_section_tl,
- subsection / format = \c__nju_fmt_subsection_tl,
- subsubsection / format = \c__nju_fmt_subsubsection_tl,
- paragraph / format = \c__nju_fmt_paragraph_tl,
- subparagraph / format = \c__nju_fmt_subparagraph_tl,
- contentsname = \c__nju_name_tableofcontents_tl,
- listfigurename = \c__nju_name_listoffigures_tl,
- listtablename = \c__nju_name_listoftables_tl,
- chapter / tocline = \c__nju_fmt_chapterintoc_tl \CTEXnumberline {#1} #2
+ chapter / beforeskip = \l__nju_chapterbefore_dim,
+ chapter / afterskip = \l__nju_chapterafter_dim,
+ chapter / format = \l__nju_fmt_chapter_tl,
+ section / format = \l__nju_fmt_section_tl,
+ subsection / format = \l__nju_fmt_subsection_tl,
+ subsubsection / format = \l__nju_fmt_subsubsection_tl,
+ paragraph / format = \l__nju_fmt_paragraph_tl,
+ subparagraph / format = \l__nju_fmt_subparagraph_tl,
+ contentsname = \l__nju_name_tableofcontents_tl,
+ listfigurename = \l__nju_name_listoffigures_tl,
+ listtablename = \l__nju_name_listoftables_tl,
+ chapter / tocline = \l__nju_fmt_chapterintoc_tl \CTEXnumberline {#1} #2
}
\cs_new_protected:Npn \__nju_make_toc:nn #1#2
{
\group_begin:
\keys_set:nn { ctex }
- { chapter/format = \c__nju_fmt_toctitle_tl }
+ { chapter/format = \l__nju_fmt_toctitle_tl }
\__nju_chapter:cnn { g__nju_ #2 _showentry_bool } {#1} {#2}
\group_end:
\@starttoc {#2}
@@ -1283,7 +1360,7 @@
{
\keys_define:nn { nju / #1 }
{
- toc-entry .bool_set:c = { g__nju_ #3 _showentry_bool },
+ toc-entry .bool_gset:c = { g__nju_ #3 _showentry_bool },
toc-entry .initial:n = true
}
\exp_args:Nc \RenewDocumentCommand {#1} { }
@@ -1300,8 +1377,8 @@
{
\bool_if:NF \g__nju_toc_showentry_bool
{
- \bool_set_false:N \g__nju_lof_showentry_bool
- \bool_set_false:N \g__nju_lot_showentry_bool
+ \bool_gset_false:N \g__nju_lof_showentry_bool
+ \bool_gset_false:N \g__nju_lot_showentry_bool
}
}
\keys_define:nn { nju / tableofcontents }
@@ -1336,10 +1413,7 @@
{ \clist_gput_right:Nn \g__nju_blx_option_clist { style = #1 } },
style .initial:n = numeric,
option .code:n =
- {
- \clist_gput_right:NV \g__nju_blx_option_clist
- \l_keys_value_tl
- },
+ { \clist_gput_right:NV \g__nju_blx_option_clist \l_keys_value_tl },
resource .code:n =
{ \clist_gput_right:NV \g__nju_blx_resource_clist \l_keys_value_tl },
}
@@ -1356,12 +1430,11 @@
}
\cs_new_protected:Npn \__nju_blx_post_setup:
{
- \defbibheading { njubibintoc } [ \bibname ] { \__nju_chapter:n { ##1 } }
+ \defbibheading { njubibintoc } [ \bibname ] { \__nju_chapter:n {##1} }
\tl_if_eq:NnTF \blx@refsecreset@level { 2 }
{ \DeclarePrintbibliographyDefaults { heading = subbibintoc } }
{ \DeclarePrintbibliographyDefaults { heading = njubibintoc } }
- \clist_map_inline:Nn \g__nju_blx_resource_clist
- { \addbibresource { ##1 } }
+ \clist_map_inline:Nn \g__nju_blx_resource_clist { \addbibresource {##1} }
}
\bool_if:NT \g__nju_opt_load_blx_bool
{
@@ -1372,24 +1445,28 @@
\__nju_blx_post_setup:
}
}
+\hypersetup
+ {
+ bookmarksnumbered = true,
+ psdextra = true,
+ unicode = true,
+ hidelinks
+ }
+\pdfstringdefDisableCommands
+ {
+ \clist_map_inline:nn
+ { \\, \quad, \qquad, \bigger }
+ { \__nju_cs_clear:N #1 }
+ \cs_set_eq:NN \zihao \use_none:n
+ }
\ctex_at_end_preamble:n
{
- \pdfstringdefDisableCommands
- {
- \clist_map_inline:nn
- { \\, \quad, \qquad, \bigger }
- { \__nju_cs_clear:N #1 }
- }
\hypersetup
{
- bookmarksnumbered = true,
- psdextra = true,
- unicode = true,
- hidelinks,
pdftitle = \g__nju_info_title_tl,
pdfauthor = \g__nju_info_author_tl,
pdfkeywords = \g__nju_info_keywords_clist,
- pdfcreator = \c__nju_name_pdfcreator_tl
+ pdfcreator = \l__nju_name_pdfcreator_tl
}
}
\cs_new:Npn \__nju_cref_name:n #1
@@ -1402,10 +1479,10 @@
\crefformat { section } { 第~#2#1#3~节 }
\crefformat { subsection } { 第~#2#1#3~小节 }
\crefformat { subsubsection } { 第~#2#1#3~小节 }
- \clist_map_inline:nn { figure, table, appendix, proof }
+ \clist_map_inline:nn { figure, table, appendix }
{ \__nju_cref_name:n {#1} }
}
-\clist_set:Nn \g__nju_fn_ctext_option_clist { charf = \scriptsize }
+\clist_gset:Nn \g__nju_fn_ctext_option_clist { charf = \scriptsize }
\keys_define:nn { nju / footnote }
{
style .choices:nn = { plain, pifont, circled, circled* }
@@ -1440,7 +1517,7 @@
\cs_set:Npn \__nju_fn_hang:
{
\int_set:Nn \tex_hangafter:D { 1 }
- \dim_set_eq:NN \tex_hangindent:D \c__nju_fnhang_dim
+ \dim_set_eq:NN \tex_hangindent:D \l__nju_fnhang_dim
}
},
hang / false .code:n = { \__nju_cs_clear:N \__nju_fn_hang: },
@@ -1463,7 +1540,7 @@
\cs_set:Npn \@makefntext #1
{
\mode_leave_vertical:
- \hbox_to_wd:nn { \c__nju_fnhang_dim } { \@thefnmark \tex_hfil:D }
+ \hbox_to_wd:nn { \l__nju_fnhang_dim } { \@thefnmark \tex_hfil:D }
\tex_penalty:D \@M
\__nju_fn_hang:
#1
@@ -1471,17 +1548,19 @@
}
\keys_define:nn { nju / image } { path .code:n = { \graphicspath {#1} } }
\DeclareGraphicsExtensions { .pdf, .eps, .jpg, .png }
-\BeforeBeginEnvironment { tabular } { \centering \c__nju_fmt_tabular_tl }
+\BeforeBeginEnvironment { tabular } { \centering \l__nju_fmt_tabular_tl }
\ctex_at_end_package:nn { tabularray }
{
\__tblr_use_lib_booktabs:
\tl_set:Nn \l__nju_tmpb_tl
- { , abovesep = 4 pt, stretch = 0.8, cells = { font = \c__nju_fmt_tabular_tl } }
+ { , abovesep = 4 pt, stretch = 0.8, cells = { font = \l__nju_fmt_tabular_tl } }
\tl_put_right:NV \l__tblr_default_tblr_inner_tl \l__nju_tmpb_tl
\tl_put_right:NV \l__tblr_default_talltblr_inner_tl \l__nju_tmpb_tl
- \tl_put_right:Nn \l__tblr_default_talltblr_outer_tl { , headsep = -4 pt }
+ \tl_put_right:NV \l__tblr_default_longtblr_inner_tl \l__nju_tmpb_tl
+ \tl_put_right:Nn \l__tblr_default_talltblr_outer_tl { , headsep = 12.63 pt }
+ \tl_put_right:Nn \l__tblr_default_longtblr_outer_tl { , headsep = 12.63 pt }
\DefTblrTemplate { caption-tag } { default }
- { \c__nju_name_table_tl \hspace { 0.25em } \thetable }
+ { \l__nju_name_table_tl \hspace { 0.25em } \thetable }
\DefTblrTemplate { caption-sep } { default } { \quad }
\DefTblrTemplate { firsthead } { caption }
{
@@ -1491,11 +1570,11 @@
\SetTblrTemplate { firsthead } { caption }
\SetTblrStyle { caption } { font = \normalfont \bfseries \small }
\SetTblrStyle { note } { font = \normalfont \footnotesize }
+ \SetTblrStyle { remark } { font = \normalfont \footnotesize }
}
\DeclareCaptionStyle{njucap}
{
- font = small,
- font += bf,
+ font = {small, bf},
labelsep = quad,
justification = centering
}
@@ -1506,7 +1585,7 @@
{
\keys_define:nn { nju / label-sep }
{
- #1 .tl_set:c = { g__nju_sep_ #1 _tl },
+ #1 .tl_gset:c = { g__nju_sep_ #1 _tl },
#1 .initial:n = { - }
}
\__nju_at_begin_document:n
@@ -1598,8 +1677,8 @@
\bool_new:N \g__nju_opt_math_leq_bool
\bool_new:N \g__nju_opt_math_vec_bool
\bool_if:NTF \g__nju_opt_load_um_bool
- { \tl_set_eq:NN \c__nju_name_integral_tl \l__um_nolimits_tl }
- { \tl_set_eq:NN \c__nju_name_integral_tl \c_empty_tl }
+ { \tl_set_eq:NN \l__nju_name_integral_tl \l__um_nolimits_tl }
+ { \tl_set_eq:NN \l__nju_name_integral_tl \c_empty_tl }
\bool_if:NTF \g__nju_opt_load_um_bool
{ \cs_new:Npn \__nju_um_setup:n #1 { \keys_set:nn { unicode-math } {#1} } }
{ \cs_new_eq:NN \__nju_um_setup:n \use_none:n }
@@ -1607,19 +1686,19 @@
{
integral .choice:,
integral / upright .code:n =
- { \bool_set_true:N \g__nju_opt_math_int_bool },
+ { \bool_gset_true:N \g__nju_opt_math_int_bool },
integral / slanted .code:n =
- { \bool_set_false:N \g__nju_opt_math_int_bool },
+ { \bool_gset_false:N \g__nju_opt_math_int_bool },
integral-limits .choice:,
integral-limits / true .code:n =
{ \tl_clear:N \l__um_nolimits_tl },
integral-limits / false .code:n =
- { \tl_set_eq:NN \l__um_nolimits_tl \c__nju_name_integral_tl },
+ { \tl_set_eq:NN \l__um_nolimits_tl \l__nju_name_integral_tl },
less-than-or-equal .choice:,
less-than-or-equal / slanted .code:n =
- { \bool_set_true:N \g__nju_opt_math_leq_bool },
+ { \bool_gset_true:N \g__nju_opt_math_leq_bool },
less-than-or-equal / horizontal .code:n =
- { \bool_set_false:N \g__nju_opt_math_leq_bool },
+ { \bool_gset_false:N \g__nju_opt_math_leq_bool },
math-ellipsis .choice:,
math-ellipsis / centered .code:n =
{
@@ -1640,9 +1719,9 @@
{ \bool_set_false:N \g__nju_opt_math_re_bool },
vector .choice:,
vector / boldfont .code:n =
- { \bool_set_true:N \g__nju_opt_math_vec_bool },
+ { \bool_gset_true:N \g__nju_opt_math_vec_bool },
vector / arrow .code:n =
- { \bool_set_false:N \g__nju_opt_math_vec_bool },
+ { \bool_gset_false:N \g__nju_opt_math_vec_bool },
uppercase-greek .choice:,
uppercase-greek / upright .code:n =
{ \__nju_um_setup:n { math-style = ISO } },
@@ -1751,60 +1830,58 @@
\pagenumbering { gobble }
\__nju_make_cover:
}
- \bool_if:NF \g__nju_opt_draft_bool
- {
- \bool_if:NT \g__nju_opt_decl_bool
- {
- \__nju_make_decl_i:
- \__nju_make_decl_ii:
- }
- }
+ \tl_gremove_all:Nn \g__nju_info_title_tl { \\ }
+ \tl_gremove_all:Nn \g__nju_info_title_en_tl { \\ }
+ \bool_lazy_and:nnT
+ { ! \g__nju_opt_draft_bool }
+ { \g__nju_opt_decl_bool }
+ { \__nju_make_decl_i: \__nju_make_decl_ii: }
\cleardoublepage
- \exp_args:NV \pagestyle \c__nju_fmt_pagestyle_tl
+ \exp_args:NV \pagestyle \l__nju_fmt_pagestyle_tl
\pagenumbering { Roman }
}
-\cs_new_protected:Npn \__nju_print_keywords:nn #1#2
+\cs_new_protected:Npn \__nju_print_keywords:nn
+ { \__nju_print_keywords:NNnn \l__nju_tmpa_tl \l__nju_tmpa_dim }
+\cs_new:Npn \__nju_print_keywords:NNnn #1#2#3#4
{
- \tl_set:Nv \l__nju_tmpa_tl { c__nju_name_keywords #1 _tl }
- \exp_args:NNv \tl_put_left:Nn
- \l__nju_tmpa_tl { c__nju_fmt_abslabel #1 _tl }
- \exp_args:NNv \tl_put_right:Nn
- \l__nju_tmpa_tl { c__nju_name_colon #1 _tl }
- \__nju_get_width:NV \l__nju_tmpa_dim \l__nju_tmpa_tl
- \list { \l__nju_tmpa_tl }
+ \tl_set:Nv #1 { l__nju_name_keywords #3 _tl }
+ \exp_args:NNv \tl_put_left:Nn #1 { l__nju_fmt_abslabel #3 _tl }
+ \exp_args:NNv \tl_put_right:Nn #1 { l__nju_name_colon #3 _tl }
+ \__nju_get_width:NV #2 #1
+ \list {#1}
{
- \labelwidth \l__nju_tmpa_dim
+ \labelwidth #2
\labelsep \c_zero_dim
\leftmargin \c_zero_dim
\rightmargin \c_zero_dim
- \advance \leftmargin \l__nju_tmpa_dim
+ \advance \leftmargin #2
\__nju_cs_clear:N \makelabel
}
- \item \clist_use:cn { g__nju_info_keywords #1 _clist } {#2}
+ \item \clist_use:cn { g__nju_info_keywords #3 _clist } {#4}
\endlist
}
\skip_new:N \g__nju_abs_title_left_skip
\keys_define:nn { nju / abstract }
{
- toc-entry .bool_set:N = \g__nju_abs_showentry_bool,
+ toc-entry .bool_gset:N = \g__nju_abs_showentry_bool,
toc-entry .initial:n = true,
- underline .bool_set:N = \g__nju_abs_underline_bool,
+ underline .bool_gset:N = \g__nju_abs_underline_bool,
underline .initial:n = true,
title-style .choice:,
title-style / strict .code:n =
{
- \bool_set_true:N \g__nju_abs_title_strict_bool
- \skip_set:Nn \g__nju_abs_title_left_skip { .5 em }
+ \bool_gset_true:N \g__nju_abs_title_strict_bool
+ \skip_gset:Nn \g__nju_abs_title_left_skip { .5 em }
},
title-style / centered .code:n =
{
- \bool_set_true:N \g__nju_abs_title_strict_bool
- \skip_set:Nn \g__nju_abs_title_left_skip { .5 em plus 1 fill }
+ \bool_gset_true:N \g__nju_abs_title_strict_bool
+ \skip_gset:Nn \g__nju_abs_title_left_skip { .5 em plus 1 fill }
},
title-style / natural .code:n =
{
- \bool_set_false:N \g__nju_abs_title_strict_bool
- \skip_set:Nn \g__nju_abs_title_left_skip { .5 em plus 1 fill }
+ \bool_gset_false:N \g__nju_abs_title_strict_bool
+ \skip_gset:Nn \g__nju_abs_title_left_skip { .5 em plus 1 fill }
},
title-style .initial:n = strict
}
@@ -1812,7 +1889,7 @@
{
\cleardoublepage
\thispagestyle { plain }
- \__nju_abs_bookmark:Vn \c__nju_name_abstracta_tl { abstract }
+ \__nju_abs_bookmark:Vn \l__nju_name_abstracta_tl { abstract }
\tl_gremove_all:Nn \g__nju_info_title_tl { \\ }
\__nju_make_abstract:
\group_begin: \kaishu \zihao { -4 } #1
@@ -1822,34 +1899,34 @@
{
\cleardoublepage
\thispagestyle { plain }
- \__nju_abs_bookmark:Vn \c__nju_name_abstracta_en_tl { abstract-en }
+ \__nju_abs_bookmark:Vn \l__nju_name_abstracta_en_tl { abstract-en }
\tl_gremove_all:Nn \g__nju_info_title_en_tl { \\ }
\__nju_make_abstract_en:
\group_begin: \zihao { -4 } #1
}
{ \__nju_print_keywords:nn { _en } { ;~ } \group_end: }
\NewDocumentEnvironment { preface } { +b }
- { \__nju_chapter:V \c__nju_name_preface_tl #1 }
+ { \__nju_chapter:V \l__nju_name_preface_tl #1 }
{ \cleardoublepage }
\NewDocumentEnvironment { acknowledgement } { +b }
{
\bool_if:NTF \g__nju_opt_anon_bool
- { \__nju_bookmark_toc:V \c__nju_name_acknowledgementa_tl }
- { \__nju_chapter:V \c__nju_name_acknowledgement_tl #1 }
+ { \__nju_bookmark_toc:V \l__nju_name_acknowledgementa_tl }
+ { \__nju_chapter:V \l__nju_name_acknowledgement_tl #1 }
}
{ \cleardoublepage }
\NewDocumentCommand \njupaperlist
- { O { \c__nju_name_paperlist_tl } m }
+ { O { \l__nju_name_paperlist_tl } m }
{
\group_begin:
\RenewDocumentCommand \mkbibnamegiven { m }
{ \ifitemannotation { thesisauthor }
- { \njuline { \bf ##1 } } { ##1 } }
+ { \njuline { \bf ##1 } } {##1} }
\RenewDocumentCommand \mkbibnamefamily { m }
{ \ifitemannotation { thesisauthor }
- { \njuline { \bf ##1 } } { ##1 } }
+ { \njuline { \bf ##1 } } {##1} }
\RenewDocumentCommand \mkbibdateshort { m m m }
- { \textbf { \thefield { ##1 } } }
+ { \textbf { \thefield {##1} } }
\newrefsection
\nocite {#2}
\printbibliography [ heading = subbibliography, title = #1 ]
@@ -1874,13 +1951,13 @@
}
\NewDocumentEnvironment { notation } { O { 10 em } O { 5 em } }
{
- \__nju_chapter:V \c__nju_name_notation_tl
+ \__nju_chapter:V \l__nju_name_notation_tl
\__nju_make_notation:nn {#1} {#2}
}
{ \endlist \cleardoublepage }
\NewDocumentEnvironment { notation* } { O { 10 em } O { 5 em } }
{
- \chapter * { \c__nju_name_notation_tl }
+ \chapter * { \l__nju_name_notation_tl }
\__nju_make_notation:nn {#1} {#2}
}
{ \endlist \cleardoublepage }