154 lines
3.8 KiB
TeX
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

% 文档类设置12pt字号A4纸张大小
\documentclass[12pt,a4paper]{article}
\input{config}
% 导入基础包
\usepackage{graphicx} % 图片支持
\usepackage{ctex} % 中文支持
\usepackage{indentfirst} % 首行缩进
\usepackage{subcaption} % 子图标题
\usepackage{amsmath} % 数学公式
\usepackage{amssymb} % 数学符号
\usepackage{pgfplots} % 绘图
\usepackage{fancyhdr} % 页眉页脚
\usepackage{enumitem}
\setlist[itemize]{nosep}
% 页面样式设置
\pagestyle{fancy}
\usepackage{titlesec}
\titlespacing{\section}{0pt}{0pt}{2em}
% 将Figure改为图
\renewcommand{\figurename}{}
% 图片标题设置
\usepackage{caption}
\captionsetup{labelformat=simple, labelsep=space}
% 图片编号格式:节号.图片序号
\renewcommand {\thefigure} {\thesection{}.\arabic{figure}}
% 页眉页脚设置
\renewcommand{\headrulewidth}{0pt} % 页眉线宽度
\renewcommand{\footrulewidth}{0pt} % 页脚线宽度
\lhead{} % 左页眉
\chead{} % 中页眉
\rhead{} % 右页眉
\lfoot{} % 左页脚
\cfoot{\thepage} % 中页脚(页码)
\rfoot{} % 右页脚
% 表格相关包
\usepackage{booktabs} % 三线表
% 节标题格式设置
\usepackage{titlesec}
\titleformat{\section}{\centering\zihao{3}\songti\bfseries}{\arabic{section}.}{0.5em}{}
% 目录标题设置
\renewcommand\contentsname{\songti 目录}
% 其他功能包
\usepackage{multirow} % 合并单元格
\usepackage{abstract} % 摘要
\usepackage{makecell} % 表格单元格
\usepackage{tikz} % 绘图
\usetikzlibrary{arrows.meta,positioning,shapes,fit,backgrounds,calc}
% 自定义命令1.2pt宽度的竖线
\def\I{\vrule width1.2pt}
% 自定义下划线命令
\makeatletter
\newcommand\dlmu[2][4cm]{\hskip1pt\underline{\hb@xt@ #1{\hss#2\hss}}\hskip3pt}
\makeatother
% 形态展示相关包
\usepackage{float}
\usepackage{listings}
\usepackage[table]{xcolor}
% 字体设置
\usepackage{fontspec}
\setmainfont{Times New Roman}
% 设置方正楷体
\setCJKfamilyfont{fzkaiti}[
AutoFakeBold = 1.2, % 伪粗体
ItalicFont = 方正楷体_GBK.TTF % 斜体字体
]{方正楷体_GBK.TTF}
% 章节标题格式设置
\usepackage{titlesec}
\titleformat{\section}{\centering\Large\bfseries}{\,\thesection\,}{1em}{}
% 目录格式设置
\usepackage{titletoc}
\titlecontents{section}[0pt]{\addvspace{1.5pt}\filright\bf}
{\contentspush{\thecontentslabel\ \quad}}
{}{\titlerule*[8pt]{.}\contentspage}
% 页面边距设置
\usepackage[left=3.0cm, right=2.6cm, top=2.54cm, bottom=2.54cm]{geometry}
% 超链接设置
\usepackage[hidelinks,linkcolor=black,citecolor=black]{hyperref}
\begin{document}
% 插入封面
\input{chapters/cover}
% 设置摘要标题字号
\renewcommand{\abstractname}{\scriptsize}
% 插入摘要
\input{chapters/abstract}
\newpage
% 设置目录标题
\renewcommand{\contentsname}{\centerline{\zihao{-2}\textbf{目录}}}
% 生成目录
\tableofcontents
\newpage
% 正文部分设置行距为23pt
{
\setlength{\baselineskip}{23pt}
% 插入各章节内容
\newpage
\input{chapters/introduction} % 引言
\clearpage
\newpage
\input{chapters/technology} % 技术章节
\clearpage
\newpage
\input{chapters/requirement} % 需求章节
\clearpage
\newpage
\input{chapters/implementation} % 实现章节
\clearpage
\newpage
\input{chapters/verification} % 验证章节
\clearpage
\newpage
\input{chapters/conclusion} % 结论
\clearpage
\newpage
\input{chapters/references} % 参考文献
\clearpage
\newpage
\input{chapters/acknowledgement} % 致谢
\clearpage
}
\end{document}