Matemaatilised valemid, mis on kirjutatud lähtudes LaTeX süntaksist, töötavad vaid siis, kui nende ümber asuvad <math> ja </math> käsud. Näiteks: <math>ax^2+bx=c</math> .
Kõik käsud LaTeX süntaksis algavad sümboliga \ . Ülejäänud artikkel tutvustab enimkasutatavaid käske LaTeX'i süntaksis.
Süntaks:
Tulemus:
\cdot \times : \pm \mp
⋅
×
:
±
∓
{\displaystyle \cdot \times :\pm \mp }
\cap \cup \vee \wedge \setminus \wr \forall \not \in \ni \neg \empty \exists
∩
∪
∨
∧
∖
≀
∀
∉∋
¬
∅
∃
{\displaystyle \cap \cup \vee \wedge \setminus \wr \forall \not \in \ni \neg \emptyset \exists }
\subseteq \supseteq \cong \subset \supset \varsubsetneq \varsupsetneq
⊆⊇≅⊂⊃
⊊⊋
{\displaystyle \subseteq \supseteq \cong \subset \supset \varsubsetneq \varsupsetneq }
= \sim \simeq \cong \le \leqslant \geqslant \ge \equiv \approx \ne \models
=∼≃≅≤⩽⩾≥≡≈≠⊨
{\displaystyle =\sim \simeq \cong \leq \leqslant \geqslant \geq \equiv \approx \neq \models }
\angle \perp \| \mid
∠
⊥
‖
∣
{\displaystyle \angle \perp \|\mid }
\star \circ \bullet \nabla \partial \triangleleft \triangleright \oplus \otimes \dagger \ddagger \frown \smile \ldots
⋆
∘
∙
∇
∂
◃
▹
⊕
⊗
†
‡
⌢⌣
…
{\displaystyle \star \circ \bullet \nabla \partial \triangleleft \triangleright \oplus \otimes \dagger \ddagger \frown \smile \ldots }
Süntaks:
Tulemus:
Harilikud murrud
\frac{2}{4} = {2 \over 4} (võrdväärsed)
2
4
=
2
4
{\displaystyle {\frac {2}{4}}={2 \over 4}}
Juured
\sqrt{abc} + \sqrt[3]{abc} + \sqrt[n+1]{abc}
a
b
c
+
a
b
c
3
+
a
b
c
n
+
1
{\displaystyle {\sqrt {abc}}+{\sqrt[{3}]{abc}}+{\sqrt[{n+1}]{abc}}}
Astmed ja indeksid
a^2 = a^{b+9}
a
2
=
a
b
+
9
{\displaystyle a^{2}=a^{b+9}}
a_2 + a_{i,j}
a
2
+
a
i
,
j
{\displaystyle a_{2}+a_{i,j}}
a_2^3 a_{2+3}^{4-5}
a
2
3
+
a
2
+
3
4
−
5
{\displaystyle a_{2}^{3}+a_{2+3}^{4-5}}
Logaritmid
\log_39=2
log
3
9
=
2
{\displaystyle \log _{3}9=2}
\ln e=1
ln
e
=
1
{\displaystyle \ln e=1}
Funktsioonid
f(x) = g'(x) \cdot h''(x)
f
(
x
)
=
g
′
(
x
)
⋅
h
″
(
x
)
{\displaystyle f(x)=g'(x)\cdot h''(x)}
Nurgad
\alpha = \angle CAB = 45^\circ12'32''
α
=
∠
C
A
B
=
45
∘
12
′
32
″
{\displaystyle \alpha =\angle CAB=45^{\circ }12'32''}
Süntaks:
Tulemus:
\binom{n}{k} või {n \choose k}
(
n
k
)
{\displaystyle {n \choose k}}
\begin{pmatrix} x & y \\ z & v \end{pmatrix}
(
x
y
z
v
)
{\displaystyle {\begin{pmatrix}x&y\\z&v\end{pmatrix}}}
\begin{bmatrix} 0 & \cdots & 0 \\ \vdots & \ddots & \vdots \\ 0 & \cdots & 0 \end{bmatrix}
[
0
⋯
0
⋮
⋱
⋮
0
⋯
0
]
{\displaystyle {\begin{bmatrix}0&\cdots &0\\\vdots &\ddots &\vdots \\0&\cdots &0\end{bmatrix}}}
\begin{Bmatrix} x & y \\ z & v \end{Bmatrix}
{
x
y
z
v
}
{\displaystyle {\begin{Bmatrix}x&y\\z&v\end{Bmatrix}}}
\begin{vmatrix} x & y \\ z & v \end{vmatrix}
|
x
y
z
v
|
{\displaystyle {\begin{vmatrix}x&y\\z&v\end{vmatrix}}}
\begin{Vmatrix} x & y \\ z & v \end{Vmatrix}
‖
x
y
z
v
‖
{\displaystyle {\begin{Vmatrix}x&y\\z&v\end{Vmatrix}}}
\begin{matrix} x & y \\ z & v \end{matrix}
x
y
z
v
{\displaystyle {\begin{matrix}x&y\\z&v\end{matrix}}}
f(n)= \left \{ \begin{matrix} n/2, & \mbox{kui }n \mbox{ on paarisarv} \\ 3n+1, & \mbox{kui }n \mbox{ on paaritu arv} \end{matrix} \right.
f
(
n
)
=
{
n
/
2
,
kui
n
on paarisarv
3
n
+
1
,
kui
n
on paaritu arv
{\displaystyle f(n)=\left\{{\begin{matrix}n/2,&{\mbox{kui }}n{\mbox{ on paarisarv}}\\3n+1,&{\mbox{kui }}n{\mbox{ on paaritu arv}}\end{matrix}}\right.}
\begin{matrix}f(n+1)&=& (n+1)^2 \\ \ & =& n^2 + 2n + 1 \end{matrix}
f
(
n
+
1
)
=
(
n
+
1
)
2
=
n
2
+
2
n
+
1
{\displaystyle {\begin{matrix}f(n+1)&=&(n+1)^{2}\\\ &=&n^{2}+2n+1\end{matrix}}}
Süntaks:
Tulemus:
\lim_{n \to \infty}x_n
lim
n
→
∞
x
n
{\displaystyle \lim _{n\to \infty }x_{n}}
\sum_{k=1}^N k^2
∑
k
=
1
N
k
2
{\displaystyle \sum _{k=1}^{N}k^{2}}
\prod_{i=1}^N x_i
∏
i
=
1
N
x
i
{\displaystyle \prod _{i=1}^{N}x_{i}}
\int_{-N}^{N} e^x \, dx
∫
−
N
N
e
x
d
x
{\displaystyle \int _{-N}^{N}e^{x}\,dx}
\oint_{C} x^3 \, dx + 4y^2 \, dy
∮
C
x
3
d
x
+
4
y
2
d
y
{\displaystyle \oint _{C}x^{3}\,dx+4y^{2}\,dy}
Et trigonomeetrilised funktsioonid oleks muudest muutujatest eristatavad, kasutage järgnevaid käske:
\cos \sin \tan \cot \arccos \arcsin \arctan \arccot \cosh \sinh \tanh \coth \sec \cosec
Süntaks:
Tulemus:
Kreeka tähed
\alpha \beta \gamma \delta \epsilon \varepsilon \zeta \eta \theta \vartheta \iota \kappa \lambda \mu \nu \xi o \pi \varpi \rho \varrho \sigma \varsigma \tau \upsilon \phi \varphi \chi \psi \omega
α
β
γ
δ
ϵ
ε
ζ
η
θ
ϑ
ι
κ
λ
μ
ν
ξ
o
π
ϖ
ρ
ϱ
σ
ς
τ
υ
ϕ
φ
χ
ψ
ω
{\displaystyle \alpha \beta \gamma \delta \epsilon \varepsilon \zeta \eta \theta \vartheta \iota \kappa \lambda \mu \nu \xi o\pi \varpi \rho \varrho \sigma \varsigma \tau \upsilon \phi \varphi \chi \psi \omega }
\Gamma \Delta \Theta \Lambda \Xi \Pi \Sigma \Upsilon \Phi \Psi \Omega
Γ
Δ
Θ
Λ
Ξ
Π
Σ
Υ
Φ
Ψ
Ω
{\displaystyle \Gamma \Delta \Theta \Lambda \Xi \Pi \Sigma \Upsilon \Phi \Psi \Omega \,\!}
Hulgad
x \in \mathbb{N} \mathbb{Z} \sub \mathbb{R} \sub \mathbb{C}
x
∈
N
⊂
Z
⊂
R
⊂
C
{\displaystyle x\in \mathbb {N} \subset \mathbb {Z} \subset \mathbb {R} \subset \mathbb {C} }
Rasvane kiri
\mathbf{x} \cdot \mathbf{y}=0
x
⋅
y
=
0
{\displaystyle \mathbf {x} \cdot \mathbf {y} =0}
Rasvased kreeka tähed
\boldsymbol{ \alpha}+ \boldsymbol{ \beta}+ \boldsymbol{ \gamma}
α
+
β
+
γ
{\displaystyle {\boldsymbol {\alpha }}+{\boldsymbol {\beta }}+{\boldsymbol {\gamma }}}
Fraktuur
\mathfrak{AaBbCc}
A
a
B
b
C
c
{\displaystyle {\mathfrak {AaBbCc}}}
Käsikiri
\mathcal{AaBbCc}
A
B
C
{\displaystyle {\mathcal {ABC}}}
Heebrea tähed
\aleph \beth \gimel \daleth
ℵ
ℶ
ℷ
ℸ
{\displaystyle \aleph \beth \gimel \daleth }
Sirge kiri
\mbox{Aa Bb Cc}
Aa Bb Cc
{\displaystyle {\mbox{Aa Bb Cc}}}
Süntaks:
Tulemus:
()
( \frac{a}{b})
(
a
b
)
{\displaystyle ({\frac {a}{b}})}
\left( \frac{a}{b} \right)
(
a
b
)
{\displaystyle \left({\frac {a}{b}}\right)}
[]
\left[A \right]
[
A
]
{\displaystyle \left[A\right]}
{}
\left \{A \right \}
{
A
}
{\displaystyle \left\{A\right\}}
<>
\left \langle A \right \rangle
⟨
A
⟩
{\displaystyle \left\langle A\right\rangle }
||
\left|A \right|
|
A
|
{\displaystyle \left|A\right|}
\left \lfloor A \right \rfloor, \left \lceil A \right \rceil, \left \|A \right \|
⌊
A
⌋
,
⌈
A
⌉
,
‖
A
‖
{\displaystyle \left\lfloor A\right\rfloor ,\left\lceil A\right\rceil ,\left\|A\right\|}
\left. ja \right. peidavad sulu
\left. \frac{a}{b} \right \} \to X
a
b
}
→
X
{\displaystyle \left.{\frac {a}{b}}\right\}\to X}
Süntaks:
Tulemus:
\leftarrow \longleftarrow \uparrow
←⟵↑
{\displaystyle \leftarrow \longleftarrow \uparrow }
\Leftarrow \Longleftarrow \Uparrow
⇐⟸⇑
{\displaystyle \Leftarrow \Longleftarrow \Uparrow }
\rightarrow \longrightarrow \downarrow
→⟶↓
{\displaystyle \rightarrow \longrightarrow \downarrow }
\Rightarrow \Longrightarrow \Downarrow
⇒⟹⇓
{\displaystyle \Rightarrow \Longrightarrow \Downarrow }
\leftrightarrow \updownarrow \Leftrightarrow \Updownarrow
↔↕⇔⇕
{\displaystyle \leftrightarrow \updownarrow \Leftrightarrow \Updownarrow }
\mapsto \longmapsto \hookleftarrow \hookrightarrow
↦⟼↩↪
{\displaystyle \mapsto \longmapsto \hookleftarrow \hookrightarrow }
\swarrow \nwarrow \nearrow \searrow
↙↖↗↘
{\displaystyle \swarrow \nwarrow \nearrow \searrow }
LaTeX paneb tühikuid automaatselt, kuid mõnikord on vaja neid ka käsitsi panna:
Süntaks:
Tulemus:
a \qquad b
a
b
{\displaystyle a\qquad b}
a \quad b
a
b
{\displaystyle a\quad b}
a \ b
a
b
{\displaystyle a\ b}
a \;b
a
b
{\displaystyle a\;b}
a \,b
a
b
{\displaystyle a\,b}
ab (tühikuta)
a
b
{\displaystyle ab\,}
a \!b (kokkusurutult}
a
b
{\displaystyle a\!b}
Et deklareerida mingit uut funktsiooni, mis näeks välja näiteks nagu \sin ja \cos , kasutage käsku \operatorname :
Vale
sgn z
s
g
n
z
{\displaystyle sgnz}
Õige
\operatorname{sgn} z
sgn
z
{\displaystyle \operatorname {sgn} z}
Süntaks:
Tulemus:
\hat{a}
a
^
{\displaystyle {\hat {a}}}
\acute{a}
a
´
{\displaystyle {\acute {a}}}
\bar{a}
a
¯
{\displaystyle {\bar {a}}}
\dot{a}
a
˙
{\displaystyle {\dot {a}}}
\breve{a}
a
˘
{\displaystyle {\breve {a}}}
\check{a}
a
ˇ
{\displaystyle {\check {a}}}
\grave{a}
a
`
{\displaystyle {\grave {a}}}
\vec{a}
a
→
{\displaystyle {\vec {a}}}
\ddot{a}
a
¨
{\displaystyle {\ddot {a}}}
\tilde{a}
a
~
{\displaystyle {\tilde {a}}}
Süntaks:
Tulemus:
\widehat{abc}
a
b
c
^
{\displaystyle {\widehat {abc}}}
\overleftarrow{abc}
a
b
c
←
{\displaystyle {\overleftarrow {abc}}}
\overrightarrow{abc}
a
b
c
→
{\displaystyle {\overrightarrow {abc}}}
\overline{abc}
a
b
c
¯
{\displaystyle {\overline {abc}}}
\underline{abc}
a
b
c
_
{\displaystyle {\underline {abc}}}
\overbrace{abc}
a
b
c
⏞
{\displaystyle \overbrace {abc} }
\underbrace{abc}
a
b
c
⏟
{\displaystyle \underbrace {abc} }
Ühesümbolilised vektorid võib kirjutada käsuga \vec , kuid pikemate nimetustega vektorid tuleb kirjutada kasutades käsku \overrightarrow :
Õige:
\vec{a}
a
→
{\displaystyle {\vec {a}}}
Õige:
\overrightarrow{AB}
A
B
→
{\displaystyle {\overrightarrow {AB}}}
Vale:
\vec{AB}
A
B
→
{\displaystyle {\vec {AB}}}