Newer
Older
\chapter* { \c_@@_name_nju_tl \c_@@_name_orig_decl_tl }
\thispagestyle { empty }
\c_@@_orig_decl_text_tl
\vfil
\begin{flushright}
\clist_set:Nn \l_@@_tmp_clist { orig_sign, id, orig_date }
\int_compare:nF { \l_@@_info_degree_int == 1 }
{ \clist_remove_all:Nn \l_@@_tmp_clist { id } }
\clist_map_inline:Nn \l_@@_tmp_clist
{ \@@_vskip: \@@_name:n { ##1 } : \@@_uline:n { 7 em } }
% 如果在研究生模板中选择了 \opt{nlcover},就生成用于申请学位的国家图书馆封面和原创性声明,反之生成普通封面。
% \begin{macrocode}
\bool_if:NT \g_@@_orig_decl_bool { \@@_make_orig_decl: }
% \begin{arguments}
% \item 宽度,|dim| 型变量
% \end{arguments}
{ \bf \kaishu \zihao { -2 } \@@_uuline:n { #1 } }
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_abs_info_style:n,\@@_abs_info_style_en:n}
% \begin{arguments}
% \item 字号
% \end{arguments}
% \begin{macrocode}
\cs_new_protected:Npn \@@_abs_info_style_en: #1
{ \zihao{ #1 } }
% \begin{macro}{\@@_abs_bookmark:,\@@_abs_bookmark_en:}
% \changes{v0.14}{2021/12/21}{将摘要插入目录。}
% 生成摘要的目录条目。
\cs_new_protected:Npn \@@_abs_bookmark:
{
\phantomsection
\addcontentsline { toc } { chapter }
{ \c_@@_sec_format_tl \c_@@_name_lang_tl \c_@@_name_abstract_tl }
}
\cs_new_protected:Npn \@@_abs_bookmark_en:
\phantomsection
\addcontentsline { toc } { chapter }
{ \c_@@_sec_format_tl \c_@@_name_abstract_en_tl }
%
% \begin{macro}{\@@_abs_title_ug:n}
% 绘制本科生摘要标题。
% \begin{arguments}
% \item 语言,空置为中文,|_en| 为英文
% \end{arguments}
% \begin{macrocode}
\cs_generate_variant:Nn \clist_map_inline:nn { Vn }
\cs_new_protected:Npn \@@_abs_title_ug:n #1
\@@_name:n { nju } \@@_name:n { type }
\@@_name:n { lang #1 } \@@_name:n { abstract }
% \begin{arguments}
% \item 语言,空置为中文,|_en| 为英文
% \item 分隔符
% \end{arguments}
\tl_if_blank:eTF { #1 }
{ \c_@@_name_title_tl }
{ \clist_item:Nn \c_@@_name_type_en_clist { \l_@@_info_type_int } }
#2 \tl_use:c { l_@@_info_title #1 _tl } \\
% \end{macrocode}
% 由于作者姓名使用的字样发生了变动,这里进行替换以便嵌入循环。
% \begin{macrocode}
\tl_set_eq:NN \c_@@_name_author_tl \c_@@_name_author_full_tl
% \end{macrocode}
% 使用循环输出院系、专业、作者、导师信息。
% \begin{macrocode}
\clist_map_inline:nn { dept, major, author, supv_full }
{ \@@_name:n { ##1 #1 } #2 \@@_info:n { ##1 #1 } \\ }
\@@_name:n { abstract #1 } #2
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_abs_title_g:n}
% 绘制研究生摘要标题。
% \begin{arguments}
% \item 语言,空置为中文,|_en| 为英文
% \end{arguments}
% \begin{macrocode}
\cs_new_protected:Npn \@@_abs_title_g:n #1
\@@_name:n { nju } \@@_info:n { type }
\@@_name:n { lang #1 } \@@_name:n { abstract_r }
% \begin{arguments}
% \item 语言,空置为中文,|_en| 为英文
% \item 分隔符
% \end{macrocode}
% 中文摘要环境,使用 \cs{@@_full_uline:NV} 确定内容宽度后,调用 \cs{@@_uline:n} 或 \cs{@@_ulined_center_box:nn} 命令以绘制横穿页面的下划线。前两行为标题。
% \begin{macrocode}
\@@_full_uline:NV \l_@@_tmp_dim
{
\clist_item:Nn \c_@@_name_type_clist { \l_@@_info_type_int }
\c_@@_name_title_s_tl #2
}
\@@_ulined_center_box:nn { \l_@@_tmp_dim }
% \end{macrocode}
% 专业、年级、姓名。
% \begin{macrocode}
\@@_full_uline:NV \l_@@_tmp_dim
{
\@@_ulined_center_box:nn { 11 em } { \l_@@_info_major_tl }
\c_@@_name_major_s_tl
\@@_ulined_center_box:nn { 4 em } { \l_@@_info_grade_tl }
\c_@@_name_grade_tl
}
\@@_ulined_center_box:nn { \l_@@_tmp_dim }
{ \l_@@_info_author_tl } \\
% \end{macrocode}
% 导师姓名、职称。
% \begin{macrocode}
\@@_full_uline:NV \l_@@_tmp_dim
{ \c_@@_name_supv_full_tl \c_@@_name_supv_r_tl #2 }
\@@_ulined_center_box:nn { \l_@@_tmp_dim }
{ \l_@@_info_supv_full_tl }
}
% \end{macrocode}
% 英文摘要环境。前两行为标题。
% \begin{macrocode}
{ \clist_item:cn { c_@@_name_type #1 _clist }
{ \l_@@_info_type_int } # 2 }
\@@_ulined_center_box:nn { \l_@@_tmp_dim }
{ \tl_range:Nnn \l_@@_info_title_en_tl { 1 } { 40 } } \\
\@@_uline:n { \textwidth } \@@_qquad:
\tl_range:Nnn \l_@@_info_title_en_tl { 41 } { -1 }
% \end{macrocode}
% 使用循环输出专业、姓名、导师。注意这里将 |\\| 放置在前部,以避免末尾生成多余的换行符产生 |Underfull \vbox| 信息。
% \begin{macrocode}
\clist_map_inline:nn { major, author, supv_full }
\@@_uline_entry:nnnn \l_@@_tmp_dim { ##1 _en } { ##1 _en } { #2 }
}
}
%
% \begin{macro}{\@@_print_keywords:nn}
% 生成中英文关键词列表。
% \begin{arguments}
% \item 语言,空置为中文,|_en| 为英文
% \item 关键词分隔符
% \end{arguments}
\cs_new_protected:Npn \@@_print_keywords:nn #1#2
{
\skip_vertical:n { 2 ex }
\group_begin:
% \end{macrocode}
% “关键词”字样使用加粗黑体。
% \begin{macrocode}
\noindent \bf \heiti
\use:c { c_@@_name_keywords #1 _tl }
\group_end:
\clist_use:cn { l_@@_info_keywords #1 _clist } { #2 }
% \subsubsection{绘制摘要}
%
% \begin{macro}{\@@_make_abs_ug:nn}
% \changes{v0.13}{2021/12/12}{使用 \hologo{LaTeX3} 语法重构本科生摘要。}
% \begin{arguments}
% \item 语言,空置为中文,|_en| 为英文
% \item 关键词分隔符
% \end{arguments}
% 生成本科生摘要。
\cs_new_protected:Npn \@@_make_abs_ug:nn #1#2
{
\begin{center}
\@@_abs_title_ug:n { #1 }
\end{center}
\group_begin:
\@@_abs_info_style:n { -4 }
\@@_abs_info_ug:nn { #1 } { #2 }
\group_end: \@@_vskip:
}
% \begin{macro}{\@@_make_abs_g:nn}
% \changes{v0.13}{2021/12/12}{使用 \hologo{LaTeX3} 语法重构研究生摘要。}
% \begin{arguments}
% \item 语言,空置为中文,|_en| 为英文
% \item 关键词分隔符
% \end{arguments}
% 生成研究生摘要。
\cs_new_protected:Npn \@@_make_abs_g:nn #1#2
{
\begin{center}
\end{center}
\group_begin:
\@@_abs_info_style:n { 4 }
\@@_abs_info_g:nn { #1 } { #2 }
% \begin{environment}{abstract}
% \changes{v0.13}{2021/12/12}{重新绘制摘要。}
% 英文摘要环境。\pkg{xparse} 目前不支持合并带有星号的环境,因此需要单独定义。
% \begin{macrocode}
\NewDocumentEnvironment{abstract*} { +b }
% \begin{environment}{preface}
% \begin{environment}{acknowledgement}
\NewDocumentEnvironment { preface } { +b }
{ \njuchapter { \c_@@_name_preface_tl } #1 } { }
\NewDocumentEnvironment { acknowledgement } { +b }
{ \njuchapter { \c_@@_name_acknowledgement_tl } #1 } { }
% \begin{macro}{\njupaperlist}
% \changes{v0.10}{2021/09/29}{新增了成果列表页面。}
\NewDocumentCommand \njupaperlist
{ O { \c_@@_name_paperlist_tl } m }
\group_begin:
% \end{macrocode}
% 修改姓名的显示方式,使被注解的姓名可被加粗下划线表示。
% \begin{macrocode}
\RenewDocumentCommand \mkbibnamegiven { m }
{ \njuline { \bf ##1 } } { ##1 } }
\RenewDocumentCommand \mkbibnamefamily { m }
{ \njuline { \bf ##1 } } { ##1 } }
% \end{macrocode}
% 修改年份的显示方式,默认进行加粗。
% \begin{macrocode}
\RenewDocumentCommand \mkbibdateshort { m m m }
{ \textbf { \thefield { ##1 } } }
\nocite { #2 }
\printbibliography [ heading = subbibliography, title = #1 ]
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
%
% \subsection{符号表}
%
% \begin{macro}{\@@_notation_label:n}
% 左对齐的标签格式,用于符号表。
% \begin{macrocode}
\cs_new_protected:Npn \@@_notation_label:n #1 { #1 \hfil }
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_make_notation:nn}
% 生成符号表。由于符号表只有符号和说明两列,相比于 \env{longtable} 环境,\env{description} 环境的语法更为简洁直观,且说明文字可以换行,因而此处使用 \hologo{LaTeX2e} 的列表环境进行封装,定义和语法参见 \file{source2e.pdf} 中的 File I \quad ltlists.dtx 一章。\tn{list} 环境使用宽度固定的盒子制作标签,通过指定这个盒子的宽度 \tn{labelwidth} 即可确定左侧标签区域的宽度。右侧说明文字区域的宽度无法直接指定,而是靠计算左右边距 \tn{leftmargin} 和 \tn{rightmargin} 得到的。
% \begin{macrocode}
\cs_new_protected:Npn \@@_make_notation:nn #1#2
{
\dim_set:Nn \l_@@_tmp_dim { \textwidth - #1 - #2 }
\list { }
{
\labelwidth #2
\itemindent \z@
\labelsep \z@
\itemsep \z@
\parsep \z@
\leftmargin 0.5\l_@@_tmp_dim
\rightmargin \leftmargin
\advance \leftmargin #2
\let \makelabel \@@_notation_label:n
}
}
% \end{macrocode}
% \end{macro}
%
% \begin{environment}{notation}
% \changes{v0.14}{2022/01/17}{提供符号表环境。}
% 符号表环境。
% \begin{arguments}
% \item 说明区域宽度,初始值为 10 em。说明宽度的调整更为常见,所以放在前面。
% \item 符号区域宽度,初始值为 5 em
% \end{arguments}
% \begin{macrocode}
\NewDocumentEnvironment { notation } { O { 10 em } O { 5 em } }
{
\njuchapter { \c_@@_name_notation_tl }
\@@_make_notation:nn { #1 } { #2 }
}
{ \endlist }
% \end{macrocode}
% \end{environment}
%
% \begin{environment}{notation*}
% 带有星号的符号表不会插入目录。
% \begin{macrocode}
\NewDocumentEnvironment { notation* } { O { 10 em } O { 5 em } }
{
\chapter* { \c_@@_name_notation_tl }
\@@_make_notation:nn { #1 } { #2 }
}
{ \endlist }
%</class>
% \end{macrocode}
% \end{environment}
%