From 3e520604ba5600d0bed6823c9e557ce806749997 Mon Sep 17 00:00:00 2001 From: carry <2641257231@qq.com> Date: Fri, 25 Apr 2025 12:47:09 +0800 Subject: [PATCH] =?UTF-8?q?refactor(paper):=20=E5=B0=86=E6=91=98=E8=A6=81?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E4=BB=8E=E4=B8=BB=E6=96=87=E4=BB=B6=E7=A7=BB?= =?UTF-8?q?=E8=87=B3=E5=8D=95=E7=8B=AC=E7=AB=A0=E8=8A=82=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 为了提升代码的可维护性和模块化,将中文和英文摘要从 `main.tex` 文件中提取出来,并放入单独的 `abstract.tex` 文件中。同时,添加了 `titlesec` 包以改进章节标题的格式化。 --- paper/latex/chapters/abstract.tex | 21 ++++++++++++++++++ paper/latex/main.tex | 37 +++++++------------------------ 2 files changed, 29 insertions(+), 29 deletions(-) create mode 100644 paper/latex/chapters/abstract.tex diff --git a/paper/latex/chapters/abstract.tex b/paper/latex/chapters/abstract.tex new file mode 100644 index 0000000..dfe4cbb --- /dev/null +++ b/paper/latex/chapters/abstract.tex @@ -0,0 +1,21 @@ +% 中文摘要 +\begin{onecolabstract} + \noindent{}{\zihao{4}\textbf{摘要\qquad}}{\songti \zihao{-4}中文摘要内容******** + ************************************************************ + *************************************************************************** + ************************************************************* + ******************************************************** + *****************************************************************}\par + + \vspace{1ex} + + \noindent{}{\zihao{4}\textbf{关键词\qquad}}{\zihao{-4}\songti 关键词1;关键词2}\par +\end{onecolabstract} + +% 英文摘要 +\begin{onecolabstract} + \noindent{}{\zihao{4} \textbf{ABSTRACT\qquad}}{\zihao{-4}abstract in English ************* + ******************************************************************************************* + ******************************************************************************************* + *******************************************************************************************}\par +\end{onecolabstract} \ No newline at end of file diff --git a/paper/latex/main.tex b/paper/latex/main.tex index 89f768f..c65ac69 100644 --- a/paper/latex/main.tex +++ b/paper/latex/main.tex @@ -5,6 +5,12 @@ %\graphicspath{{chapter/}{figures/}} \usepackage{CJK} \usepackage{amsmath}%数学 +\usepackage{titlesec} + +\newcounter{mychapter} +\titleformat{\section} + {\normalfont\Large\bfseries}{\stepcounter{mychapter}第\themychapter 章}{1em}{} + %\usepackage[colorlinks,linkcolor=red]{hyperref}%超链接 @@ -153,36 +159,9 @@ {\zihao{-4}\songti 电子信息工程 \quad 专业 \quad 电信151班 \quad ************* \par 指导教师:****} \end{center} - - - \begin{onecolabstract} - \noindent{}{\zihao{4}\textbf{摘要\qquad}}{\songti \zihao{-4}中文摘要内容******** - ************************************************************ - *************************************************************************** - ************************************************************* - ******************************************************** - *****************************************************************}\par - \vspace{1ex} - - \noindent{}{\zihao{4}\textbf{关键词\qquad}}{\zihao{-4}\songti 关键词1;关键词2}\par - \end{onecolabstract} - - - \begin{onecolabstract} - % \setlength\parskip{0em} - \noindent{}{\zihao{4} \textbf{ABSTRACT\qquad}}{\zihao{-4}abstract in English ************* - ******************************************************************************************* - ******************************************************************************************* - *******************************************************************************************}\par - - - \vspace{1ex} - - \noindent{}{\zihao{4}\textbf{KEY WORDS\qquad}}{\zihao{-4}keywords1; keywords2}\par - \end{onecolabstract} - - + \input{chapters/abstract} + \newpage %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%