数学模式重音符

Code LaTeX Code LaTeX Code LaTex Code LaTex
\hat{a} a^\hat{a} \check{a} aˇ\check{a} \tilde{a} a~\tilde{a} \acute{a} aˊ\acute{a}
\grave{a} aˋ\grave{a} \dot{a} a˙\dot{a} \ddot{a} a¨\ddot{a} \breve{a} a˘\breve{a}
\bar{a} aˉ\bar{a} \vec{a} a\vec{a} \widehat{A} A^\widehat{A} \widetilde{A} A~\widetilde{A}

更多重音符参见KaTeX - Accents

希腊字母表

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

可以看到,大写希腊字母对应的LaTeX代码仅仅是把小写希腊字母的对应的首字母大写即可。此外,有数个小写字母还有不同的变体,它们对应的大写字母是相同的,如下表:

Original Variant Code Variant
ϵ\epsilon \varepsilon ε\varepsilon
θ\theta \vartheta ϑ\vartheta
σ\sigma \varsigma ς\varsigma
ϕ\phi \varphi φ\varphi

二元关系符

Code LaTeX Code LaTeX Code LaTex Code LaTex
< << > >> = == \leq, \le \le
\geq, \ge \ge \equiv \equiv \ll \ll \gg \gg
\doteq \doteq \prec \prec \succ \succ \sim \sim
\preceq \preceq \succeq \succeq \simeq \simeq \subset \subset
\subseteq \subseteq \supset \supset \supseteq \supseteq \approx \approx
\cong \cong \sqsubset \sqsubset \sqsupset \sqsupset \Join \Join
\sqsubseteq \sqsubseteq \sqsupseteq \sqsubseteq \bowtie \bowtie \in \in
\ni, \own \ni \notin \notin \neq, \ne \ne \propto \propto
\perp \perp \parallel \parallel \vdash \vdash \dashv \dashv
\models \models \mid \mid \smile \smile \frown \frown
\asymp \asymp : :: - - - -

二元运算符

Code LaTeX Code LaTeX Code LaTex Code LaTex
+ ++ - - \times ×\times \cdot \cdot
\div ÷\div / // \pm ±\pm \mp \mp
\triangleleft \triangleleft \triangleright \triangleright \setminus \setminus \star \star
\cup \cup \cap \cap \ast \ast \sqcup \sqcup
\sqcap \sqcap \circ \circ \vee, \lor \lor \wedge, \land \land
\ullet \bullet \oplus \oplus \ominus \ominus \diamond \diamond
\odot \odot \oslash \oslash \uplus \uplus \otimes \otimes
\bigcirc \bigcirc \amalg ⨿\amalg - - - -

大尺寸运算符

Code LaTeX Code LaTeX Code LaTeX Code LaTeX
\sum \sum \bigcup \bigcup \bigvee \bigvee \bigoplus \bigoplus
\prod \prod \bigcap \bigcap \bigwedge \bigwedge \bigotimes \bigotimes
\coprod \coprod \bigsqcup \bigsqcup \biguplus \biguplus \bigodot \bigodot
\int \int \oint \oint \iint \iint \iiint \iiint

定界符

Code LaTeX Code LaTeX Code LaTex Code LaTex
( (( ) )) \uparrow \uparrow \Uparrow \Uparrow
[, \lbrack [ ], \rbrack ]\rbrack \downarrow \downarrow \Downarrow \Downarrow
\{, \lbrace {\{ \}, \rbrace }\} \updownarrow \updownarrow \Updownarrow \Updownarrow
\langle \langle \rangle \rangle ` , \vert` \vert |, \Vert
\lfloor \lfloor \rfloor \rfloor \lceil \lceil \rceil \rceil
/ // \backslash \\backslash - - - -
\lgroup \lgroup \rgroup \rgroup \lmoustache \lmoustache \rmoustache \rmoustache

常用箭头

Code LaTeX Code LaTeX Code LaTex
\leftarrow, \gets \gets \longleftarrow \longleftarrow \uparrow \uparrow
\rightarrow, \to \to \longrightarrow \longrightarrow \downarrow \downarrow
\leftrightarrow \leftrightarrow \longleftrightarrow \longleftrightarrow \updownarrow \updownarrow
\Leftarrow \Leftarrow \Longleftarrow \Longleftarrow \Uparrow \Uparrow
\Rightarrow \Rightarrow \Longrightarrow \Longrightarrow \Downarrow \Downarrow
\Leftrightarrow \Leftrightarrow \Longleftrightarrow \Longleftrightarrow \Updownarrow \Updownarrow
\leftharpoonup \leftharpoonup \rightharpoonup \rightharpoonup \nearrow \nearrow
\leftharpoondown \leftharpoondown \rightharpoondown \rightharpoondown \searrow \searrow
\rightleftharpoons \rightleftharpoons \swarrrow \swarrow \nwarrow \nwarrow

