Skip to content

Commit

Permalink
Misc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexaraWu committed Jun 3, 2021
1 parent d0a7dc7 commit 1b94d36
Show file tree
Hide file tree
Showing 10 changed files with 76 additions and 60 deletions.
2 changes: 2 additions & 0 deletions .latexmkrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ $ENV{'TZ'}='Asia/Shanghai';
# Ensure './texmf//' is in '$TEXINPUTS'.
ensure_path( 'TEXINPUTS', './texmf//' );

# Use lualatex with latexmk.
# $pdf_mode = 4;
# Use xelatex with latexmk.
$pdf_mode = 5;
$postscript_mode = $dvi_mode = 0;
Expand Down
File renamed without changes.
13 changes: 8 additions & 5 deletions main.tex
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
% !TeX encoding = UTF-8

% 载入 SJTUThesis 模版
\documentclass[type=bachelor]{sjtuthesis}
\documentclass[type=master]{sjtuthesis}
% 选项
% type=[doctor|master|bachelor|course], % 可选(默认:doctor),论文类型
% zihao=[-4|5], % 可选(研究生默认:-4,本科默认:5),正文字号大小
Expand All @@ -10,7 +10,7 @@
% [twoside|oneside] % 可选(默认:twoside),单双页模式

% 论文基本配置,加载宏包等全局配置
\input{sjtusetup}
\input{setup}

\begin{document}

Expand All @@ -23,7 +23,10 @@

% 原创性声明、版权授权页
\originalitypage
\copyrightpage[scans/copyright.pdf]
\copyrightpage
% 插入扫描版原创性声明、版权授权页
% \originalitypage[scans/originality.pdf]
% \copyrightpage[scans/copyright.pdf]

% 使用罗马数字对前文编号
\frontmatter
Expand Down Expand Up @@ -77,8 +80,8 @@
\input{contents/achievements}
\input{contents/resume}

% 中文学士学位论文要求在最后有一个英文大摘要,单独编页码,英文学士学位论文不需要
\input{contents/english_digest}
% 学士学位论文要求在最后有一个大摘要,单独编页码
\input{contents/digest}

%TC:endignore

