summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/njuthesis/njuthesis-graduate.def36
-rw-r--r--Master/texmf-dist/tex/latex/njuthesis/njuthesis-undergraduate.def46
-rw-r--r--Master/texmf-dist/tex/latex/njuthesis/njuthesis.cls107
3 files changed, 106 insertions, 83 deletions
diff --git a/Master/texmf-dist/tex/latex/njuthesis/njuthesis-graduate.def b/Master/texmf-dist/tex/latex/njuthesis/njuthesis-graduate.def
index 48eed109b75..0aed7c45085 100644
--- a/Master/texmf-dist/tex/latex/njuthesis/njuthesis-graduate.def
+++ b/Master/texmf-dist/tex/latex/njuthesis/njuthesis-graduate.def
@@ -23,11 +23,10 @@
%% To produce the documentation run the original source files ending with
%% `.dtx' through XeTeX.
%%
-\GetIdInfo $Id: njuthesis.dtx 0.18.0 2022-05-01 12:40:00 +0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
+\GetIdInfo $Id: njuthesis.dtx 0.19.0 2022-05-23 11:33: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 = \__nju_emblem:N \c__nju_emblemwidthi_dim,
@@ -133,7 +132,7 @@
\__nju_declare_element:nn { cover / nl / name }
{
content =
- \__nju_spread_box:nnV { 6 em } { } \c__nju_name_title_tl,
+ \__nju_spread_box:nnV { 6 em } { } \c__nju_name_title_b_tl,
format = \zihao { -0 },
bottom-skip = 0 pt plus 1 fil
}
@@ -151,13 +150,13 @@
}
\__nju_declare_element:nn { cover / nl / bottom }
{
- content = \__nju_cover_bottom_nl:,
+ content = \__nju_cover_bottom_nl:n { 4 },
bottom-skip = 1 cm,
align = r
}
\__nju_declare_element:nn { cover / nl / date }
{
- content = \__nju_qquad: 年 \__nju_quad: 月 \__nju_quad: 日,
+ content = \g__nju_info_bottomdate_tl,
format = \kaishu \zihao { 3 }
}
\cs_new_protected:Npn \__nju_cover_top_nl:
@@ -173,7 +172,7 @@
{
\parbox [ b ] { 15 em } { \__nju_uline_title: } \par
\skip_vertical:n { - 0.5 cm }
- { \zihao { 4 } \c__nju_name_title_b_tl }
+ { \zihao { 4 } \c__nju_name_subtitle_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 }
@@ -192,16 +191,15 @@
\__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 { \c__nju_name_confer_tl }
- \__nju_uline:n { \l__nju_tmpa_dim }
+ \__nju_uline_entry:Nnnn \l__nju_tmpa_dim { confer } { confer } { }
}
-\cs_new_protected:Npn \__nju_cover_bottom_nl:
+\cs_new_protected:Npn \__nju_cover_bottom_nl:n #1
{
- \__nju_name:n { chairman } \__nju_hskip:
- \__nju_ulined_center_box:nn { 9 em } { \__nju_info:n { chairman } } \\
- \__nju_name:n { reviewer } \__nju_hskip:
- \__nju_multiline_box:nnnn { \l__nju_tmp_int }
- { \g__nju_info_reviewer_clist } { 4 } { 9 em }
+ \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_declare_element:nn { authdecl / g / title }
{
@@ -496,6 +494,7 @@
\c__nju_name_blankdate_tl ) },
{ sign } { (签字) },
{ submitdate } { 论文提交日期 },
+ { subtitle } { (题名和副题名) },
{ supv } { 导师 },
% 用于摘要的导师名称字样
{ supv_a } { 指导教师(姓名、职称) },
@@ -508,7 +507,7 @@
% 用于摘要的标题名称字样
{ title_a } { 题目 },
% 用于国家图书馆封面的标题名称字样
- { title_b } { (题名和副题名) },
+ { title_b } { 学位论文 },
% 用于出版授权书的标题名称字样
{ title_c } { 论文题名 },
{ udc } { U D C },
@@ -521,10 +520,12 @@
{ \c__nju_name_nju_tl \g__nju_info_type_tl 中文摘要首页用纸 }
{ \c__nju_name_nju_tl \g__nju_info_type_tl 英文摘要首页用纸 },
{ author } { 作者姓名 } { POSTGRADUATE },
- { major } { 专业方向 } { SPECIALIZATION },
+ { major } { 专业名称 } { SPECIALIZATION },
{ supvfull } { 指导教师 } { MENTOR }
}
{ \__nju_define_name:nnn #1 }
+\int_compare:nT { \g__nju_info_degree_int == 3 }
+ { \njusetname{major}{专业学位类别(领域)} }
\tl_const:Nn \c__nju_text_origdecl_tl
{
本人郑重声明,所提交的学位论文是本人在导师指导下独立进行科学研究工作所
@@ -575,7 +576,8 @@
{ \__nju_define_dim:nn #1 }
\clist_map_inline:nn
{
- { section } { \large \normalfont \sffamily },
+ { pagestyle } { headings },
+ { section } { \large \sffamily },
{ chapter } { \c__nju_fmt_section_tl \centering },
{ chapterintoc } { \c__nju_fmt_section_tl },
{ subsection } { \c__nju_fmt_section_tl },
diff --git a/Master/texmf-dist/tex/latex/njuthesis/njuthesis-undergraduate.def b/Master/texmf-dist/tex/latex/njuthesis/njuthesis-undergraduate.def
index bcba1a60219..b1a411d78b2 100644
--- a/Master/texmf-dist/tex/latex/njuthesis/njuthesis-undergraduate.def
+++ b/Master/texmf-dist/tex/latex/njuthesis/njuthesis-undergraduate.def
@@ -23,11 +23,10 @@
%% To produce the documentation run the original source files ending with
%% `.dtx' through XeTeX.
%%
-\GetIdInfo $Id: njuthesis.dtx 0.18.0 2022-05-01 12:40:00 +0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
+\GetIdInfo $Id: njuthesis.dtx 0.19.0 2022-05-23 11:33: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 = \__nju_emblem:N \c__nju_emblemwidth_dim,
@@ -80,8 +79,14 @@
}
\cs_new_protected:Npn \__nju_make_origdecl:
{
- \chapter* { \c__nju_name_origdecl_tl }
+ \cleardoublepage
\thispagestyle { empty }
+ \begin{center}
+ \njuemblem{2cm}{!}\\
+ {\zihao{-1}\sffamily \c__nju_name_origdecl_tl }
+ \end{center}
+ \zihao{-3}
+ \hspace{2em}
\c__nju_text_origdecl_tl
\vfil
\begin{flushright}
@@ -131,18 +136,6 @@
{ \__nju_name:n { ##1 #1 } #2 \__nju_info:n { ##1 #1 } \\ }
\__nju_name:n { abstract #1 } #2
}
-\__nju_declare_element:nn { abstract / mark }
- {
- content = \c__nju_name_abstract_b_tl,
- format = \sffamily \zihao { -3 },
- bottom-skip = 1 cm
- }
-\__nju_declare_element:nn { abstract / en / mark }
- {
- content = \c__nju_name_abstract_b_en_tl,
- format = \sffamily \zihao { -3 },
- bottom-skip = 1 cm
- }
\cs_new_protected:Npn \__nju_make_abstract:
{
\UseInstance { nju } { abstract / title }
@@ -188,16 +181,16 @@
\clist_map_inline:nn
{
% 用于摘要的作者名称字样
- { author_a } { 本科生姓名 },
- { grade } { 年级 },
- { origdecl }
- { \c__nju_name_nju_tl 本科毕业论文(设计)诚信承诺书 },
- { origsign } { 作者签名 },
- { submitdate } { 提交日期 },
- { supv } { 导师 },
- { title } { 题目 },
- { type } { 本科生毕业论文(设计、作品) },
- { ug } { 本科生 }
+ { author_a } { 本科生姓名 },
+ { grade } { 年级 },
+ { origdecl } { \c__nju_name_nju_tl
+ 本科毕业论文(设计) \\ 诚信承诺书 },
+ { origsign } { 作者签名 },
+ { submitdate } { 提交日期 },
+ { supv } { 导师 },
+ { title } { 题目 },
+ { type } { 本科生毕业论文(设计、作品) },
+ { ug } { 本科生 }
}
{ \__nju_define_name:nn #1 }
\clist_map_inline:nn
@@ -248,7 +241,8 @@
{ \__nju_define_dim:nn #1 }
\clist_map_inline:nn
{
- { section } { \large \normalfont \sffamily },
+ { pagestyle } { plain },
+ { section } { \large \sffamily },
{ chapter } { \c__nju_fmt_section_tl \centering },
{ chapterintoc } { \c__nju_fmt_section_tl },
{ subsection } { \c__nju_fmt_section_tl },
diff --git a/Master/texmf-dist/tex/latex/njuthesis/njuthesis.cls b/Master/texmf-dist/tex/latex/njuthesis/njuthesis.cls
index ea790df30ed..19d70d8e153 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.18.0 2022-05-01 12:40:00 +0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
+\GetIdInfo $Id: njuthesis.dtx 0.19.0 2022-05-23 11:33:00 +0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
{Thesis template for Nanjing University}
\ProvidesExplClass{njuthesis}
{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
@@ -77,9 +77,6 @@
\tl_new:N \g__nju_cjk_font_tl
\tl_new:N \g__nju_config_tl
\clist_new:N \g__nju_theorem_type_clist
-\tl_new:N \g__nju_info_submitdate_tl
-\tl_new:N \g__nju_info_submitdate_en_tl
-\tl_new:N \g__nju_info_defenddate_tl
\tl_const:Nx \c__nju_today_tl
{
\int_to_arabic:n { \c_sys_year_int } -
@@ -149,12 +146,26 @@
\cs_new_protected:Npn \__nju_spread_box:nnn #1#2#3
{
\mode_leave_vertical:
+ \__nju_get_text_width:Nn \l__nju_tmpa_dim { #2 #3 }
\hbox_to_wd:nn { #1 }
- { #2 \tl_map_inline:nn { #3 } { ##1 \hfil } \unskip }
+ {
+ \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 }
+ }
+ }
}
\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 }
@@ -205,6 +216,24 @@
{ \__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 }
+ {
+ \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
+ }
+ }
\msg_new:nnn { njuthesis } { missing-title }
{
The~ title~ should~ not~ be~ left~ blank.\\
@@ -593,6 +622,10 @@
submit-date .initial:V = \c__nju_today_tl,
defend-date .tl_set:N = \g__nju_info_defenddate_raw_tl,
defend-date .initial:V = \c__nju_today_tl,
+ confer-date .tl_set:N = \g__nju_info_conferdate_raw_tl,
+ confer-date .initial:V = \c__nju_today_tl,
+ bottom-date .tl_set:N = \g__nju_info_bottomdate_raw_tl,
+ bottom-date .initial:V = \c__nju_today_tl,
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,
@@ -648,22 +681,21 @@
\bool_if:NT \l__nju_second_supv_bool
{ \__nju_quad: \g__nju_info_supv_ii_en_tl }
}
- \tl_set:Nn \g__nju_info_submitdate_tl
- {
- \exp_last_unbraced:NV
- \__nju_date:www \g__nju_info_submitdate_raw_tl \q_stop
- }
+ \__nju_date:n { submit }
\int_compare:nF { \g__nju_info_degree_int == 1 }
{
- \tl_set:Nn \g__nju_info_submitdate_en_tl
- {
- \exp_last_unbraced:NV
- \__nju_date_en:www \g__nju_info_submitdate_raw_tl \q_stop
- }
- \tl_set:Nn \g__nju_info_defenddate_tl
+ \__nju_date_en:n { submit }
+ \__nju_date:n { defend }
+ \bool_if:NT \g__nju_nlcover_bool
{
- \exp_last_unbraced:NV
- \__nju_date:www \g__nju_info_defenddate_raw_tl \q_stop
+ \__nju_date:n { bottom }
+ \__nju_date:n { confer }
+ \tl_new:N \g__nju_info_confer_tl
+ \tl_set:Nn \g__nju_info_confer_tl
+ {
+ \textbf { \c__nju_name_nju_tl } \hfil
+ \g__nju_info_conferdate_tl
+ }
}
}
}
@@ -959,19 +991,19 @@
\RenewDocumentCommand \frontmatter { }
{
\cleardoublepage
- \exp_args:NV \pagestyle \c__nju_pagestyle_tl
+ \exp_args:NV \pagestyle \c__nju_fmt_pagestyle_tl
\pagenumbering { Roman }
}
\RenewDocumentCommand \mainmatter { }
{
\cleardoublepage
- \exp_args:NV \pagestyle \c__nju_pagestyle_tl
+ \exp_args:NV \pagestyle \c__nju_fmt_pagestyle_tl
\pagenumbering { arabic }
\normalfont \normalsize
}
\AtBeginEnvironment { document }
{
- \exp_args:NV \pagestyle \c__nju_pagestyle_tl
+ \exp_args:NV \pagestyle \c__nju_fmt_pagestyle_tl
\pagenumbering { Roman }
}
\cs_new_protected:Npn \__nju_add_tocline:n #1
@@ -1172,7 +1204,7 @@
\DeclareCaptionStyle{njucap}
{
font = small,
- labelfont = bf,
+ font += bf,
labelsep = quad,
justification = centering
}
@@ -1284,21 +1316,9 @@
}
}
\cleardoublepage
- \exp_args:NV \pagestyle \c__nju_pagestyle_tl
+ \exp_args:NV \pagestyle \c__nju_fmt_pagestyle_tl
\pagenumbering { Roman }
}
-\__nju_declare_element:nn { abstract / mark }
- {
- content = \c__nju_name_abstract_b_tl,
- format = \sffamily \zihao { -3 },
- bottom-skip = 1 cm
- }
-\__nju_declare_element:nn { abstract / en / mark }
- {
- 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 { c__nju_name_keywords #1 _tl }
@@ -1374,10 +1394,17 @@
{ \njuline { \bf ##1 } } { ##1 } }
\RenewDocumentCommand \mkbibdateshort { m m m }
{ \textbf { \thefield { ##1 } } }
- \begin{refsection}
- \nocite { #2 }
- \printbibliography [ heading = subbibliography, title = #1 ]
- \end{refsection}
+ \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}
+ }
\group_end:
}
\cs_new_protected:Npn \__nju_notation_label:n #1 { #1 \hfil }