summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-05-02 20:29:03 +0000
committerKarl Berry <karl@freefriends.org>2023-05-02 20:29:03 +0000
commit784b0853114ab63b0d14ef3200321af70a9aba78 (patch)
tree5d385fbb7dedd86f017e177c9e0cde5c8d96eec1
parent0d88fa810742d90f84743ad83193ea4ab3c38251 (diff)
njuthesis (2may23)
git-svn-id: svn://tug.org/texlive/trunk@66991 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/njuthesis/njuthesis.pdfbin1203786 -> 1219873 bytes
-rw-r--r--Master/texmf-dist/source/latex/njuthesis/njuthesis.dtx632
-rw-r--r--Master/texmf-dist/tex/latex/njuthesis/njuthesis-graduate.def193
-rw-r--r--Master/texmf-dist/tex/latex/njuthesis/njuthesis-postdoctoral.def5
-rw-r--r--Master/texmf-dist/tex/latex/njuthesis/njuthesis-undergraduate.def58
-rw-r--r--Master/texmf-dist/tex/latex/njuthesis/njuthesis.cls118
6 files changed, 639 insertions, 367 deletions
diff --git a/Master/texmf-dist/doc/latex/njuthesis/njuthesis.pdf b/Master/texmf-dist/doc/latex/njuthesis/njuthesis.pdf
index adf77bfb134..b8cb8ebdede 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 37a19e1c989..953c94cf323 100644
--- a/Master/texmf-dist/source/latex/njuthesis/njuthesis.dtx
+++ b/Master/texmf-dist/source/latex/njuthesis/njuthesis.dtx
@@ -109,7 +109,7 @@ To produce the documentation run the original source files ending with
%
%<class>\NeedsTeXFormat{LaTeX2e}
%<*!(driver|install)>
-%<+!driver>\GetIdInfo $Id: njuthesis.dtx 1.1.2 2023-01-15 14:35:00
+%<+!driver>\GetIdInfo $Id: njuthesis.dtx 1.2.0 2023-05-02 16:30:00
%<+!driver> +0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
%<class> {Thesis template for Nanjing University}
%<class>\ProvidesExplClass{njuthesis}
@@ -380,7 +380,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.1.2 \quad 2023-01-15}
+% \date{v1.2.0 \quad 2023-05-02}
%
% \maketitle
%
@@ -431,7 +431,7 @@ To produce the documentation run the original source files ending with
%
% 本模板使用的本科生毕业论文模板格式依据
% 《关于启动南京大学2023届本科毕业论文(设计)工作的通知》\cite{nju-bachelor-2023},
-% 研究生学位论文格式依据研究生院提供的材料包\cite{nju-master-2022,nju-doctor-2022}。
+% 研究生学位论文格式依据研究生院提供的材料包\cite{nju-graduate-2023}。
% 博士后出站报告格式要求与博士学位论文一致\cite{nju-postdoc-2022},
% 封面、摘要的设计参考了部分既有报告。
%
@@ -977,6 +977,7 @@ To produce the documentation run the original source files ending with
% 例如,可以用如下所示的命令插入扫描件的第一页,并插入紧随的一个空白页。
% \begin{latexexample}[moretexcs={\includepdf},emph={[2]pages}]
% \includepdf[pages={1,{}}]{scanned.pdf}
+% % \setcounter{page}{1} % 使扫描页不占用页码
% \end{latexexample}
%
%
@@ -1457,15 +1458,42 @@ To produce the documentation run the original source files ending with
% 如果是盲审,填入“盲审”二字即可。
% \end{function}
%
-% \begin{function}[updated=2021-10-01]{info/clc,info/secret-level,
-% info/udc,info/supervisor-contact}
+% \begin{function}[updated=2021-10-01]{info/clc,info/udc}
+% \begin{syntax}
+% \OPT{clc} = \Arg{中国图书分类号}
+% \OPT{udc} = \Arg{国际图书分类号}
+% \end{syntax}
+% 研究生学位论文封面上的\href{http://www.ztflh.com/}{中国图书分类号}和\ignorespaces
+% \href{http://www.udcsummary.info/php/index.php?lang=chi&pr=Y}{国际图书分类号}。
+% \end{function}
+%
+% \begin{function}[updated=2021-10-01]{info/secret-level}
% \begin{syntax}
-% \OPT{clc} = \Arg{中图分类号}
% \OPT{secret-level} = <不涉密|秘密|机密|绝密>
-% \OPT{udc} = \Arg{UDC 分类号}
+% \end{syntax}
+% 研究生学位论文封面上的密级。
+% \end{function}
+%
+% \begin{function}[updated=2021-10-01]{info/supervisor-contact}
+% \begin{syntax}
% \OPT{supervisor-contact} = \Arg{导师联系方式}
% \end{syntax}
-% 国家图书馆封面相关,包括中图分类号、密级、UDC 分类号和导师联系方式。
+% 国家图书馆封面上的导师联系方式。
+% \end{function}
+%
+% \begin{function}[added=2023-04-29]{info/school-code}
+% \begin{syntax}
+% \OPT{school-code} = \Arg{10284}
+% \end{syntax}
+% 研究生学位论文封面上的学校代码。\CJKsout{你不会真的想改这个吧?}
+% \end{function}
+%
+% \begin{function}[added=2023-04-24]{info/degree*}
+% \begin{syntax}
+% \OPT{degree*} = \Arg{英文学位名}
+% \end{syntax}
+% 研究生英文封面上的学位名称。默认会由模板通过 \opt{degree} 和 \opt{type}
+% 文档类选项生成,也可以由本选项自定义名称。
% \end{function}
%
%
@@ -1572,7 +1600,7 @@ To produce the documentation run the original source files ending with
% \tn{chapter}\oarg{用在页眉的章标题}\marg{完整的章标题}
% \tn{sectionmark}\marg{用在目录中的章标题}
% \tn{section}\oarg{用在页眉的章标题}\marg{完整的节标题}
-% \tn{sectionmark}\marg{用在目录中的节标题}
+% \tn{sectionmark}\marg{用在目录节标题}
% \end{syntax}
% 如果页眉内容发生了冲突,可使用这两个命令细化定制。
% \end{function}
@@ -2168,6 +2196,13 @@ To produce the documentation run the original source files ending with
% 关闭此选项后摘要页将不会出现在目录中,仅保留其 PDF 书签。
% \end{function}
%
+% \begin{function}[added=2023-04-23]{abstract/underline}
+% \begin{syntax}
+% \OPT{underline} = <\TTF>
+% \end{syntax}
+% 选择研究生英文摘要条目内容是否需要下划线。默认添加。
+% \end{function}
+%
% \begin{function}[added=2022-03-26,updated=2022-07-31]{abstract/title-style}
% \begin{syntax}
% \OPT{title-style} = <(strict)|centered|natural>
@@ -2539,17 +2574,11 @@ To produce the documentation run the original source files ending with
% \newblock (2022-12-19)
% \urlprefix\url{https://jw.nju.edu.cn/29/d8/c26263a600536/page.htm}
%
-% \bibitem{nju-master-2022}
+% \bibitem{nju-graduate-2023}
% 南京大学研究生院.
-% \newblock \textit{硕士研究生申请学位材料下载} [EB/OL].
-% \newblock (2022-04-26)
-% \urlprefix\url{https://grawww.nju.edu.cn/1077/list.htm}
-%
-% \bibitem{nju-doctor-2022}
-% 南京大学研究生院.
-% \newblock \textit{博士研究生申请学位材料下载} [EB/OL].
-% \newblock (2022-04-26)
-% \urlprefix\url{https://grawww.nju.edu.cn/1076/list.htm}
+% \newblock \textit{关于开展六月份学位申请、审核工作的通知} [EB/OL].
+% \newblock (2023-04-26)
+% \urlprefix\url{https://grawww.nju.edu.cn/63/a9/c905a615337/page.htm}
%
% \bibitem{nju-postdoc-2022}
% 南京大学人力资源处.
@@ -2926,12 +2955,13 @@ To produce the documentation run the original source files ending with
% \end{macrocode}
% \end{variable}
%
+% \changes{v1.1}{2023/03/07}{盲审模式下隐藏年级和学校名称。}
% \begin{variable}{\c_@@_name_anon_clist,\c_@@_name_anon_en_clist}
% 盲审模式下不显示的个人信息键名。
% \begin{macrocode}
\clist_const:Nn \c_@@_name_anon_clist
{
- author, chairman, email, student-id, reviewer,
+ author, chairman, email, grade, student-id, reviewer,
supervisor-contact, supervisor, supervisor-ii
}
\clist_const:Nn \c_@@_name_anon_en_clist
@@ -3028,6 +3058,53 @@ To produce the documentation run the original source files ending with
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\@@_fontsize:nn,\@@_fontsize:nnn}
+% 用于设置字号的辅助函数。\pkg{ctex} 默认使用的行距倍数是 1.2,我们在这里重新计算
+% \tn{baselineskip},抛弃 \cs{l__ctex_font_size_tl} 中的第二个值。
+% \begin{macrocode}
+\cs_new:Npn \@@_fontsize:nn #1#2
+ { \fontsize { #1 } { #2 } \selectfont }
+\cs_new:Npn \@@_fontsize:nnn #1#2#3
+ { \@@_fontsize:nn { #1 } { \fp_to_decimal:n { #3 * #1 } } }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_zihao:nn,\@@_zihao:n}
+% 设置字号,类似于 \cs{ctex_zihao:n}。
+% \begin{arguments}
+% \item 行距倍数
+% \item 字号值,同 \tn{zihao}
+% \end{arguments}
+% \begin{macrocode}
+\cs_new:Npn \@@_zihao:nn #1#2
+ {
+ \prop_get:NnNTF \c__ctex_font_size_prop { #2 } \l__ctex_font_size_tl
+ { \exp_after:wN \@@_fontsize:nnn \l__ctex_font_size_tl { #1 } }
+ { \msg_error:nnn { ctex } { fontsize } { #2 } }
+ }
+% \end{macrocode}
+% 默认行距倍数为 1.3。
+% \begin{macrocode}
+\cs_new:Npn \@@_zihao:n { \@@_zihao:nn { 1.3 } }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\cs_new:Npo}
+% \begin{macro}{\@@_set_ccglue:n}
+% 调整间距。由于涉及载入 \cls{ctexbook} 后才能生效的 \pkg{xeCJK} 或 \pkg{luatexja}
+% 的内部命令,我们只展开一次完成引擎判断,而不用 |x| 型全部展开。
+% \begin{macrocode}
+\cs_generate_variant:Nn \cs_new:Npn { Npo }
+\cs_new:Npo \@@_set_ccglue:n #1
+ {
+ \sys_if_engine_xetex:TF
+ { \skip_set:Nn \l__ctex_ccglue_skip { #1 } }
+ { \ltjsetparameter { kanjiskip = { #1 } } }
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
% \begin{macro}{\@@_box_ulined:NN,\@@_box_ulined:Nc}
% 带有下划线的水平盒子。
% \begin{arguments}
@@ -3054,7 +3131,7 @@ To produce the documentation run the original source files ending with
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_box_spread:NNn,\@@_box_spread:NNv}
+% \begin{macro}{\@@_box_spread:NNn,\@@_box_spread:NNv,\@@_box_spread:NNx}
% \changes{v0.19}{2022/05/16}{对超出盒子宽度的文字进行水平压缩。}
% 分散对齐的水平盒子,拉伸算法来自 \cls{fduthesis}。
% 在文字宽度小于给定宽度时,在字符中间填补 \tn{hfil} 以增大字距。
@@ -3081,6 +3158,7 @@ To produce the documentation run the original source files ending with
}
}
\cs_generate_variant:Nn \@@_box_spread:NNn { NNv }
+\cs_generate_variant:Nn \@@_box_spread:NNn { NNx }
% \end{macrocode}
% \end{macro}
%
@@ -3105,33 +3183,32 @@ To produce the documentation run the original source files ending with
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_box_multiline:NNNN}
-% 多行固定长度的下划线内容,用于国家图书馆封面。
+% \begin{macro}{\@@_box_multiline:NNNn,\@@_box_multiline:NNn}
+% 多行固定长度的下划线内容。
% \begin{arguments}
-% \item 用于循环的 |int| 型变量
% \item 用于存储条目数量的 |int| 型变量
% \item 内容,|clist| 型变量
% \item 宽度,|dim| 型变量
+% \item 条目数量
% \end{arguments}
% 默认绘制 4 条下划线。在评阅者人数超过 4 人时添加额外的条目。
% \begin{macrocode}
-\cs_new_protected:Npn \@@_box_multiline:NNNN #1#2#3#4
+\cs_new_protected:Npn \@@_box_multiline:NNNn #1#2#3#4
{
- \int_set:Nn #1 { 1 }
- \int_set:Nn #2 { \int_max:nn { \clist_count:N #3 } { 4 } }
- \int_do_until:nn { #1 > #2 }
+ \int_set:Nn #1 { \int_max:nn { \clist_count:N #2 } { #4 } }
+ \int_step_inline:nn { #1 }
{
- \clist_pop:NN #3 \l_@@_tmpa_tl
+ \clist_pop:NN #2 \l_@@_tmpa_tl
% \end{macrocode}
% \changes{v1.1}{2022/11/29}{修复空返回值在国家图书馆封面引发的死循环。}
% 防止空的返回值引发死循环。
% \begin{macrocode}
\quark_if_no_value:NT \l__nju_tmpa_tl
{ \tl_set_eq:NN \l_@@_tmpa_tl \c_empty_tl }
- \@@_box_ulined:NN #4 \l_@@_tmpa_tl \tex_par:D
- \int_incr:N #1
+ \@@_box_ulined:NN #3 \l_@@_tmpa_tl \tex_par:D
}
}
+\cs_new:Npn \@@_box_multiline:NNn { \@@_box_multiline:NNNn \l_@@_tmpa_int }
% \end{macrocode}
% \end{macro}
%
@@ -3326,8 +3403,7 @@ To produce the documentation run the original source files ending with
% \begin{macro}{\@@_cs_clear:N}
% 清空命令。
% \begin{macrocode}
-\cs_new_protected:Npn \@@_cs_clear:N #1
- { \cs_set_eq:NN #1 \prg_do_nothing: }
+\cs_new:Npn \@@_cs_clear:N #1 { \cs_set_eq:NN #1 \tex_relax:D }
% \end{macrocode}
% \end{macro}
%
@@ -3430,50 +3506,53 @@ To produce the documentation run the original source files ending with
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_cover_entry_title:NNN}
+% \begin{macro}{\@@_cover_entry_title:NNNN,\@@_cover_entry_title:NNN}
% 生成普通封面页的标题条目,包括标签和标题本身。
% \begin{arguments}
+% \item 分隔符
% \item 名称盒子宽度,|dim| 型变量
% \item 内容盒子宽度,|dim| 型变量
% \item 标签格式
% \end{arguments}
% \begin{macrocode}
-\cs_new_protected:Npn \@@_cover_entry_title:NNN #1#2#3
+\cs_new_protected:Npn \@@_cover_entry_title:NNNN #1#2#3#4
{
\tl_if_empty:NT \g_@@_info_title_tl
{ \msg_error:nn { njuthesis } { missing-title } }
- \@@_box_spread_name:NNn #1 #3 { title }
- \mode_leave_vertical: \@@_hskip:
+ \@@_box_spread_name:NNn #2 #4 { title }
+ \mode_leave_vertical: #1
% \end{macrocode}
% 这里需要存储 \tn{prevdepth} 的值,以使 \tn{parbox} 后行距正确。
% \footnote{\url{https://tex.stackexchange.com/q/34971/}}
% \begin{macrocode}
- \parbox [ t ] { #2 }
+ \parbox [ t ] { #3 }
{
- \dim_set_eq:NN \tex_baselineskip:D \c_@@_clineskip_dim
\c_@@_fmt_covertitle_tl \@@_uline_title:
\dim_gset_eq:NN \l_@@_tmpa_dim \tex_prevdepth:D
}
\tex_par:D
\dim_set_eq:NN \tex_prevdepth:D \l_@@_tmpa_dim
}
+\cs_new:Npn \@@_cover_entry_title:NNN { \@@_cover_entry_title:NNNN \@@_hskip: }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_cover_entry:NNNn}
+% \begin{macro}{\@@_cover_entry:NNNNn,\@@_cover_entry:NNNn}
% 生成单项信息条目。
% \begin{arguments}
+% \item 分隔符
% \item 名称盒子宽度,|dim| 型变量
% \item 内容盒子宽度,|dim| 型变量
% \item 标签格式
% \item 条目名称
% \end{arguments}
% \begin{macrocode}
-\cs_new_protected:Npn \@@_cover_entry:NNNn #1#2#3#4
+\cs_new_protected:Npn \@@_cover_entry:NNNNn #1#2#3#4#5
{
- \@@_box_spread_name:NNn #1 #3 { #4 } \@@_hskip:
- \@@_box_ulined_info:Nn #2 { #4 } \tex_par:D
+ \@@_box_spread_name:NNn #2 #4 { #5 } #1
+ \@@_box_ulined_info:Nn #3 { #5 } \tex_par:D
}
+\cs_new:Npn \@@_cover_entry:NNNn { \@@_cover_entry:NNNNn \@@_hskip: }
% \end{macrocode}
% \end{macro}
%
@@ -3849,6 +3928,12 @@ To produce the documentation run the original source files ending with
I~ have~ loaded~ "#1"~ by~ default.~ Maybe~ You~ should~
refer~ to~ section~ 4~ of~ the~ documentation.
}
+\@@_msg:nn { missing-stzhongs }
+ {
+ "STZHONGS.TTF"~ is~ not~ found~ in~ your~ system.\\
+ The~ font~ is~ normally~ distributed~ with~ MS~ Windows.~
+ I~ have~ used~ songti~ for~ substitution.
+ }
% \end{macrocode}
%
%
@@ -4365,29 +4450,21 @@ To produce the documentation run the original source files ending with
\RequirePackage { lua-ul }
\NewDocumentCommand \njuline { m } { \underLine{#1} \@@_null: }
}
+%</class>
% \end{macrocode}
% \end{macro}
%
% 使用 \pkg{tabularray} 绘制研究生的出版授权书。
% \begin{macrocode}
-%</class>
%<def-g>\bool_if:NT \g_@@_opt_decl_bool { \RequirePackage { tabularray } }
-%<*class>
% \end{macrocode}
%
% \subsubsection{检查宏包}
%
-% \begin{macro}{\@@_if_pkg_loaded:nTF}
-% 等效于 \tn{IfPackageLoadedTF}。
-% \begin{macrocode}
-% \prg_new_conditional:Npnn \@@_if_pkg_loaded:n #1 { T }
-% { \@ifpackageloaded {#1} { \prg_return_true: } { \prg_return_false: } }
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macro}{\@@_check_pkg_version:nnn}
% 检查宏包版本是否过时。
% \begin{macrocode}
+%<*class>
\cs_new_protected:Npn \@@_check_pkg_version:nnn #1#2#3
{
\@ifpackagelater {#1} {#2}
@@ -4581,23 +4658,53 @@ To produce the documentation run the original source files ending with
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{info/clc,info/secret-level,info/udc,info/supervisor-contact}
-% 国家图书馆封面相关信息。
+% \begin{macro}{info/clc,info/udc}
+% 分类号。
% \begin{macrocode}
clc .tl_set:N = \g_@@_info_clc_tl ,
- secret-level .tl_set:N = \g_@@_info_secretlv_tl ,
udc .tl_set: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 ,
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{info/supervisor-contact}
+% 导师联系方式。
+% \begin{macrocode}
supervisor-contact .tl_set:N = \g_@@_info_supvcont_tl ,
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/email}
-% \changes{v0.14}{2022/01/12}{新增电邮地址信息项。}
+% \changes{v0.14}{2022/01/12}{新增电邮地址设置项。}
% 用于学位论文出版授权书的电子邮件地址。
% \begin{macrocode}
- email .tl_set:N = \g_@@_info_email_tl
+ email .tl_set:N = \g_@@_info_email_tl ,
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{info/school-code}
+% \changes{v1.2}{2023/04/27}{新增学校代码设置项。}
+% 学校代码。
+% \begin{macrocode}
+ school-code .tl_set:N = \g_@@_info_code_tl ,
+ school-code .initial:n = { 10284 } ,
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{info/degree*}
+% \changes{v1.2}{2023/04/24}{新增学位名称设置项。}
+% 覆盖预定义的学位字段。
+% \begin{macrocode}
+ degree* .tl_set:N = \g_@@_info_degree_en_tl
}
% \end{macrocode}
+% \end{macro}
%
% 将指定信息项归入 \opt{anonymous} 组,以在盲审模式下选择性屏蔽。
% \begin{macrocode}
@@ -4606,7 +4713,6 @@ To produce the documentation run the original source files ending with
\clist_map_inline:Nn \c_@@_name_anon_en_clist
{ \keys_define:nn { nju / info } { #1 * .groups:n = { anonymous } } }
% \end{macrocode}
-% \end{macro}
%
% \changes{v0.15}{2022/01/22}{正确处理双导师信息。}
% \changes{v1.1}{2022/11/04}{修复研究生模板封面的导师信息居中问题。}
@@ -4695,22 +4801,12 @@ To produce the documentation run the original source files ending with
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}{\g_@@_info_type_en_tl}
+% \begin{variable}{\g_@@_info_degree_en_tl}
% 英文的学位字样。
% \begin{macrocode}
-\tl_new:N \g_@@_info_type_en_tl
-\tl_set:Nx \g_@@_info_type_en_tl
+\tl_new:N \g_@@_info_degree_en_tl
+\tl_set:Nx \g_@@_info_degree_en_tl
{ \clist_item:Nn \c_@@_name_type_en_clist { \g_@@_info_type_int } }
-% \end{macrocode}
-% \end{variable}
-%
-% \begin{variable}{\g_@@_info_degree_tl}
-% 学位类型字样。
-% \begin{macrocode}
-\tl_new:N \g_@@_info_degree_tl
-\tl_set_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 { 专业 } }
%</def-g>
% \end{macrocode}
% \end{variable}
@@ -4995,6 +5091,25 @@ To produce the documentation run the original source files ending with
% \end{macrocode}
% \end{variable}
%
+% \begin{macro}{\@@_loadfont_stzhongs:,\@@_stzhongs:}
+% \changes{v1.2}{2023/04/30}{在研究生模板载入华文中宋。}
+% 研究生封面额外需要的华文中宋。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_loadfont_stzhongs:
+ {
+ \fontspec_font_if_exist:nTF { 华文中宋 }
+ {
+ \newCJKfontfamily \@@_stzhongs: { 华文中宋 }
+ [ \c_@@_name_fakebold_tl ]
+ }
+ {
+ \cs_set_eq:NN \@@_stzhongs: \rmfamily
+ \msg_warning:nn { njuthesis } { missing-stzhongs }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
%
% \subsubsection{定义数学字库}
%
@@ -5184,6 +5299,12 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
% \BeforeBeginEnvironment { document } { \@@_loadfont: }
\@@_loadfont:
+%</class>
+% \end{macrocode}
+%
+% 只有研究生模板需要华文中宋。我们把它放在文档类最后载入。
+% \begin{macrocode}
+%<def-g>\ctex_at_end:n { \@@_loadfont_stzhongs: }
% \end{macrocode}
%
%
@@ -5193,10 +5314,11 @@ To produce the documentation run the original source files ending with
%
% 使用\pkg{geometry}设置页边距。
% \begin{macrocode}
+%<*class>
\geometry
{
- vmargin = 2.5 cm,
- hmargin = 3.2 cm,
+ vmargin = 2.54 cm,
+ hmargin = 3.18 cm,
headheight = 15 pt
}
% \end{macrocode}
@@ -6353,13 +6475,14 @@ To produce the documentation run the original source files ending with
%
% \begin{macro}{u/cover/emblem-img}
% \changes{v1.1}{2023/01/15}{本科生模板封面校徽居中。}
+% \changes{v1.2}{2023/05/02}{更正本科生模板封面字体和行距。}
% 本科生封面校徽图片实例。
% \begin{macrocode}
%<*def-u>
\@@_declare_element:nn { u / cover / emblem-img }
{
content = \@@_emblem:N \c_@@_emblemwd_dim,
- bottom-skip = 10 pt
+ bottom-skip = 1.2 cm
}
% \end{macrocode}
% \end{macro}
@@ -6370,7 +6493,7 @@ To produce the documentation run the original source files ending with
\@@_declare_element:nn { u / cover / name-img }
{
content = \@@_name:N \c_@@_namewd_dim,
- bottom-skip = 10 pt,
+ bottom-skip = 1 cm,
}
% \end{macrocode}
% \end{macro}
@@ -6380,11 +6503,9 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\@@_declare_element:nn { u / cover / title }
{
- content =
- \dim_set:Nn \l_@@_tmpb_dim { 217 pt }
- \@@_box_spread_name:Nn \l_@@_tmpb_dim { type },
- format = \zihao { -1 } \bfseries,
- bottom-skip = 10 pt plus 1 fill
+ content = \@@_name:n { type },
+ format = \zihao { 1 } \bfseries \@@_set_ccglue:n { .5 em },
+ bottom-skip = 0 cm plus 1 fill
}
% \end{macrocode}
% \end{macro}
@@ -6394,13 +6515,8 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\@@_declare_element:nn { u / cover / info }
{
- content =
- \@@_u_cover_info:NNNN
- \c_@@_clabelwd_dim
- \c_@@_crulewd_dim
- \c_@@_hsep_dim
- \c_@@_fmt_coverlabel_tl,
- format = \zihao { 3 }
+ content = \@@_u_cover_info:,
+ format = \zihao { 3 } \kaishu
}
% \end{macrocode}
% \end{macro}
@@ -6416,7 +6532,6 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\cs_new_protected:Npn \@@_u_cover_info:NNNN #1#2#3#4
{
- \dim_set_eq:NN \tex_baselineskip:D \c_@@_clineskip_dim
\@@_cover_entry:NNNn #1 #2 #4 { dept }
\@@_cover_entry:NNNn #1 #2 #4 { major }
\@@_cover_entry_title:NNN #1 #2 #4
@@ -6435,7 +6550,18 @@ To produce the documentation run the original source files ending with
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\@@_u_cover_info:}
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_u_cover_info:
+ {
+ \@@_u_cover_info:NNNN \c_@@_clabelwd_dim \c_@@_crulewd_dim
+ \c_@@_hsep_dim \c_empty_tl
+ }
+% \end{macrocode}
+% \end{macro}
+%
% \subparagraph{诚信承诺书}
+% \changes{v1.2}{2023/05/02}{更正本科生模板承诺书行距。}
%
% \begin{macro}{u/decl/orig/emblem}
% 本科生诚信承诺书校徽实例。
@@ -6450,11 +6576,12 @@ To produce the documentation run the original source files ending with
%
% \begin{macro}{u/decl/orig/title}
% 本科生诚信承诺书标题实例。
+% Word 模板中的行距是固定值 \qty{36}{bp},这里需要除以 1.625 的 \tn{linespread}。
% \begin{macrocode}
\@@_declare_element:nn { u / decl / orig / title }
{
content = \c_@@_name_origdecl_tl,
- format = \zihao { -1 } \sffamily,
+ format = \sffamily \@@_fontsize:nn { 24 bp } { 22.15 bp } \bfseries,
bottom-skip = 50 pt
}
% \end{macrocode}
@@ -6466,9 +6593,9 @@ To produce the documentation run the original source files ending with
\@@_declare_element:nn { u / decl / orig / text }
{
content = \c_@@_text_origdecl_tl,
- format = \zihao { -3 },
+ format = \@@_zihao:nn { 1.9 } { -3 },
align = n,
- bottom-skip = 0 pt plus 1 fil
+ bottom-skip = 2.7 cm
}
% \end{macrocode}
% \end{macro}
@@ -6478,9 +6605,9 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\@@_declare_element:nn { u / decl / orig / sign }
{
- content = \@@_decl_sign:,
- format = \zihao { -3 },
- align = r
+ content = \@@_decl_sign:,
+ format = \zihao { -3 } \sffamily,
+ align = r
}
%</def-u>
% \end{macrocode}
@@ -6494,7 +6621,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 }
- { \@@_vskip: \@@_name:n { ##1 } : \@@_uline:n { 7 em } }
+ { \tex_par:D \@@_name:n { ##1 } : \hbox_to_wd:nn { 6 em } { } }
}
%</(def-u|def-g)>
% \end{macrocode}
@@ -6502,17 +6629,34 @@ To produce the documentation run the original source files ending with
%
% \paragraph{研究生}
% \changes{v1.0}{2022/06/30}{调整研究生封面布局。}
+% \changes{v1.2}{2023/05/01}{更新2023年新版研究生学位论文封面布局。}
%
% \subparagraph{正面} 包括校名、校徽、标题、信息栏。
%
+% \begin{macro}{g/cover-front/top}
+% 研究生封面顶部信息实例。
+% 因为我们设置了全局的 |linespread=1.625|,此处单倍行距对应的倍数为 $1.3/1.2$。
+% \begin{macrocode}
+%<*def-g>
+\@@_declare_element:nn { g / cover-front / top }
+ {
+ content =
+ \skip_vertical:n { -9 bp } \skip_horizontal:n { -.5 cm }
+ \vbox:n { \@@_g_cover_top: },
+ format = \normalfont \@@_zihao:nn { 1.083 } { -5 },
+ bottom-skip = 20 pt,
+ align = l
+ }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{g/cover-front/emblem-img}
% 研究生封面校徽图片实例。
% \begin{macrocode}
-%<*def-g>
\@@_declare_element:nn { g / cover-front / emblem-img }
{
- content = \@@_emblem:N \c_@@_emblemwdi_dim,
- bottom-skip = 20 pt
+ content = \@@_emblem:N \c_@@_emblemwd_dim,
+ bottom-skip = .47 cm
}
% \end{macrocode}
% \end{macro}
@@ -6523,7 +6667,7 @@ To produce the documentation run the original source files ending with
\@@_declare_element:nn { g / cover-front / name-img }
{
content = \@@_name:N \c_@@_namewd_dim,
- bottom-skip = 70 pt
+ bottom-skip = 2.25 cm
}
% \end{macrocode}
% \end{macro}
@@ -6533,23 +6677,11 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\@@_declare_element:nn { g / cover-front / type }
{
- content =
- \dim_set:Nn \l_@@_tmpb_dim { 266 pt }
- \@@_box_spread_name:Nn \l_@@_tmpb_dim { type },
- format = \zihao { 1 } \bfseries,
- bottom-skip = 20 pt
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{g/cover-front/degree}
-% 研究生封面标题实例。
-% \begin{macrocode}
-\@@_declare_element:nn { g / cover-front / degree }
- {
- content = \c_@@_name_apply_tl,
- format = \zihao { 1 } \bfseries,
- bottom-skip = 40 pt plus 1 fill
+ content = \@@_info:n { type } \@@_name:n { type },
+ format =
+ \@@_fontsize:nn { 28 bp } { 28 bp } \@@_stzhongs: \bfseries
+ \@@_set_ccglue:n { .5 em },
+ bottom-skip = 20 pt plus 1 fill
}
% \end{macrocode}
% \end{macro}
@@ -6559,12 +6691,7 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\@@_declare_element:nn { g / cover-front / info }
{
- content =
- \@@_g_cover_info:NNNN
- \c_@@_clabelwd_dim
- \c_@@_crulewd_dim
- \c_@@_hsep_dim
- \c_@@_fmt_coverlabel_tl,
+ content = \@@_g_cover_info:,
bottom-skip = 20 pt plus 1 fill
}
% \end{macrocode}
@@ -6574,25 +6701,48 @@ To produce the documentation run the original source files ending with
% 研究封面日期实例。
% \begin{macrocode}
\@@_declare_element:nn { g / cover-front / date }
- { content = \g_@@_info_submitdate_tl }
+ {
+ content = \g_@@_info_submitdate_tl,
+ bottom-skip = 2.2 cm
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_g_cover_top:}
+% 研究生封面顶部信息栏。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_g_cover_top:
+ {
+ \dim_set:Nn \l_@@_tmpa_dim { 4 em }
+ \dim_set:Nn \l_@@_tmpb_dim { 5 em }
+ \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 }
+ }
+ }
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_g_cover_info:NNNN}
-% 研究生封面信息栏。
-% \begin{arguments}
-% \item 名称盒子宽度,|dim| 型变量
-% \item 内容盒子宽度,|dim| 型变量
-% \item 间隔宽度,|dim| 型变量
-% \item 标签格式
-% \end{arguments}
+% 研究生封面中部信息栏。
% \begin{macrocode}
\cs_new_protected:Npn \@@_g_cover_info:NNNN #1#2#3#4
{
- \dim_set_eq:NN \tex_baselineskip:D \c_@@_clineskip_dim
- \@@_cover_entry_title:NNN #1 #2 #4
+ \@@_cover_entry_title:NNNN #1 #2 #3 #4
\clist_map_inline:nn { author, major, field, supvfull }
- { \@@_cover_entry:NNNn #1 #2 #4 { ##1 } }
+ { \@@_cover_entry:NNNNn #1 #2 #3 #4 { ##1 } }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_g_cover_info:}
+% \begin{macrocode}
+\cs_new:Npn \@@_g_cover_info:
+ {
+ \tl_set:Nn \l_@@_tmpa_tl { \skip_horizontal:n { .7 cm } }
+ \@@_g_cover_info:NNNN \l_@@_tmpa_tl
+ \c_@@_clabelwd_dim \c_@@_crulewd_dim \c_@@_fmt_coverlabel_tl
}
% \end{macrocode}
% \end{macro}
@@ -6604,32 +6754,71 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\@@_declare_element:nn { g / cover-back / info }
{
- content =
- \@@_g_cover_back:NN
- \c_@@_clabelwd_dim
- \c_@@_fmt_coverlabel_tl,
+ content = \@@_g_cover_back:,
+ bottom-skip = 8.1 cm
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{g/cover-back/sign}
+% 研究生封面背面信息实例。
+% \begin{macrocode}
+\@@_declare_element:nn { g / cover-back / sign }
+ {
+ content = \@@_g_cover_sign:,
align = l
}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_cover_back_g:NN}
-% 研究生封面背面信息。格式存在变化,没有使用循环来简化。
+% \begin{macro}{\@@_cover_back_g:NNN,\@@_cover_back_g:}
+% 研究生封面背面信息。
+% \begin{arguments}
+% \item 名称盒子宽度,|dim| 型变量
+% \item 内容盒子宽度,|dim| 型变量
+% \item 标签格式
+% \end{arguments}
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_g_cover_back:NNN #1#2#3
+ {
+ \@@_cover_entry:NNNNn \c_empty_tl #1 #2 #3 { chairman }
+ \tex_par:D
+ \@@_box_spread_name:NNn #1 #3 { reviewer }
+ \parbox [ t ] { #2 }
+ {
+ \@@_box_multiline:NNn \g_@@_info_reviewer_clist #2 { 5 }
+ \dim_gset_eq:NN \l_@@_tmpa_dim \tex_prevdepth:D
+ }
+ \tex_par:D
+ \dim_set_eq:NN \tex_prevdepth:D \l_@@_tmpa_dim
+ \@@_box_spread_name:NNn #1 #3 { defend date }
+ \@@_box_center:Nn #2 { \@@_info:n { defend date } }
+ }
+\cs_new:Npn \@@_g_cover_back:
+ {
+ \@@_g_cover_back:NNN \c_@@_clabelwdi_dim
+ \c_@@_crulewdi_dim \c_@@_fmt_coverlabel_tl
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_cover_sign_g:NNN,\@@_cover_sign_g:}
+% 研究生封面背面信息。
% \begin{arguments}
% \item 名称盒子宽度,|dim| 型变量
% \item 标签格式
+% \item 分隔符
% \end{arguments}
% \begin{macrocode}
-\cs_new_protected:Npn \@@_g_cover_back:NN #1#2
+\cs_new_protected:Npn \@@_g_cover_sign:NNN #1#2#3
{
- \dim_set_eq:NN \tex_baselineskip:D \c_@@_clineskip_dim
- \@@_box_spread_name:NNn #1 #2 { id }
- \c_@@_name_colon_tl \g_@@_info_id_tl \tex_par:D
- \@@_box_spread_name:NNn #1 #2 { defenddate }
- \c_@@_name_colon_tl \g_@@_info_defenddate_tl \tex_par:D
- \@@_box_spread_name:NNn #1 #2 { supvfull }
- \c_@@_name_colon_tl \skip_horizontal:n { 8 em }
- { #2 \c_@@_name_sign_tl }
+ \@@_box_spread_name:NNn #1 #2 { sign a } #3 \tex_par:D
+ \@@_box_spread_name:NNn #1 #2 { sign b } #3
+ }
+\cs_new:Npn \@@_g_cover_sign:
+ {
+ \@@_g_cover_sign:NNN \c_@@_clabelwdii_dim
+ \c_@@_fmt_coverlabel_tl \c_@@_name_colon_tl
}
% \end{macrocode}
% \end{macro}
@@ -6657,13 +6846,13 @@ To produce the documentation run the original source files ending with
{ by }
\skip_vertical:N \c_zero_skip
\textbf { \sffamily \g_@@_info_author_en_tl }
- \skip_vertical:n { .5 cm }
+ \skip_vertical:n { .5 cm minus .5 cm }
{ Supervised~ by }
\skip_vertical:N \c_zero_skip
\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
+ bottom-skip = 0 pt plus 1.2 fil minus 1 cm
}
% \end{macrocode}
% \end{macro}
@@ -6675,7 +6864,7 @@ To produce the documentation run the original source files ending with
{
content =
\c_@@_text_cover_en_tl \@@_vskip:
- \group_begin: \scshape \g_@@_info_type_en_tl \group_end:
+ \group_begin: \scshape \g_@@_info_degree_en_tl \group_end:
\@@_vskip: { in } \@@_vskip: \g_@@_info_major_en_tl,
bottom-skip = 2 cm
}
@@ -6856,11 +7045,10 @@ To produce the documentation run the original source files ending with
\cs_new_protected:Npn \@@_cover_bottom_nl:
{
\dim_set:Nn \l_@@_tmpa_dim { 9 em }
- \c_@@_name_chairman_tl \@@_hskip:
+ \@@_name:n { chairman } \@@_name:n { colon } \@@_hskip:
\@@_box_ulined_info:Nn \l_@@_tmpa_dim { chairman } \tex_par:D
- \c_@@_name_reviewer_tl \@@_hskip:
- \@@_box_multiline:NNNN \l_@@_tmpa_int \l_@@_tmpb_int
- \g_@@_info_reviewer_clist \l_@@_tmpa_dim
+ \@@_name:n { reviewer } \@@_name:n { colon } \@@_hskip:
+ \@@_box_multiline:NNn \g_@@_info_reviewer_clist \l_@@_tmpa_dim { 4 }
}
% \end{macrocode}
% \end{macro}
@@ -7116,7 +7304,6 @@ To produce the documentation run the original source files ending with
% \end{macrocode}
% 用循环输出各字段。
% \begin{macrocode}
- \dim_set_eq:NN \tex_baselineskip:D \c_@@_clineskip_dim
\clist_map_inline:Nn \l_@@_tmp_clist
{
\@@_box_spread_name:NNn #1 #2 { ##1 }
@@ -7232,6 +7419,7 @@ To produce the documentation run the original source files ending with
{
element = { emblem-img, name-img, title, info },
prefix = u / cover /,
+ top-skip = -.3 cm,
bottom-skip = 0 pt plus 1 fill
}
% \end{macrocode}
@@ -7244,7 +7432,6 @@ To produce the documentation run the original source files ending with
{
element = { emblem, title, text, sign },
prefix = u / decl / orig /,
- top-skip = 0 pt,
bottom-skip = 0 pt plus 1 fil
}
%</def-u>
@@ -7257,7 +7444,7 @@ To produce the documentation run the original source files ending with
%<*def-g>
\@@_declare_page:nn { cover-g-front }
{
- element = { emblem-img, name-img, type, degree, info, date },
+ element = { top, emblem-img, name-img, type, info, date },
prefix = g / cover-front /,
format = \zihao { 3 } \kaishu,
top-skip = 0 pt
@@ -7270,10 +7457,10 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\@@_declare_page:nn { cover-g-back }
{
- element = { info },
+ element = { info, sign },
prefix = g / cover-back /,
format = \zihao { 3 } \kaishu,
- top-skip = 500 pt
+ top-skip = 5.3 cm
}
% \end{macrocode}
% \end{macro}
@@ -7729,21 +7916,29 @@ To produce the documentation run the original source files ending with
% \begin{macro}{\@@_abs_info_en_g:N}
% \changes{v1.0}{2022/07/01}{移除研究生英文摘要的下划线。}
% \changes{v1.1}{2022/12/12}{恢复研究生英文摘要的下划线。}
-% 绘制研究生英文摘要信息栏。
+% 绘制研究生英文摘要信息栏。因为到底要不要下划线这回事说不清楚,
+% 所以不做选择了全都整上。
% \begin{arguments}
% \item 分隔符
% \end{arguments}
% \begin{macrocode}
\cs_new_protected:Npn \@@_abs_info_en_g:N #1
{
- \@@_uline_list:NNx \g_@@_info_title_en_tl \g_@@_abs_title_left_skip
- { \c_@@_name_title_en_tl #1 }
- \clist_map_inline:nn { major, author, supvfull }
+ \bool_if:NTF \g_@@_abs_underline_bool
{
- \tex_par:D
- \@@_get_width_print:Nx \l_@@_tmpa_dim
- { \@@_name:n { ##1 _en } #1 }
- \@@_box_ulined_info:Nn \l_@@_tmpa_dim { ##1 _en }
+ \@@_uline_list:NNx \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
+ { \@@_name:n { ##1 _en } #1 }
+ \@@_box_ulined_info:Nn \l_@@_tmpa_dim { ##1 _en }
+ }
+ }
+ {
+ \clist_map_inline:nn { title, major, author, supvfull }
+ { \@@_name:n { ##1 _en } #1 \@@_info:n { ##1 _en } \\ }
}
}
%</def-g>
@@ -7841,7 +8036,16 @@ To produce the documentation run the original source files ending with
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{style/title-style}
+% \begin{macro}{abstract/underline}
+% \changes{v1.2}{2023/04/23}{新增研究生英文摘要页下划线选项。}
+% 是否为研究生英文摘要条目内容添加下划线。
+% \begin{macrocode}
+ underline .bool_set:N = \g_@@_abs_underline_bool,
+ underline .initial:n = true,
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{abstract/title-style}
% \changes{v0.16}{2022/03/26}{可选择研究生摘要标题样式。}
% 选择摘要样式,默认为 \opt{strict}。
% \begin{macrocode}
@@ -7924,7 +8128,7 @@ To produce the documentation run the original source files ending with
% \begin{macro}{\njupaperlist}
% \changes{v0.10}{2021/09/29}{新增了成果列表页面。}
% \changes{v0.14}{2021/12/20}{成果列表中可突出指定作者姓名及年份。}
-% \changes{v0.19}{2022/05/22}{修复成果列表与章末参考文献表的冲突。}
+% \changes{v1.2}{2023/04/07}{修复成果列表与章末参考文献表的冲突。}
% 成果列表。
% \begin{macrocode}
\NewDocumentCommand \njupaperlist
@@ -7934,32 +8138,26 @@ To produce the documentation run the original source files ending with
% \end{macrocode}
% 修改姓名的显示方式,使被注解的姓名可被加粗下划线表示。
% \begin{macrocode}
- \RenewDocumentCommand \mkbibnamegiven { m }
- { \ifitemannotation { thesisauthor }
- { \njuline { \bf ##1 } } { ##1 } }
- \RenewDocumentCommand \mkbibnamefamily { m }
- { \ifitemannotation { thesisauthor }
- { \njuline { \bf ##1 } } { ##1 } }
+ \RenewDocumentCommand \mkbibnamegiven { m }
+ { \ifitemannotation { thesisauthor }
+ { \njuline { \bf ##1 } } { ##1 } }
+ \RenewDocumentCommand \mkbibnamefamily { m }
+ { \ifitemannotation { thesisauthor }
+ { \njuline { \bf ##1 } } { ##1 } }
% \end{macrocode}
% 修改年份的显示方式,默认进行加粗。
% \begin{macrocode}
- \RenewDocumentCommand \mkbibdateshort { m m m }
- { \textbf { \thefield { ##1 } } }
+ \RenewDocumentCommand \mkbibdateshort { m m m }
+ { \textbf { \thefield { ##1 } } }
% \end{macrocode}
-% 在使用章末参考文献表时,\env{refsection} 在单独一章范围内生效,
-% 无需额外添加环境。 ^^A TODO: 待修改为更简洁的形式
+% \changes{v1.1}{2023/04/07}{修复章末参考文献表与成果列表的冲突问题。}
+% 相较于直接使用 \env{refsection} 环境,\tn{newrefsection} 命令可以
+% 自动结束上一个 \env{refsection},与章末参考文献表格式兼容更好。
% \begin{macrocode}
- \tl_if_eq:NnTF \blx@refsecreset@level { 2 }
- {
- \nocite { #2 }
- \printbibliography [ heading = subbibliography, title = #1 ]
- }
- {
- \begin{refsection}
- \nocite { #2 }
- \printbibliography [ heading = subbibliography, title = #1 ]
- \end{refsection}
- }
+ \newrefsection
+ \nocite { #2 }
+ \printbibliography [ heading = subbibliography, title = #1 ]
+ \endrefsection
\group_end:
}
% \end{macrocode}
@@ -8063,7 +8261,6 @@ To produce the documentation run the original source files ending with
{
{ acknowledgement } { 致 \qquad{} 谢 },
{ acknowledgement a } { 致谢(盲审阶段,暂时隐去) },
-%<def-g> { apply } {(申请 \g_@@_info_degree_tl 学位)},
%<def-g> { auth decl } { 学位论文出版授权书 },
%<def-p> { auth decl } { 研究报告使用授权书 },
%<def-p> { author } { 作者 },
@@ -8075,8 +8272,9 @@ To produce the documentation run the original source files ending with
%<def-g> { auth sign } { 作者签名:\njuline{\hspace{6em}} },
%<def-p> { auth sign } { 本人签名 },
%<def-p> { auth sign a } { 导师签名 },
-%<def-g> { chairman } { 答辩委员会主席: },
+%<def-g> { chairman } { 答辩委员会主席 },
%<def-g> { clc } { 分类号 },
+%<def-g> { code } { 学校代码 },
%<def-g> { confer } { 学位授予单位和日期 },
{ date } { 日期 },
%<def-g> { defend date } { 论文答辩日期 },
@@ -8123,7 +8321,7 @@ To produce the documentation run the original source files ending with
{ pdf creator } { LaTeX~ with~ njuthesis~ class },
{ preface } { 前 \qquad{} 言 },
%<def-p> { report } { 博士后研究工作报告 },
-%<def-g> { reviewer } { 评阅人: },
+%<def-g> { reviewer } { 评阅人 },
%<def-g> { secret lv } { 密级 },
%<def-g> { secret status } { 论文涉密情况: },
%<def-g> { secret free } { 不保密 },
@@ -8131,6 +8329,8 @@ To produce the documentation run the original source files ending with
%<def-g> { 保密,保密期( \c_@@_name_blankdatea_tl 至
%<def-g> \c_@@_name_blankdatea_tl ) },
%<def-g> { sign } { (签字) },
+%<def-g> { sign a } { 研究生签名 },
+%<def-g> { sign b } { 导师签名 },
%<def-u> { submit date } { 提交日期 },
%<def-g> { submit date } { 论文提交日期 },
%<def-p> { submit date } { 完成日期 },
@@ -8184,10 +8384,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> { 南京大学本科生毕业论文(设计、作品)中文摘要 }
-%<def-u> { 南京大学本科生毕业论文(设计、作品)英文摘要 },
-%<def-g> { 南京大学研究生毕业论文中文摘要首页用纸 }
-%<def-g> { 南京大学研究生毕业论文英文摘要首页用纸 },
+%<def-u> { \c_@@_name_nju_tl 本科生毕业论文(设计、作品)中文摘要 }
+%<def-u> { \c_@@_name_nju_tl 本科生毕业论文(设计、作品)英文摘要 },
+%<def-g> { \c_@@_name_nju_tl 研究生毕业论文中文摘要首页用纸 }
+%<def-g> { \c_@@_name_nju_tl 研究生毕业论文英文摘要首页用纸 },
{ appendix } { 附录 } { appendix },
%<def-u> { author } { 学生姓名 } { UNDERGRADUATE },
%<def-g> { author } { 作者姓名 } { POSTGRADUATE },
@@ -8204,12 +8404,12 @@ To produce the documentation run the original source files ending with
{ nju } { 南京大学 } { Nanjing~ University },
{ suffix } { } { _en },
%<def-u> { supv full } { 指导教师(姓名、职称) } { MENTOR },
-%<def-g> { supv full } { 指导教师 } { MENTOR },
+%<def-g> { supv full } { 导师姓名 } { MENTOR },
{ table } { 表 } { table },
%<def-u> { title } { 题目 } { THESIS },
%<def-g> { title } { 论文题目 } { THESIS },
-%<def-u> { type } { 本科毕业论文 } { u }
-%<def-g> { type } { 研究生毕业论文 } { g }
+%<def-u> { type } { 本科毕业论文 } { u }
+%<def-g> { type } { 学位论文 } { g }
}
{ \@@_define_name:nnn #1 }
% \end{macrocode}
@@ -8300,39 +8500,37 @@ To produce the documentation run the original source files ending with
%
% \changes{v0.17}{2022/04/09}{将长度值分离到 \file{.def} 文件。}
% \changes{v1.0}{2022/06/11}{可以单独指定下划线的宽度和偏移。}
-% 默认固定长度值。
+% 默认固定长度值。此处名称的空格仅用来提升可读性,在生成变量名时会被删去。
% \begin{macrocode}
\clist_map_inline:nn
{
% \end{macrocode}
-% 封面信息栏的行距。此处的空格仅用来提升可读性,在生成变量名时会被删去。
-% \begin{macrocode}
-%<def-u> { c lineskip } { 36 pt },
-%<def-g> { c lineskip } { 32 pt },
-%<def-p> { c lineskip } { 28 pt },
-% \end{macrocode}
% 封面信息栏标签的宽度。
% \begin{macrocode}
%<def-u> { c label wd } { 68 pt },
-%<def-g> { c label wd } { 80 pt },
+%<def-g> { c label wd } { 2.97 cm },
+%<def-g> { c label wd i } { 3.90 cm },
+%<def-g> { c label wd ii } { 2.62 cm },
%<def-p> { c label wd } { 50 pt },
% \end{macrocode}
% 封面信息栏横线的宽度。
% \begin{macrocode}
-%<def-u> { c rule wd } { 270 pt },
-%<def-g> { c rule wd } { 240 pt },
+%<def-u> { c rule wd } { 8 cm },
+%<def-g> { c rule wd } { 6.7 cm },
+%<def-g> { c rule wd i } { 6.2 cm },
+%<def-g> { c type wd } { 239 pt },
% \end{macrocode}
% 校徽图片的宽度。
% \begin{macrocode}
%<def-u> { emblem wd } { 68 pt },
+%<def-g> { emblem wd } { 40 pt },
%<def-u> { emblem wd i } { 68 pt },
-%<def-g> { emblem wd i } { 46 pt },
%<def-g> { emblem wd ii } { 61 pt },
% \end{macrocode}
% 校名图片的宽度。
% \begin{macrocode}
%<def-u> { name wd } { 300 pt },
-%<def-g> { name wd } { 126 pt },
+%<def-g> { name wd } { 111 pt },
%<def-p> { name wd } { 220 pt },
% \end{macrocode}
% 下划线高度(厚度)。下划线绘制命令是通用的,因此没有作文件区分。
@@ -8348,7 +8546,8 @@ To produce the documentation run the original source files ending with
% \end{macrocode}
% 小幅空格。
% \begin{macrocode}
- { h sep } { 5 pt },
+%<def-u> { h sep } { 0 pt },
+%<def-g|def-p> { h sep } { 5 pt },
{ v sep } { 1 ex },
% \end{macrocode}
% 章节标题前后间距。
@@ -8376,8 +8575,7 @@ To produce the documentation run the original source files ending with
%<def-g|def-p> { pagestyle } { headings },
{ abslabel } { \bfseries },
{ abslabel_en } { },
-%<def-u> { cover title } { \bfseries },
-%<def-g> { cover title } { },
+ { cover title } { },
%<def-u> { cover label } { \kaishu },
%<def-g> { cover label } { \bfseries },
%<def-p> { cover label } { },
diff --git a/Master/texmf-dist/tex/latex/njuthesis/njuthesis-graduate.def b/Master/texmf-dist/tex/latex/njuthesis/njuthesis-graduate.def
index 6b96701f2ea..69e70da0184 100644
--- a/Master/texmf-dist/tex/latex/njuthesis/njuthesis-graduate.def
+++ b/Master/texmf-dist/tex/latex/njuthesis/njuthesis-graduate.def
@@ -23,7 +23,7 @@
%% To produce the documentation run the original source files ending with
%% `.dtx' through XeTeX.
%%
-\GetIdInfo $Id: njuthesis.dtx 1.1.2 2023-01-15 14:35:00
+\GetIdInfo $Id: njuthesis.dtx 1.2.0 2023-05-02 16:30:00
+0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
{Graduate definition file for njuthesis}
\ProvidesExplFile{njuthesis-graduate.def}
@@ -50,79 +50,113 @@
\tl_new:N \g__nju_info_type_tl
\tl_set:Nx \g__nju_info_type_tl
{ \clist_item:Nn \c__nju_name_type_clist { \g__nju_info_type_int } }
-\tl_new:N \g__nju_info_type_en_tl
-\tl_set:Nx \g__nju_info_type_en_tl
+\tl_new:N \g__nju_info_degree_en_tl
+\tl_set:Nx \g__nju_info_degree_en_tl
{ \clist_item:Nn \c__nju_name_type_en_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
-\bool_if:NF \g__nju_opt_academic_bool
- { \tl_put_right:Nn \g__nju_info_degree_tl { 专业 } }
+\ctex_at_end:n { \__nju_loadfont_stzhongs: }
\cs_new_protected:Npn \__nju_decl_sign:
{
\clist_map_inline:nn { origsign, date }
- { \__nju_vskip: \__nju_name:n { ##1 } : \__nju_uline:n { 7 em } }
+ { \tex_par:D \__nju_name:n { ##1 } : \hbox_to_wd:nn { 6 em } { } }
+ }
+\__nju_declare_element:nn { g / cover-front / top }
+ {
+ content =
+ \skip_vertical:n { -9 bp } \skip_horizontal:n { -.5 cm }
+ \vbox:n { \__nju_g_cover_top: },
+ format = \normalfont \__nju_zihao:nn { 1.083 } { -5 },
+ bottom-skip = 20 pt,
+ align = l
}
\__nju_declare_element:nn { g / cover-front / emblem-img }
{
- content = \__nju_emblem:N \c__nju_emblemwdi_dim,
- bottom-skip = 20 pt
+ content = \__nju_emblem:N \c__nju_emblemwd_dim,
+ bottom-skip = .47 cm
}
\__nju_declare_element:nn { g / cover-front / name-img }
{
content = \__nju_name:N \c__nju_namewd_dim,
- bottom-skip = 70 pt
+ bottom-skip = 2.25 cm
}
\__nju_declare_element:nn { g / cover-front / type }
{
- content =
- \dim_set:Nn \l__nju_tmpb_dim { 266 pt }
- \__nju_box_spread_name:Nn \l__nju_tmpb_dim { type },
- format = \zihao { 1 } \bfseries,
- bottom-skip = 20 pt
- }
-\__nju_declare_element:nn { g / cover-front / degree }
- {
- content = \c__nju_name_apply_tl,
- format = \zihao { 1 } \bfseries,
- bottom-skip = 40 pt plus 1 fill
+ content = \__nju_info:n { type } \__nju_name:n { type },
+ format =
+ \__nju_fontsize:nn { 28 bp } { 28 bp } \__nju_stzhongs: \bfseries
+ \__nju_set_ccglue:n { .5 em },
+ bottom-skip = 20 pt plus 1 fill
}
\__nju_declare_element:nn { g / cover-front / info }
{
- content =
- \__nju_g_cover_info:NNNN
- \c__nju_clabelwd_dim
- \c__nju_crulewd_dim
- \c__nju_hsep_dim
- \c__nju_fmt_coverlabel_tl,
+ content = \__nju_g_cover_info:,
bottom-skip = 20 pt plus 1 fill
}
\__nju_declare_element:nn { g / cover-front / date }
- { content = \g__nju_info_submitdate_tl }
+ {
+ content = \g__nju_info_submitdate_tl,
+ bottom-skip = 2.2 cm
+ }
+\cs_new_protected:Npn \__nju_g_cover_top:
+ {
+ \dim_set:Nn \l__nju_tmpa_dim { 4 em }
+ \dim_set:Nn \l__nju_tmpb_dim { 5 em }
+ \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 }
+ }
+ }
\cs_new_protected:Npn \__nju_g_cover_info:NNNN #1#2#3#4
{
- \dim_set_eq:NN \tex_baselineskip:D \c__nju_clineskip_dim
- \__nju_cover_entry_title:NNN #1 #2 #4
+ \__nju_cover_entry_title:NNNN #1 #2 #3 #4
\clist_map_inline:nn { author, major, field, supvfull }
- { \__nju_cover_entry:NNNn #1 #2 #4 { ##1 } }
+ { \__nju_cover_entry:NNNNn #1 #2 #3 #4 { ##1 } }
+ }
+\cs_new:Npn \__nju_g_cover_info:
+ {
+ \tl_set:Nn \l__nju_tmpa_tl { \skip_horizontal:n { .7 cm } }
+ \__nju_g_cover_info:NNNN \l__nju_tmpa_tl
+ \c__nju_clabelwd_dim \c__nju_crulewd_dim \c__nju_fmt_coverlabel_tl
}
\__nju_declare_element:nn { g / cover-back / info }
{
- content =
- \__nju_g_cover_back:NN
- \c__nju_clabelwd_dim
- \c__nju_fmt_coverlabel_tl,
+ content = \__nju_g_cover_back:,
+ bottom-skip = 8.1 cm
+ }
+\__nju_declare_element:nn { g / cover-back / sign }
+ {
+ content = \__nju_g_cover_sign:,
align = l
}
-\cs_new_protected:Npn \__nju_g_cover_back:NN #1#2
+\cs_new_protected:Npn \__nju_g_cover_back:NNN #1#2#3
+ {
+ \__nju_cover_entry:NNNNn \c_empty_tl #1 #2 #3 { chairman }
+ \tex_par:D
+ \__nju_box_spread_name:NNn #1 #3 { reviewer }
+ \parbox [ t ] { #2 }
+ {
+ \__nju_box_multiline:NNn \g__nju_info_reviewer_clist #2 { 5 }
+ \dim_gset_eq:NN \l__nju_tmpa_dim \tex_prevdepth:D
+ }
+ \tex_par:D
+ \dim_set_eq:NN \tex_prevdepth:D \l__nju_tmpa_dim
+ \__nju_box_spread_name:NNn #1 #3 { defend date }
+ \__nju_box_center:Nn #2 { \__nju_info:n { defend date } }
+ }
+\cs_new:Npn \__nju_g_cover_back:
{
- \dim_set_eq:NN \tex_baselineskip:D \c__nju_clineskip_dim
- \__nju_box_spread_name:NNn #1 #2 { id }
- \c__nju_name_colon_tl \g__nju_info_id_tl \tex_par:D
- \__nju_box_spread_name:NNn #1 #2 { defenddate }
- \c__nju_name_colon_tl \g__nju_info_defenddate_tl \tex_par:D
- \__nju_box_spread_name:NNn #1 #2 { supvfull }
- \c__nju_name_colon_tl \skip_horizontal:n { 8 em }
- { #2 \c__nju_name_sign_tl }
+ \__nju_g_cover_back:NNN \c__nju_clabelwdi_dim
+ \c__nju_crulewdi_dim \c__nju_fmt_coverlabel_tl
+ }
+\cs_new_protected:Npn \__nju_g_cover_sign:NNN #1#2#3
+ {
+ \__nju_box_spread_name:NNn #1 #2 { sign a } #3 \tex_par:D
+ \__nju_box_spread_name:NNn #1 #2 { sign b } #3
+ }
+\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_declare_element:nn { g / cover-en / title }
{
@@ -136,19 +170,19 @@
{ by }
\skip_vertical:N \c_zero_skip
\textbf { \sffamily \g__nju_info_author_en_tl }
- \skip_vertical:n { .5 cm }
+ \skip_vertical:n { .5 cm minus .5 cm }
{ Supervised~ by }
\skip_vertical:N \c_zero_skip
\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
+ bottom-skip = 0 pt plus 1.2 fil minus 1 cm
}
\__nju_declare_element:nn { g / cover-en / middle }
{
content =
\c__nju_text_cover_en_tl \__nju_vskip:
- \group_begin: \scshape \g__nju_info_type_en_tl \group_end:
+ \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
}
@@ -248,11 +282,10 @@
\cs_new_protected:Npn \__nju_cover_bottom_nl:
{
\dim_set:Nn \l__nju_tmpa_dim { 9 em }
- \c__nju_name_chairman_tl \__nju_hskip:
+ \__nju_name:n { chairman } \__nju_name:n { colon } \__nju_hskip:
\__nju_box_ulined_info:Nn \l__nju_tmpa_dim { chairman } \tex_par:D
- \c__nju_name_reviewer_tl \__nju_hskip:
- \__nju_box_multiline:NNNN \l__nju_tmpa_int \l__nju_tmpb_int
- \g__nju_info_reviewer_clist \l__nju_tmpa_dim
+ \__nju_name:n { reviewer } \__nju_name:n { colon } \__nju_hskip:
+ \__nju_box_multiline:NNn \g__nju_info_reviewer_clist \l__nju_tmpa_dim { 4 }
}
\__nju_declare_element:nn { g / decl / orig / title }
{
@@ -355,17 +388,17 @@
}
\__nju_declare_page:nn { cover-g-front }
{
- element = { emblem-img, name-img, type, degree, info, date },
+ element = { top, emblem-img, name-img, type, info, date },
prefix = g / cover-front /,
format = \zihao { 3 } \kaishu,
top-skip = 0 pt
}
\__nju_declare_page:nn { cover-g-back }
{
- element = { info },
+ element = { info, sign },
prefix = g / cover-back /,
format = \zihao { 3 } \kaishu,
- top-skip = 500 pt
+ top-skip = 5.3 cm
}
\__nju_declare_page:nn { cover-g-en }
{
@@ -481,14 +514,21 @@
}
\cs_new_protected:Npn \__nju_abs_info_en_g:N #1
{
- \__nju_uline_list:NNx \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 }
+ \bool_if:NTF \g__nju_abs_underline_bool
+ {
+ \__nju_uline_list:NNx \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_name:n { ##1 _en } #1 }
+ \__nju_box_ulined_info:Nn \l__nju_tmpa_dim { ##1 _en }
+ }
+ }
{
- \tex_par:D
- \__nju_get_width_print:Nx \l__nju_tmpa_dim
- { \__nju_name:n { ##1 _en } #1 }
- \__nju_box_ulined_info:Nn \l__nju_tmpa_dim { ##1 _en }
+ \clist_map_inline:nn { title, major, author, supvfull }
+ { \__nju_name:n { ##1 _en } #1 \__nju_info:n { ##1 _en } \\ }
}
}
\cs_new_protected:Npn \__nju_make_abstract:
@@ -507,12 +547,12 @@
{
{ acknowledgement } { 致 \qquad{} 谢 },
{ acknowledgement a } { 致谢(盲审阶段,暂时隐去) },
- { apply } {(申请 \g__nju_info_degree_tl 学位)},
{ auth decl } { 学位论文出版授权书 },
{ author a } { \g__nju_info_type_tl 生姓名 },
{ auth sign } { 作者签名:\njuline{\hspace{6em}} },
- { chairman } { 答辩委员会主席: },
+ { chairman } { 答辩委员会主席 },
{ clc } { 分类号 },
+ { code } { 学校代码 },
{ confer } { 学位授予单位和日期 },
{ date } { 日期 },
{ defend date } { 论文答辩日期 },
@@ -534,7 +574,7 @@
{ paper list } { 发表文章目录 },
{ pdf creator } { LaTeX~ with~ njuthesis~ class },
{ preface } { 前 \qquad{} 言 },
- { reviewer } { 评阅人: },
+ { reviewer } { 评阅人 },
{ secret lv } { 密级 },
{ secret status } { 论文涉密情况: },
{ secret free } { 不保密 },
@@ -542,6 +582,8 @@
{ 保密,保密期( \c__nju_name_blankdatea_tl 至
\c__nju_name_blankdatea_tl ) },
{ sign } { (签字) },
+ { sign a } { 研究生签名 },
+ { sign b } { 导师签名 },
{ submit date } { 论文提交日期 },
{ subtitle } { (题名和副题名) },
{ supv } { 导师 },
@@ -565,8 +607,8 @@
{ abstract a } { 中文摘要 } { ABSTRACT },
{ abstract b } { 摘\qquad{}要 } { ABSTRACT },
{ abstracttitle }
- { 南京大学研究生毕业论文中文摘要首页用纸 }
- { 南京大学研究生毕业论文英文摘要首页用纸 },
+ { \c__nju_name_nju_tl 研究生毕业论文中文摘要首页用纸 }
+ { \c__nju_name_nju_tl 研究生毕业论文英文摘要首页用纸 },
{ appendix } { 附录 } { appendix },
{ author } { 作者姓名 } { POSTGRADUATE },
{ blankdate } { \qquad{}年 \quad{}月 \quad{}日 } { },
@@ -580,10 +622,10 @@
{ major } { 专业名称 } { SPECIALIZATION },
{ nju } { 南京大学 } { Nanjing~ University },
{ suffix } { } { _en },
- { supv full } { 指导教师 } { MENTOR },
+ { supv full } { 导师姓名 } { MENTOR },
{ table } { 表 } { table },
{ title } { 论文题目 } { THESIS },
- { type } { 研究生毕业论文 } { g }
+ { type } { 学位论文 } { g }
}
{ \__nju_define_name:nnn #1 }
\bool_if:NF \g__nju_opt_academic_bool
@@ -614,12 +656,15 @@
}
\clist_map_inline:nn
{
- { c lineskip } { 32 pt },
- { c label wd } { 80 pt },
- { c rule wd } { 240 pt },
- { emblem wd i } { 46 pt },
+ { c label wd } { 2.97 cm },
+ { c label wd i } { 3.90 cm },
+ { c label wd ii } { 2.62 cm },
+ { c rule wd } { 6.7 cm },
+ { c rule wd i } { 6.2 cm },
+ { c type wd } { 239 pt },
+ { emblem wd } { 40 pt },
{ emblem wd ii } { 61 pt },
- { name wd } { 126 pt },
+ { name wd } { 111 pt },
{ rule ht i } { .4 pt },
{ rule ht ii } { .8 pt },
{ rule dp i } { -.7 ex },
diff --git a/Master/texmf-dist/tex/latex/njuthesis/njuthesis-postdoctoral.def b/Master/texmf-dist/tex/latex/njuthesis/njuthesis-postdoctoral.def
index 9205ebe20b2..288ee7d87b0 100644
--- a/Master/texmf-dist/tex/latex/njuthesis/njuthesis-postdoctoral.def
+++ b/Master/texmf-dist/tex/latex/njuthesis/njuthesis-postdoctoral.def
@@ -23,7 +23,7 @@
%% To produce the documentation run the original source files ending with
%% `.dtx' through XeTeX.
%%
-\GetIdInfo $Id: njuthesis.dtx 1.1.2 2023-01-15 14:35:00
+\GetIdInfo $Id: njuthesis.dtx 1.2.0 2023-05-02 16:30:00
+0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
{Postdoctoral definition file for njuthesis}
\ProvidesExplFile{njuthesis-postdoctoral.def}
@@ -67,7 +67,6 @@
\clist_set:Nn \l__nju_tmp_clist
{ author, supvfull, dept, id, major, submitdate }
\__nju_get_max_width:NN \l__nju_tmpb_dim \l__nju_tmp_clist
- \dim_set_eq:NN \tex_baselineskip:D \c__nju_clineskip_dim
\clist_map_inline:Nn \l__nju_tmp_clist
{
\__nju_box_spread_name:NNn #1 #2 { ##1 }
@@ -249,7 +248,6 @@
}
\clist_map_inline:nn
{
- { c lineskip } { 28 pt },
{ c label wd } { 50 pt },
{ name wd } { 220 pt },
{ rule ht i } { .4 pt },
@@ -269,6 +267,7 @@
{ pagestyle } { headings },
{ abslabel } { \bfseries },
{ abslabel_en } { },
+ { cover title } { },
{ cover label } { },
{ emblem color } { black },
{ name color } { black },
diff --git a/Master/texmf-dist/tex/latex/njuthesis/njuthesis-undergraduate.def b/Master/texmf-dist/tex/latex/njuthesis/njuthesis-undergraduate.def
index 3b2f644f131..11b94bfab80 100644
--- a/Master/texmf-dist/tex/latex/njuthesis/njuthesis-undergraduate.def
+++ b/Master/texmf-dist/tex/latex/njuthesis/njuthesis-undergraduate.def
@@ -23,7 +23,7 @@
%% To produce the documentation run the original source files ending with
%% `.dtx' through XeTeX.
%%
-\GetIdInfo $Id: njuthesis.dtx 1.1.2 2023-01-15 14:35:00
+\GetIdInfo $Id: njuthesis.dtx 1.2.0 2023-05-02 16:30:00
+0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
{Undergraduate definition file for njuthesis}
\ProvidesExplFile{njuthesis-undergraduate.def}
@@ -36,34 +36,26 @@
\__nju_declare_element:nn { u / cover / emblem-img }
{
content = \__nju_emblem:N \c__nju_emblemwd_dim,
- bottom-skip = 10 pt
+ bottom-skip = 1.2 cm
}
\__nju_declare_element:nn { u / cover / name-img }
{
content = \__nju_name:N \c__nju_namewd_dim,
- bottom-skip = 10 pt,
+ bottom-skip = 1 cm,
}
\__nju_declare_element:nn { u / cover / title }
{
- content =
- \dim_set:Nn \l__nju_tmpb_dim { 217 pt }
- \__nju_box_spread_name:Nn \l__nju_tmpb_dim { type },
- format = \zihao { -1 } \bfseries,
- bottom-skip = 10 pt plus 1 fill
+ content = \__nju_name:n { type },
+ format = \zihao { 1 } \bfseries \__nju_set_ccglue:n { .5 em },
+ bottom-skip = 0 cm plus 1 fill
}
\__nju_declare_element:nn { u / cover / info }
{
- content =
- \__nju_u_cover_info:NNNN
- \c__nju_clabelwd_dim
- \c__nju_crulewd_dim
- \c__nju_hsep_dim
- \c__nju_fmt_coverlabel_tl,
- format = \zihao { 3 }
+ content = \__nju_u_cover_info:,
+ format = \zihao { 3 } \kaishu
}
\cs_new_protected:Npn \__nju_u_cover_info:NNNN #1#2#3#4
{
- \dim_set_eq:NN \tex_baselineskip:D \c__nju_clineskip_dim
\__nju_cover_entry:NNNn #1 #2 #4 { dept }
\__nju_cover_entry:NNNn #1 #2 #4 { major }
\__nju_cover_entry_title:NNN #1 #2 #4
@@ -75,6 +67,11 @@
{ \__nju_cover_entry_supv:NNNn #1 \l__nju_tmpb_dim #4 { supvii } }
\__nju_cover_entry:NNNn #1 #2 #4 { submitdate }
}
+\cs_new_protected:Npn \__nju_u_cover_info:
+ {
+ \__nju_u_cover_info:NNNN \c__nju_clabelwd_dim \c__nju_crulewd_dim
+ \c__nju_hsep_dim \c_empty_tl
+ }
\__nju_declare_element:nn { u / decl / orig / emblem }
{
content = \__nju_emblem:N \c__nju_emblemwdi_dim,
@@ -83,38 +80,38 @@
\__nju_declare_element:nn { u / decl / orig / title }
{
content = \c__nju_name_origdecl_tl,
- format = \zihao { -1 } \sffamily,
+ 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,
- format = \zihao { -3 },
+ format = \__nju_zihao:nn { 1.9 } { -3 },
align = n,
- bottom-skip = 0 pt plus 1 fil
+ bottom-skip = 2.7 cm
}
\__nju_declare_element:nn { u / decl / orig / sign }
{
- content = \__nju_decl_sign:,
- format = \zihao { -3 },
- align = r
+ content = \__nju_decl_sign:,
+ format = \zihao { -3 } \sffamily,
+ align = r
}
\cs_new_protected:Npn \__nju_decl_sign:
{
\clist_map_inline:nn { origsign, id, date }
- { \__nju_vskip: \__nju_name:n { ##1 } : \__nju_uline:n { 7 em } }
+ { \tex_par:D \__nju_name:n { ##1 } : \hbox_to_wd:nn { 6 em } { } }
}
\__nju_declare_page:nn { cover-u }
{
element = { emblem-img, name-img, title, info },
prefix = u / cover /,
+ top-skip = -.3 cm,
bottom-skip = 0 pt plus 1 fill
}
\__nju_declare_page:nn { origdecl-u }
{
element = { emblem, title, text, sign },
prefix = u / decl / orig /,
- top-skip = 0 pt,
bottom-skip = 0 pt plus 1 fil
}
\cs_new_protected:Npn \__nju_make_cover:
@@ -210,8 +207,8 @@
{ abstract a } { 中文摘要 } { ABSTRACT },
{ abstract b } { 摘\qquad{}要 } { ABSTRACT },
{ abstracttitle }
- { 南京大学本科生毕业论文(设计、作品)中文摘要 }
- { 南京大学本科生毕业论文(设计、作品)英文摘要 },
+ { \c__nju_name_nju_tl 本科生毕业论文(设计、作品)中文摘要 }
+ { \c__nju_name_nju_tl 本科生毕业论文(设计、作品)英文摘要 },
{ appendix } { 附录 } { appendix },
{ author } { 学生姓名 } { UNDERGRADUATE },
{ blankdate } { \qquad{}年 \quad{}月 \quad{}日 } { },
@@ -228,7 +225,7 @@
{ supv full } { 指导教师(姓名、职称) } { MENTOR },
{ table } { 表 } { table },
{ title } { 题目 } { THESIS },
- { type } { 本科毕业论文 } { u }
+ { type } { 本科毕业论文 } { u }
}
{ \__nju_define_name:nnn #1 }
\tl_const:Nn \c__nju_text_origdecl_tl
@@ -241,9 +238,8 @@
}
\clist_map_inline:nn
{
- { c lineskip } { 36 pt },
{ c label wd } { 68 pt },
- { c rule wd } { 270 pt },
+ { c rule wd } { 8 cm },
{ emblem wd } { 68 pt },
{ emblem wd i } { 68 pt },
{ name wd } { 300 pt },
@@ -252,7 +248,7 @@
{ rule dp i } { -.7 ex },
{ rule dp ii } { -.9 ex },
{ rule dp iii } { -1.2 ex },
- { h sep } { 5 pt },
+ { h sep } { 0 pt },
{ v sep } { 1 ex },
{ chapter before } { 10 pt },
{ chapter after } { 60 pt },
@@ -264,7 +260,7 @@
{ pagestyle } { plain },
{ abslabel } { \bfseries },
{ abslabel_en } { },
- { cover title } { \bfseries },
+ { cover title } { },
{ cover label } { \kaishu },
{ emblem color } { black },
{ name color } { black },
diff --git a/Master/texmf-dist/tex/latex/njuthesis/njuthesis.cls b/Master/texmf-dist/tex/latex/njuthesis/njuthesis.cls
index 1b977e7b347..48fc2fa6da5 100644
--- a/Master/texmf-dist/tex/latex/njuthesis/njuthesis.cls
+++ b/Master/texmf-dist/tex/latex/njuthesis/njuthesis.cls
@@ -24,7 +24,7 @@
%% `.dtx' through XeTeX.
%%
\NeedsTeXFormat{LaTeX2e}
-\GetIdInfo $Id: njuthesis.dtx 1.1.2 2023-01-15 14:35:00
+\GetIdInfo $Id: njuthesis.dtx 1.2.0 2023-05-02 16:30:00
+0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
{Thesis template for Nanjing University}
\ProvidesExplClass{njuthesis}
@@ -96,7 +96,7 @@
}
\clist_const:Nn \c__nju_name_anon_clist
{
- author, chairman, email, student-id, reviewer,
+ author, chairman, email, grade, student-id, reviewer,
supervisor-contact, supervisor, supervisor-ii
}
\clist_const:Nn \c__nju_name_anon_en_clist
@@ -131,6 +131,24 @@
\cs_new:Npn \__nju_fmt:n #1 { \tl_use:c { c__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
+ { \fontsize { #1 } { #2 } \selectfont }
+\cs_new:Npn \__nju_fontsize:nnn #1#2#3
+ { \__nju_fontsize:nn { #1 } { \fp_to_decimal:n { #3 * #1 } } }
+\cs_new:Npn \__nju_zihao:nn #1#2
+ {
+ \prop_get:NnNTF \c__ctex_font_size_prop { #2 } \l__ctex_font_size_tl
+ { \exp_after:wN \__nju_fontsize:nnn \l__ctex_font_size_tl { #1 } }
+ { \msg_error:nnn { ctex } { fontsize } { #2 } }
+ }
+\cs_new:Npn \__nju_zihao:n { \__nju_zihao:nn { 1.3 } }
+\cs_generate_variant:Nn \cs_new:Npn { Npo }
+\cs_new:Npo \__nju_set_ccglue:n #1
+ {
+ \sys_if_engine_xetex:TF
+ { \skip_set:Nn \l__ctex_ccglue_skip { #1 } }
+ { \ltjsetparameter { kanjiskip = { #1 } } }
+ }
\cs_new_protected:Npn \__nju_box_ulined:NN #1#2
{
\mode_leave_vertical:
@@ -157,6 +175,7 @@
}
}
\cs_generate_variant:Nn \__nju_box_spread:NNn { NNv }
+\cs_generate_variant:Nn \__nju_box_spread:NNn { NNx }
\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
@@ -166,19 +185,18 @@
\mode_leave_vertical:
\hbox_to_wd:nn {#1} { \tex_hfil:D #2 \tex_hfil:D }
}
-\cs_new_protected:Npn \__nju_box_multiline:NNNN #1#2#3#4
+\cs_new_protected:Npn \__nju_box_multiline:NNNn #1#2#3#4
{
- \int_set:Nn #1 { 1 }
- \int_set:Nn #2 { \int_max:nn { \clist_count:N #3 } { 4 } }
- \int_do_until:nn { #1 > #2 }
+ \int_set:Nn #1 { \int_max:nn { \clist_count:N #2 } { #4 } }
+ \int_step_inline:nn { #1 }
{
- \clist_pop:NN #3 \l__nju_tmpa_tl
+ \clist_pop:NN #2 \l__nju_tmpa_tl
\quark_if_no_value:NT \l__nju_tmpa_tl
{ \tl_set_eq:NN \l__nju_tmpa_tl \c_empty_tl }
- \__nju_box_ulined:NN #4 \l__nju_tmpa_tl \tex_par:D
- \int_incr:N #1
+ \__nju_box_ulined:NN #3 \l__nju_tmpa_tl \tex_par:D
}
}
+\cs_new:Npn \__nju_box_multiline:NNn { \__nju_box_multiline:NNNn \l__nju_tmpa_int }
\cs_new_protected:Npn \__nju_uline:n #1
{
\mode_leave_vertical:
@@ -249,8 +267,7 @@
}
\cs_new_protected:Npn \__nju_at_begin_document:n #1
{ \hook_gput_next_code:nn { begin document } { #1 } }
-\cs_new_protected:Npn \__nju_cs_clear:N #1
- { \cs_set_eq:NN #1 \prg_do_nothing: }
+\cs_new:Npn \__nju_cs_clear:N #1 { \cs_set_eq:NN #1 \tex_relax:D }
\cs_new:Npn \__nju_msg:nn { \msg_new:nnn { njuthesis } }
\cs_new:Npn \__nju_loop_until:nnn #1#2#3
{ #2 \bool_if:nF {#1} { #3 \__nju_loop_until:nnn {#1} {#2} {#3} } }
@@ -299,26 +316,27 @@
}
\__nju_breakpar_print:nn { } { }
}
-\cs_new_protected:Npn \__nju_cover_entry_title:NNN #1#2#3
+\cs_new_protected:Npn \__nju_cover_entry_title:NNNN #1#2#3#4
{
\tl_if_empty:NT \g__nju_info_title_tl
{ \msg_error:nn { njuthesis } { missing-title } }
- \__nju_box_spread_name:NNn #1 #3 { title }
- \mode_leave_vertical: \__nju_hskip:
- \parbox [ t ] { #2 }
+ \__nju_box_spread_name:NNn #2 #4 { title }
+ \mode_leave_vertical: #1
+ \parbox [ t ] { #3 }
{
- \dim_set_eq:NN \tex_baselineskip:D \c__nju_clineskip_dim
\c__nju_fmt_covertitle_tl \__nju_uline_title:
\dim_gset_eq:NN \l__nju_tmpa_dim \tex_prevdepth:D
}
\tex_par:D
\dim_set_eq:NN \tex_prevdepth:D \l__nju_tmpa_dim
}
-\cs_new_protected:Npn \__nju_cover_entry:NNNn #1#2#3#4
+\cs_new:Npn \__nju_cover_entry_title:NNN { \__nju_cover_entry_title:NNNN \__nju_hskip: }
+\cs_new_protected:Npn \__nju_cover_entry:NNNNn #1#2#3#4#5
{
- \__nju_box_spread_name:NNn #1 #3 { #4 } \__nju_hskip:
- \__nju_box_ulined_info:Nn #2 { #4 } \tex_par:D
+ \__nju_box_spread_name:NNn #2 #4 { #5 } #1
+ \__nju_box_ulined_info:Nn #3 { #5 } \tex_par:D
}
+\cs_new:Npn \__nju_cover_entry:NNNn { \__nju_cover_entry:NNNNn \__nju_hskip: }
\cs_new_protected:Npn \__nju_cover_entry:NNNnn #1#2#3#4#5
{
\__nju_box_spread_name:NNn #1 #3 { #4 } \__nju_hskip:
@@ -517,6 +535,12 @@
I~ have~ loaded~ "#1"~ by~ default.~ Maybe~ You~ should~
refer~ to~ section~ 4~ of~ the~ documentation.
}
+\__nju_msg:nn { missing-stzhongs }
+ {
+ "STZHONGS.TTF"~ is~ not~ found~ in~ your~ system.\\
+ The~ font~ is~ normally~ distributed~ with~ MS~ Windows.~
+ I~ have~ used~ songti~ for~ substitution.
+ }
\keys_define:nn { nju }
{
type .choices:nn = { bachelor, master, doctor, postdoc }
@@ -771,10 +795,13 @@
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 ,
- secret-level .tl_set:N = \g__nju_info_secretlv_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
+ email .tl_set:N = \g__nju_info_email_tl ,
+ school-code .tl_set:N = \g__nju_info_code_tl ,
+ school-code .initial:n = { 10284 } ,
+ degree* .tl_set:N = \g__nju_info_degree_en_tl
}
\clist_map_inline:Nn \c__nju_name_anon_clist
{ \keys_define:nn { nju / info } { #1 .groups:n = { anonymous } } }
@@ -963,6 +990,18 @@
ItalicFeatures = FakeSlant,
BoldItalicFeatures = FakeSlant
}
+\cs_new_protected:Npn \__nju_loadfont_stzhongs:
+ {
+ \fontspec_font_if_exist:nTF { 华文中宋 }
+ {
+ \newCJKfontfamily \__nju_stzhongs: { 华文中宋 }
+ [ \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
{
\cs_new:cpn { __nju_loadfont_math_ #1 : }
@@ -1076,8 +1115,8 @@
\__nju_loadfont:
\geometry
{
- vmargin = 2.5 cm,
- hmargin = 3.2 cm,
+ vmargin = 2.54 cm,
+ hmargin = 3.18 cm,
headheight = 15 pt
}
\bool_if:NT \g__nju_opt_draft_bool { \geometry { showframe } }
@@ -1702,6 +1741,8 @@
{
toc-entry .bool_set:N = \g__nju_abs_showentry_bool,
toc-entry .initial:n = true,
+ underline .bool_set:N = \g__nju_abs_underline_bool,
+ underline .initial:n = true,
title-style .choice:,
title-style / strict .code:n =
{
@@ -1752,25 +1793,18 @@
{ O { \c__nju_name_paperlist_tl } m }
{
\group_begin:
- \RenewDocumentCommand \mkbibnamegiven { m }
- { \ifitemannotation { thesisauthor }
- { \njuline { \bf ##1 } } { ##1 } }
- \RenewDocumentCommand \mkbibnamefamily { m }
- { \ifitemannotation { thesisauthor }
- { \njuline { \bf ##1 } } { ##1 } }
- \RenewDocumentCommand \mkbibdateshort { m m m }
- { \textbf { \thefield { ##1 } } }
- \tl_if_eq:NnTF \blx@refsecreset@level { 2 }
- {
- \nocite { #2 }
- \printbibliography [ heading = subbibliography, title = #1 ]
- }
- {
- \begin{refsection}
- \nocite { #2 }
- \printbibliography [ heading = subbibliography, title = #1 ]
- \end{refsection}
- }
+ \RenewDocumentCommand \mkbibnamegiven { m }
+ { \ifitemannotation { thesisauthor }
+ { \njuline { \bf ##1 } } { ##1 } }
+ \RenewDocumentCommand \mkbibnamefamily { m }
+ { \ifitemannotation { thesisauthor }
+ { \njuline { \bf ##1 } } { ##1 } }
+ \RenewDocumentCommand \mkbibdateshort { m m m }
+ { \textbf { \thefield { ##1 } } }
+ \newrefsection
+ \nocite { #2 }
+ \printbibliography [ heading = subbibliography, title = #1 ]
+ \endrefsection
\group_end:
}
\cs_new_protected:Npn \__nju_notation_label:n #1 { #1 \tex_hfil:D }