为什么用Latex
使用latex 的原因主要有以下几点:
1、数学建模/写论文 比word好看非常多
2、熟悉latex公式后,打markdown的公式属于降维打击。
环境
本文使用texlive和vscode搭配使用latex。
使用效果非常舒适。
配置环境的参考链接:
1、texlive
2、vscode配置latex
手册篇
希腊字母表
累乘\prod_{i=0}^n
∏
i
=
0
n
\prod_{i=0}^n
i=0∏n
累加\sum_{i=0}^n
∑
i
=
0
n
\sum_{i=0}^n
i=0∑n
公式
一般结构
$$ $$ 换行
$ $不换行
带编号
\begin{equation}
\end{equation}
不带编号
\begin{equation*}
\end{equation*}
下标换行
{\substack{aaaaaa\\b}}
公式换行
\begin{equation}\label{asda}
\begin{split}
\\
\end{split}
\end{equation}
有的直接\\也可以
换行和空格
\par 换行 \quad 空格
矩阵
\begin{bmatrix}
M_0\\
M_1\\
\vdots\\
M_n\\
\end{bmatrix}
三种省略号
\ddots 斜着
\vdots 竖着
\rdots 横着
[ M 0 M 1 ⋮ M n ] \begin{bmatrix} M_0\\ M_1\\ \vdots\\ M_n\\ \end{bmatrix} ⎣⎢⎢⎢⎡M0M1⋮Mn⎦⎥⎥⎥⎤
图片
(1) 插入
\begin{figure}[H]
\centering
\includegraphics[width=.6\textwidth]{1.jpg}
\caption{名}\label{索引}
\end{figure}
(2)图并排
\begin{figure}[H]
\centering
\begin{minipage}[t]{0.48\textwidth}
\centering
\includegraphics[width=.99\textwidth]{r.png}
\caption{a名字}
\end{minipage}
\begin{minipage}[t]{0.48\textwidth}
\centering
\includegraphics[width=.99\textwidth]{c.png}
\caption{b名字}
\end{minipage}
\end{figure}
(3) 注意事项
这里后边[H]是表示图片紧跟文字之后,需要在开头\usepackage{float}
,如此一来改变了图片自适应布局(读者可自行试一下不改,即为[!htbp],相当难受)。
表
\begin{table}[!htbp]
\caption{名}\label{索引} \centering
\begin{tabular}{c|cccc}
\toprule[1.5pt]
方法 & 二分法&牛顿法&割线法&错位法 \\
\midrule[1pt]
迭代次数 & 14& & & \\
零点 & 0.2592 & 0.2592& 0.2592& 0.2592\\
误差&$10^{-4}$&$10^{-4}$&$10^{-4}$&$10^{-4}$\\
\bottomrule[1.5pt]
\end{tabular}
\end{table}