Expand Down
Binary file modified scans/copyright.pdf
Binary file not shown.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
%%
%% This is file `sjtu-math-font-stix2.def',
%% This is file `sjtu-math-font-stixtwo.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% sjtuthesis.dtx (with options: `mathfont,stix2')
%% sjtuthesis.dtx (with options: `mathfont,stixtwo')
%%
%% Copyright (C) 2009-2017 by weijianwen <[email protected]>
%% (C) 2018-2021 by SJTUG
Expand All @@ -21,7 +21,7 @@
%%
%% The Current Maintainer of this work is Alexara Wu.
%%
\ProvidesFile{sjtu-math-font-stix2.def}
\ProvidesFile{sjtu-math-font-stixtwo.def}
[2020/07/31 1.0.0rc7 STIX Two math fonts definition (SJTUThesis)]
\sjtu@unimathtrue
\RequirePackage{unicode-math}
Expand Down Expand Up @@ -77,4 +77,4 @@
]{texgyrecursor}
\endinput
%%
%% End of file `sjtu-math-font-stix2.def'.
%% End of file `sjtu-math-font-stixtwo.def'.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
%%
%% This is file `sjtu-text-font-stix2.def',
%% This is file `sjtu-text-font-stixtwo.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% sjtuthesis.dtx (with options: `textfont,stix2')
%% sjtuthesis.dtx (with options: `textfont,stixtwo')
%%
%% Copyright (C) 2009-2017 by weijianwen <[email protected]>
%% (C) 2018-2021 by SJTUG
Expand All @@ -21,7 +21,7 @@
%%
%% The Current Maintainer of this work is Alexara Wu.
%%
\ProvidesFile{sjtu-text-font-stix2.def}
\ProvidesFile{sjtu-text-font-stixtwo.def}
[2020/07/31 1.0.0rc7 STIX Two text fonts definition (SJTUThesis)]
\IfFontExistsTF{STIXTwoText-Regular.otf}{
\setmainfont[
Expand Down Expand Up @@ -58,4 +58,4 @@
]{texgyrecursor}
\endinput
%%
%% End of file `sjtu-text-font-stix2.def'.
%% End of file `sjtu-text-font-stixtwo.def'.
3 changes: 1 addition & 2 deletions texmf/tex/latex/sjtuthesis/sjtuthesis-graduate.ltx
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,8 @@
\sjtu@name@abstract@zh
\endgroup
}[\sjtu@name@abstract]%
\zihao{4}
}{%
\vskip 3ex \noindent
\vskip \baselineskip \noindent
\begingroup
\heiti\sjtu@name@keywords@zh
\endgroup
Expand Down
11 changes: 7 additions & 4 deletions texmf/tex/latex/sjtuthesis/sjtuthesis-undergraduate.ltx
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@
[2020/07/31 1.0.0rc7 Shanghai Jiao Tong University Thesis Template]
\geometry{%
paper = a4paper,
vmargin = {84bp, 72bp},
hmargin = 90bp,
top = 84bp,
bottom = 72bp,
left = 90bp,
right = 90bp,
headheight = 60bp,
headsep = 12bp,
headsep = 8bp,
}
\pagestyle{fancy}
\ifsjtu@language@chinese
Expand Down Expand Up @@ -60,6 +62,7 @@
\renewcommand\cftchapfont{\normalfont}
\renewcommand\cftchapleader{\normalfont\cftdotfill{\cftdotsep}}
\renewcommand\cftchappagefont{\normalfont}
\DeclareCaptionFont{sjtu@caption@font}{\zihao{5}\bfseries}
\ifsjtu@type@bachelor
\sjtusetup{
style = {
Expand All @@ -77,7 +80,7 @@
\endgroup
}[\sjtu@name@abstract]%
}{%
\vskip 3ex \noindent
\vskip \baselineskip \noindent
\begingroup
\zihao{-4}
\heiti\sjtu@name@keywords@zh
Expand Down
91 changes: 50 additions & 41 deletions texmf/tex/latex/sjtuthesis/sjtuthesis.cls
Original file line number Diff line number Diff line change
Expand Up @@ -345,12 +345,14 @@
}
\ifsjtu@language@chinese
\def\sjtu@info@title{\sjtu@info@title@zh}
\def\sjtu@info@title@sec{\sjtu@info@title@en}
\def\sjtu@info@display@title{\sjtu@info@display@title@zh}
\def\sjtu@info@running@title{\sjtu@info@running@title@zh}
\def\sjtu@info@keywords{\sjtu@info@keywords@zh}
\def\sjtu@info@author{\sjtu@info@author@zh}
\else
\def\sjtu@info@title{\sjtu@info@title@en}
\def\sjtu@info@title@sec{\sjtu@info@title@zh}
\def\sjtu@info@display@title{\sjtu@info@display@title@en}
\def\sjtu@info@running@title{\sjtu@info@running@title@en}
\def\sjtu@info@keywords{\sjtu@info@keywords@en}
Expand Down Expand Up @@ -388,6 +390,7 @@
table = { initial = Table },
table* = { name = table@second, initial = 表 },
algorithm = { initial = Algorithm },
abbreviation = { initial = Abbreviation },
nomenclature = { initial = Nomenclature },
summary = { initial = Summary },
bib = { initial = Bibliography },
Expand All @@ -396,6 +399,7 @@
publications = { initial = Publications },
achievements = { initial = Research Achievements },
resume = { initial = Resume },
digest = { initial = Digest },
}
\newcommand\sjtu@name@def[2]{%
\@namedef{sjtu@name@#1}{#2}
Expand Down Expand Up @@ -456,7 +460,6 @@
\sjtu@name@def{course@zh}{课程名称}
\sjtu@name@def{major@zh}{专业}
\sjtu@name@def{department@zh}{学院(系)}
\sjtu@name@def{digest}{英文大摘要}
\fi
\sjtu@name@def{orig@subtitle@zh}{原创性声明}
\sjtu@name@def{orig@subtitle@en}{Declaration of Originality}
Expand Down Expand Up @@ -494,14 +497,16 @@
table = {表},
table* = {Table},
algorithm = {算法},
nomenclature = {主要符号对照表},
abbreviation = {缩略语对照表},
nomenclature = {符号对照表},
summary = {全文总结},
bib = {参考文献},
index = {索\hspace{\ccwd}引},
acknowledgements = {致\hspace{\ccwd}谢},
publications = {攻读学位期间发表(或录用)的学术论文},
achievements = {攻读学位期间获得的科研成果},
resume = {个人简历},
digest = {大摘要},
}
}
\ctexset{
Expand Down Expand Up @@ -625,33 +630,37 @@
\def\sjtu@lastpageref{\lastpageref{pagesLTS.arabic}}
}
\renewcommand\backmatter{%
\cleardoublepage
\if@openright\cleardoublepage\else\clearpage\fi%
\@mainmatterfalse
}
\ctexset{%
chapter = {%
format = \zihao{3}\bfseries\heiti\centering,
nameformat = {},
titleformat = {},
aftername = \quad,
aftername = \enskip,
afterindent = true,
beforeskip = {\ifsjtu@type@graduate 0pt\else 1ex\fi},
afterskip = {\ifsjtu@type@graduate 3ex\else 4ex\fi},
fixskip = true,
beforeskip = 24pt,
afterskip = 24pt,
lofskip = 0pt,
lotskip = 0pt,
},
section = {%
format = \zihao{4}\bfseries\heiti,
aftername = \enskip,
afterindent = true,
afterskip = {1ex \@plus .2ex},
},
subsection = {%
format = \zihao{-4}\bfseries\heiti,
aftername = \enskip,
afterindent = true,
afterskip = {1ex \@plus .2ex},
},
subsubsection = {%
format = \zihao{-4}\normalfont,
aftername = \enskip,
afterindent = true,
afterskip = {1ex \@plus .2ex},
},
Expand Down Expand Up @@ -844,7 +853,7 @@
}
\newcommand\sjtu@signbox[1]{%
\parbox{.45\textwidth}{%
{#1}签名:\vskip 4em
{#1}签名:\vskip 1.5\baselineskip
日期:\hspace{\stretch{3}}年\hspace{\stretch{2}}月\hspace{\stretch{2}}日
}
}
Expand All @@ -853,22 +862,20 @@
\cleardoublepage
\ifblank{#1}{%
\thispagestyle{empty}
\sjtu@chapter*[\sjtu@name@orig@subtitle]{%
\zihao{-2}\sjtu@name@school@zh\\[6pt]\sjtu@name@orig@title
}
\begingroup
\linespread{1.7}\selectfont
\sjtu@chapter*[\sjtu@name@orig@subtitle]{%
\zihao{-2}\sjtu@name@school@zh\\\sjtu@name@orig@title
}
\zihao{4}
\begingroup
\linespread{2.0}\selectfont
\sjtu@name@origbody\par
\endgroup
\vskip 16ex
\vskip \baselineskip
\sjtu@name@origbody\par
\vskip 4\baselineskip
\noindent
\begin{minipage}{\textwidth}
\hfill
\sjtu@signbox{\sjtu@name@thesis@type 作者}
\end{minipage}
\par
\end{minipage}\par
\endgroup
}{%
\includepdf[pagecommand={%
Expand All @@ -882,24 +889,22 @@
\cleardoublepage
\ifblank{#1}{%
\thispagestyle{empty}
\sjtu@chapter*[\sjtu@name@copr@subtitle]{%
\zihao{-2}\sjtu@name@school@zh\\[6pt]\sjtu@name@copr@title
}
\begingroup
\linespread{1.7}\selectfont
\sjtu@chapter*[\sjtu@name@copr@subtitle]{%
\zihao{-2}\sjtu@name@school@zh\\\sjtu@name@copr@title
}
\zihao{4}
\begingroup
\linespread{1.5}\selectfont
\sjtu@name@coprbody\par
\sjtu@copr@addon\par
\endgroup
\vskip 16ex
\vskip \baselineskip
\sjtu@name@coprbody\par
\sjtu@copr@addon\par
\vskip 4\baselineskip
\noindent
\begin{minipage}{\textwidth}
\sjtu@signbox{\sjtu@name@thesis@type 作者}
\hfill
\sjtu@signbox{指导教师}
\end{minipage}
\par
\end{minipage}\par
\endgroup
}{%
\includepdf[pagecommand={%
Expand All @@ -909,6 +914,12 @@
\fi
}
\newcommand\sjtu@save@env@body[1]{\long\gdef\sjtu@saved@env@body{#1}}
\NewDocumentEnvironment{abbreviation}{}{%
\sjtu@chapter{\sjtu@name@abbreviation}
}{}
\NewDocumentEnvironment{abbreviation*}{}{%
\sjtu@chapter*{\sjtu@name@abbreviation}
}{}
\NewDocumentEnvironment{nomenclature}{}{%
\sjtu@chapter{\sjtu@name@nomenclature}
}{}
Expand Down Expand Up @@ -994,19 +1005,17 @@
\Collect@Body\sjtu@save@env@body
}{%
\ifsjtu@type@bachelor
\ifsjtu@language@chinese
\AtEndDocument{%
\cleardoublepage
\pagenumbering{roman}
\def\sjtu@thepage{\theCurrentPageLocal}
\def\sjtu@lastpageref{\lastpageref{pagesLTS.roman.local}}
\sjtu@chapter*[\sjtu@name@digest]{\MakeUppercase\sjtu@info@title@en}
\counterwithout{section}{chapter}
\sjtu@counter@without@chapter
\let\addcontentsline\@gobblethree
\sjtu@saved@env@body
}
\fi
\AtEndDocument{%
\cleardoublepage
\pagenumbering{roman}
\def\sjtu@thepage{\theCurrentPageLocal}
\def\sjtu@lastpageref{\lastpageref{pagesLTS.roman.local}}
\sjtu@chapter*[\sjtu@name@digest]{\MakeUppercase\sjtu@info@title@sec}
\counterwithout{section}{chapter}
\sjtu@counter@without@chapter
\let\addcontentsline\@gobblethree
\sjtu@saved@env@body
}
\fi
}
\AtEndPreamble{
Expand Down

0 comments on commit 1b94d36

Please sign in to comment.