LaTex公式文档

LaTex公式文档

1.符号与字母

希腊字母

小写大写LaTeX小写大写LaTex
α \alpha α A \Alpha A\alpha ν \nu ν N \Nu N\nu
β \beta β B \Beta B\beta ξ \xi ξ Ξ \Xi Ξ\xi
γ \gamma γ Γ \Gamma Γ\gamma o o o O O Oo
δ \delta δ Δ \Delta Δ\delta π \pi π ϖ \varpi ϖ Π \Pi Π\pi \varpi
ϵ \epsilon ϵ ε \varepsilon ε E \Epsilon E\epsilon \varepsilon ρ \rho ρ ϱ \varrho ϱ P \Rho P\rho \varrho
ζ \zeta ζ Z \Zeta Z\zeta σ \sigma σ ς \varsigma ς Σ \Sigma Σ\sigma \varsigma
η \eta η H \Eta H\eta τ \tau τ T \Tau T\tau
θ \theta θ ϑ \vartheta ϑ Θ \Theta Θ\theta \vartheta υ \upsilon υ Υ \Upsilon Υ\upsilon
ι \iota ι I \Iota I\iota ϕ \phi ϕ φ \varphi φ Φ \Phi Φ\phi \varphi
κ \kappa κ K \Kappa K\kappa χ \chi χ X \Chi X\chi
λ \lambda λ Λ \Lambda Λ\lambda ψ \psi ψ Ψ \Psi Ψ\psi
μ \mu μ M \Mu M\mu ω \omega ω Ω \Omega Ω\omega

希伯来字母

图标LaTeX
ℵ \aleph \aleph
ℶ \beth \beth
ℷ \gimel \gimel
ℸ \daleth \daleth

二元运算符

图标LaTeX图标LaTeX
+ + ++ ∙ \bullet \bullet
− - - ⊕ \oplus \oplus
× \times ×\times ⊖ \ominus \ominus
÷ \div ÷\div ⊙ \odot \odot
± \pm ±\pm ⊘ \oslash \oslash
∓ \mp \mp ⊗ \otimes \otimes
◃ \triangleleft \triangleleft ◯ \bigcirc \bigcirc
▹ \triangleright \triangleright ⋄ \diamond \diamond
⋅ \cdot \cdot ⊎ \uplus \uplus
∖ \setminus \setminus △ \bigtriangleup \bigtriangleup
⋆ \star \star ▽ \bigtriangledown \bigtriangledown
∗ \ast \ast ⊲ \lhd \lhd
∪ \cup \cup ⊳ \rhd \rhd
∩ \cap \cap ⊴ \unlhd \unlhd
⊔ \sqcup \sqcup ⊵ \unrhd \unrhd
⊓ \sqcap \sqcap ⨿ \amalg ⨿\amalg
∨ \vee \vee ≀ \wr \wr
∧ \wedge \wedge † \dagger \dagger
∘ \circ \circ ‡ \ddagger \ddagger

二元关系符

序号图标LaTeX序号图标LaTeX
1 = = ==49 ⪈ \gneq \gneq
2 ≠ \ne =\ne50 ≧ \geqq \geqq
3 ≠ \neq =\neq51 ≱ \ngeq \ngeq
4 ≡ \equiv \equiv52 ≱ \ngeqq \ngeqq
5 ≢ \not\equiv \not\equiv53 ≩ \gneqq \gneqq
6 ≐ \doteq \doteq54 ≩ \gvertneqq \gvertneqq
7 ≑ \doteqdot \doteqdot55 ≶ \lessgtr \lessgtr
8 = d e f \overset{\underset{\mathrm{def}}{}}{=} =def\overset{\underset{\mathrm{def}}{}}{=}56 ⋚ \lesseqgtr \lesseqgtr
9 : = := :=:=57 ⪋ \lesseqqgtr \lesseqqgtr
10 ∼ \sim \sim58 ≷ \gtrless \gtrless
11 ≁ \nsim \nsim59 ⋛ \gtreqless \gtreqless
12 ∽ \backsim \backsim60 ⪌ \gtreqqless \gtreqqless
13 ∼ \thicksim \thicksim61 ⩽ \leqslant \leqslant
14 ≃ \simeq \simeq62 ≰ \nleqslant \nleqslant
15 ⋍ \backsimeq \backsimeq63 ⪕ \eqslantless \eqslantless
16 ≂ \eqsim \eqsim64 ⩾ \geqslant \geqslant
17 ≅ \cong \cong65 ≱ \ngeqslant \ngeqslant
18 ≆ \ncong \ncong66 ⪖ \eqslantgtr \eqslantgtr
19 ≈ \approx \approx67 ≲ \lesssim \lesssim
20 ≈ \thickapprox \thickapprox68 ⋦ \lnsim \lnsim
21 ≊ \approxeq \approxeq69 ⪅ \lessapprox \lessapprox
22 ≍ \asymp \asymp70 ⪉ \lnapprox \lnapprox
23 ∝ \propto \propto71 ≳ \gtrsim \gtrsim
24 ∝ \varpropto \varpropto72 ⋧ \gnsim \gnsim
25 < < <<73 ⪆ \gtrapprox \gtrapprox
26 ≮ \nless \nless74 ⪊ \gnapprox \gnapprox
27 ≪ \ll \ll75 ≺ \prec \prec
28 ≪̸ \not\ll \not\ll76 ⊀ \nprec \nprec
29 ⋘ \lll \lll77 ⪯ \preceq \preceq
30 ⋘̸ \not\lll \not\lll78 ⋠ \npreceq \npreceq
31 ⋖ \lessdot \lessdot79 ⪵ \precneqq \precneqq
32 > > >>80 ≻ \succ \succ
33 ≯ \ngtr \ngtr81 ⊁ \nsucc \nsucc
34 ≫ \gg \gg82 ⪰ \succeq \succeq
35 ≫̸ \not\gg \not\gg83 ⋡ \nsucceq \nsucceq
36 ⋙ \ggg \ggg84 ⪶ \succneqq \succneqq
37 ⋙̸ \not\ggg \not\ggg85 ≼ \preccurlyeq \preccurlyeq
38 ⋗ \gtrdot \gtrdot86 ⋞ \curlyeqprec \curlyeqprec
39 ≤ \le \le87 ≽ \succcurlyeq \succcurlyeq
40 ≤ \leq \leq88 ⋟ \curlyeqsucc \curlyeqsucc
41 ⪇ \lneq \lneq89 ≾ \precsim \precsim
42 ≦ \leqq \leqq90 ⋨ \precnsim \precnsim
43 ≰ \nleq \nleq91 ⪷ \precapprox \precapprox
44 ≰ \nleqq \nleqq92 ⪹ \precnapprox \precnapprox
45 ≨ \lneqq \lneqq93 ≿ \succsim \succsim
46 ≨ \lvertneqq \lvertneqq94 ⋩ \succnsim \succnsim
47 ≥ \ge \ge95 ⪸ \succapprox \succapprox
48 ≥ \geq \geq96 ⪺ \succnapprox \succnapprox

几何符号

序号图标LaTeX序号图标LaTeX
1 ∥ \parallel \parallel14 ◊ \lozenge \lozenge
2 ∦ \nparallel \nparallel15 ⧫ \blacklozenge \blacklozenge
3 ∥ \shortparallel \shortparallel16 ★ \bigstar \bigstar
4 ∦ \nshortparallel \nshortparallel17 ◯ \bigcirc \bigcirc
5 ⊥ \perp \perp18 △ \triangle \triangle
6 ∠ \angle \angle19 △ \bigtriangleup \bigtriangleup
7 ∢ \sphericalangle \sphericalangle20 ▽ \bigtriangledown \bigtriangledown
8 ∡ \measuredangle \measuredangle21 △ \vartriangle \vartriangle
9 4 5 ∘ 45^\circ 4545^\circ22 ▽ \triangledown \triangledown
10 □ \Box \Box23 ▲ \blacktriangle \blacktriangle
11 ■ \blacksquare \blacksquare24 ▼ \blacktriangledown \blacktriangledown
12 ⋄ \diamond \diamond25 ◀ \blacktriangleleft \blacktriangleleft
13 ◊ \Diamond \Diamond \lozenge26 ▶ \blacktriangleright \blacktriangleright

