Latex 基础


原文链接: Latex 基础

一份其实很短的 LaTeX 入门文档 | 始终

用于数学、科学和工程的希腊字母 - 维基百科,自由的百科全书

Latex数学符号表

Katex实例
LaTeX —— 特殊符号与数学字体 - CSDN博客

  1. 特殊符号
    ℓ $\ell$ :用于和大小的 I 和 数字 1 相区分
    ℜ $\Re$
    ∇ $\nabla$:微分算子

  2. 数学字体
    mathbb :blackboard bold,黑板粗体
    mathcal :calligraphy(美术字)
    mathrm :math roman
    mathbf :math boldface
    mathsf :
    mathtt :
    mathit :
    花体 \mathcal:
    $\mathcal L$ 常用来表示损失函数
    $\mathcal D$ 表示样本集
    $\mathcal N$ 常用来表示高斯分布;

空心ℝ,ℕ
$\mathbb{RN}$

  1. 其他数学字体
    以下分别是 4 种字体形式:
    \( \begin{aligned} &{f(x,y) = 3(x+y)y / (2xy-7)}\\ &\mathsf{f(x,y) = 3(x+y)y / (2xy-7)}\\ &\mathtt{f(x,y) = 3(x+y)y / (2xy-7)}\\ &\mathit{f(x,y) = 3(x+y)y / (2xy-7)} \end{aligned}\)

运算符

一些小的运算符,可以在数学模式下直接输入;另一些需要用控制序列生成,如 正负pm 乘times 除div 点cdot 交cap 并cup 大于等于geq 小于等于leq 不等于neq 约等于approx 三等于equiv

\[ \pm\; \times \; \div\; \cdot\; \cap\; \cup\;\geq\; \leq\; \neq\; \approx \; \equiv \]

连加、连乘、极限、积分等大型运算符分别用 \sum, \prod, \lim, \int生成。

小技巧:
他们的上下标在行内公式中被压缩,以适应行高。我们可以用 \limits 和 \nolimits 来强制显式地指定是否压缩这些上下标。例如:
$\sum_^n i \quad$
$\prod_^n \quad$
$\sum\limits _^n i \quad$
$\prod\limits ^n$
强缩:
$\lim
{x\to0}x^2 \quad$
$\int_a^b x^2 dx\quad$
$\lim\nolimits _{x\to0}x^2\quad$ $\int\nolimits_a^b x^2 dx$

多重积分可以使用 $\iint$, $\iiint$, $\idotsint$ 等命令输入。

定界符(括号等)

各种括号用 (), [], {}, \langle\rangle 等命令表示;注意花括号通常用来输入命令和环境的参数,所以在数学公式中它们前面要加 \。因为 LaTeX 中 | 和 | 的应用过于随意,amsmath 宏包推荐用 \lvert\rvert 和 \lVert\rVert 取而代之。

为了调整这些分隔符的大小,amsmath宏包推荐使用 \big, \Big, \bigg, \Bigg 等一系列命令放在上述括号前面调整大小。

\[\Biggl(\biggl(\Bigl(\bigl((x)\bigr)\Bigr)\biggr)\Biggr) \] \[ \Biggl[\biggl[\Bigl[\bigl[[x]\bigr]\Bigr]\biggr]\Biggr] \] \[ \Biggl \{\biggl \{\Bigl \{\bigl \{\{x\}\bigr \}\Bigr \}\biggr \}\Biggr\} \] \[ \Biggl\langle\biggl\langle\Bigl\langle\bigl\langle\langle x \rangle\bigr\rangle\Bigr\rangle\biggr\rangle\Biggr\rangle \] \[ \Biggl\lvert\biggl\lvert\Bigl\lvert\bigl\lvert\lvert x \rvert\bigr\rvert\Bigr\rvert\biggr\rvert\Biggr\rvert \] \[ \Biggl\lVert\biggl\lVert\Bigl\lVert\bigl\lVert\lVert x \rVert\bigr\rVert\Bigr\rVert\biggr\rVert\Biggr\rVert\]

