Skip to content

Latest commit

 

History

History
448 lines (368 loc) · 13.8 KB

latex.md

File metadata and controls

448 lines (368 loc) · 13.8 KB

LaTeX 备忘清单

本备忘单总结了 LaTeX 常用显示数学符号的参考列表和一些 KaTeX 的应用示例。

入门

介绍

LaTeX 基于 TEX 的排版系统,适用于生成高印刷质量的科技和数学、物理文档。

KaTeX 只处理 LaTeX 的数学符号的一个更小的子集,用于 web 上展示

示例

% \f is defined as #1f(#2) using the macro
f\relax(x) = \int_{-\infty}^\infty
    f\hat\xi\,e^{2 \pi i \xi x}
    \,d\xi

% \f is defined as #1f(#2) using the macro
f\relax(x) = \int_{-\infty}^\infty
    f\hat\xi\,e^{2 \pi i \xi x}
    \,d\xi

行内展示

基于 KaTeX 在一行
展示示例: `KaTeX:\int_0^\infty x^2 dx`

基于 KaTeX 在一行展示示例: KaTeX:\int_0^\infty x^2 dx

Supported Functions

Accents

:- :- :-
KaTeX:a' a' KaTeX:\tilde{a} \tilde{a} KaTeX:\mathring{g} \mathring{g}
KaTeX:a'' a'' KaTeX:\widetilde{ac} \widetilde{ac} KaTeX:\overgroup{AB} \overgroup{AB}
KaTeX:a^{\prime} a^{\prime} KaTeX:\utilde{AB} \utilde{AB} KaTeX:\undergroup{AB} \undergroup{AB}
KaTeX:\acute{a} \acute{a} KaTeX:\vec{F} \vec{F} KaTeX:\Overrightarrow{AB} \Overrightarrow{AB}
KaTeX:\bar{y} \bar{y} KaTeX:\overleftarrow{AB} \overleftarrow{AB} KaTeX:\overrightarrow{AB} \overrightarrow{AB}
KaTeX:\breve{a} \breve{a} KaTeX:\underleftarrow{AB} \underleftarrow{AB} KaTeX:\underrightarrow{AB} \underrightarrow{AB}
KaTeX:\check{a} \check{a} KaTeX:\overleftharpoon{ac} \overleftharpoon{ac} KaTeX:\overrightharpoon{ac} \overrightharpoon{ac}
KaTeX:\dot{a} \dot{a} KaTeX:\overleftrightarrow{AB} \overleftrightarrow{AB} KaTeX:\overbrace{AB} \overbrace{AB}
KaTeX:\ddot{a} \ddot{a} KaTeX:\underleftrightarrow{AB} \underleftrightarrow{AB} KaTeX:\underbrace{AB} \underbrace{AB}
KaTeX:\grave{a} \grave{a} KaTeX:\overline{AB} \overline{AB} KaTeX:\overlinesegment{AB} \overlinesegment{AB}
KaTeX:\hat{\theta} \hat{\theta} KaTeX:\underline{AB} \underline{AB} KaTeX:\underlinesegment{AB} \underlinesegment{AB}
KaTeX:\widehat{ac} \widehat{ac} KaTeX:\widecheck{ac} \widecheck{ac} KaTeX:\underbar{X} \underbar{X}

\text{…}中的强调功能

