把正文进行了拆分,实现了模块化,加入了目录页面。

This commit is contained in:
2022-05-14 22:57:27 +08:00
parent af98f4dc51
commit 13f643ef3f
8 changed files with 133 additions and 119 deletions
+65
View File
@@ -0,0 +1,65 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 封面页面
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{titlepage}
\centering % 居中显示
\scshape %
\vspace*{\baselineskip} % 顶部空白
%------------------------------------------------
% 标题
%------------------------------------------------
\rule{\textwidth}{1.6pt}\vspace*{-\baselineskip}\vspace*{2pt} % 上面粗的线
\rule{\textwidth}{0.4pt} % 细线
\vspace{30pt} % 和标题之间的空白
{\hm\bfseries \zihao{2} \themaintitle} % 标题
\vspace{0.75\baselineskip} % 标题下面的空白
\rule{\textwidth}{0.4pt}\vspace*{-\baselineskip}\vspace{3.2pt} % 细线
\rule{\textwidth}{1.6pt} % 粗线
\vspace{2\baselineskip} % 标题后的空白
%------------------------------------------------
% 副标题
%------------------------------------------------
{\hm \zihao{3} \thesubtitle} % 副标题
\vspace*{3\baselineskip} % 空白
%------------------------------------------------
% 作者信息
%------------------------------------------------
作者
\vspace{0.5\baselineskip} % 作者前空白
{\scshape\Large \theauthor } % 作者列表
\vspace{0.5\baselineskip} % 空白
\fzkai{\theaffiliation} \\% 作者单位
%\vspace*{3\baselineskip}
\fzkai{\thedept}
\vfill % 空白
%------------------------------------------------
% 出版社或单位
%------------------------------------------------
%\plogo % Publisher logo
\vspace{0.3\baselineskip} % 空白
%2017 % Publication year
{\large \thedate} % 日期
\end{titlepage}
+10
View File
@@ -0,0 +1,10 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 标题和作者等基本信息
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\themaintitle}{这是一个很好用的LaTex模板} %标题
\newcommand{\thesubtitle}{这里是副标题} %副标题
\newcommand{\theauthor}{作者名字}%作者名字
\newcommand{\thedate}{\today}%时间
\newcommand{\theaffiliation}{中国海洋大学}%工作单位
\newcommand{\thedept}{计算机科学与技术学院}%部门
+28
View File
@@ -0,0 +1,28 @@
%整体设置
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 页眉页脚
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{fancyhdr}
\RequirePackage{zhnumber}
\RequirePackage{lastpage}
\pagestyle{fancy}
\fancyhf{}
\renewcommand\headrulewidth{.5pt}
\renewcommand\footrulewidth{0pt}
%\futurelet\TMPheadrule\def\headrule{{\color{violet}\TMPheadrule}}
%\renewcommand{\sectionmark}[1]{\markright{#1}}
\fancyhead[C]{\fzkai{\themaintitle}}
%\fancyhead[C]{\@title}
%\fancyhead[R]{\thepage}
%\fancyfoot[L]{\fzkai{\@author}}
\fancyfoot[C]{\thepage / \pageref{LastPage}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 设置页面水印
% \usepackage[firstpage]{draftwatermark} % 只有第一页加水印
\SetWatermarkText{\theaffiliation\thedept} % 设置水印文字内容
% \SetWatermarkText{\includegraphics{fig/ZJDX-WaterMark.eps}} % 设置水印LOGO
\SetWatermarkLightness{0.95} % 设置水印透明度 0-1
\SetWatermarkScale{0.2} % 设置水印大小 0-1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+5
View File
@@ -0,0 +1,5 @@
\newpage
\thispagestyle{empty}
\begin{center}
\tableofcontents
\end{center}