Latex数学用法总结

一、数学公式

1.1 行内公式

直接使用$包围想输入的公式,如$y=x+1$

1.2 行间公式

方法一
使用equation块包围具体的公式,可以先在mathtype上打,然后复制粘贴到latex公式中。如下所示:

\begin{equation}\label{*}
	*
\end{equation}

方法二
用两个$$包围行间公式,如果使用这种方法,编号需要手动添加

1.3 常用的希腊字符

输入符号输入符号
A and \alphaA AA and α \alphaαN and \nuN NN and ν \nuν
B and \betaB BB and β \betaβ\Xi and \xiΞ \XiΞ and ξ \xiξ
\Gamma and \gammaΓ \GammaΓ and γ \gammaγO and oO OO and o oo
\Delta and \deltaΔ \DeltaΔ and δ \deltaδ\Pi, \pi and \varpiΠ \PiΠ, π \piπ and ϖ \varpiϖ
E, \epsilon and \varepsilonE EE, ϵ \epsilonϵ and ε \varepsilonεP, \rho and \varrhoP PP, ρ \rhoρ and ϱ \varrhoϱ
Z and \zetaZ ZZ and ζ \zetaζ\Sigma, \sigma and \varsigmaΣ \SigmaΣ, σ \sigmaσ and ς \varsigmaς
H and \etaH HH and η \etaηT and \tauT TT and τ \tauτ
\Theta, \theta and \varthetaΘ \ThetaΘ, θ \thetaθ and ϑ \varthetaϑ\Upsilon and \upsilonΥ \UpsilonΥ and υ \upsilonυ
I and \iotaI II and ι \iotaι\Phi, \phi and \varphiΦ \PhiΦ, ϕ \phiϕ and φ \varphiφ
K, \kappa and \varkappaK KK, κ \kappaκ and ϰ \varkappaϰX and \chiX XX and χ \chiχ
\Lambda and \lambdaΛ \LambdaΛ and λ \lambdaλ\Psi and \psiΨ \PsiΨ and ψ \psiψ
M and \muM MM and μ \muμ\Omega and \omegaΩ \OmegaΩ and ω \omegaω

说明:

  • 如果需要大写的希腊字母,将首字母大写即可
  • 如果需要将字母斜体显示,使用\var前缀即可

1.4 运算符表

普通字符

输入符号输入符号
\空格空格\$$
\%% \%%\&& \&&
\__ \__\{{ \{{
\}} \}}

关系运算符

输入符号输入符号
\pm± \pm±\times× \times×
\div÷ \div÷\mid∣ \mid
\nmid∤ \nmid\cdot⋅ \cdot
\circ∘ \circ\ast∗ \ast
\bigodot⨀ \bigodot\bigotimes⨂ \bigotimes
\bigoplus⨁ \bigoplus\leq≤ \leq
\geq≥ \geq\neq≠ \neq=
\approx≈ \approx\equiv≡ \equiv
\sum∑ \sum\prod∏ \prod

集合运算符

输入符号输入符号
\emptyset∅ \emptyset\in∈ \in
\notin∉ \notin/\subset⊂ \subset
\supset⊃ \supset\subseteq⊆ \subseteq
\supseteq⊇ \supseteq\bigcap⋂ \bigcap
\bigcup⋃ \bigcup\bigvee⋁ \bigvee
\bigwedge⋀ \bigwedge\biguplus⨄ \biguplus
\bigsqcup⨆ \bigsqcup

对数运算符

输入符号输入符号
\loglog\lgLg
\lnLn

三角运算符

输入符号输入符号
\bot⊥ \bot\angle∠ \angle
30^\circ3 0 ∘ 30^\circ30\sinsin ⁡ \sinsin
\coscos ⁡ \coscos\tantan ⁡ \tantan
\cotcot ⁡ \cotcot\secsec ⁡ \secsec
\csccsc ⁡ \csccsc

逻辑运算符

输入符号输入符号
\because∵ \because\therefore∴ \therefore
\forall∀ \forall\exists∃ \exists
\not=≠ \not==\not>≯ \not>>
\not<≮ \not<<\not\subset⊄ \not\subset

微积分运算符

输入符号输入符号
\prime′ \prime\int∫ \int
\iint∬ \iint\iiint∭ \iiint
\oint∮ \oint\limlim ⁡ \limlim
\infty∞ \infty\nabla∇ \nabla

1.5 其他符号

箭头符号

输入符号输入符号
\uparrow↑ \uparrow\Uparrow⇑ \Uparrow
\downarrow↓ \downarrow\Downarrow⇓ \Downarrow
\rightarrow→ \rightarrow\Rightarrow⇒ \Rightarrow
\leftarrow← \leftarrow\Leftarrow⇐ \Leftarrow
\longrightarrow⟶ \longrightarrow\Longrightarrow⟹ \Longrightarrow
\longleftarrow⟵ \longleftarrow\Longleftarrow⟸ \Longleftarrow

带帽和连线符号

输入符号输入符号
\hat{y}y ^ \hat{y}y^\check{y}y ˇ \check{y}yˇ
\breve{y}y ˘ \breve{y}y˘\overline{a+b+c+d}a + b + c + d ‾ \overline{a+b+c+d}a+b+c+d
\underline{a+b+c+d}a + b + c + d ‾ \underline{a+b+c+d}a+b+c+d\overbrace{a+\underbrace{b+c}_{1.0}+d}^{2.0}a + b + c ⏟ 1.0 + d ⏞ 2.0 \overbrace{a+\underbrace{b+c}_{1.0}+d}^{2.0}a+1.0b+c+d2.0

