texlive[63538] Master/texmf-dist: njuthesis (10jun22)

commits+karl at tug.org commits+karl at tug.org
Fri Jun 10 23:09:33 CEST 2022


Revision: 63538
          http://tug.org/svn/texlive?view=revision&revision=63538
Author:   karl
Date:     2022-06-10 23:09:33 +0200 (Fri, 10 Jun 2022)
Log Message:
-----------
njuthesis (10jun22)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/njuthesis/njuthesis.pdf
    trunk/Master/texmf-dist/source/latex/njuthesis/njuthesis.dtx
    trunk/Master/texmf-dist/tex/latex/njuthesis/njuthesis-graduate.def
    trunk/Master/texmf-dist/tex/latex/njuthesis/njuthesis-undergraduate.def
    trunk/Master/texmf-dist/tex/latex/njuthesis/njuthesis.cls

Modified: trunk/Master/texmf-dist/doc/latex/njuthesis/njuthesis.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/njuthesis/njuthesis.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/njuthesis/njuthesis.dtx	2022-06-10 21:08:52 UTC (rev 63537)
+++ trunk/Master/texmf-dist/source/latex/njuthesis/njuthesis.dtx	2022-06-10 21:09:33 UTC (rev 63538)
@@ -118,7 +118,7 @@
 %<*!(driver|install)>
 % ^^A 诚耀百廿,雄创一流
 % ^^A 南京大学一百二十周年华诞邀您共襄盛举!
-%<+!driver>\GetIdInfo $Id: njuthesis.dtx 0.19.0 2022-05-23 11:33:00 +0800 NJU LUG <git+nju-lug-email-3104-issue- at yaoge123.cn>$
+%<+!driver>\GetIdInfo $Id: njuthesis.dtx 0.20.0 2022-06-10 14:42:00 +0800 NJU LUG <git+nju-lug-email-3104-issue- at yaoge123.cn>$
 %<class>  {Thesis template for Nanjing University}
 %<class>\ProvidesExplClass{njuthesis}
 %<definition-ug>  {Undergraduate definition file for njuthesis}
@@ -210,7 +210,7 @@
 % \thanks{E-mail: \href{mailto:git+nju-lug-email-3104-issue- at yaoge123.cn}
 %   {git+nju-lug-email-3104-issue- at yaoge123.cn}}}
 %
-% \date{v0.19.0 \quad 2022-05-23}
+% \date{v0.20.0 \quad 2022-06-10}
 %
 % \changes{v0.1}{2021/09/04}{开始开发。}
 % \changes{v0.2}{2021/09/07}{初步搭建了可用的模板。}
@@ -236,6 +236,7 @@
 % \changes{v0.16}{2022/03/01}{分离本科生和研究生模板配置。}
 % \changes{v0.19}{2022/05/23}{对研究生普通封面进行若干细节修改。}
 % \changes{v0.19}{2022/05/23}{对国家图书馆封面进行若干细节修改。}
+% \changes{v0.20}{2022/06/08}{更正本科生模板部分字样。}
 %
 %
 % \maketitle
@@ -821,8 +822,8 @@
 % 通过此项,对于本科生模板可在封面后添加的诚信承诺书,
 % 对于研究生模板可在封面后添加原创性声明,并且在最后一页添加学位论文出版授权书。
 %
-% 对于需要手动插入承诺书扫描页的情况,可以在导言区载入 \pkg{pdfpages} 宏包,
-% 并在所需位置使用该宏包提供的 \cs{includepdf} 命令。
+% 对于需要手动插入承诺书扫描页的情况,可以在导言区载入 \pkg{pdfpages} 宏包
+% \cite{pdfpages},并在所需位置使用该宏包提供的 \cs{includepdf} 命令。
 % 例如,可以用如下所示的命令插入扫描件的第一页,并插入紧随的一个空白页。
 % \begin{latexexample}[moretexcs={\includepdf},emph={[2]pages}]
 %   \includepdf[pages={1,{}}]{scanned.pdf}
@@ -1107,7 +1108,9 @@
 %   \begin{syntax}
 %     submit-date = \Arg{yyyy-mm-dd}
 %   \end{syntax}
-% 提交日期。中英文日期现在可以由 ISO 日期格式\cite{gb-t-7408-2005}的字符串统一生成。如果留空,则自动使用编译当天日期。
+% 提交日期。中英文日期现在可以由 ISO 日期格式\cite{gb-t-7408-2005}
+% 的字符串统一生成。如果在等号后留空,则原本中文日期处使用空白的年月日字样;
+% 如果不添加此设置项,则自动使用编译当天日期。
 % \end{function}
 %
 % \begin{function}[updated=2022-01-14]{info/defend-date}
@@ -1124,7 +1127,7 @@
 % 学位授予日期,只用于国家图书馆封面,要求同提交日期。
 % \end{function}
 %
-% \begin{function}[updated=2021-05-23]{info/bottom-date}
+% \begin{function}[updated=2022-05-23]{info/bottom-date}
 %   \begin{syntax}
 %     bottom-date = \Arg{yyyy-mm-dd}
 %   \end{syntax}
@@ -1131,13 +1134,13 @@
 % 底部日期,只用于国家图书馆封面,要求同提交日期。
 % \end{function}
 %
-% \begin{function}[updated=2021-10-01]{info/chairman,info/reviewer}
+% \begin{function}[updated=2022-05-27]{info/chairman,info/reviewer}
 %   \begin{syntax}
-%     chairman = \Arg{答辩主席}
-%     reviewer = \Arg{评委姓名职称}
+%     chairman = \Arg{答辩主席姓名职称}
+%     reviewer = \Arg{答辩评委姓名职称}
 %   \end{syntax}
-% 答辩委员会信息,分别为评审委员会主席及四位成员的姓名加职称,只对研究生有效。
-% 四位评审成员是以列表的形式存储的,填写方法同关键词。
+% 答辩委员会信息,分别为评审委员会主席及成员的姓名加职称,只对研究生有效。
+% 评审成员名单以逗号分隔的列表形式存储,填写方法同关键词。
 % 如果是盲审,填入“盲审”二字即可。
 % \end{function}
 %
@@ -2307,7 +2310,7 @@
 % \urlprefix\CTANurl[文档:]{macros/latex/contrib/listings/listings.pdf}
 %
 % \bibitem{njuvisual}
-% \textsc{Yu Xiong}.
+% \textsc{Xiong Y}.
 % \newblock \textit{Display logos related to Nanjing University} [EB/OL].
 % \newblock version 0.2.1,
 % \newblock (2022-01-09)
