texlive[68848] Master/texmf-dist: njuthesis (14nov23)

commits+karl at tug.org commits+karl at tug.org
Tue Nov 14 22:06:58 CET 2023


Revision: 68848
          https://tug.org/svn/texlive?view=revision&revision=68848
Author:   karl
Date:     2023-11-14 22:06:58 +0100 (Tue, 14 Nov 2023)
Log Message:
-----------
njuthesis (14nov23)

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-doc.cls
    trunk/Master/texmf-dist/tex/latex/njuthesis/njuthesis-graduate.def
    trunk/Master/texmf-dist/tex/latex/njuthesis/njuthesis-postdoctoral.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	2023-11-14 21:06:47 UTC (rev 68847)
+++ trunk/Master/texmf-dist/source/latex/njuthesis/njuthesis.dtx	2023-11-14 21:06:58 UTC (rev 68848)
@@ -112,7 +112,7 @@
 %
 %<class>\NeedsTeXFormat{LaTeX2e}
 %<*!(driver|install)>
-%<+!driver>\GetIdInfo $Id: njuthesis.dtx 1.3.0 2023-06-06 11:30:00
+%<+!driver>\GetIdInfo $Id: njuthesis.dtx 1.3.1 2023-11-14 11:30:00
 %<+!driver>  +0800 NJU LUG <git+nju-lug-email-3104-issue- at yaoge123.cn>$
 %<class>  {Thesis template for Nanjing University}
 %<class>\ProvidesExplClass{njuthesis}
@@ -148,7 +148,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{v1.3.0 \quad 2023-06-06}
+% \date{v1.3.1 \quad 2023-11-14}
 %
 % \changes{v0.1}{2021/09/04}{开始开发。}
 % \changes{v0.2}{2021/09/07}{初步搭建了可用的模板。}
@@ -444,6 +444,7 @@
 %     \file{njuthesis.dtx}\TblrNote{a}   & 文档类源代码                     \\
 %     \file{njuthesis.ins}\TblrNote{a}   & 文档类安装脚本                   \\
 %     \file{njuthesis.pdf}               & 用户手册(本文档)               \\
+%     \file{njuthesis-doc.cls}           & 用户手册样式                     \\
 %     \file{njuthesis-sample.bib}        & 示例参考文献列表                 \\
 %     \file{njuthesis-sample.tex}        & 示例文档,不妨以此为基础撰写论文 \\
 %     \file{njuthesis-graduate.def}      & 研究生参数配置文件               \\
@@ -915,13 +916,16 @@
 % 若要手动选择字体,则需将字体设置为 \opt{none},再通过 \pkg{fontspec}
 % 宏包或 \pkg{ctex} 宏包中给出的命令来实现。
 %
-% ^^A \begin{function}[added=2022-07-02]{font-path}
-% ^^A   \begin{syntax}
-% ^^A     font-path = \Arg{文件夹}
-% ^^A   \end{syntax}
-% ^^A 字体文件目录。
-% ^^A \end{function}
+% \begin{function}[added=2022-07-02]{font-path}
+%   \begin{syntax}
+%     font-path = \Arg{文件夹}
+%   \end{syntax}
+% 字体文件目录。
+% \end{function}
 %
+% 模板用到的部分字体(例如华文中宋)可能尚未安装在操作系统,
+% 可以使用此选项手动指定搜索路径。
+%
 % ^^A 本模板默认使用操作系统安装的字体。可以使用本选项从任意目录载入字体。
 %
 % \paragraph{中文}
@@ -2234,7 +2238,7 @@
 %   \begin{syntax}
 %     \tn{njusetformat}\marg{名称}\marg{样式}
 %   \end{syntax}
-% 修改样式。默认样式可以参见 \ref{subsubsec:constant-format} 节。
+% 修改样式。所有可以修改的默认样式参见 \ref{subsubsec:constant-format} 节。
 % \end{function}
 %
 % 譬如,将章标题字号加大到小二号,示例如下:
@@ -2243,7 +2247,13 @@
 %   \njusetformat{chapter}{\zihao{-2}\sffamily\centering}
 % \end{latexexample}
 %
+% 修改表格内容的字体:
 %
+% \begin{latexexample}[moretexcs={\njusetformat,\zihao,\bfseries}]
+%   \njusetformat{tabular}{\zihao{-4}\bfseries}
+% \end{latexexample}
+%
+%
 % \subsection{视觉识别系统}
 %
 % 视觉识别系统 \pkg{njuvisual} 现已被分离为独立宏包\cite{njuvisual},
@@ -2622,6 +2632,16 @@
   }
 %    \end{macrocode}
 %
+% \changes{v1.3}{2023/11/14}{兼容新版 \LaTeX3 的 |e| 型展开变化。}
+% 兼容新版 L3 特性。另见 \url{https://github.com/CTeX-org/ctex-kit/pull/678}。
+%    \begin{macrocode}
+\@ifpackagelater { expl3 } { 2023/10/10 } { }
+  {
+    \cs_generate_variant:Nn \tl_set:Nn   { Ne }
+    \cs_generate_variant:Nn \tl_const:Nn { Ne }
+  }
+%    \end{macrocode}
+%
 % 目前 \cls{njuthesis} 仅支持 \XeTeX 和 \LuaTeX。
 %    \begin{macrocode}
 \msg_new:nnn { njuthesis } { unsupported-engine }
@@ -2635,7 +2655,7 @@
 \bool_lazy_or:nnF
   { \sys_if_engine_xetex_p:  }
   { \sys_if_engine_luatex_p: }
-  { \msg_fatal:nnx { njuthesis } { unsupported-engine } { \c_sys_engine_str } }
+  { \msg_fatal:nne { njuthesis } { unsupported-engine } { \c_sys_engine_str } }
 %    \end{macrocode}
 %
 %
@@ -2741,7 +2761,7 @@
 % \begin{variable}{\c_@@_name_today_tl}
 % 编译当天日期,格式为 |yyyy-mm-dd|。
 %    \begin{macrocode}
-\tl_const:Nx \c_@@_name_today_tl
+\tl_const:Ne \c_@@_name_today_tl
   {
     \int_to_arabic:n { \c_sys_year_int  } -
     \int_to_arabic:n { \c_sys_month_int } -
@@ -2977,11 +2997,11 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \begin{macro}{\@@_box_spread:NNn,\@@_box_spread:NNv,\@@_box_spread:NNx}
+% \begin{macro}{\@@_box_spread:NNn,\@@_box_spread:NNv,\@@_box_spread:NNe}
 %    \begin{macrocode}
 \cs_new:Npn \@@_box_spread:NNn { \@@_box_spread:NNNn \l_@@_tmp_skip }
 \cs_generate_variant:Nn \@@_box_spread:NNn { NNv }
-\cs_generate_variant:Nn \@@_box_spread:NNn { NNx }
+\cs_generate_variant:Nn \@@_box_spread:NNn { NNe }
 %    \end{macrocode}
 % \end{macro}
 %
@@ -3116,7 +3136,7 @@
 % \end{macro}
 %
 % \begin{macro}{\@@_get_width_print:Nn,\@@_get_width_print:Nv,
-%   \@@_get_width_print:Nx}
+%   \@@_get_width_print:Ne}
 % 横跨整页的下划线。
 % \begin{arguments}
 %   \item 宽度,|dim| 型变量
@@ -3131,7 +3151,7 @@
     \dim_set:Nn #1 { \textwidth - #1 } #2
   }
 \cs_generate_variant:Nn \@@_get_width_print:Nn { Nv }
-\cs_generate_variant:Nn \@@_get_width_print:Nn { Nx }
+\cs_generate_variant:Nn \@@_get_width_print:Nn { Ne }
 %    \end{macrocode}
 % \end{macro}
 %
@@ -3459,7 +3479,7 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \begin{macro}{\@@_uline_list:NNn,\@@_uline_list:NNx}
+% \begin{macro}{\@@_uline_list:NNn,\@@_uline_list:NNe}
 % \changes{v0.16}{2022/03/25}{使用原生断行算法处理摘要页标题。}
 % 用于研究生摘要页面的多行标题。
 % \begin{arguments}
@@ -3507,7 +3527,7 @@
           }
       }
   }
-\cs_generate_variant:Nn \@@_uline_list:NNn { NNx }
+\cs_generate_variant:Nn \@@_uline_list:NNn { NNe }
 %    \end{macrocode}
 % \end{macro}
 %
@@ -3705,7 +3725,7 @@
     You~ have~ not~ selected~ local~ files~
     for~ emblem~ and~ name~ images.\\
     It~ seems~ that~ you~ haven't~ fill~ in~ both~
-    "image/nju-emblem"~ and~ "image/nju-name",~ therefore
+    "image/nju-emblem"~ and~ "image/nju-name",~ therefore~
     I~ am~ using~ the~ package~ "njuvisual"~ instead,~
     which~ may~ slow~ down~ the~ compilation.
   }
@@ -4144,7 +4164,7 @@
 % \changes{v0.12}{2021/12/07}{重新组织宏包载入顺序。}
 % 将选项传入 \cls{ctexbook} 文档类。
 %    \begin{macrocode}
