summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-06-10 21:09:33 +0000
committerKarl Berry <karl@freefriends.org>2022-06-10 21:09:33 +0000
commitb70463e36d8111900db0c419ae6fbbdc74e2e212 (patch)
tree08a3f4049a9e6e45aba69b188753d31877522ad6 /Master/texmf-dist/tex/latex
parentdc6f87f93a7df5ddba299019708c004b0d9bc663 (diff)
njuthesis (10jun22)
git-svn-id: svn://tug.org/texlive/trunk@63538 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/njuthesis/njuthesis-graduate.def32
-rw-r--r--Master/texmf-dist/tex/latex/njuthesis/njuthesis-undergraduate.def21
-rw-r--r--Master/texmf-dist/tex/latex/njuthesis/njuthesis.cls112
3 files changed, 87 insertions, 78 deletions
diff --git a/Master/texmf-dist/tex/latex/njuthesis/njuthesis-graduate.def b/Master/texmf-dist/tex/latex/njuthesis/njuthesis-graduate.def
index 0aed7c45085..fd834861cc8 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 0.19.0 2022-05-23 11:33:00 +0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
+\GetIdInfo $Id: njuthesis.dtx 0.20.0 2022-06-10 14:42:00 +0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
{Graduate definition file for njuthesis}
\ProvidesExplFile{njuthesis-graduate.def}
{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
@@ -150,7 +150,7 @@
}
\__nju_declare_element:nn { cover / nl / bottom }
{
- content = \__nju_cover_bottom_nl:n { 4 },
+ content = \__nju_cover_bottom_nl:,
bottom-skip = 1 cm,
align = r
}
@@ -193,13 +193,13 @@
\__nju_uline_bientry:Nnnn \l__nju_tmpa_dim { defenddate } { defenddate } { } \\
\__nju_uline_entry:Nnnn \l__nju_tmpa_dim { confer } { confer } { }
}
-\cs_new_protected:Npn \__nju_cover_bottom_nl:n #1
+\cs_new_protected:Npn \__nju_cover_bottom_nl:
{
\c__nju_name_chairman_tl \__nju_hskip:
\__nju_ulined_center_box:nn { 9 em } { \g__nju_info_chairman_tl } \\
\c__nju_name_reviewer_tl \__nju_hskip:
- \__nju_multiline_box:NNnn \l__nju_tmp_int
- \g__nju_info_reviewer_clist { #1 } { 9 em }
+ \__nju_multiline_box:NNNn \l__nju_tmpa_int \l__nju_tmpb_int
+ \g__nju_info_reviewer_clist { 9 em }
}
\__nju_declare_element:nn { authdecl / g / title }
{
@@ -275,7 +275,7 @@
\cs_new_protected:Npn \__nju_authdecl_sign_g:
{
\c__nju_name_authsign_tl \par
- \c__nju_name_blankdate_tl
+ \c__nju_name_blankdate_a_tl
}
\cs_new_protected:Npn \__nju_authdecl_secretlv_g:
{
@@ -445,9 +445,13 @@
% 用于小标题的摘要名称字样
{ abstract_b } { 摘\qquad{}要 } { ABSTRACT },
{ appendix } { 附录 } { appendix },
+ { blankdate } { \qquad{}年 \quad{}月 \quad{}日 } { },
+ { blankdate_a } { \njuline{\qquad\qquad} 年
+ \njuline{\qquad} 月 \njuline{\qquad} 日 } { },
+ { comma } { : } { :~ },
{ dept } { 院系 } { DEPARTMENT },
{ figure } { 图 } { figure },
- { keywords } { 关键词: } { Keywords:~ },
+ { keywords } { 关键词 } { Keywords },
{ lang } { 中文 } { 英文 },
{ nju } { 南京大学 } { Nanjing~ University },
{ table } { 表 } { table }
@@ -460,8 +464,6 @@
{ author_a }
{ \tl_item:Nn \g__nju_info_degree_tl { 1 } 士生姓名 },
{ authsign } { 作者签名:\njuline{\hspace{6em}} },
- { blankdate } { \njuline{\qquad\qquad} 年
- \njuline{\qquad} 月 \njuline{\qquad} 日 },
% 用于摘要的作者名称字样
{ chairman } { 答辩委员会主席: },
{ clc } { 分类号 },
@@ -490,8 +492,8 @@
{ secretstatus } { 论文涉密情况: },
{ secretfree } { 不保密 },
{ secretdate }
- { 保密,保密期( \c__nju_name_blankdate_tl 至
- \c__nju_name_blankdate_tl ) },
+ { 保密,保密期( \c__nju_name_blankdate_a_tl 至
+ \c__nju_name_blankdate_a_tl ) },
{ sign } { (签字) },
{ submitdate } { 论文提交日期 },
{ subtitle } { (题名和副题名) },
@@ -577,14 +579,18 @@
\clist_map_inline:nn
{
{ pagestyle } { headings },
- { section } { \large \sffamily },
+ { emblemcolor } { black },
+ { namecolor } { black },
+ { section } { \large \normalfont \sffamily },
{ chapter } { \c__nju_fmt_section_tl \centering },
{ chapterintoc } { \c__nju_fmt_section_tl },
{ subsection } { \c__nju_fmt_section_tl },
{ subsubsection } { \c__nju_fmt_section_tl },
{ paragraph } { \c__nju_fmt_section_tl },
{ subparagraph } { \c__nju_fmt_section_tl },
- { toctitle } { \centering \zihao { 3 } \bfseries }
+ { toctitle } { \centering \zihao { 3 } \bfseries },
+ { header } { \small \kaishu },
+ { footer } { \small \rmfamily }
}
{ \__nju_define_fmt:nn #1 }
\endinput
diff --git a/Master/texmf-dist/tex/latex/njuthesis/njuthesis-undergraduate.def b/Master/texmf-dist/tex/latex/njuthesis/njuthesis-undergraduate.def
index b1a411d78b2..852e5d36332 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 0.19.0 2022-05-23 11:33:00 +0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
+\GetIdInfo $Id: njuthesis.dtx 0.20.0 2022-06-10 14:42:00 +0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
{Undergraduate definition file for njuthesis}
\ProvidesExplFile{njuthesis-undergraduate.def}
{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
@@ -94,6 +94,7 @@
{ \__nju_vskip: \__nju_name:n { ##1 } : \__nju_uline:n { 7 em } }
\end{flushright}
\vfil
+ \normalfont \normalsize
}
\cs_new_protected:Npn \__nju_make_authdecl:
{
@@ -170,9 +171,13 @@
% 用于小标题的摘要名称字样
{ abstract_b } { 摘\qquad{}要 } { ABSTRACT },
{ appendix } { 附录 } { appendix },
+ { blankdate } { \qquad{}年 \quad{}月 \quad{}日 } { },
+ { blankdate_a } { \njuline{\qquad\qquad} 年
+ \njuline{\qquad} 月 \njuline{\qquad} 日 } { },
+ { comma } { : } { :~ },
{ dept } { 院系 } { DEPARTMENT },
{ figure } { 图 } { figure },
- { keywords } { 关键词: } { Keywords:~ },
+ { keywords } { 关键词 } { Keywords },
{ lang } { 中文 } { 英文 },
{ nju } { 南京大学 } { Nanjing~ University },
{ table } { 表 } { table }
@@ -187,10 +192,10 @@
本科毕业论文(设计) \\ 诚信承诺书 },
{ origsign } { 作者签名 },
{ submitdate } { 提交日期 },
- { supv } { 导师 },
+ { supv } { 指导教师 },
{ title } { 题目 },
{ type } { 本科生毕业论文(设计、作品) },
- { ug } { 本科生 }
+ { ug } { 本科 }
}
{ \__nju_define_name:nn #1 }
\clist_map_inline:nn
@@ -242,14 +247,18 @@
\clist_map_inline:nn
{
{ pagestyle } { plain },
- { section } { \large \sffamily },
+ { emblemcolor } { black },
+ { namecolor } { black },
+ { section } { \large \normalfont \sffamily },
{ chapter } { \c__nju_fmt_section_tl \centering },
{ chapterintoc } { \c__nju_fmt_section_tl },
{ subsection } { \c__nju_fmt_section_tl },
{ subsubsection } { \c__nju_fmt_section_tl },
{ paragraph } { \c__nju_fmt_section_tl },
{ subparagraph } { \c__nju_fmt_section_tl },
- { toctitle } { \centering \zihao { 3 } \bfseries }
+ { toctitle } { \centering \zihao { 3 } \bfseries },
+ { header } { \small \kaishu },
+ { footer } { \small \rmfamily }
}
{ \__nju_define_fmt:nn #1 }
\endinput
diff --git a/Master/texmf-dist/tex/latex/njuthesis/njuthesis.cls b/Master/texmf-dist/tex/latex/njuthesis/njuthesis.cls
index 19d70d8e153..5bc6ba2267b 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.19.0 2022-05-23 11:33:00 +0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
+\GetIdInfo $Id: njuthesis.dtx 0.20.0 2022-06-10 14:42:00 +0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
{Thesis template for Nanjing University}
\ProvidesExplClass{njuthesis}
{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
@@ -57,8 +57,8 @@
\clist_new:N \l__nju_tmp_clist
\dim_new:N \l__nju_tmpa_dim
\dim_new:N \l__nju_tmpb_dim
-\int_new:N \l__nju_tmp_int
-\seq_new:N \l__nju_tmp_seq
+\int_new:N \l__nju_tmpa_int
+\int_new:N \l__nju_tmpb_int
\tl_new:N \l__nju_tmpa_tl
\tl_new:N \l__nju_tmpb_tl
\int_new:N \g__nju_info_degree_int
@@ -151,27 +151,25 @@
{
\dim_compare:nTF { \l__nju_tmpa_dim > #1 }
{
- \hfil
\scalebox
{ \dim_to_decimal_in_unit:nn { #1 } { \l__nju_tmpa_dim } }
[ 1.0 ] { #2 #3 }
- \hfil
- }
- {
- \hbox_to_wd:nn { #1 }
- { #2 \tl_map_inline:nn { #3 } { ##1 \hfil } \unskip }
}
+ { #2 \tl_map_inline:nn { #3 } { ##1 \hfil } \unskip }
}
}
\cs_generate_variant:Nn \__nju_spread_box:nnn { nnV }
\cs_generate_variant:Nn \__nju_spread_box:nnn { nnx }
-\cs_new_protected:Npn \__nju_multiline_box:NNnn #1#2#3#4
+\cs_new_protected:Npn \__nju_multiline_box:NNNn #1#2#3#4
{
\int_set:Nn #1 { 1 }
- \int_do_until:nn { #1 > #3 }
+ \int_set:Nn #2 { \clist_count:N #3 }
+ \int_compare:nF { #2 > 4 }
+ { \int_set:Nn #2 { 4 } }
+ \int_do_until:nn { #1 > #2 }
{
\__nju_ulined_center_box:nn { #4 }
- { \clist_item:Nn #2 { #1 } } \\
+ { \clist_item:Nn #3 { #1 } } \\
\int_incr:N #1
}
}
@@ -212,26 +210,22 @@
\dim_sub:Nn #1 { \textwidth / 2 }
\__nju_ulined_center_box:nn { #1 } { \__nju_info:n { #3 } }
}
-\cs_new:Npn \__nju_date:www #1-#2-#3 \q_stop
+\cs_new:Npn \__nju_date:www #1-#2-#3 \q_stop
{ \__zhnum_date_aux:nnn { #1 } { #2 } { #3 } }
\cs_new:Npn \__nju_date_en:www #1-#2-#3 \q_stop
{ \clist_item:Nn \c__nju_month_en_clist { #2 } ~#3 , ~#1 }
-\cs_new_protected:Npn \__nju_date:n #1
- {
- \tl_new:c { g__nju_info_ #1 date_tl }
- \tl_set:cn { g__nju_info_ #1 date_tl }
+\cs_new_protected:Npn \__nju_date:n #1 { \__nju_date:nn { #1 } { } }
+\cs_new_protected:Npn \__nju_date_en:n #1 { \__nju_date:nn { #1 } { _en } }
+\cs_generate_variant:Nn \exp_last_unbraced:NV { cV }
+\cs_new_protected:Npn \__nju_date:nn #1#2
+ {
+ \tl_set:Nv \l__nju_tmpa_tl { g__nju_info_ #1 date_raw_tl }
+ \tl_new:c { g__nju_info_ #1 date #2 _tl }
+ \tl_set:cx { g__nju_info_ #1 date #2 _tl }
{
- \exp_last_unbraced:Nv
- \__nju_date:www { g__nju_info_ #1 date_raw_tl } \q_stop
- }
- }
-\cs_new_protected:Npn \__nju_date_en:n #1
- {
- \tl_new:c { g__nju_info_ #1 date_en_tl }
- \tl_set:cn { g__nju_info_ #1 date_en_tl }
- {
- \exp_last_unbraced:Nv
- \__nju_date:www { g__nju_info_ #1 date_raw_tl } \q_stop
+ \tl_if_empty:NTF \l__nju_tmpa_tl
+ { \__nju_name:n { blankdate #2 } }
+ { \exp_last_unbraced:cV { __nju_date #2 :www } \l__nju_tmpa_tl \q_stop }
}
}
\msg_new:nnn { njuthesis } { missing-title }
@@ -301,9 +295,9 @@
\par
}
\cs_new_protected:Npn \__nju_emblem:N #1
- { \njuemblem [ black ] { #1 } { ! } }
+ { \njuemblem [ \c__nju_fmt_emblemcolor_tl ] { #1 } { ! } }
\cs_new_protected:Npn \__nju_name:N #1
- { \njuname [ black ] { #1 } { ! } }
+ { \njuname [ \c__nju_fmt_namecolor_tl ] { #1 } { ! } }
\cs_new_protected:Npn \__nju_abs_bookmark:nn #1#2
{
\phantomsection
@@ -336,19 +330,19 @@
\setbox0 = \vbox{\hangindent=\wd\l__nju_tmp_box \hangafter=-1
\leftskip=#3 \rightskip=\leftskip \parindent=\z@ #2\par
\global\setbox2=\hbox{}
- \int_gzero:N \l__nju_tmp_int
+ \int_gzero:N \l__nju_tmpa_int
\loop
\setbox1=\lastbox \unskip\unpenalty
\unless\ifvoid1
\global\setbox2=\hbox{\__nju_uline_box:\penalty0\unhbox2}
- \int_gincr:N \l__nju_tmp_int
+ \int_gincr:N \l__nju_tmpa_int
\repeat
}
{
\noindent\copy\l__nju_tmp_box\unhbox2
\bool_if:NT \g__nju_strict_abs_title_bool
{
- \int_case:nnF { \l__nju_tmp_int }
+ \int_case:nnF { \l__nju_tmpa_int }
{
{ 0 } { \msg_error:nn { njuthesis } { missing-title } }
{ 1 } { \__nju_uline:n { \textwidth } }
@@ -642,28 +636,14 @@
\int_compare:nTF { \g__nju_info_degree_int == 1 }
{ \tl_set:Nn \g__nju_info_diploma_tl { ug } }
{ \tl_set:Nn \g__nju_info_diploma_tl { g } }
-\tl_set:Nx \g__nju_info_type_tl
- { \clist_item:Nn \c__nju_name_type_clist { \g__nju_info_type_int } }
-\tl_set:Nx \g__nju_info_type_en_tl
- { \clist_item:Nn \c__nju_name_type_en_clist { \g__nju_info_type_int } }
-\tl_put_left:Nx \g__nju_info_type_tl
- { \tl_use:c { c__nju_name_ \g__nju_info_diploma_tl _tl } }
-\bool_if:NT \g__nju_blind_bool
- {
- \ctex_at_end_preamble:n
- {
- \clist_map_inline:Nn \c__nju_blind_info_clist
- { \tl_gclear:c { g__nju_info_ #1 _tl } }
- \clist_map_inline:Nn \c__nju_blind_info_en_clist
- { \tl_gclear:c { g__nju_info_ #1 _en_tl } }
- \clist_map_inline:Nn \c__nju_blind_infolist_clist
- { \clist_gclear:c { g__nju_info_ #1 _clist } }
- \tl_gclear:N \c__nju_name_nju_tl
- \tl_gclear:N \c__nju_name_nju_en_tl
- }
- }
\ctex_at_end_preamble:n
{
+ \tl_set:Nx \g__nju_info_type_tl
+ { \clist_item:Nn \c__nju_name_type_clist { \g__nju_info_type_int } }
+ \tl_set:Nx \g__nju_info_type_en_tl
+ { \clist_item:Nn \c__nju_name_type_en_clist { \g__nju_info_type_int } }
+ \tl_put_left:Nx \g__nju_info_type_tl
+ { \tl_use:c { c__nju_name_ \g__nju_info_diploma_tl _tl } }
\bool_set:Nn \l__nju_second_supv_bool
{ ! \clist_if_empty_p:N \g__nju_info_supv_ii_clist }
\tl_set:Nx \g__nju_info_supvfull_tl
@@ -699,6 +679,20 @@
}
}
}
+\bool_if:NT \g__nju_blind_bool
+ {
+ \ctex_at_end_preamble:n
+ {
+ \clist_map_inline:Nn \c__nju_blind_info_clist
+ { \tl_gclear:c { g__nju_info_ #1 _tl } }
+ \clist_map_inline:Nn \c__nju_blind_info_en_clist
+ { \tl_gclear:c { g__nju_info_ #1 _en_tl } }
+ \clist_map_inline:Nn \c__nju_blind_infolist_clist
+ { \clist_gclear:c { g__nju_info_ #1 _clist } }
+ \tl_gclear:N \c__nju_name_nju_tl
+ \tl_gclear:N \c__nju_name_nju_en_tl
+ }
+ }
\bool_lazy_or:nnT
{ \tl_if_empty_p:N \g__nju_latin_font_tl }
{ \tl_if_empty_p:N \g__nju_cjk_font_tl }
@@ -928,8 +922,7 @@
\bool_if:NT \g__nju_draft_bool { \geometry { showframe } }
\keys_define:nn { nju / style }
{
- header/format .tl_gset:N = \g__nju_header_format_tl,
- header/format .initial:n = \small \kaishu,
+ header/format .tl_gset:N = \c__nju_fmt_header_tl,
header .clist_gset:N = \g__nju_header_twoside_clist,
header* .clist_gset:N = \g__nju_header_oneside_clist,
header .initial:n =
@@ -940,8 +933,7 @@
{
{ L } { \leftmark }, { R } { \rightmark }
},
- footer/format .tl_gset:N = \g__nju_footer_format_tl,
- footer/format .initial:n = \small \rmfamily,
+ footer/format .tl_gset:N = \c__nju_fmt_footer_tl,
footer .clist_gset:N = \g__nju_footer_twoside_clist,
footer* .clist_gset:N = \g__nju_footer_oneside_clist,
footer .initial:n = { { C } { \thepage } },
@@ -962,9 +954,9 @@
}
}
\cs_new_protected:Npn \__nju_header:nn #1#2
- { \fancyhead [#1] { \g__nju_header_format_tl \nouppercase {#2} } }
+ { \fancyhead [#1] { \c__nju_fmt_header_tl \nouppercase {#2} } }
\cs_new_protected:Npn \__nju_footer:nn #1#2
- { \fancyfoot [#1] { \g__nju_footer_format_tl \nouppercase {#2} } }
+ { \fancyfoot [#1] { \c__nju_fmt_footer_tl \nouppercase {#2} } }
\fancypagestyle { plain }
{
\fancyhf { }
@@ -1323,6 +1315,8 @@
{
\tl_set:Nv \l__nju_tmpa_tl { c__nju_name_keywords #1 _tl }
\__nju_get_text_width:NV \l__nju_tmpa_dim \l__nju_tmpa_tl
+ \dim_add:Nn \l__nju_tmpa_dim { 1 em }
+ \exp_args:NNv \tl_put_right:Nn \l__nju_tmpa_tl { c__nju_name_comma #1 _tl }
\list { \l__nju_tmpa_tl }
{
\labelwidth \l__nju_tmpa_dim