字母 | Latex | 字母 | Latex | 字母 | Latex | 字母 | Latex |
---|---|---|---|---|---|---|---|
\alpha | \beta | \gamma | \delta | ||||
\epsilon | \zeta | \eta | \theta | ||||
\iota | \kappa | \lambda | \mu | ||||
\nu | \xi | \omicron | \pi | ||||
\rho | \sigma | \tau | \upsilon | ||||
\phi | \chi | \psi | \omega | ||||
\varepsilon | \varkappa | \vartheta | \digamma | ||||
\varpi | \varrho | \varsigma | \varphi | ||||
\Gamma | \Delta | \Theta | \Lambda | ||||
\Xi | \Pi | \Sigma | \Upsilon | ||||
\Phi | \Psi | \varGamma | \varDelta | ||||
\varTheta | \varLambda | \varXi | \varPi | ||||
\varSigma | \varUpsilon | \varPhi | \varPsi | ||||
\varOmega | \Omega |
符号 | 符号 | ||
---|---|---|---|
\pm | \log | ||
\times | \lg | ||
\div | \ln | ||
\infty | \bot | ||
\nabla | \hat{a} | ||
\overline X | \angle | ||
\cdot | 30^\circ | ||
\bmod | \pmod{n} | ||
\vert | \enclose{phasorangle}{a+b} |
\because \quad
\therefore \quad
\exists \quad
\in \quad
\notin \quad
\subset \quad
\supset \quad
\not\subset \quad
\subseteq \quad
\supseteq \quad
\emptyset \quad
\cup \quad
\cap \quad
\sin 30^\circ \quad
\cos 30^\circ \quad
\tan 30^\circ \quad
\cot 30^\circ \quad
\sec 30^\circ \quad
\csc 30^\circ \quad
\arcsin 1/2 \quad
\arccos 1/2 \quad
\arctan 1/2
= \quad
\neq \quad > \quad < \quad
\geqslant \quad
\leqslant \quad
\not> \quad
\not< \quad
\approx \quad
\equiv \quad
\gg \quad
\sim
\leftarrow \quad \Leftarrow \\
\longleftarrow \quad \Longleftarrow \\
\rightarrow \quad \Rightarrow \\
\longrightarrow \quad \Longrightarrow \\
\leftrightarrow \quad \Leftrightarrow \\
\longleftrightarrow \quad \Longleftrightarrow
\overset{\text{def}}{=} \quad \underset{x \to 0}{=} \quad \substack{0<i<m\\0<j<n} \quad \lim_{x=0 \atop y=2}
A\xlongequal[sub-script]{super-script}B \qquad
A\xleftarrow[sub-script]{super-script}B \qquad
A\xrightarrow[sub-script]{super-script}B
~ | |
\enspace | |
\quad | |
\qquad |
指数或上标用 ^ 表示,下标用 _ 表示,根号用 \sqrt 表示。
上下标如果多于一个字母或符号,需要用一对 {} 括起来。
x_{ij }^2\quad
\sqrt{x}\quad
\sqrt[3]{x}
分数用 \frac 命令表示,它会根据环境自动调整字号,比如在行间公式中小一点,在独立公式中则大一点。
D(X) = D(\dfrac{X_1+X_2+X_3+...+X_n}{n})
\begin{array} {l}D(\frac{X_1+X_2+X_3+...+X_n}{n})\end{array}
array环境中的分数感觉被压扁了。
为了解决这个问题,我们可以主动设置分数大小,\dfrac是大分式,\tfrac 是小分式。
\dfrac {1}{2} \tfrac {1}{2}
\sum_{i=1}^n i\quad
\prod_{i=1}^n
\lim_{x\rightarrow+\infty} x^2 \quad
f^{'}(x) \quad
f^{''}(x) \quad
f^{'''}(x) \quad
\frac{\partial^2 y}{\partial x^2} \quad
\int_a^b x^2 dx \quad
\iint x^2 dx \quad
\iiint x^2 dx \quad
\oint x^2 dx
\vec{a} \cdot \vec{b}=0
M = EC^2 \tag{1.1}
(\dfrac{a}{b})
[\dfrac{a}{b}]
\{ \dfrac{a}{b} \}
\langle \dfrac{a}{b} \rangle
括号的大小
( \big( \Big( \bigg( \Bigg(
如果括号比较多,可以使用\left与\right指定使用左括号还是右括号
\begin{aligned}
\frac{\partial}{\partial\theta_j}J(\theta) &= \frac{\partial}{\partial\theta_j}\frac{1}{2}(h_\theta(x) - y)^2 \\
&= 2\frac{1}{2}(h_\theta(x) - y)\frac{\partial}{\partial\theta_j}(h_\theta(x) - y) \\
&= (h_\theta(x) - y)\frac{\partial}{\partial\theta_j}(\sum_{i=1}^n \theta_ix_i - y) \\
&= (h_\theta(x) - y)x_j
\end{aligned}
\begin{array}{ll} Repeat \quad \{ \\
\qquad \theta_j := \theta_j - \alpha(h_\theta(x^{(i)}) - y^{(i)}) x_j^{(i)} \\
\} \end{array}
f(n)=\left \{
\begin{array}{1}
\text{if n is even:}&n/2 \\
\text{if n is odd:}&3n+1
\end{array}
\right.
\left.
\begin{array}{1}
\text{if n is even:}&n/2 \\
\text{if n is odd:}&3n+1
\end{array}
\right\}=f(n)
\left(\begin{array}{}
1&\alpha_1&\alpha_1^2&\cdots&\alpha_1^n\\
1&\alpha_2&\alpha_2^2&\cdots&\alpha_2^n\\
\vdots&\vdots&\vdots&\ddots&\vdots\\
1&\alpha_n&\alpha_n^2&\cdots&\alpha_n^n
\end{array}\right)
\newcommand\iddots{\mathinner{
\kern1mu\raise1pt{.}
\kern2mu\raise4pt{.}
\kern2mu\raise7pt{\Rule{0pt}{7pt}{0pt}.}
\kern1mu
}}
\left[\begin{array}{ccc} & & & \boldsymbol{A}_{1} \\
& & \boldsymbol{A}_{2} & \\ & \iddots & & \\
\boldsymbol{A}_{s} & & & \end{array}\right]
\left ( \begin{array}{} a&b\\c&d \end{array} \right ) \quad
\left [ \begin{array}{} a&b\\c&d \end{array} \right ] \quad
\left \{ \begin{array}{} a&b\\c&d \end{array} \right \} \quad
\left | \begin{array}{} a&b\\c&d \end{array} \right | \quad
\left | \left| \begin{array}{} a&b\\c&d \end{array} \right | \right| \quad
\left[\begin{array}{l}A \\ \hdashline B\end{array}\right]
\begin{array} {|c|c|c|}
\hline
\color{black}{黑色(\text{black})} & \color{red}{红色(\text{red})} & \color{yellow}{黄色(\text{yellow})} \\
\hline
\color{blue}{蓝色(\text{blue})} & \color{grey}{灰色(\text{grey})} & \color{navy}{藏青色(\text{navy})} \\
\hline
\color{green}{绿色(\text{green})} & \color{purple}{紫色(\text{purple})} & \color{maroon}{紫红色(\text{maroon})} \\
\hline
\color{olive}{橄榄绿(\text{olive})} & \color{teal}{蓝绿色(\text{teal})} & \color{silver}{银色(\text{silver})} \\
\hline
\color{lime}{浅绿色(\text{lime})} & & \\
\hline
\end{array}
\vspace{1ex}
\\[1em]
array环境中必须用\dfrac,否则分数会变小。aligned环境不会变小。
https://katex.org/docs/supported.html