@@ -2314,6 +2317,14 @@
 % \urlprefix\url{https://ctan.org/pkg/njuvisual}
 % \urlprefix\CTANurl[文档:]{macros/latex/contrib/njuvisual/njuvisual.pdf}
 %
+% \bibitem{pdfpages}
+% \textsc{Matthias A}.
+% \newblock \textit{Include PDF documents in \hologo{LaTeX}} [EB/OL].
+% \newblock version 0.5v,
+% \newblock (2022-05-22)
+% \urlprefix\url{https://www.ctan.org/pkg/pdfpages}
+% \urlprefix\CTANurl[文档:]{macros/latex/contrib/pdfpages/pdfpages.pdf}
+%
 % \bibitem{siunitx}
 % \textsc{Wright J}.
 % \newblock \textit{A comprehensive (SI) units package} [EB/OL].
@@ -2485,9 +2496,12 @@
 %
 % 在变量名称中,|l| 代表局部变量,|g| 代表全局变量,|c| 代表常量,最后一个下划线后的内容指示其类型。
 %
-% \begin{variable}{\l_@@_tmp_box,\l_@@_tmp_clist,
-%   \l_@@_tmpa_dim,\l_@@_tmpb_dim,\l_@@_tmp_int,
-%   \l_@@_tmp_seq,\l_@@_tmpa_tl,\l_@@_tmpb_tl}
+% \begin{variable}{
+%   \l_@@_tmp_box,
+%   \l_@@_tmp_clist,
+%   \l_@@_tmpa_dim,\l_@@_tmpb_dim,
+%   \l_@@_tmpa_int,\l_@@_tmpb_int,
+%   \l_@@_tmpa_tl,\l_@@_tmpb_tl}
 % 临时变量。
 %    \begin{macrocode}
 \box_new:N   \l_@@_tmp_box
@@ -2494,8 +2508,8 @@
 \clist_new:N \l_@@_tmp_clist
 \dim_new:N   \l_@@_tmpa_dim
 \dim_new:N   \l_@@_tmpb_dim
-\int_new:N   \l_@@_tmp_int
-\seq_new:N   \l_@@_tmp_seq
+\int_new:N   \l_@@_tmpa_int
+\int_new:N   \l_@@_tmpb_int
 \tl_new:N    \l_@@_tmpa_tl
 \tl_new:N    \l_@@_tmpb_tl
 %    \end{macrocode}
@@ -2740,16 +2754,11 @@
       {
         \dim_compare:nTF { \l_@@_tmpa_dim > #1 }
           {
-            \hfil
             \scalebox
               { \dim_to_decimal_in_unit:nn { #1 } { \l_@@_tmpa_dim } }
               [ 1.0 ] { #2 #3 }
-            \hfil
           }
-          {
-            \hbox_to_wd:nn { #1 }
-              { #2 \tl_map_inline:nn { #3 } { ##1 \hfil } \unskip }
-          }
+          { #2 \tl_map_inline:nn { #3 } { ##1 \hfil } \unskip }
       }
   }
 \cs_generate_variant:Nn \@@_spread_box:nnn { nnV }
@@ -2757,22 +2766,26 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \begin{macro}{\@@_multiline_box:NNnn}
+% \begin{macro}{\@@_multiline_box:NNNn}
 % 多行固定长度的下划线内容,用于国家图书馆封面。
 % \begin{arguments}
 %   \item 用于循环的 |int| 型变量
+%   \item 用于存储条目数量的 |int| 型变量
 %   \item 内容,|clist| 型变量
-%   \item 行数
 %   \item 宽度,|dim| 型变量
 % \end{arguments}
+% 默认绘制 4 条下划线。在评阅者人数超过 4 人时添加额外的条目。
 %    \begin{macrocode}
-\cs_new_protected:Npn \@@_multiline_box:NNnn #1#2#3#4
+\cs_new_protected:Npn \@@_multiline_box:NNNn #1#2#3#4
   {
     \int_set:Nn #1 { 1 }
-    \int_do_until:nn { #1 > #3 }
+    \int_set:Nn #2 { \clist_count:N #3 }
+    \int_compare:nF { #2 > 4 }
+      { \int_set:Nn #2 { 4 } }
+    \int_do_until:nn { #1 > #2 }
       {
         \@@_ulined_center_box:nn { #4 }
-          { \clist_item:Nn #2 { #1 } } \\
+          { \clist_item:Nn #3 { #1 } } \\
         \int_incr:N #1
       }
   }
@@ -2887,9 +2900,12 @@
 %   \item 月份
 %   \item 日期
 % \end{arguments}
-% 中文日期表示通过封装 \pkg{zhnumber} 的内部函数实现;英文日期表示通过用于研究生英文封面。其中,变量类型 |w| 表明参数符合特定语法格式。
+% 中文日期字样通过封装 \pkg{zhnumber} 的内部函数实现,默认使用阿拉伯数字表示,
+% 可以通过该宏包提供的 |\zhnumsetup{time=Chinese}| 来使用中文数字;
+% 英文日期字样用于研究生英文封面,格式为 \meta{月份缩写}~\meta{日},~\meta{年}。
+% 其中,变量类型 |w| 表明参数符合特定语法格式,其参数必须经过完全展开。
 %    \begin{macrocode}
-\cs_new:Npn \@@_date:www #1-#2-#3 \q_stop
+\cs_new:Npn \@@_date:www    #1-#2-#3 \q_stop
   { \__zhnum_date_aux:nnn { #1 } { #2 } { #3 } }
 \cs_new:Npn \@@_date_en:www #1-#2-#3 \q_stop
   { \clist_item:Nn \c_@@_month_en_clist { #2 } ~#3 , ~#1  }
@@ -2897,26 +2913,32 @@
 % \end{macro}
 %
 % \begin{macro}{\@@_date:n,\@@_date_en:n}
-% 封装 ISO 日期格式字符串的转化命令,该字符串需要进行展开。
+% 从 ISO 格式的日期字符串生成中英文日期文本。
 %    \begin{macrocode}
-\cs_new_protected:Npn \@@_date:n #1
+\cs_new_protected:Npn \@@_date:n    #1 { \@@_date:nn { #1 } {     } }
+\cs_new_protected:Npn \@@_date_en:n #1 { \@@_date:nn { #1 } { _en } }
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\exp_last_unbraced:cV,\@@_date:nn}
+% \changes{v0.20}{2022/05/24}{可在日期项留空以使用空白的年月日字样。}
+% 用于日期格式转化的辅助命令。在传入的字符串为空时生成空白字样。
+%    \begin{macrocode}
+\cs_generate_variant:Nn \exp_last_unbraced:NV { cV }
+\cs_new_protected:Npn \@@_date:nn #1#2
   {
-    \tl_new:c  { g_@@_info_ #1 date_tl }
-    \tl_set:cn { g_@@_info_ #1 date_tl }
+    \tl_set:Nv \l_@@_tmpa_tl { g_@@_info_ #1 date_raw_tl }
+    \tl_new:c  { g_@@_info_ #1 date #2 _tl }
+    \tl_set:cx { g_@@_info_ #1 date #2 _tl }
       {
-        \exp_last_unbraced:Nv
-          \@@_date:www { g_@@_info_ #1 date_raw_tl } \q_stop
+        \tl_if_empty:NTF \l_@@_tmpa_tl
+          { \@@_name:n { blankdate #2 } }
+%    \end{macrocode}
+% |w| 后的参数需要使用非括号包裹的形式完全展开。
+%    \begin{macrocode}
+          { \exp_last_unbraced:cV { @@_date #2 :www } \l_@@_tmpa_tl \q_stop }
       }
   }
-\cs_new_protected:Npn \@@_date_en:n #1
-  {
-    \tl_new:c  { g_@@_info_ #1 date_en_tl }
-    \tl_set:cn { g_@@_info_ #1 date_en_tl }
-      {
-        \exp_last_unbraced:Nv
-          \@@_date:www { g_@@_info_ #1 date_raw_tl } \q_stop
-      }
-  }
 %    \end{macrocode}
 % \end{macro}
 %
@@ -3054,9 +3076,9 @@
 % 此时 \cs{njuemblem}、\cs{njuname} 和相关长度都是没有定义的。
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_emblem:N #1
-  { \njuemblem [ black ] { #1 } { ! } }
+  { \njuemblem [ \c_@@_fmt_emblemcolor_tl ] { #1 } { ! } }
 \cs_new_protected:Npn \@@_name:N   #1
-  { \njuname   [ black ] { #1 } { ! } }
+  { \njuname   [ \c_@@_fmt_namecolor_tl   ] { #1 } { ! } }
 %    \end{macrocode}
 % \end{macro}
 %
@@ -3133,12 +3155,12 @@
     \setbox0 = \vbox{\hangindent=\wd\l_@@_tmp_box \hangafter=-1
         \leftskip=#3 \rightskip=\leftskip \parindent=\z@ #2\par
         \global\setbox2=\hbox{}
-        \int_gzero:N \l_@@_tmp_int
+        \int_gzero:N \l_@@_tmpa_int
         \loop
           \setbox1=\lastbox \unskip\unpenalty
         \unless\ifvoid1
           \global\setbox2=\hbox{\@@_uline_box:\penalty0\unhbox2}
-          \int_gincr:N \l_@@_tmp_int
+          \int_gincr:N \l_@@_tmpa_int
         \repeat
       }
       {
@@ -3151,7 +3173,7 @@
 %    \begin{macrocode}
         \bool_if:NT \g_@@_strict_abs_title_bool
           {
-            \int_case:nnF { \l_@@_tmp_int }
+            \int_case:nnF { \l_@@_tmpa_int }
               {
                 { 0 } { \msg_error:nn { njuthesis } { missing-title } }
                 { 1 } { \@@_uline:n { \textwidth } }
@@ -3444,7 +3466,10 @@
 %
 % \begin{macro}{\njusetformat}
 % \changes{v0.17}{2022/04/09}{提供修改默认样式的接口。}
-% 定义修改固定文本的接口。
+% \changes{v0.19}{2022/05/11}{提供默认页面样式的修改方式。}
+% \changes{v0.20}{2022/05/25}{提供页眉页脚样式的修改方式。}
+% \changes{v0.20}{2022/05/25}{提供内置校名校徽颜色的修改方式。}
+% 定义修改默认样式的接口。
 %    \begin{macrocode}
 \NewDocumentCommand \njusetformat { m m }
   { \tl_gset:cn { c_@@_fmt_ #1 _tl } { #2 } }
@@ -3453,6 +3478,7 @@
 %
 % \begin{macro}{\njusetlength,\njusetlength*}
 % \changes{v0.17}{2022/04/09}{提供修改长度值的接口。}
+% \changes{v0.18}{2022/04/20}{统一管理校名校徽尺寸。}
 % 定义修改长度值的接口。可选星号表示修改弹性长度。
 %    \begin{macrocode}
 \NewDocumentCommand \njusetlength { s m m }
@@ -3873,34 +3899,6 @@
   { \tl_set:Nn \g_@@_info_diploma_tl { g  } }
 %    \end{macrocode}
 %
-% 设置类型信息。
-%    \begin{macrocode}
-\tl_set:Nx \g_@@_info_type_tl
-  { \clist_item:Nn \c_@@_name_type_clist    { \g_@@_info_type_int } }
-\tl_set:Nx \g_@@_info_type_en_tl
-  { \clist_item:Nn \c_@@_name_type_en_clist { \g_@@_info_type_int } }
-\tl_put_left:Nx \g_@@_info_type_tl
-  { \tl_use:c { c_@@_name_ \g_@@_info_diploma_tl _tl } }
-%    \end{macrocode}
-%
-% 盲审模式下抹去个人信息和学校名称。
-%    \begin{macrocode}
-\bool_if:NT \g_@@_blind_bool
-  {
-    \ctex_at_end_preamble:n
-      {
-        \clist_map_inline:Nn \c_@@_blind_info_clist
-          { \tl_gclear:c    { g_@@_info_ #1    _tl } }
-        \clist_map_inline:Nn \c_@@_blind_info_en_clist
-          { \tl_gclear:c    { g_@@_info_ #1 _en_tl } }
-        \clist_map_inline:Nn \c_@@_blind_infolist_clist
-          { \clist_gclear:c { g_@@_info_ #1 _clist } }
-        \tl_gclear:N \c_@@_name_nju_tl
-        \tl_gclear:N \c_@@_name_nju_en_tl
-      }
-  }
-%    \end{macrocode}
-%
 % \changes{v0.15}{2022/01/22}{正确处理双导师信息。}
 % 在导言区录入用户信息后进行变量设置。此处使用到了 \pkg{ctex} 提供的命令,
 % 应当位于载入文档类之后。
@@ -3908,6 +3906,15 @@
 \ctex_at_end_preamble:n
   {
 %    \end{macrocode}
+% 设置类型信息。
+%    \begin{macrocode}
+    \tl_set:Nx \g_@@_info_type_tl
+      { \clist_item:Nn \c_@@_name_type_clist    { \g_@@_info_type_int } }
+    \tl_set:Nx \g_@@_info_type_en_tl
+      { \clist_item:Nn \c_@@_name_type_en_clist { \g_@@_info_type_int } }
+    \tl_put_left:Nx \g_@@_info_type_tl
+      { \tl_use:c { c_@@_name_ \g_@@_info_diploma_tl _tl } }
+%    \end{macrocode}
 % 拼合双导师的姓名和职称。
 %    \begin{macrocode}
     \bool_set:Nn \l_@@_second_supv_bool
@@ -3965,7 +3972,25 @@
 %    \end{macrocode}
 % \end{variable}
 %
+% 盲审模式下抹去个人信息和学校名称。
+%    \begin{macrocode}
+\bool_if:NT \g_@@_blind_bool
+  {
+    \ctex_at_end_preamble:n
+      {
+        \clist_map_inline:Nn \c_@@_blind_info_clist
+          { \tl_gclear:c    { g_@@_info_ #1    _tl } }
+        \clist_map_inline:Nn \c_@@_blind_info_en_clist
+          { \tl_gclear:c    { g_@@_info_ #1 _en_tl } }
+        \clist_map_inline:Nn \c_@@_blind_infolist_clist
+          { \clist_gclear:c { g_@@_info_ #1 _clist } }
+        \tl_gclear:N \c_@@_name_nju_tl
+        \tl_gclear:N \c_@@_name_nju_en_tl
+      }
+  }
+%    \end{macrocode}
 %
+%
 % \subsection{字体设置}
 %
 % \pkg{fontspec} 包含于 \pkg{ctex} 宏集,无需另行载入。
@@ -4331,7 +4356,7 @@
 %
 %
 % \subsubsection{页眉页脚}
-% ^^A TODO: 将页眉页脚样式改为使用 \njusetformat 修改
+% ^^A TODO: 删除 header/format 和 footer/format
 % 提供设置页眉页脚的用户接口。在 \cs{fancyhead} 的可选参数中,
 % \opt{E} 和 \opt{O} 分别表示在偶数页(even)和奇数页(odd),
 % 而 \opt{L}、\opt{R} 和 \opt{C} 则分别表示左(left)、右
@@ -4345,8 +4370,7 @@
 % \changes{v0.16}{2022/03/18}{可手动指定页眉样式。}
 % 页眉格式。
 %    \begin{macrocode}
-    header/format .tl_gset:N = \g_@@_header_format_tl,
-    header/format .initial:n = \small \kaishu,
+    header/format .tl_gset:N = \c_@@_fmt_header_tl,
 %    \end{macrocode}
 % \end{macro}
 %
@@ -4372,8 +4396,7 @@
 % \changes{v0.16}{2022/03/19}{可手动指定页脚样式。}
 % 页脚格式。
 %    \begin{macrocode}
-    footer/format .tl_gset:N = \g_@@_footer_format_tl,
-    footer/format .initial:n = \small \rmfamily,
+    footer/format .tl_gset:N = \c_@@_fmt_footer_tl,
 %    \end{macrocode}
 % \end{macro}
 %
@@ -4418,9 +4441,9 @@
 % 对 \pkg{fancyhdr} 的命令进行包装,便于设置页眉页脚。
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_header:nn #1#2
-  { \fancyhead [#1] { \g_@@_header_format_tl \nouppercase {#2} } }
+  { \fancyhead [#1] { \c_@@_fmt_header_tl \nouppercase {#2} } }
 \cs_new_protected:Npn \@@_footer:nn #1#2
-  { \fancyfoot [#1] { \g_@@_footer_format_tl \nouppercase {#2} } }
+  { \fancyfoot [#1] { \c_@@_fmt_footer_tl \nouppercase {#2} } }
 %    \end{macrocode}
 % \end{macro}
 %
@@ -5382,7 +5405,7 @@
 %    \begin{macrocode}
 \@@_declare_element:nn { cover / nl / bottom }
   {
-    content     = \@@_cover_bottom_nl:n { 4 },
+    content     = \@@_cover_bottom_nl:,
     bottom-skip = 1 cm,
     align       = r
   }
@@ -5454,17 +5477,18 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \begin{macro}{\@@_cover_bottom_nl:n}
+% \begin{macro}{\@@_cover_bottom_nl:}
 % \changes{v0.19}{2022/05/20}{将国家图书馆封面的评审委员会人数分离为单独参数。}
+% \changes{v0.20}{2022/05/27}{自动识别评审委员会人数。}
 % 国家图书馆封面底部信息。
 %    \begin{macrocode}
-\cs_new_protected:Npn \@@_cover_bottom_nl:n #1
+\cs_new_protected:Npn \@@_cover_bottom_nl:
   {
     \c_@@_name_chairman_tl \@@_hskip:
     \@@_ulined_center_box:nn { 9 em } { \g_@@_info_chairman_tl } \\
     \c_@@_name_reviewer_tl \@@_hskip:
-    \@@_multiline_box:NNnn \l_@@_tmp_int
-      \g_@@_info_reviewer_clist { #1 } { 9 em }
+    \@@_multiline_box:NNNn \l_@@_tmpa_int \l_@@_tmpb_int
+      \g_@@_info_reviewer_clist { 9 em }
   }
 %    \end{macrocode}
 % \end{macro}
@@ -5590,7 +5614,7 @@
 \cs_new_protected:Npn \@@_authdecl_sign_g:
   {
     \c_@@_name_authsign_tl \par
-    \c_@@_name_blankdate_tl
+    \c_@@_name_blankdate_a_tl
   }
 %    \end{macrocode}
 % \end{macro}
@@ -5720,6 +5744,7 @@
 % \begin{macro}{\@@_make_origdecl: }
 % \changes{v0.13}{2021/12/15}{加入本科生的诚信承诺书。}
 % \changes{v0.19}{2022/05/22}{跟进新版本科生诚信承诺书样式。}
+% ^^A TODO: 使用 xtemplate 重构
 % 生成本科生的诚信承诺书或研究生的学位论文原创性声明。
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_make_origdecl:
@@ -5743,6 +5768,7 @@
         { \@@_vskip: \@@_name:n { ##1 } : \@@_uline:n { 7 em } }
     \end{flushright}
     \vfil
+%<definition-ug>    \normalfont \normalsize
   }
 %    \end{macrocode}
 % \end{macro}
@@ -6081,6 +6107,7 @@
 %
 % \begin{macro}{\@@_print_keywords:nn}
 % \changes{v0.15}{2022/01/26}{为关键词列表添加悬挂缩进。}
+% \changes{v0.20}{2022/05/26}{修复英文关键词列表不整齐的缩进间距。}
 % 生成中英文关键词列表。
 % \begin{arguments}
 %   \item 语言,空置为中文,|_en| 为英文
@@ -6092,6 +6119,8 @@
   {
     \tl_set:Nv \l_@@_tmpa_tl { c_@@_name_keywords #1 _tl }
     \@@_get_text_width:NV \l_@@_tmpa_dim \l_@@_tmpa_tl
+    \dim_add:Nn \l_@@_tmpa_dim { 1 em }
+    \exp_args:NNv \tl_put_right:Nn \l_@@_tmpa_tl { c_@@_name_comma #1 _tl }
 %    \end{macrocode}
 % 关键词列表的悬挂缩进样式由 \tn{list} 环境产生。
 %    \begin{macrocode}
@@ -6263,7 +6292,7 @@
     \RenewDocumentCommand \mkbibdateshort { m m m }
       { \textbf { \thefield { ##1 } } }
 %    \end{macrocode}
-% 在使用章末参考文献表时,\env{refsection} 的单独一章范围内生效,
+% 在使用章末参考文献表时,\env{refsection} 在单独一章范围内生效,
 % 无需额外添加环境。 ^^A TODO: 待修改为更简洁的形式
 %    \begin{macrocode}
     \tl_if_eq:NnTF \blx at refsecreset@level { 2 }
@@ -6364,6 +6393,8 @@
 %
 % \subsubsection{名称}
 % \label{subsubsec:constant-name}
+% ^^A TODO: 将所有名称合并后使用 guard 进行本科生/研究生的区分
+% ^^A TODO: supv -> supvi, supv_ii -> supvii
 %
 % 由于同一名称在不同位置具有不同变体,本模板使用字母后缀名进行了区分,
 % 并在易混淆处添加了注释。
@@ -6399,9 +6430,13 @@
     % 用于小标题的摘要名称字样
     { abstract_b } { 摘\qquad{}要 } { ABSTRACT          },
     { appendix   } { 附录       } { appendix            },
+    { blankdate  } { \qquad{}年 \quad{}月 \quad{}日 } { },
+    { blankdate_a  } { \njuline{\qquad\qquad} 年
+            \njuline{\qquad} 月 \njuline{\qquad} 日 } { },
+    { comma      } { :         } { :~                  },
     { dept       } { 院系       } { DEPARTMENT          },
     { figure     } { 图         } { figure              },
-    { keywords   } { 关键词:   } { Keywords:~          },
+    { keywords   } { 关键词     } { Keywords            },
     { lang       } { 中文       } { 英文                },
     { nju        } { 南京大学   } { Nanjing~ University },
     { table      } { 表         } { table               }
@@ -6421,10 +6456,10 @@
                   本科毕业论文(设计) \\ 诚信承诺书 },
     { origsign    } { 作者签名                       },
     { submitdate  } { 提交日期                       },
-    { supv        } { 导师                           },
+    { supv        } { 指导教师                       },
     { title       } { 题目                           },
     { type        } { 本科生毕业论文(设计、作品)   },
-    { ug          } { 本科生                         }
+    { ug          } { 本科                           }
   }
   { \@@_define_name:nn #1 }
 \clist_map_inline:nn
@@ -6458,8 +6493,6 @@
     { author_a     }
       { \tl_item:Nn \g_@@_info_degree_tl { 1 } 士生姓名 },
     { authsign     } { 作者签名:\njuline{\hspace{6em}} },
-    { blankdate    } { \njuline{\qquad\qquad} 年
-                \njuline{\qquad} 月 \njuline{\qquad} 日 },
     % 用于摘要的作者名称字样
     { chairman     } { 答辩委员会主席:                 },
     { clc          } { 分类号                           },
@@ -6488,8 +6521,8 @@
     { secretstatus } { 论文涉密情况:                   },
     { secretfree   } { 不保密                           },
     { secretdate   }
-      { 保密,保密期( \c_@@_name_blankdate_tl 至
-                       \c_@@_name_blankdate_tl )       },
+      { 保密,保密期( \c_@@_name_blankdate_a_tl 至
+                       \c_@@_name_blankdate_a_tl )     },
     { sign         } { (签字)                         },
     { submitdate   } { 论文提交日期                     },
     { subtitle     } { (题名和副题名)                 },
@@ -6609,7 +6642,6 @@
 % \label{subsubsec:constant-length}
 %
 % \changes{v0.17}{2022/04/09}{将长度值分离到 \file{.def} 文件。}
-% \changes{v0.18}{2022/04/20}{统一管理校名校徽尺寸。}
 % 默认长度值。
 %    \begin{macrocode}
 \clist_map_inline:nn
@@ -6633,7 +6665,7 @@
 % \label{subsubsec:constant-format}
 %
 % \changes{v0.17}{2022/04/09}{将样式定义分离到 \file{.def} 文件。}
-% \changes{v0.19}{2022/05/11}{简化默认页面样式的修改方式。}
+% \changes{v0.20}{2022/05/28}{修复前一版本中错误的目录条目样式。}
 % 默认样式。
 %    \begin{macrocode}
 \clist_map_inline:nn
@@ -6640,7 +6672,9 @@
   {
 %<definition-ug>    { pagestyle     } { plain                             },
 %<definition-g>    { pagestyle     } { headings                          },
-    { section       } { \large \sffamily                  },
+    { emblemcolor   } { black                             },
+    { namecolor     } { black                             },
+    { section       } { \large \normalfont \sffamily      },
     { chapter       } { \c_@@_fmt_section_tl \centering   },
     { chapterintoc  } { \c_@@_fmt_section_tl              },
     { subsection    } { \c_@@_fmt_section_tl              },
@@ -6647,7 +6681,9 @@
     { subsubsection } { \c_@@_fmt_section_tl              },
     { paragraph     } { \c_@@_fmt_section_tl              },
     { subparagraph  } { \c_@@_fmt_section_tl              },
-    { toctitle      } { \centering \zihao { 3 } \bfseries }
+    { toctitle      } { \centering \zihao { 3 } \bfseries },
+    { header        } { \small \kaishu                    },
+    { footer        } { \small \rmfamily                  }
   }
   { \@@_define_fmt:nn #1 }
 %</(definition-ug|definition-g)>

Modified: trunk/Master/texmf-dist/tex/latex/njuthesis/njuthesis-graduate.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/njuthesis/njuthesis-graduate.def	2022-06-10 21:08:52 UTC (rev 63537)
+++ trunk/Master/texmf-dist/tex/latex/njuthesis/njuthesis-graduate.def	2022-06-10 21:09:33 UTC (rev 63538)
@@ -23,7 +23,7 @@
 %% To produce the documentation run the original source files ending with
 %% `.dtx' through XeTeX.
 %% 
-\GetIdInfo $Id: njuthesis.dtx 0.19.0 2022-05-23 11:33:00 +0800 NJU LUG <git+nju-lug-email-3104-issue- at yaoge123.cn>$
+\GetIdInfo $Id: njuthesis.dtx 0.20.0 2022-06-10 14:42:00 +0800 NJU LUG <git+nju-lug-email-3104-issue- at yaoge123.cn>$
   {Graduate definition file for njuthesis}
 \ProvidesExplFile{njuthesis-graduate.def}
   {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
@@ -150,7 +150,7 @@
   }
 \__nju_declare_element:nn { cover / nl / bottom }
   {
-    content     = \__nju_cover_bottom_nl:n { 4 },
+    content     = \__nju_cover_bottom_nl:,
     bottom-skip = 1 cm,
     align       = r
   }
@@ -193,13 +193,13 @@
     \__nju_uline_bientry:Nnnn \l__nju_tmpa_dim { defenddate  } { defenddate } { } \\
     \__nju_uline_entry:Nnnn   \l__nju_tmpa_dim { confer      } { confer     } { }
   }
-\cs_new_protected:Npn \__nju_cover_bottom_nl:n #1
+\cs_new_protected:Npn \__nju_cover_bottom_nl:
   {
     \c__nju_name_chairman_tl \__nju_hskip:
     \__nju_ulined_center_box:nn { 9 em } { \g__nju_info_chairman_tl } \\
     \c__nju_name_reviewer_tl \__nju_hskip:
-    \__nju_multiline_box:NNnn \l__nju_tmp_int
-      \g__nju_info_reviewer_clist { #1 } { 9 em }
+    \__nju_multiline_box:NNNn \l__nju_tmpa_int \l__nju_tmpb_int
+      \g__nju_info_reviewer_clist { 9 em }
   }
 \__nju_declare_element:nn { authdecl / g / title }
   {
@@ -275,7 +275,7 @@
 \cs_new_protected:Npn \__nju_authdecl_sign_g:
   {
     \c__nju_name_authsign_tl \par
-    \c__nju_name_blankdate_tl
+    \c__nju_name_blankdate_a_tl
   }
 \cs_new_protected:Npn \__nju_authdecl_secretlv_g:
   {
@@ -445,9 +445,13 @@
     % 用于小标题的摘要名称字样
     { abstract_b } { 摘\qquad{}要 } { ABSTRACT          },
     { appendix   } { 附录       } { appendix            },
+    { blankdate  } { \qquad{}年 \quad{}月 \quad{}日 } { },
+    { blankdate_a  } { \njuline{\qquad\qquad} 年
+            \njuline{\qquad} 月 \njuline{\qquad} 日 } { },
+    { comma      } { :         } { :~                  },
     { dept       } { 院系       } { DEPARTMENT          },
     { figure     } { 图         } { figure              },
-    { keywords   } { 关键词:   } { Keywords:~          },
+    { keywords   } { 关键词     } { Keywords            },
     { lang       } { 中文       } { 英文                },
     { nju        } { 南京大学   } { Nanjing~ University },
     { table      } { 表         } { table               }
@@ -460,8 +464,6 @@
     { author_a     }
       { \tl_item:Nn \g__nju_info_degree_tl { 1 } 士生姓名 },
     { authsign     } { 作者签名:\njuline{\hspace{6em}} },
-    { blankdate    } { \njuline{\qquad\qquad} 年
-                \njuline{\qquad} 月 \njuline{\qquad} 日 },
     % 用于摘要的作者名称字样
     { chairman     } { 答辩委员会主席:                 },
     { clc          } { 分类号                           },
@@ -490,8 +492,8 @@
     { secretstatus } { 论文涉密情况:                   },
     { secretfree   } { 不保密                           },
     { secretdate   }
-      { 保密,保密期( \c__nju_name_blankdate_tl 至
-                       \c__nju_name_blankdate_tl )       },
+      { 保密,保密期( \c__nju_name_blankdate_a_tl 至
+                       \c__nju_name_blankdate_a_tl )     },
     { sign         } { (签字)                         },
     { submitdate   } { 论文提交日期                     },
     { subtitle     } { (题名和副题名)                 },
@@ -577,7 +579,9 @@
 \clist_map_inline:nn
   {
     { pagestyle     } { headings                          },
-    { section       } { \large \sffamily                  },
+    { emblemcolor   } { black                             },
+    { namecolor     } { black                             },
+    { section       } { \large \normalfont \sffamily      },
     { chapter       } { \c__nju_fmt_section_tl \centering   },
     { chapterintoc  } { \c__nju_fmt_section_tl              },
     { subsection    } { \c__nju_fmt_section_tl              },
@@ -584,7 +588,9 @@
     { subsubsection } { \c__nju_fmt_section_tl              },
     { paragraph     } { \c__nju_fmt_section_tl              },
     { subparagraph  } { \c__nju_fmt_section_tl              },
-    { toctitle      } { \centering \zihao { 3 } \bfseries }
+    { toctitle      } { \centering \zihao { 3 } \bfseries },
+    { header        } { \small \kaishu                    },
+    { footer        } { \small \rmfamily                  }
   }
   { \__nju_define_fmt:nn #1 }
 \endinput

Modified: trunk/Master/texmf-dist/tex/latex/njuthesis/njuthesis-undergraduate.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/njuthesis/njuthesis-undergraduate.def	2022-06-10 21:08:52 UTC (rev 63537)
+++ trunk/Master/texmf-dist/tex/latex/njuthesis/njuthesis-undergraduate.def	2022-06-10 21:09:33 UTC (rev 63538)
@@ -23,7 +23,7 @@
 %% To produce the documentation run the original source files ending with
 %% `.dtx' through XeTeX.
 %% 
-\GetIdInfo $Id: njuthesis.dtx 0.19.0 2022-05-23 11:33:00 +0800 NJU LUG <git+nju-lug-email-3104-issue- at yaoge123.cn>$
+\GetIdInfo $Id: njuthesis.dtx 0.20.0 2022-06-10 14:42:00 +0800 NJU LUG <git+nju-lug-email-3104-issue- at yaoge123.cn>$
   {Undergraduate definition file for njuthesis}
 \ProvidesExplFile{njuthesis-undergraduate.def}
   {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
@@ -94,6 +94,7 @@
         { \__nju_vskip: \__nju_name:n { ##1 } : \__nju_uline:n { 7 em } }
     \end{flushright}
     \vfil
+    \normalfont \normalsize
   }
 \cs_new_protected:Npn \__nju_make_authdecl:
   {
@@ -170,9 +171,13 @@
     % 用于小标题的摘要名称字样
     { abstract_b } { 摘\qquad{}要 } { ABSTRACT          },
     { appendix   } { 附录       } { appendix            },
+    { blankdate  } { \qquad{}年 \quad{}月 \quad{}日 } { },
+    { blankdate_a  } { \njuline{\qquad\qquad} 年
+            \njuline{\qquad} 月 \njuline{\qquad} 日 } { },
+    { comma      } { :         } { :~                  },
     { dept       } { 院系       } { DEPARTMENT          },
     { figure     } { 图         } { figure              },
-    { keywords   } { 关键词:   } { Keywords:~          },
+    { keywords   } { 关键词     } { Keywords            },
     { lang       } { 中文       } { 英文                },
     { nju        } { 南京大学   } { Nanjing~ University },
     { table      } { 表         } { table               }
@@ -187,10 +192,10 @@
                   本科毕业论文(设计) \\ 诚信承诺书 },
     { origsign    } { 作者签名                       },
     { submitdate  } { 提交日期                       },
-    { supv        } { 导师                           },
+    { supv        } { 指导教师                       },
     { title       } { 题目                           },
     { type        } { 本科生毕业论文(设计、作品)   },
-    { ug          } { 本科生                         }
+    { ug          } { 本科                           }
   }
   { \__nju_define_name:nn #1 }
 \clist_map_inline:nn
@@ -242,7 +247,9 @@
 \clist_map_inline:nn
   {
     { pagestyle     } { plain                             },
-    { section       } { \large \sffamily                  },
+    { emblemcolor   } { black                             },
+    { namecolor     } { black                             },
+    { section       } { \large \normalfont \sffamily      },
     { chapter       } { \c__nju_fmt_section_tl \centering   },
     { chapterintoc  } { \c__nju_fmt_section_tl              },
     { subsection    } { \c__nju_fmt_section_tl              },
@@ -249,7 +256,9 @@
     { subsubsection } { \c__nju_fmt_section_tl              },
     { paragraph     } { \c__nju_fmt_section_tl              },
     { subparagraph  } { \c__nju_fmt_section_tl              },
-    { toctitle      } { \centering \zihao { 3 } \bfseries }
+    { toctitle      } { \centering \zihao { 3 } \bfseries },
+    { header        } { \small \kaishu                    },
+    { footer        } { \small \rmfamily                  }
   }
   { \__nju_define_fmt:nn #1 }
 \endinput

Modified: trunk/Master/texmf-dist/tex/latex/njuthesis/njuthesis.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/njuthesis/njuthesis.cls	2022-06-10 21:08:52 UTC (rev 63537)
+++ trunk/Master/texmf-dist/tex/latex/njuthesis/njuthesis.cls	2022-06-10 21:09:33 UTC (rev 63538)
@@ -24,7 +24,7 @@
 %% `.dtx' through XeTeX.
 %% 
 \NeedsTeXFormat{LaTeX2e}
-\GetIdInfo $Id: njuthesis.dtx 0.19.0 2022-05-23 11:33:00 +0800 NJU LUG <git+nju-lug-email-3104-issue- at yaoge123.cn>$
+\GetIdInfo $Id: njuthesis.dtx 0.20.0 2022-06-10 14:42:00 +0800 NJU LUG <git+nju-lug-email-3104-issue- at yaoge123.cn>$
   {Thesis template for Nanjing University}
 \ProvidesExplClass{njuthesis}
   {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
@@ -57,8 +57,8 @@
 \clist_new:N \l__nju_tmp_clist
 \dim_new:N   \l__nju_tmpa_dim
 \dim_new:N   \l__nju_tmpb_dim
-\int_new:N   \l__nju_tmp_int
-\seq_new:N   \l__nju_tmp_seq
+\int_new:N   \l__nju_tmpa_int
+\int_new:N   \l__nju_tmpb_int
 \tl_new:N    \l__nju_tmpa_tl
 \tl_new:N    \l__nju_tmpb_tl
 \int_new:N \g__nju_info_degree_int
@@ -151,27 +151,25 @@
       {
         \dim_compare:nTF { \l__nju_tmpa_dim > #1 }
           {
-            \hfil
             \scalebox
               { \dim_to_decimal_in_unit:nn { #1 } { \l__nju_tmpa_dim } }
               [ 1.0 ] { #2 #3 }
-            \hfil
           }
-          {
-            \hbox_to_wd:nn { #1 }
-              { #2 \tl_map_inline:nn { #3 } { ##1 \hfil } \unskip }
-          }
+          { #2 \tl_map_inline:nn { #3 } { ##1 \hfil } \unskip }
       }
   }
 \cs_generate_variant:Nn \__nju_spread_box:nnn { nnV }
 \cs_generate_variant:Nn \__nju_spread_box:nnn { nnx }
-\cs_new_protected:Npn \__nju_multiline_box:NNnn #1#2#3#4
+\cs_new_protected:Npn \__nju_multiline_box:NNNn #1#2#3#4
   {
     \int_set:Nn #1 { 1 }
-    \int_do_until:nn { #1 > #3 }
+    \int_set:Nn #2 { \clist_count:N #3 }
+    \int_compare:nF { #2 > 4 }
+      { \int_set:Nn #2 { 4 } }
+    \int_do_until:nn { #1 > #2 }
       {
         \__nju_ulined_center_box:nn { #4 }
-          { \clist_item:Nn #2 { #1 } } \\
+          { \clist_item:Nn #3 { #1 } } \\
         \int_incr:N #1
       }
   }
@@ -212,28 +210,24 @@
     \dim_sub:Nn #1 { \textwidth / 2 }
     \__nju_ulined_center_box:nn { #1 } { \__nju_info:n { #3 } }
   }
-\cs_new:Npn \__nju_date:www #1-#2-#3 \q_stop
+\cs_new:Npn \__nju_date:www    #1-#2-#3 \q_stop
   { \__zhnum_date_aux:nnn { #1 } { #2 } { #3 } }
 \cs_new:Npn \__nju_date_en:www #1-#2-#3 \q_stop
   { \clist_item:Nn \c__nju_month_en_clist { #2 } ~#3 , ~#1  }
-\cs_new_protected:Npn \__nju_date:n #1
+\cs_new_protected:Npn \__nju_date:n    #1 { \__nju_date:nn { #1 } {     } }
+\cs_new_protected:Npn \__nju_date_en:n #1 { \__nju_date:nn { #1 } { _en } }
+\cs_generate_variant:Nn \exp_last_unbraced:NV { cV }
+\cs_new_protected:Npn \__nju_date:nn #1#2
   {
-    \tl_new:c  { g__nju_info_ #1 date_tl }
-    \tl_set:cn { g__nju_info_ #1 date_tl }
+    \tl_set:Nv \l__nju_tmpa_tl { g__nju_info_ #1 date_raw_tl }
+    \tl_new:c  { g__nju_info_ #1 date #2 _tl }
+    \tl_set:cx { g__nju_info_ #1 date #2 _tl }
       {
-        \exp_last_unbraced:Nv
-          \__nju_date:www { g__nju_info_ #1 date_raw_tl } \q_stop
+        \tl_if_empty:NTF \l__nju_tmpa_tl
+          { \__nju_name:n { blankdate #2 } }
+          { \exp_last_unbraced:cV { __nju_date #2 :www } \l__nju_tmpa_tl \q_stop }
       }
   }
-\cs_new_protected:Npn \__nju_date_en:n #1
-  {
-    \tl_new:c  { g__nju_info_ #1 date_en_tl }
-    \tl_set:cn { g__nju_info_ #1 date_en_tl }
-      {
-        \exp_last_unbraced:Nv
-          \__nju_date:www { g__nju_info_ #1 date_raw_tl } \q_stop
-      }
-  }
 \msg_new:nnn { njuthesis } { missing-title }
   {
     The~ title~ should~ not~ be~ left~ blank.\\
@@ -301,9 +295,9 @@
     \par
   }
 \cs_new_protected:Npn \__nju_emblem:N #1
-  { \njuemblem [ black ] { #1 } { ! } }
+  { \njuemblem [ \c__nju_fmt_emblemcolor_tl ] { #1 } { ! } }
 \cs_new_protected:Npn \__nju_name:N   #1
-  { \njuname   [ black ] { #1 } { ! } }
+  { \njuname   [ \c__nju_fmt_namecolor_tl   ] { #1 } { ! } }
 \cs_new_protected:Npn \__nju_abs_bookmark:nn #1#2
   {
     \phantomsection
@@ -336,12 +330,12 @@
     \setbox0 = \vbox{\hangindent=\wd\l__nju_tmp_box \hangafter=-1
         \leftskip=#3 \rightskip=\leftskip \parindent=\z@ #2\par
         \global\setbox2=\hbox{}
-        \int_gzero:N \l__nju_tmp_int
+        \int_gzero:N \l__nju_tmpa_int
         \loop
           \setbox1=\lastbox \unskip\unpenalty
         \unless\ifvoid1
           \global\setbox2=\hbox{\__nju_uline_box:\penalty0\unhbox2}
-          \int_gincr:N \l__nju_tmp_int
+          \int_gincr:N \l__nju_tmpa_int
         \repeat
       }
       {
@@ -348,7 +342,7 @@
         \noindent\copy\l__nju_tmp_box\unhbox2
         \bool_if:NT \g__nju_strict_abs_title_bool
           {
-            \int_case:nnF { \l__nju_tmp_int }
+            \int_case:nnF { \l__nju_tmpa_int }
               {
                 { 0 } { \msg_error:nn { njuthesis } { missing-title } }
                 { 1 } { \__nju_uline:n { \textwidth } }
@@ -642,28 +636,14 @@
 \int_compare:nTF { \g__nju_info_degree_int == 1 }
   { \tl_set:Nn \g__nju_info_diploma_tl { ug } }
   { \tl_set:Nn \g__nju_info_diploma_tl { g  } }
-\tl_set:Nx \g__nju_info_type_tl
-  { \clist_item:Nn \c__nju_name_type_clist    { \g__nju_info_type_int } }
-\tl_set:Nx \g__nju_info_type_en_tl
-  { \clist_item:Nn \c__nju_name_type_en_clist { \g__nju_info_type_int } }
-\tl_put_left:Nx \g__nju_info_type_tl
-  { \tl_use:c { c__nju_name_ \g__nju_info_diploma_tl _tl } }
-\bool_if:NT \g__nju_blind_bool
-  {
-    \ctex_at_end_preamble:n
-      {
-        \clist_map_inline:Nn \c__nju_blind_info_clist
-          { \tl_gclear:c    { g__nju_info_ #1    _tl } }
-        \clist_map_inline:Nn \c__nju_blind_info_en_clist
-          { \tl_gclear:c    { g__nju_info_ #1 _en_tl } }
-        \clist_map_inline:Nn \c__nju_blind_infolist_clist
-          { \clist_gclear:c { g__nju_info_ #1 _clist } }
-        \tl_gclear:N \c__nju_name_nju_tl
-        \tl_gclear:N \c__nju_name_nju_en_tl
-      }
-  }
 \ctex_at_end_preamble:n
   {
+    \tl_set:Nx \g__nju_info_type_tl
+      { \clist_item:Nn \c__nju_name_type_clist    { \g__nju_info_type_int } }
+    \tl_set:Nx \g__nju_info_type_en_tl
+      { \clist_item:Nn \c__nju_name_type_en_clist { \g__nju_info_type_int } }
+    \tl_put_left:Nx \g__nju_info_type_tl
+      { \tl_use:c { c__nju_name_ \g__nju_info_diploma_tl _tl } }
     \bool_set:Nn \l__nju_second_supv_bool
       { ! \clist_if_empty_p:N \g__nju_info_supv_ii_clist }
     \tl_set:Nx \g__nju_info_supvfull_tl
@@ -699,6 +679,20 @@
           }
       }
   }
+\bool_if:NT \g__nju_blind_bool
+  {
+    \ctex_at_end_preamble:n
+      {
+        \clist_map_inline:Nn \c__nju_blind_info_clist
+          { \tl_gclear:c    { g__nju_info_ #1    _tl } }
+        \clist_map_inline:Nn \c__nju_blind_info_en_clist
+          { \tl_gclear:c    { g__nju_info_ #1 _en_tl } }
+        \clist_map_inline:Nn \c__nju_blind_infolist_clist
+          { \clist_gclear:c { g__nju_info_ #1 _clist } }
+        \tl_gclear:N \c__nju_name_nju_tl
+        \tl_gclear:N \c__nju_name_nju_en_tl
+      }
+  }
 \bool_lazy_or:nnT
   { \tl_if_empty_p:N \g__nju_latin_font_tl }
   { \tl_if_empty_p:N \g__nju_cjk_font_tl   }
@@ -928,8 +922,7 @@
 \bool_if:NT \g__nju_draft_bool { \geometry { showframe } }
 \keys_define:nn { nju / style }
   {
-    header/format .tl_gset:N = \g__nju_header_format_tl,
-    header/format .initial:n = \small \kaishu,
+    header/format .tl_gset:N = \c__nju_fmt_header_tl,
     header     .clist_gset:N = \g__nju_header_twoside_clist,
     header*    .clist_gset:N = \g__nju_header_oneside_clist,
     header        .initial:n =
@@ -940,8 +933,7 @@
       {
         {  L } { \leftmark  }, {  R } { \rightmark }
       },
-    footer/format .tl_gset:N = \g__nju_footer_format_tl,
-    footer/format .initial:n = \small \rmfamily,
+    footer/format .tl_gset:N = \c__nju_fmt_footer_tl,
     footer     .clist_gset:N = \g__nju_footer_twoside_clist,
     footer*    .clist_gset:N = \g__nju_footer_oneside_clist,
     footer        .initial:n = { { C } { \thepage } },
@@ -962,9 +954,9 @@
       }
   }
 \cs_new_protected:Npn \__nju_header:nn #1#2
-  { \fancyhead [#1] { \g__nju_header_format_tl \nouppercase {#2} } }
+  { \fancyhead [#1] { \c__nju_fmt_header_tl \nouppercase {#2} } }
 \cs_new_protected:Npn \__nju_footer:nn #1#2
-  { \fancyfoot [#1] { \g__nju_footer_format_tl \nouppercase {#2} } }
+  { \fancyfoot [#1] { \c__nju_fmt_footer_tl \nouppercase {#2} } }
 \fancypagestyle { plain }
   {
     \fancyhf { }
@@ -1323,6 +1315,8 @@
   {
     \tl_set:Nv \l__nju_tmpa_tl { c__nju_name_keywords #1 _tl }
     \__nju_get_text_width:NV \l__nju_tmpa_dim \l__nju_tmpa_tl
+    \dim_add:Nn \l__nju_tmpa_dim { 1 em }
+    \exp_args:NNv \tl_put_right:Nn \l__nju_tmpa_tl { c__nju_name_comma #1 _tl }
     \list { \l__nju_tmpa_tl }
       {
         \labelwidth  \l__nju_tmpa_dim



More information about the tex-live-commits mailing list.