逻辑符号

序号图标LaTeX序号图标LaTeX
1 ∀ \forall \forall20 ¬ \neg ¬\neg
2 ∃ \exists \exists21 ̸ R ⁡ \not\operatorname{R} R\not\operatorname{R}
3 ∄ \nexists \nexists22 ⊥ \bot \bot
4 ∴ \therefore \therefore23 ⊤ \top \top
5 ∵ \because \because24 ⊢ \vdash \vdash
6 & \And &\And25 ⊣ \dashv \dashv
7 ∨ \lor \lor26 ⊨ \vDash \vDash
8 ∨ \vee \vee27 ⊩ \Vdash \Vdash
9 ⋎ \curlyvee \curlyvee28 ⊨ \models \models
10 ⋁ \bigvee \bigvee29 ⊪ \Vvdash \Vvdash
11 ∧ \land \land30 ⊬ \nvdash \nvdash
12 ∧ \wedge \wedge31 ⊮ \nVdash \nVdash
13 ⋏ \curlywedge \curlywedge32 ⊭ \nvDash \nvDash
14 ⋀ \bigwedge \bigwedge33 ⊯ \nVDash \nVDash
15 q ˉ \bar{q} qˉ\bar{q}34 ┌ \ulcorner \ulcorner
16 a b c ˉ \bar{abc} abcˉ\bar{abc}35 ┐ \urcorner \urcorner
17 q ‾ \overline{q} q\overline{q}36 └ \llcorner \llcorner
18 a b c ‾ \overline{abc} abc\overline{abc}37 ┘ \lrcorner \lrcorner
19 ¬ \lnot ¬\lnot

集合

序号图标LaTeX序号图标LaTeX
1 { } \{\} {}{}23 ⊏ \sqsubset \sqsubset
2 ∅ \emptyset \emptyset24 ⊃ \supset \supset
3 ∅ \varnothing \varnothing25 ⋑ \Supset \Supset
4 ∈ \in \in26 ⊐ \sqsupset \sqsupset
5 ∉ \notin /\notin27 ⊆ \subseteq \subseteq
6 ∋ \ni \ni28 ⊈ \nsubseteq \nsubseteq
7 ∩ \cap \cap29 ⊊ \subsetneq \subsetneq
8 ⋒ \Cap \Cap30 ⊊ \varsubsetneq \varsubsetneq
9 ⊓ \sqcap \sqcap31 ⊑ \sqsubseteq \sqsubseteq
10 ⋂ \bigcap \bigcap32 ⊇ \supseteq \supseteq
11 ∪ \cup \cup33 ⊉ \nsupseteq \nsupseteq
12 ⋓ \Cup \Cup34 ⊋ \supsetneq \supsetneq
13 ⊔ \sqcup \sqcup35 ⊋ \varsupsetneq \varsupsetneq
14 ⋃ \bigcup \bigcup36 ⊒ \sqsupseteq \sqsupseteq
15 ⨆ \bigsqcup \bigsqcup37 ⫅ \subseteqq \subseteqq
16 ⊎ \uplus \uplus38 ⊈ \nsubseteqq \nsubseteqq
17 ⨄ \biguplus \biguplus39 ⫋ \subsetneqq \subsetneqq
18 ∖ \setminus \setminus40 ⫋ \varsubsetneqq \varsubsetneqq
19 ∖ \smallsetminus \smallsetminus41 ⫆ \supseteqq \supseteqq
20 × \times ×\times42 ⊉ \nsupseteqq \nsupseteqq
21 ⊂ \subset \subset43 ⫌ \supsetneqq \supsetneqq
22 ⋐ \Subset \Subset44 ⫌ \varsupsetneqq \varsupsetneqq

箭头

序号图标LaTeX序号图标LaTeX
1 ⇛ \Rrightarrow \Rrightarrow36 ⟼ \longmapsto \longmapsto
2 ⇚ \Lleftarrow \Lleftarrow37 ⇀ \rightharpoonup \rightharpoonup
3 ⇒ \Rightarrow \Rightarrow38 ⇁ \rightharpoondown \rightharpoondown
4 ⇏ \nRightarrow \nRightarrow39 ↼ \leftharpoonup \leftharpoonup
5 ⟹ \Longrightarrow \Longrightarrow40 ↽ \leftharpoondown \leftharpoondown
6    ⟹    \implies \implies41 ↿ \upharpoonleft \upharpoonleft
7 ⇐ \Leftarrow \Leftarrow42 ↾ \upharpoonright \upharpoonright
8 ⇍ \nLeftarrow \nLeftarrow43 ⇃ \downharpoonleft \downharpoonleft
9 ⟸ \Longleftarrow \Longleftarrow44 ⇂ \downharpoonright \downharpoonright
10 ⇔ \Leftrightarrow \Leftrightarrow45 ⇌ \rightleftharpoons \rightleftharpoons
11 ⇎ \nLeftrightarrow \nLeftrightarrow46 ⇋ \leftrightharpoons \leftrightharpoons
12 ⟺ \Longleftrightarrow \Longleftrightarrow47 ↶ \curvearrowleft \curvearrowleft
13    ⟺    \iff \iff48 ↺ \circlearrowleft \circlearrowleft
14 ⇑ \Uparrow \Uparrow49 ↰ \Lsh \Lsh
15 ⇓ \Downarrow \Downarrow50 ⇈ \upuparrows \upuparrows
16 ⇕ \Updownarrow \Updownarrow51 ⇉ \rightrightarrows \rightrightarrows
17 → \rightarrow \rightarrow52 ⇄ \rightleftarrows \rightleftarrows
18 → \to \to53 ↣ \rightarrowtail \rightarrowtail
19 ↛ \nrightarrow \nrightarrow54 ↬ \looparrowright \looparrowright
20 ⟶ \longrightarrow \longrightarrow55 ↷ \curvearrowright \curvearrowright
21 ← \leftarrow \leftarrow56 ↻ \circlearrowright \circlearrowright
22 ← \gets \gets57 ↱ \Rsh \Rsh
23 ↚ \nleftarrow \nleftarrow58 ⇊ \downdownarrows \downdownarrows
24 ⟵ \longleftarrow \longleftarrow59 ⇇ \leftleftarrows \leftleftarrows
25 ↔ \leftrightarrow \leftrightarrow60 ⇆ \leftrightarrows \leftrightarrows
26 ↮ \nleftrightarrow \nleftrightarrow61 ↢ \leftarrowtail \leftarrowtail
27 ⟷ \longleftrightarrow \longleftrightarrow62 ↫ \looparrowleft \looparrowleft
28 ↑ \uparrow \uparrow63 ↪ \hookrightarrow \hookrightarrow
29 ↓ \downarrow \downarrow64 ↩ \hookleftarrow \hookleftarrow
30 ↕ \updownarrow \updownarrow65 ⊸ \multimap \multimap
31 ↗ \nearrow \nearrow66 ↭ \leftrightsquigarrow \leftrightsquigarrow
32 ↙ \swarrow \swarrow67 ⇝ \rightsquigarrow \rightsquigarrow
33 ↖ \nwarrow \nwarrow68 ↠ \twoheadrightarrow \twoheadrightarrow
34 ↘ \searrow \searrow69 ↞ \twoheadleftarrow \twoheadleftarrow
35 ↦ \mapsto \mapsto

特殊

序号图标LaTeX序号图标LaTeX
1 ∞ \infty \infty33 ♭ \flat \flat
2 ℵ \aleph \aleph34 ♮ \natural \natural
3 ∁ \complement \complement35 ♯ \sharp \sharp
4 ∍ \backepsilon \backepsilon36 ╱ \diagup \diagup
5 ð \eth ð\eth37 ╲ \diagdown \diagdown
6 Ⅎ \Finv \Finv38 ⋅ \centerdot \centerdot
7 ℏ \hbar \hbar39 ⋉ \ltimes \ltimes
8 ℑ \Im \Im40 ⋊ \rtimes \rtimes
9 ı \imath ı\imath41 ⋋ \leftthreetimes \leftthreetimes
10 ȷ \jmath ȷ\jmath42 ⋌ \rightthreetimes \rightthreetimes
11 k \Bbbk k\Bbbk43 ≖ \eqcirc \eqcirc
12 ℓ \ell \ell44 ≗ \circeq \circeq
13 ℧ \mho \mho45 ≜ \triangleq \triangleq
14 ℘ \wp \wp46 ≏ \bumpeq \bumpeq
15 ℜ \Re \Re47 ≎ \Bumpeq \Bumpeq
16 Ⓢ \circledS \circledS48 ≑ \doteqdot \doteqdot
17 ⨿ \amalg ⨿\amalg49 ≓ \risingdotseq \risingdotseq
18 % \% %%50 ≒ \fallingdotseq \fallingdotseq
19 † \dagger \dagger51 ⊺ \intercal \intercal
20 ‡ \ddagger \ddagger52 ⊼ \barwedge \barwedge
21 … \ldots \ldots53 ⊻ \veebar \veebar
22 ⋯ \cdots \cdots54 ⩞ \doublebarwedge \doublebarwedge
23 ⌣ \smile \smile55 ≬ \between \between
24 ⌢ \frown \frown56 ⋔ \pitchfork \pitchfork
25 ≀ \wr \wr57 ⊲ \vartriangleleft \vartriangleleft
26 ◃ \triangleleft \triangleleft58 ⋪ \ntriangleleft \ntriangleleft
27 ▹ \triangleright \triangleright59 ⊳ \vartriangleright \vartriangleright
28 ♢ \diamondsuit \diamondsuit60 ⋫ \ntriangleright \ntriangleright
29 ♡ \heartsuit \heartsuit61 ⊴ \trianglelefteq \trianglelefteq
30 ♣ \clubsuit \clubsuit62 ⋬ \ntrianglelefteq \ntrianglelefteq
31 ♠ \spadesuit \spadesuit63 ⊵ \trianglerighteq \trianglerighteq
32 ⅁ \Game \Game64 ⋭ \ntrianglerighteq \ntrianglerighteq

2.运算与函数

分数

类型样式LaTeX
分数 2 4 x = 0.5 x \frac{2}{4}x=0.5x 42x=0.5x\frac{2}{4}x=0.5x
小型分数 2 4 x = 0.5 x \tfrac{2}{4}x = 0.5x 42x=0.5x\tfrac{2}{4}x = 0.5x
大型分数(不嵌套) 2 4 = 0.5 2 c + 2 d + 2 4 = a \dfrac{2}{4} = 0.5 \qquad \dfrac{2}{c + \dfrac{2}{d + \dfrac{2}{4}}} = a 42=0.5c+d+4222=a\dfrac{2}{4} = 0.5 \qquad \dfrac{2}{c + \dfrac{2}{d + \dfrac{2}{4}}} = a
大型分数(嵌套) 2 c + 2 d + 2 4 = a \cfrac{2}{c + \cfrac{2}{d + \cfrac{2}{4}}} = a c+d+4222=a\cfrac{2}{c + \cfrac{2}{d + \cfrac{2}{4}}} = a
约分线的使用 x 1 + y y = x 2 \cfrac{x}{1 + \cfrac{\cancel{y}}{\cancel{y}}} = \cfrac{x}{2} 1+y y x=2x\cfrac{x}{1 + \cfrac{\cancel{y}}{\cancel{y}}} = \cfrac{x}{2}

标准数值函数

样式LaTeX
exp ⁡ a b = a b , exp ⁡ b = e b , 1 0 m \exp_a b = a^b, \exp b = e^b, 10^m expab=ab,expb=eb,10m\exp_a b = a^b, \exp b = e^b, 10^m
ln ⁡ c , lg ⁡ d = log ⁡ e , log ⁡ 10 f \ln c, \lg d = \log e, \log_{10} f lnc,lgd=loge,log10f\ln c, \lg d = \log e, \log_{10} f
sin ⁡ a , cos ⁡ b , tan ⁡ c , cot ⁡ d , sec ⁡ e , csc ⁡ f \sin a, \cos b, \tan c, \cot d, \sec e, \csc f sina,cosb,tanc,cotd,sece,cscf\sin a, \cos b, \tan c, \cot d, \sec e, \csc f
arcsin ⁡ a , arccos ⁡ b , arctan ⁡ c \arcsin a, \arccos b, \arctan c arcsina,arccosb,arctanc\arcsin a, \arccos b, \arctan c
arccot ⁡ d , arcsec ⁡ e , arccsc ⁡ f \operatorname{arccot} d, \operatorname{arcsec} e, \operatorname{arccsc} f arccotd,arcsece,arccscf\operatorname{arccot} d, \operatorname{arcsec} e, \operatorname{arccsc} f
sinh ⁡ a , cosh ⁡ b , tanh ⁡ c , coth ⁡ d \sinh a, \cosh b, \tanh c, \coth d sinha,coshb,tanhc,cothd\sinh a, \cosh b, \tanh c, \coth d
sh ⁡ k , ch ⁡ l , th ⁡ m , coth ⁡ n \operatorname{sh}k, \operatorname{ch}l, \operatorname{th}m, \operatorname{coth}n shk,chl,thm,cothn\operatorname{sh}k, \operatorname{ch}l, \operatorname{th}m, \operatorname{coth}n
argsh ⁡ o , argch ⁡ p , argth ⁡ q \operatorname{argsh}o, \operatorname{argch}p, \operatorname{argth}q argsho,argchp,argthq\operatorname{argsh}o, \operatorname{argch}p, \operatorname{argth}q
sgn ⁡ r , ∣ s ∣ \operatorname{sgn}r, \left\vert s \right\vert sgnr,s\operatorname{sgn}r, \left\vert s \right\vert
min ⁡ ( x , y ) , max ⁡ ( x , y ) \min(x,y), \max(x,y) min(x,y),max(x,y)\min(x,y), \max(x,y)

根式

样式LaTeX
√ \surd \surd
π \sqrt{\pi} π \sqrt{\pi}
π n \sqrt[n]{\pi} nπ \sqrt[n]{\pi}
x 3 + y 3 2 3 \sqrt[3]{\frac{x^3+y^3}{2}} 32x3+y3 \sqrt[3]{\frac{x3+y3}{2}}

微分与导数

样式LaTeX
d t , d t , ∂ t , ∇ ψ dt, \mathrm{d}t, \partial t, \nabla\psi dt,dt,t,ψdt, \mathrm{d}t, \partial t, \nabla\psi
d y / d x , d y / d x , d y d x , d y d x , ∂ 2 ∂ x 1 ∂ x 2 y dy/dx, \mathrm{d}y/\mathrm{d}x, \frac{dy}{dx}, \frac{\mathrm{d}y}{\mathrm{d}x}, \frac{\partial^2}{\partial x_1\partial x_2}y dy/dx,dy/dx,dxdy,dxdy,x1x22ydy/dx, \mathrm{d}y/\mathrm{d}x, \frac{dy}{dx}, \frac{\mathrm{d}y}{\mathrm{d}x}, \frac{\partial^2}{\partial x_1\partial x_2}y
′ , ‵ , f ′ , f ′ , f ′ ′ , f ( 3 ) , y ˙ , y ¨ \prime, \backprime, f^\prime, f', f'', f^{(3)}, \dot y, \ddot y ,,f,f,f,f(3),y˙,y¨\prime, \backprime, f^\prime, f’, f’', f^{(3)}, \dot y, \ddot y

