Newer
Older
% \begin{function}{\appendix}
%
% 附录放在本命令后,以英文字母进行编号,编写方式同正文
% \end{function}
%
% \subsubsection{成果列表}
%
% \begin{function}{\njupaperlist,\njupaperlist*}
% \begin{syntax}
% \tn{njupaperlist}\Arg{文献}
% \end{syntax}
% 成果列表,分别为发表文章目录与合作文章目录。\Arg{文献}的填写方式同\tn{cite},多个文献需要使用英文半角逗号隔开。
%
% \subsection{参考文献}
%
% 符合GB7714-2015规范。使用\hologo{biber}作为\hologo{BibTeX}后端。需要使用|biber|命令手动编译才会显示
%
% \begin{function}{\addbibresource}
% \begin{syntax}
% \tn{addbibresource}\Arg{文件}
% \end{syntax}
% 默认参考文献存储于主目录下的\file{njuthesis.bib},直接向其中粘贴新的参考文献即可。如果希望额外添加参考文献列表,可以在导言区中多次调用\tn{addbibresource}命令。注意本命令与|\bibliography{bibfile1,bibfile2}|不同,不可以用逗号分隔多个输入文件,且必须使用带扩展名的完整文件名。
% \end{function}
%
% 南京大学信息化建设管理服务中心已购买\href{https://itsc.nju.edu.cn/EndNote/list.htm}{EndNote}供全校师生免费试用,最新版为EndNote 20。
%
%
%
% \href{https://www.zotero.org/}{Zotero}是一款免费的文献管理软件,支持所有桌面平台。
%
% 在保持Zotero程序运行的情况下,点击浏览器工具栏的Zotero Connector插件即可自动从网页抓取参考文件信息。Zotero可以通过\href{https://github.com/l0o0/jasminum}{jasminum插件}支持中文参考文献的识别。在选中希望使用的文献后右键导出文献条目即可生成\file{.bib}文件。
% \begin{function}{\cite,\citeauthor,\citeyear}
% \begin{syntax}
% \tn{cite}\Arg{文献}
% \tn{citeauthor}\Arg{文献}
% \tn{citeyear}\Arg{文献}
% \end{syntax}
% 引用文献
% \end{function}
% \begin{function}[added=2021-09-24]{njuviolet,njumagenta,njublue,njuyellow}
% \begin{syntax}
% \tn{color}\Arg{颜色}
% \end{syntax}
% 定义并使用南京大学视觉形象规范化标准中给定的四种标准色:
%
% {\color{njuviolet}紫色}\hspace{1em}{\color{njumagenta}洋红}\hspace{1em}
% {\color{njublue}蓝色}\hspace{1em}{\color{njuyellow}黄色}
%
% \end{function}
%
% \begin{function}[added=2021-09-24]{\njuemblem}
% \begin{syntax}
% \tn{njuemblem}\oarg{颜色}\Arg{宽度}\Arg{高度}
% \end{syntax}
% \begin{function}[added=2021-09-24]{\njuname,\njuname*}
% \begin{syntax}
% \tn{njuname}\oarg{颜色}\Arg{宽度}\Arg{高度}
% \tn{njuname*}\oarg{颜色}\Arg{宽度}\Arg{高度}
% \end{syntax}
% \begin{function}[added=2021-09-24]{\njumotto}
% \begin{syntax}
% \tn{njumotto}\oarg{颜色}\Arg{宽度}\Arg{高度}
% \end{syntax}
% \end{function}
%
%
% \begin{function}[added=2021-09-24]{\njuspirit}
% \begin{syntax}
% \tn{njuspirit}\oarg{颜色}\Arg{宽度}\Arg{高度}
% \end{syntax}
% \end{documentation}
%
% \begin{implementation}
%
% 本模板使用 \hologo{LaTeX3} 语法编写,依赖 \pkg{expl3} 环境,
% 并需调用 \pkg{l3packages} 中的相关宏包。
%
% 以下代码中有一些形如 |<*class>|
% 的标记,这是 \pkg{DocStrip} 中的“guard”,用来选择性地提取文件。
% “|*|”和“|/|”分别表示该部分的开始和结束。不含
% “|*|”和“|/|”的 guard 出现在行号右侧,它们用来确定
% 单独一行代码的归属。这些 guard 的颜色深浅不一,用以明确嵌套关系。
%
% 譬如在本模板\cls{njuthesis}中 |@@=nju|,视觉识别系统\pkg{njuvisual}中 |@@=njuvis|。
% 检查 \hologo{LaTeX3} 编程环境。
% \begin{macrocode}
\RequirePackage { xparse, xtemplate, l3keys2e }
\msg_new:nnn { njuthesis } { l3-too-old }
{
Package~ "#1"~ is~ too~ old. \\\\
Please~ update~ an~ up-to-date~ version~ of~ the~ bundles \\
"l3kernel"~ and~ "l3packages"~ using~ your~ TeX~ package \\
manager~ or~ from~ CTAN.
}
\clist_map_inline:nn { expl3, xparse, xtemplate, l3keys2e }
{
\@ifpackagelater {#1} { 2021/08/27 }
{ } { \msg_error:nnn { njuthesis } { l3-too-old } {#1} }
}
% \end{macrocode}
%
% \begin{macrocode}
\msg_new:nnn { njuthesis } { unsupported-engine }
{
The~ njuthesis~ class~ requires~ either~ XeTeX~ or~ LuaTeX. \\\\
"#1"~ is~ not~ supported~ at~ present.~ You~ must~ change \\
your~ typesetting~ engine~ to~ "xelatex"~ or~ "lualatex".
}
\sys_if_engine_xetex:F
{
\sys_if_engine_luatex:F
{
\msg_fatal:nnx { njuthesis } { unsupported-engine }
{ \c_sys_engine_str }
}
}
% \end{macrocode}
%
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
% \subsection{定义常量}
%
% \begin{macro}{\@@_define_name:nn,\@@_define_name:nnn}
% 用来定义默认名称的辅助函数。
% \begin{macrocode}
\cs_new_protected:Npn \@@_define_name:nn #1#2
{ \tl_const:cn { c_@@_name_ #1 _tl } {#2} }
\cs_new_protected:Npn \@@_define_name:nnn #1#2#3
{
\tl_const:cn { c_@@_name_ #1 _tl } {#2}
\tl_const:cn { c_@@_name_ #1 _en_tl } {#3}
}
% \end{macrocode}
% \end{macro}
%
% 默认名称。注意空格是忽略掉的。
% \begin{macrocode}
\clist_map_inline:nn
{
{ pdf_creator } { LaTeX~ with~ njuthesis~ class },
}
{ \@@_define_name:nn #1 }
\clist_map_inline:nn
{
{ keywords } { 关键词: } { Keywords: },
}
{ \@@_define_name:nnn #1 }
% \end{macrocode}
%
% \begin{variable}{\l_@@_info_degree_tl,\l_@@_info_type_tl}
% 用于存储学位名称的变量,注意宏的命名,l代表局部变量,g代表全局变量
% \begin{macrocode}
\tl_new:N \l_@@_info_degree_tl
\tl_new:N \l_@@_info_type_tl
% \end{macrocode}
% \end{variable}
% \begin{variable}{\g_@@_latin_fontset_tl,\g_@@_cjk_fontset_tl}
% 用于存储所使用字体名称的全局变量
% \begin{macrocode}
\tl_new:N \g_@@_latin_fontset_tl
\tl_new:N \g_@@_cjk_fontset_tl
% \end{macrocode}
% \end{variable}
%
% \end{macrocode}
%
% \begin{macro}{degree}
% 学位类型。
% \begin{macrocode}
{ \tl_set_eq:NN \l_@@_info_degree_tl \l_keys_choice_tl },
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{type}
% 论文类型。
% \begin{macrocode}
type .choices:nn =
{ thesis, design }
{ \tl_set_eq:NN \l_@@_info_type_tl \l_keys_choice_tl },
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{nlcover}
% 是否需要国家图书馆封面的设置。
% \begin{macrocode}
nlcover .bool_set:N = \g_@@_nlcover_bool,
nlcover .initial:n = false,
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{customlatinfont,customchinesefont}
% 定义字体选项
% \begin{macrocode}
customlatinfont .choices:nn =
{ gyre, macos, windows, none }
{ \tl_set_eq:NN \g_@@_latin_fontset_tl \l_keys_choice_tl },
customchinesefont .choices:nn =
{ fandol, founder, macos, noto, windows, none }
{ \tl_set_eq:NN \g_@@_cjk_fontset_tl \l_keys_choice_tl },
%
% \begin{macro}{\ProcessKeysOptions}
% 在定义完全部设置以后从tex文件导言区输入参数
% \begin{macrocode}
\ProcessKeysOptions { nju }
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/titlea,info/titleb,info/titlec,info/title*}
titlea .tl_set:N = \l_@@_info_title_a_tl,
titleb .tl_set:N = \l_@@_info_title_b_tl,
titlec .tl_set:N = \l_@@_info_title_c_tl,
title* .tl_set:N = \l_@@_info_title_en_tl,
% \begin{macro}{info/keywords,info/keywords*}
% 关键词
% \begin{macrocode}
keywords .clist_set:N = \l_@@_info_keywords_clist,
keywords* .clist_set:N = \l_@@_info_keywords_en_clist,
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{info/grade,info/student-id,info/author,info/author*}
student-id .tl_set:N = \l_@@_info_id_tl,
author .tl_set:N = \l_@@_info_author_tl,
author* .tl_set:N = \l_@@_info_author_en_tl,
% \begin{macro}{info/department,info/department*,info/major,info/major*,info/field,info/field*}
department .tl_set:N = \l_@@_info_dept_tl,
department* .tl_set:N = \l_@@_info_dept_en_tl,
major .tl_set:N = \l_@@_major_tl,
major* .tl_set:N = \l_@@_major_en_tl,
field .tl_set:N = \l_@@_field_tl,
field* .tl_set:N = \l_@@_field_en_tl,
% \begin{macro}{info/supervisora,info/supervisora*,info/supervisora-title,info/supervisora-title*}
supervisora .tl_set:N = \l_@@_info_supv_a_tl,
supervisora* .tl_set:N = \l_@@_info_supv_a_en_tl,
supervisora-title .tl_set:N = \l_@@_info_supv_a_title_tl,
supervisora-title*.tl_set:N = \l_@@_info_supv_a_title_en_tl,
% \begin{macro}{info/supervisorb,info/supervisorb*,info/supervisorb-title,info/supervisorb-title*}
supervisorb .tl_set:N = \l_@@_info_supv_b_tl,
supervisorb* .tl_set:N = \l_@@_info_supv_b_en_tl,
supervisorb-title .tl_set:N = \l_@@_info_supv_b_title_tl,
supervisorb-title*.tl_set:N = \l_@@_info_supv_b_title_en_tl,
% \begin{macro}{info/submit-date,info/submit-date*}
submit-date .tl_set:N = \l_@@_submit_date_tl,
submit-date* .tl_set:N = \l_@@_submit_date_en_tl,
% \begin{macro}{info/defend-date,info/chairman,info/reviewer}
defend-date .tl_set:N = \l_@@_defend_date_tl,
chairman .tl_set:N = \l_@@_info_chairman_tl,
% \begin{macro}{info/clc,info/secret-level,info/udc,info/supervisor-contact}
clc .tl_set:N = \l_@@_info_clc_tl,
secret-level .tl_set:N = \l_@@_info_seclv_tl,
% \begin{macro}{\njusetup}
% \changes{v0.6}{2021/09/10}{改用键值对输入信息。}
% \changes{v0.11}{2021/10/01}{将个人信息变量名改为小写字母加连字符的形式。}
\NewDocumentCommand \njusetup { m }
{ \keys_set:nn { nju } { #1 } }
% \end{macrocode}
\LoadClass[
a4paper,
twoside,
UTF8,
scheme=chinese,
% \end{macrocode}
% 关于行距,\hologo{LaTeX}默认1.2行距,word默认行距是1.3,要求1.5倍word行距,故
% \[ 1.5\times\frac{1.3}{1.2} = 1.625\]
% \begin{macrocode}
linespread=1.625,
% \end{macrocode}
% 默认不载入任何字体,供模板自行设置
% \begin{macrocode}
fontset=none,
zihao=-4
]{ctexbook}[2018/04/01]
\RequirePackage
{
geometry,
caption,
floatrow,
setspace,
lastpage,
emptypage,
fancyhdr,
}
\RequirePackage[titles]{tocloft}
\RequirePackage[hyphens]{url} % generate better linebreaks in the url
% \begin{macrocode}
\RequirePackage{hologo}
% \end{macrocode}
%
% \begin{macrocode}
% Required to prevent page break right after a sectioning command
% \RequirePackage{needspace}
% \RequirePackage{xspace} % Better print trailing whitespace
% 针对编译引擎,使用不同的宏包构建可以对中文正常换行的下划线命令。\pkg{lua-ul}中需要在结尾使用\tn{null}保护尾部空白。
% 数学,\pkg{amsmath}必须在\pkg{unicode-math}前加载。
% \pkg{unicode-math}指定了\hologo{XeTeX}和\hologo{LuaTeX}下所使用的数学字体。
% 用于配置数学环境的\pkg{mathtools}会与\pkg{unicode-math}发生冲突,此处手动消除其警告。
\RequirePackage[hidelinks,bookmarksnumbered=true]{hyperref}
\RequirePackage[capitalise,nameinlink,noabbrev]{cleveref}
% \end{macrocode}
%
% 载入南京大学识别视觉系统。
% \begin{macrocode}
\RequirePackage{njuvisual}
% \end{macrocode}
%
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
% \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~ using~ your \\
TeX~ package~ manager~ or~ from~ CTAN.
}
\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-06-07,准备发issue问问。
% \begin{macrocode}
\sys_if_engine_luatex:T
{ \@@_check_package:nnn { luatexja } { 2021/06/07 } { 20210918.0 } }
% \end{macrocode}
%
% \begin{macrocode}
\tl_if_empty:NTF \g_@@_latin_fontset_tl
% \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 }
}
}
}
% \end{macrocode}
%
%
% \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]
}
%
% \begin{macro}{\@@_load_latin_font_macos:}
\cs_new_protected:Npn \@@_load_latin_font_macos:
{
\setmainfont{Times~New~Roman}
\setsansfont{Arial}
\setmonofont{Menlo}[Scale=MatchLowercase]
\cs_new_protected:Npn \@@_load_latin_font_gyre:
{
\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]
\cs_new_protected:Npn \@@_load_cjk_font_windows:
{
\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]
% \setCJKfamilyfont{zhnewhei}{Microsoft~YaHei}[
% BoldFont=Microsoft~YaHei~Bold]
% macOS 字体。
% TODO: 参考CTeX手册第9节 LuaLATEX 下的中文支持方式解决 issue \#5 问题。
\cs_new_protected:Npn \@@_load_cjk_font_macos:
{
% 移除 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}
%
% \begin{macro}{\@@_load_cjk_font_fandol:}
% Fandol 字体
\cs_new_protected:Npn \@@_load_cjk_font_fandol:
{
% 移除 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:}
% 方正字库(简繁扩展)
% FZYouHK_508R \href{http://www.foundertype.com/index.php/FontInfo/index/id/244}{方正悠黑508R} 设计师非商免费,
% FZYouHK_511M \href{http://www.foundertype.com/index.php/FontInfo/index/id/244}{方正悠黑511M} 设计师非商免费
\cs_new_protected:Npn \@@_load_cjk_font_founder:
{
\sys_if_engine_luatex:T
{
% 在 LuaTeX 中调整方正字体括号位置
% XeTeX 暂无好的解决方法
\defaultCJKfontfeatures{JFM={zh_CN/{quanjiao,fzpr}}}
}
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]
% \setCJKfamilyfont{zhnewhei}
% {FZYouHK_508R}[% 方正悠黑508R
% Extension=.ttf,
% BoldFont=FZYouHK_511M]% 方正悠黑511M
\cs_new_protected:Npn \@@_load_cjk_font_noto:
{
UprightFont=NotoSerifSC-Regular,
BoldFont=NotoSerifSC-Bold,
ItalicFont=NotoSerifSC-Regular,
BoldItalicFont=NotoSerifSC-Bold,
UprightFont=NotoSansSC-Regular,
BoldFont=NotoSansSC-Bold,
ItalicFont=NotoSansSC-Regular,
BoldItalicFont=NotoSansSC-Bold,
\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}]
% 使用\pkg{geometry}设置页边距。
% \begin{macrocode}
\geometry{
vmargin = 2.5 cm,
hmargin = 3.2 cm,
}
% \end{macrocode}
%
\fancypagestyle{njuheadings}{%
\fancyhead{}
\fancyfoot[C]{\zihao{5}\thepage}
}
{
% the header line
\tl_set:Nn \headrulewidth {0pt}
% the footer line
\tl_set:Nn \footrulewidth {0pt}
\AtBeginDocument{\pagestyle{njuplain}\flushbottom} % 本科无页眉页脚
}
{
% the header line
\tl_set:Nn \headrulewidth {1pt}
% the footer line
\tl_set:Nn \footrulewidth {0pt}
\setlength{\headheight}{20pt}
\AtBeginDocument{\pagestyle{fancy}\flushbottom} % 研究生有页眉页脚
chapter/format = \zihao{4}\heiti\centering\selectfont,
chapter/beforeskip = 10pt,
chapter/afterskip = 60pt,
section/format = \zihao{4}\heiti\raggedright\selectfont,
subsection/format = \zihao{4}\heiti\raggedright\selectfont,
subsubsection/format = \zihao{4}\heiti\raggedright\selectfont,
\ctexset{
contentsname = 目录,
listfigurename = 插图清单,
listtablename = 表格清单,
% \begin{macrocode}
\cftsetpnumwidth{2em}
\renewcommand{\cftchapleader}{\cftdotfill{\cftchapdotsep}}
\renewcommand{\cftchapdotsep}{\cftdotsep}
\setlength{\cftsecindent}{2em}
\setlength{\cftsubsecindent}{52pt}
\setlength{\cftsubsecnumwidth}{2em}
% \end{macrocode}
%
\raggedbottom
\begingroup
\ctexset{
contentsname = {目\hspace{2em}录},
chapter/format = {\centering\songti\bf\zihao{3}\selectfont},
}%
\chapter*{\contentsname}%
\endgroup
\addcontentsline{toc}{chapter}{\contentsname}
\vskip 20pt
\@starttoc{toc}%
}
\begingroup
\ctexset{
chapter/format = {\centering\songti\bf\zihao{3}\selectfont},
}%
\chapter*{\listfigurename}%
\endgroup
\addcontentsline{toc}{chapter}{\listfigurename}
\vskip 20pt
\@starttoc{lof}%
}
\begingroup
\ctexset{
chapter/format = {\centering\songti\bf\zihao{3}\selectfont},
}%
\chapter*{\listtablename}%
\endgroup
\addcontentsline{toc}{chapter}{\listtablename}
\vskip 20pt
\@starttoc{lot}%
}
{%
\chapter*{前言}
\addcontentsline{toc}{chapter}{前言}
{%
\chapter*{致谢}
\addcontentsline{toc}{chapter}{致谢}
% \changes{v0.10}{2021/09/29}{新增了成果列表页面。}
% 发表文章目录与合作文章目录。
% \begin{macrocode}
\NewDocumentCommand\njupaperlist { t* m }
{
\begin{refsection}
\nocite{#2}
\IfBooleanTF {#1}
{ \printbibliography[heading=subbibliography,title=合作文章目录] }
{ \printbibliography[heading=subbibliography,title=发表文章目录] }
\end{refsection}
}
% \end{macrocode}
% \end{macro}
%