-\exp_args:Nx \PassOptionsToClass
+\exp_args:Ne \PassOptionsToClass
   {
     a4paper,
     UTF8,
@@ -4351,7 +4371,7 @@
 % 入对应默认配置。注意,尽管在手册中封面、摘要、常量等的代码实现位于靠
 % 后部分,拆分后实际上是在此处载入运行的,务必要注意处理的逻辑顺序。
 %    \begin{macrocode}
-\exp_args:Nx \file_input:n
+\exp_args:Ne \file_input:n
   {
     njuthesis-
     \int_case:nn { \g_@@_info_type_int }
@@ -4569,18 +4589,18 @@
 %    \end{macrocode}
 % 拼合双导师的姓名和职称。
 %    \begin{macrocode}
-    \tl_set:Nx \g_@@_info_supvfull_tl
+    \tl_set:Ne \g_@@_info_supvfull_tl
       { \clist_use:Nn \g_@@_info_supv_clist { \@@_hskip: } }
     \clist_if_empty:NF \g_@@_info_supvii_clist
       {
         \bool_gset_true:N \g_@@_opt_supvii_bool
-        \tl_gput_right:Nx \g_@@_info_supvfull_tl
+        \tl_gput_right:Ne \g_@@_info_supvfull_tl
           { \@@_quad: \clist_use:Nn \g_@@_info_supvii_clist { \@@_hskip: } }
       }
     \tl_set_eq:NN \g_@@_info_supvfull_en_tl \g_@@_info_supv_en_tl
     \tl_if_empty:NF \g_@@_info_supvii_en_tl
       {
-        \tl_gput_right:Nx \g_@@_info_supvfull_en_tl
+        \tl_gput_right:Ne \g_@@_info_supvfull_en_tl
           { \@@_quad: \g_@@_info_supvii_en_tl }
       }
   }
@@ -4614,7 +4634,7 @@
 % 文档类型字样。
 %    \begin{macrocode}
 \tl_new:N  \g_@@_info_type_tl
-\tl_set:Nx \g_@@_info_type_tl
+\tl_set:Ne \g_@@_info_type_tl
   { \clist_item:Nn \c_@@_name_type_clist { \g_@@_info_type_int } }
 %    \end{macrocode}
 % \end{variable}
@@ -4633,7 +4653,7 @@
 % 英文的学位字样。
 %    \begin{macrocode}
 \tl_new:N  \g_@@_info_degree_en_tl
-\tl_set:Nx \g_@@_info_degree_en_tl
+\tl_set:Ne \g_@@_info_degree_en_tl
   { \clist_item:Nn \c_@@_name_type_en_clist { \g_@@_info_type_int } }
 %</def-g>
 %    \end{macrocode}
@@ -4922,6 +4942,7 @@
 %
 % \begin{macro}{\@@_loadfont_stzhongs:,\@@_stzhongs:}
 % \changes{v1.2}{2023/04/30}{在研究生模板载入华文中宋。}
+% \changes{v1.3}{2023/10/09}{可以手动指定华文中宋文件位置。}
 % 研究生封面额外需要的华文中宋。
 %    \begin{macrocode}
 \cs_new:Npn \@@_loadfont_stzhongs:
@@ -4932,8 +4953,15 @@
           [ \c_@@_name_fakebold_tl ]
       }
       {
-        \cs_set_eq:NN \@@_stzhongs: \rmfamily
-        \msg_warning:nn { njuthesis } { missing-stzhongs }
+        \bool_if:NTF \g_@@_font_path_bool
+          {
+            \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 }
+          }
       }
   }
 %    \end{macrocode}
@@ -5133,7 +5161,7 @@
 %
 % 只有研究生模板需要华文中宋。我们把它放在文档类最后载入。
 %    \begin{macrocode}
-%<def-g>\ctex_at_end:n { \@@_loadfont_stzhongs: }
+%<def-g>\ctex_at_end_preamble:n { \@@_loadfont_stzhongs: }
 %    \end{macrocode}
 %
 %
@@ -5864,7 +5892,7 @@
 % \changes{v1.0}{2022/08/06}{兼容 \pkg{tabularray} 设置。}
 % 表格默认居中,字号设置为五号。^^A  https://www.zhihu.com/question/366803177/answer/977853129
 %    \begin{macrocode}
