一、公式部分
前言
行内公式:$公式$
行间公式:$$公式$$
1.1 常用符号标注
1.1.1 上下标
数学符号 | 实际效果 | 语法 |
---|---|---|
向量 | a ⃗ \vec{a} a | \vec{a} 向量 |
平均值 | a ‾ \overline{a} a | \overline{a} |
估计值 | a ^ \widehat{a} a | \widehat{a} |
颚化符号 等价无穷小 | a ~ \widetilde{a} a | \widetilde{a} |
一阶导数 | a ˙ \dot{a} a˙ | \dot{a} |
二阶导数 | a ¨ \ddot{a} a¨ | \ddot{a} |
a ˇ \check{a} aˇ | \check{a} | |
a ˘ \breve{a} a˘ | \breve{a} | |
a ˋ \grave{a} aˋ | \grave{a} | |
a ˊ \acute{a} aˊ | \acute{a} | |
y x \stackrel{x}{y} yx | \stackrel{x}{y} | |
y z \overset{z}{y} yz | \overset{z}{y} | |
y x \underset{x}{y} xy | \underset{x}{y} | |
上标 | x y x^y xy | x^y |
下标 | x y x_y xy | x_y |
复杂上下标 | 2 1 ⨂ 3 4 {^1_2}\bigotimes_3^4 21⨂34 | \sideset{^1_2}{^3_4}\bigotimes |
1.1.2 分式
实际效果 | 语法 |
---|---|
1 / 2 1/2 1/2 | 1/2 |
1 2 \frac{1}{2} 21 | \frac{1}{2} |
1.1.3 省略号
实际效果 | 语法 |
---|---|
⋯ \cdots ⋯ | \cdots |
1.1.4 开根号
实际效果 | 语法 |
---|---|
2 \sqrt{2} 2 | \sqrt{2} |
1.2 复杂数学符号
形式 | 实际效果 | 语法 |
---|---|---|
1.求和 | y = ∑ i = 1 n x i y = \sum_{i=1}^{n}{x_i} y=∑i=1nxi | y = \sum_{i=1}^{n}{x_i} |
y = ∑ y → 0 x → ∞ x y y=\sum^{x \to \infty}_{y \to 0}{\frac{x}{y}} y=∑y→0x→∞yx | y=\sum^{x \to \infty}_{y \to 0}{\frac{x}{y}} | |
2.极限 | lim y → 0 x → ∞ x y \lim^{x \to \infty}_{y \to 0}{\frac{x}{y}} limy→0x→∞yx | \lim^{x \to \infty}_{y \to 0}{\frac{x}{y}} |
lim y → 0 x → ∞ x y \displaystyle \lim^{x \to \infty}_{y \to 0}{\frac{x}{y}} y→0limx→∞yx | \displaystyle \lim^{x \to \infty}_{y \to 0}{\frac{x}{y}} | |
3.开方 | x \sqrt x x | \sqrt x |
x + y 3 \sqrt[3]{x+y} 3x+y | \sqrt[3]{x+y} | |
4.微积分 | ∫ 0 ∞ x d x \int^{\infty}_{0}{xdx} ∫0∞xdx | \int^{\infty}_{0}{xdx} |
∬ \iint ∬ | \iint | |
∭ \iiint ∭ | \iiint | |
∮ \oint ∮ | \oint | |
∂ f ∂ x \dfrac{\partial f}{\partial x} ∂x∂f | \dfrac{\partial f}{\partial x} | |
∂ x 2 ∂ y 2 \frac{\partial x^2}{\partial y^2} ∂y2∂x2 | \frac{\partial x^2}{\partial y^2} | |
∂ f ( x , y ) ∂ x ∣ x = 0 \frac{\partial f(x,y)}{\partial x} \vert _{x=0} ∂x∂f(x,y)∣x=0 | \frac{\partial f(x,y)}{\partial x} \vert _{x=0} | |
y ′ x y{\prime}x y′x | y{\prime}x | |
∇ \nabla ∇ | \nabla | |
∞ \infty ∞ | \infty | |
5.向量 | x y → \overrightarrow{xy} xy | \overrightarrow{xy} |
矢量 | x ⃗ \vec x x | \vec x |
x y z ‾ \overline{xyz} xyz | \overline{xyz} | |
x y z ‾ ‾ \overline{x\overline{yz}} xyz | \overline{x\overline{yz}} | |
x y z ‾ \underline{xyz} xyz | \underline{xyz} | |
6.累乘 | ∏ n = 1 99 x n \prod_{n=1}^{99}{x_n} ∏n=199xn | \prod_{n=1}^{99}{x_n} |
∏ n = 1 99 x n \displaystyle \prod_{n=1}^{99}{x_n} n=1∏99xn | \displaystyle \prod_{n=1}^{99}{x_n} | |
7.箭头 | a ← b → c ↔ d ⇔ e ⇌ f a \leftarrow b \rightarrow c \leftrightarrow d \Leftrightarrow e \rightleftharpoons f a←b→c↔d⇔e⇌f | a \leftarrow b \rightarrow c \leftrightarrow d \Leftrightarrow e \rightleftharpoons f |
a ⟵ b ⟶ c ⟺ d a \longleftarrow b \longrightarrow c \Longleftrightarrow d a⟵b⟶c⟺d | a \longleftarrow b \longrightarrow c \Longleftrightarrow d | |
a ↗ b ↘ c ↖ d ↘ e a \nearrow b \searrow c \nwarrow d \searrow e a↗b↘c↖d↘e | a \nearrow b \searrow c \nwarrow d \searrow e | |
a ↑ b ↓ c ⇑ d ⇓ e a \uparrow b \downarrow c \Uparrow d \Downarrow e a↑b↓c⇑d⇓e | a \uparrow b \downarrow c \Uparrow d \Downarrow e | |
a ⇀ b ⇁ c ↼ d ↽ e a \rightharpoonup b \rightharpoondown c \leftharpoonup d \leftharpoondown e a⇀b⇁c↼d↽e | a \rightharpoonup b \rightharpoondown c \leftharpoonup d \leftharpoondown e | |
8.逻辑运算符 | ∀ a ∃ b \forall a \exists b ∀a∃b | \forall a \exists b |
¬ a ⋁ b ⋀ \lnot a \bigvee b \bigwedge ¬a⋁b⋀ | \lnot a \bigvee b \bigwedge | |
∵ a ∴ b \because a \therefore b ∵a∴b | \because a \therefore b | |
9.集合符号 | X ∪ Y ⋃ Z ∩ W X\cup Y \bigcup Z\cap W X∪Y⋃Z∩W | X\cup Y \bigcup Z\cap W |
X ⊂ Y ⊄ Z ⊆ W ⊈ U X \subset Y \not\subset Z \subseteq W \not\subseteq U X⊂Y⊂Z⊆W⊆U | X \subset Y \not\subset Z \subseteq W \not\subseteq U | |
c ∈ d ∉ e c \in d \notin e c∈d∈/e | c \in d \notin e | |
∅ \emptyset ∅ | \emptyset | |
∅ \varnothing ∅ | \varnothing | |
10.取整 | ⌈ x 2 ⌉ \lceil \frac{x}{2} \rceil ⌈2x⌉ | \lceil \frac{x}{2} \rceil |
⌊ x ⌋ \lfloor x \rfloor ⌊x⌋ | \lfloor x \rfloor | |
11.括号 | ( n k ) \tbinom{n}{k} (kn) | \tbinom{n}{k} |
( n k ) \binom{n}{k} (kn) | \binom{n}{k} | |
( n k ) \dbinom{n}{k} (kn) | \dbinom{n}{k} | |
{ n k } {n\brace k} {kn} | {n\brace k} | |
( n k ) {n\choose k} (kn) | {n\choose k} | |
[ n k ] {n\brack k} [kn] | {n\brack k} | |
1 + 2 + ⋯ + 100 ⏞ \overbrace{1+2+\cdots+100} 1+2+⋯+100 | \overbrace{1+2+\cdots+100} | |
1 + 2 + ⋯ + 100 ⏟ \underbrace{1+2+\cdots+100} 1+2+⋯+100 | \underbrace{1+2+\cdots+100} | |
5050 1 + 2 + ⋯ + 100 ⏞ 5050 \overbrace {1+2+⋯+100} 50501+2+⋯+100 | 5050 \overbrace {1+2+⋯+100} | |
12. 矩阵 | 0 1 3 4 \begin{matrix} 0 & 1 \\ 3 & 4 \\ \end{matrix} 0314 | \begin{matrix} 0 & 1 \\ 3 & 4 \\ \end{matrix} |
( 0 1 3 4 ) \begin{pmatrix} 0 & 1 \\ 3 & 4 \\ \end{pmatrix} (0314) | \begin{pmatrix} 0 & 1 \\ 3 & 4 \\ \end{pmatrix} | |
∣ 0 1 3 4 ∣ \begin{vmatrix} 0 & 1 \\ 3 & 4 \\ \end{vmatrix} ∣∣∣∣0314∣∣∣∣ | \begin{vmatrix} 0 & 1 \\ 3 & 4 \\ \end{vmatrix} | |
∥ 0 1 3 4 ∥ \begin{Vmatrix} 0 & 1 \\ 3 & 4 \\ \end{Vmatrix} ∥∥∥∥0314∥∥∥∥ | \begin{Vmatrix} 0 & 1 \\ 3 & 4 \\ \end{Vmatrix} | |
[ 0 1 3 4 ] \begin{bmatrix} 0 & 1 \\ 3 & 4 \\ \end{bmatrix} [0314] | \begin{bmatrix} 0 & 1 \\ 3 & 4 \\ \end{bmatrix} | |
{ 0 1 3 4 } \begin{Bmatrix} 0 & 1 \\ 3 & 4 \\ \end{Bmatrix} {0314} | \begin{Bmatrix} 0 & 1 \\ 3 & 4 \\ \end{Bmatrix} |
1.3 关系运算符
实际效果 | 语法 |
---|---|
≠ \neq = | \neq |
≤ \leq ≤ | \leq |
≥ \geq ≥ | \geq |
≈ \approx ≈ | \approx |
≮ \not\lt < | \not\lt |
> \gt > | \gt |
≫ \gg ≫ | \gg |
⋘ \lll ⋘ | \lll |
± \pm ± | \pm |
× \times × | \times |
÷ \div ÷ | \div |
∣ \mid ∣ | \mid |
∗ \ast ∗ | \ast |
∠ \angle ∠ | \angle |
⊥ \bot ⊥ | \bot |
⊙ a n d ⨀ \odot and\bigodot ⊙and⨀ | \odot and\bigodot |
⊗ a n d ⨂ \otimes and \bigotimes ⊗and⨂ | \otimes and \bigotimes |
1.4 三角函数
实际效果 | 表示 |
---|---|
sin 3 0 ∘ \sin 30^\circ sin30∘ | \sin 30^\circ |
cos 3 0 ∘ \cos30^\circ cos30∘ | \cos 30^\circ |
tan 3 0 ∘ \tan30^\circ tan30∘ | \tan30^\circ |
1.5 对数函数
实际效果 | 语法 |
---|---|
ln 2 \ln 2 ln2 | \ln 2 |
log 2 8 \log_2 8 log28 | \log_2 8 |
lg 10 \lg 10 lg10 | \lg 10 |
1.6 大型关系式
1.6.1 矩阵
% 可将 [] 换成 () 或 ||...
\left[
\begin{array}{ccc|c}
\psi(x) & g(x) & \cdots & a_{1n} \\
\hline
a_{21} & a_{22} & \dots & a_{2n} \\
\vdots & \vdots & \ddots & \vdots \\
a_{n1} & a_{n2} & ... & a_{nn}
\end{array}
\right]
[ ψ ( x ) g ( x ) ⋯ a 1 n a 21 a 22 … a 2 n ⋮ ⋮ ⋱ ⋮ a n 1 a n 2 . . . a n n ] \left[ \begin{array}{ccc|c} \psi(x) & g(x) & \cdots & a_{1n} \\ \hline a_{21} & a_{22} & \dots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{n1} & a_{n2} & ... & a_{nn} \end{array} \right] ⎣⎢⎢⎢⎡ψ(x)a21⋮an1g(x)a22⋮an2⋯…⋱...a1na2n⋮ann⎦⎥⎥⎥⎤
$$
\begin{bmatrix}
1 & x_{0} &... & x_{0}^{n} \\
1 & x_{1} &... & x_{1}^{n} \\
& & \cdots & \\
1 & x_{n} & \dots & x_{n}^{n}
\end{bmatrix}
\begin{bmatrix}
a_{0}\\ a_{1}\\ ...\\ a_{n}
\end{bmatrix}=
\begin{bmatrix}
y_{0}\\ y_{1}\\ ...\\ y_{n}
\end{bmatrix}
$$
[ 1 x 0 . . . x 0 n 1 x 1 . . . x 1 n ⋯ 1 x n … x n n ] [ a 0 a 1 . . . a n ] = [ y 0 y 1 . . . y n ] \begin{bmatrix} 1 & x_{0} &... & x_{0}^{n} \\ 1 & x_{1} &... & x_{1}^{n} \\ & & \cdots & \\ 1 & x_{n} & \dots & x_{n}^{n} \end{bmatrix} \begin{bmatrix} a_{0}\\ a_{1}\\ ...\\ a_{n} \end{bmatrix}= \begin{bmatrix} y_{0}\\ y_{1}\\ ...\\ y_{n} \end{bmatrix} ⎣⎢⎢⎡111x0x1xn......⋯…x0nx1nxnn⎦⎥⎥⎤⎣⎢⎢⎡a0a1...an⎦⎥⎥⎤=⎣⎢⎢⎡y0y1...yn⎦⎥⎥⎤
1.6.2 方程式
$$
\begin{cases}
a_{0}+a_{1}x_{0}+...+a_{n}x_{0}^{n}=y_{0} \\
a_{0}+a_{1}x_{1}+...+a_{n}x_{1}^{n}=y_{1} \\
\cdots\\
a_{0}+a_{1}x_{n}+...+a_{n}x_{n}^{n}=y_{n}
\end{cases}
$$
{ a 0 + a 1 x 0 + . . . + a n x 0 n = y 0 a 0 + a 1 x 1 + . . . + a n x 1 n = y 1 ⋯ a 0 + a 1 x n + . . . + a n x n n = y n \begin{cases} a_{0}+a_{1}x_{0}+...+a_{n}x_{0}^{n}=y_{0} \\ a_{0}+a_{1}x_{1}+...+a_{n}x_{1}^{n}=y_{1} \\ \cdots\\ a_{0}+a_{1}x_{n}+...+a_{n}x_{n}^{n}=y_{n} \end{cases} ⎩⎪⎪⎪⎨⎪⎪⎪⎧a0+a1x0+...+anx0n=y0a0+a1x1+...+anx1n=y1⋯a0+a1xn+...+anxnn=yn
1.6.3 等式
% 使用 \& 使 = 左对齐
$$
\begin{aligned}
(f,K^{'}_{x}y+K^{''}_{x}y)_{F}
&=(f^{'}+f^{''},K^{'}_{x}y+K^{''}_{x}y)_{F}\\
&=(f^{'},K^{'}_{x}y)_{F}+(f^{''},K^{''}_{x}y)_{F}+(f^{'},K^{''}_{x}y)_{F}+(f^{''},K^{'}_{x}y)_{F}\\
&=(f^{'},K^{'}_{x}y)_{F}+(f^{''},K^{''}_{x}y)_{F}\\
&=(f^{'}(x),y)_{Y}+(f^{''}(x),y)_{Y}\\
&=(f^{'}(x)+f^{''}(x),y)_{Y}\\
&=(f(x),y)_{Y}\\
&=(f,K_{x}y)_{F}
\end{aligned}
$$
( f , K x ′ y + K x ′ ′ y ) F = ( f ′ + f ′ ′ , K x ′ y + K x ′ ′ y ) F = ( f ′ , K x ′ y ) F + ( f ′ ′ , K x ′ ′ y ) F + ( f ′ , K x ′ ′ y ) F + ( f ′ ′ , K x ′ y ) F = ( f ′ , K x ′ y ) F + ( f ′ ′ , K x ′ ′ y ) F = ( f ′ ( x ) , y ) Y + ( f ′ ′ ( x ) , y ) Y = ( f ′ ( x ) + f ′ ′ ( x ) , y ) Y = ( f ( x ) , y ) Y = ( f , K x y ) F \begin{aligned} (f,K^{'}_{x}y+K^{''}_{x}y)_{F} &=(f^{'}+f^{''},K^{'}_{x}y+K^{''}_{x}y)_{F}\\ &=(f^{'},K^{'}_{x}y)_{F}+(f^{''},K^{''}_{x}y)_{F}+(f^{'},K^{''}_{x}y)_{F}+(f^{''},K^{'}_{x}y)_{F}\\ &=(f^{'},K^{'}_{x}y)_{F}+(f^{''},K^{''}_{x}y)_{F}\\ &=(f^{'}(x),y)_{Y}+(f^{''}(x),y)_{Y}\\ &=(f^{'}(x)+f^{''}(x),y)_{Y}\\ &=(f(x),y)_{Y}\\ &=(f,K_{x}y)_{F} \end{aligned} (f,Kx′y+Kx′′y)F=(f′+f′′,Kx′y+Kx′′y)F=(f′,Kx′y)F+(f′′,Kx′′y)F+(f′,Kx′′y)F+(f′′,Kx′y)F=(f′,Kx′y)F+(f′′,Kx′′y)F=(f′(x),y)Y+(f′′(x),y)Y=(f′(x)+f′′(x),y)Y=(f(x),y)Y=(f,Kxy)F
1.7 二十四个希腊字母
序号 | 小写 | 表示 | 大写 | 表示 |
---|---|---|---|---|
1 | α \alpha α | \alpha | A \Alpha A | \Alpha |
2 | β \beta β | \beta | B \Beta B | \Beta |
3 | γ \gamma γ | \gamma | Γ \Gamma Γ | \Gamma |
4 | δ \delta δ | \delta | Δ \Delta Δ | \Delta |
5 | ϵ \epsilon ϵ | \epsilon | E \Epsilon E | \Epsilon |
ε \varepsilon ε | \varepsilon | |||
6 | ζ \zeta ζ | \zeta | Z \Zeta Z | \Zeta |
7 | η \eta η | \eta | H \Eta H | \Eta |
8 | θ \theta θ | \theta | Θ \Theta Θ | \Theta |
9 | ι \iota ι | \iota | I \Iota I | \Iota |
10 | κ \kappa κ | \kappa | K \Kappa K | \Kappa |
11 | λ \lambda λ | \lambda | Λ \Lambda Λ | \Lambda |
12 | μ \mu μ | \mu | M \Mu M | \Mu |
13 | ν \nu ν | \nu | N \Nu N | \Nu |
14 | ξ \xi ξ | \xi | Ξ \Xi Ξ | \Xi |
15 | ο \omicron ο | \omicron | O \Omicron O | \Omicron |
16 | π \pi π | \pi | Π \Pi Π | \Pi |
17 | ρ \rho ρ | \rho | P \Rho P | \Rho |
18 | σ \sigma σ | \sigma | Σ \Sigma Σ | \Sigma |
19 | τ \tau τ | \tau | T \Tau T | \Tau |
20 | υ \upsilon υ | \upsilon | Υ \Upsilon Υ | \Upsilon |
21 | ϕ \phi ϕ | \phi | Φ \Phi Φ | \Phi |
φ \varphi φ | \varphi | |||
22 | χ \chi χ | \chi | X \Chi X | \Chi |
23 | ψ \psi ψ | \psi | Ψ \Psi Ψ | \Psi |
24 | ω \omega ω | \omega | Ω \Omega Ω | \Omega |
1.8 注意事项
1.8.1 字体变换
若要对公式的某一部分字符进行字体转换,可以用 {\字体 {需转换的部分字符}}
命令,其中 \字体
部分可以参照下表选择合适的字体。
语法 | 说明 | 显示 |
---|---|---|
\rm | 罗马体 | S a m p l e \rm{Sample} Sample |
\it | 意大利体 | S a m p l e \it{Sample} Sample |
\bf | 粗体 | S a m p l e \bf{Sample} Sample |
\sf | 等线体 | S a m p l e \sf{Sample} Sample |
\tt | 打字机体 | S a m p l e \tt{Sample} Sample |
\frak | 旧德式字体 | S a m p l e \frak{Sample} Sample |
\cal | 花体 | KaTeX parse error: Undefined control sequence: \cal at position 1: \̲c̲a̲l̲{SAMPLE} |
\Bbb | 黑板粗体 | S A M P L E \Bbb{SAMPLE} SAMPLE |
\mit | 数学斜体 | KaTeX parse error: Undefined control sequence: \mit at position 1: \̲m̲i̲t̲{SAMPLE} |
\scr | 手写体 | KaTeX parse error: Undefined control sequence: \scr at position 1: \̲s̲c̲r̲{SAMPLE} |
部分字体显示不出是因为不同markdown编辑器规则不同,大部分编辑器支持使用。
1.8.2 在字符中添加空格
有四种宽度的空格可以使用: \,
、\;
、\quad
和 \qquad
。
语法 | 显示 |
---|---|
\, | a b a \, b ab |
\; | a b a \; b ab |
\quad | a b a \quad b ab |
\qquad | a b a \qquad b ab |
1.8.3 添加注释文字
在 \text {文字}
中仍可以使用 $公式$
插入其它公式
$$
f(n)= \begin{cases}
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} n/2, & \text {if $n$ is even} \\ 3n+1, & \text{if $n$ is odd} \end{cases} f(n)={n/2,3n+1,if n is evenif n is odd
1.8.4 更改文字颜色
使用 \color{颜色}{文字}
来更改特定的文字颜色。更改文字颜色 需要浏览器支持 ,如果浏览器不知道你所需的颜色,那么文字将被渲染为黑色。
对于较旧的浏览器(HTML4与CSS2),以下颜色是被支持的:
输入 | 显示 | 输入 | 显示 |
---|---|---|---|
black | t e x t \color{black}{text} text | grey | t e x t \color{grey}{text} text |
silver | t e x t \color{silver}{text} text | white | t e x t \color{white}{text} text |
maroon | t e x t \color{maroon}{text} text | red | t e x t \color{red}{text} text |
yellow | t e x t \color{yellow}{text} text | lime | t e x t \color{lime}{text} text |
olive | t e x t \color{olive}{text} text | green | t e x t \color{green}{text} text |
teal | t e x t \color{teal}{text} text | auqa | t e x t \color{auqa}{text} text |
blue | t e x t \color{blue}{text} text | navy | t e x t \color{navy}{text} text |
purple | t e x t \color{purple}{text} text | fuchsia | t e x t \color{fuchsia}{text} text |
对于较新的浏览器(HTML5与CSS3),额外的124种颜色将被支持:
输入 \color {#rgb} {text}
来自定义更多的颜色,其中 #rgb
的 r
g
b
可输入 0-9
和 a-f
来表示红色、绿色和蓝色的纯度(饱和度)。
\begin{array}{|rrrrrrrr|}\hline
\verb+#000+ & \color{#000}{text} & & &
\verb+#00F+ & \color{#00F}{text} & & \\
& & \verb+#0F0+ & \color{#0F0}{text} &
& & \verb+#0FF+ & \color{#0FF}{text}\\
\verb+#F00+ & \color{#F00}{text} & & &
\verb+#F0F+ & \color{#F0F}{text} & & \\
& & \verb+#FF0+ & \color{#FF0}{text} &
& & \verb+#FFF+ & \color{#FFF}{text}\\
\hline
\end{array}
\begin{array}{|rrrrrrrr|}\hline
\verb+#000+ & \color{#000}{text} & & &
\verb+#00F+ & \color{#00F}{text} & & \
& & \verb+#0F0+ & \color{#0F0}{text} &
& & \verb+#0FF+ & \color{#0FF}{text}\
\verb+#F00+ & \color{#F00}{text} & & &
\verb+#F0F+ & \color{#F0F}{text} & & \
& & \verb+#FF0+ & \color{#FF0}{text} &
& & \verb+#FFF+ & \color{#FFF}{text}\
\hline
\end{array}
#000 t e x t #00F t e x t #0F0 t e x t #0FF t e x t #F00 t e x t #F0F t e x t #FF0 t e x t #FFF t e x t \begin{array}{|rrrrrrrr|}\hline \verb+#000+ & \color{#000}{text} & & & \verb+#00F+ & \color{#00F}{text} & & \\ & & \verb+#0F0+ & \color{#0F0}{text} & & & \verb+#0FF+ & \color{#0FF}{text}\\ \verb+#F00+ & \color{#F00}{text} & & & \verb+#F0F+ & \color{#F0F}{text} & & \\ & & \verb+#FF0+ & \color{#FF0}{text} & & & \verb+#FFF+ & \color{#FFF}{text}\\ \hline \end{array} #000#F00texttext#0F0#FF0texttext#00F#F0Ftexttext#0FF#FFFtexttext
1.8.5 添加删除线
在公式内使用 \require{cancel}
来允许 片段删除线 的显示。声明片段删除线后,使用 \cancel{字符}
、\bcancel{字符}
、\xcancel{字符}
和 \cancelto{字符}
来实现各种片段删除线效果
$$
\require{cancel}\begin{array}{rl}
\verb|y+\cancel{x}| & y+\cancel{x}\\
\verb|\cancel{y+x}| & \cancel{y+x}\\
\verb|y+\bcancel{x}| & y+\bcancel{x}\\
\verb|y+\xcancel{x}| & y+\xcancel{x}\\
\verb|y+\cancelto{0}{x}| & y+\cancelto{0}{x}\\
\verb+\frac{1\cancel9}{\cancel95} = \frac15+& \frac{1\cancel9}{\cancel95} = \frac15 \\
\end{array}
$$