Latex-基本

This is my blog.
Latex的功能还是很强大的
以后写论文也用得到
目前只会写文字
美化排版啥的
之后再补充咯


通过例子来说就是最好的
运行一下,你就可以找到这段是什么意思了

段落

1
2
3
4
5
6
7
8
9
10
% 目录
\tableofcontents
% 段落
\section{hello,world}China is in East Asia.%comment
\subsection{Hello Beijing}Beijing is the capital of China.
\subsubsection{Hello Dongcheng District}
\paragraph{Tian'anmen Square} is in the center of Beijing
\subparagraph{Chairman Mao} is in the center of Tian'anmen Square
\subsection{Hello Guangzhou}
\paragraph{Sun Yat-sen University}is the best university in Guangzhou.

表格

1
2
3
4
5
6
7
\begin{tabular}{ |l|r|c| }
\hline
aaaa & b & ab\\
\hline
c & ddddd & cd\\
\hline
\end{tabular}

图片

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
% 包
\usepackage{graphicx,subfig}
\usepackage{caption}
% 单张图片
\begin{figure}[!htbp]
\centering
\includegraphics[width = .8\textwidth]{1.jpg}
\caption{example of one image}\label{one-img}
\end{figure}
% 多张图片
\begin{figure}[!htbp]
\centering
\subfloat[first sub-image]{
\includegraphics[width = .45\textwidth]{1.jpg}
\label{sub1}
}
\qquad
\subfloat[first sub-image]{
\includegraphics[width = .45\textwidth]{2.jpg}
\label{sub2}
}
\caption{combined image}\label{img-together}
\end{figure}

数学公式

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
% 包
\usepackage{amsmath}
\usepackage{amssymb}
% 行内公式
The Newton's second law is $F = ma$.
% 块公式
The Newton's second law is $$F = ma$$.
Greek Letters $\eta$ and $\mu$
Fraction $\frac{a}{b}$
Power $a^b$
Subscript $a_b$
Derivate $\frac{\partial y}{\partial t}$
Vector $\vec{n}$
Bold $\mathbf{n}$
To time differential $\dot{F}$
Matrix (lcr here means left,center or right for each column)
\[
\left[
\begin{array}{lcr}
a1 & b22 &c333\\
d444 & e555555 & f6
\end{array}
\right]
\]
Equations(here \& is the symbol for aligning different rows)
\begin{align}
a+b&=c\\
d&=e+f+g
\end{align}
\[
\left\{
\begin{aligned}
&a+b=c\\
&d=e+f+g
\end{aligned}
\right.
\]

数模模版

自己下载包,网上很多教程的

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
% I am comment
\documentclass[tcn = 21185, problem B, titlepage = false] {mcmthesis}
% 抬头信息 队伍编号 题号
\usepackage{palatino}
\usepackage{lipsum}
\usepackage{mwe}
\usepackage{graphicx}
\usepackage{tabularx}
% 加载包 等价于C中的头文件
\title{Search for the Missing Plane}
\author{hcx}
\date{today}
%下面开始正文
\begin{document}
\begin{abstract} % 摘要,貌似是summary吧
% \indent首行缩进
\indent We devise a model to evaluate the performance of an ODR(Orbital Debris Removal) system\\
% \\换行
% \par换行,且下一段首行缩进两个字符
I am sunshine.\par
I am small sun.\\
\begin{keywords} % 关键词
search and resure; aircraft; bayes rules
\end{keywords} %前后对称
\end{abstract}
\maketitle % 打印控制页等
\tableofcontents\thispagestyle{empty} % 目录
%设置页眉
\newpage
\setcounter{page}{1}
%Section 1
\section{Introduction}
\subsection{Background}%subsection 1.1
%Section 2
\section{Assumptions}
{\bf (1) } The real change of indictors corresponds to policies.\\
{\bf (2) } Each indictor will not have abrupt and rapid changes.\\
% 插入图片
\centerline{\includegraphics[height=9cm]{神经网络.jpg}}
% 数学公式
$$\bf T_{i}=\frac{\sum_{j=1}^{J}w_jz_{j}}{\sum_{j=1}^{J}w_j}$$
% 表格
\begin{table}
\setlength{\abovecaptionskip}{0pt}
\setlength{\belowcaptionskip}{0pt}
\centering
% 表格信息
\centering{Table 1:City Smart Growth indicator system weight}
% 边框(列)
\begin{tabular}{p{0.4cm}|p{9cm}|p{1.5cm}|p{1.5cm}|p{1.7cm}}
% 边框(行)
\hline
% 一些格式
\bf I & {\bf Indictors} & \bf entropy & \bf availing value & \bf weight (\%) \\
\hline
\rowcolor[gray]{0.9} & Group of indictors for ecnomic development & & & 22.925 \\
\hline
1 & GDP( 100 million yuan) & 0.99001 & 0.00999 & 7.59925 \\
2 & per capita GDP(yuan/person) & 0.99044 & 0.00956 & 7.27817 \\
3 & growth rate of GDP(\%) & 0.99723 & 0.00277 & 2.11033 \\
&\bf SUM & & 0.1314 & 100 \\
\hline
\rowcolor[gray]{0.9} & Group of indictors for social development & & & 32.8844 \\
\hline
15 & population density(person/${km}^2$) & 0.99998 & 0.000021 & 0.01095 \\
& \bf SUM & & 0.188481 & 100 \\
\hline
\hline
\end{tabular}
\end{table}
% 引用
\section{References}
\begin{thebibliography}{99}
\bibitem{1}Bannerjee,S.Bone,J.and Finger,Y.(2016).European Digital City Index-Methodology Report.Nesta Report-ISBN Number:978-1-84875-153-8
\bibitem{2}\url{http://www.wolframalpha.com/input/?i=columbia,+sc}
\end{thebibliography}
%结束
\end{document}

后记

本来想贴R的代码的
后来发现删完了
也忘光了
其实当初只要是为了画图
后来发现pyhthon也可以呀
事实是,完全不会了
然后貌似也不会运行了
其实网站上都有
也没有什么特别的心得
就这样吧
最后
新年快乐

转载请注明出处,谢谢。

愿 我是你的小太阳


买糖果去喽