-\BeforeBeginEnvironment { tabular } { \centering \zihao {5} }
+\BeforeBeginEnvironment { tabular } { \centering \c_@@_fmt_tabular_tl }
 \ctex_at_end_package:nn { tabularray }
   {
 %    \end{macrocode}
@@ -5872,7 +5900,7 @@
 %    \begin{macrocode}
     \__tblr_use_lib_booktabs:
     \tl_set:Nn \l_@@_tmpb_tl
-      { , abovesep = 4 pt, stretch  = 0.8, cells = { font = \small } }
+      { , abovesep = 4 pt, stretch  = 0.8, cells = { font = \c_@@_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 }
@@ -6702,6 +6730,7 @@
 % \end{macro}
 %
 % \subparagraph{英文封面} 包括标题、顶部、中部、校徽、底部。
+% \changes{v1.3}{2023/08/21}{修复英文标题超长引发的页面元素混乱。}
 %
 % \begin{macro}{g/cover-en/title}
 % 研究生英文封面标题实例。
@@ -6710,7 +6739,7 @@
   {
     content     = \g_@@_info_title_en_tl,
     format      = \bf \sffamily \zihao { 2 },
-    bottom-skip = 2 cm
+    bottom-skip = 1 cm plus 1 fil minus .5 cm
   }
 %    \end{macrocode}
 % \end{macro}
@@ -6730,7 +6759,7 @@
       \textsf { \g_@@_info_supv_en_tl
         \tex_par:D \g_@@_info_supvii_en_tl },
     format      = \zihao { 4 },
-    bottom-skip = 0 pt plus 1.2 fil minus 1 cm
+    bottom-skip = 1 cm plus 1 fil minus .5 cm
   }
 %    \end{macrocode}
 % \end{macro}
@@ -6744,7 +6773,7 @@
       \c_@@_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 = 2 cm
+    bottom-skip = .5 cm plus 1 fil
   }
 %    \end{macrocode}
 % \end{macro}
@@ -6755,7 +6784,7 @@
 \@@_declare_element:nn { g / cover-en / emblem-img }
   {
     content     = \@@_emblem:N \c_@@_emblemwdii_dim,
-    bottom-skip = 1.5 cm
+    bottom-skip = 1 cm minus .5 cm
   }
 %    \end{macrocode}
 % \end{macro}
@@ -6889,7 +6918,7 @@
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_cover_info_nl:
   {
-    \tl_set:Nx \l_@@_tmpa_tl
+    \tl_set:Ne \l_@@_tmpa_tl
       {
         \clist_use:Nn \g_@@_info_supv_clist   { ~ }
         \clist_use:Nn \g_@@_info_supvii_clist { ~ }
@@ -7575,10 +7604,6 @@
         \@@_make_cover:
       }
 %    \end{macrocode}
-% 生成封面后清除标题中的换行控制符,便于在摘要中输出。
-%    \begin{macrocode}
-    \tl_remove_all:Nn \g_@@_info_title_tl { \\ }
-%    \end{macrocode}
 % 如果在选择了 \opt{decl-page},就生成本科生的诚信承诺书,
 % 或研究生的原创性声明和出版授权书。
 %    \begin{macrocode}
@@ -7767,12 +7792,12 @@
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_abs_info_g:N #1
   {
-    \@@_uline_list:NNx \g_@@_info_title_tl \g_@@_abs_title_left_skip
+    \@@_uline_list:NNe \g_@@_info_title_tl \g_@@_abs_title_left_skip
       { \c_@@_name_titlea_tl #1 }
 %    \end{macrocode}
 % 专业、年级、姓名。
 %    \begin{macrocode}
-    \@@_get_width_print:Nx \l_@@_tmp_skip
+    \@@_get_width_print:Ne \l_@@_tmp_skip
       {
         \dim_set:Nn \l_@@_tmpa_dim { 11 em }
         \dim_set:Nn \l_@@_tmpb_dim { 4  em }
@@ -7785,7 +7810,7 @@
 %    \end{macrocode}
 % 导师姓名、职称。
 %    \begin{macrocode}
-    \@@_get_width_print:Nx \l_@@_tmpa_dim { \c_@@_name_supva_tl #1 }
+    \@@_get_width_print:Ne \l_@@_tmpa_dim { \c_@@_name_supva_tl #1 }
     \@@_box_ulined_info:Nn \l_@@_tmpa_dim { supvfull }
   }
 %    \end{macrocode}
@@ -7804,12 +7829,12 @@
   {
     \bool_if:NTF \g_@@_abs_underline_bool
       {
-        \@@_uline_list:NNx \g_@@_info_title_en_tl
+        \@@_uline_list:NNe \g_@@_info_title_en_tl
           \g_@@_abs_title_left_skip { \c_@@_name_title_en_tl #1 }
         \clist_map_inline:nn { major, author, supvfull }
           {
             \tex_par:D
-            \@@_get_width_print:Nx \l_@@_tmpa_dim
+            \@@_get_width_print:Ne \l_@@_tmpa_dim
               { \@@_name:n { ##1 _en } #1 }
             \@@_box_ulined_info:Nn \l_@@_tmpa_dim { ##1 _en }
           }
@@ -7957,6 +7982,7 @@
     \cleardoublepage
     \thispagestyle { plain }
     \@@_abs_bookmark:Vn \c_@@_name_abstracta_tl { abstract }
+    \tl_gremove_all:Nn \g_@@_info_title_tl { \\ }
     \@@_make_abstract:
     \group_begin: \kaishu \zihao { -4 } #1
   }
@@ -7972,6 +7998,11 @@
     \cleardoublepage
     \thispagestyle { plain }
     \@@_abs_bookmark:Vn \c_@@_name_abstracta_en_tl { abstract-en }
+%    \end{macrocode}
+% \changes{v1.3}{2023/08/21}{修复英文标题手动换行与摘要页的冲突。}
+% 生成封面后清除标题中的换行控制符,便于在摘要中输出。
+%    \begin{macrocode}
+    \tl_gremove_all:Nn \g_@@_info_title_en_tl { \\ }
     \@@_make_abstract_en:
     \group_begin: \zihao { -4 } #1
   }
@@ -8213,6 +8244,7 @@
 %<def-g>    { sign              } { (签字)                           },
 %<def-g>    { sign            a } { 研究生签名                         },
 %<def-g>    { sign            b } { 导师签名                           },
+%<def-g>    { stzhongs file     } { STZHONGS.TTF                       },
 %<def-u>    { submit date       } { 提交日期                           },
 %<def-g>    { submit date       } { 论文提交日期                       },
 %<def-p>    { submit date       } { 完成日期                           },
@@ -8475,6 +8507,11 @@
 %    \end{macrocode}
 % “目录”二字的样式。
 %    \begin{macrocode}
+%    \end{macrocode}
+% \changes{v1.3}{2023/07/08}{整合表格环境字体设置。}
+% \env{tabular} 环境内的字体样式。
+%    \begin{macrocode}
+    { tabular       } { \zihao { 5 }                      },
     { toc title     } { \centering \zihao { 3 } \bfseries },
     { header        } { \small \kaishu                    },
     { footer        } { \small \rmfamily                  }
@@ -8546,6 +8583,12 @@
   }
 %    \end{macrocode}
 %
+% 处理 \cls{l3doc} 新追加的 |e| 型展开。
+%    \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 }
+%    \end{macrocode}
+%
 % \subsubsection{杂项}
 %
 % 封面背景图案。

Modified: trunk/Master/texmf-dist/tex/latex/njuthesis/njuthesis-doc.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/njuthesis/njuthesis-doc.cls	2023-11-14 21:06:47 UTC (rev 68847)
+++ trunk/Master/texmf-dist/tex/latex/njuthesis/njuthesis-doc.cls	2023-11-14 21:06:58 UTC (rev 68848)
@@ -23,7 +23,7 @@
 %% To produce the documentation run the original source files ending with
 %% `.dtx' through XeTeX.
 %% 
-\GetIdInfo $Id: njuthesis.dtx 1.3.0 2023-06-06 11:30:00
+\GetIdInfo $Id: njuthesis.dtx 1.3.1 2023-11-14 11:30:00
   +0800 NJU LUG <git+nju-lug-email-3104-issue- at yaoge123.cn>$
   {Documentation style for njuthesis}
 \ProvidesExplFile{njuthesis-doc.cls}
@@ -61,6 +61,8 @@
     \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 }
 \backgroundsetup{
   contents={\njuemblem[white!85!gray]{22cm}{!}},
   scale=1, angle=0, hshift=-4cm

Modified: trunk/Master/texmf-dist/tex/latex/njuthesis/njuthesis-graduate.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/njuthesis/njuthesis-graduate.def	2023-11-14 21:06:47 UTC (rev 68847)
+++ trunk/Master/texmf-dist/tex/latex/njuthesis/njuthesis-graduate.def	2023-11-14 21:06:58 UTC (rev 68848)
@@ -23,7 +23,7 @@
 %% To produce the documentation run the original source files ending with
 %% `.dtx' through XeTeX.
 %% 
-\GetIdInfo $Id: njuthesis.dtx 1.3.0 2023-06-06 11:30:00
+\GetIdInfo $Id: njuthesis.dtx 1.3.1 2023-11-14 11:30:00
   +0800 NJU LUG <git+nju-lug-email-3104-issue- at yaoge123.cn>$
   {Graduate definition file for njuthesis}
 \ProvidesExplFile{njuthesis-graduate.def}
@@ -39,7 +39,7 @@
     \g__nju_info_conferdate_tl
   }
 \tl_new:N  \g__nju_info_type_tl
-\tl_set:Nx \g__nju_info_type_tl
+\tl_set: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
@@ -46,9 +46,9 @@
 \bool_if:NF \g__nju_opt_academic_bool
   { \tl_put_right:Nn \g__nju_info_degree_tl { 专业 } }
 \tl_new:N  \g__nju_info_degree_en_tl
-\tl_set:Nx \g__nju_info_degree_en_tl
+\tl_set:Ne \g__nju_info_degree_en_tl
   { \clist_item:Nn \c__nju_name_type_en_clist { \g__nju_info_type_int } }
-\ctex_at_end:n { \__nju_loadfont_stzhongs: }
+\ctex_at_end_preamble:n { \__nju_loadfont_stzhongs: }
 \cs_new_protected:Npn \__nju_decl_sign:
   {
     \clist_map_inline:nn { origsign,     date }
@@ -160,7 +160,7 @@
   {
     content     = \g__nju_info_title_en_tl,
     format      = \bf \sffamily \zihao { 2 },
-    bottom-skip = 2 cm
+    bottom-skip = 1 cm plus 1 fil minus .5 cm
   }
 \__nju_declare_element:nn { g / cover-en / top }
   {
@@ -174,7 +174,7 @@
       \textsf { \g__nju_info_supv_en_tl
         \tex_par:D \g__nju_info_supvii_en_tl },
     format      = \zihao { 4 },
-    bottom-skip = 0 pt plus 1.2 fil minus 1 cm
+    bottom-skip = 1 cm plus 1 fil minus .5 cm
   }
 \__nju_declare_element:nn { g / cover-en / middle }
   {
@@ -182,12 +182,12 @@
       \c__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 = 2 cm
+    bottom-skip = .5 cm plus 1 fil
   }
 \__nju_declare_element:nn { g / cover-en / emblem-img }
   {
     content     = \__nju_emblem:N \c__nju_emblemwdii_dim,
-    bottom-skip = 1.5 cm
+    bottom-skip = 1 cm minus .5 cm
   }
 \__nju_declare_element:nn { g / cover-en / bottom }
   {
@@ -257,7 +257,7 @@
   }
 \cs_new_protected:Npn \__nju_cover_info_nl:
   {
-    \tl_set:Nx \l__nju_tmpa_tl
+    \tl_set:Ne \l__nju_tmpa_tl
       {
         \clist_use:Nn \g__nju_info_supv_clist   { ~ }
         \clist_use:Nn \g__nju_info_supvii_clist { ~ }
@@ -499,9 +499,9 @@
   { \__nju_abs_info_en_g:N \c__nju_name_colon_en_tl }
 \cs_new_protected:Npn \__nju_abs_info_g:N #1
   {
-    \__nju_uline_list:NNx \g__nju_info_title_tl \g__nju_abs_title_left_skip
+    \__nju_uline_list:NNe \g__nju_info_title_tl \g__nju_abs_title_left_skip
       { \c__nju_name_titlea_tl #1 }
-    \__nju_get_width_print:Nx \l__nju_tmp_skip
+    \__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 }
@@ -511,7 +511,7 @@
         \c__nju_name_grade_tl \c__nju_name_authora_tl #1
       }
     \__nju_box_ulined_info:Nn \l__nju_tmp_skip { author } \tex_par:D
-    \__nju_get_width_print:Nx \l__nju_tmpa_dim { \c__nju_name_supva_tl #1 }
+    \__nju_get_width_print:Ne \l__nju_tmpa_dim { \c__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
@@ -518,12 +518,12 @@
   {
     \bool_if:NTF \g__nju_abs_underline_bool
       {
-        \__nju_uline_list:NNx \g__nju_info_title_en_tl
+        \__nju_uline_list:NNe \g__nju_info_title_en_tl
           \g__nju_abs_title_left_skip { \c__nju_name_title_en_tl #1 }
         \clist_map_inline:nn { major, author, supvfull }
           {
             \tex_par:D
-            \__nju_get_width_print:Nx \l__nju_tmpa_dim
+            \__nju_get_width_print:Ne \l__nju_tmpa_dim
               { \__nju_name:n { ##1 _en } #1 }
             \__nju_box_ulined_info:Nn \l__nju_tmpa_dim { ##1 _en }
           }
@@ -587,6 +587,7 @@
     { sign              } { (签字)                           },
     { sign            a } { 研究生签名                         },
     { sign            b } { 导师签名                           },
+    { stzhongs file     } { STZHONGS.TTF                       },
     { submit date       } { 论文提交日期                       },
     { subtitle          } { (题名和副题名)                   },
     { supv              } { 导师                               },
@@ -694,6 +695,7 @@
     { paragraph     } { \c__nju_fmt_section_tl            },
     { subparagraph  } { \c__nju_fmt_section_tl            },
     { chapterintoc  } { \c__nju_fmt_section_tl            },
+    { tabular       } { \zihao { 5 }                      },
     { toc title     } { \centering \zihao { 3 } \bfseries },
     { header        } { \small \kaishu                    },
     { footer        } { \small \rmfamily                  }

Modified: trunk/Master/texmf-dist/tex/latex/njuthesis/njuthesis-postdoctoral.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/njuthesis/njuthesis-postdoctoral.def	2023-11-14 21:06:47 UTC (rev 68847)
+++ trunk/Master/texmf-dist/tex/latex/njuthesis/njuthesis-postdoctoral.def	2023-11-14 21:06:58 UTC (rev 68848)
@@ -23,7 +23,7 @@
 %% To produce the documentation run the original source files ending with
 %% `.dtx' through XeTeX.
 %% 
-\GetIdInfo $Id: njuthesis.dtx 1.3.0 2023-06-06 11:30:00
+\GetIdInfo $Id: njuthesis.dtx 1.3.1 2023-11-14 11:30:00
   +0800 NJU LUG <git+nju-lug-email-3104-issue- at yaoge123.cn>$
   {Postdoctoral definition file for njuthesis}
 \ProvidesExplFile{njuthesis-postdoctoral.def}
@@ -273,6 +273,7 @@
     { paragraph     } { \c__nju_fmt_section_tl            },
     { subparagraph  } { \c__nju_fmt_section_tl            },
     { chapterintoc  } { \c__nju_fmt_section_tl            },
+    { tabular       } { \zihao { 5 }                      },
     { toc title     } { \centering \zihao { 3 } \bfseries },
     { header        } { \small \kaishu                    },
     { footer        } { \small \rmfamily                  }

Modified: trunk/Master/texmf-dist/tex/latex/njuthesis/njuthesis-undergraduate.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/njuthesis/njuthesis-undergraduate.def	2023-11-14 21:06:47 UTC (rev 68847)
+++ trunk/Master/texmf-dist/tex/latex/njuthesis/njuthesis-undergraduate.def	2023-11-14 21:06:58 UTC (rev 68848)
@@ -23,7 +23,7 @@
 %% To produce the documentation run the original source files ending with
 %% `.dtx' through XeTeX.
 %% 
-\GetIdInfo $Id: njuthesis.dtx 1.3.0 2023-06-06 11:30:00
+\GetIdInfo $Id: njuthesis.dtx 1.3.1 2023-11-14 11:30:00
   +0800 NJU LUG <git+nju-lug-email-3104-issue- at yaoge123.cn>$
   {Undergraduate definition file for njuthesis}
 \ProvidesExplFile{njuthesis-undergraduate.def}
@@ -267,6 +267,7 @@
     { paragraph     } { \c__nju_fmt_section_tl            },
     { subparagraph  } { \c__nju_fmt_section_tl            },
     { chapterintoc  } { \c__nju_fmt_section_tl            },
+    { tabular       } { \zihao { 5 }                      },
     { toc title     } { \centering \zihao { 3 } \bfseries },
     { header        } { \small \kaishu                    },
     { footer        } { \small \rmfamily                  }

Modified: trunk/Master/texmf-dist/tex/latex/njuthesis/njuthesis.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/njuthesis/njuthesis.cls	2023-11-14 21:06:47 UTC (rev 68847)
+++ trunk/Master/texmf-dist/tex/latex/njuthesis/njuthesis.cls	2023-11-14 21:06:58 UTC (rev 68848)
@@ -24,7 +24,7 @@
 %% `.dtx' through XeTeX.
 %% 
 \NeedsTeXFormat{LaTeX2e}
-\GetIdInfo $Id: njuthesis.dtx 1.3.0 2023-06-06 11:30:00
+\GetIdInfo $Id: njuthesis.dtx 1.3.1 2023-11-14 11:30:00
   +0800 NJU LUG <git+nju-lug-email-3104-issue- at yaoge123.cn>$
   {Thesis template for Nanjing University}
 \ProvidesExplClass{njuthesis}
@@ -43,6 +43,11 @@
     \@ifpackagelater {#1} { 2020/10/01 }
       { } { \msg_error:nnn { njuthesis } { l3-too-old } {#1} }
   }
+\@ifpackagelater { expl3 } { 2023/10/10 } { }
+  {
+    \cs_generate_variant:Nn \tl_set:Nn   { Ne }
+    \cs_generate_variant:Nn \tl_const:Nn { Ne }
+  }
 \msg_new:nnn { njuthesis } { unsupported-engine }
   {
     The~ njuthesis~ class~ requires~ either~
@@ -54,7 +59,7 @@
 \bool_lazy_or:nnF
   { \sys_if_engine_xetex_p:  }
   { \sys_if_engine_luatex_p: }
-  { \msg_fatal:nnx { njuthesis } { unsupported-engine } { \c_sys_engine_str } }
+  { \msg_fatal:nne { njuthesis } { unsupported-engine } { \c_sys_engine_str } }
 \box_new:N   \l__nju_tmpa_box
 \box_new:N   \l__nju_tmpb_box
 \box_new:N   \l__nju_tmpc_box
@@ -79,7 +84,7 @@
 \tl_new:N \g__nju_font_path_tl
 \bool_new:N \g__nju_font_path_bool
 \tl_new:N \g__nju_config_tl
-\tl_const:Nx \c__nju_name_today_tl
+\tl_const:Ne \c__nju_name_today_tl
   {
     \int_to_arabic:n { \c_sys_year_int  } -
     \int_to_arabic:n { \c_sys_month_int } -
@@ -176,7 +181,7 @@
   }
 \cs_new:Npn \__nju_box_spread:NNn { \__nju_box_spread:NNNn \l__nju_tmp_skip }
 \cs_generate_variant:Nn \__nju_box_spread:NNn { NNv }
-\cs_generate_variant:Nn \__nju_box_spread:NNn { NNx }
+\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 } }
 \cs_new_protected:Npn \__nju_box_spread_name:NNn #1#2#3
@@ -232,7 +237,7 @@
     \dim_set:Nn #1 { \textwidth - #1 } #2
   }
 \cs_generate_variant:Nn \__nju_get_width_print:Nn { Nv }
-\cs_generate_variant:Nn \__nju_get_width_print:Nn { Nx }
+\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 }
@@ -391,7 +396,7 @@
           }
       }
   }
-\cs_generate_variant:Nn \__nju_uline_list:NNn { NNx }
+\cs_generate_variant:Nn \__nju_uline_list:NNn { NNe }
 \DeclareObjectType { nju } { \c_zero_int }
 \DeclareTemplateInterface { nju } { element } { \c_zero_int }
   {
@@ -488,7 +493,7 @@
     You~ have~ not~ selected~ local~ files~
     for~ emblem~ and~ name~ images.\\
     It~ seems~ that~ you~ haven't~ fill~ in~ both~
-    "image/nju-emblem"~ and~ "image/nju-name",~ therefore
+    "image/nju-emblem"~ and~ "image/nju-name",~ therefore~
     I~ am~ using~ the~ package~ "njuvisual"~ instead,~
     which~ may~ slow~ down~ the~ compilation.
   }
@@ -671,7 +676,7 @@
       { \tl_clear:N   \l__nju_tmpb_tl }
     \tl_gset:cn { c__nju_ #5 _ #2 #3 \l__nju_tmpb_tl _tl } {#4}
   }
-\exp_args:Nx \PassOptionsToClass
+\exp_args:Ne \PassOptionsToClass
   {
     a4paper,
     UTF8,
@@ -753,7 +758,7 @@
       }
       { \__nju_check_pkg_conflict:nn { unicode-math } {#1} }
   }
-\exp_args:Nx \file_input:n
+\exp_args:Ne \file_input:n
   {
     njuthesis-
     \int_case:nn { \g__nju_info_type_int }
@@ -826,18 +831,18 @@
   { \keys_define:nn { nju / info } { #1 * .groups:n = { anonymous } } }
 \__nju_at_begin_document:n
   {
-    \tl_set:Nx \g__nju_info_supvfull_tl
+    \tl_set:Ne \g__nju_info_supvfull_tl
       { \clist_use:Nn \g__nju_info_supv_clist { \__nju_hskip: } }
     \clist_if_empty:NF \g__nju_info_supvii_clist
       {
         \bool_gset_true:N \g__nju_opt_supvii_bool
-        \tl_gput_right:Nx \g__nju_info_supvfull_tl
+        \tl_gput_right:Ne \g__nju_info_supvfull_tl
           { \__nju_quad: \clist_use:Nn \g__nju_info_supvii_clist { \__nju_hskip: } }
       }
     \tl_set_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:Nx \g__nju_info_supvfull_en_tl
+        \tl_gput_right:Ne \g__nju_info_supvfull_en_tl
           { \__nju_quad: \g__nju_info_supvii_en_tl }
       }
   }
@@ -1016,8 +1021,15 @@
           [ \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
+          {
+            \newCJKfontfamily \__nju_stzhongs: { \c__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 }
+          }
       }
   }
 \cs_new:Npn \__nju_define_math_font:nn #1#2
@@ -1457,12 +1469,12 @@
   }
 \keys_define:nn { nju / image } { path .code:n = { \graphicspath {#1} } }
 \DeclareGraphicsExtensions { .pdf, .eps, .jpg, .png }
-\BeforeBeginEnvironment { tabular } { \centering \zihao {5} }
+\BeforeBeginEnvironment { tabular } { \centering \c__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 = \small } }
+      { , abovesep = 4 pt, stretch  = 0.8, cells = { font = \c__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 }
@@ -1737,7 +1749,6 @@
         \pagenumbering { gobble }
         \__nju_make_cover:
       }
-    \tl_remove_all:Nn \g__nju_info_title_tl { \\ }
     \bool_if:NF \g__nju_opt_draft_bool
       {
         \bool_if:NT \g__nju_opt_decl_bool
@@ -1800,6 +1811,7 @@
     \cleardoublepage
     \thispagestyle { plain }
     \__nju_abs_bookmark:Vn \c__nju_name_abstracta_tl { abstract }
+    \tl_gremove_all:Nn \g__nju_info_title_tl { \\ }
     \__nju_make_abstract:
     \group_begin: \kaishu \zihao { -4 } #1
   }
@@ -1809,6 +1821,7 @@
     \cleardoublepage
     \thispagestyle { plain }
     \__nju_abs_bookmark:Vn \c__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
   }



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