[hitroad杂货铺]KaTeX使用

前言

今天是最后一期hitroad杂货铺了
啥,武松又喝多了

开始

sin ⁡ x = x 1 ! − x 2 2 ! + x 3 3 ! − x 4 4 ! + x 5 5 ! − ⋯ \sin x=\frac{x}{1!} - \frac{x^2}{2!} + \frac{x^3}{3!} - \frac{x^4}{4!} + \frac{x^5}{5!} - \cdots sinx=1!x2!x2+3!x34!x4+5!x5

markdown中插入KaTeX

当KaTeX与文字混为一团时,使用$...$,例如 Γ \Gamma Γ
当KaTex单作一行是,使用$$...$$,例如 Γ \Gamma Γ

数学符号

符号 表达式
≠ \not= = $\not=$
× \times × $\times$
÷ \div ÷ $\div$
± \pm ± $\pm$
∑ \sum $\sum$
∏ \prod $\prod$
∂ \partial $\partial$
∫ \int $\int
≥ \geq $\geq$$\ge$
≤ \leq $\leq$$\le$
≈ \approx $\approx$
a ⋅ b a \cdot b ab $a \cdot b$
a b \frac{a}{b} ba $\frac{a}{b}$
a b a^b ab $a^b$
a b a_b ab $a_b$
a b \underset{b}{a} ba $\underset{b}{a}$
a b \overset{b}{a} ab $\overset{b}{a}$
a \sqrt a a $\sqrt a$
b a \sqrt [a]{b} ab $\sqrt [a]{b}$
a b c ‾ \overline{abc} abc \overline{abc}$$
∞ \infty $\infty$$infin$
a ˙ \dot a a˙ $\dot a$
a ¨ \ddot a a¨ $\ddot a$
a ⃗ \vec a a $\vec a$
a ^ \hat a a^ $\hat a$
ı \imath ı $\imath$
ȷ \jmath ȷ $\jmath$
… \ldots $\ldots$
⋯ \cdots $\cdots$
⋮ \vdots $\vdots$
⋱ \ddots $\ddots$
↑ \uparrow $\uparrow$
⇑ \Uparrow $\Uparrow$
↓ \downarrow $\downarrow$
⇓ \Downarrow $\Downarrow$
← \leftarrow $\Downarrow$
⇐ \Leftarrow $\Downarrow$
→ \rightarrow $\Downarrow$
⇒ \Rightarrow $\Downarrow$
↕ \updownarrow $\downarrow$
⇕ \Updownarrow $\Downarrow$
↔ \leftrightarrow $\Downarrow$
⇔ \Leftrightarrow $\Downarrow$
a ∈ b a \in b ab $a \in b$
a ∉ b a \notin b a/b $a \notin b$
a ⊂ b a \subset b ab $a \subset b$
a ⊆ b a \subseteq b ab $a \subseteq b$
a ∪ b a \cup b ab $a \cup b$
a ∩ b a \cap b ab $a \cap b
a ∖ b a \setminus b ab $a \setminus b$
a ⨀ b a \bigodot b ab $a \bigodot b$
a ⨂ b a \bigotimes b ab $a \bigotimes b$
a ⨁ b a \bigoplus b ab $a \bigoplus b$

另外,还有\mathbb{...}...是任意大写字母,如果是其他的东西,跟没有\mathbb{}一样。
这是\mathbb{A}\mathbb{Z}的效果 ↓ \downarrow
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z \mathbb{A}\mathbb{B}\mathbb{C}\mathbb{D}\mathbb{E}\mathbb{F}\mathbb{G}\mathbb{H}\mathbb{I}\mathbb{J}\mathbb{K}\mathbb{L}\mathbb{M}\mathbb{N}\mathbb{O}\mathbb{P}\mathbb{Q}\mathbb{R}\mathbb{S}\mathbb{T}\mathbb{U}\mathbb{V}\mathbb{W}\mathbb{X}\mathbb{Y}\mathbb{Z} ABCDEFGHIJKLMNOPQRSTUVWXYZ

其他符号

公式序号

1 + 1 = 2 (1) 1+1=2\tag{1} 1+1=2(1)
$$1+1=2\tag{1}$$
注意⚠️:tag元素时,请务必记得使用$$...$$

大括号的使用

{ ( a + 6 ) ( b + 6 ) = a b + 114 π b 2 × a × 5 = π a 2 × b × 8 \left\{ \begin{aligned} (a+6)(b+6)=ab + 114\\ \pi b^2 \times a \times 5=\pi a^2 \times b \times 8 \end{aligned} \right. { (a+6)(b+6)=ab+114πb2×a×5=πa2×b×8

\left\{
\begin{aligned}
(a+6)(b+6)=ab + 114\\
\pi b^2 \times a \times 5=\pi a^2 \times b \times 8
\end{aligned}
\right.

注意⚠️:[]是不需要加\的,而{}需要
注意⚠️:在KaTeX中换行时不要忘记加上\\

矩阵

a b c d e f g h i j k l m n o p q r s t \begin{matrix} a & b & c & d & e\\ f & g & h & i & j\\ k & l & m & n & o\\ p & q & r & s & t \end{matrix} afkpbglqchmrdinsejot

\begin{matrix} 
a & b & c & d & e\\
f & g & h & i & j\\ 
k & l & m & n & o\\ 
p & q & r & s & t 
\end{matrix}

[ a b c d e f g h i j k l m n o p q r s t ] \left[ \begin{matrix} a & b & c & d & e\\ f & g & h & i & j\\ k & l & m & n & o\\ p & q & r & s & t \end{matrix} \right] afkpbglqchmrdinsejot

\left[
\begin{matrix} 
a & b & c & d & e\\
f & g & h & i & j\\ 
k & l & m & n & o\\ 
p & q & r & s & t 
\end{matrix}
\right]

{ a b c d e f g h i j k l m n o p q r s t } \left\{ \begin{matrix} a & b & c & d & e\\ f & g & h & i & j\\ k & l & m & n & o\\ p & q & r & s & t \end{matrix} \right\} afkpbglqchmrdinsejot
注意⚠️:在KaTeX中换行时不要忘记加上\\

在矩阵中间加竖线:
{ a b c d e f g h i j k l m n o p q r s t } \left\{ \begin{array}{cccc|c} a & b & c & d & e\\ f & g & h & i & j \\ k & l & m & n & o \\ p & q & r & s & t \end{array} \right\} afkpbglqchmrdinsejot

\left\{ 
\begin{array}{cccc|c} 
a & b & c & d & e\\ 
f & g & h & i & j \\ 
k & l & m & n & o \\ 
p & q & r & s & t 
\end{array} 
\right\}

这里\begin{array}{cccc|c}后部的{cccc|c}中的|的位置就是加竖线的位置,可以有多条竖线。不一定非得是{cccc|c},也可以是{aaaa|a},但不能是{abab|a}
注意⚠️:是array而不是matrix

希腊字母 公式
α \alpha α A \Alpha A $\alpha$$\Alpha$
β \beta β B \Beta B $\beta$$\Beta$
γ \gamma γ Γ \Gamma Γ $\gamma$$\Gamma$
δ \delta δ Δ \Delta Δ $\delta$$\Delta$
ϵ \epsilon ϵ E \Epsilon E $\epsilon$$\Epsilon$
ζ \zeta ζ Z \Zeta Z $\zeta$$\Zeta$
η \eta η H \Eta H $\eta$$\Eta$
θ \theta θ Θ \Theta Θ $\theta$$\Theta$
ι \iota ι I \Iota I $\iota$$\Iota$
κ \kappa κ K \Kappa K $\kappa$$\K$
λ \lambda λ Λ \Lambda Λ $\lambda$$\$Lambda
μ \mu μ M \Mu M $\mu$$\Mu$
ν \nu ν N \Nu N $\nu$$\Nu$
ξ \xi ξ Ξ \Xi Ξ $\xi$$\Xi$
ο \omicron ο O \Omicron O $\omicron$$\Omicron$
π \pi π Π \Pi Π $\pi$$\Pi$
ρ \rho ρ P \Rho P $\rho$$\Rho$
σ \sigma σ Σ \Sigma Σ $\sigma$$\Sigma$
τ \tau τ T \Tau T $\tau$$\Tau$
υ \upsilon υ Υ \Upsilon Υ $\upsilon$$\Upsilon$
ϕ \phi ϕ Φ \Phi Φ $\phi$$\Phi$
χ \chi χ X \Chi X $\chi$$\Chi$
ψ \psi ψ Ψ \Psi Ψ $\psi$$\Psi$
ω \omega ω Ω \Omega Ω $\omega$$\Omega$

字符大小

字符大小 公式
x \tiny x x $\tiny x$
x \scriptsize x x $\scriptsize x$
x \footnotesize x x $\footnotesize x$
x \small x x $\small x$
x x x $\normalsize x$$x$
x \large x x $\large x$
x \Large x x $\Large x$
x \LARGE x x $LARGE x$
x \huge x x $\huge x$
x \Huge x x $\Huge x$


作者

hit-road

拜拜,下课!

猜你喜欢

转载自blog.csdn.net/weixin_42954615/article/details/112801679
今日推荐