同余与模算术

样式LaTeX
s k ≡ 0 ( m o d m ) s_k \equiv 0 \pmod{m} sk0(modm)s_k \equiv 0 \pmod{m}
a   m o d   b a \bmod b amodba \bmod b
gcd ⁡ ( m , n ) , lcm ⁡ ( m , n ) \gcd(m, n), \operatorname{lcm}(m, n) gcd(m,n),lcm(m,n)\gcd(m, n), \operatorname{lcm}(m, n)
∣ , ∤ , ∣ , ∤ \mid, \nmid, \shortmid, \nshortmid ,,,\mid, \nmid, \shortmid, \nshortmid

极限

样式LaTeX
lim ⁡ n → ∞ x n \lim_{n \to \infty}x_n limnxn\lim_{n \to \infty}x_n
lim ⁡ n → ∞ x n \textstyle \lim_{n \to \infty}x_n limnxn\textstyle \lim_{n \to \infty}x_n

界限与投影

样式LaTeX
min ⁡ x , max ⁡ y , inf ⁡ s , sup ⁡ t \min x, \max y, \inf s, \sup t minx,maxy,infs,supt\min x, \max y, \inf s, \sup t
lim ⁡ u , lim inf ⁡ v , lim sup ⁡ w \lim u, \liminf v, \limsup w limu,liminfv,limsupw\lim u, \liminf v, \limsup w
dim ⁡ p , deg ⁡ q , det ⁡ m , ker ⁡ ϕ \dim p, \deg q, \det m, \ker\phi dimp,degq,detm,kerϕ\dim p, \deg q, \det m, \ker\phi
Pr ⁡ j , hom ⁡ l , ∥ z ∥ , arg ⁡ z \Pr j, \hom l, \lVert z \rVert, \arg z Prj,homl,z,argz\Pr j, \hom l, \lVert z \rVert, \arg z

积分

样式LaTeX
∫ 1 3 e 3 / x x 2   d x \int\limits_{1}^{3}\frac{e^3/x}{x^2}\, dx 13x2e3/xdx\int\limits_{1}{3}\frac{e3/x}{x^2}, dx
∫ 1 3 e 3 / x x 2   d x \int_{1}^{3}\frac{e^3/x}{x^2}\, dx 13x2e3/xdx\int_{1}{3}\frac{e3/x}{x^2}, dx
∫ − N N e x d x \textstyle \int\limits_{-N}^{N} e^x dx NNexdx\textstyle \int\limits_{-N}^{N} e^x dx
∫ − N N e x d x \textstyle \int_{-N}^{N} e^x dx NNexdx\textstyle \int_{-N}^{N} e^x dx
∬ D d x   d y \iint\limits_D dx\,dy Ddxdy\iint\limits_D dx,dy
∭ E d x   d y   d z \iiint\limits_E dx\,dy\,dz Edxdydz\iiint\limits_E dx,dy,dz
KaTeX parse error: Undefined control sequence: \iiiint at position 1: \̲i̲i̲i̲i̲n̲t̲\limits_F dx\,d…\iiiint\limits_F dx,dy,dz,dt
∫ ( x , y ) ∈ C x 3   d x + 4 y 2   d y \int_{(x,y)\in C} x^3\, dx + 4y^2\, dy (x,y)Cx3dx+4y2dy\int_{(x,y)\in C} x^3, dx + 4y^2, dy
∮ ( x , y ) ∈ C x 3   d x + 4 y 2   d y \oint_{(x,y)\in C} x^3\, dx + 4y^2\, dy (x,y)Cx3dx+4y2dy\oint_{(x,y)\in C} x^3, dx + 4y^2, dy
KaTeX parse error: Undefined control sequence: \unicode at position 1: \̲u̲n̲i̲c̲o̲d̲e̲{8751} \unicod…\unicode{8751} \unicode{x222F}_C
KaTeX parse error: Undefined control sequence: \unicode at position 1: \̲u̲n̲i̲c̲o̲d̲e̲{8752} \unicod…\unicode{8752} \unicode{x2230}_C
KaTeX parse error: Undefined control sequence: \unicode at position 1: \̲u̲n̲i̲c̲o̲d̲e̲{8753} \unicode…\unicode{8753} \unicode{x2231}_c
KaTeX parse error: Undefined control sequence: \unicode at position 1: \̲u̲n̲i̲c̲o̲d̲e̲{8754} \unicode…\unicode{8754} \unicode{x2232}_c
KaTeX parse error: Undefined control sequence: \unicode at position 1: \̲u̲n̲i̲c̲o̲d̲e̲{8755} \unicode…\unicode{8755} \unicode{x2233}_c

其他大型运算

类别样式LaTeX
求和 ∑ a b \sum_{a}^{b} ab\sum_{a}^{b}
连乘积 ∏ a b \prod_{a}^{b} ab\prod_{a}^{b}
余积 ∐ a b \coprod_{a}^{b} ab\coprod_{a}^{b}
并集 ⋃ a b \bigcup_{a}^{b} ab\bigcup_{a}^{b}
交集 ⋂ a b \bigcap_{a}^{b} ab\bigcap_{a}^{b}
析取 ⋁ a b \bigvee_{a}^{b} ab\bigvee_{a}^{b}
合取 ⋀ a b \bigwedge_{a}^{b} ab\bigwedge_{a}^{b}

3.上下标

类型样式代码
上标 Superscript a 2 , a x + 3 a^2, a^{x+3} a2,ax+3a^2, a^{x+3}
下标 Subscript a 2 a_2 a2a_2
组合 Grouping 1 0 30 a 2 + 2 10^{30} a^{2+2} 1030a2+210^{30} a^{2+2}
a i , j b f ′ a_{i,j} b_{f'} ai,jbfa_{i,j} b_{f’}
上下标混合Combining sub & super without and with horizontal separation x 2 3 x_2^3 x23x_2^3
x 2 3 {x_2}^3 x23{x_2}^3
上标的上标 Super super 1 0 1 0 8 10^{10^{8}} 1010810{10{8}}
混合标识 Preceding and/or additional sub & superKaTeX parse error: Undefined control sequence: \sideset at position 1: \̲s̲i̲d̲e̲s̲e̲t̲{_1^2}{_3^4}X_a…\sideset{_12}{_34}X_a^b
1 2  ⁣ Ω 3 4 {}_1^2\!\Omega_3^4 12Ω34{}_12!\Omega_34
顶标底标 Stacking ω α \overset{\alpha}{\omega} ωα\overset{\alpha}{\omega}
ω α \underset{\alpha}{\omega} αω\underset{\alpha}{\omega}
ω γ α \overset{\alpha}{\underset{\gamma}{\omega}} γωα\overset{\alpha}{\underset{\gamma}{\omega}}
ω α \stackrel{\alpha}{\omega} ωα\stackrel{\alpha}{\omega}
导数 Derivatives x ′ , y ′ ′ , f ′ , f ′ ′ x', y'', f', f'' x,y,f,fx’, y’‘, f’, f’’
x ′ , y ′ ′ x^\prime, y^{\prime\prime} x,yx^\prime, y^{\prime\prime}
导数Derivative dots x ˙ , x ¨ \dot{x}, \ddot{x} x˙,x¨\dot{x}, \ddot{x}
下划线、上划线与向量
Underlines, overlines, vectors
a ^   b ˉ   c ⃗ \hat a \ \bar b \ \vec c a^ bˉ c \hat a \ \bar b \ \vec c
a b →   c d ←   d e f ^ \overrightarrow{a b} \ \overleftarrow{c d} \ \widehat{d e f} ab  cd  def \overrightarrow{a b} \ \overleftarrow{c d} \ \widehat{d e f}
g h i ‾   j k l ‾ \overline{g h i} \ \underline{j k l} ghi jkl\overline{g h i} \ \underline{j k l}
弧度 Arc (workaround) A B ⌢ \overset{\frown} {AB} AB\overset{\frown} {AB}
箭头 Arrows A ← n + μ − 1 B → T n ± i − 1 C A \xleftarrow{n+\mu-1} B \xrightarrow[T]{n\pm i-1} C An+μ1 Bn±i1 TCA \xleftarrow{n+\mu-1} B \xrightarrow[T]{n\pm i-1} C
大括号 Overbraces 1 + 2 + ⋯ + 100 ⏞ 5050 \overbrace{ 1+2+\cdots+100 }^{5050} 1+2++100 5050\overbrace{ 1+2+\cdots+100 }^{5050}
底部大括号 Underbraces a + b + ⋯ + z ⏟ 26 \underbrace{ a+b+\cdots+z }_{26} 26 a+b++z\underbrace{ a+b+\cdots+z }_{26}
求和运算 Sum ∑ k = 1 N k 2 \sum_{k=1}^N k^2 k=1Nk2\sum_{k=1}^N k^2
文本模式下的求和运算 Sum (force \textstyle) ∑ k = 1 N k 2 \textstyle \sum_{k=1}^N k^2 k=1Nk2\textstyle \sum_{k=1}^N k^2
分式中的求和运算 Sum in a fraction (default \textstyle) ∑ k = 1 N k 2 a \frac{\sum_{k=1}^N k^2}{a} ak=1Nk2\frac{\sum_{k=1}^N k^2}{a}
分式中的求和运算 Sum in a fraction (force \displaystyle) ∑ k = 1 N k 2 a \frac{\displaystyle \sum_{k=1}^N k^2}{a} ak=1Nk2\frac{\displaystyle \sum_{k=1}^N k^2}{a}
分式中的求和运算 Sum in a fraction (alternative limits style) ∑ k = 1 N k 2 a \frac{\sum\limits^{^N}_{k=1} k^2}{a} ak=1Nk2\frac{\sum\limits{N}_{k=1} k^2}{a}
乘积运算 Product ∏ i = 1 N x i \prod_{i=1}^N x_i i=1Nxi\prod_{i=1}^N x_i
乘积运算 Product (force \textstyle) ∏ i = 1 N x i \textstyle \prod_{i=1}^N x_i i=1Nxi\textstyle \prod_{i=1}^N x_i
副乘运算 Coproduct ∐ i = 1 N x i \coprod_{i=1}^N x_i i=1Nxi\coprod_{i=1}^N x_i
副乘运算 Coproduct (force \textstyle) ∐ i = 1 N x i \textstyle \coprod_{i=1}^N x_i i=1Nxi\textstyle \coprod_{i=1}^N x_i
极限 Limit lim ⁡ n → ∞ x n \lim_{n \to \infty}x_n nlimxn\lim_{n \to \infty}x_n
极限 Limit (force \textstyle) lim ⁡ n → ∞ x n \textstyle \lim_{n \to \infty}x_n limnxn\textstyle \lim_{n \to \infty}x_n
积分 Integral ∫ 1 3 e 3 / x x 2   d x \int\limits_{1}^{3}\frac{e^3/x}{x^2}\, dx 13x2e3/xdx\int\limits_{1}{3}\frac{e3/x}{x^2}, dx
积分 Integral (alternative limits style) ∫ 1 3 e 3 / x x 2   d x \int_{1}^{3}\frac{e^3/x}{x^2}\, dx 13x2e3/xdx\int_{1}{3}\frac{e3/x}{x^2}, dx
积分 Integral (force \textstyle) ∫ − N N e x d x \textstyle \int\limits_{-N}^{N} e^x dx NNexdx\textstyle \int\limits_{-N}^{N} e^x dx
积分 Integral (force \textstyle, alternative limits style) ∫ − N N e x d x \textstyle \int_{-N}^{N} e^x dx NNexdx\textstyle \int_{-N}^{N} e^x dx
双重积分 Double integral ∬ D d x   d y \iint\limits_D dx\,dy Ddxdy\iint\limits_D dx,dy
三重积分 Triple integral ∭ E d x   d y   d z \iiint\limits_E dx\,dy\,dz Edxdydz\iiint\limits_E dx,dy,dz
四重积分 Quadruple integralKaTeX parse error: Undefined control sequence: \iiiint at position 1: \̲i̲i̲i̲i̲n̲t̲\limits_F dx\,d…\iiiint\limits_F dx,dy,dz,dt
路径积分 Line or path integral ∫ ( x , y ) ∈ C x 3   d x + 4 y 2   d y \int_{(x,y)\in C} x^3\, dx + 4y^2\, dy (x,y)Cx3dx+4y2dy\int_{(x,y)\in C} x^3, dx + 4y^2, dy
环路积分 Closed line or path integral ∮ ( x , y ) ∈ C x 3   d x + 4 y 2   d y \oint_{(x,y)\in C} x^3\, dx + 4y^2\, dy (x,y)Cx3dx+4y2dy\oint_{(x,y)\in C} x^3, dx + 4y^2, dy
交集 Intersections ⋂ i = 1 n E i \bigcap_{i=1}^n E_i i=1nEi\bigcap_{i=1}^n E_i
并集 Unions ⋃ i = 1 n E i \bigcup_{i=1}^n E_i i=1nEi\bigcup_{i=1}^n E_i

4.矩阵与多行列式

类型样式LaTeX
二项式系数 ( n k ) \binom{n}{k} (kn)\binom{n}{k}
小型二项式系数 ( n k ) \tbinom{n}{k} (kn)\tbinom{n}{k}
大型二项式系数 ( n k ) \dbinom{n}{k} (kn)\dbinom{n}{k}
矩阵 x y z v \begin{matrix} x & y \\z & v\end{matrix} xzyv\begin{matrix}
x & y \\
z & v<\end{matrix}
∣ x y z v ∣ \begin{vmatrix} x & y \\ z & v \end{vmatrix} xzyv\begin{vmatrix}
x & y \\
z & v
\end{vmatrix}
$\begin{Vmatrix} x & y \ z & v \end{Vmatrix} $"\begin{Vmatrix}
x & y \\
z & v
\end{Vmatrix}
[ 0 ⋯ 0 ⋮ ⋱ ⋮ 0 ⋯ 0 ] \begin{bmatrix} 0 & \cdots & 0 \\ \vdots & \ddots & \vdots \\ 0 & \cdots & 0 \end{bmatrix} 0000\begin{bmatrix}
0 & \cdots & 0 \\
\vdots & \ddots & \vdots \\
0 & \cdots & 0
\end{bmatrix}
{ x y z v } \begin{Bmatrix} x & y \\ z & v \end{Bmatrix} {xzyv}\begin{Bmatrix}
x & y \\
z & v
\end{Bmatrix}
( x y z v ) \begin{pmatrix} x & y \\ z & v \end{pmatrix} (xzyv)\begin{pmatrix}
x & y \\
z & v
\end{pmatrix}
KaTeX parse error: No such environment: smallmatrix at position 14: \bigl( \begin{̲s̲m̲a̲l̲l̲m̲a̲t̲r̲i̲x̲}̲ a&b\\ c&d \end…\bigl( \begin{smallmatrix}
a&b\\
c&d
\end{smallmatrix} \bigr)
条件定义 f ( n ) = { n / 2 , if  n  is even 3 n + 1 , if  n  is odd f(n) =\begin{cases} n/2, & \text{if }n\text{ is even} \\ 3n+1, & \text{if }n\text{ is odd} \end{cases} f(n)={n/2,3n+1,if n is evenif n is oddf(n) =
\begin{cases}
n/2, & \text{if }n\text{ is even} \\
3n+1, & \text{if }n\text{ is odd}
\end{cases}
多行等式KaTeX parse error: No such environment: align at position 7: \begin{̲a̲l̲i̲g̲n̲}̲ f(x) & = (a+b)…\begin{align}
f(x) & = (a+b)^2\\
& = a^2 + 2ab + b^2 \\
\end{align}
KaTeX parse error: No such environment: alignat at position 7: \begin{̲a̲l̲i̲g̲n̲a̲t̲}̲{2} f(x) & = (a…\begin{alignat}{2}
f(x) & = (a-b)^2 \\
& = a^2 - 2ab + b^2 \\
\end{alignat}
z = a f ( x , y , z ) = x + y + z \begin{array}{lcl} z & = & a \\ f(x,y,z) & = & x + y + z \end{array} zf(x,y,z)==ax+y+z\begin{array}{lcl}
z & = & a \\
f(x,y,z) & = & x + y + z
\end{array}
z = a f ( x , y , z ) = x + y + z \begin{array}{lcr} z & = & a \\ f(x,y,z) & = & x + y + z \end{array} zf(x,y,z)==ax+y+z\begin{array}{lcr}
z & = & a \\
f(x,y,z) & = & x + y + z
\end{array}
方程组 { 3 x + 5 y + z 7 x − 2 y + 4 z − 6 x + 3 y + 2 z \begin{cases} 3x + 5y + z \\ 7x - 2y + 4z \\ -6x + 3y + 2z \end{cases} 3x+5y+z7x2y+4z6x+3y+2z\begin{cases}
3x + 5y + z \\
7x - 2y + 4z \\
-6x + 3y + 2z
\end{cases}
数组$\begin{array}{c

5.括号

类型样式LaTeX
圆括号、小括号 ( a b ) \left ( \frac{a}{b} \right ) (ba)\left ( \frac{a}{b} \right )
方括号、中括号 [ a b ] [ a b ] \left [ \frac{a}{b} \right ] \quad \left \lbrack \frac{a}{b} \right \rbrack [ba][ba]\left [ \frac{a}{b} \right ] \quad
\left \lbrack \frac{a}{b} \right \rbrack
花括号、大括号 { a b } { a b } \left \{ \frac{a}{b} \right \} \quad \left \lbrace \frac{a}{b} \right \rbrace {ba}{ba}\left { \frac{a}{b} \right } \quad
\left \lbrace \frac{a}{b} \right \rbrace
角括号 ⟨ a b ⟩ \left \langle \frac{a}{b} \right \rangle ba\left \langle \frac{a}{b} \right \rangle
单竖线和双竖线$\left\frac{a}{b} \right \vert \quad \left \Vert \frac{c}{d} \right |$
取整函数与取顶函数 ⌊ a b ⌋ ⌈ c d ⌉ \left \lfloor \frac{a}{b} \right \rfloor \quad \left \lceil \frac{c}{d} \right \rceil badc\left \lfloor \frac{a}{b} \right \rfloor \quad
\left \lceil \frac{c}{d} \right \rceil
斜线与反斜线 / a b \ \left / \frac{a}{b} \right \backslash /ba\\left / \frac{a}{b} \right \backslash
上下箭头 ↑ a b ↓ ⇑ a b ⇓ ↕ a b ⇕ \left \uparrow \frac{a}{b} \right \downarrow \quad \left \Uparrow \frac{a}{b} \right \Downarrow \quad \left \updownarrow \frac{a}{b} \right \Updownarrow bababa\left \uparrow \frac{a}{b} \right \downarrow \quad
\left \Uparrow \frac{a}{b} \right \Downarrow \quad
\left \updownarrow \frac{a}{b} \right \Updownarrow
混合括号$\left [ 0,1 \right ) \left \langle \psi \right$
如果您不希望某一侧括号显示,可以使用\left. 和 \right.(带有英文句号) A B } → X \left . \frac{A}{B} \right \} \to X BA}X\left . \frac{A}{B} \right } \to X
括号的大小 ( ( ( ( ( …   ] ] ] ] ] ( \bigl( \Bigl( \biggl( \Biggl( \dots \Biggr] \biggr] \Bigr] \bigr] ] (((((]]]]]( \bigl( \Bigl( \biggl( \Biggl( \dots \Biggr] \biggr] \Bigr] \bigr] ]
{ { { { { …   ⟩ ⟩ ⟩ ⟩ ⟩ \{ \bigl\{ \Bigl\{ \biggl\{ \Biggl\{ \dots \Biggr\rangle \biggr\rangle \Bigr\rangle \bigr\rangle \rangle {{{{{{ \bigl{ \Bigl{ \biggl{ \Biggl{ \dots
\Biggr\rangle \biggr\rangle \Bigr\rangle \bigr\rangle \rangle
$|\big|\Big|\bigg|\Bigg|\dots \Bigg\bigg\Big
⌊ ⌊ ⌊ ⌊ ⌊ …   ⌉ ⌉ ⌉ ⌉ ⌉ \lfloor \bigl\lfloor \Bigl\lfloor \biggl\lfloor \Biggl\lfloor \dots \Biggr\rceil \biggr\rceil \Bigr\rceil \bigr\rceil \rceil \lfloor \bigl\lfloor \Bigl\lfloor \biggl\lfloor \Biggl\lfloor \dots
\Biggr\rceil \biggr\rceil \Bigr\rceil \bigr\rceil \rceil
↑ ↑ ↑ ↑ ↑ … ⇓ ⇓ ⇓ ⇓ ⇓ \uparrow \big\uparrow \Big\uparrow \bigg\uparrow \Bigg\uparrow \dots \Bigg\Downarrow \bigg\Downarrow \Big\Downarrow \big\Downarrow \Downarrow \uparrow \big\uparrow \Big\uparrow \bigg\uparrow \Bigg\uparrow \dots
\Bigg\Downarrow \bigg\Downarrow \Big\Downarrow \big\Downarrow \Downarrow
↕ ↕ ↕ ↕ ↕ … ⇕ ⇕ ⇕ ⇕ ⇕ \updownarrow \big\updownarrow \Big\updownarrow \bigg\updownarrow \Bigg\updownarrow \dots \Bigg\Updownarrow \bigg\Updownarrow \Big\Updownarrow \big\Updownarrow \Updownarrow \updownarrow \big\updownarrow \Big\updownarrow \bigg\updownarrow \Bigg\updownarrow \dots
\Bigg\Updownarrow \bigg\Updownarrow \Big\Updownarrow \big\Updownarrow \Updownarrow
/ / / / / … \ \ \ \ \ / \big/ \Big/ \bigg/ \Bigg/ \dots \Bigg\backslash \bigg\backslash \Big\backslash \big\backslash \backslash /////\\\\\/ \big/ \Big/ \bigg/ \Bigg/ \dots
\Bigg\backslash \bigg\backslash \Big\backslash \big\backslash \backslash

6.空格与换行

空格

自定义间距

样式LaTeX说明
a b a \qquad b aba \qquad b双空格
a b a \quad b aba \quad b单空格
a   b a\ b a ba\ b字符空格
a   b a \text{ } b a ba \text{ } b文本模式中的字符空格
a    b a\;b aba;b大空格
a   b a\,b aba,b小空格
a b ab abab极小空格(用于乘因子)
a b a b aba b极小空格(用于区分其它语法)
a b \mathit{ab} ab\mathit{ab}没有空格(用于多字母变量)
a  ⁣ b a\!b aba!b负空格

换行

在MathJax3.0中取消了使用\\进行强制换行的功能,因此本页面也采取同样的逻辑,默认为单行公式环境。\\强制换行命令只在支持多行编辑的数学环境中才起作用,如eqnarray环境、align环境、array环境、matrix环境等等。如您需要显示多行公式,请在此类环境中输入公式,具体用法参见章节[2.10](#2.10 LaTeX环境 LaTeX environments)。

7.颜色

字体颜色

在公式中可以使用\color{options}{math}来调用颜色命令,第一个参数为颜色,第二个参数为公式或文本内容。例如:

{\color{Blue}x^2}+{\color{Orange}2x}-{\color{LimeGreen}1}

x 2 + 2 x − 1 {\color{Blue}x^2}+{\color{Orange}2x}-{\color{LimeGreen}1} x2+2x1

x_{1,2}=\frac{{\color{Blue}-b}\pm\sqrt{\color{Red}b^2-4ac}}{\color{Green}2a }

x 1 , 2 = − b ± b 2 − 4 a c 2 a x_{1,2}=\frac{{\color{Blue}-b}\pm\sqrt{\color{Red}b^2-4ac}}{\color{Green}2a } x1,2=2ab±b24ac

背景颜色

在文本环境中可以使用\colorbox{options}{text}来调用背景颜色命令,第一个参数为颜色,第二个颜色为文本内容。例如:

\colorbox{yellow}{Thistext}

text \colorbox{yellow}{text} text

注意: 若需要在数学环境中使用\colorbox{}{},请在第二个参数内加入$\displaystyle + 公式$,例如:

\colorbox{yellow}{$\displaystyle \frac{a}{b}$}`

a b \colorbox{yellow}{$\displaystyle \frac{a}{b}$} ba

或者您可以使用 Bbox扩展 来替换\colorbox命令,详见下条2.7.3。

用Bbox扩展设置背景颜色

设置背景颜色

在公式中可以使用\bbox[options]{math}来调用背景颜色命令,第一个参数为颜色或大小,需注意用[ ]包围,第二个参数为公式。例如:

\bbox[red]{x+y}

KaTeX parse error: Undefined control sequence: \bbox at position 2: \̲b̲b̲o̲x̲[red]{x+y}

调整背景大小

默认情况下,背景大小为作用范围的最大边界,如需扩大背景,可在第一个参数中加入大小信息,例如:

\bbox[2pt]{x+y}  %设置透明背景,并增加2pt额外距离

KaTeX parse error: Undefined control sequence: \bbox at position 2: \̲b̲b̲o̲x̲[2pt]{x+y}

\bbox[red,5pt]{x+y}  %设置红色背景,并增加5pt额外距离

KaTeX parse error: Undefined control sequence: \bbox at position 2: \̲b̲b̲o̲x̲[red,5pt]{x+y}

默认支持颜色

A p r i c o t {\color{Apricot}Apricot} Apricot E m e r a l d {\color{Emerald}Emerald} Emerald O l i v e G r e e n {\color{OliveGreen}OliveGreen} OliveGreen R u b i n e R e d {\color{RubineRed}RubineRed} RubineRed
A q u a m a r i n e {\color{Aquamarine}Aquamarine} Aquamarine F o r e s t G r e e n {\color{ForestGreen}ForestGreen} ForestGreen O r a n g e {\color{Orange}Orange} Orange S a l m o n {\color{Salmon}Salmon} Salmon
B i t t e r s w e e t {\color{Bittersweet}Bittersweet} Bittersweet F u c h s i a {\color{Fuchsia}Fuchsia} Fuchsia O r a n g e R e d {\color{OrangeRed}OrangeRed} OrangeRed S e a G r e e n {\color{SeaGreen}SeaGreen} SeaGreen
B l a c k {\color{Black}Black} Black G o l d e n r o d {\color{Goldenrod}Goldenrod} Goldenrod O r c h i d {\color{Orchid}Orchid} Orchid S e p i a {\color{Sepia}Sepia} Sepia
B l u e {\color{Blue}Blue} Blue G r a y {\color{Gray}Gray} Gray P e a c h {\color{Peach}Peach} Peach S k y B l u e {\color{SkyBlue}SkyBlue} SkyBlue
B l u e G r e e n {\color{BlueGreen}BlueGreen} BlueGreen G r e e n {\color{Green}Green} Green P e r i w i n k l e {\color{Periwinkle}Periwinkle} Periwinkle S p r i n g G r e e n {\color{SpringGreen}SpringGreen} SpringGreen
B l u e V i o l e t {\color{BlueViolet}BlueViolet} BlueViolet G r e e n Y e l l o w {\color{GreenYellow}GreenYellow} GreenYellow P i n e G r e e n {\color{PineGreen}PineGreen} PineGreen T a n {\color{Tan}Tan} Tan
B r i c k R e d {\color{BrickRed}BrickRed} BrickRed J u n g l e G r e e n {\color{JungleGreen}JungleGreen} JungleGreen P l u m {\color{Plum}Plum} Plum T e a l B l u e {\color{TealBlue}TealBlue} TealBlue
B r o w n {\color{Brown}Brown} Brown L a v e n d e r {\color{Lavender}Lavender} Lavender P r o c e s s B l u e {\color{ProcessBlue}ProcessBlue} ProcessBlue T h i s t l e {\color{Thistle}Thistle} Thistle
B u r n t O r a n g e {\color{BurntOrange}BurntOrange} BurntOrange L i m e G r e e n {\color{LimeGreen}LimeGreen} LimeGreen P u r p l e {\color{Purple}Purple} Purple T u r q u o i s e {\color{Turquoise}Turquoise} Turquoise
C a d e t B l u e {\color{CadetBlue}CadetBlue} CadetBlue M a g e n t a {\color{Magenta}Magenta} Magenta R a w S i e n n a {\color{RawSienna}RawSienna} RawSienna V i o l e t {\color{Violet}Violet} Violet
C a r n a t i o n P i n k {\color{CarnationPink}CarnationPink} CarnationPink M a h o g a n y {\color{Mahogany}Mahogany} Mahogany R e d {\color{Red}Red} Red V i o l e t R e d {\color{VioletRed}VioletRed} VioletRed
C e r u l e a n {\color{Cerulean}Cerulean} Cerulean M a r o o n {\color{Maroon}Maroon} Maroon R e d O r a n g e {\color{RedOrange}RedOrange} RedOrange W h i t e {\color{White}White} White
C o r n f l o w e r B l u e {\color{CornflowerBlue}CornflowerBlue} CornflowerBlue M e l o n {\color{Melon}Melon} Melon R e d V i o l e t {\color{RedViolet}RedViolet} RedViolet W i l d S t r a w b e r r y {\color{WildStrawberry}WildStrawberry} WildStrawberry
C y a n {\color{Cyan}Cyan} Cyan M i d n i g h t B l u e {\color{MidnightBlue}MidnightBlue} MidnightBlue R h o d a m i n e {\color{Rhodamine}Rhodamine} Rhodamine Y e l l o w {\color{Yellow}Yellow} Yellow
D a n d e l i o n {\color{Dandelion}Dandelion} Dandelion M u l b e r r y {\color{Mulberry}Mulberry} Mulberry R o y a l B l u e {\color{RoyalBlue}RoyalBlue} RoyalBlue Y e l l o w G r e e n {\color{YellowGreen}YellowGreen} YellowGreen
D a r k O r c h i d {\color{DarkOrchid}DarkOrchid} DarkOrchid N a v y B l u e {\color{NavyBlue}NavyBlue} NavyBlue R o y a l P u r p l e {\color{RoyalPurple}RoyalPurple} RoyalPurple Y e l l o w O r a n g e {\color{YellowOrange}YellowOrange} YellowOrange

使用RGB颜色

如需在\color命令中使用自选RGB颜色,可使用{\color[RGB]{0,0,0} } 命令,例如:

{\color[RGB]{0,200,0} e^{i \pi} + 1 = 0} 

KaTeX parse error: Expected '{', got '[' at position 9: {\color[̲RGB]{0,200,0} e…

自定义颜色

可使用\definecolor命令进行自定义颜色,例如:

\definecolor{mygreen}{RGB}{0,200,0} {\color{mygreen}e^{i \pi} + 1 = 0 } 

KaTeX parse error: Undefined control sequence: \definecolor at position 2: \̲d̲e̲f̲i̲n̲e̲c̲o̲l̲o̲r̲{mygreen}{RGB}{…

8.字体字号

字体

样式LaTeX
黑板报体
A B C D E F G H I \mathbb{ABCDEFGHI} ABCDEFGHI\mathbb{ABCDEFGHI}
粗体
A B C D E F G H I \mathbf{ABCDEFGHI} ABCDEFGHI\mathbf{ABCDEFGHI}
粗体希腊字母
A B Γ Δ E Z H Θ \boldsymbol{\mathrm{A} \mathrm{B} \Gamma \Delta \mathrm{E} \mathrm{Z} \mathrm{H} \Theta} ABΓΔEZHΘ\boldsymbol{\mathrm{A} \mathrm{B} \Gamma \Delta \mathrm{E} \mathrm{Z} \mathrm{H} \Theta}
斜体
0123456789 \mathit{0123456789} 0123456789\mathit{0123456789}
罗马体
A B C D E F G H I \mathrm{ABCDEFGHI} ABCDEFGHI\mathrm{ABCDEFGHI}
无衬线体
A B C D E F G H I \mathsf{ABCDEFGHI} ABCDEFGHI\mathsf{ABCDEFGHI}
手写体/花体
A B C D E F G H I \mathcal{ABCDEFGHI} ABCDEFGHI\mathcal{ABCDEFGHI}
德文尖角体
A B C D E F G H I \mathfrak{ABCDEFGHI} ABCDEFGHI\mathfrak{ABCDEFGHI}
小型手写体
abcdefghijklm {\scriptstyle\text{abcdefghijklm}} abcdefghijklm{\scriptstyle\text{abcdefghijklm}}

字号

样式LaTeX
a b c 巨 小 t i n y {\tiny abc巨小tiny} abctiny{\tiny abc巨小tiny}
a b c 超 小 s c r i p t s i z e {\scriptsize abc超小scriptsize} abcscriptsize{\scriptsize abc超小scriptsize}
a b c 小 s m a l l {\small abc小small} abcsmall{\small abc小small}
a b c 正 常 n o r m a l {\normalsize abc正常normal} abcnormal{\normalsize abc正常normal}
a b c 大 l a r g e {\large abc大large} abclarge{\large abc大large}
a b c 超 大 L a r g e {\Large abc超大Large} abcLarge{\Large abc超大Large}
a b c 特 大 L A R G E {\LARGE abc特大LARGE} abcLARGE{\LARGE abc特大LARGE}
a b c 巨 大 h u g e {\huge abc巨大huge} abchuge{\huge abc巨大huge}
a b c 巨 无 霸 H u g e {\Huge abc巨无霸Huge} abcHuge{\Huge abc巨无霸Huge}

注意:如您导出SVG格式,理论上字体的整体大小并无用处,因为SVG为矢量图,所以大可不必担心图片不清晰的问题,即便是您选择下载PNG格式的公式图片,图片整体尺寸也被默认设定为4K。所以此处的字号命令只为设置公式相对大小时使用,例如:

{\tiny x+y=z}x+y=z{\Huge x+y=z}

x + y = z x + y = z x + y = z {\tiny x+y=z}x+y=z{\Huge x+y=z} x+y=zx+y=zx+y=z

9.方程式编号

默认自动编号只在部分环境中起作用,如{equation}、{eqnarray}等,例如:

在AMS包开启状态下,会在公式后进行自动编号:

\begin{eqnarray}
E = mc^2 \\
e^{i\pi}+1=0 
\end{eqnarray}

KaTeX parse error: No such environment: eqnarray at position 8: \begin{̲e̲q̲n̲a̲r̲r̲a̲y̲}̲ E = mc^2 \tag{…

如您在开启了AMS包状态下,全部公式均不希望出现编号,可使用{equation*}、或者{eqnarray*}环境,如:

\begin{eqnarray*}
E = mc^2 \\
e^{i\pi}+1=0 
\end{eqnarray*}

KaTeX parse error: No such environment: eqnarray* at position 8: \begin{̲e̲q̲n̲a̲r̲r̲a̲y̲*̲}̲ E = mc^2 \\ e^…

如您在开启了AMS包状态下,个别公式不希望出现编号,或者个别公式希望出现特有编号,可在公式后面使用\tag{}或者\notag命令,如:

\begin{eqnarray}
E = mc^2 \notag\\
e^{i\pi}+1=0 \tag{b}
\end{eqnarray}

KaTeX parse error: No such environment: eqnarray at position 8: \begin{̲e̲q̲n̲a̲r̲r̲a̲y̲}̲ E = mc^2 \nota…

10.LaTeX环境

环境通常是对代码段的整体描述,用于表达此段代码的角色,如,是矩阵?单行公式?多行公式?还是对齐公式等(本页面不支持文档环境),不同的环境起到的作用不同。以\begin{environments}开始,\end{environments}结束。如最常用的矩阵命令,也是环境的一种,用法如下:

\begin{bmatrix}
1 & 0 \\
0 & 1
\end{bmatrix}

[ 1 0 0 1 ] \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} [1001]

equation环境

\begin{equation}是单行公式环境,这意味着在此环境中只可以输入单行公式,同时\\等强制换行命令失效。如需对单行长公式进行强制换行,可使用\begin{split}环境进行嵌套,并用&字符表示对齐位置,如:

\begin{equation}
\begin{split}
 e ^ { x } = & 1 + \frac { x } { 1 ! } + \frac { x ^ { 2 } } { 2 ! } + \frac { x ^ { 3 } } { 3 ! } + \cdots \\
& - \infty < x < \infty  
\end{split}
\end{equation}

KaTeX parse error: No such environment: equation at position 8: \begin{̲e̲q̲u̲a̲t̲i̲o̲n̲}̲ \begin{split} …

eqnarray环境

\begin{eqnarray}是多行公式环境,环境内的所有公式默认右对齐,由LaTeX内核提供。

align环境

\begin{align}是多行公式环境,环境内的所有公式默认右对齐,由amsmath提供,排版较为灵活,如需表示多行公式推荐使用此环境。

\begin{align}
y = x \\
y = 3x^2 + 5x + 2 
\end{align}

KaTeX parse error: No such environment: align at position 8: \begin{̲a̲l̲i̲g̲n̲}̲ y = x \\ y = 3…

可使用&字符调整对齐位置。

\begin{align}
y & = x \\
y & = 3x^2 + 5x + 2 
\end{align}

KaTeX parse error: No such environment: align at position 8: \begin{̲a̲l̲i̲g̲n̲}̲ y & = x \\ y &…

array环境

\begin{array}是数组环境,需手动输入对齐参数:

\begin{array}{|c|l|r|} 
a & b & S \\
\hline 
0 & 0 & 1 \\
0 & 1 & 1 \\
1 & 0 & 1 \\
1 & 1 & 0 \\
\end{array}

a b S 00 00 10 0 1 1 1 0 1 1 1 0 \begin{array}{|c|l|r|} a & b & S \\ \hline 00 & 00 & 10 \\ 0 & 1 & 1 \\ 1 & 0 & 1 \\ 1 & 1 & 0 \\ \end{array} a00011b00101S10110

对齐参数使用c l r分别表示居中、居左和居右,如需竖线边框可直接在对齐参数区域输入|即可,如需横线边框可使用\hline命令。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值