Skip to content
Snippets Groups Projects
Commit f4397a95 authored by Yu Xiong's avatar Yu Xiong :confounded:
Browse files

refactor: cls代码样式调整

parent 61abd1ca
No related branches found
No related tags found
No related merge requests found
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
%% %%
\NeedsTeXFormat{LaTeX2e} \NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3} \RequirePackage{expl3}
\GetIdInfo $Id: njuthesis.dtx 0.9.0 2020-09-15 12:00:00 +0800 NJU LUG <my@yaoge123.com> $ \GetIdInfo $Id: njuthesis.dtx 0.9.0 2021-09-15 12:00:00 +0800 NJU LUG <my@yaoge123.com> $
{Thesis template for Nanjing University} {Thesis template for Nanjing University}
\ProvidesExplClass{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} \ProvidesExplClass{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
\LoadClass[ \LoadClass[
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
twoside, twoside,
UTF8, UTF8,
scheme=chinese, scheme=chinese,
linespread=1.625,% laTex默认1.2行距,word默认行距是1.3,要求1.5倍word行距,故1.5/1.2*1.3 = 1.625 linespread=1.625,
fontset=none, fontset=none,
zihao=-4 zihao=-4
]{ctexbook}[2018/04/01] ]{ctexbook}[2018/04/01]
...@@ -124,6 +124,7 @@ ...@@ -124,6 +124,7 @@
\RequirePackage{siunitx} % 用于书写单位符号 \RequirePackage{siunitx} % 用于书写单位符号
\RequirePackage[version=4]{mhchem} % 用于绘制分子式 \RequirePackage[version=4]{mhchem} % 用于绘制分子式
\RequirePackage{hologo} \RequirePackage{hologo}
\sys_if_engine_xetex:T \sys_if_engine_xetex:T
{ {
\RequirePackage{microtype} \RequirePackage{microtype}
...@@ -204,10 +205,12 @@ ...@@ -204,10 +205,12 @@
\setCJKfamilyfont{zhhei}{SimHei} \setCJKfamilyfont{zhhei}{SimHei}
\setCJKfamilyfont{zhfs}{FangSong} \setCJKfamilyfont{zhfs}{FangSong}
\setCJKfamilyfont{zhkai}{KaiTi}[AutoFakeBold=2.17] \setCJKfamilyfont{zhkai}{KaiTi}[AutoFakeBold=2.17]
\setCJKfamilyfont{zhnewhei}{Microsoft~YaHei}[BoldFont=Microsoft~YaHei~Bold] \setCJKfamilyfont{zhnewhei}{Microsoft~YaHei}[
BoldFont=Microsoft~YaHei~Bold]
} }
\NewDocumentCommand\set_chinese_fontset_macos{}{ \NewDocumentCommand\set_chinese_fontset_macos{}{
\msg_redirect_name:nnn {fontspec} {no-script} {info} % 移除 does not contain script "CJK" 警告 % 移除 does not contain script "CJK" 警告
\msg_redirect_name:nnn {fontspec} {no-script} {info}
\setCJKmainfont{Songti~SC~Light}[ \setCJKmainfont{Songti~SC~Light}[
BoldFont=Songti~SC~Bold, BoldFont=Songti~SC~Bold,
ItalicFont=Kaiti~SC, ItalicFont=Kaiti~SC,
...@@ -231,7 +234,8 @@ ...@@ -231,7 +234,8 @@
\setCJKfamilyfont{zhnewhei}{PingFang~SC} \setCJKfamilyfont{zhnewhei}{PingFang~SC}
} }
\NewDocumentCommand\set_chinese_fontset_fandol{}{ \NewDocumentCommand\set_chinese_fontset_fandol{}{
\msg_redirect_name:nnn {fontspec} {no-script} {info} % 移除 does not contain script "CJK" 警告 % 移除 does not contain script "CJK" 警告
\msg_redirect_name:nnn {fontspec} {no-script} {info}
\setCJKmainfont{FandolSong-Regular}[ \setCJKmainfont{FandolSong-Regular}[
Extension=.otf, Extension=.otf,
BoldFont=FandolSong-Bold, BoldFont=FandolSong-Bold,
...@@ -252,9 +256,6 @@ ...@@ -252,9 +256,6 @@
AutoFakeBold=2.17] AutoFakeBold=2.17]
} }
\NewDocumentCommand\set_chinese_fontset_founder{}{ \NewDocumentCommand\set_chinese_fontset_founder{}{
% FZSSK 方正书宋(简繁扩展) http://www.foundertype.com/index.php/FontInfo/index/id/151 免费商用
% FZXBSK 方正小标宋(简繁扩展) http://www.foundertype.com/index.php/FontInfo/index/id/164 设计师非商免费
% FZKTK 方正楷体(简繁扩展) http://www.foundertype.com/index.php/FontInfo/index/id/137 免费商用
\setCJKmainfont{FZSSK}[ \setCJKmainfont{FZSSK}[
Extension=.ttf, Extension=.ttf,
BoldFont=FZXBSK, BoldFont=FZXBSK,
...@@ -486,8 +487,10 @@ ...@@ -486,8 +487,10 @@
ibidtracker=context, ibidtracker=context,
autopunct=true, autopunct=true,
autocite=plain, autocite=plain,
% gbpub=false, % Uncomment if you do NOT want '[S.l. : s.n.]' in reference entries, GitHub Issue (#47) % gbpub=false, % Uncomment if you do NOT want '[S.l. : s.n.]'
% gbnamefmt=lowercase, % Uncomment if you do NOT want uppercase author names in reference entries, GitHub Issue (#23) % in reference entries, GitHub Issue (#47)
% gbnamefmt=lowercase, % Uncomment if you do NOT want uppercase author
% names in reference entries, GitHub Issue (#23)
]{biblatex} ]{biblatex}
\AtEveryBibitem{ \AtEveryBibitem{
\clearfield{abstract} \clearfield{abstract}
...@@ -904,7 +907,6 @@ numberwithin=section, ...@@ -904,7 +907,6 @@ numberwithin=section,
\cleardoublepage \cleardoublepage
} }
} }
\tl_set:Nn \nju_printcover_ug \tl_set:Nn \nju_printcover_ug
{ {
\thispagestyle{empty} \thispagestyle{empty}
...@@ -934,7 +936,6 @@ numberwithin=section, ...@@ -934,7 +936,6 @@ numberwithin=section,
% \vfill % \vfill
% \newpage % \newpage
} }
\tl_set:Nn \nju_printcover_g \tl_set:Nn \nju_printcover_g
{ {
\thispagestyle{empty} \thispagestyle{empty}
...@@ -985,7 +986,6 @@ numberwithin=section, ...@@ -985,7 +986,6 @@ numberwithin=section,
\end{spacing} \end{spacing}
\cleardoublepage \cleardoublepage
} }
\tl_set:Nn \maketitle \tl_set:Nn \maketitle
{% {%
\str_if_eq:NNTF { \nju_degree } { ug } \str_if_eq:NNTF { \nju_degree } { ug }
...@@ -1008,7 +1008,8 @@ numberwithin=section, ...@@ -1008,7 +1008,8 @@ numberwithin=section,
% \phantomsection\addcontentsline{toc}{chapter}{中文摘要} % 将摘要插入目录和pdf书签 % \phantomsection\addcontentsline{toc}{chapter}{中文摘要} % 将摘要插入目录和pdf书签
\pdfbookmark[0]{中文摘要}{中文摘要} % 将摘要插入pdf书签,与上一行不可共存 \pdfbookmark[0]{中文摘要}{中文摘要} % 将摘要插入pdf书签,与上一行不可共存
\begin{center} \begin{center}
\kaishu\zihao{-2}{\textbf{\uuline{南京大学本科生毕业论文(设计、作品)中文摘要}}} \kaishu\zihao{-2}{\textbf{\uuline{
南京大学本科生毕业论文(设计、作品)中文摘要}}}
\end{center} \end{center}
{\bgroup {\bgroup
\kaishu\zihao{-4} \kaishu\zihao{-4}
...@@ -1041,7 +1042,8 @@ numberwithin=section, ...@@ -1041,7 +1042,8 @@ numberwithin=section,
% \phantomsection\addcontentsline{toc}{chapter}{英文摘要} % 将摘要插入目录和pdf书签 % \phantomsection\addcontentsline{toc}{chapter}{英文摘要} % 将摘要插入目录和pdf书签
\pdfbookmark[0]{英文摘要}{英文摘要} % 将摘要插入pdf书签,与上一行不可共存 \pdfbookmark[0]{英文摘要}{英文摘要} % 将摘要插入pdf书签,与上一行不可共存
\begin{center} \begin{center}
\kaishu\zihao{-2}{\textbf{\uuline{南京大学本科生毕业论文(设计、作品)英文摘要}}} \kaishu\zihao{-2}{\textbf{\uuline{
南京大学本科生毕业论文(设计、作品)英文摘要}}}
\end{center} \end{center}
{ {
\bgroup \bgroup
...@@ -1074,7 +1076,8 @@ numberwithin=section, ...@@ -1074,7 +1076,8 @@ numberwithin=section,
% \phantomsection\addcontentsline{toc}{chapter}{中文摘要} % 将摘要插入目录和pdf书签 % \phantomsection\addcontentsline{toc}{chapter}{中文摘要} % 将摘要插入目录和pdf书签
\pdfbookmark[0]{中文摘要}{中文摘要} % 将摘要插入pdf书签,与上一行不可共存 \pdfbookmark[0]{中文摘要}{中文摘要} % 将摘要插入pdf书签,与上一行不可共存
\begin{center} \begin{center}
\kaishu\zihao{-2}{\textbf{\uuline{南京大学研究生毕业论文中文摘要首页用纸}}} \kaishu\zihao{-2}{\textbf{\uuline{
南京大学研究生毕业论文中文摘要首页用纸}}}
\end{center} \end{center}
\bgroup \bgroup
...@@ -1107,7 +1110,8 @@ numberwithin=section, ...@@ -1107,7 +1110,8 @@ numberwithin=section,
% \phantomsection\addcontentsline{toc}{chapter}{英文摘要} % 将摘要插入目录和pdf书签 % \phantomsection\addcontentsline{toc}{chapter}{英文摘要} % 将摘要插入目录和pdf书签
\pdfbookmark[0]{英文摘要}{英文摘要} % 将摘要插入pdf书签,与上一行不可共存 \pdfbookmark[0]{英文摘要}{英文摘要} % 将摘要插入pdf书签,与上一行不可共存
\begin{center} \begin{center}
\kaishu\zihao{-2}{\textbf{\uuline{南京大学研究生毕业论文英文摘要首页用纸}}} \kaishu\zihao{-2}{\textbf{\uuline{
南京大学研究生毕业论文英文摘要首页用纸}}}
\end{center} \end{center}
{ {
\bgroup \bgroup
......
...@@ -1249,8 +1249,10 @@ through XeTeX. ...@@ -1249,8 +1249,10 @@ through XeTeX.
ibidtracker=context, ibidtracker=context,
autopunct=true, autopunct=true,
autocite=plain, autocite=plain,
% gbpub=false, % Uncomment if you do NOT want '[S.l. : s.n.]' in reference entries, GitHub Issue (#47) % gbpub=false, % Uncomment if you do NOT want '[S.l. : s.n.]'
% gbnamefmt=lowercase, % Uncomment if you do NOT want uppercase author names in reference entries, GitHub Issue (#23) % in reference entries, GitHub Issue (#47)
% gbnamefmt=lowercase, % Uncomment if you do NOT want uppercase author
% names in reference entries, GitHub Issue (#23)
]{biblatex} ]{biblatex}
% \end{macrocode} % \end{macrocode}
% %
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment