Skip to content

Commit

Permalink
WIP(UT): add abstract to package.
Browse files Browse the repository at this point in the history
  • Loading branch information
fky2015 committed Jul 4, 2022
1 parent f7a20a8 commit 045c120
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 48 deletions.
73 changes: 67 additions & 6 deletions templates/undergraduate-thesis/bitundergrad.cls
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,6 @@
% TODO: optional
\lstset{style=examplestyle}

% \newcommand{\unnumchapter}[1]{
% \chapter*{\vskip 10bp\textmd{#1} \vskip -6bp}
% \addcontentsline{toc}{chapter}{#1}
% \stepcounter{chapter}
% }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% user interface.
Expand All @@ -228,6 +222,12 @@
\addcontentsline{toc}{chapter}{#1}
\stepcounter{chapter}
}
% \newcommand{\unnumchapter}[1]{
% \chapter*{\vskip 10bp\textmd{#1} \vskip -6bp}
% \addcontentsline{toc}{chapter}{#1}
% \stepcounter{chapter}
% }


% Usage: \dunderline{<line_thickness>}{<text>}
% \cs_set:Npn \dunderline #1#2 {
Expand Down Expand Up @@ -313,6 +313,67 @@
\group_end:
}

\DeclareDocumentCommand \MakeTOC {}
{
{
\renewcommand{\baselinestretch}{1.35}
% 目录
\tableofcontents
\newpage
}
}

\NewDocumentEnvironment {abstract} {}
{
\zihao{-4}
\vspace*{-11mm}

\begin{center}
\heiti\zihao{-2}\textbf{\l_bit_title_tl}
\end{center}

\vspace*{2mm}

{\let\clearpage\relax \chapter*{\textmd{摘\hspace{1em}要}}}
\addcontentsline{toc}{chapter}{摘\hspace{1em}要}
\setcounter{page}{1}

\vspace*{1mm}

\setstretch{1.53}
\setlength{\parskip}{0em}\par
}
{
\vspace{4ex}\noindent\textbf{\heiti 关键词:北京理工大学;本科生;毕业设计(论文)}\par
\newpage
}

\NewDocumentEnvironment {abstract*} {}
{
\zihao{-4}
\vspace*{-2mm}

\begin{spacing}{0.95}
\centering
\heiti\zihao{3}\textbf{\l_bit_titleen_tl}
\end{spacing}

\setstretch{1.53}
\vspace*{17mm}

{\let\clearpage\relax \chapter*{
\zihao{-3}\textmd{Abstract}}}
\addcontentsline{toc}{chapter}{Abstract}
\setcounter{page}{2}

\setlength{\parskip}{0em}\par
}
{
\par\vspace{3ex}\noindent\textbf{Key Words: BIT; Undergraduate; Graduation Project (Thesis)}
\newpage
}


\DeclareDocumentCommand \MakeReviewTable {}
{
\group_begin:
Expand Down
44 changes: 4 additions & 40 deletions templates/undergraduate-thesis/chapters/0_abstract.tex
Original file line number Diff line number Diff line change
Expand Up @@ -18,56 +18,20 @@
% The Current Maintainer of this work is Feng Kaiyu.

% 中英文摘要章节
\zihao{-4}
\vspace*{-11mm}

\begin{center}
\heiti\zihao{-2}\textbf{\thesisTitle}
\end{center}

\vspace*{2mm}

{\let\clearpage\relax \chapter*{\textmd{摘~~~~要}}}
\addcontentsline{toc}{chapter}{摘~~~~要}
\setcounter{page}{1}

\vspace*{1mm}

\setstretch{1.53}
\setlength{\parskip}{0em}

\begin{abstract}
% 中文摘要正文从这里开始
本文……。

\textcolor{blue}{摘要正文选用模板中的样式所定义的“正文”,每段落首行缩进 2 个字符;或者手动设置成每段落首行缩进 2 个汉字,字体:宋体,字号:小四,行距:固定值 22 磅,间距:段前、段后均为 0 行。阅后删除此段。}

\textcolor{blue}{摘要是一篇具有独立性和完整性的短文,应概括而扼要地反映出本论文的主要内容。包括研究目的、研究方法、研究结果和结论等,特别要突出研究结果和结论。中文摘要力求语言精炼准确,本科生毕业设计(论文)摘要建议 300-500 字。摘要中不可出现参考文献、图、表、化学结构式、非公知公用的符号和术语。英文摘要与中文摘要的内容应一致。阅后删除此段。}

\vspace{4ex}\noindent\textbf{\heiti 关键词:北京理工大学;本科生;毕业设计(论文)}
\newpage
\end{abstract}

% 英文摘要章节
\vspace*{-2mm}

\begin{spacing}{0.95}
\centering
\heiti\zihao{3}\textbf{\thesisTitleEN}
\end{spacing}

\vspace*{17mm}

{\let\clearpage\relax \chapter*{
\zihao{-3}\textmd{Abstract}\vskip -3bp}}
\addcontentsline{toc}{chapter}{Abstract}
\setcounter{page}{2}

\setstretch{1.53}
\setlength{\parskip}{0em}

\begin{abstract*}
% 英文摘要正文从这里开始
In order to study……

\textcolor{blue}{Abstract 正文设置成每段落首行缩进 2 字符,字体:Times New Roman,字号:小四,行距:固定值 22 磅,间距:段前、段后均为 0 行。阅后删除此段。}

\vspace{3ex}\noindent\textbf{Key Words: BIT; Undergraduate; Graduation Project (Thesis)}
\newpage
\end{abstract*}
8 changes: 6 additions & 2 deletions templates/undergraduate-thesis/main.tex
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,18 @@
%\input{misc/1_originality.tex}
% 摘要:在摘要相应的 TeX 文件处进行摘要部分的撰写
\input{chapters/0_abstract.tex}

% 目录:如无特殊需要,本部分无需改动
\input{misc/2_toc.tex}
% \input{misc/2_toc.tex}

\MakeTOC

% 正文开始
\mainmatter
% 正文 22 磅的行距
\setlength{\parskip}{0em}
\renewcommand{\baselinestretch}{1.53}
\setstretch{1.53}
% \renewcommand{\baselinestretch}{1.53}
% 修复脚注出现跨页的问题
\interfootnotelinepenalty=10000

Expand Down

0 comments on commit 045c120

Please sign in to comment.