forked from Lucas-0/mini_THU_Latex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.tex
273 lines (210 loc) · 8.59 KB
/
template.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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
%!TEX program = xelatex
%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode
\documentclass[a4paper, 12pt, centering]{article}
% ===========================页面设置===============================================
\usepackage{geometry} %设置页边距的宏包
\geometry{left=2.5cm,right=2cm,top=2.5cm,bottom=2.5cm} %设置 上、左、下、右 页边距
\usepackage{graphicx} %插入图片的宏包
\usepackage{float} %设置图片浮动位置的宏包
\usepackage{subfigure} %插入多图时用子图显示的宏包
\usepackage[unicode]{hyperref} %超链接,支持unicode字符
\hypersetup{hidelinks} %隐藏超链接上的外框
\usepackage{xcolor}
\usepackage{indentfirst} %自动缩进
\usepackage{wallpaper} %background image
\addtolength{\wpYoffset}{8.0cm}
\usepackage{url}
\usepackage{fontspec,xltxtra,xunicode}
\defaultfontfeatures{Mapping=tex-text} %如果没有它,会有一些 tex 特殊字符无法正常使用,比如连字符
%文章内中文自动换行,可以自行调节
\XeTeXlinebreaklocale “zh”
\XeTeXlinebreakskip = 0pt plus 1pt minus 0.1pt
%%%% 下面的命令设置行间距与段落间距 %%%%
\linespread{1.4}
% \setlength{\parskip}{1ex}
\setlength{\parskip}{0.5\baselineskip}
% ===========================中文字体支持===============================================
% 字体需要根据自己电脑系统来设置
\usepackage[UTF8]{ctex}
% ===========================数学符号===============================================
\usepackage{amsmath,amssymb}
\usepackage{bm} % $\bm{letter}$ 数学式中粗斜体字母的最佳方案
\usepackage{calc}
\usepackage{units} %单位宏包
\usepackage{cite}
% ===========================字号===============================================
\newcommand{\chuhao}{\fontsize{42pt}{\baselineskip}\selectfont}
\newcommand{\xiaochuhao}{\fontsize{36pt}{\baselineskip}\selectfont}
\newcommand{\yihao}{\fontsize{28pt}{\baselineskip}\selectfont}
\newcommand{\erhao}{\fontsize{21pt}{\baselineskip}\selectfont}
\newcommand{\xiaoerhao}{\fontsize{18pt}{\baselineskip}\selectfont}
\newcommand{\sanhao}{\fontsize{15.75pt}{\baselineskip}\selectfont}
\newcommand{\sihao}{\fontsize{14pt}{\baselineskip}\selectfont}
\newcommand{\xiaosihao}{\fontsize{12pt}{\baselineskip}\selectfont}
\newcommand{\wuhao}{\fontsize{10.5pt}{\baselineskip}\selectfont}
\newcommand{\xiaowuhao}{\fontsize{9pt}{\baselineskip}\selectfont}
\newcommand{\liuhao}{\fontsize{7.875pt}{\baselineskip}\selectfont}
\newcommand{\qihao}{\fontsize{5.25pt}{\baselineskip}\selectfont}
% ===========================定义摘要、关键词、章节等命令===============================================
\makeatletter
\renewcommand\abstract{
\textbf{{摘要:}}
{\normalfont\xiaosihao}}
\makeatother
\newenvironment{enabstract}
\makeatletter
\renewcommand\enabstract{%
\textbf{Abstract: }
{\normalfont\xiaosihao}}
\makeatother
%%%% 设置 key words 属性 %%%%
\newenvironment{keys}
\makeatletter
\renewcommand\keys{%
\textbf{{关键词:}}
{\normalfont\xiaosihao}}
\makeatother
\newenvironment{enkeys}
\makeatletter
\renewcommand\enkeys{%
\textbf{Key words: }
{\normalfont\xiaosihao}}
\makeatother
%%%% 设置 section 属性 %%%%
\makeatletter
\renewcommand\section{\@startsection{section}{1}{\z@}%
{-1.5ex \@plus -.5ex \@minus -.2ex}%
{.5ex \@plus .1ex}%
{\normalfont\sihao\bf}}
\makeatother
%%%% 设置 subsection 属性 %%%%
\makeatletter
\renewcommand\subsection{\@startsection{subsection}{1}{\z@}%
{-1.25ex \@plus -.5ex \@minus -.2ex}%
{.4ex \@plus .1ex}%
{\normalfont\xiaosihao\bf}}
\makeatother
%%%% 设置 subsubsection 属性 %%%%
\makeatletter
\renewcommand\subsubsection{\@startsection{subsubsection}{1}{\z@}%
{-1ex \@plus -.5ex \@minus -.2ex}%
{.3ex \@plus .1ex}%
{\normalfont\xiaosihao}}
\makeatother
%%%% 段落首行缩进两个字 %%%%
\makeatletter
\let\@afterindentfalse\@afterindenttrue
\@afterindenttrue
\makeatother
\setlength{\parindent}{2em} %中文缩进两个汉字位
%%%% 定理类环境的定义 %%%%
\newtheorem{example}{例} % 整体编号
\newtheorem{algorithm}{算法}
\newtheorem{theorem}{定理}[section] % 按 section 编号
\newtheorem{definition}{定义}
\newtheorem{axiom}{公理}
\newtheorem{property}{性质}
\newtheorem{proposition}{命题}
\newtheorem{lemma}{引理}
\newtheorem{corollary}{推论}
\newtheorem{remark}{注解}
\newtheorem{condition}{条件}
\newtheorem{conclusion}{结论}
\newtheorem{assumption}{假设}
%%%% 重定义 %%%%
\renewcommand{\contentsname}{目录} % 将Contents改为目录
\renewcommand{\abstractname}{摘要} % 将Abstract改为摘要
\renewcommand{\refname}{参考文献} % 将References改为参考文献
\renewcommand{\indexname}{索引}
\renewcommand{\figurename}{图}
\renewcommand{\tablename}{表}
\renewcommand{\appendixname}{附录}
\renewcommand{\algorithm}{算法}
%%%% 定义标题格式,包括title,author,affiliation,email等 %%%%
\title{\yihao{这里是大标题啊}}
\author{\xiaoerhao{作者姓名}
\footnote{电子邮箱: *@mails.tsinghua.edu.cn,学号: ********}
\\[2ex]
\sanhao 百京带学\\[2ex]
}
\date{\sanhao\today}
% ===========================正正正正正正正==============================================
% ===========================文文文文文文文===============================================
% ===========================这这这这这这这===============================================
% ===========================里里里里里里里===============================================
% ===========================开开开开开开开===============================================
% ===========================始始始始始始始===============================================
% ===========================写写写写写写写===============================================
% ===========================哟哟哟哟哟哟哟===============================================
\begin{document}
%封面背景图片
%可以换其它自己想放的图片
\ThisCenterWallPaper{0.8}{thu.pdf}
%%%% 以下部分是正文 %%%%
%标题上方空出一些距离
\
\vspace{10cm}
\begingroup
\let\newpage\relax% Void the actions of \newpage
\maketitle
\endgroup
\thispagestyle{empty}
\newpage
%----------
%%% 摘要 %%%
\begin{abstract}
文
\end{abstract}
\begin{keys}
学;
\end{keys}
\begin{enabstract}
Here is English abstract. Here is English abstract. Here is English abstract. Here is English abstract. Here is English abstract. Here is English abstract. Here is English abstract. Here is English abstract. Here is English abstract. Here is English abstract. Here is English abstract. Here is English abstract. Here is English abstract. Here is English abstract. Here is English abstract. Here is English abstract. Here is English abstract. Here is English abstract. Here is English abstract. Here is English abstract.
\end{enabstract}
\begin{enkeys}
keyword1, keyword2, keyword3
\end{enkeys}
\thispagestyle{empty}
\newpage
%% 目录 %%%
\tableofcontents
\thispagestyle{empty}
\newpage
\setcounter{page}{1}
\section{第一节}
吴恩达1976年出生于伦敦\cite{cn1},父亲是一位香港医生,英文名叫Andrew Ng,吴恩达年轻时候在香港和新加坡度过\cite{en2}\cite{en3}。
\subsection{第一节第一小节}
1992年吴恩达就读新加坡莱佛士书院,并于1997年获得了卡内基梅隆大学的计算机科学学士学位。之后他在1998年获得了麻省理工学院的硕士学位,并于2002年获得了加州大学伯克利分校的博士学位,并从这年开始在斯坦福大学工作。他(2002年)住在加利福尼亚州的帕洛阿尔托。
文献叙述了\cite{en1}。
% \subsection{图片}
% 图\ref{Fig.main}如下所示:
% \begin{figure}[H] %H为当前位置,!htb为忽略美学标准,htbp为浮动图形
% \centering %图片居中
% \includegraphics[width=0.8\textwidth]{example1.jpeg} %插入图片,[]中设置图片大小,{}中是图片文件名
% \caption{Main name} %最终文档中希望显示的图片标题
% \label{Fig.main} %用于文内引用的标签
% \end{figure}
表\ref{tab.main}如下所示:
\begin{table}[H]
\centering
\caption{Test Caption.}
\begin{tabular}{|c|c|c|}
\hline
\multicolumn{3}{|c|}{学生信息}\\
\hline
姓名& 学号& 性别\\
\hline
Ch'en Meng& 001& Male\\
Sarah Brightman& 002& Female\\
\hline
\end{tabular}
\label{tab.main}
\end{table}
\bibliographystyle{IEEEtran}
\bibliography{reference}
% \begin{thebibliography}{1}
% \bibitem{1} Wray J, Green G G R. Neural networks, approximation theory, and finite precision computation[J]. Neural networks, 1995, 8(1): 31-37.
% \bibitem{2} Ham F M, Kostanic I. Principles of neurocomputing for science and engineering[M]. McGraw-Hill Higher Education, 2000.
% \end{thebibliography}
\end{document}