Newer
Older
% \begin{macrocode}
url,
% \end{macrocode}
% \pkg{emptypage} 用于清除空白页的页码。
% \begin{macrocode}
emptypage,
% \end{macrocode}
% 南京大学视觉形象化标准宏包 \pkg{njuvisual} 用于绘制学校 logo。
% \begin{macrocode}
njuvisual,
% 数学,\pkg{amsmath} 必须在 \pkg{unicode-math} 前加载。
% \pkg{unicode-math} 指定了 \hologo{XeTeX} 和 \hologo{LuaTeX} 下所使用的数学字体。
% 用于配置数学环境的 \pkg{mathtools} 会与 \pkg{unicode-math} 发生冲突,此处手动消除其警告。
amsmath,
amsthm,
mathtools,
thmtools,
unicode-math,
listings,
enumitem,
% \end{macrocode}
% 按以下顺序加载两个关于引用的包。
% \pkg{hyperref} 覆写了大量命令,因此需要在其他包最后载入。
% 仅有 \pkg{cleveref} 需要在 \pkg{hyperref} 后载入,否则会报错。
% \begin{macrocode}
hyperref,
cleveref
}
% \begin{macro}{\njuline}
% 针对编译引擎,使用不同的宏包构建可以对中文正常换行的下划线命令。
\sys_if_engine_xetex:T
{
\RequirePackage{xeCJKfntef,microtype}
\NewDocumentCommand \njuline { m } { \CJKunderline{#1} }
}
\sys_if_engine_luatex:T
{
\RequirePackage{lua-ul,dashundergaps}
\NewDocumentCommand \njuline { m } { \underLine{#1} \null }
}
% \begin{macro}{\@@_check_package:nnn}
% 检查过时宏包。
% \begin{macrocode}
\msg_new:nnn { njuthesis } { package-too-old }
{
Package~ "#1"~ is~ too~ old. \\
The~ njuthesis~ class~ only~ supports~ "#1"~ with~
a~ version higher~ than~ v#2.\\
Please~ update~ an~ up-to-date~ version~ of~ it~
}
\cs_new_protected:Npn \@@_check_package:nnn #1#2#3
{
\@ifpackagelater {#1} {#2}
{ } { \msg_error:nnnn { njuthesis } { package-too-old } {#1} {#3} }
}
% \end{macrocode}
% \end{macro}
%
% 检查绘制下划线所需的 \pkg{luatexja} 包版本。该宏包在2021-09-18的更新解决了下划线中断问题,然而在2021-10-24的更新才提供了正确的内嵌日期。
{ \@@_check_package:nnn { luatexja } { 2021/10/24 } { 20211024.0 } }
% \begin{macrocode}
\tl_if_empty:NTF \g_@@_latin_fontset_tl
{
\tl_if_empty:NT \g_@@_cjk_fontset_tl
{ \bool_gset_true:N \g_@@_load_system_fontset_bool }
}
% \end{macrocode}
%
% 进行系统检测。
% 检测 Windows 的命令由\pkg{l3kernal}提供,
% 检测 macOS 的命令由\pkg{ctex}提供,
% 这两种情况外的系统被判断为 Linux,一律使用自由字体。
% \begin{macrocode}
{
\sys_if_platform_windows:TF
{ \tl_set:Nn \g_@@_latin_fontset_tl { windows }
\tl_set:Nn \g_@@_cjk_fontset_tl { windows } }
{ \ctex_if_platform_macos:TF
{ \tl_set:Nn \g_@@_latin_fontset_tl { macos }
\tl_set:Nn \g_@@_cjk_fontset_tl { macos } }
{ \tl_set:Nn \g_@@_latin_fontset_tl { gyre }
\tl_set:Nn \g_@@_cjk_fontset_tl { fandol } } }
%
% \begin{macro}{\@@_load_latin_font_windows:}
% Windows 西文字体
% \begin{macrocode}
\cs_new_protected:Npn \@@_load_latin_font_windows:
{
\setmainfont{Times~New~Roman}
\setsansfont{Arial}
\setmonofont{Courier~New}[Scale=MatchLowercase]
}
{
\setmainfont{Times~New~Roman}
\setsansfont{Arial}
\setmonofont{Menlo}[Scale=MatchLowercase]
}
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
{
\setmainfont{texgyretermes}[
Extension=.otf,
UprightFont=*-regular,
BoldFont=*-bold,
ItalicFont=*-italic,
BoldItalicFont=*-bolditalic]
\setsansfont{texgyreheros}[
Extension=.otf,
UprightFont=*-regular,
BoldFont=*-bold,
ItalicFont=*-italic,
BoldItalicFont=*-bolditalic]
\setmonofont{texgyrecursor}[
Extension=.otf,
UprightFont=*-regular,
BoldFont=*-bold,
ItalicFont=*-italic,
BoldItalicFont=*-bolditalic,
Scale=MatchLowercase,
Ligatures=CommonOff]
}
{
\setCJKmainfont{SimSun}[
AutoFakeBold=2.17,
ItalicFont=KaiTi]
\setCJKsansfont{SimHei}
\setCJKmonofont{FangSong}
\setCJKfamilyfont{zhsong}{SimSun}[AutoFakeBold=2.17]
\setCJKfamilyfont{zhhei}{SimHei}
\setCJKfamilyfont{zhfs}{FangSong}
\setCJKfamilyfont{zhkai}{KaiTi}[AutoFakeBold=2.17]
}
{
% 移除 does not contain script "CJK" 警告
\msg_redirect_name:nnn {fontspec} {no-script} {info}
\setCJKmainfont{Songti~SC~Light}[
BoldFont=Songti~SC~Bold,
ItalicFont=Kaiti~SC,
BoldItalicFont=Kaiti~SC~Bold]
\setCJKsansfont{Heiti~SC~Light}[BoldFont=Heiti~SC~Medium]
\setCJKmonofont{STFangsong}
\setCJKfamilyfont{zhsong}{Songti~SC~Light}[BoldFont=Songti~SC~Bold]
\setCJKfamilyfont{zhhei}{Heiti~SC~Light}[BoldFont=Heiti~SC~Medium]
\setCJKfamilyfont{zhfs}{STFangsong}
\setCJKfamilyfont{zhkai}{Kaiti~SC}[BoldFont=Kaiti~SC~Bold]
\setCJKfamilyfont{zhnewhei}{PingFang~SC}
}
% \begin{macro}{\@@_load_cjk_font_fandol:}
% Fandol 字体
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
{
% 移除 does not contain script "CJK" 警告
\msg_redirect_name:nnn {fontspec} {no-script} {info}
\setCJKmainfont{FandolSong-Regular}[
Extension=.otf,
BoldFont=FandolSong-Bold,
ItalicFont=FandolKai-Regular]
\setCJKsansfont{FandolHei-Regular}[
Extension=.otf,
BoldFont=FandolHei-Bold]
\setCJKmonofont{FandolFang-Regular}[Extension=.otf]
\setCJKfamilyfont{zhsong}{FandolSong-Regular}[
Extension=.otf,
BoldFont=FandolSong-Bold]
\setCJKfamilyfont{zhhei}{FandolHei-Regular}[
Extension=.otf,
BoldFont=FandolHei-Bold]
\setCJKfamilyfont{zhfs}{FandolFang-Regular}[Extension=.otf]
\setCJKfamilyfont{zhkai}{FandolKai-Regular}[
Extension=.otf,
AutoFakeBold=2.17]
}
%
% \begin{macro}{\@@_load_cjk_font_founder:}
\sys_if_engine_luatex:T
{
% \end{macrocode}
% 在 LuaTeX 中调整方正字体括号位置
% XeTeX 暂无好的解决方法
% \begin{macrocode}
\defaultCJKfontfeatures{JFM={zh_CN/{quanjiao,fzpr}}}
}
\setCJKmainfont{FZSSK}[% 方正书宋
BoldFont=FZXBSK,% 方正小标宋
ItalicFont=FZKTK]% 方正楷体
\setCJKsansfont{FZXH1K}[% 方正细黑一
BoldFont=FZHTK]% FZHTK 方正黑体
\setCJKmonofont{FZFSK}[Extension=.ttf]% 方正仿宋
\setCJKfamilyfont{zhsong}
{FZSSK}[
Extension=.ttf,
BoldFont=FZXBSK]
\setCJKfamilyfont{zhhei}
{FZHTK}[
Extension=.ttf,
AutoFakeBold=2.17]
\setCJKfamilyfont{zhfs}
{FZFSK}[Extension=.ttf]
\setCJKfamilyfont{zhkai}
{FZKTK}[Extension=.ttf]
\defaultCJKfontfeatures{}
}
{
% 思源宋体
\setCJKmainfont[
UprightFont=NotoSerifSC-Regular,
BoldFont=NotoSerifSC-Bold,
ItalicFont=NotoSerifSC-Regular,
BoldItalicFont=NotoSerifSC-Bold,
ItalicFeatures=FakeSlant,
BoldItalicFeatures=FakeSlant]{Noto~Serif~SC}
% 思源黑体
\setCJKsansfont[
UprightFont=NotoSansSC-Regular,
BoldFont=NotoSansSC-Bold,
ItalicFont=NotoSansSC-Regular,
BoldItalicFont=NotoSansSC-Bold,
ItalicFeatures=FakeSlant,
BoldItalicFeatures=FakeSlant]{Noto~Sans~SC}
\setCJKfamilyfont{zhsong}{Noto~Serif~SC}
\setCJKfamilyfont{zhhei}{Noto~Sans~SC}
\setCJKfamilyfont{zhfs}{FZFSK}[Extension=.ttf]
\setCJKfamilyfont{zhkai}{FZKTK}[Extension=.ttf]
{
\use:c { @@_load_latin_font_ \g_@@_latin_fontset_tl : }
\use:c { @@_load_cjk_font_ \g_@@_cjk_fontset_tl : }
% \end{macrocode}
% 自行定义C\hologo{TeX}中的四类字体命令。
% \begin{macrocode}
\NewDocumentCommand \songti { } { \CJKfamily{zhsong} }
\NewDocumentCommand \heiti { } { \CJKfamily{zhhei} }
\NewDocumentCommand \fangsong { } { \CJKfamily{zhfs} }
\NewDocumentCommand \kaishu { } { \CJKfamily{zhkai} }
% \end{macrocode}
%
% 载入设置的字体。
% \begin{macrocode}
% 设置数学字体 (XITS, 或者 \href{https://www.stixfonts.org}{STIX}, 与 Times New Roman 最为相近)
% \setmathfont{STIXTwoMath-Regular}[Extension = .otf]
\setmathfont{XITSMath-Regular}[
BoldFont = XITSMath-Bold,
Extension = .otf]
\setmathfont{latinmodern-math.otf}[range={cal,bb,frak}]
\geometry
{
vmargin = 2.5 cm,
hmargin = 3.2 cm,
headheight = 15 pt
}
\fancypagestyle { plain }
{
\fancyhf { }
\fancyfoot [ C ] { \zihao{5} \thepage }
\RenewDocumentCommand \headrulewidth { } { 0 pt }
\RenewDocumentCommand \footrulewidth { } { 0 pt }
}
\fancypagestyle{headings}
{
\fancyhf { }
\fancyhead [ CO ] { \leftmark }
\fancyhead [ CE ] { \rightmark }
\fancyfoot [ C ] { \zihao{5} \thepage }
\RenewDocumentCommand \headrulewidth { } { 0 pt }
\RenewDocumentCommand \footrulewidth { } { 0.4 pt }
\setlength { \headheight } { 20 pt }
}
% \begin{macro}{\frontmatter}
% 重定义 \cs{frontmatter},清空页眉页脚以及页码设置。
% 此命令仅为解决原 \cls{book} 类中使用小写罗马字母序号的冲突,并不建议使用。
\RenewDocumentCommand \frontmatter { }
{
\cleardoublepage
\pagestyle{empty}
\pagenumbering{Roman}
}
% \changes{v0.12}{2021/12/03}{修复了摘要页字体格式泄漏到正文的问题。}
% \changes{v0.12}{2021/12/03}{修复了页眉上长标题重叠的问题。}
% 重定义 \cs{mainmatter},在论文主体部分载入页眉页脚设置,并重新进行数字编号。
% \begin{macrocode}
\RenewDocumentCommand \mainmatter { }
{
\cleardoublepage
\int_compare:nTF { \g_@@_info_degree_int == 1 }
\pagenumbering{arabic}
\normalfont\normalsize
}
% \end{macrocode}
% \end{macro}
\tl_const:Nn \c_@@_section_format_tl { \large \normalfont \sffamily }
% \end{macrocode}
% \end{macro}
%
% \begin{macrocode}
\ctexset
{
chapter/beforeskip = 10 pt,
chapter/afterskip = 60 pt,
chapter/format = \centering \c_@@_section_format_tl,
section/format = \c_@@_section_format_tl,
subsection/format = \c_@@_section_format_tl,
subsubsection/format = \c_@@_section_format_tl
% \changes{v0.13}{2021/12/09}{删除 \pkg{tocloft},改用 \pkg{ctex} 内置的目录设置。}
{ \addcontentsline { toc } { chapter } { \c_@@_section_format_tl #1 } }
\NewDocumentCommand \njuchapter { m }
{ \chapter*{#1} \addcontentsline { toc } { chapter }
{ \c_@@_section_format_tl #1} }
contentsname = {目\hspace{2em}录},
listfigurename = {插图清单},
listtablename = {表格清单},
chapter / tocline = \c_@@_section_format_tl \CTEXnumberline {#1} #2
\tl_const:Nn \c_@@_toc_title_tl { \centering \zihao{3} \bf }
% \begin{macro}{\@@_modify_toc_title:nn}
% 通过 group 内修改标题设置,改变标题页字体。
\cs_new_protected:Npn \@@_modify_toc_title:nn #1#2
{
\group_begin:
\ctexset { chapter/format = \c_@@_toc_title_tl }
\njuchapter{#1}
\group_end:
\@starttoc{#2}
}
% \begin{macro}{\tableofcontents,\listoffigures,\listoftables}
% 重定义目录命令,修改标题格式并插入书签。
\RenewDocumentCommand \tableofcontents { }
{ \@@_modify_toc_title:nn { \contentsname } { toc } }
\RenewDocumentCommand \listoffigures { }
{ \@@_modify_toc_title:nn { \listfigurename } { lof } }
\RenewDocumentCommand \listoftables { }
{ \@@_modify_toc_title:nn { \listtablename } { lot } }
\RequirePackage[
style=gb7714-2015,
%style=numeric-comp,
%citestyle=authortitle-icomp,
% citestyle=numeric-comp,
%bibstyle=authoryear,
% bibstyle=numeric,
sorting=none,
%sorting=nyt,
%sortcites=true,
%autocite=footnote,
backend=biber, % Compile the bibliography with biber
hyperref=true,
backref=false,
citecounter=true,
pagetracker=true,
citetracker=true,
ibidtracker=context,
autopunct=true,
autocite=plain,
% gbpub=false, % Uncomment if you do NOT want '[S.l. : s.n.]'
% in reference entries, GitHub Issue (#47)
% gbnamefmt=lowercase, % Uncomment if you do NOT want uppercase author
% names in reference entries, GitHub Issue (#23)
% \changes{v0.12}{2021/12/06}{设置输出参考文献的默认选项。}
% 设置参考文献名称
% \begin{macrocode}
\ctexset{ bibname = {参考文献} }
% \end{macrocode}
% 将参考文献插入目录
% \begin{macrocode}
\DeclarePrintbibliographyDefaults{ heading = bibintoc }
% \end{macrocode}
%
\AtEveryBibitem{
\clearfield{abstract}
\clearfield{issn}
\clearfield{isbn}
\clearfield{archivePrefix}
\clearfield{arxivId}
\clearfield{pmid}
\clearfield{eprint}
\ifentrytype{online}{}{\ifentrytype{misc}{}{\clearfield{url}}}
}
% \end{macrocode}
% 清除标题中用于手动换行的 |!| 控制符。
% \begin{macrocode}
\tl_set_eq:NN \l_@@_tmpb_tl \l_@@_info_title_tl
\tl_remove_all:Nn \l_@@_tmpb_tl { ! }
\hypersetup
{
bookmarksnumbered = true,
psdextra = true,
unicode = true,
% \end{macrocode}
% 填写 PDF 元信息。
% \begin{macrocode}
pdfauthor = \l_@@_info_author_tl,
pdfkeywords = \l_@@_info_keywords_clist,
pdfcreator = \c_@@_name_pdf_creator_tl
}
}
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
% 修改 \pkg{cleverref} 的标签名称。默认在名称后面添加空格,删除公式编号的括号
% \begin{macrocode}
\crefdefaultlabelformat{#2#1#3\,}
\crefname { figure } { 图 } { 图 }
\crefname { table } { 表 } { 表 }
\crefname { appendix } { 附录 } { 附录 }
\crefformat { equation } { 公式~#2#1#3~ }
\crefformat { chapter } { 第#2#1#3章 }
\crefformat { section } { 第~#2#1#3~节 }
\crefformat { subsection } { 第~#2#1#3~小节 }
\crefformat { subsubsection } { 第~#2#1#3~小节 }
% \crefname{assumption}{假设}{假设}
% \crefname{axiom}{公理}{公理}
% \crefname{conclusion}{结论}{结论}
% \crefname{condition}{条件}{条件}
% \crefname{corollary}{推论}{推论}
% \crefname{definition}{定义}{定义}
% \crefname{lemma}{引理}{引理}
% \crefname{property}{性质}{性质}
% \crefname{proposition}{命题}{命题}
% \crefname{remark}{注解}{注解}
% \end{macrocode}
%
% 设置默认图片扩展名,允许在不键入扩展名时自动进行补全。
% \begin{macrocode}
\DeclareGraphicsExtensions{.pdf,.eps,.jpg,.png}
% \end{macrocode}
% \changes{v0.12}{2021/12/06}{删除了可能导致冲突的 \pkg{floatrow}。}
\DeclareCaptionStyle{njucap}
{
font = small,
labelfont = bf,
labelsep = quad,
justification = centering
}
\captionsetup [ figure ] { style = njucap }
\captionsetup [ table ] { style = njucap }
% 使用 \pkg{listings} 提供的 \tn{lstset} 设置代码环境基本样式。
% \begin{macrocode}
\lstset
{
basewidth = 0.5 em,
lineskip = 3 pt,
basicstyle = \small\ttfamily,
keywordstyle = \bfseries,
commentstyle = \itshape,
numbers = left,
captionpos = t,
breaklines = true,
xleftmargin = 2 em,
xrightmargin = 2 em,
flexiblecolumns
}
%
%
% \subsubsection{列表环境}
% \changes{v0.12}{2021/12/07}{删除了 \pkg{enumitem} 的部分列表环境设置。}
%
% \begin{macro}{\mathbi}
% Math bold italic letters
% \begin{macrocode}
% \end{macrocode}
% 从英文感叹号进行分割,存入 |clist|。
% \begin{macrocode}
\seq_set_split:NnV \l_@@_tmpa_seq { ! } { #1 }
\clist_set_from_seq:NN \l_@@_tmpa_clist \l_@@_tmpa_seq
}
{
% \end{macrocode}
% 如果没找到感叹号,则手动进行分割固定宽度的字符。
% \begin{macrocode}
\@@_put_inempty_seg:nnn { #1 } { 1 } { 15 }
\@@_put_inempty_seg:nnn { #1 } { 16 } { 15 }
\@@_put_inempty_seg:nnn { #1 } { 31 } { 15 }
% \begin{macro}{\@@_multiline_title:nnn}
% 生成多行标题。
% \begin{arguments}
% \item 内容格式
% \item 名称盒子宽度,|dim| 型变量
% \item 内容盒子宽度,|dim| 型变量
% \end{arguments}
% \begin{macrocode}
\cs_new_protected:Npn \@@_multiline_title:nnn #1#2#3
\@@_split_title:n { \l_@@_info_title_tl }
\@@_spread_box:nnn { #2 } { \kaishu } { \c_@@_name_title_tl }
\@@_hskip:
\clist_map_inline:Nn \l_@@_tmpa_clist
{ \@@_ulined_center_box:nn { #3 } { #1 ##1 } \@@_vskip: }
}
% \end{macrocode}
% \end{macro}
%
% 生成单项信息条目。
% \begin{arguments}
% \item 条目
% \item 名称盒子宽度,|dim| 型变量
% \item 内容盒子宽度,|dim| 型变量
% \end{arguments}
\@@_spread_box:nnn { #2 } { \kaishu } { \@@_name:n { #1 } }
% 生成两项信息条目,仅用于本科生封面。
% \begin{arguments}
% \item 左侧条目
% \item 右侧条目
% \item 名称盒子宽度,|dim| 型变量
% \item 内容盒子宽度,|dim| 型变量
% \end{arguments}
\@@_spread_box:nnn { #3 } { \kaishu } { \@@_name:n { #1 } }
\@@_spread_box:nnn { #3 } { \kaishu } { \@@_name:n { #2 } }
% \begin{macro}{\@@_cover_title_ug:}
% 本科生封面标题。
% \begin{macrocode}
\cs_new_protected:Npn \@@_cover_title_ug:
{ \@@_spread_box:nnn { 9em } { \bf } { \l_@@_info_type_tl } }
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_cover_info_ug:nnn}
% 本科生封面信息栏。
% \begin{arguments}
% \item 名称盒子宽度,|dim| 型变量
% \item 长内容盒子宽度,|dim| 型变量
% \item 短内容盒子宽度,|dim| 型变量
% \end{arguments}
\@@_print_entry:nnn { dept } { #1 } { #2 }
\@@_print_entry:nnn { major } { #1 } { #2 }
\@@_print_bientry:nnnn { grade } { id } { #1 } { #3 }
\@@_print_entry:nnn { author } { #1 } { #2 }
\@@_print_bientry:nnnn { supv } { supv_ttl } { #1 } { #3 }
{ \@@_print_bientry:nnnn { supv_ii } { supv_ttl } { #1 } { #3 } }
\@@_print_entry:nnn { sm_date } { #1 } { #2 }
% \begin{macro}{\@@_cover_title_g:}
% 研究生封面标题。
% \begin{macrocode}
\cs_new_protected:Npn \@@_cover_title_g:
{
\@@_spread_box:nnn { 9em } { } { \l_@@_info_type_tl } \@@_vskip:
\c_@@_name_degree_l_tl \l_@@_info_degree_tl \c_@@_name_degree_r_tl
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_cover_info_g:nn}
% 研究生封面信息栏。
% \begin{arguments}
% \item 名称盒子宽度,|dim| 型变量
% \item 内容盒子宽度,|dim| 型变量
% \end{arguments}
% \begin{macrocode}
\cs_new_protected:Npn \@@_cover_info_g:nn #1#2
{
\begin{minipage} [ c ] { #1 + #2 + 0.3 em }
\raggedleft
\clist_put_right:Nn \l_@@_tmpb_clist { author, major, field, supv_full }
\clist_map_inline:Nn \l_@@_tmpb_clist
\end{minipage}
}
% \end{macrocode}
% \end{macro}
%
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
% \begin{macro}{\@@_cover_back_g:}
% 研究生封面背面信息。
% \begin{macrocode}
\cs_new_protected:Npn \@@_cover_back_g:
{
\@@_spread_box:nnn { 6.2 em } { \kaishu } { \c_@@_name_id_tl }
{ : \@@_quad: } \l_@@_info_id_tl
\@@_vskip:
\@@_spread_box:nnn { 6.2 em } { \kaishu } { \c_@@_name_df_date_tl }
{ : \@@_quad: } \l_@@_info_df_date_tl
\@@_vskip:
\@@_spread_box:nnn { 6.2 em } { \kaishu } { \c_@@_name_supv_full_tl }
{ : \@@_quad: } \skip_horizontal:n { 8 em } \c_@@_name_sign_tl
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_cover_en_g:}
% 研究生英文封面。
% \begin{macrocode}
\cs_new_protected:Npn \@@_cover_en_g:
{
% \end{macrocode}
% 标题。
% \begin{macrocode}
\parbox { \textwidth }
{ \centering \bf \sffamily \zihao { 2 } \l_@@_info_title_en_tl }
\skip_vertical:n { 1 cm }
% \end{macrocode}
% 作者。
% \begin{macrocode}
\group_begin: \zihao { 4 } { by } \group_end: \@@_vskip:
\group_begin:
\bf \sffamily \zihao { 4 } \l_@@_info_author_en_tl
\group_end: \skip_vertical:n { 1 cm }
% \end{macrocode}
% 导师。
% \begin{macrocode}
\group_begin: \zihao { 4 } { Supervised~ by } \group_end: \@@_vskip:
\group_begin:
\sffamily \zihao { 4 } \l_@@_info_supv_full_en_tl
\group_end: \vfill
% \end{macrocode}
% 学位信息。
% \begin{macrocode}
\c_@@_cover_en_text_tl \@@_vskip:
\textsc { \clist_item:Nn \c_@@_name_degree_en_clist
{ \g_@@_info_degree_int } }
\@@_vskip: { in } \@@_vskip:
\l_@@_info_major_en_tl \skip_vertical:n { 1 cm }
% \end{macrocode}
% 校徽。
% \begin{macrocode}
\njuemblem [ black ] { ! } { 2.5 cm } \@@_vskip:
\l_@@_info_dept_en_tl \\ \c_@@_name_nju_en_tl
\skip_vertical:n { 1 cm }
% \end{macrocode}
% 提交日期。
% \begin{macrocode}
\l_@@_info_sm_date_en_tl
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_cover_top_nl:}
% 国家图书馆封面顶部信息。
% \begin{macrocode}
\cs_new_protected:Npn \@@_cover_top_nl:
{
\@@_spread_box:nnn { 3.2 em } { } { \c_@@_name_clc_tl } \@@_hskip:
\@@_ulined_center_box:nn { 9 em } { \l_@@_info_clc_tl } \hfill
\@@_spread_box:nnn { 3.2 em } { } { \c_@@_name_seclv_tl } \@@_hskip:
\@@_ulined_center_box:nn { 9 em } { \l_@@_info_seclv_tl } \\
\@@_spread_box:nnn { 3.2 em } { } { \c_@@_name_udc_tl } \@@_hskip:
\@@_ulined_center_box:nn { 9 em } { \l_@@_info_udc_tl } \hfill \null
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_cover_title_nl:}
% 国家图书馆封面标题。
% \begin{macrocode}
\cs_new_protected:Npn \@@_cover_title_nl:
{
\@@_split_title:n { \l_@@_info_title_tl }
\noindent \kaishu \zihao { -0 } \skip_vertical:n { -1 cm }
\@@_spread_box:nnn { 6 em } { } { \c_@@_name_title_tl }
\@@_vskip: \zihao { 1 }
\@@_multiline_box:nnnn { \l_@@_tmpa_int }
\l_@@_tmpa_clist { 3 } { 15 em }
\@@_vskip: \zihao{4} \c_@@_name_title_nl_tl
\@@_vskip: \zihao{1}
\@@_ulined_center_box:nn { 4.5 em } { \l__nju_info_author_tl }
\@@_vskip: \zihao{4} { ( } \c_@@_name_author_tl { ) }
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_cover_info_nl:}
% 国家图书馆封面信息栏。
% \begin{macrocode}
\cs_new_protected:Npn \@@_cover_info_nl:
{
\@@_uline_entry:nnnn \l_@@_tmp_dim { supv_info } { supv } { } \\
\@@_ulined_center_box:nn { \textwidth }
{ \@@_info:n { supv_ttl } \@@_quad: \@@_info:n { supv_cont } } \\
\@@_uline_bientry:nnnn \l_@@_tmp_dim { degree } { degree } { }
\@@_uline_bientry:nnnn \l_@@_tmp_dim { major_nl } { major } { } \\
\@@_uline_bientry:nnnn \l_@@_tmp_dim { sm_date } { sm_date } { }
\@@_uline_bientry:nnnn \l_@@_tmp_dim { df_date } { df_date } { } \\
\@@_full_uline:Nn \l_@@_tmp_dim { \c_@@_name_confer_tl }
\@@_uline:n { \l_@@_tmp_dim }
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@@_cover_bottom_nl:}
% 国家图书馆封面底部信息。
% \begin{macrocode}
\cs_new_protected:Npn \@@_cover_bottom_nl:
{
\@@_name:n { chairman } \@@_hskip:
\@@_ulined_center_box:nn { 9 em } { \@@_info:n { chairman } } \\
\@@_name:n { reviewer } \@@_hskip:
\@@_multiline_box:nnnn { \l_@@_tmpa_int }
{ \l_@@_info_reviewer_clist } { 4 } { 9 em }
}
% \end{macrocode}
% \end{macro}
%
%
% \subsubsection{绘制封面}
%
% \begin{macro}{\@@_make_cover_ug:}
% \changes{v0.13}{2021/12/10}{使用 \hologo{LaTeX3} 语法重构本科生封面。}
% 生成本科生封面。
% \begin{macrocode}
\cs_new_protected:Npn \@@_make_cover_ug: