-
Notifications
You must be signed in to change notification settings - Fork 6
/
thesis.tex
177 lines (148 loc) · 5.75 KB
/
thesis.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
\documentclass[cs4size, a4paper, twoside]{ctexart}
\usepackage{xeCJK}
%章节总标题加点
\usepackage[subfigure]{tocloft}
\renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}}
%==================== 数学符号公式 ============
\usepackage{amsmath} % AMS LaTeX宏包
%\usepackage{amssymb} % 用来排版漂亮的数学公式
%\usepackage{amsbsy}
\usepackage[style=1]{mdframed}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{mathrsfs} % 英文花体字体
\usepackage{bm} % 数学公式中的黑斜体
\usepackage{bbding,manfnt} % 一些图标,如 \dbend
\usepackage{lettrine} % 首字下沉,命令\lettrine
\def\attention{\lettrine[lines=2,lraise=0,nindent=0em]{\large\textdbend\hspace{1mm}}{}}
\usepackage{longtable}
\usepackage[toc,page]{appendix}
\usepackage{geometry} % 页边距调整
\geometry{top=3.0cm,bottom=2.7cm,left=2.5cm,right=2.5cm}
%\usepackage{caption2} % 浮动图形和表格标题样式
%====================按章编号==========================
\numberwithin{equation}{section}
\numberwithin{table}{section}
\numberwithin{figure}{section}
%================= 基本格式预置 ===========================
\linespread{1.25} \zihao{-4} % 行距、字号
\setlength{\parskip}{0pt} % 段距
% 页眉页脚
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[OC]{\zihao{5} \leftmark}
\fancyhead[EC]{\zihao{5} \songti 西安石油大学大学本科毕业设计(论文)}
\fancyfoot[C]{~\zihao{5} —\hspace{0.5em} \thepage \hspace{0.5em}—~}
\renewcommand{\sectionmark}[1]{\markboth{#1}{}}
\renewcommand{\headrulewidth}{0.65pt}
% 标题格式
\CTEXsetup[format={\centering\zihao{-3}\bfseries},beforeskip={1em},afterskip={2em}]{section}
\CTEXsetup[format={\bfseries\zihao{4}},beforeskip={0.5em},afterskip={0.5em}]{subsection}
\CTEXsetup[format={\bfseries\zihao{-4}},beforeskip={0.5em},afterskip={0.5em}]{subsubsection}
% 上标引用格式
\newcommand{\upcite}[1]{\textsuperscript{\textsuperscript{\cite{#1}}}}
\renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}}
\usepackage[font=small,labelfont=bf, textfont=bf]{caption}
% 目录不加粗
%\usepackage{tocstyle}
%\usepackage{microtype}
%\settocfeature[toc][1]{entryhook}{\normalfont}
%================== 图形支持宏包 =========================
\usepackage{subfigure}
\usepackage{graphicx} % 嵌入png图像
\usepackage{color,xcolor} % 支持彩色文本、底色、文本框等
\usepackage{pifont} % 支持圈数字 %\ding{number}
\usepackage{hyperref} % 交叉引用
\usepackage{caption}
\usepackage{float}
\captionsetup{figurewithin=section}
%==================== 源码和流程图 ====================
\usepackage{listings} % 粘贴源代码
\lstset{
language=PHP,
tabsize=4,
basicstyle=\normalsize\linespread{1.1}\footnotesize\ttfamily,
showstringspaces=false,
frame=top, frame=bottom,
commentstyle=\color{green},
keywordstyle=\color{blue},
breaklines=true,
numbers=left, numberstyle=\tiny,
}
\usepackage{tikz}
\usepackage{tikz-3dplot}
\usetikzlibrary{shapes,arrows,positioning}
%==================== 字体设置 ====================
% Mac 字体设置
%\setCJKmainfont[BoldFont=宋体-简 粗体,ItalicFont=宋体-简 常规体]{宋体-简 常规体}
%\setCJKsansfont[BoldFont=宋体-简 常规体]{宋体-简 常规体}
%\setCJKmonofont{宋体-简 常规体}
\setmainfont{Times New Roman}
\setCJKmainfont[BoldFont=华文中宋]{宋体}
%==================== 自定义包 =======================
%=================== 定理类环境定义 ===================
\newtheorem{example}{例} % 整体编号
\newtheorem{algorithm}{算法}
\newtheorem{theorem}{定理} % 按 section 编号
\newtheorem{definition}{定义}
\newtheorem{axiom}{公理}
\newtheorem{property}{性质}
\newtheorem{proposition}{命题}
\newtheorem{lemma}{引理}
\newtheorem{corollary}{推论}
\newtheorem{remark}{注解}
\newtheorem{condition}{条件}
\newtheorem{conclusion}{结论}
\newtheorem{assumption}{假设}
\usepackage{enumitem}
%=================== 正文开始 ===================
\begin{document}
%==================重定义 ===================
\renewcommand{\contentsname}{\hspace*{\fill}目\quad 录\hspace*{\fill}\\}
\renewcommand{\abstractname}{摘要}
\renewcommand{\refname}{参考文献}
\renewcommand{\indexname}{索引}
\renewcommand\thefigure{\thesection-\arabic{figure}}
\renewcommand{\figurename}{图}
\renewcommand\thetable{\thesection-\arabic{table}}
\renewcommand{\tablename}{表}
\renewcommand{\appendixname}{附录}
\renewcommand{\proofname}{证明}
\renewcommand{\algorithm}{算法}
%\renewcommand{\labelenumi}{(\arabic{enumi})}
% 封皮和前言
\input{body/cover}
\pagestyle{plain} %不带页眉横线
\include{body/abstract}
%=================== 目录 ===================
% 目录页加页眉
\fancypagestyle{plain}{
\fancyhead[C]{\zihao{5} \songti 目\hspace{1em}录}
}
\pagenumbering{Roman}
\tableofcontents
%============== 论文正文 =================
%\setcounter{tocdepth}{4}
%\setcounter{secnumdepth}{4}
\pagestyle{fancy}
\include{body/chapter1}
\include{body/chapter2}
\include{body/chapter3}
\include{body/chapter4}
\include{body/chapter5}
\include{body/chapter6}
\include{body/chapter7}
%============= 参考文献 =====================
\addcontentsline{toc}{section}{参考文献}
\nocite{*}
\bibliographystyle{gbt7714-2005} % 论文引用格式
\zihao{5}
\bibliography{bibfile}
\zihao{-4}
%============= 致谢 ======================
\include{body/acknowledge}
%============= 附录 ======================
%\include{body/appendices}
\end{document}
%%%%%%%%%% 结束 %%%%%%%%%%