latex公式

字体变体

正体$\rm{A}$

花体$\mathcal{A} \cal{A}$

黑板粗体 $\mathbb{A} \Bbb{A}$

粗体$\bf{A} \mathbf{A}$

数学斜体$\mit{A}$

斜体加粗(表示矢量)$\boldsymbol{A} \bm{A}$

手写体$\scr{A}$ $\mathscr{A}$

显示直立文本: $\textup{文本}$​

意大利斜体: $\textit{文本}$

显示小体大写文本: $\textsc{文本}$

中等权重: $\textmd{文本}$

加粗命令: $\textbf{文本}$

默认值: $\textnormal{文本}$

斜体字:$\textit{italic}$

细体字:$\textlf{light font}$

使用等宽字体:$\texttt{code}$

使用无衬线字体:$\textsf{sans-serif}$

所有字母大写:$\uppercase{CAPITALS}$​

所有字母大写,但小写字母比较小:$\textsc{Small Capitals}$

更改字体颜色

使用 \color{颜色}{文字} 来更改特定的文字颜色。

输入显示输入显示
black t e x t \color{black}{text} textgrey t e x t \color{grey}{text} text
silver t e x t \color{silver}{text} textwhite t e x t \color{white}{text} text
maroon t e x t \color{maroon}{text} textred t e x t \color{red}{text} text
yellow t e x t \color{yellow}{text} textlime t e x t \color{lime}{text} text
olive t e x t \color{olive}{text} textgreen t e x t \color{green}{text} text
teal t e x t \color{teal}{text} textauqa t e x t \color{auqa}{text} text
blue t e x t \color{blue}{text} textnavy t e x t \color{navy}{text} text
purple t e x t \color{purple}{text} textfuchsia t e x t \color{fuchsia}{text} text