:- :- :-
KaTeX:\'{a} \'{a} KaTeX:\~{a} \~{a}
KaTeX:\.{a} \.{a} KaTeX:\H{a} \H{a}
KaTeX:\\\`{a} \`{a} KaTeX:\={a} \={a}
KaTeX:\"{a} \"{a} KaTeX:\v{a} \v{a}
KaTeX:\^{a} \^{a} KaTeX:\u{a} \u{a}
KaTeX:\r{a} \r{a}

Delimiter Sizing

:- :-
KaTeX:\left(\LARGE{AB}\right) \left(\LARGE{AB}\right)
KaTeX:( \big( \Big( \bigg( \Bigg( ( \big( \Big( \bigg( \Bigg(

:- :- :- :- :-
\left \big \bigl \bigm \bigr
\middle \Big \Bigl \Bigm \Bigr
\right \bigg \biggl \biggm \biggr
`` \Bigg \Biggl \Biggm \Biggr

希腊和希伯来字母 Greek and Hebrew letters

预览 方法 预览 方法 预览 方法 预览 方法 预览 方法 预览 方法
KaTex:\alpha \alpha KaTex:\kappa \kappa KaTex:\psi \psi KaTex:\digamma \digamma KaTex:\Delta \Delta KaTex:\Theta \Theta
KaTex:\beta \beta KaTex:\lambda \lambda KaTex:\rho \rho KaTex:\varepsilon \varepsilon KaTex:\Gamma \Gamma KaTex:\Upsilon \Upsilon
KaTex:\chi \chi KaTex:\mu \mu KaTex:\sigma \sigma KaTex:\varkappa \varkappa KaTex:\Lambda \Lambda KaTex:\Xi \Xi
KaTex:\delta \delta KaTex:\nu \nu KaTex:\tau \tau KaTex:\varphi \varphi KaTex:\Omega \Omega
KaTex:\epsilon \epsilon KaTex:o o KaTex:\theta \theta KaTex:\varpi \varpi KaTex:\Phi \Phi KaTex:\aleph \aleph
KaTex:\eta \eta KaTex:\omega \omega KaTex:\upsilon \upsilon KaTex:\varrho \varrho KaTex:\Pi \Pi KaTex:\beth \beth
KaTex:\gamma \gamma KaTex:\phi \phi KaTex:\xi \xi KaTex:\varsigma \varsigma KaTex:\Psi \Psi KaTex:\daleth \daleth
KaTex:\iota \iota KaTex:\pi \pi KaTex:\zeta \zeta KaTex:\vartheta \vartheta KaTex:\Sigma \Sigma KaTex:\gimel \gimel

分隔符 Delimiters

预览 方法 预览 方法 预览 方法 预览 方法 预览 方法
KaTeX:() () KaTeX:\lparen \rparen \lparen \rparen KaTex:⌈ ⌉ ⌈ ⌉ KaTex:\lceil \rceil \lceil \rceil KaTex:\uparrow \uparrow
KaTeX:[] [] KaTeX:\lbrack \rbrack \lbrack \rbrack KaTex:⌊ ⌋ ⌊ ⌋ KaTex:\lfloor \rfloor \lfloor \rfloor KaTex:\downarrow \downarrow
KaTeX:\{ \} {} KaTex:\lbrace \rbrace \lbrace \rbrace KaTex:⎰⎱ ⎰⎱ KaTex:\lmoustache \rmoustache \lmoustache \rmoustache KaTex:\updownarrow \updownarrow
KaTeX:⟨ ⟩ ⟨⟩ KaTex:\langle \rangle \langle \rangle KaTex:⟮ ⟯ ⟮ ⟯ KaTex:\lgroup \rgroup \lgroup \rgroup KaTex:\Uparrow \Uparrow
KaTeX:∣ | KaTex:\vert \vert KaTex:┌ ┐ ┌ ┐ KaTex:\ulcorner \urcorner \ulcorner \urcorner KaTex:\Downarrow \Downarrow
KaTeX:| (MD语法冲突) \| KaTex:\Vert \Vert KaTex:└ ┘ └ ┘ KaTex:\llcorner \lrcorner \llcorner \lrcorner KaTex:\Updownarrow \Updownarrow
KaTeX:∣ ∣ \lvert \rvert KaTex:\lVert \rVert \lVert \rVert \left. \right. KaTex:\backslash \backslash
KaTeX:\lang KaTeX:\rang \lang \rang KaTeX:\lt \gt \lt \gt KaTex:⟦ ⟧ ⟦ ⟧ KaTex:\llbracket \rrbracket \llbracket \rrbracket KaTex:\lBrace \rBrace \lBrace \rBrace

Environments

Environments 1

\begin{matrix}
   a & b \\
   c & d
\end{matrix}
\begin{matrix}
   a & b \\
   c & d
\end{matrix}

Environments 2

\begin{array}{cc}
   a & b \\
   c & d
\end{array}
\begin{array}{cc}
   a & b \\
   c & d
\end{array}

Environments 3

\begin{pmatrix}
   a & b \\
   c & d
\end{pmatrix}
\begin{pmatrix}
   a & b \\
   c & d
\end{pmatrix}

Environments 4

\begin{bmatrix}
   a & b \\
   c & d
\end{bmatrix}
\begin{bmatrix}
   a & b \\
   c & d
\end{bmatrix}

Environments 5

\begin{vmatrix}
   a & b \\
   c & d
\end{vmatrix}
\begin{vmatrix}
   a & b \\
   c & d
\end{vmatrix}

Environments 6

\begin{Vmatrix}
   a & b \\
   c & d
\end{Vmatrix}
\begin{Vmatrix}
   a & b \\
   c & d
\end{Vmatrix}

Environments 7

\begin{Bmatrix}
   a & b \\
   c & d
\end{Bmatrix}
\begin{Bmatrix}
   a & b \\
   c & d
\end{Bmatrix}

Environments 8

\def\arraystretch{1.5}
   \begin{array}{c:c:c}
   a & b & c \\ \hline
   d & e & f \\
   \hdashline
   g & h & i
\end{array}
\def\arraystretch{1.5}
   \begin{array}{c:c:c}
   a & b & c \\ \hline
   d & e & f \\
   \hdashline
   g & h & i
\end{array}

Environments 9

x = \begin{cases}
   a &\text{if } b \\
   c &\text{if } d
\end{cases}
x = \begin{cases}
   a &\text{if } b \\
   c &\text{if } d
\end{cases}

Environments 10

\begin{rcases}
   a &\text{if } b \\
   c &\text{if } d
\end{rcases}⇒…
\begin{rcases}
   a &\text{if } b \\
   c &\text{if } d
\end{rcases}⇒…

Environments 11

\begin{smallmatrix}
   a & b \\
   c & d
\end{smallmatrix}
\begin{smallmatrix}
   a & b \\
   c & d
\end{smallmatrix}

Environments 12

\sum_{
\begin{subarray}{l}
   i\in\Lambda\\
   0<j<n
\end{subarray}}
\sum_{
\begin{subarray}{l}
   i\in\Lambda\\
   0<j<n
\end{subarray}}

Environments 13

\begin{equation}
\begin{split}  a &=b+c\\
      &=e+f
\end{split}
\end{equation}
\begin{equation}
\begin{split}  a &=b+c\\
      &=e+f
\end{split}
\end{equation}

Environments 14

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

Environments 15

\begin{gather}
   a=b \\
   e=b+c
\end{gather}
\begin{gather}
   a=b \\
   e=b+c
\end{gather}

Environments 16

\begin{alignat}{2}
   10&x+&3&y=2\\
   3&x+&13&y=4
\end{alignat}
\begin{alignat}{2}
   10&x+&3&y=2\\
   3&x+&13&y=4
\end{alignat}

Environments 17

\begin{CD}
   A @>a>> B \\
@VbVV @AAcA \\
   C @= D
\end{CD}
\begin{CD}
   A @>a>> B \\
@VbVV @AAcA \\
   C @= D
\end{CD}

另见