省略号

省略号用 \dots, \cdots, \vdots, \ddots 等命令表示。\dots 和 \cdots 的纵向位置不同,前者一般用于有下标的序列。
$x_1,x_2,\dots ,x_n\quad 1,2,\cdots ,n\quad
\vdots\quad \ddots$

符号

波浪号 (∼) $\sim$

度的符号 (◦) $^{\circ}$

$-30\,^{\circ}\mathrm{C}$

省略号 (. . . ) $\ldots$

$\quad$和$\qquad$用于插入固定长度的水平间距,$\quad$为插入当前字体尺寸大小的间距,$\qquad$是其两倍

向量表示

$\vec{x}$
$\vec\bm{F}$
$\overset{\rightharpoonup}{a}$

平方根

平方根(square root)的输入命令为:\sqrt,n 次方根相应地为: \sqrt[n]。方根符号的大小由LATEX自动加以调整。也可用\surd 仅给出
$\sqrt{x2+y2}$
$\sqrt[2]{x2+y2}$ 二次根号
$y = \sqrt [3]{x_1^2 + x_2^2 + x_3^2 }$ 三次根号

分数

分数(fraction)使用\frac{…}{…} 排版。

积分、求和、连乘

积分运算符用\int 来生成。求和运算符由\sum 生成。乘积运算符由\prod 生成。上限和下限用^ 和_来生成,类似于上标和下标

$\sum_^{n}$
$\int_^{\frac{\pi}{2}}$
$\prod_\epsilon$

点乘 a·b

$c = a \cdot c $

矩阵Matrix

matrix、pmatrix、bmatrix、Bmatrix、vmatrix或者Vmatrix
矩阵命令中每一行以 \ 结束,矩阵的元素之间用&来分隔开。
不带括号 $\begin{matrix}…\end{matrix}$
小括号(矩阵) $\begin{pmatrix}…\end{pmatrix}$
中括号[矩阵] $\begin{bmatrix}…\end{bmatrix}$
大括号{矩阵} $\begin{Bmatrix}…\end{Bmatrix}$
行列式|矩阵| $\begin{vmatrix}…\end{vmatrix}$
范数||矩阵|| $\begin{Vmatrix}…\end{Vmatrix}$

方式2:
括号(矩阵) $\bigl(\begin{matrix}…\end{matrix}\bigr)$
等价[矩阵] $\left[\begin{matrix}…\end{matrix}\right]$

例如:

\[\begin{Vmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{Vmatrix}\]

行列式

其中 \left| 和 \right| 表示左右定界符。如果我们将|换成 ( )或 [ ],就得到了矩阵

在这里,行列式和矩阵都是中间对齐的,如果你想左对齐或右对齐,你将{cccc}换成{llll}(左对齐)或{rrrr}(右对齐)就行了。& 是对齐符号。l=left c=center r=right

$$\left|
\begin{array}{cccc}

1 &    6    & 9   \\   
7 &    90   & f(x) \\   
9 & \psi(x) & g(x)   

\end{array}
\right|$$

对齐

需要对齐的公式,可以使用 aligned 次环境来实现,它必须包含在数学环境之内。

$$\begin{aligned}
x = & a+b+c+ \

  & d+e+f+g

\end{aligned}$$

##分段函数
分段函数可以用cases次环境来实现,它必须包含在数学环境之内。

\[ = \begin{cases} -x,\quad x\leq 0 \\ x,\quad x>0 \end{cases}\]

字体

$\mathcal{B}=c$
$\mathrm{K}_2$
$\sum x=\mathbf{n}$
$\mathsf{G\times R}$
$\mathtt{L}(b,c)$
$\mathit{ffi}\neq ffi$

颜色 $\color{black}black$

$$
\color{red}red
\color{green}green
\color{blue}{blue}
\color{orange}orange
\color{pink}pink
\color{gray}gray
\color{purple}purple
\color{gold}gold
\color{maroon}maroon
\color{Magenta}Magenta
\color{CornflowerBlue}mint
\color{BlueViolet}mint
\color{UltraViolet}Ultra Violet
\color{Coral}mint
\colormint
\colorUltra Violet

$$

环境 environments

\begin{environment} text
\end{environment}

\[\vec{A}\vec{x}\vec x^2\vec{x}_2^2\vec{A}^2\vec{xA}^2\]

$$
AccentsText: |
\begin{array}{l}

\text{\'\i} & \text{\.\i} & \text{\`\i} & \text{\"\i} & \text{\H\i} & \text{\r\i} \\
\text{\'\j} & \text{\.\j} & \text{\`\j} & \text{\"\j} & \text{\H\j} & \text{\r\j} \\
\text{\'a} & \text{\.a} & \text{\`a} & \text{\"a} & \text{\H{a}} & \text{\r{a}} \\
\text{\'A} & \text{\.A} & \text{\`A} & \text{\"A} & \text{\H{A}} & \text{\r{A}} \\
\text{\.I İ} & \text{\H e e̋} & \text{\i ı}
\end{array}

\( \)
Aligned: |

\begin{aligned}
    a &= 1 & b &= 2 \\
    3a &= 3 & 17b &= 34
\end{aligned}

\( \)
Alignedat: |

\begin{alignedat}{3}
    a &= 1 & b &= 2 &\quad c &= 3\\
    3a &= 3 & 17b &= 34 &\quad 400c &= 1200
\end{alignedat} $$

$$
Arrays: |

\left(\begin{array}{|rl|c||}
    1&2&3\\
    1+1&2+1&3+1\cr1\over2&\scriptstyle 1/2&\frac12\\[1ex]
    \begin{pmatrix}x\\y\end{pmatrix}&0&\begin{vmatrix}a&b\\c&d\end{vmatrix}
\end{array}\right]$$

$$
ArrayMode:

tex: |
    \begin{matrix}
        \frac{\partial^2 f}{\partial x_1^2} & \frac{\partial^2 f}{\partial x_1\,\partial x_2} & \cdots & \frac{\partial^2 f}{\partial x_1\,\partial x_n} \\
        \frac{\partial^2 f}{\partial x_2\,\partial x_1} & \frac{\partial^2 f}{\partial x_2^2} & \cdots & \frac{\partial^2 f}{\partial x_2\,\partial x_n} \\
        \vdots & \vdots & \ddots & \vdots \\
        \frac{\partial^2 f}{\partial x_n\,\partial x_1} & \frac{\partial^2 f}{\partial x_n\,\partial x_2} & \cdots & \frac{\partial^2 f}{\partial x_n^2}
    \end{matrix}$$

\( ArrayType: 1\begin{array}{c}2\\3\end{array}4\)
$$
ArrayRemoveEmptyLine: |

\begin{pmatrix}
    1 \\
    2 \\
\end{pmatrix}$$

\( Baseline: a+b-c\cdot d/e\)
\( BasicTest: a\)
$$
BinCancellation: |

\begin{array}{cccc}
    +1 & 1+ & 1+1 & (,) \\
    1++1 & 3\times) & 1+, & \left(,\right)
\end{array}$$

\( BinomTest: \dbinom{a}{b}\tbinom{a}{b}^{\binom{a}{b}+17}\)
\( BoldSpacing: \mathbf{A}^2+\mathbf{B}_3*\mathscr{C}'\)
\( BoldSymbol: \sum_{\boldsymbol{\alpha}}^{\boldsymbol{\beta}} \)
\(\boldsymbol{\omega}+ \int_{\boldsymbol{\alpha}}^{\boldsymbol{\beta}} \boldsymbol{\Omega}+\boldsymbol{Ax2k\omega\Omega\imath+}\)
\( Boxed: \boxed{F=ma} \quad \boxed{ac}\color{magenta}{\boxed{F}}\boxed{F=mg}\)
$$
Cases: |

f(a,b)=\begin{cases}
    a+1&\text{if }b\text{ is odd} \\
    a&\text{if }b=0 \\
    a-1&\text{otherwise}
\end{cases}$$

$$
Colors:

tex: \blue{a}\textcolor{#0f0}{b}\textcolor{red}{c}
nolatex: different syntax and different scope$$

\( ColorImplicit: bl{ack\color{red}red\textcolor{green}{green}red\color{blue}blue}black\)
\( ColorSpacing: \textcolor{red}{\displaystyle \int x} + 1\)
\( Colorbox: a \colorbox{teal} B \fcolorbox{blue}{red}{C} e+\colorbox{teal}x\)
\( DashesAndQuotes: \text{``a'' b---c -- d----`e'-{-}-f}--``x''\)
$$
DeepFontSizing:

tex: |
    a^{\big| x^{\big(}}_{\Big\uparrow} +
    i^{i^{\Huge x}_y}_{\Huge z} +
    \dfrac{\Huge x}{y}
nolatex: \Huge inside \dfrac doesn't work, needs an extra {…}$$

$$
DelimiterSizing: |

\bigl\uparrow\Bigl\downarrow\biggl\updownarrow
\Biggl\Uparrow\Biggr\Downarrow\biggr\langle\Bigr\}\bigr\rfloor$$

$$
DisplayMode:

tex: \sum_{i=0}^\infty \frac{1}{i}
pre: pre
post: post
display: 1$$

$$
DisplayStyle: |

{\displaystyle\sqrt{x}}{\sqrt{x}}
{\displaystyle \frac12}{\frac12}{\displaystyle x^1_2}{x^1_2}$$

$$
Dots: |

\begin{array}{l}
  \cdots;\dots+\dots\int\dots,\dots \\
  \cdots{};\ldots+\ldots\int\ldots,\ldots
\end{array}$$

\( Exponents: a^{a^a_a}_{a^a_a}\)
$$
ExtensibleArrows: |

\begin{array}{l}
    \xrightarrow[ab]{ABC} + \xRightarrow{ABC} \\
    \xrightleftharpoons[ab]{ABC} + \xhookrightarrow[ab]{ABC} \\
    \xtwoheadrightarrow{ABC} + \frac{\xrightarrow[ab]{ABC}}{\xrightarrow[ab]{ABC}} + \left\lvert\xrightarrow[ab]{ABC}\right\rvert
\end{array}$$

\( FractionTest: \dfrac{a}{b}\frac{a}{b}\tfrac{a}{b}\;-\dfrac12\;1\tfrac12\;{1 \atop 2}\)
\( Functions: \sin\cos\tan\ln\log\)
$$
Gathered: |

\begin{gathered}
  x = \frac{1}{2} \\
  y = \sum_{i=1}^n i
\end{gathered} \approx
\begin{array}{c}
  x = \frac{1}{2} \\
  y = \sum_{i=1}^n i
\end{array}$$

\( GreekLetters: \alpha\beta\gamma\omega\)
\( GreekUnicode: \frac{αβγδεϵζηθϑικλμνξοπϖρϱςστυφϕχψω}{ΓΔΘΞΠΣΦΨΩ\mathbf{Ω}\mathbf{\Omega}}\)
\( HorizontalBraces: \overbrace{\displaystyle{\oint_S{\vec E\cdot\hat n\,\mathrm d a}}}^\text{emf} = \underbrace{\frac{q_{\text{enc}}}{\varepsilon_0}}_{\text{charge}}\)
$$
KaTeX:

tex: \KaTeX
nolatex: \KaTeX not supported by LaTeX$$

$$
Kern:

tex: \frac{a\kern{1em}b}{c}a\kern{1em}b\kern{1ex}c\kern{-0.25em}d
nolatex: LaTeX fails to typeset this, Missing number, treated as zero.$$

\( Lap: ab\mathllap{f}cd\mathrlap{g}hij\mathclap{k}lm \; ab\llap{f}cd\rlap{g}hij\clap{k}lm\)
\( LargeRuleNumerator: \frac{\textcolor{blue}{\rule{1em}{2em}}}{x}\)
\( LaTeX: \text{\LaTeX}, \text{\TeX}\)
\( LeftRight: \left( x^2 \right) \left\{ x^{x^{x^{x^x}}} \right.\)
\( LeftRightListStyling: a+\left(x+y\right)-x\)
\( LeftRightMiddle: \left( x^2 \middle/ \right) \left\{ x^{x^{x^{x^x}}} \middle/ y \right.\left(x\middle|y\,\middle|\,z\right)\)
$$
LeftRightStyleSizing: |

+\left\{\rule{0.1em}{1em}\right.
x^{+\left\{\rule{0.1em}{1em}\right.
x^{+\left\{\rule{0.1em}{1em}\right.}}$$

$$
LimitControls: |

\displaystyle\int\limits_2^3 3x^2\,dx + \sum\nolimits^n_{i=1}i +
\textstyle\int\limits_x^y z$$

$$
LineBreak: |

\frac{x^2}{y^2} + z^2 =
z^2 + \frac{x^2}{y^2} =
\frac{x^2}{y^2} +\nobreak z^2 =
z^2 + \frac{x^2}{y^2} =
\frac{x^2}{y^2} + ~ z^2 =
z^2 + \frac{x^2}{y^2} =
\frac{x^2}{y^2} + \hspace{1em} z^2 =
z^2 + \frac{x^2}{y^2} =
\frac{x^2}{y^2} + z^2 = \hspace*{1em}
z^2 + \frac{x^2}{y^2} =
\frac{x^2}{y^2} + z^2 =
hi \allowbreak there =
hi \allowbreak there$$

$$
LowerAccent: |

\begin{matrix}
    \underleftarrow{AB} \quad \underrightarrow{AB} \quad \underleftrightarrow{AB} \quad \undergroup{AB} \\
    \underlinesegment{AB} \quad \utilde{AB}  \quad \color{green}{\underrightarrow{AB}} \\
    \underrightarrow{F} + \underrightarrow{AB} + \underrightarrow{AB}^2 + \underrightarrow{AB}_2 \\
    \frac{\underrightarrow{AB}}{\underrightarrow{AB}} + \sqrt{\underrightarrow{AB}} + \left\lvert\underrightarrow{AB}\right\rvert \\
    \text{\underline{text}}
\end{matrix}$$

\( MathAtom: a\mathrel{\mathop{=}\limits^{\blue ?}}b\)
\( MathAtom2: \mathop{\overline{\mathrm{lim}}}\limits_{x\to\infty}f(x)\)
\( MathChoice: | {\displaystyle\mathchoice{D}{T}{S}{SS}} {\textstyle\mathchoice{D}{T}{S}{SS}} {\scriptstyle \mathchoice{D}{T}{S}{SS}} {\scriptscriptstyle\mathchoice{D}{T}{S}{SS}} \displaystyle X_{\mathchoice{D}{T}{S}{SS}_{\mathchoice{D}{T}{S}{SS}}}\)
\( MathDefaultFonts: Ax2k\breve{a}\omega\Omega\imath+\KaTeX MathBb: \mathbb{Ax2k\breve{a}\omega\Omega\imath+\KaTeX} MathBf: \mathbf{Ax2k\breve{a}\omega\Omega\imath+\KaTeX} MathCal: \mathcal{Ax2k\breve{a}\omega\Omega\imath+\KaTeX} MathFrak: \mathfrak{Ax2k\breve{a}\omega\Omega\imath+\KaTeX} MathIt: \mathit{Ax2k\breve{a}\omega\Omega\imath+\KaTeX} MathOp: a\mathop+b\mathop:c\mathop{\delta}e\mathop{\textrm{and}}f\mathrel{\mathop{:}}=g\sin h MathRm: \mathrm{Ax2k\breve{a}\omega\Omega\imath+\KaTeX} MathSf: \mathsf{Ax2k\breve{a}\omega\Omega\imath+\KaTeX} MathScr: \mathscr{Ax2k\breve{a}\omega\Omega\imath+\KaTeX} MathTt: \mathtt{Ax2k\breve{a}\omega\Omega\imath+\KaTeX}\)
$$
Mod: |

\begin{array}{cc}
    a \bmod 2 & b \pod 3 \\
    c \pmod{4} & d \mod{56} \\
    \displaystyle a\bmod 2 & \displaystyle b \pod 3 \\
    \displaystyle c\pmod{4} & \displaystyle d \mod{56}
\end{array}$$

$$
ModScript: |

\begin{array}{cc}
    \scriptstyle a\bmod 2 & \scriptstyle b \pod 3 \\
    \scriptstyle c\pmod{4} & \scriptstyle d \mod{56}
\end{array}

ModSpacing: |

\begin{array}{l}
    (a \cdot b) \bmod 257 \\
    (a \cdot b) \mkern1mu\mathbin{\mathrm{mod}}\mkern1mu 257 \\
    (a \cdot b) \mathbin{\mathrm{mod}} 257
\end{array}

NegativeSpaceBetweenRel: A =!= B\( \)
NestedFractions: |

\dfrac{\frac{a}{b}}{\frac{c}{d}}\dfrac{\dfrac{a}{b}}
{\dfrac{c}{d}}\frac{\frac{a}{b}}{\frac{c}{d}}$$

$$
Not: |

\begin{array}{l}
    \not=\not>\not\geq\not\in\not<\not\leq\not{abc} \\
    \not xy + ab \not xy
\end{array}$$

\( NullDelimiterInteraction: a \bigl. + 2 \quad \left. + a \right)\)
$$
OldFont: |

\begin{matrix}
  \rm rm & it & \it it & \bf bf & \sf sf & \tt tt \\
  \text{\rm rm} & \text{rm} & \text{\it it} & \text{\bf bf} & \text{\sf sf} & \text{\tt tt} \\
  i\rm r\it i & \text{r\it i\rm r}
\end{matrix}$$

$$
OperatorName: |

\begin{matrix}
    \operatorname g (z) + 5\operatorname{g}z + \operatorname{Gam-ma}(z) \\
    \operatorname{Gam ma}(z) + \operatorname{\Gamma}(z) + \operatorname{}x
\end{matrix}

OpLimits: |

\begin{matrix}
    {\sin_2^2 \lim_2^2 \int_2^2 \sum_2^2}
    {\displaystyle \lim_2^2 \int_2^2 \intop_2^2 \sum_2^2} \\
    \limsup_{x \rightarrow \infty} x \stackrel{?}= \liminf_{x \rightarrow \infty} x
\end{matrix}

OverUnderline: x\underline{x}\underline{\underline{x}}\underline{x_{x_{x_x}}}\underline{x{x{xx}}}\overline{x}\overline{x}\overline{x{x{xx}}} \blue{\overline{\underline{x}}\underline{\overline{x}}}
OverUnderset: |

\begin{array}{l}
x\overset?=1 \quad \underset{*}{x}^2 \quad \overset{a}{b}b\underset{a}{b}b \\
{\displaystyle\lim_{t\underset{>0}\to0}}\\
a+b+c+d\overset{b+c=0}\longrightarrow a+d\\
\overset { x = y } { \sqrt { a b } }
\end{array}

Phantom: \dfrac{1+\phantom{x^{\blue{2}}} = x}{1+x^{\blue{2}} = x} \left(\vphantom{\int_t} zzz \right) \left( X \hphantom{\frac{\frac X X}{X}} \right)
PrimeSpacing: f'+f_2'+f^{f'}
PrimeSuper: x'2+x'''2+x'2_3+x_3'2
Raisebox: \frac{a}{a\raisebox{0.5em}{b}} \cdot \frac{a\raisebox{-0.5em}{b}}{a} \cdot \sqrt{a\raisebox{0.5em}{b}} \cdot \sqrt{a\raisebox{-0.5em}{b}} \cdot \sqrt{a\raisebox{0.5em}{b}\raisebox{-0.5em}{b}}
ReactionArrows: |

\begin{matrix}
    A \xrightleftarrows{} B \xrightequilibrium{} C \xleftequilibrium{} D \\
    A \xrightleftarrows{over} B \xrightequilibrium{over} C \xleftequilibrium{over} D
\end{matrix}

RelativeUnits: |

\begin{array}{ll}
    a\kern1emb^{a\kern1emb^{a\kern1emb}} &
    {\footnotesize a\kern1emb^{a\kern1emb^{a\kern1emb}}} \\
    a\mkern18mub^{a\mkern18mub^{a\mkern18mub}} &
    {\footnotesize a\mkern18mub^{a\mkern18mub^{a\mkern18mub}}} \\
    \rule{1em}{1em}^{\rule{1em}{1em}}\rule{18mu}{18mu}^{\rule{18mu}{18mu}} &
    {\footnotesize\rule{1em}{1em}^{\rule{1em}{1em}}\rule{18mu}{18mu}^{\rule{18mu}{18mu}}}
\end{array}

RlapBug: \frac{\mathrlap{x}}{2}
Rule: \rule{1em}{0.5em}\rule{1ex}{2ex}\rule{1em}{1ex}\rule{1em}{0.431ex}\( \)
SizingBaseline:

tex: '{\tiny a+b}a+b{\Huge a+b}'
pre: x
post: M

Sizing: |

{\Huge x}{\LARGE y}{\normalsize z}{\scriptsize w}\sqrt[\small 3]{x+1}

Smash: \left( X^{\smash 2} \right) \sqrt{\smash[b]{y}}
Spacing: |

\begin{matrix}
    ^3+[-1][1-1]1=1(=1)\lvert a\rvert~b \\
    \scriptstyle{^3+[-1][1-1]1=1(=1)\lvert a\rvert~b} \\
    \scriptscriptstyle{^3+[-1][1-1]1=1(=1)\lvert a\rvert~b} \\
\end{matrix}

Sqrt: |

\sqrt{\sqrt{\sqrt{x}}}_{\sqrt{\sqrt{x}}}^{\sqrt{\sqrt{\sqrt{x}}}
^{\sqrt{\sqrt{\sqrt{x}}}}}

SqrtRoot: |

1+\sqrt[3]{2}+\sqrt[1923^234]{2^{2^{2^{2^{2^{2^{2^{2^{2^{2^{2^2}}}}}}}}}}}

StackRel: a \stackrel{?}{=} b \stackrel{\text{def}}{=} c\( \)
StretchyAccent: |

\begin{array}{l}
    \overrightarrow{AB} \quad \overleftarrow{AB} \quad \Overrightarrow{AB} \quad \overleftrightarrow{AB} \quad \overgroup{AB} \\
    \overlinesegment{AB} \quad \overleftharpoon{AB} \quad \overrightharpoon{AB} \quad \color{red}{\overrightarrow{AB}} \quad \widehat{\theta} \widetilde{A} \\
    \widehat{AB} \quad \widehat{ABC} \quad \widetilde{AB} \quad \widetilde{ABC} \\
    \overrightarrow{F} + \overrightarrow{AB} + \overrightarrow{F}^2 + \overrightarrow{F}_2 + \overrightarrow{F}_1^2 \\
    \overrightarrow{AB}^2+\frac{\overrightarrow{AB}}{\overrightarrow{AB}} + \sqrt{\overrightarrow{AB}} + \left\lvert\overrightarrow{AB}\right\rvert
\end{array}

StretchyAccentColor: |

\red{\overrightarrow{AB}} \quad \color{blue}{\overleftarrow{AB}} \quad \color{blue}{\green{\Overrightarrow{AB}}}

StrikeThrough: |

\begin{array}{l}
    \cancel x \quad \cancel{2B} + \bcancel 5 +\bcancel{5ay} \\
    \sout{5ab} + \sout{5ABC} + \xcancel{\oint_S{\vec E\cdot\hat n\,\mathrm d a}} \\
    \frac{x+\cancel B}{x+\cancel x} + \frac{x+\cancel y}{x} + \cancel{B}_1^2 + \cancel{B^2} \\
    \left\lvert\cancel{ac}\right\rvert
\end{array}

StrikeThroughColor: |

\begin{array}{l}
    \red{\cancel x \quad \cancel{2B} + \bcancel 5 +\bcancel{5ay}} \\
    \color{green}{\sout{5ab} + \sout{5ABC} + \xcancel{\oint_S{\vec E\cdot\hat n\,\mathrm d a}}}
\end{array}

StyleSpacing: \scriptstyle ab\;cd
StyleSwitching: a\cdot b\scriptstyle a\cdot ba\textstyle\cdot ba\scriptstyle\cdot b
SupSubCharacterBox: a_2f_2{f}_2{aa}_2{af}_2\mathbf{y}_Ay_A
SupSubHorizSpacing: |

x^{x^{x}}\Big|x_{x_{x_{x_{x}}}}\bigg|x^{x^{x_{x_{x_{x_{x}}}}}}\bigg|$$

$$
SupSubLeftAlignReset: |

\omega^8_{888} \quad \frac{1}{\hat{\omega}^{8}_{888}} \quad \displaystyle\sum_{\omega^{8}_{888}}$$

\( SupSubOffsets: \displaystyle \int_{2+3}x f^{2+3}+3\lim_{2+3+4+5}f\)
$$

Text: \frac{a}{b}\text{c~ {ab} \ e}+fg\( \)
TextSpace:
\begin{array}{l}

\texttt{12345678901234} \\
\texttt{A test  1~~2\ \ 3} \\
\verb|A test 1  2  3|

\end{array}\( \)
TextStacked:
\begin{matrix}

  \textsf{abc123 \textbf{abc123} \textit{abc123}}\\
  \text{abc123 \textbf{abc123} \textit{abc123}}\\
  \textrm{abc123 \textbf{abc123} \textit{abc123}}\\
  \textsf{\textrm{\textbf{abc123}} \textbf{abc123} \textit{abc123}}\\
  \textit{abc123 \textbf{abc123} \textsf{abc123}}\\

\end{matrix}\( \)

Unicode: \begin{matrix}\text{ÀàÇçÉéÏïÖöÛû} \ \text{БГДЖЗЙЛФЦШЫЮЯ} \ \text{여보세요} \ \text{私はバナナです} \end{matrix}\( \)
Units: |

\begin{array}{ll}
  \mathrm H\kern 1em\mathrm H \text{\tiny (1em)}
  & \mathrm H\kern 1ex\mathrm H \text{\tiny (1ex)} \\
  \mathrm H{\scriptstyle \kern 1em}\mathrm H \text{\tiny (ss 1em)}
  & \mathrm H{\scriptstyle \kern 1ex}\mathrm H \text{\tiny (ss 1ex)} \\
  \mathrm H{\small \kern 1em}\mathrm H \text{\tiny (sm 1em)}
  & \mathrm H{\small \kern 1ex}\mathrm H \text{\tiny (sm 1ex)} \\
  \mathrm H\mkern 18mu\mathrm H \text{\tiny (18mu)}
  & \mathrm H\kern 1cm\mathrm H \text{\tiny (1cm)} \\
  \mathrm H{\scriptstyle \mkern 18mu}\mathrm H \text{\tiny (ss 18mu)}
  & \mathrm H{\scriptstyle \kern 1cm}\mathrm H \text{\tiny (ss 1cm)} \\
  \mathrm H{\small \mkern 18mu}\mathrm H \text{\tiny (sm 18mu)}
  & \mathrm H{\small \kern 1cm}\mathrm H \text{\tiny (sm 1cm)}
\end{array}$$

$$
Verb: |

\begin{array}{ll}
  \verb \verb ,   & \verb|\verb  |, \\
  \verb* \verb* , & \verb*|\verb* |, \\
  \verb!<x> & </y>! & \scriptstyle\verb|ss verb| \\
  \verb*!<x> & </y>! & \small\verb|sm verb| \\
  \verb|``---''~|
\end{array}

VerticalSpacing:

pre: potato<br>blah
tex: x^{\Huge y}z

post:
moo
$$

`