输入 \color {#rgb} {text} 来自定义更多的颜色,其中 #rgbr g b 可输入 0-9a-f 来表示红色、绿色和蓝色的纯度(饱和度)。

删除线

\sout{text}  %横划线
\cancel{text}	% 对角删除线	
\bcancel{text}	% 反斜线	
\xcancel{text}	% 叉删除线

t e x t t e x t t e x t t e x t \sout{text}\\ \cancel{text}\\ \bcancel{text}\\ \xcancel{text}\\ texttext text text

箭头

→ d o w n 你 好 \xrightarrow[down]{你好} down $\xrightarrow[down]{你好}$

你 好 → \underrightarrow{你好} $\underrightarrow{你好}$

⇒ n i h a o \stackrel{nihao}{\Rightarrow} nihao $\stackrel{nihao}{\Rightarrow}$

⟹ 定 义 \overset{定义}{\Longrightarrow} $\overset{定义}{\Longrightarrow}$

请添加图片描述

字符含义
\uparrow
\downarrow
\Uparrow
\Downarrow
\updownarrow
\Updownarrow
\rightarrow
\leftarrow
\Rightarrow
\Leftarrow
\leftrightarrow
\Leftrightarrow
\longrightarrow
\longleftarrow
\Longrightarrow
\Longleftarrow
\mapsto
\longmapsto
\hookleftarrow
\hookrightarrow
\leftharpoonup
\rightharpoonup
\leftharpoondown
\rightharpoondown
\rightleftharpoons
\leadsto
\nearrow
\searrow
\swarrow
\nwarrow
\nleftarrow
\nrightarrow
\nLeftarrow
\nRightarrow
\nleftrightarrow
\nLeftrightarrow
\dashrightarrow
\dashleftarrow
\leftleftarrows
\leftrightarrows
\Lleftarrow
\twoheadleftarrow
\leftarrowtail
\looparrowleft
\leftrightharpoons
\curvearrowleft
\circlearrowleft
\Lsh
\upharpoonleft
\downharpoonleft
\upuparrows
\multimap
\leftrightsquigarrow
\rightrightarrows
\rightleftarrows
\twoheadrightarrow
\rightarrowtail
\looparrowright
\rightleftharpoons
\curvearrowright
\circlearrowright
\Rsh
\downdownarrows
\upharpoonright
\downharpoonright
\rightsquigarrow

划线箭头

否定就是’not’。在箭头上就更简单,直接关键词前面加’n’就可以了。不过这种用法只对左、右箭头有效。上下箭头表示否定可以直接在前面加\not

常用箭头的简写

右箭头 → \to 左箭头 ← \gets 右大箭头(推出)    ⟹    \implies 左右大箭头(等价)    ⟺    \iff (if and only if)

非正向箭头

非正向箭头的命名按照标准的地图方向来命名的。比如左上就是西北,简写nw;右上就是东北,简写ne。那么把这些词加在小箭头前面,就变成了非正向的四个方向的箭头:

↙ ↗ ↖ ↘ \swarrow\nearrow\nwarrow\searrow

半箭头-harpoon

harpoon是鱼叉的意思,它的规则是“朝向”+“harpoon”+“鱼叉勾的方向”三个词组合在一起。

⇀ ⇁ \rightharpoonup\rightharpoondown

↿ ↾ \upharpoonleft\upharpoonright

公式排布

公式编号与对齐

给公式加编号:

y=kx+b
\tag{2}

y = k x + b (2) y=kx+b \tag{2} y=kx+b(2)

公式对齐(无编号):

\begin{aligned}
a&=b\\
c&=d
\end{aligned}

a = b c = d \begin{aligned} a&=b\\ c&=d \end{aligned} ac=b=d
公式对齐加编号:

\begin{align}
a&=b\\
c&=d
\end{align}

每一行&号的地方对齐。

占位符

  1. 两个quad空格,符号:\qquad,如: x y x \qquad y xy
  2. quad空格,符号:\quad,如: x y x \quad y xy
  3. 大空格,符号\ ,如: x   y x \ y x y
  4. 中空格,符号\:,如: x   y x \: y xy
  5. 小空格,符号\,,如: x   y x\,y xy
  6. 紧贴,符号\!,如: x  ⁣ y x \! y xy

定界符与组合

  1. 括号,符号:()\big(\big) \Big(\Big) \bigg(\bigg) \Bigg(\Bigg),如: ( ) ( ) ( ) ( ) ( ) ()\big(\big) \Big(\Big) \bigg(\bigg) \Bigg(\Bigg) ()()()()
  2. 中括号,符号:[],如: [ x + y ] [x+y] [x+y]
  3. 大括号,符号:\{ \},如: { x + y } \{x+y\} {x+y}
  4. 自适应括号,符号:\left \right,如: ( x ) \left(x\right) (x) ( x y z ) \left(x{yz}\right) (xyz)
  5. 组合公式,符号:{上位公式 \choose 下位公式},如: ( n + 1 k ) = ( n k ) + ( n k − 1 ) {n+1 \choose k}={n \choose k}+{n \choose k-1} (kn+1)=(kn)+(k1n)
  6. 组合公式,符号:{上位公式 \atop 下位公式},如: ∑ k 0 , k 1 , … > 0 k 0 + k 1 + ⋯ = n A k 0 A k 1 ⋯ \sum_{k_0,k_1,\ldots>0 \atop k_0+k_1+\cdots=n}A_{k_0}A_{k_1}\cdots k0+k1+=nk0,k1,>0Ak0Ak1

数学符号

集合运算

  1. 属于运算,符号:\in,如: x ∈ y x \in y xy x ∋ y x \ni y xy
  2. 不属于运算,符号:\notin,如: x ∉ y x \notin y x/y x ∌ y x \not\ni y xy
  3. 不属于运算,符号:\not\in,如: x ∉ y x \not\in y xy
  4. 子集运算,符号:\subset,如: x ⊂ y x \subset y xy
  5. 子集运算,符号:\supset,如: x ⊃ y x \supset y xy
  6. 真子集运算,符号:\subseteq,如: x ⊆ y x \subseteq y xy
  7. 非真子集运算,符号:\subsetneq,如: x ⊊ y x \subsetneq y xy
  8. 真子集运算,符号:\supseteq,如: x ⊇ y x \supseteq y xy
  9. 非真子集运算,符号:\supsetneq,如: x ⊋ y x \supsetneq y xy
  10. 非子集运算,符号:\not\subset,如: x ⊄ y x \not\subset y xy
  11. 非子集运算,符号:\not\supset,如: x ⊅ y x \not\supset y xy
  12. 并集运算,符号:\cup,如: x ∪ y x \cup y xy
  13. 交集运算,符号:\cap,如: x ∩ y x \cap y xy
  14. 差集运算,符号:\setminus,如: x ∖ y x \setminus y xy
  15. 同或运算,符号:\bigodot,如: x ⨀ y x \bigodot y xy
  16. 同与运算,符号:\bigotimes,如: x ⨂ y x \bigotimes y xy
  17. 实数集合,符号:\mathbb{R},如: R \mathbb{R} R
  18. 自然数集合,符号:\mathbb{Z},如: Z \mathbb{Z} Z
  19. 空集,符号:\emptyset \varnothing,如: ∅ ∅ \emptyset \varnothing

关系符号

  • 任意 存在\forall \exists ∀   ∃ \forall\ \exists  
  • 因为所以 \because \therefore ∵ ∴ \because \quad \therefore
  • 合取\wedge ∧ \wedge
  • 析取\vee ∨ \vee
  • 约等于:\approx ≈ \approx
  • 比较符号: \ge \le ≥ ≤ \ge \le \geqq\leqq ≧ ≦ \geqq\leqq \geqslant\leqslant ⩾ ⩽ \geqslant\leqslant \equiv ≡ \equiv \prec\ \preceq \ \succ\ \succeq ≺   ⪯   ≻   ⪰ \prec\ \preceq \ \succ\ \succeq    
  • 二元关系: 相似\sim ∼ \sim 等价\simeq ≃ \simeq

顶底标

  1. 符号\hat{a}\widehat{A},如: a ^ A ^ \hat{a}\widehat{A} a^A
  2. 符号\check{a},如: a ˇ \check{a} aˇ
  3. 符号\breve{a},如: a ˘ \breve{a} a˘
  4. 符号\tilde{a}\widetilde,如: a ~ A ~ \tilde{a}\widetilde{A} a~A
  5. 符号\bar{a}\overline{A}\underline{A},如: a ˉ A ‾ A ‾ \bar{a}\overline{A}\underline{A} aˉAA
  6. 矢量符号,符号\vec{a}\overleftarrow{A}\overrightarrow{A},如: a ⃗ A ← A → \vec{a}\overleftarrow{A}\overrightarrow{A} a A A
  7. 上下括号, A ⏞ A ⏟ \overbrace{A}\underbrace{A} A A
  8. 上下小字 b a b a \overset{a}{b}\underset{a}{b} baab
  9. 数学符号,符号\acute{a},如: a ˊ \acute{a} aˊ
  10. 数学符号,符号\grave{a},如: a ˋ \grave{a} aˋ
  11. 数学符号,符号\mathring{a},如: a ˚ \mathring{a} a˚
  12. 一阶导数符号,符号\dot{a},如: a ˙ \dot{a} a˙
  13. 二阶导数符号,符号\ddot{a},如: a ¨ \ddot{a} a¨

微积分

  1. 极限:\lim\limits_{t\to0} lim ⁡ t → 0 \lim\limits_{t\to0} t0lim
  2. 下限: \inf\limits_{t\to0} inf ⁡ t → 0 \inf\limits_{t\to0} t0inf
  3. 偏导数\partial ∂ \partial
  4. 无穷,符号:\infty,如: ∞ \infty

数学式中的省略号

描述latex
水平位置与减号等高\cdots ⋯ \cdots
对角省略号,多用于矩\ddots ⋱ \ddots
水平位置与基线平齐\ldots … \ldots
垂直省略号\vdots ⋮ \vdots

连分式

x = a 0 + 1 2 a 1 + 2 2 a 2 + 3 2 a 3 + 4 4 a 4 + ⋯ x = a_0 + \cfrac{1^2}{a_1 + \cfrac{2^2}{a_2 + \cfrac{3^2}{a_3 + \cfrac{4^4}{a_4 + \cdots}}}} x=a0+a1+a2+a3+a4+44322212

希腊字母表

字母名称大写markdown小写markdown
alphaAAα\alpha
betaBBβ\beta
gammaΓ\Gammaγ\gamma
deltaΔ\Deltaδ\delta
epsilonEEϵ\epsilon
ε\varepsilon
zetaZZζ\zeta
etaEEη\eta
thetaΘ\Thetaθ\theta
iotaIIι\iota
kappaKKκ\kappa
lambdaΛ\Lambdaλ\lambda
MuMMμ\mu
nuNNν\nu
xiΞ\Xiξ\xi
omicronOOο\omicron
piΠ\Piπ\omicron
rhoPPρ\rho
sigmaΣ\Sigmaσ\sigma
tauTTτ\tau
upsilonΥ\Upsilonυ\upsilon
phiΦ\Phiϕ\phi
φ\varphi
chiXXχ\chi
psiΨ\Psiψ\psi

其他

  • 虚数,符号:\imath,如: ı \imath ı
  • 虚数,符号:\jmath,如: ȷ \jmath ȷ
  • 垂直: \perp \bot ⊥ \perp ⊥ \bot
  • 连乘号\prod ∏ \prod
  • 角度\angle ∠ \angle
  • 等号上下写东西\xlongequal[down]{up} = d o w n u p \xlongequal[down]{up} up down
  • 三角等号\triangleq ≜ \triangleq
  • 加减号\pm \mp ± ∓ \pm \mp ±

数组与表格使用参考

数组和表格均以 begin{array} 开头,并在其后定义列数及每一列的文本对齐属性,c l r 分别代表居中、左对齐及右对齐。若需要插入垂直分割线,在定义式中插入 | ,若要插入水平分割线,在下一行输入前插入 \hline 。与矩阵相似,每行元素间均须要插入 & ,每行元素以 \\ 结尾,最后以 end{array} 结束数组。
使用单个数组或表格时无需声明 $$$ 符号。

矩阵

无框矩阵

\begin{matrix}
1&x\\
1&y
\end{matrix}

1 x 1 y \begin{matrix} 1&x\\ 1&y \end{matrix} 11xy

边框矩阵

\begin{pmatrix}
1&x\\
1&y
\end{pmatrix}

( 1 x 1 y ) \begin{pmatrix}1&x\\1&y\end{pmatrix} (11xy)

\begin{bmatrix}
1&x\\
1&y
\end{bmatrix}

[ 1 x 1 y ] \begin{bmatrix}1&x\\1&y\end{bmatrix} [11xy]

\begin{Bmatrix}
1&x\\
1&y
\end{Bmatrix}

{ 1 x 1 y } \begin{Bmatrix}1&x\\1&y\end{Bmatrix} {11xy}

\begin{vmatrix}
1&x\\
1&y
\end{vmatrix}

∣ 1 x 1 y ∣ \begin{vmatrix}1&x\\1&y\end{vmatrix} 11xy

\begin{Vmatrix}
1&x\\
1&y
\end{Vmatrix}

∥ 1 x 1 y ∥ \begin{Vmatrix}1&x\\1&y\end{Vmatrix} 11xy

带分隔符号的矩阵

\left[
	\begin{array}{cc|c}
	1&2&3\\4&5&6
	\end{array}
\right]
\left[
	\begin{array}{c}
	1&2&3 \\
	\hline
	4&5&6
	\end{array}
\right]
\left[
	\begin{array}{cc:c}
	1&2&3\\4&5&6
	\end{array}
\right]

[ 1 2 3 4 5 6 ] [ 1 2 3 4 5 6 ] [ 1 2 3 4 5 6 ] \left[ \begin{array}{cc|c} 1&2&3\\4&5&6 \end{array} \right] \left[ \begin{array}{c} 1&2&3 \\ \hline 4&5&6 \end{array} \right] \left[ \begin{array}{cc:c} 1&2&3\\4&5&6 \end{array} \right] [142536][142536][142536]
其中 cc|c 代表在一个三列矩阵中的第二和第三列之间插入分割线。将|换成: cc:c表示第二列和第三列之间插入虚线。

行中矩阵

这是一个行中矩阵的示例

\bigl( \begin{smallmatrix} a & b \\ c & d \end{smallmatrix}\bigr)

如何使条件表达式适配行高

在一些情况下,条件表达式中某些行的行高为非标准高度,此时使用 \\[2ex] 语句代替该行末尾的 \\ 来让编辑器适配。

f(n) = 
\begin{cases}
\frac{n}{2},  & \text{if $n$ is even} \\
3n+1, & \text{if $n$ is odd}
\end{cases}

f ( n ) = { n 2 , if  n  is even 3 n + 1 , if  n  is odd f(n) = \begin{cases} \frac{n}{2}, & \text{if $n$ is even} \\ 3n+1, & \text{if $n$ is odd} \end{cases} f(n)={2n,3n+1,if n is evenif n is odd

f(n) = 
\begin{cases}
\frac{n}{2},  & \text{if $n$ is even} \\[2ex]
3n+1, & \text{if $n$ is odd}
\end{cases}

f ( n ) = { n 2 , if  n  is even 3 n + 1 , if  n  is odd f(n) = \begin{cases} \frac{n}{2}, & \text{if $n$ is even} \\[2ex] 3n+1, & \text{if $n$ is odd} \end{cases} f(n)=2n,3n+1,if n is evenif n is odd
一个 [ex] 指一个 “X-Height”,即x字母高度。可以根据情况指定多个 [ex],如 [3ex][4ex] 等。
其实可以在任何地方使用 \\[2ex] 语句,只要你觉得合适。

交换图表使用

使用一行 $ \require{AMScd} $ 语句来允许交换图表的显示。
声明交换图表后,语法与矩阵相似,在开头使用 begin{CD},在结尾使用 end{CD},在中间插入图表元素,每个元素之间插入 & ,并在每行结尾处使用 \\

\begin{CD}
    A @>a>> B\\
    @V b V V\# @VV c V\\
    C @>>d> D
\end{CD}

其中,@>>> 代表右箭头、@<<< 代表左箭头、@VVV 代表下箭头、@AAA 代表上箭头、@= 代表水平双实线、@| 代表竖直双实线、@.代表没有箭头。
@>>>>>> 之间任意插入文字即代表该箭头的注释文字。

文件内链接转移

跳转目的地处加上:<a id="id">内容</a> 目的地

链接:[内容](#id)链接

  • 2
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Shilong Wang

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值