其他常用符号

Code LaTeX Code LaTeX Code LaTex Code LaTex
\dots \dots \cdots \cdots \vdots \vdots \ddots \ddots
\hbar \hbar \imath ı\imath \jmath ȷ\jmath \ell \ell
\forall \forall \exists \exists \mho \mho \partial \partial
\Re \Re \Im \Im \aleph \aleph \wp \wp
' ' \prime \prime \emptyset \emptyset \infty \infty
\nabla \nabla \triangle \triangle \Box \Box \Diamond \Diamond
\bot \bot \top \top \angle \angle \surd \surd
\dimondsuit \diamondsuit \heartsuit \heartsuit \clubsuit \clubsuit \spadesuit \spadesuit
\neg, \lnot ¬\neg \flat \flat \natural \natural \sharp \sharp
\because \because \therefore \therefore \lim lim\lim \ln ln\ln
\lg lg\lg \log log\log \bmod mod\bmod - -

补充

  1. 如需定义分式,可以使用\frac{}{},如下:

    \frac{x^2}{y^{2/3}} \qquad \frac{1}{x} \tag{1}

    x2y2/31x(1)\frac{x^2}{y^{2/3}} \qquad \frac{1}{x} \tag{1}

  2. 如果需要给公式编号,可以使用\tag{},如上例

  3. 如果需要定义高次根式,可以使用\sqrt[]{},其中[]是幂指数,{}是求根的真值:

    \sqrt{2} \qquad \sqrt[4]{x^2 + y^2 + z^2}

2x2+y2+z24\sqrt{2} \qquad \sqrt[4]{x^2 + y^2 + z^2}

  1. 可以使用\overline\underline在表达式上方和下方添加横线,也可以使用\overbrace\underbrace在表达式的上方或下方添加花括号:

    \underline{a} \qquad \overline{A \cup B} \\
    \overbrace{a_1 + a_2 + \dots + a_n}^{n} \qquad \underbrace{b_1 \times b_2 \times \dots \times b_n}_{n}

    aABa1+a2++annb1×b2××bnn\underline{a} \qquad \overline{A \cup B} \\ \overbrace{a_1 + a_2 + \dots + a_n}^{n} \qquad \underbrace{b_1 \times b_2 \times \dots \times b_n}_{n}

  2. 可以使用\qquad生成空格隔开公式的某些部分,也可以用\text{}添加正常的文字描述,使用\\表示换行:

    a \qquad b \\
    \text{I'm some comments}

    abI’m some commentsa \qquad b\\ \text{I'm some comments}

  3. 可以使用\begin{cases}\end{cases}定义类似分段函数的表达式:

    f(x) = \begin{cases}
    x^2 + 1 &\text{if } x \ge 0 \\
    \ln |x| &\text{otherwise}
    \end{cases}

    f(x)={x2+1if x0lnxotherwisef(x) = \begin{cases} x^2 + 1 &\text{if } x \ge 0 \\ \ln |x| &\text{otherwise} \end{cases}

    花括号中的对象可以替换:

    • (p/b/v/V/B)matrix,表示矩阵;

      E = \begin{pmatrix}
      1 & 0 & 0 \\
      0 & 1 & 0 \\
      0 & 0 & 1
      \end{pmatrix}

      E=(100010001)E = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix}

    • euqations, 可以(带换行)输入连等式(隐式携带\tag,可以显式覆盖);

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

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

    • 还有很多用法,详见KaTeX - Enviroments

  4. 一般LaTeX渲染的字母是偏向手写体的。但是在一元微分中为了表示区别,微分符号应该使用\mathrm修饰

    f''(x) = \frac{\mathrm d^2 y}{\mathrm d x^2}

    f(x)=d2ydx2f''(x) = \frac{\mathrm d^2 y}{\mathrm d x^2}

  5. 常用的、有专用符号表示的基本初等函数,在LaTeX中有形式统一的表示方法,例如:

    \sin x + 2 \cosh x - 3 \arctan x + 4 \ln x - a^x \lg x

    sinx+2coshx3arctanx+4lnxaxlgx\sin x + 2 \cosh x - 3 \arctan x + 4 \ln x - a^x \lg x

Reference

  1. 常用数学符号的LaTeX表示方法
  2. Katex Supported Functions