diff --git a/input/cover.tex b/input/cover.tex new file mode 100644 index 0000000..eff189c --- /dev/null +++ b/input/cover.tex @@ -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} diff --git a/input/info.tex b/input/info.tex new file mode 100644 index 0000000..66cbeb5 --- /dev/null +++ b/input/info.tex @@ -0,0 +1,10 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% 标题和作者等基本信息 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\newcommand{\themaintitle}{这是一个很好用的LaTex模板} %标题 +\newcommand{\thesubtitle}{这里是副标题} %副标题 +\newcommand{\theauthor}{作者名字}%作者名字 +\newcommand{\thedate}{\today}%时间 +\newcommand{\theaffiliation}{中国海洋大学}%工作单位 +\newcommand{\thedept}{计算机科学与技术学院}%部门 \ No newline at end of file diff --git a/input/setting.tex b/input/setting.tex new file mode 100644 index 0000000..f80ee1f --- /dev/null +++ b/input/setting.tex @@ -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 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ No newline at end of file diff --git a/input/toc.tex b/input/toc.tex new file mode 100644 index 0000000..159f0fc --- /dev/null +++ b/input/toc.tex @@ -0,0 +1,5 @@ +\newpage +\thispagestyle{empty} +\begin{center} +\tableofcontents +\end{center} \ No newline at end of file diff --git a/report.cls b/report.cls index cbb6563..2a8cd29 100644 --- a/report.cls +++ b/report.cls @@ -16,6 +16,10 @@ \RequirePackage{zhnumber} \RequirePackage[many]{tcolorbox} \RequirePackage{fontawesome} +\RequirePackage{graphicx} +\RequirePackage{graphbox} +\RequirePackage{wrapfig} +\RequirePackage{geometry} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -30,22 +34,15 @@ citecolor={black}, urlcolor={black} } - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% graphicx settings %% 图片设定 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\RequirePackage{graphicx} -\RequirePackage{graphbox} -\RequirePackage{wrapfig} \graphicspath{{./figs/}{./figure/}{./figures/}{./image/}{./images/}{./graphics/}{./graphic/}{./pictures/}{./picture/}} - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% geometry settings %% 页面设定 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\RequirePackage{geometry} + \geometry{ textwidth=138mm, textheight=215mm, diff --git a/report.pdf b/report.pdf index 8d4e8be..b54487a 100644 Binary files a/report.pdf and b/report.pdf differ diff --git a/report.tex b/report.tex index d4837fe..a387ccf 100644 --- a/report.tex +++ b/report.tex @@ -19,48 +19,10 @@ \usepackage[justification=centering]{caption} \usepackage{draftwatermark}% 所有页加水印 -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% title and author -%% 标题和作者 -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\title{\bfseries\sffamily - 这是一个Latex模板\\ - \normalfont\zihao{-3} - Subtitle Here -} -%%作者这里,可以加入自己的网站,图标,可以使用fontawesome -\author{作者名字 \\ \faGithubAlt~ https://github.com/} -%%可以加入日期 -\date{} +\input{input/info} +\input{input/setting} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% head and foot -%% 页眉页脚 -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\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{这是一个Latex模板}} -%\fancyhead[C]{\@title} -%\fancyhead[R]{\thepage} -%\fancyfoot[L]{\fzkai{\@author}} -\fancyfoot[C]{\thepage / \pageref{LastPage}} - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - % 设置页面水印 -% \usepackage[firstpage]{draftwatermark} % 只有第一页加水印 -\SetWatermarkText{中国海洋大学计算机科学与技术学院} % 设置水印文字内容 -% \SetWatermarkText{\includegraphics{fig/ZJDX-WaterMark.eps}} % 设置水印LOGO -\SetWatermarkLightness{0.95} % 设置水印透明度 0-1 -\SetWatermarkScale{0.2} % 设置水印大小 0-1 -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% 正文开始 @@ -68,81 +30,16 @@ \begin{document} \sloppy % 解决中英文混排文字超出边界问题 -%首页封面开始 -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% 封面页面开始 -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\input{input/cover} +\input{input/toc} -\begin{titlepage} - \centering % 居中显示 - \scshape % - \vspace*{\baselineskip} % 顶部空白 - %------------------------------------------------ - % 标题 - %------------------------------------------------ - - \rule{\textwidth}{1.6pt}\vspace*{-\baselineskip}\vspace*{2pt} % 上面粗的线 - \rule{\textwidth}{0.4pt} % 细线 - - \vspace{0.75\baselineskip} % 和标题之间的空白 - - {\hm\bfseries \zihao{2} 这是一个\\ 很好用的Latex模板\\} % 标题 - - \vspace{0.75\baselineskip} % 标题下面的空白 - - \rule{\textwidth}{0.4pt}\vspace*{-\baselineskip}\vspace{3.2pt} % 细线 - \rule{\textwidth}{1.6pt} % 粗线 - - \vspace{2\baselineskip} % 标题后的空白 - - %------------------------------------------------ - % 副标题 - %------------------------------------------------ - - {\hm \zihao{3} 这里是副标题} % 副标题 - - \vspace*{3\baselineskip} % 空白 - - %------------------------------------------------ - % 作者信息 - %------------------------------------------------ - - 作者 - - \vspace{0.5\baselineskip} % 作者前空白 - - {\scshape\Large 作者名字 } % 作者列表 - - \vspace{0.5\baselineskip} % 空白 - - \fzkai{一级单位 \\ 二级单位 \\ 三级单位} % 作者单位 - - \vfill % 空白 - - %------------------------------------------------ - % 出版社或单位 - %------------------------------------------------ - - %\plogo % Publisher logo - - \vspace{0.3\baselineskip} % 空白 - - %2017 % Publication year - - {\large 2022年3月} % 日期 +\newpage -\end{titlepage} +\begin{center} + {\hm\bfseries \zihao{3} \themaintitle} +\end{center} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% 封面页面结束 -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% 正文开始 -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -\maketitle \thispagestyle{empty} \begin{abstract} diff --git a/report.toc b/report.toc new file mode 100644 index 0000000..9a9dea5 --- /dev/null +++ b/report.toc @@ -0,0 +1,12 @@ +\contentsline {section}{\numberline {1}准备工作}{2}{section.1}% +\contentsline {section}{\numberline {2}字体}{2}{section.2}% +\contentsline {section}{\numberline {3}标题}{2}{section.3}% +\contentsline {subsection}{\numberline {3.1}这里是二级标题}{3}{subsection.3.1}% +\contentsline {subsubsection}{\numberline {3.1.1}这里是三级标题}{3}{subsubsection.3.1.1}% +\contentsline {section}{\numberline {4}列表}{3}{section.4}% +\contentsline {subsection}{\numberline {4.1}无序列表}{3}{subsection.4.1}% +\contentsline {subsection}{\numberline {4.2}有序列表}{3}{subsection.4.2}% +\contentsline {section}{\numberline {5}图表信息}{4}{section.5}% +\contentsline {section}{\numberline {6}代码}{4}{section.6}% +\contentsline {section}{\numberline {7}文本框}{6}{section.7}% +\contentsline {section}{\numberline {8}图标}{6}{section.8}%