summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-05-01 20:12:37 +0000
committerKarl Berry <karl@freefriends.org>2022-05-01 20:12:37 +0000
commite95ec8b1927bbee800a132cfd977182b1d67b106 (patch)
tree19a45e43a14e8290ad781735972904bc9de3d8b0 /Master/texmf-dist/tex
parent33234012a1c70fca13572aa7961a19d19aa9f56d (diff)
njuthesis (1may22)
git-svn-id: svn://tug.org/texlive/trunk@63202 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/njuthesis/njuthesis-graduate.def166
-rw-r--r--Master/texmf-dist/tex/latex/njuthesis/njuthesis-undergraduate.def76
-rw-r--r--Master/texmf-dist/tex/latex/njuthesis/njuthesis.cls303
3 files changed, 335 insertions, 210 deletions
diff --git a/Master/texmf-dist/tex/latex/njuthesis/njuthesis-graduate.def b/Master/texmf-dist/tex/latex/njuthesis/njuthesis-graduate.def
index dcfd97ffa0e..48eed109b75 100644
--- a/Master/texmf-dist/tex/latex/njuthesis/njuthesis-graduate.def
+++ b/Master/texmf-dist/tex/latex/njuthesis/njuthesis-graduate.def
@@ -23,19 +23,19 @@
%% To produce the documentation run the original source files ending with
%% `.dtx' through XeTeX.
%%
-\GetIdInfo $Id: njuthesis.dtx 0.17.0 2022-04-09 16:30:00 +0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
+\GetIdInfo $Id: njuthesis.dtx 0.18.0 2022-05-01 12:40:00 +0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
{Graduate definition file for njuthesis}
\ProvidesExplFile{njuthesis-graduate.def}
{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
\tl_const:Nn \c__nju_pagestyle_tl { headings }
\__nju_declare_element:nn { cover / g / emblem-img }
{
- content = \njuemblem [ black ] { ! } { 1.9 cm },
- bottom-skip = 1 cm
+ content = \__nju_emblem:N \c__nju_emblemwidthi_dim,
+ bottom-skip = 1.5 cm
}
\__nju_declare_element:nn { cover / g / name-img }
{
- content = \njuname [ black ] { 4.4 cm } { ! },
+ content = \__nju_name:N \c__nju_namewidth_dim,
bottom-skip = 2 cm
}
\__nju_declare_element:nn { cover / g / type }
@@ -47,22 +47,22 @@
}
\__nju_declare_element:nn { cover / g / degree }
{
- content = \g__nju_name_apply_tl,
+ content = \c__nju_name_apply_tl,
format = \zihao { -1 } \bfseries,
bottom-skip = 1 cm plus 1.5 fil
}
\__nju_declare_element:nn { cover / g / info }
{
content =
- \__nju_cover_info_g:NN \g__nju_coverlabel_dim \g__nju_coveruline_dim,
+ \__nju_cover_info_g:NN \c__nju_coverlabel_dim \c__nju_coveruline_dim,
bottom-skip = 0 pt plus 1.5 fil
}
\__nju_declare_element:nn { cover / g / date }
{ content = \g__nju_info_submitdate_tl }
\cs_new_protected:Npn \__nju_cover_info_g:NN #1#2
{
- \begin{minipage} { #1 + #2 + \g__nju_smallhskip_dim }
- \dim_set_eq:NN \baselineskip \g__nju_coverlineskip_dim
+ \begin{minipage} { #1 + #2 + \c__nju_smallhskip_dim }
+ \dim_set_eq:NN \baselineskip \c__nju_coverlineskip_dim
\__nju_cover_entry_title:nnn { } { #1 } { #2 }
\clist_map_inline:nn { author, major, field, supvfull }
{ \__nju_cover_entry:nnn { ##1 } { #1 } { #2 } }
@@ -75,14 +75,14 @@
}
\cs_new_protected:Npn \__nju_cover_back_g:
{
- \__nju_spread_box:nnV { 6.2 em } { \kaishu } \g__nju_name_id_tl
+ \__nju_spread_box:nnV { 6.2 em } { \kaishu } \c__nju_name_id_tl
{ : \__nju_quad: } \g__nju_info_id_tl
\__nju_vskip:
- \__nju_spread_box:nnV { 6.2 em } { \kaishu } \g__nju_name_defenddate_tl
+ \__nju_spread_box:nnV { 6.2 em } { \kaishu } \c__nju_name_defenddate_tl
{ : \__nju_quad: } \g__nju_info_defenddate_tl
\__nju_vskip:
- \__nju_spread_box:nnV { 6.2 em } { \kaishu } \g__nju_name_supvfull_tl
- { : \__nju_quad: } \skip_horizontal:n { 8 em } \g__nju_name_sign_tl
+ \__nju_spread_box:nnV { 6.2 em } { \kaishu } \c__nju_name_supvfull_tl
+ { : \__nju_quad: } \skip_horizontal:n { 8 em } \c__nju_name_sign_tl
}
\__nju_declare_element:nn { cover / g / en / title }
{
@@ -106,8 +106,8 @@
\__nju_declare_element:nn { cover / g / en / middle }
{
content =
- \g__nju_text_cover_en_tl \__nju_vskip:
- \textsc { \clist_item:Nn \g__nju_name_degree_en_clist
+ \c__nju_text_cover_en_tl \__nju_vskip:
+ \textsc { \clist_item:Nn \c__nju_name_degree_en_clist
{ \g__nju_info_degree_int } }
\__nju_vskip: { in } \__nju_vskip:
\g__nju_info_major_en_tl,
@@ -115,14 +115,14 @@
}
\__nju_declare_element:nn { cover / g / en / emblem-img }
{
- content = \njuemblem [ black ] { ! } { 2.5 cm },
+ content = \__nju_emblem:N \c__nju_emblemwidthii_dim,
bottom-skip = 1.5 cm
}
\__nju_declare_element:nn { cover / g / en / bottom }
{
content =
\g__nju_info_dept_en_tl \skip_vertical:N \c_zero_skip
- \g__nju_name_nju_en_tl \skip_vertical:n { 1 cm }
+ \c__nju_name_nju_en_tl \skip_vertical:n { 1 cm }
\g__nju_info_submitdate_en_tl
}
\__nju_declare_element:nn { cover / nl / top }
@@ -133,7 +133,7 @@
\__nju_declare_element:nn { cover / nl / name }
{
content =
- \__nju_spread_box:nnV { 6 em } { } \g__nju_name_title_tl,
+ \__nju_spread_box:nnV { 6 em } { } \c__nju_name_title_tl,
format = \zihao { -0 },
bottom-skip = 0 pt plus 1 fil
}
@@ -162,37 +162,37 @@
}
\cs_new_protected:Npn \__nju_cover_top_nl:
{
- \__nju_spread_box:nnV { 3.2 em } { } \g__nju_name_clc_tl \__nju_hskip:
+ \__nju_spread_box:nnV { 3.2 em } { } \c__nju_name_clc_tl \__nju_hskip:
\__nju_ulined_center_box:nn { 9 em } { \g__nju_info_clc_tl } \hfill
- \__nju_spread_box:nnV { 3.2 em } { } \g__nju_name_secretlv_tl \__nju_hskip:
+ \__nju_spread_box:nnV { 3.2 em } { } \c__nju_name_secretlv_tl \__nju_hskip:
\__nju_ulined_center_box:nn { 9 em } { \g__nju_info_secretlv_tl } \\
- \__nju_spread_box:nnV { 3.2 em } { } \g__nju_name_udc_tl \__nju_hskip:
+ \__nju_spread_box:nnV { 3.2 em } { } \c__nju_name_udc_tl \__nju_hskip:
\__nju_ulined_center_box:nn { 9 em } { \g__nju_info_udc_tl } \hfill \null
}
\cs_new_protected:Npn \__nju_cover_title_nl:
{
\parbox [ b ] { 15 em } { \__nju_uline_title: } \par
\skip_vertical:n { - 0.5 cm }
- { \zihao { 4 } \g__nju_name_title_b_tl }
+ { \zihao { 4 } \c__nju_name_title_b_tl }
\skip_vertical:N \c_zero_skip
\__nju_ulined_center_box:nn { 4.5 em } { \g__nju_info_author_tl }
\skip_vertical:n { - 0.5 cm }
- { \zihao { 4 } { ( } \g__nju_name_author_tl { ) } }
+ { \zihao { 4 } { ( } \c__nju_name_author_tl { ) } }
}
\cs_new_protected:Npn \__nju_cover_info_nl:
{
- \__nju_uline_list:nnn { \g__nju_name_supvinfo_tl }
+ \__nju_uline_list:nnn { \c__nju_name_supvinfo_tl }
{
\clist_use:Nn \g__nju_info_supv_clist { ~ }
- \clist_use:Nn \g__nju_info_supv_ii_clist { ~ } ~
- \g__nju_info_supv_cont_tl
+ \clist_use:Nn \g__nju_info_supv_ii_clist { ~ }
+ \__nju_hskip: \g__nju_info_supvcont_tl
}
{ 1 em plus 1 fill }
\__nju_uline_bientry:Nnnn \l__nju_tmpa_dim { degree } { degree } { }
\__nju_uline_bientry:Nnnn \l__nju_tmpa_dim { major_b } { major } { } \\
\__nju_uline_bientry:Nnnn \l__nju_tmpa_dim { submitdate } { submitdate } { }
\__nju_uline_bientry:Nnnn \l__nju_tmpa_dim { defenddate } { defenddate } { } \\
- \__nju_full_uline:Nn \l__nju_tmpa_dim { \g__nju_name_confer_tl }
+ \__nju_full_uline:Nn \l__nju_tmpa_dim { \c__nju_name_confer_tl }
\__nju_uline:n { \l__nju_tmpa_dim }
}
\cs_new_protected:Npn \__nju_cover_bottom_nl:
@@ -205,13 +205,13 @@
}
\__nju_declare_element:nn { authdecl / g / title }
{
- content = \g__nju_name_authdecl_tl,
- format = \g__nju_fmt_chapter_tl,
+ content = \c__nju_name_authdecl_tl,
+ format = \c__nju_fmt_chapter_tl,
bottom-skip = 3 cm
}
\__nju_declare_element:nn { authdecl / g / text }
{
- content = \g__nju_text_authdecl_tl,
+ content = \c__nju_text_authdecl_tl,
align = n,
bottom-skip = 2 cm
}
@@ -252,34 +252,38 @@
cell{1}{2} = {c=5}{m}, cell{3}{2} = {c=5}{m},
cell{4}{2} = {c=5}{m}, cell{5}{2} = {c=5}{m}
}
- \g__nju_name_title_c_tl & \g__nju_info_title_tl \\
- \g__nju_name_id_a_tl & \g__nju_info_id_tl &
- \g__nju_name_dept_a_tl & \g__nju_info_dept_tl &
- \g__nju_name_year_tl &
+ \c__nju_name_title_c_tl & \g__nju_info_title_tl \\
+ \c__nju_name_id_a_tl & \g__nju_info_id_tl &
+ \c__nju_name_dept_a_tl & \g__nju_info_dept_tl &
+ \c__nju_name_year_tl &
\tl_range:Nnn \g__nju_info_submitdate_raw_tl {1} {4} \\
- \g__nju_name_degree_a_tl &
+ \c__nju_name_degree_a_tl &
{
\__nju_degree_checkbox:n { 2 } 学术学位硕士 \qquad{}
\__nju_degree_checkbox:n { 3 } 专业学位硕士 \\
\__nju_degree_checkbox:n { 4 } 学术学位博士 \qquad{}
\__nju_degree_checkbox:n { 5 } 专业学位博士
} \\
- \g__nju_name_email_tl & \g__nju_info_email_tl \\
- \g__nju_name_supv_b_tl &
- \clist_item:Nn \g__nju_info_supv_clist {1}
- \clist_item:Nn \g__nju_info_supv_ii_clist {1} \\
+ \c__nju_name_email_tl & \g__nju_info_email_tl \\
+ \c__nju_name_supv_b_tl &
+ \clist_item:Nn \g__nju_info_supv_clist {1}
+ \bool_if:NT \l__nju_second_supv_bool
+ {
+ \__nju_quad:
+ \clist_item:Nn \g__nju_info_supv_ii_clist {1}
+ } \\
\end{tblr}
}
\cs_new_protected:Npn \__nju_authdecl_sign_g:
{
- \g__nju_name_authsign_tl \par
- \g__nju_name_blankdate_tl
+ \c__nju_name_authsign_tl \par
+ \c__nju_name_blankdate_tl
}
\cs_new_protected:Npn \__nju_authdecl_secretlv_g:
{
- \g__nju_name_secretstatus_tl \par
- \ensuremath { \mdwhtsquare } \g__nju_name_secretfree_tl \par
- \ensuremath { \mdwhtsquare } \g__nju_name_secretdate_tl
+ \c__nju_name_secretstatus_tl \par
+ \ensuremath { \mdwhtsquare } \c__nju_name_secretfree_tl \par
+ \ensuremath { \mdwhtsquare } \c__nju_name_secretdate_tl
}
\__nju_declare_page:nn { cover-g-front-default }
{
@@ -323,9 +327,9 @@
{ \UseInstance { nju } { cover-nl-default } }
\cs_new_protected:Npn \__nju_make_origdecl:
{
- \chapter* { \g__nju_name_origdecl_tl }
+ \chapter* { \c__nju_name_origdecl_tl }
\thispagestyle { empty }
- \g__nju_text_origdecl_tl
+ \c__nju_text_origdecl_tl
\vfil
\begin{flushright}
\clist_map_inline:nn { origsign, origdate }
@@ -335,13 +339,11 @@
}
\cs_new_protected:Npn \__nju_make_authdecl:
{
- \thispagestyle{empty}
\UseInstance { nju } { authdecl-g-default }
- \cleardoublepage
}
\__nju_declare_element:nn { abstract / title }
{
- content = \__nju_abs_title:V \g__nju_name_abstracttitle_tl,
+ content = \__nju_abs_title:V \c__nju_name_abstracttitle_tl,
format = \bfseries \kaishu \zihao { -2 },
bottom-skip = 1.2 cm
}
@@ -354,7 +356,7 @@
}
\__nju_declare_element:nn { abstract / en / title }
{
- content = \__nju_abs_title:V \g__nju_name_abstracttitle_en_tl,
+ content = \__nju_abs_title:V \c__nju_name_abstracttitle_en_tl,
format = \bfseries \kaishu \zihao { -2 },
bottom-skip = 1.2 cm
}
@@ -367,13 +369,13 @@
}
\__nju_declare_element:nn { abstract / mark }
{
- content = \g__nju_name_abstract_b_tl,
+ content = \c__nju_name_abstract_b_tl,
format = \sffamily \zihao { -3 },
bottom-skip = 1 cm
}
\__nju_declare_element:nn { abstract / en / mark }
{
- content = \g__nju_name_abstract_b_en_tl,
+ content = \c__nju_name_abstract_b_en_tl,
format = \sffamily \zihao { -3 },
bottom-skip = 1 cm
}
@@ -381,21 +383,21 @@
{
\__nju_uline_list:xnn
{
- \clist_item:Nn \g__nju_name_type_clist { \g__nju_info_type_int }
- \g__nju_name_title_a_tl #1
+ \clist_item:Nn \c__nju_name_type_clist { \g__nju_info_type_int }
+ \c__nju_name_title_a_tl #1
}
{ \g__nju_info_title_tl } { \g__nju_abs_title_left_skip }
\__nju_full_uline:NV \l__nju_tmpa_dim
{
\__nju_ulined_center_box:nn { 11 em } { \g__nju_info_major_tl }
- \g__nju_name_major_a_tl
+ \c__nju_name_major_a_tl
\__nju_ulined_center_box:nn { 4 em } { \g__nju_info_grade_tl }
- \g__nju_name_grade_tl \g__nju_name_author_a_tl #1
+ \c__nju_name_grade_tl \c__nju_name_author_a_tl #1
}
\__nju_ulined_center_box:nn { \l__nju_tmpa_dim }
{ \g__nju_info_author_tl } \\
\__nju_full_uline:NV \l__nju_tmpa_dim
- { \g__nju_name_supv_a_tl #1 }
+ { \c__nju_name_supv_a_tl #1 }
\__nju_ulined_center_box:nn { \l__nju_tmpa_dim }
{ \g__nju_info_supvfull_tl }
}
@@ -482,15 +484,16 @@
{ major_a } { 专业 },
% 用于国家图书馆封面的专业名称字样
{ major_b } { 专业名称 },
- { origdecl } { 南京大学学位论文原创性声明 },
+ { origdecl }
+ { \c__nju_name_nju_tl 学位论文原创性声明 },
{ origsign } { 研究生签名 },
{ reviewer } { 评阅人: },
{ secretlv } { 密级 },
{ secretstatus } { 论文涉密情况: },
{ secretfree } { 不保密 },
{ secretdate }
- { 保密,保密期( \g__nju_name_blankdate_tl 至
- \g__nju_name_blankdate_tl ) },
+ { 保密,保密期( \c__nju_name_blankdate_tl 至
+ \c__nju_name_blankdate_tl ) },
{ sign } { (签字) },
{ submitdate } { 论文提交日期 },
{ supv } { 导师 },
@@ -515,22 +518,22 @@
\clist_map_inline:nn
{
{ abstracttitle }
- { 南京大学 \g__nju_info_type_tl 中文摘要首页用纸 }
- { 南京大学 \g__nju_info_type_tl 英文摘要首页用纸 },
- { author } { 作者姓名 } { POSTGRADUATE },
- { major } { 专业方向 } { SPECIALIZATION },
- { supvfull } { 指导教师 } { MENTOR }
+ { \c__nju_name_nju_tl \g__nju_info_type_tl 中文摘要首页用纸 }
+ { \c__nju_name_nju_tl \g__nju_info_type_tl 英文摘要首页用纸 },
+ { author } { 作者姓名 } { POSTGRADUATE },
+ { major } { 专业方向 } { SPECIALIZATION },
+ { supvfull } { 指导教师 } { MENTOR }
}
{ \__nju_define_name:nnn #1 }
-\tl_const:Nn \g__nju_text_origdecl_tl
+\tl_const:Nn \c__nju_text_origdecl_tl
{
- 本人郑重声明,所提交的学位论文是本人在导师指导下独立进行科学研究工作
- 所取得的成果。除本论文中已经注明引用的内容外,本论文不包含其他个人或
- 集体已经发表或撰写过的研究成果,也不包含为获得南京大学或其他教育机构
- 的学位证书而使用过的材料。对本文的研究做出重要贡献的个人和集体,均已
- 在论文的致谢部分明确标明。本人郑重申明愿承担本声明的法律责任。
+ 本人郑重声明,所提交的学位论文是本人在导师指导下独立进行科学研究工作所
+ 取得的成果。除本论文中已经注明引用的内容外,本论文不包含其他个人或集体
+ 已经发表或撰写过的研究成果,也不包含为获得 \c__nju_name_nju_tl 或其他教
+ 育机构的学位证书而使用过的材料。对本文的研究做出重要贡献的个人和集体,
+ 均已在论文的致谢部分明确标明。本人郑重申明愿承担本声明的法律责任。
}
-\tl_gset:Nn \g__nju_text_authdecl_tl
+\tl_const:Nn \c__nju_text_authdecl_tl
{
本人完全同意《中国优秀博硕士学位论文全文数据库出版章程》
(以下简称“章程”),愿意将本人的学位论文提交“中国学术期刊
@@ -541,10 +544,10 @@
《中国知识资源总库》,在《中国博硕士学位论文评价数据库》
中使用和在互联网上传播,同意按“章程”规定享受相关权益。
}
-\tl_gset:Nn \g__nju_text_cover_en_tl
+\tl_const:Nn \c__nju_text_cover_en_tl
{
A~ dissertation~ submitted~ to \\
- the~ graduate~ school~ of~ Nanjing~ University \\
+ the~ graduate~ school~ of~ \c__nju_name_nju_en_tl \\
in~ partial~ fulfilment~ of~ the~ requirements~ for~ the~ degree~ of
}
\clist_map_inline:nn
@@ -563,18 +566,23 @@
{ coverlabel } { 100 pt },
{ coverlineskip } { 40 pt },
{ coveruline } { 270 pt },
+ { emblemwidthi } { 46 pt },
+ { emblemwidthii } { 61 pt },
+ { namewidth } { 126 pt },
{ smallhskip } { 5 pt },
{ smallvskip } { 1 ex }
}
{ \__nju_define_dim:nn #1 }
\clist_map_inline:nn
{
- { chapterintoc } { \large \normalfont \sffamily },
- { chapter } { \large \normalfont \sffamily \centering },
- { section } { \large \normalfont \sffamily },
- { subsection } { \large \normalfont \sffamily },
- { subsubsection } { \large \normalfont \sffamily },
- { toctitle } { \centering \zihao { 3 } \bfseries }
+ { section } { \large \normalfont \sffamily },
+ { chapter } { \c__nju_fmt_section_tl \centering },
+ { chapterintoc } { \c__nju_fmt_section_tl },
+ { subsection } { \c__nju_fmt_section_tl },
+ { subsubsection } { \c__nju_fmt_section_tl },
+ { paragraph } { \c__nju_fmt_section_tl },
+ { subparagraph } { \c__nju_fmt_section_tl },
+ { toctitle } { \centering \zihao { 3 } \bfseries }
}
{ \__nju_define_fmt:nn #1 }
\endinput
diff --git a/Master/texmf-dist/tex/latex/njuthesis/njuthesis-undergraduate.def b/Master/texmf-dist/tex/latex/njuthesis/njuthesis-undergraduate.def
index 8fbc37def77..bcba1a60219 100644
--- a/Master/texmf-dist/tex/latex/njuthesis/njuthesis-undergraduate.def
+++ b/Master/texmf-dist/tex/latex/njuthesis/njuthesis-undergraduate.def
@@ -23,20 +23,20 @@
%% To produce the documentation run the original source files ending with
%% `.dtx' through XeTeX.
%%
-\GetIdInfo $Id: njuthesis.dtx 0.17.0 2022-04-09 16:30:00 +0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
+\GetIdInfo $Id: njuthesis.dtx 0.18.0 2022-05-01 12:40:00 +0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
{Undergraduate definition file for njuthesis}
\ProvidesExplFile{njuthesis-undergraduate.def}
{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
\tl_const:Nn \c__nju_pagestyle_tl { plain }
\__nju_declare_element:nn { cover / ug / emblem-img }
{
- content = \njuemblem [ black ] { ! } { 3.35 cm },
+ content = \__nju_emblem:N \c__nju_emblemwidth_dim,
bottom-skip = 1 cm,
- align = l
+ align = l
}
\__nju_declare_element:nn { cover / ug / name-img }
{
- content = \njuname [ black ] { ! } { 3 cm },
+ content = \__nju_name:N \c__nju_namewidth_dim,
bottom-skip = 1 cm
}
\__nju_declare_element:nn { cover / ug / title }
@@ -49,23 +49,23 @@
\__nju_declare_element:nn { cover / ug / info }
{
content =
- \__nju_cover_info_ug:NN \g__nju_coverlabel_dim \g__nju_coveruline_dim,
+ \__nju_cover_info_ug:NN \c__nju_coverlabel_dim \c__nju_coveruline_dim,
format = \zihao { 3 }
}
\cs_new_protected:Npn \__nju_cover_info_ug:NN #1#2
{
- \begin{minipage} { #1 + #2 + \g__nju_smallhskip_dim }
- \dim_set_eq:NN \baselineskip \g__nju_coverlineskip_dim
- \dim_set:Nn \l__nju_tmpb_dim { .5 #2 - .5 #1 - \g__nju_smallhskip_dim }
- \__nju_cover_entry:nnn { dept } { #1 } { #2 }
- \__nju_cover_entry:nnn { major } { #1 } { #2 }
- \__nju_cover_entry_title:nnn { \bf } { #1 } { #2 }
- \__nju_cover_bientry:nnnn { grade } { id } { #1 } { \l__nju_tmpb_dim }
- \__nju_cover_entry:nnn { author } { #1 } { #2 }
+ \begin{minipage} { #1 + #2 + \c__nju_smallhskip_dim }
+ \dim_set_eq:NN \baselineskip \c__nju_coverlineskip_dim
+ \dim_set:Nn \l__nju_tmpb_dim { .5 #2 - .5 #1 - \c__nju_smallhskip_dim }
+ \__nju_cover_entry:nnn { dept } { #1 } { #2 }
+ \__nju_cover_entry:nnn { major } { #1 } { #2 }
+ \__nju_cover_entry_title:nnn { \bf } { #1 } { #2 }
+ \__nju_cover_bientry:nnnn { grade } { id } { #1 } { \l__nju_tmpb_dim }
+ \__nju_cover_entry:nnn { author } { #1 } { #2 }
\__nju_cover_entry_supv:nnn { supv } { #1 } { \l__nju_tmpb_dim }
\bool_if:NT \l__nju_second_supv_bool
{ \__nju_cover_entry_supv:nnn { supv_ii } { #1 } { \l__nju_tmpb_dim } }
- \__nju_cover_entry:nnn { submitdate } { #1 } { #2 }
+ \__nju_cover_entry:nnn { submitdate } { #1 } { #2 }
\end{minipage}
}
\__nju_declare_page:nn { cover-ug-default }
@@ -80,9 +80,9 @@
}
\cs_new_protected:Npn \__nju_make_origdecl:
{
- \chapter* { \g__nju_name_origdecl_tl }
+ \chapter* { \c__nju_name_origdecl_tl }
\thispagestyle { empty }
- \g__nju_text_origdecl_tl
+ \c__nju_text_origdecl_tl
\vfil
\begin{flushright}
\clist_map_inline:nn { origsign, id, origdate }
@@ -92,11 +92,11 @@
}
\cs_new_protected:Npn \__nju_make_authdecl:
{
- \prg_do_nothing:
+ \prg_do_nothing:
}
\__nju_declare_element:nn { abstract / title }
{
- content = \__nju_abs_title:V \g__nju_name_abstracttitle_tl,
+ content = \__nju_abs_title:V \c__nju_name_abstracttitle_tl,
format = \bfseries \kaishu \zihao { -2 },
bottom-skip = 1.2 cm
}
@@ -109,7 +109,7 @@
}
\__nju_declare_element:nn { abstract / en / title }
{
- content = \__nju_abs_title:V \g__nju_name_abstracttitle_en_tl,
+ content = \__nju_abs_title:V \c__nju_name_abstracttitle_en_tl,
format = \bfseries \kaishu \zihao { -2 },
bottom-skip = 1.2 cm
}
@@ -123,23 +123,23 @@
\cs_new_protected:Npn \__nju_abs_info_ug:nn #1#2
{
\tl_if_blank:eTF { #1 }
- { \g__nju_name_title_tl }
- { \clist_item:Nn \g__nju_name_type_en_clist { \g__nju_info_type_int } }
+ { \c__nju_name_title_tl }
+ { \clist_item:Nn \c__nju_name_type_en_clist { \g__nju_info_type_int } }
#2 \tl_use:c { g__nju_info_title #1 _tl } \\
- \tl_set_eq:NN \g__nju_name_author_tl \g__nju_name_author_a_tl
+ \tl_set_eq:NN \c__nju_name_author_tl \c__nju_name_author_a_tl
\clist_map_inline:nn { dept, major, author, supvfull }
{ \__nju_name:n { ##1 #1 } #2 \__nju_info:n { ##1 #1 } \\ }
\__nju_name:n { abstract #1 } #2
}
\__nju_declare_element:nn { abstract / mark }
{
- content = \g__nju_name_abstract_b_tl,
+ content = \c__nju_name_abstract_b_tl,
format = \sffamily \zihao { -3 },
bottom-skip = 1 cm
}
\__nju_declare_element:nn { abstract / en / mark }
{
- content = \g__nju_name_abstract_b_en_tl,
+ content = \c__nju_name_abstract_b_en_tl,
format = \sffamily \zihao { -3 },
bottom-skip = 1 cm
}
@@ -191,7 +191,7 @@
{ author_a } { 本科生姓名 },
{ grade } { 年级 },
{ origdecl }
- { \g__nju_name_nju_tl 本科毕业论文(设计)诚信承诺书 },
+ { \c__nju_name_nju_tl 本科毕业论文(设计)诚信承诺书 },
{ origsign } { 作者签名 },
{ submitdate } { 提交日期 },
{ supv } { 导师 },
@@ -204,19 +204,19 @@
{
{ abstracttitle }
{
- \g__nju_name_nju_tl \g__nju_name_type_tl
- \g__nju_name_lang_tl \g__nju_name_abstract_tl
+ \c__nju_name_nju_tl \c__nju_name_type_tl
+ \c__nju_name_lang_tl \c__nju_name_abstract_tl
}
{
- \g__nju_name_nju_tl \g__nju_name_type_tl
- \g__nju_name_lang_en_tl \g__nju_name_abstract_tl
+ \c__nju_name_nju_tl \c__nju_name_type_tl
+ \c__nju_name_lang_en_tl \c__nju_name_abstract_tl
},
{ author } { 学生姓名 } { UNDERGRADUATE },
{ major } { 专业 } { SPECIALIZATION },
{ supvfull } { 指导教师(姓名、职称) } { MENTOR }
}
{ \__nju_define_name:nnn #1 }
-\tl_const:Nn \g__nju_text_origdecl_tl
+\tl_const:Nn \c__nju_text_origdecl_tl
{
本人郑重承诺:所呈交的毕业论文(设计)(题目: \g__nju_info_title_tl )
是在指导教师的指导下严格按照学校和院系有关规定由本人独立完成的。
@@ -240,18 +240,22 @@
{ coverlabel } { 68 pt },
{ coverlineskip } { 40 pt },
{ coveruline } { 270 pt },
+ { emblemwidth } { 68 pt },
+ { namewidth } { 300 pt },
{ smallhskip } { 5 pt },
{ smallvskip } { 1 ex }
}
{ \__nju_define_dim:nn #1 }
\clist_map_inline:nn
{
- { chapterintoc } { \large \normalfont \sffamily },
- { chapter } { \large \normalfont \sffamily \centering },
- { section } { \large \normalfont \sffamily },
- { subsection } { \large \normalfont \sffamily },
- { subsubsection } { \large \normalfont \sffamily },
- { toctitle } { \centering \zihao { 3 } \bfseries }
+ { section } { \large \normalfont \sffamily },
+ { chapter } { \c__nju_fmt_section_tl \centering },
+ { chapterintoc } { \c__nju_fmt_section_tl },
+ { subsection } { \c__nju_fmt_section_tl },
+ { subsubsection } { \c__nju_fmt_section_tl },
+ { paragraph } { \c__nju_fmt_section_tl },
+ { subparagraph } { \c__nju_fmt_section_tl },
+ { toctitle } { \centering \zihao { 3 } \bfseries }
}
{ \__nju_define_fmt:nn #1 }
\endinput
diff --git a/Master/texmf-dist/tex/latex/njuthesis/njuthesis.cls b/Master/texmf-dist/tex/latex/njuthesis/njuthesis.cls
index 76fedcae47e..ea790df30ed 100644
--- a/Master/texmf-dist/tex/latex/njuthesis/njuthesis.cls
+++ b/Master/texmf-dist/tex/latex/njuthesis/njuthesis.cls
@@ -24,7 +24,7 @@
%% `.dtx' through XeTeX.
%%
\NeedsTeXFormat{LaTeX2e}
-\GetIdInfo $Id: njuthesis.dtx 0.17.0 2022-04-09 16:30:00 +0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
+\GetIdInfo $Id: njuthesis.dtx 0.18.0 2022-05-01 12:40:00 +0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
{Thesis template for Nanjing University}
\ProvidesExplClass{njuthesis}
{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
@@ -86,23 +86,32 @@
\int_to_arabic:n { \c_sys_month_int } -
\int_to_arabic:n { \c_sys_day_int }
}
-\clist_const:Nn \g__nju_name_type_clist
+\clist_const:Nn \c__nju_name_type_clist
{ 毕业论文, 毕业设计 }
-\clist_const:Nn \g__nju_name_type_en_clist
+\clist_const:Nn \c__nju_name_type_en_clist
{ THESIS, DESIGN }
-\clist_const:Nn \g__nju_name_degree_clist
+\clist_const:Nn \c__nju_name_degree_clist
{ 学士, 硕士, 硕士专业, 博士 }
-\clist_const:Nn \g__nju_name_degree_en_clist
+\clist_const:Nn \c__nju_name_degree_en_clist
{ Bachelor, Master, Master, Doctor~of~Philosophy }
\clist_const:Nn \c__nju_month_en_clist
{
January, February, March, April, May, June,
July, August, September, October, November, December
}
+\clist_const:Nn \c__nju_blind_info_clist
+ {
+ author, chairman, clc, dept, email, field, grade,
+ id, major, secretlv, supvcont, udc
+ }
+\clist_const:Nn \c__nju_blind_info_en_clist
+ { author, dept, field, major, supv, supv_ii }
+\clist_const:Nn \c__nju_blind_infolist_clist
+ { reviewer, supv, supv_ii }
\cs_new:Nn \__nju_quad: { \skip_horizontal:n { 1 em } }
\cs_new:Nn \__nju_qquad: { \skip_horizontal:n { 2 em } }
-\cs_new:Nn \__nju_vskip: { \skip_vertical:N \g__nju_smallvskip_dim }
-\cs_new:Nn \__nju_hskip: { \skip_horizontal:N \g__nju_smallhskip_dim }
+\cs_new:Nn \__nju_vskip: { \skip_vertical:N \c__nju_smallvskip_dim }
+\cs_new:Nn \__nju_hskip: { \skip_horizontal:N \c__nju_smallhskip_dim }
\cs_new_protected:Npn \__nju_vskip:N #1
{
\hrule height \c_zero_dim
@@ -111,38 +120,24 @@
\skip_vertical:N #1
}
\cs_new_protected:Npn \__nju_define_name:nn #1#2
- {
- \tl_new:c { g__nju_name_ #1 _tl }
- \tl_gset:cn { g__nju_name_ #1 _tl } { #2 }
- }
+ { \tl_const:cn { c__nju_name_ #1 _tl } { #2 } }
\cs_new_protected:Npn \__nju_define_name:nnn #1#2#3
{
- \tl_new:c { g__nju_name_ #1 _tl }
- \tl_gset:cn { g__nju_name_ #1 _tl } { #2 }
- \tl_new:c { g__nju_name_ #1 _en_tl }
- \tl_gset:cn { g__nju_name_ #1 _en_tl } { #3 }
+ \tl_const:cn { c__nju_name_ #1 _tl } { #2 }
+ \tl_const:cn { c__nju_name_ #1 _en_tl } { #3 }
}
\cs_new_protected:Npn \__nju_define_fmt:nn #1#2
- {
- \tl_new:c { g__nju_fmt_ #1 _tl }
- \tl_gset:cn { g__nju_fmt_ #1 _tl } { #2 }
- }
+ { \tl_const:cn { c__nju_fmt_ #1 _tl } { #2 } }
\cs_new_protected:Npn \__nju_define_dim:nn #1#2
- {
- \dim_new:c { g__nju_ #1 _dim }
- \dim_gset:cn { g__nju_ #1 _dim } { #2 }
- }
+ { \dim_const:cn { c__nju_ #1 _dim } { #2 } }
\cs_new_protected:Npn \__nju_define_skip:nn #1#2
- {
- \skip_new:c { g__nju_ #1 _skip }
- \skip_gset:cn { g__nju_ #1 _skip } { #2 }
- }
+ { \skip_const:cn { c__nju_ #1 _skip } { #2 } }
\cs_new_protected:Npn \__nju_add_theorem_type:nnn #1#2#3
{
\clist_gput_right:Nn \g__nju_theorem_type_clist { #1 }
\__nju_define_name:nnn { #1 } { #2 } { #3 }
}
-\cs_new:Npn \__nju_name:n #1 { \tl_use:c { g__nju_name_ #1 _tl } }
+\cs_new:Npn \__nju_name:n #1 { \tl_use:c { c__nju_name_ #1 _tl } }
\cs_new:Npn \__nju_info:n #1 { \tl_use:c { g__nju_info_ #1 _tl } }
\cs_new_protected:Npn \__nju_ulined_center_box:nn #1#2
{
@@ -169,13 +164,6 @@
\int_incr:N #1
}
}
-\cs_new_protected:Npn \__nju_put_inempty_seg:nnn #1#2#3
- {
- \tl_set:Nx \l__nju_tmpa_tl
- { \tl_range:Nnn { #1 } { #2 } { #2 + #3 - 1 } }
- \tl_if_empty:NF \l__nju_tmpa_tl
- { \clist_put_right:NV \l__nju_tmp_clist { \l__nju_tmpa_tl } }
- }
\cs_new_protected:Npn \__nju_uline:n #1
{
\mode_leave_vertical:
@@ -242,13 +230,13 @@
{
\tl_if_empty:NT \g__nju_info_title_tl
{ \msg_error:nn { njuthesis } { missing-title } }
- \__nju_spread_box:nnV { #2 } { \kaishu } \g__nju_name_title_tl
+ \__nju_spread_box:nnV { #2 } { \kaishu } \c__nju_name_title_tl
\mode_leave_vertical: \__nju_hskip:
\parbox [ t ] { #3 }
{
- \dim_set_eq:NN \baselineskip \g__nju_coverlineskip_dim
+ \dim_set_eq:NN \baselineskip \c__nju_coverlineskip_dim
#1 \__nju_uline_title:
- \dim_set_eq:NN \l__nju_tmpa_dim \prevdepth
+ \dim_gset_eq:NN \l__nju_tmpa_dim \prevdepth
}
\par \prevdepth \l__nju_tmpa_dim
}
@@ -277,12 +265,16 @@
\__nju_ulined_center_box:nn { #3 }
{ \clist_item:cn { g__nju_info_ #1 _clist } { 1 } }
\__nju_hskip:
- \__nju_spread_box:nnV { #2 } { \kaishu } \g__nju_name_supv_ttl_tl
+ \__nju_spread_box:nnV { #2 } { \kaishu } \c__nju_name_supv_ttl_tl
\__nju_hskip:
\__nju_ulined_center_box:nn { #3 }
{ \clist_item:cn { g__nju_info_ #1 _clist } { 2 } }
\par
}
+\cs_new_protected:Npn \__nju_emblem:N #1
+ { \njuemblem [ black ] { #1 } { ! } }
+\cs_new_protected:Npn \__nju_name:N #1
+ { \njuname [ black ] { #1 } { ! } }
\cs_new_protected:Npn \__nju_abs_bookmark:nn #1#2
{
\phantomsection
@@ -396,7 +388,8 @@
}
{
\AssignTemplateKeys
- \newpage
+ \clearpage
+ \thispagestyle { empty }
\__nju_vskip:N \l__njupage_top_skip
\group_begin:
\l__njupage_format_tl
@@ -426,6 +419,8 @@
oneside .value_forbidden:n = true,
twoside .value_forbidden:n = true,
oneside .bool_gset_inverse:N = \g__nju_twoside_bool,
+ blind .value_forbidden:n = true,
+ blind .bool_set:N = \g__nju_blind_bool,
latin-font .choices:nn =
{ gyre, mac, win, none }
{ \tl_set_eq:NN \g__nju_latin_font_tl \l_keys_choice_tl },
@@ -437,18 +432,26 @@
\ProcessKeysOptions { nju }
\keys_define:nn { nju }
{
- bib .meta:nn = { nju / bib } { #1 },
- info .meta:nn = { nju / info } { #1 },
- style .meta:nn = { nju / style } { #1 }
+ % abstract .meta:nn = { nju / abstract } { #1 },
+ bib .meta:nn = { nju / bib } { #1 },
+ % cover .meta:nn = { nju / cover } { #1 },
+ % font .meta:nn = { nju / font } { #1 },
+ % footer .meta:nn = { nju / footer } { #1 },
+ % footnote .meta:nn = { nju / footnote } { #1 },
+ % header .meta:nn = { nju / header } { #1 },
+ info .meta:nn = { nju / info } { #1 },
+ style .meta:nn = { nju / style } { #1 },
+ theorem .meta:nn = { nju / theorem } { #1 }
+ % toc .meta:nn = { nju / toc } { #1 }
}
\NewDocumentCommand \njusetup { m } { \keys_set:nn { nju } { #1 } }
\NewDocumentCommand \njusetformat { m m }
- { \tl_gset:cn { g__nju_fmt_ #1 _tl } { #2 } }
+ { \tl_gset:cn { c__nju_fmt_ #1 _tl } { #2 } }
\NewDocumentCommand \njusetlength { s m m }
{
\bool_if:nTF { #1 }
- { \skip_gset:cn { g__nju_ #2 _skip } { #3 } }
- { \dim_gset:cn { g__nju_ #2 _dim } { #3 } }
+ { \skip_gset:cn { c__nju_ #2 _skip } { #3 } }
+ { \dim_gset:cn { c__nju_ #2 _dim } { #3 } }
}
\NewDocumentCommand \njusetname { s m o m }
{ \__nju_set_tokenlist:nnnnn {#1} {#2} {#3} {#4} { name } }
@@ -462,7 +465,7 @@
\bool_if:nTF { #1 }
{ \tl_set:Nn \l__nju_tmpb_tl { _en } }
{ \tl_clear:N \l__nju_tmpb_tl }
- \tl_gset:cn { g__nju_ #5 _ #2 \l__nju_tmpa_tl \l__nju_tmpb_tl _tl } {#4}
+ \tl_gset:cn { c__nju_ #5 _ #2 \l__nju_tmpa_tl \l__nju_tmpb_tl _tl } {#4}
}
\PassOptionsToClass
{
@@ -480,7 +483,6 @@
{
{ no-math } { fontspec },
{ perpage } { footmisc },
- { amsmath, thmmarks } { ntheorem },
{ hyphens } { url },
{ warnings-off={ mathtools-colon, mathtools-overbracket } }
{ unicode-math },
@@ -493,10 +495,10 @@
{
geometry,
fancyhdr,
+ footmisc,
setspace,
mathtools,
unicode-math,
- ntheorem,
booktabs,
caption,
graphicx,
@@ -527,13 +529,34 @@
Please~ update~ an~ up-to-date~ version~ of~ it~
using~ your TeX~ package~ manager~ or~ from~ CTAN.
}
-\cs_new_protected:Npn \__nju_check_package:nnn #1#2#3
+\cs_new_protected:Npn \__nju_check_pkg_version:nnn #1#2#3
{
\@ifpackagelater {#1} {#2}
{ } { \msg_error:nnnn { njuthesis } { package-too-old } {#1} {#3} }
}
\sys_if_engine_luatex:T
- { \__nju_check_package:nnn { luatexja } { 2021/10/24 } { 20211024.0 } }
+ { \__nju_check_pkg_version:nnn { luatexja } { 2021/10/24 } { 20211024.0 } }
+\RequirePackage { filehook }
+\msg_new:nnn { njuthesis } { package-conflict }
+ {
+ The~ "#2"~ package~ is~ incompatible~ with~ "#1".\\
+ I~ have~ loaded~ "#1"~ by~ default.~ Maybe~ You~ should~
+ refer~ to~ section~ 4~ of~ the~ "njuthesis"~ manual.
+ }
+\cs_new_protected:Npn \__nju_check_pkg_conflict:nn #1#2
+ {
+ \AtEndOfPackageFile * { #1 }
+ {
+ \AtBeginOfPackageFile * { #2 }
+ { \msg_error:nnnn { njuthesis } { package-conflict } {#1} {#2} }
+ }
+ }
+\clist_map_inline:nn
+ {
+ amscd, amsfonts, amssymb, bbm, bm, eucal,
+ eufrak, mathrsfs, newtxmath, upgreek
+ }
+ { \__nju_check_pkg_conflict:nn { unicode-math } { #1 } }
\int_compare:nTF { \g__nju_info_degree_int == 1 }
{ \file_input:n { njuthesis-undergraduate.def } }
{ \file_input:n { njuthesis- graduate.def } }
@@ -575,23 +598,37 @@
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,
- supervisor-contact .tl_set:N = \g__nju_info_supv_cont_tl,
+ supervisor-contact .tl_set:N = \g__nju_info_supvcont_tl,
email .tl_set:N = \g__nju_info_email_tl
}
\tl_set:Nx \g__nju_info_degree_tl
{
- \clist_item:Nn \g__nju_name_degree_clist
+ \clist_item:Nn \c__nju_name_degree_clist
{ \g__nju_info_degree_int }
}
\int_compare:nTF { \g__nju_info_degree_int == 1 }
{ \tl_set:Nn \g__nju_info_diploma_tl { ug } }
{ \tl_set:Nn \g__nju_info_diploma_tl { g } }
\tl_set:Nx \g__nju_info_type_tl
- { \clist_item:Nn \g__nju_name_type_clist { \g__nju_info_type_int } }
+ { \clist_item:Nn \c__nju_name_type_clist { \g__nju_info_type_int } }
\tl_set:Nx \g__nju_info_type_en_tl
- { \clist_item:Nn \g__nju_name_type_en_clist { \g__nju_info_type_int } }
+ { \clist_item:Nn \c__nju_name_type_en_clist { \g__nju_info_type_int } }
\tl_put_left:Nx \g__nju_info_type_tl
- { \tl_use:c { g__nju_name_ \g__nju_info_diploma_tl _tl } }
+ { \tl_use:c { c__nju_name_ \g__nju_info_diploma_tl _tl } }
+\bool_if:NT \g__nju_blind_bool
+ {
+ \ctex_at_end_preamble:n
+ {
+ \clist_map_inline:Nn \c__nju_blind_info_clist
+ { \tl_gclear:c { g__nju_info_ #1 _tl } }
+ \clist_map_inline:Nn \c__nju_blind_info_en_clist
+ { \tl_gclear:c { g__nju_info_ #1 _en_tl } }
+ \clist_map_inline:Nn \c__nju_blind_infolist_clist
+ { \clist_gclear:c { g__nju_info_ #1 _clist } }
+ \tl_gclear:N \c__nju_name_nju_tl
+ \tl_gclear:N \c__nju_name_nju_en_tl
+ }
+ }
\ctex_at_end_preamble:n
{
\bool_set:Nn \l__nju_second_supv_bool
@@ -938,7 +975,7 @@
\pagenumbering { Roman }
}
\cs_new_protected:Npn \__nju_add_tocline:n #1
- { \addcontentsline { toc } { chapter } { \g__nju_fmt_chapterintoc_tl #1 } }
+ { \addcontentsline { toc } { chapter } { \c__nju_fmt_chapterintoc_tl #1 } }
\cs_generate_variant:Nn \__nju_add_tocline:n { V }
\cs_new_protected:Npn \__nju_chapter:n #1
{
@@ -958,14 +995,16 @@
{
chapter / beforeskip = 10 pt,
chapter / afterskip = 60 pt,
- chapter / format = \g__nju_fmt_chapter_tl,
- section / format = \g__nju_fmt_section_tl,
- subsection / format = \g__nju_fmt_subsection_tl,
- subsubsection / format = \g__nju_fmt_subsubsection_tl,
- contentsname = \g__nju_name_tableofcontents_tl,
- listfigurename = \g__nju_name_listoffigures_tl,
- listtablename = \g__nju_name_listoftables_tl,
- chapter / tocline = \g__nju_fmt_chapterintoc_tl \CTEXnumberline { #1 } #2
+ chapter / format = \c__nju_fmt_chapter_tl,
+ section / format = \c__nju_fmt_section_tl,
+ subsection / format = \c__nju_fmt_subsection_tl,
+ subsubsection / format = \c__nju_fmt_subsubsection_tl,
+ paragraph / format = \c__nju_fmt_paragraph_tl,
+ subparagraph / format = \c__nju_fmt_subparagraph_tl,
+ contentsname = \c__nju_name_tableofcontents_tl,
+ listfigurename = \c__nju_name_listoffigures_tl,
+ listtablename = \c__nju_name_listoftables_tl,
+ chapter / tocline = \c__nju_fmt_chapterintoc_tl \CTEXnumberline { #1 } #2
}
\keys_define:nn { nju / style }
{
@@ -976,7 +1015,7 @@
{
\group_begin:
\keys_set:nn { ctex }
- { chapter/format = \g__nju_fmt_toctitle_tl }
+ { chapter/format = \c__nju_fmt_toctitle_tl }
\bool_if:NTF \g__nju_toc_in_toc_bool
{ \__nju_chapter:n { #1 } }
{
@@ -1076,7 +1115,7 @@
pdftitle = \g__nju_info_title_tl,
pdfauthor = \g__nju_info_author_tl,
pdfkeywords = \g__nju_info_keywords_clist,
- pdfcreator = \g__nju_name_pdfcreator_tl
+ pdfcreator = \c__nju_name_pdfcreator_tl
}
}
\cs_new_protected:Npn \__nju_cref_name:n #1
@@ -1096,6 +1135,38 @@
\crefformat { subsubsection } { 第~#2#1#3~小节 }
\__nju_cref_name:n { figure, table, appendix, proof }
\__nju_cref_name:V \g__nju_theorem_type_clist
+\tl_new:N \l__nju_fn_style_tl
+\keys_define:nn { nju / style }
+ {
+ footnote-style .choices:nn = { plain, pifont }
+ {
+ \tl_gset_eq:NN \l__nju_fn_style_tl \l_keys_choice_tl
+ \int_compare:nT { \l_keys_choice_int = 2 }
+ { \RequirePackage { pifont } }
+ }
+ }
+\cs_new:Npn \__nju_fn_symbol_pifont:n #1
+ { \ding { \int_eval:n { 171 + #1 } } }
+\tl_const:Nn \c__nju_fn_style_plain_tl { plain }
+\tl_const:Nn \c__nju_fn_style_pifont_tl { pifont }
+\cs_new:Npn \__nju_footnote_number:N #1
+ {
+ \tl_case:NnF \l__nju_fn_style_tl
+ {
+ \c__nju_fn_style_plain_tl
+ { \int_use:N #1 }
+ \c__nju_fn_style_pifont_tl
+ { \__nju_fn_symbol_pifont:n {#1} }
+ }
+ { \int_use:N #1 }
+ }
+\cs_set:Npn \thefootnote { \__nju_footnote_number:N \c@footnote }
+\cs_set:Npn \@makefntext #1
+ {
+ \mode_leave_vertical:
+ \hbox_to_wd:nn { 1.5 em } { \@thefnmark \hfil }
+ #1
+ }
\DeclareGraphicsExtensions { .pdf, .eps, .jpg, .png }
\BeforeBeginEnvironment { tabular } { \centering \zihao {5} }
\DeclareCaptionStyle{njucap}
@@ -1108,18 +1179,49 @@
\captionsetup [ figure ] { style = njucap }
\captionsetup [ table ] { style = njucap }
\setlist { noitemsep }
-\cs_new_protected:Npn \__nju_new_theorem:N #1
+\keys_define:nn { nju / theorem }
+ {
+ predefine .bool_set:N = \g__nju_thm_predefine_bool,
+ style .tl_set:N = \l__nju_thm_style_tl,
+ header-font .tl_set:N = \l__nju_thm_header_font_tl,
+ body-font .tl_set:N = \l__nju_thm_body_font_tl,
+ qed-symbol .tl_set:N = \l__nju_thm_qed_symbol_tl,
+ counter .tl_set:N = \l__nju_thm_counter_tl,
+ predefine .initial:n = true,
+ style .initial:n = plain,
+ header-font .initial:n = \normalfont \bfseries,
+ body-font .initial:n = \itshape,
+ qed-symbol .initial:n = \ensuremath { \mdwhtsquare },
+ counter .initial:n = chapter
+ }
+\cs_new_protected:Npn \__nju_new_theorem:Nn #1#2
{
- \theoremsymbol { }
\clist_map_inline:Nn #1
- { \newtheorem { ##1 } { \__nju_name:n { ##1 } } }
- }
-\theoremsymbol { \ensuremath { \mdwhtsquare } }
-\newtheorem* { proof } { \g__nju_name_proof_tl }
-\group_begin:
- \clist_remove_all:Nn \g__nju_theorem_type_clist { proof }
- \__nju_new_theorem:N \g__nju_theorem_type_clist
-\group_end:
+ { \newtheorem { ##1 } { \__nju_name:n { ##1 } } [#2] }
+ }
+\cs_generate_variant:Nn \__nju_new_theorem:Nn { NV }
+\cs_new_protected:Npn \__nju_ntheorem_post_setup:
+ {
+ \exp_args:NV \theoremstyle \l__nju_thm_style_tl
+ \exp_args:NV \theoremheaderfont \l__nju_thm_header_font_tl
+ \exp_args:NV \theorembodyfont \l__nju_thm_body_font_tl
+ \exp_args:NV \theoremsymbol \l__nju_thm_qed_symbol_tl
+ \newtheorem* { proof } { \c__nju_name_proof_tl }
+ \theoremsymbol { }
+ \group_begin:
+ \clist_remove_all:Nn \g__nju_theorem_type_clist { proof }
+ \__nju_new_theorem:NV \g__nju_theorem_type_clist \l__nju_thm_counter_tl
+ \group_end:
+ }
+\ctex_at_end_preamble:n
+ {
+ \bool_if:NT \g__nju_thm_predefine_bool
+ {
+ \PassOptionsToPackage { amsmath, thmmarks } { ntheorem }
+ \RequirePackage { ntheorem }
+ \__nju_ntheorem_post_setup:
+ }
+ }
\cs_new_protected:Npn \__nju_new_img_cmd:nn #1#2
{
\exp_args:Nc \NewDocumentCommand { #1 } { o m m }
@@ -1152,6 +1254,11 @@
\msg_warning:nn { njuthesis } { missing-image }
\RequirePackage { njuvisual }
}
+ \bool_if:NT \g__nju_blind_bool
+ {
+ \RenewDocumentCommand \njuemblem { o m m } { \prg_do_nothing: }
+ \RenewDocumentCommand \njuname { o m m } { \prg_do_nothing: }
+ }
}
\RenewDocumentCommand \maketitle { }
{
@@ -1163,34 +1270,38 @@
{ \__nju_make_cover: }
}
\tl_remove_all:Nn \g__nju_info_title_tl { \\ }
-\bool_if:NF \g__nju_draft_bool
- {
- \bool_if:NT \g__nju_decl_bool
+ \bool_if:NF \g__nju_draft_bool
{
- \__nju_make_origdecl:
- \AtEndEnvironment { document }
- { \__nju_make_authdecl: }
+ \bool_if:NT \g__nju_decl_bool
+ {
+ \__nju_make_origdecl:
+ \AtEndEnvironment { document }
+ {
+ \cleardoublepage
+ \__nju_make_authdecl:
+ \cleardoublepage
+ }
+ }
}
- }
\cleardoublepage
\exp_args:NV \pagestyle \c__nju_pagestyle_tl
\pagenumbering { Roman }
}
\__nju_declare_element:nn { abstract / mark }
{
- content = \g__nju_name_abstract_b_tl,
+ content = \c__nju_name_abstract_b_tl,
format = \sffamily \zihao { -3 },
bottom-skip = 1 cm
}
\__nju_declare_element:nn { abstract / en / mark }
{
- content = \g__nju_name_abstract_b_en_tl,
+ content = \c__nju_name_abstract_b_en_tl,
format = \sffamily \zihao { -3 },
bottom-skip = 1 cm
}
\cs_new_protected:Npn \__nju_print_keywords:nn #1#2
{
- \tl_set:Nv \l__nju_tmpa_tl { g__nju_name_keywords #1 _tl }
+ \tl_set:Nv \l__nju_tmpa_tl { c__nju_name_keywords #1 _tl }
\__nju_get_text_width:NV \l__nju_tmpa_dim \l__nju_tmpa_tl
\list { \l__nju_tmpa_tl }
{
@@ -1231,7 +1342,7 @@
{
\cleardoublepage
\thispagestyle { plain }
- \__nju_abs_bookmark:Vn \g__nju_name_abstract_a_tl { abstract }
+ \__nju_abs_bookmark:Vn \c__nju_name_abstract_a_tl { abstract }
\__nju_make_abstract:
\group_begin: \kaishu \zihao { -4 } #1
}
@@ -1240,17 +1351,19 @@
{
\cleardoublepage
\thispagestyle { plain }
- \__nju_abs_bookmark:Vn \g__nju_name_abstract_a_en_tl { abstract-en }
+ \__nju_abs_bookmark:Vn \c__nju_name_abstract_a_en_tl { abstract-en }
\__nju_make_abstract_en:
\group_begin: \zihao { -4 } #1
}
{ \__nju_print_keywords:nn { _en } { ;~ } \group_end: }
\NewDocumentEnvironment { preface } { +b }
- { \__nju_chapter:V \g__nju_name_preface_tl #1 } { }
+ { \__nju_chapter:V \c__nju_name_preface_tl #1 }
+ { \cleardoublepage }
\NewDocumentEnvironment { acknowledgement } { +b }
- { \__nju_chapter:V \g__nju_name_acknowledgement_tl #1 } { }
+ { \__nju_chapter:V \c__nju_name_acknowledgement_tl #1 }
+ { \cleardoublepage }
\NewDocumentCommand \njupaperlist
- { O { \g__nju_name_paperlist_tl } m }
+ { O { \c__nju_name_paperlist_tl } m }
{
\group_begin:
\RenewDocumentCommand \mkbibnamegiven { m }
@@ -1285,13 +1398,13 @@
}
\NewDocumentEnvironment { notation } { O { 10 em } O { 5 em } }
{
- \__nju_chapter:V \g__nju_name_notation_tl
+ \__nju_chapter:V \c__nju_name_notation_tl
\__nju_make_notation:nn { #1 } { #2 }
}
- { \endlist }
+ { \endlist \cleardoublepage }
\NewDocumentEnvironment { notation* } { O { 10 em } O { 5 em } }
{
- \chapter * { \g__nju_name_notation_tl }
+ \chapter * { \c__nju_name_notation_tl }
\__nju_make_notation:nn { #1 } { #2 }
}
{ \endlist }