【latex】输入公式与编号

利用equation,align,split 等工具来书写排布公式并编号。

1.行内公式符号

在行内书写数学符号,需要用$符号$来撰写,例如这是一个行内的符号 x x x;
latex中这一符号同时可以利用\( ... \)来代替。

2.行间独立公式

独立的公式有编号和不编号的两种形式,其中不编号的公式直接利用$$...$$符号来书写,例如输出$$z_1 = x + y$$就会得到下式:
【latex】输入公式与编号_第1张图片
latex中这一符号可以利用\[\]来代替。


如果需要编号,则需要利用\begin{equation} ... \end{equation}来处理,例如输入下面的代码就能得到下式:

\begin{equation}  
	z_2 = x + y 
\end{equation}

\begin{equation}  
	z_3 = x + y 
\end{equation}

【latex】输入公式与编号_第2张图片


此外可以使用手动编号$$ ... \eqno num $$,分别是左右侧编号:

$$ 1 + 1 = 2 \eqno [1] $$
$$ 1 + 1 = 2 \leqno [1] $$

【latex】输入公式与编号_第3张图片

3.多行组合公式

第一种方式使用\begin{align} ... \end{align}方法来处理, 同时需要包\usepackage{amsmath},利用\\换行,&对其等号;但是会各行独立编号:

\begin{align}
	z_4 &= x + y \\
	z_5 &= x + y
\end{align}

此外使用\begin{align} ... \end{align}也有类似效果。

\begin{gather}
	z_4 = x + y \\
 	z_5 = x + y
\end{gather}

【latex】输入公式与编号_第4张图片
如果希望将上述公式统一为一个公式块,则需要利用 \begin{equation}\begin{split} ... \end{split}\end{equation},同时需要包\usepackage{amsmath}

\begin{equation}
	\begin{split}
		z_3 &= x + y \\
		z_4 &= x + y
	\end{split}
\end{equation}

【latex】输入公式与编号_第5张图片


ref:
https://blog.csdn.net/GarfieldEr007/article/details/51584396
https://blog.csdn.net/chen134225/article/details/78985537
https://www.cnblogs.com/bekitty/p/3523591.html
details:https://www.jianshu.com/p/05987743d27c
Zhihu: https://www.zhihu.com/question/31298277
mkdown: https://www.zybuluo.com/codeep/note/163962
https://www.jianshu.com/p/d9a5a1c694b4
latex: https://en.wikibooks.org/wiki/LaTeX/Mathematics
blog.sina.com.cn/s/articlelist_1578561911_0_1.html
https://www.latexstudio.net/archives/51802.html
https://tex.stackexchange.com
online:
https://www.tutorialspoint.com/online_latex_editor.php
https://private.codecogs.com/latex/eqneditor.php
https://www.tutorialspoint.com/codingground.htm
其他公式工具`split`,`array`,`multiline`,`align`,`aligned`


pic from peels.com

你可能感兴趣的:(编码,Papers,编程,latex,公式,编号,Latex,Tex)