前言:这篇文章是我学习LaTeX数学公式时根据数学公式怎么敲?LaTeX保姆级教程讲解边看边写而成的学习笔记,留下作为记录.

注意:这里由于网页不方便渲染LaTeX,因此我将typora中的LaTeX渲染效果变为图片,其下代码即该LaTeX代码.

希腊字母

1
2
3
4
5
6
\delta,\lambda\\
\Delta,\Lambda\\
\alpha,\beta\\
\Alpha,\Beta\\
\phi,,\varphi\\
\epsilon,\varepsilon\\

上下标

英文字母只有在表示变量(或单一字符的函数名称)才使用斜体,其余情况使用罗马体(直立体)

1
2
3
4
5
6
7
8
a^2,a_1\\
x^{y+z},P_{ij}\\
x_i,x_{\rm i},x_{\text i}\\
\text{A B},\rm{A B}\\
\text A B,\rm A B\\
{\rm A} B\\
\text{e},\text{i}\\
e,i

e:自然对数底数,为常数

i,j:叙述单位,常量

分式与根式

1
2
3
4
\frac{1}{2},\frac 1 2\\
\frac 1{x + y}\\
\frac {\frac 1 x + 1}{y + 1}\\
\frac {\dfrac 1 x + 1}{y + 1}

1
\sqrt 2,\sqrt {x+y},\sqrt[3] x

\frac (fraction,分数) \dfrac (display-style)
\sqrt (square root,平方根)

普通运算符

1
2
3
4
5
6
7
8
9
10
+ -\\
\times,\cdot,\div\\
\pm,\mp\\
><,\ge,\le,\gg,\ll,\ne,\approx,\equiv\\
\cap,\cup,\in,\notin,\subseteq,\subsetneq,\subsetneqq,\varnothing\\
\forall,\exists,\nexists\\
\because,\therefore\\
\mathbb R,\R,\Q,\N,\Z_+\\
\mathcal f,\mathscr f\\
\mathcal F,\mathscr F

1
2
\cdot,\cdots,\vdots,\ddots\\
\infty,\partial,\nabla,\propto,\degree

1
2
3
4
5
\sin x,\sec x,\cosh x,\tan x\\
\log_2 x,\ln x,\lg x\\
\lim_{x \to 0} \frac {x}{\sin x}\\
\lim\limits_{x \to 0} \frac {x}{\sin x}\\
\max x

1
\text{MSE}(x)

运算符名称超过一个字母时应用直立体

大型运算符

1
2
3
\sum,\prod\\\
\sum_i,\sum_{i=0}^N\\
\frac{\sum\limits_{i=1}^n x_i}{\prod_{i=1}^n x_i}

1
2
\int,\iint,\iiint,\oint,\oiint,\oiiint\\
\int_{-\infty}^0 f(x)\,\text d x

1
2
3
4
a\,a\\
a\ a\\
a\quad a\\
a\qquad a

标注符号

1
2
\vec x,\overrightarrow {AB}\\
\bar x,\overline {ABC}

箭头

1
\leftarrow,\rightarrow,\Rightarrow,\Leftarrow,\Leftrightarrow,\longleftarrow,\longrightarrow,\Longrightarrow

括号与定界符

1
2
3
4
5
6
([])\{ \}\\
\lceil,\rceil,\lfloor,\rfloor,||\\
(0,\frac 1 a)\\
\left(0,\frac 1 a\right)\\
\frac {\partial f}{\partial x}|_{x=0}\\
\left.\frac {\partial f}{\partial x}\right|_{x=0}

多行公式

1
2
3
4
5
6
\begin{align}

a=b+c+d\\
=e+f

\end{align}

1
2
3
4
5
6
7
8
9
10
11
\begin{align}
a&=b+c+d\\
&=e+f

\end{align}
\begin{align}

a&=b+c+d\\
&=e+f

\end{align}

大括号

1
2
3
4
5
6
7
f(x)=
\begin{cases}

\sin x,&-\pi\le x \le \pi\\\
0,&\text{others}

\end{cases}

矩阵

1
2
3
4
5
6
7
\begin{matrix}

a & b & \cdots & c\\
\vdots & \vdots & \ddots & \vdots\\
e & f & \cdots & g

\end{matrix}

1
2
3
4
5
6
7
\begin{bmatrix}

a & b & \cdots & c\\
\vdots & \vdots & \ddots & \vdots\\
e & f & \cdots & g

\end{bmatrix}

1
2
3
4
5
6
7
\begin{pmatrix}

a & b & \cdots & c\\
\vdots & \vdots & \ddots & \vdots\\
e & f & \cdots & g

\end{pmatrix}

1
2
3
4
5
6
7
\begin{vmatrix}

a & b & \cdots & c\\
\vdots & \vdots & \ddots & \vdots\\
e & f & \cdots & g

\end{vmatrix}

1
2
3
\bf A,\bf B^{\rm T}\\
\mathbf A,\mathbf B^{\rm T}\\
\bf B^{\text T}