Newer
Older
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
\NewDocumentCommand\set_chinese_fontset_noto{}{
% 思源宋体 https://www.google.com/get/noto/#serif-hans
\setCJKmainfont[
UprightFont=NotoSerifCJKsc-Regular,
BoldFont=NotoSerifCJKsc-Bold,
ItalicFont=NotoSerifCJKsc-Regular,
BoldItalicFont=NotoSerifCJKsc-Bold,
ItalicFeatures=FakeSlant,
BoldItalicFeatures=FakeSlant]{Noto~Serif~CJK~SC}
% 思源黑体 https://www.google.com/get/noto/#sans-hans
\setCJKsansfont[
UprightFont=NotoSansCJKsc-Regular,
BoldFont=NotoSansCJKsc-Bold,
ItalicFont=NotoSansCJKsc-Regular,
BoldItalicFont=NotoSansCJKsc-Bold,
ItalicFeatures=FakeSlant,
BoldItalicFeatures=FakeSlant]{Noto~Sans~CJK~SC}
% 包含于上述思源黑体
\setCJKmonofont[
UprightFont=NotoSansMonoCJKsc-Regular,
BoldFont=NotoSansMonoCJKsc-Bold,
ItalicFont=NotoSansMonoCJKsc-Regular,
BoldItalicFont=NotoSansMonoCJKsc-Bold,
ItalicFeatures=FakeSlant,
BoldItalicFeatures=FakeSlant]{Noto~Sans~Mono~SC}
\setCJKfamilyfont{zhsong}{Noto~Serif~CJK~SC}
\setCJKfamilyfont{zhhei}{Noto~Sans~CJK~SC}
% 方正楷体、方正仿宋为免费商用字体,且支持CJK字符集
% 方正仿宋 http://www.foundertype.com/index.php/FontInfo/index/id/128.html
% 方正楷体 http://www.foundertype.com/index.php/FontInfo/index/id/137.html
\setCJKfamilyfont{zhfs}{方正仿宋简体}[AutoFakeBold=2.17]
\setCJKfamilyfont{zhkai}{方正楷体简体}[AutoFakeBold=2.17]
}
% \end{macrocode}
%
% Put text here.
% \begin{macrocode}
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
% 字体判断
\bool_if:NTF \nju_systemfont
% 根据操作系统自动选择相应字体
{
% 检测是否是 Windows
\sys_if_platform_windows:TF
{
\set_latin_fontset_windows
\set_chinese_fontset_windows
}
{
% 检测是否是 macOS
\ctex_if_platform_macos:TF
{
\set_latin_fontset_macos
\set_chinese_fontset_macos
}
% 其余系统一律使用自由字体
{
\set_latin_fontset_gyre
\set_chinese_fontset_fandol
}
}
}
{
% 如果用户需要自定义字体
% 此处需要使用\str_case_e而不是\str_case使宏展开为字符串
\str_case_e:nn { \nju_customlatinfont }
{
{ windows } { \set_latin_fontset_windows }
{ macos } { \set_latin_fontset_macos }
{ gyre } { \set_latin_fontset_gyre }
{ null } {}
}
\str_case_e:nn { \nju_customchinesefont }
{
{ windows } { \set_chinese_fontset_windows }
{ macos } { \set_chinese_fontset_macos }
{ gyre } { \set_chinese_fontset_gyre }
{ founder } { \set_chinese_fontset_founder }
{ noto } { \set_chinese_fontset_noto }
{ null } {}
}
}
% 选择其他字体,请确保相应字体已安装
% \end{macrocode}
%
% Put text here.
% \begin{macrocode}
% 设置数学字体 (XITS, 或者 STIX, 与 Times New Roman 最为相近)
% \setmathfont{STIXTwoMath-Regular}[Extension = .otf]
\setmathfont{XITSMath-Regular}[
BoldFont = XITSMath-Bold,
Extension = .otf]
% \end{macrocode}
%
% Put text here.
% \begin{macrocode}
\NewDocumentCommand\songti{}{\CJKfamily{zhsong}}
\NewDocumentCommand\heiti{}{\CJKfamily{zhhei}}
\NewDocumentCommand\fangsong{}{\CJKfamily{zhfs}}
\NewDocumentCommand\kaishu{}{\CJKfamily{zhkai}}
% \NewDocumentCommand\lishu{}{\CJKfamily{zhli}}
% \end{macrocode}
%
% Put text here.
% \begin{macrocode}
% 本科生页眉页脚
\fancypagestyle{njuplain}{%
\fancyhead{}
\fancyfoot[C]{\zihao{5}\thepage} % 页脚居中 五号新罗马体数字
}
% \end{macrocode}
%
% Put text here.
% \begin{macrocode}
% TODO: 研究生页眉页脚
\fancypagestyle{njuheadings}{%
\fancyhead{}
\fancyfoot[C]{\zihao{5}\thepage}
}
% \end{macrocode}
%
% Put text here.
% \begin{macrocode}
\str_if_eq:NNTF {\nju_degree} { ug }
{
% the header line
\tl_set:Nn \headrulewidth {0pt}
% the footer line
\tl_set:Nn \footrulewidth {0pt}
\AtBeginDocument{\pagestyle{njuplain}} % 本科无页眉页脚
}
{
% the header line
\tl_set:Nn \headrulewidth {1pt}
% the footer line
\tl_set:Nn \footrulewidth {0pt}
% \AtBeginDocument{\pagestyle{njuplain}} % 无页眉页脚
\AtBeginDocument{\pagestyle{headings}} % 研究生有页眉页脚
}
% \end{macrocode}
%
% Put text here.
% \begin{macrocode}
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
% ctex格式设置
% 目录标题 三号宋体加粗
% 各部分标题 四号黑体
\ctexset{
contentsname = 目录,
listfigurename = 插图清单,
listtablename = 表格清单,
chapter/format = \zihao{4}\heiti\centering,
chapter/beforeskip = 10pt,
chapter/afterskip = 60pt,
section/format = \zihao{4}\heiti\raggedright,
subsection/format = \zihao{4}\heiti\raggedright,
subsubsection/format = \zihao{4}\heiti\raggedright
}
% 重定义目录中章节标题样式
% 目录内容中章的标题 四号黑体
% 目录中其他内容 小四号宋体
\titlecontents{chapter}% 标题级别
[5em]% 标题左间距
{\heiti\zihao{4}\vspace{10pt}}% 标题格式
{\contentslabel{4em}}% 标题标志
{\hspace*{-4em}}% 无序号标题
{~\titlerule*[0.6pc]{$.$}~\contentspage}% 指引线与页码
\titlecontents{section}
[5em]
{\zihao{-4}\vspace{0pt}}
{\contentslabel{2.5em}}
{\hspace*{-4em}}
{~\titlerule*[0.6pc]{$.$}~\contentspage}
\titlecontents{subsection}
[8em]
{\zihao{-4}\vspace{0pt}}
{\contentslabel{3em}}
{\hspace*{-4em}}
{~\titlerule*[0.6pc]{$.$}~\contentspage}
% \end{macrocode}
%
% Put text here.
% \begin{macrocode}
\cs_set:Npn \CTEX@addtocline #1#2
{
\addcontentsline { toc } {#1}
{ \use:c { CTEX@#1@tocline } {#1} {#2} }
}
% \end{macrocode}
%
% Put text here.
% \begin{macrocode}
% 目录页面格式修改
\cs_new:Npn \nju_tocpagestyle:nnn #1 #2 #3
{
\newpage
\hspace{0pt}
\vskip 10pt
\begin{center}
\mbox{\songti\bf\zihao{3}{#1}} % 目录页面标题
\phantomsection
\addcontentsline{toc}{chapter}{#2} % 插入目录
\end{center}
\vskip 40pt
\@starttoc{#3}%
\cleardoublepage
}
% \end{macrocode}
%
% Put text here.
% \begin{macrocode}
\tl_set:Nn \tableofcontents
{
\nju_tocpagestyle:nnn {目\hspace{2em}录}{\contentsname}{toc}
}
\tl_set:Nn \listoffigures
{
\nju_tocpagestyle:nnn {\listfigurename}{\listfigurename}{lof}
}
\tl_set:Nn \listoftables
{
\nju_tocpagestyle:nnn {\listtablename}{\listtablename}{lot}
}
% \end{macrocode}
%
% Put text here.
% \begin{macrocode}
% 定制前言、致谢环境
\newenvironment{preface}
{%
\chapter*{前言}
\addcontentsline{toc}{chapter}{前言}
}{}
% \end{macrocode}
%
% \DescribeEnv{acknowledgements}
% 单独制作的致谢页。
% \begin{macrocode}
\newenvironment{acknowledgement}
{%
\chapter*{致谢}
\addcontentsline{toc}{chapter}{致谢}
}{}
% \end{macrocode}
%
% Put text here.
% \begin{macrocode}
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
% biblatex设置
\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)
% \end{macrocode}
%
% Put text here.
% \begin{macrocode}
% Remove some unwanted entries from the bibliography
\AtEveryBibitem{
\clearfield{abstract}
\clearfield{issn}
\clearfield{isbn}
\clearfield{archivePrefix}
\clearfield{arxivId}
\clearfield{pmid}
\clearfield{eprint}
\ifentrytype{online}{}{\ifentrytype{misc}{}{\clearfield{url}}}
% \ifentrytype{book}{\clearfield{doi}}{}
}
% \end{macrocode}
%
% Put text here.
% \begin{macrocode}
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
% 修改标签名称
\crefdefaultlabelformat{#2#1#3\,} % 默认在名称后面添加空格
\crefname{figure}{图}{图}
\crefname{table}{表}{表}
% \crefname{equation}{公式}{公式}
\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{chapter}{§}{§}
% \crefname{section}{§}{§}
% \crefname{subsection}{§}{§}
% \crefname{subsubsection}{§}{§}
\crefname{appendix}{附录}{附录}
% \crefname{definition}{定义}{定义}
% \crefname{axiom}{公理}{公理}
% \crefname{property}{性质}{性质}
% \crefname{proposition}{命题}{命题}
% \crefname{lemma}{引理}{引理}
% \crefname{corollary}{推论}{推论}
% \crefname{remark}{注解}{注解}
% \crefname{condition}{条件}{条件}
% \crefname{conclusion}{结论}{结论}
% \crefname{assumption}{假设}{假设}
% \end{macrocode}
%
% soifjsojfosjfos
% \begin{macrocode}
% 图表位置调整
\floatsetup[lstlisting]{ % Captions for lstlistings
capposition=above,%
margins=centering,%
floatwidth=\textwidth%
}
\floatsetup[figure]{ % Captions for figures
capposition=bottom,%
margins=centering,%
floatwidth=\textwidth%
}
\floatsetup[table]{ % Captions for tables
capposition=above,%
margins=centering,%
floatwidth=\textwidth%
}
% \end{macrocode}
%
% Put text here.
% \begin{macrocode}
% 代码样式
\lstset{
basicstyle=\ttfamily\linespread{1}\small\selectfont,
keywordstyle=\bfseries,% use bold style for keywords
commentstyle=\rmfamily\itshape,% use italic style for comments
stringstyle=\ttfamily,% 字符串风格
flexiblecolumns,% ?
numbers=left,% left-aligned numbering
showspaces=false,% hide markers for spaces
showstringspaces=false,
captionpos=t,% place the caption at the top
% frame=lrtb,% show all four sides of the frame
% linewidth=.8\textwidth,
% breakatwhitespace=true,
breaklines=true,
xleftmargin=2em,xrightmargin=2em,% set the width of the code environment
}
% \end{macrocode}
%
% Put text here.
% \begin{macrocode}
\lstdefinestyle{LaTeX}{
language=TeX,
morekeywords={begin, caption, label, mathrm, frac, toprule, midrule, bottomrule, includegraphics}
}
% \end{macrocode}
%
% Put text here.
% \begin{macrocode}
% 图表标题样式
\DeclareCaptionFont{songticap}{\zihao{5}\bf\songti}
\captionsetup{
font=small,%
labelfont=songticap,
textfont=songticap,
strut=no,%
hypcap=true, % Links point to the top of the figure
% indention=0pt, % Suppress indentation
% % parindent=0pt, % Suppress space between paragraphs
aboveskip=6pt, % Increase the space between the figure and the caption
belowskip=6pt, % Increase the space between the caption and the table
}
% \end{macrocode}
%
% Put text here.
% \begin{macrocode}
% list configuration
\renewcommand{\labelitemi}{\tiny$\blacktriangleright$}
\renewcommand{\labelitemii}{\textbullet}
\setlist[itemize]{noitemsep}
\setlist[enumerate]{noitemsep}
\setlist[description]{noitemsep}
% \end{macrocode}
%
% Put text here.
% \begin{macrocode}
% 数学环境
\declaretheoremstyle[
%spaceabove=.5\thm@preskip,
%spacebelow=.5\thm@postskip,
headfont=\bf\songti,%\scshape,
notefont=\songti,% notebraces={ (}{)},
bodyfont=\songti,
%headformat={\NAME\space\NUMBER\space\NOTE},
headpunct={},
%postheadspace={.5em plus .1em minus .1em},
%prefoothook={\hfill\qedsymbol}
]{njuthm}
\theoremstyle{njuthm}
% \end{macrocode}
%
% Put text here.
% \begin{macrocode}
\let\oldproofname=\proofname
\renewcommand*{\proofname}{\rm\bf\songti{\oldproofname}} % 修改证明环境标题
% \end{macrocode}
%
% Put text here.
% \begin{macrocode}
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
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
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
\declaretheorem[
name=算法,
style=njuthm,
refname={算法,算法},
Refname={算法,算法},
% numberwithin=section,
]{algorithm}
\declaretheorem[
name=假设,
style=njuthm,
refname={假设,假设},
Refname={假设,假设},
% numberwithin=section,
]{assumption}
\declaretheorem[
name=公理,
style=njuthm,
refname={公理,公理},
Refname={公理,公理},
% numberwithin=section,
]{axiom}
\declaretheorem[
name=结论,
style=njuthm,
refname={结论,结论},
Refname={结论,结论},
% numberwithin=section,
]{conclusion}
\declaretheorem[
name=条件,
style=njuthm,
refname={条件,条件},
Refname={条件,条件},
% numberwithin=section,
]{condition}
\declaretheorem[
name=推论,
style=njuthm,
refname={推论,推论},
Refname={推论,推论},
% numberwithin=section,
]{corollary}
\declaretheorem[
name=定义,
style=njuthm,
refname={定义,定义},
Refname={定义,定义},
% numberwithin=section,
]{definition}
\declaretheorem[
name=例,
style=njuthm,
refname={例,例},
Refname={例,例},
% numberwithin=section,
]{example}
\declaretheorem[
name=引理,
style=njuthm,
refname={引理,引理},
Refname={引理,引理},
% numberwithin=section,
]{lemma}
\declaretheorem[
name=性质,
style=njuthm,
refname={性质,性质},
Refname={性质,性质},
% numberwithin=section,
]{property}
\declaretheorem[
name=命题,
style=njuthm,
refname={命题,命题},
Refname={命题,命题},
% numberwithin=section,
]{proposition}
\declaretheorem[
name=注解,
style=njuthm,
refname={注解,注解},
Refname={注解,注解},
% numberwithin=section,
]{remark}
\declaretheorem[
name=定理,
style=njuthm,
refname={定理,定理},
Refname={定理,定理},
numberwithin=section,
]{theorem}
{
\l_@@_info_title_a_tl
\l_@@_info_title_b_tl
\l_@@_info_title_c_tl
}
% \end{macrocode}
%
% Put text here.
% \begin{macrocode}
\l_@@_info_supv_a_tl\ \l_@@_info_supv_a_title_tl
\ \ \l_@@_info_supv_b_tl\ \l_@@_info_supv_b_title_tl
\l_@@_info_supv_a_en_tl\ \l_@@_info_supv_a_title_en_tl
\ \ \l_@@_info_supv_b_en_tl\ \l_@@_info_supv_b_title_en_tl
% \end{macrocode}
%
% Put text here.
% \begin{macrocode}
% 判断学位进行命令定义
\str_if_eq:NNTF {\nju_degree} { ug }
{
% 本科
\tl_const:Nn \nju_degree_name {本\hfill 科\hfill }
% 本科强制不打印国家图书馆封面
\bool_set_false:N \nju_nl_cover
% 封面下划线
{
\uline{\makebox[#1]{\rm\songti#2}}
}
% 封面表格边框
\cs_new:Npn \nju_coverbox_ug:n #1
{
\makebox[4.2em][s]{#1}
}
}
{
% 本科以外都是研究生
\tl_const:Nn \nju_degree_name {研\hfill 究\hfill 生\hfill }
% 封面下划线
{
\uline{\makebox[250pt]{\rm\kaishu#1}}
}
% 国家图书馆封面下划线
{
\uline{\makebox[#1]{#2}}
}
% 封面表格边框
\cs_new:Npn \nju_coverbox_g:n #1
{
\makebox[6em][s]{#1\hspace{1em}}
}
% 研究生学位分类
{
{ mg } { \tl_const:Nn \nju_degree_title {硕士} }
{ mf } { \tl_const:Nn \nju_degree_title {硕士专业} }
{ phd } { \tl_const:Nn \nju_degree_title {博士} }
}
}
% \end{macrocode}
%
% Put text here.
% \begin{macrocode}
% 判断类型
\str_if_eq:NNTF {\nju_type} {thesis}
{
\tl_const:Nn \nju_type_name
{ \nju_degree_name 毕\hfill 业\hfill 论\hfill 文 }
}
{
\tl_const:Nn \nju_type_name
{ \nju_degree_name 毕\hfill 业\hfill 设\hfill 计 }
}
% \end{macrocode}
%
% Put text here.
% \begin{macrocode}
% 封面信息栏 本科
\tl_new:N \nju_printcoverinfo_ug
\tl_set:Nn \nju_printcoverinfo_ug
{
\begin{tabular}{p{4.2em}c}
\nju_coverbox_ug:n {院\hfill 系}
& \nju_cover_uline_ug:nn {250pt}{\l__nju_info_dept_tl} \\
\nju_coverbox_ug:n {题\hfill 目}
& \nju_cover_uline_ug:nn {250pt}{\bf{\l__nju_info_title_a_tl}} \\
% 自动判断标题换行
\tl_if_empty:NTF \l__nju_info_title_b_tl {}
{
\tl_if_empty:NTF \l__nju_info_title_c_tl
{ & \nju_cover_uline_ug:nn {250pt}{\bf{\l__nju_info_title_b_tl}} \\ }
{
& \nju_cover_uline_ug:nn {250pt}{\bf{\l__nju_info_title_b_tl}} \\
& \nju_cover_uline_ug:nn {250pt}{\bf{\l__nju_info_title_c_tl}} \\
}
}
\end{tabular}\\
\begin{tabular}{p{4.2em}cp{4.2em}c}
\nju_coverbox_ug:n {年\hfill 级}
\end{tabular}\\
\begin{tabular}{p{4.2em}c}
\nju_coverbox_ug:n {学\hfill 生\hfill 姓\hfill 名}
\end{tabular}\\
\begin{tabular}{p{4.2em}cp{4.2em}c}
\nju_coverbox_ug:n {导\hfill 师}
& \nju_cover_uline_ug:nn {90pt}{\l_@@_info_supv_a_title_tl}\\
{
\nju_coverbox_ug:n {第\hfill 二\hfill 导\hfill 师}
& \nju_cover_uline_ug:nn {90pt}{\l_@@_info_supv_b_title_tl}\\
}
\end{tabular}\\
\begin{tabular}{p{4.2em}c}
\nju_coverbox_ug:n {提\hfill 交\hfill 日\hfill 期}
& \nju_cover_uline_ug:nn {250pt}{\l_@@_submit_date_tl}\\
% \end{macrocode}
%
% Put text here.
% \begin{macrocode}
% 封面信息栏 研究生
\tl_new:N \nju_printcoverinfo_g
\tl_set:Nn \nju_printcoverinfo_g
{
\begin{tabular}{p{6em}c}
\nju_coverbox_g:n {论\hfill 文\hfill 题\hfill 目}
& \nju_cover_uline_g:n {\l_@@_info_title_a_tl} \\
% 自动判断标题换行
\tl_if_empty:NTF \l__nju_info_title_b_tl {}
{
\tl_if_empty:NTF \l__nju_info_title_c_tl
{ & \nju_cover_uline_g:n {\l_@@_info_title_b_tl} \\ }
{
& \nju_cover_uline_g:n {\l_@@_info_title_b_tl} \\
& \nju_cover_uline_g:n {\l_@@_info_title_c_tl} \\
}
}
% \end{macrocode}
%
% Put text here.
% \begin{macrocode}
% 绘制封面命令
\tl_new:N \nju_printcover_nl % 国家图书馆封面
\tl_new:N \nju_printcover_ug % 本科封面
\tl_new:N \nju_printcover_g % 研究生封面
% \end{macrocode}
%
% Put text here.
% \begin{macrocode}
% 按需绘制国家图书馆封面,修改自旧模板
\bool_if:NT \nju_nl_cover
{
\tl_set:Nn \nju_printcover_nl
{
\thispagestyle{empty}
\pdfbookmark[0]{国家图书馆封面}{nl}
{
% 顶端
\hspace{0mm}
\vskip -20mm \hskip -15mm
\songti\zihao{-4}
\makebox[40pt][l]{分类号}
\vskip 10pt \hskip -15mm
\makebox[40pt][l]{UDC}
}
% 中部
\vskip\stretch{2}
\begin{center}
\def\ULthickness{1pt}
{\kaishu\zihao{-0} 学\hspace{0.5em}位\hspace{0.5em}论\hspace{0.5em}文}
{
\kaishu\zihao{1}
\vskip \stretch{1}
\nju_cover_uline_nl:nn {14em}{\l_@@_info_title_a_tl}\\
\nju_cover_uline_nl:nn {14em}{\l_@@_info_title_b_tl}\\
\nju_cover_uline_nl:nn {14em}{\l_@@_info_title_c_tl}\\
}
\vskip \stretch{1}
{\kaishu\zihao{4}(题名和副题名)}
\vskip \stretch{1} \vskip 5mm
{\kaishu\zihao{1}\uline{\makebox{\l_@@_info_author_tl}}}
\vskip \stretch{1}
{\kaishu\zihao{4}(作者姓名)}
\end{center}
% 底部
\vskip\stretch{1}
{
\kaishu\zihao{4}
\noindent 指导教师姓名、职务、职称、学位、单位名称及地址%
\nju_cover_uline_nl:nn {94pt}{\l_@@_info_supv_a_tl}\par
\noindent\nju_cover_uline_nl:nn {\textwidth}{%
\uline{\hfill\l_@@_defend_date_tl\hfill}\par% 需要调整下划线长度
\noindent 学位授予单位和日期\uline{\hfill}\par
\noindent\hfill 答辩委员会主席:%
\nju_cover_uline_nl:nn {9em}{\l_@@_info_chairman_tl}\par
\nju_cover_uline_nl:nn {9em}{\l_@@_info_reviewer_a_tl}\par
\noindent\hfill\nju_cover_uline_nl:nn {9em}{\l_@@_info_reviewer_b_tl}\par
\noindent\hfill\nju_cover_uline_nl:nn {9em}{\l_@@_info_reviewer_c_tl}\par
\noindent\hfill\nju_cover_uline_nl:nn {9em}{\l_@@_info_reviewer_d_tl}\par
\begin{center}
\kaishu\zihao{3}\hspace{2em} 年\hspace{1em} 月\hspace{1em} 日
\end{center}
\vskip -10mm
}
\cleardoublepage
}
}
% \end{macrocode}
%
% Put text here.
% \begin{macrocode}
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
% 本科封面
\tl_set:Nn \nju_printcover_ug
{
\thispagestyle{empty}
\pagenumbering{Roman}
% Start
\pdfbookmark{封面}{封面} % 将封面插入pdf书签
\begin{spacing}{1.25}
\vskip 0mm
\hspace{-10mm}
\includegraphics[height=3cm]{njulogo}\smallskip
\begin{center}
\includegraphics[height=3.35cm]{njuname}
\vskip 10mm
{\zihao{1}\makebox[9em][s]{\bf{\songti\nju_type_name}}}
\vfill
\vskip\stretch{0}
{\bgroup
\kaishu\zihao{3}
\def\tabcolsep{1pt}
\def\arraystretch{1.5}
\nju_printcoverinfo_ug % 绘制信息框
\egroup}
\vfill
\end{center}
\end{spacing}
\cleardoublepage
% \vfill
% \newpage
}
% \end{macrocode}
%
% Put text here.
% \begin{macrocode}
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
% 研究生封面
\tl_set:Nn \nju_printcover_g
{
\thispagestyle{empty}
\pagenumbering{Roman}
% Start
\pdfbookmark{封面}{封面} % 将封面插入pdf书签
\begin{spacing}{1.25}
\begin{center}
\hspace{0pt} \vskip 5mm
\includegraphics[height=1.9cm]{njulogo}
\vskip 10mm
\includegraphics[height=2cm]{njuname-large}
\vskip 15mm
{\zihao{1}\makebox[10em][s]{\bf{\kaishu\nju_type_name}}}
\vskip 5mm
{\zihao{1}\bf{\kaishu{(申请\nju_degree_title 学位)}}}
\par\vfill
\vskip\stretch{0}
{\bgroup
\bf\kaishu\zihao{3}
\def\tabcolsep{1pt}
\def\arraystretch{1.5}
\vskip 10mm
\nju_printcoverinfo_g % 绘制信息框
\egroup}
\vfill
\vskip 10mm
\vskip 15mm
\end{center}
\end{spacing}
\newpage % 封面背面
\thispagestyle{empty}
\begin{spacing}{1.625}
% TODO: 等待调整格式
\hspace{0pt} \vfill
{\bgroup
\kaishu\zihao{3}
\makebox[6em][s]{\bf\kaishu 学\hfill 号}:\MakeUppercase{\l_@@_info_id_tl}
\makebox[6em][s]{\bf\kaishu 论文答辩日期}:\l_@@_defend_date_tl
\par
\makebox[6em][s]{\bf\kaishu 指\hfill 导\hfill 教\hfill 师}:\hspace{50mm}(签字)
\par
\egroup}
\vskip 15mm
\end{spacing}
\cleardoublepage
}
% \end{macrocode}
%
% Put text here.
% \begin{macrocode}
% 重定义maketitle生成封面
\tl_set:Nn \maketitle
{%
\str_if_eq:NNTF { \nju_degree } { ug }
{
\nju_printcover_nl % 国家图书馆封面
\nju_printcover_ug % 本科封面
}
{
\nju_printcover_nl % 国家图书馆封面
\nju_printcover_g % 研究生封面
}
}
% 判断学位
\str_if_eq:NNTF {\nju_degree} { ug }
{
% 本科摘要环境
\NewDocumentEnvironment{abstract} {}
{%
% \pagestyle{plain}
% \pagenumbering{Roman}
% \phantomsection\addcontentsline{toc}{chapter}{中文摘要} % 将摘要插入目录和pdf书签
\pdfbookmark[0]{中文摘要}{中文摘要} % 将摘要插入pdf书签,与上一行不可共存
\begin{center}
\kaishu\zihao{-2}{\textbf{\uuline{
南京大学本科生毕业论文(设计、作品)中文摘要}}}
\end{center}
{\bgroup
\kaishu\zihao{-4}
\tl_set:Nn \tabcolsep {0pt}
\tl_set:Nn \arraystretch {0.8}
\noindent
题目: \l_@@_info_title_tl \\
院系: \l_@@_info_dept_tl \\
专业: \l_@@_major_tl \\
本科生姓名: \l_@@_info_author_tl \\
指导教师(姓名、职称):\nju_supervisor_full \\
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
摘要:
\egroup
}
\kaishu\zihao{-4}\par%
}{%
\newpage
}
% 中文关键词
\NewDocumentCommand \keywords {m} {%
\par\vspace{2ex}\noindent%
{\kaishu\zihao{-4}\makebox[4em][s]{关键词{:}}}~{#1}%
}
% 英文摘要
\NewDocumentEnvironment{englishabstract} {}
{%
\pagestyle{plain}
% \phantomsection\addcontentsline{toc}{chapter}{英文摘要} % 将摘要插入目录和pdf书签
\pdfbookmark[0]{英文摘要}{英文摘要} % 将摘要插入pdf书签,与上一行不可共存
\begin{center}
\kaishu\zihao{-2}{\textbf{\uuline{
南京大学本科生毕业论文(设计、作品)英文摘要}}}
DEPARTMENT: ~~\l_@@_info_dept_en_tl \\
SPECIALIZATION: ~~\l_@@_major_en_tl \\
UNDERGRADUATE:~~\l_@@_info_author_en_tl \\
MENTOR:~~\nju_supervisor_full_en \\
ABSTRACT:
\egroup
}
\zihao{-4}\par%
}{%
\cleardoublepage
\newpage
}
% 英文关键词
\NewDocumentCommand \englishkeywords {m} {%
\par\vspace{2ex}\noindent%
{KEYWORDS{:}}~~{#1}%
}
}
% \end{macrocode}
%
% Put text here.
% \begin{macrocode}