二、LaTex技巧

2.1 对齐和缩进

一行文本对齐

\leftline{左对齐}
\centerline{居中}
\rightline{右对齐}

多行文本或段落对齐

  • 左对齐
\begin{flushleft}
	...
\end{flushleft}
  • 居中
\begin{center}
	...
\end{center}
  • 右对齐
\begin{flushright}
	...
\end{flushright}

公式对齐

  • 默认居中对齐,改成左对齐如下所示:
\documentclass[a4paper,fleqn]{article}
  • 对某行公式进行左对齐
\begin{flalign}  
your equation (1)  
\end{flalign}
  • 对某几行公式进行左对齐
\begin{flalign}  
\begin{split}  
your equation (1)  
your equation (2)  
\end{split}
\end{flalign}
  • 其他方法
    使用aligned、gathered等

2.2 大括号的使用

方法一:

$$ f(x)=\left\{
\begin{aligned}
x & = & \cos(t) \\ 
y & = & \sin(t) \\
z & = & \frac xy
\end{aligned}
\right.
$$

f ( x ) = { x = cos ⁡ ( t ) y = sin ⁡ ( t ) z = x y f(x)=\left\{ \begin{aligned} x & = & \cos(t) \\ y & = & \sin(t) \\ z & = & \frac xy \end{aligned} \right.f(x)=xyz===cos(t)sin(t)yx
方法二:

$$ F^{HLLC}=\left\{
\begin{array}{rcl}
F_L          &          & {0 < S_L}\\
F^*_L       &          & {S_L \leq 0 < S_M}\\
F^*_R      &          & {S_M \leq 0 < S_R}\\
F_R         &          & {S_R \leq 0}
\end{array}
\right.
$$

F H L L C = { F L 0 < S L F L ∗ S L ≤ 0 < S M F R ∗ S M ≤ 0 < S R F R S R ≤ 0 F^{HLLC}=\left\{ \begin{array}{rcl} F_L & & {0 < S_L}\\ F^*_L & & {S_L \leq 0 < S_M}\\ F^*_R & & {S_M \leq 0 < S_R}\\ F_R & & {S_R \leq 0} \end{array} \right.FHLLC=FLFLFRFR0<SLSL0<SMSM0<SRSR0
方法三:

\begin{cases}
0&    \text{x=0}\\
1&    \text{x=1}
\end{cases}

f ( x ) = { 0 x=0 1 x=1 f(x)= \begin{cases} 0& \text{x=0}\\ 1& \text{x=1} \end{cases}f(x)={01x=0x=1

三、矩阵

3.1 基本语法

  • 起始标记\begin{matrix},结束标记\end{matrix}
  • 每行末尾以\\进行换行,行间元素以&分开进行对齐
  • 例子
\begin{matrix}
1&0&0\\
0&1&0\\
0&0&1\\
\end{matrix}

1 0 0 0 1 0 0 0 1 \begin{matrix} 1&0&0\\ 0&1&0\\ 0&0&1\\ \end{matrix}100010001

3.2 进阶知识

  • 设置矩阵边框
    pmatrix、bmatrix、Bmatrix:小括号、中括号、大括号边框
  • 省略元素
    横省略号:\cdots
    竖省略号:\vdots
    斜省略号:\ddots
  • 例子
\begin{bmatrix}
{a_{11}}&{a_{12}}&{\cdots}&{a_{1n}}\\
{a_{21}}&{a_{22}}&{\cdots}&{a_{2n}}\\
{\vdots}&{\vdots}&{\ddots}&{\vdots}\\
{a_{m1}}&{a_{m2}}&{\cdots}&{a_{mn}}\\
\end{bmatrix}

[ a 11 a 12 ⋯ a 1 n a 21 a 22 ⋯ a 2 n ⋮ ⋮ ⋱ ⋮ a m 1 a m 2 ⋯ a m n ] \begin{bmatrix} {a_{11}}&{a_{12}}&{\cdots}&{a_{1n}}\\ {a_{21}}&{a_{22}}&{\cdots}&{a_{2n}}\\ {\vdots}&{\vdots}&{\ddots}&{\vdots}\\ {a_{m1}}&{a_{m2}}&{\cdots}&{a_{mn}}\\ \end{bmatrix}a11a21am1a12a22am2a1na2namn

四、补充内容

  • 上标^,下标_
  • 空格:
    单个空格:a\ b a   b a\ ba b
    四个空格:a\quad b a b a\quad bab
  • 尖括号:\langle\rangle⟨ ⟩ \langle\rangle
  • 使用\left\right
    (\frac{x}{y})( x y ) (\frac{x}{y})(yx)
    \left(\frac{x}{y}\right)( x y ) \left(\frac{x}{y}\right)(yx)
  • 省略号
    \ldots:与文本底线对齐的省略号
    \cdots:与文本中线对齐的省略号
    例如:
    f(x_1,x_2,\ldots,x_n) = x_1^2 + x_2^2 + \cdots + x_n^2
    f ( x 1 , x 2 , … , x n ) = x 1 2 + x 2 2 + ⋯ + x n 2 f(x_1,x_2,\ldots,x_n) = x_1^2 + x_2^2 + \cdots + x_n^2f(x1,x2,,xn)=x12+x22++xn2
  • 分组
    使用{}将分组内容包包围,例如:
    2^102 1 0 2^102102^{10}2 10 2^{10}210
  • 开根号
    \sqrt[n]{3}3 n \sqrt[n]{3}n3
  • 分式
    \frac{1}{5}1 5 \frac{1}{5}51
    1 \over 51 5 1 \over 551

版权声明:本文为qq_45448654原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。