目录
标准数值函数 Standard numerical functions
微分与导数 Differentials and derivatives
用Bbox扩展设置背景颜色 Setting background color with Bbox
设置背景颜色 Setting Background color
调整背景大小 Setting Background Size
数学公式编辑 Displaying a formula
符号与字母 Symbol and Alphabet
希腊字母 Greek alphabet
序号 | 小写 | LaTeX | 读音 | 序号 | 大写 | LaTeX | 读音 |
---|---|---|---|---|---|---|---|
1 | \alpha | /ˈælfə/ | 21 | \varrho | /roʊ/ | ||
2 | \beta | /ˈbiːtə/, US: /ˈbeɪtə/ | 22 | \sigma | /ˈsɪɡmə/ | ||
3 | \gamma | /ˈɡæmə/ | 23 | \varsigma | /ˈsɪɡmə/ | ||
4 | \delta | /ˈdɛltə/ | 24 | \tau | /taʊ, tɔː/ | ||
5 | \epsilon | /ˈɛpsɪlɒn/ | 25 | \upsilon | /ˈʌpsɪlɒn/ | ||
6 | \varepsilon | /ˈɛpsɪlɒn/ | 26 | \phi | /faɪ/ | ||
7 | \zeta | /ˈzeɪtə/ | 27 | \varphi | /faɪ/ | ||
8 | \eta | /ˈeɪtə/ | 28 | \chi | /kaɪ/ | ||
9 | \theta | /ˈθiːtə/ | 29 | \psi | /psaɪ/ | ||
10 | \vartheta | /ˈθiːtə/ | 30 | \omega | /oʊˈmeɪɡə/ | ||
11 | \iota | /aɪˈoʊtə/ | 31 | \Gamma | /ˈɡæmə/ | ||
12 | \kappa | /ˈkæpə/ | 32 | \Delta | /ˈdɛltə/ | ||
13 | \lambda | /ˈlæmdə/ | 33 | \Theta | /ˈθiːtə/ | ||
14 | \mu | /mjuː/ | 34 | \Lambda | /ˈlæmdə/ | ||
15 | \nu | /njuː/ | 35 | \Xi | /zaɪ, ksaɪ/ | ||
16 | \xi | /zaɪ, ksaɪ/ | 36 | \Pi | /paɪ/ | ||
17 | o | /ˈɒmɪkrɒn/ | 37 | \Sigma | /ˈsɪɡmə/ | ||
18 | \pi | /paɪ/ | 38 | \Upsilon | /ˈʌpsɪlɒn/ | ||
19 | \varpi | /paɪ/ | 39 | \Phi | /faɪ/ | ||
20 | \rho | /roʊ/ | 40 | \Psi | /psaɪ/ | ||
41 | \Omega | /oʊˈmeɪɡə/ |
注意: MathJax支持的大写希腊字母有限,如需其他(如大写Alpha),可使用罗马体转换,如\mathrm{A}
表示大写Alpha:$\mathrm{A}$。
希伯来字母 Hebrew alphabet
序号 | 图标 | LaTeX | 英文 |
---|---|---|---|
1 | \aleph | aleph | |
2 | \beth | beth | |
3 | \gimel | gimel | |
4 | \daleth | daleth |
二元运算符 Binary operations
序号 | 图标 | LaTeX | 序号 | 图标 | LaTeX |
---|---|---|---|---|---|
1 | + | 20 | \bullet | ||
2 | - | 21 | \oplus | ||
3 | \times | 22 | \ominus | ||
4 | \div (在physics扩展开启状态下为) | 23 | \odot | ||
5 | \pm | 24 | \oslash | ||
6 | \mp | 25 | \otimes | ||
7 | \triangleleft | 26 | \bigcirc | ||
8 | \triangleright | 27 | \diamond | ||
9 | \cdot | 28 | \uplus | ||
10 | \setminus | 29 | \bigtriangleup | ||
11 | \star | 30 | \bigtriangledown | ||
12 | \ast | 31 | \lhd | ||
13 | \cup | 32 | \rhd | ||
14 | \cap | 33 | \unlhd | ||
15 | \sqcup | 34 | \unrhd | ||
16 | \sqcap | 35 | \amalg | ||
17 | \vee | 36 | \wr | ||
18 | \wedge | 37 | \dagger | ||
19 | \circ | 38 | \ddagger |
二元关系符 Binary relations
序号 | 图标 | LaTeX | 序号 | 图标 | LaTeX |
---|---|---|---|---|---|
1 | = | 49 | \gneq | ||
2 | \ne | 50 | \geqq | ||
3 | \neq | 51 | \ngeq | ||
4 | \equiv | 52 | \ngeqq | ||
5 | \not\equiv | 53 | \gneqq | ||
6 | \doteq | 54 | \gvertneqq | ||
7 | \doteqdot | 55 | \lessgtr | ||
8 | \overset{\underset{\mathrm{def}}{}}{=} | 56 | \lesseqgtr | ||
9 | := | 57 | \lesseqqgtr | ||
10 | \sim | 58 | \gtrless | ||
11 | \nsim | 59 | \gtreqless | ||
12 | \backsim | 60 | \gtreqqless | ||
13 | \thicksim | 61 | \leqslant | ||
14 | \simeq | 62 | \nleqslant | ||
15 | \backsimeq | 63 | \eqslantless | ||
16 | \eqsim | 64 | \geqslant | ||
17 | \cong | 65 | \ngeqslant | ||
18 | \ncong | 66 | \eqslantgtr | ||
19 | \approx | 67 | \lesssim | ||
20 | \thickapprox | 68 | \lnsim | ||
21 | \approxeq | 69 | \lessapprox | ||
22 | \asymp | 70 | \lnapprox | ||
23 | \propto | 71 | \gtrsim | ||
24 | \varpropto | 72 | \gnsim | ||
25 | < | 73 | \gtrapprox | ||
26 | \nless | 74 | \gnapprox | ||
27 | \ll | 75 | \prec | ||
28 | \not\ll | 76 | \nprec | ||
29 | \lll | 77 | \preceq | ||
30 | \not\lll | 78 | \npreceq | ||
31 | \lessdot | 79 | \precneqq | ||
32 | > | 80 | \succ | ||
33 | \ngtr | 81 | \nsucc | ||
34 | \gg | 82 | \succeq | ||
35 | \not\gg | 83 | \nsucceq | ||
36 | \ggg | 84 | \succneqq | ||
37 | \not\ggg | 85 | \preccurlyeq | ||
38 | \gtrdot | 86 | \curlyeqprec | ||
39 | \le | 87 | \succcurlyeq | ||
40 | \leq | 88 | \curlyeqsucc | ||
41 | \lneq | 89 | \precsim | ||
42 | \leqq | 90 | \precnsim | ||
43 | \nleq | 91 | \precapprox | ||
44 | \nleqq | 92 | \precnapprox | ||
45 | \lneqq | 93 | \succsim | ||
46 | \lvertneqq | 94 | \succnsim | ||
47 | \ge | 95 | \succapprox | ||
48 | \geq | 96 | \succnapprox |
几何符号 Geometric symbols
序号 | 图标 | LaTeX | 序号 | 图标 | LaTeX |
---|---|---|---|---|---|
1 | \parallel | 14 | \lozenge | ||
2 | \nparallel | 15 | \blacklozenge | ||
3 | \shortparallel | 16 | \bigstar | ||
4 | \nshortparallel | 17 | \bigcirc | ||
5 | \perp | 18 | \triangle | ||
6 | \angle | 19 | \bigtriangleup | ||
7 | \sphericalangle | 20 | \bigtriangledown | ||
8 | \measuredangle | 21 | \vartriangle | ||
9 | 45^\circ | 22 | \triangledown | ||
10 | \Box | 23 | \blacktriangle | ||
11 | \blacksquare | 24 | \blacktriangledown | ||
12 | \diamond | 25 | \blacktriangleleft | ||
13 | \Diamond \lozenge | 26 | \blacktriangleright |
逻辑符号 Logic symbols
序号 | 图标 | LaTeX | 序号 | 图标 | LaTeX |
---|---|---|---|---|---|
1 | \forall | 20 | \neg | ||
2 | \exists | 21 | \not\operatorname{R} | ||
3 | \nexists | 22 | \bot | ||
4 | \therefore | 23 | \top | ||
5 | \because | 24 | \vdash | ||
6 | \And | 25 | \dashv | ||
7 | \lor | 26 | \vDash | ||
8 | \vee | 27 | \Vdash | ||
9 | \curlyvee | 28 | \models | ||
10 | \bigvee | 29 | \Vvdash | ||
11 | \land | 30 | \nvdash | ||
12 | \wedge | 31 | \nVdash | ||
13 | \curlywedge | 32 | \nvDash | ||
14 | \bigwedge | 33 | \nVDash | ||
15 | \bar{q} | 34 | \ulcorner | ||
16 | \bar{abc} | 35 | \urcorner | ||
17 | \overline{q} | 36 | \llcorner | ||
18 | \overline{abc} | 37 | \lrcorner | ||
19 | \lnot |
集合 Sets
序号 | 图标 | LaTeX | 序号 | 图标 | LaTeX |
---|---|---|---|---|---|
1 | {} | 23 | \sqsubset | ||
2 | \emptyset | 24 | \supset | ||
3 | \varnothing | 25 | \Supset | ||
4 | \in | 26 | \sqsupset | ||
5 | \notin | 27 | \subseteq | ||
6 | \ni | 28 | \nsubseteq | ||
7 | \cap | 29 | \subsetneq | ||
8 | \Cap | 30 | \varsubsetneq | ||
9 | \sqcap | 31 | \sqsubseteq | ||
10 | \bigcap | 32 | \supseteq | ||
11 | \cup | 33 | \nsupseteq | ||
12 | \Cup | 34 | \supsetneq | ||
13 | \sqcup | 35 | \varsupsetneq | ||
14 | \bigcup | 36 | \sqsupseteq | ||
15 | \bigsqcup | 37 | \subseteqq | ||
16 | \uplus | 38 | \nsubseteqq | ||
17 | \biguplus | 39 | \subsetneqq | ||
18 | \setminus | 40 | \varsubsetneqq | ||
19 | \smallsetminus | 41 | \supseteqq | ||
20 | \times | 42 | \nsupseteqq | ||
21 | \subset | 43 | \supsetneqq | ||
22 | \Subset | 44 | \varsupsetneqq |
箭头 Arrows
序号 | 图标 | LaTeX | 序号 | 图标 | LaTeX |
---|---|---|---|---|---|
1 | \Rrightarrow | 36 | \longmapsto | ||
2 | \Lleftarrow | 37 | \rightharpoonup | ||
3 | \Rightarrow | 38 | \rightharpoondown | ||
4 | \nRightarrow | 39 | \leftharpoonup | ||
5 | \Longrightarrow | 40 | \leftharpoondown | ||
6 | \implies | 41 | \upharpoonleft | ||
7 | \Leftarrow | 42 | \upharpoonright | ||
8 | \nLeftarrow | 43 | \downharpoonleft | ||
9 | \Longleftarrow | 44 | \downharpoonright | ||
10 | \Leftrightarrow | 45 | \rightleftharpoons | ||
11 | \nLeftrightarrow | 46 | \leftrightharpoons | ||
12 | \Longleftrightarrow | 47 | \curvearrowleft | ||
13 | \iff | 48 | \circlearrowleft | ||
14 | \Uparrow | 49 | \Lsh | ||
15 | \Downarrow | 50 | \upuparrows | ||
16 | \Updownarrow | 51 | \rightrightarrows | ||
17 | \rightarrow | 52 | \rightleftarrows | ||
18 | \to | 53 | \rightarrowtail | ||
19 | \nrightarrow | 54 | \looparrowright | ||
20 | \longrightarrow | 55 | \curvearrowright | ||
21 | \leftarrow | 56 | \circlearrowright | ||
22 | \gets | 57 | \Rsh | ||
23 | \nleftarrow | 58 | \downdownarrows | ||
24 | \longleftarrow | 59 | \leftleftarrows | ||
25 | \leftrightarrow | 60 | \leftrightarrows | ||
26 | \nleftrightarrow | 61 | \leftarrowtail | ||
27 | \longleftrightarrow | 62 | \looparrowleft | ||
28 | \uparrow | 63 | \hookrightarrow | ||
29 | \downarrow | 64 | \hookleftarrow | ||
30 | \updownarrow | 65 | \multimap | ||
31 | \nearrow | 66 | \leftrightsquigarrow | ||
32 | \swarrow | 67 | \rightsquigarrow | ||
33 | \nwarrow | 68 | \twoheadrightarrow | ||
34 | \searrow | 69 | \twoheadleftarrow | ||
35 | \mapsto |
特殊 Special
序号 | 图标 | LaTeX | 序号 | 图标 | LaTeX |
---|---|---|---|---|---|
1 | \infty | 33 | \flat | ||
2 | \aleph | 34 | \natural | ||
3 | \complement | 35 | \sharp | ||
4 | \backepsilon | 36 | \diagup | ||
5 | \eth | 37 | \diagdown | ||
6 | \Finv | 38 | \centerdot | ||
7 | \hbar | 39 | \ltimes | ||
8 | \Im | 40 | \rtimes | ||
9 | \imath | 41 | \leftthreetimes | ||
10 | \jmath | 42 | \rightthreetimes | ||
11 | \Bbbk | 43 | \eqcirc | ||
12 | \ell | 44 | \circeq | ||
13 | \mho | 45 | \triangleq | ||
14 | \wp | 46 | \bumpeq | ||
15 | \Re | 47 | \Bumpeq | ||
16 | \circledS | 48 | \doteqdot | ||
17 | \amalg | 49 | \risingdotseq | ||
18 | \% | 50 | \fallingdotseq | ||
19 | \dagger | 51 | \intercal | ||
20 | \ddagger | 52 | \barwedge | ||
21 | \ldots | 53 | \veebar | ||
22 | \cdots | 54 | \doublebarwedge | ||
23 | \smile | 55 | \between | ||
24 | \frown | 56 | \pitchfork | ||
25 | $\wr$ | \wr | 57 | \vartriangleleft | |
26 | \triangleleft | 58 | \ntriangleleft | ||
27 | \triangleright | 59 | \vartriangleright | ||
28 | \diamondsuit | 60 | \ntriangleright | ||
29 | \heartsuit | 61 | \trianglelefteq | ||
30 | \clubsuit | 62 | \ntrianglelefteq | ||
31 | \spadesuit | 63 | \trianglerighteq | ||
32 | \Game | 64 | \ntrianglerighteq |
运算与函数 Operations & Functions
分数 Fractions
类型 | 样式 | LaTeX |
---|---|---|
分数 Fractions | \frac{2}{4}x=0.5x or {2 \over 4}x=0.5x | |
小型分数 Small fractions (force \textstyle) | \tfrac{2}{4}x = 0.5x | |
大型分数(不嵌套) Large (normal) fractions (force \displaystyle) | \dfrac{2}{4} = 0.5 \qquad \dfrac{2}{c + \dfrac{2}{d + \dfrac{2}{4}}} = a | |
大型分数(嵌套) Large (nested) fractions | \cfrac{2}{c + \cfrac{2}{d + \cfrac{2}{4}}} = a | |
约分线的使用 Cancellations in fractions | \cfrac{x}{1 + \cfrac{\cancel{y}}{\cancel{y}}} = \cfrac{x}{2} |
注意: 其中\cancel
命令需要cancel扩展包支持,cancel扩展包是一款自定义宏包,如需使用请在公式页面右上角【设置】页面勾选后使用。
标准数值函数 Standard numerical functions
样式 | LaTeX |
---|---|
\exp_a b = a^b, \exp b = e^b, 10^m | |
\ln c, \lg d = \log e, \log_{10} f | |
\sin a, \cos b, \tan c, \cot d, \sec e, \csc f | |
\arcsin a, \arccos b, \arctan c | |
\operatorname{arccot} d, \operatorname{arcsec} e, \operatorname{arccsc} f | |
\sinh a, \cosh b, \tanh c, \coth d | |
\operatorname{sh}k, \operatorname{ch}l, \operatorname{th}m, \operatorname{coth}n | |
\operatorname{argsh}o, \operatorname{argch}p, \operatorname{argth}q | |
\operatorname{sgn}r, \left\vert s \right\vert | |
\min(x,y), \max(x,y) |
注意:LaTeX和MathJax支持的操作符有限,如有特殊操作符,可以使用\operatorname{}
命令自定义,例如
\operatorname{mydefine}x
$$ \operatorname{mydefine}x $$
根式 Radicals
样式 | LaTeX |
---|---|
\surd | |
\sqrt{\pi} | |
\sqrt[n]{\pi} | |
\sqrt[3]{\frac{x^3+y^3}{2}} |
微分与导数 Differentials and derivatives
样式 | LaTeX |
---|---|
dt, \mathrm{d}t, \partial t, \nabla\psi | |
dy/dx, \mathrm{d}y/\mathrm{d}x, \frac{dy}{dx}, \frac{\mathrm{d}y}{\mathrm{d}x}, \frac{\partial^2}{\partial x_1\partial x_2}y | |
\prime, \backprime, f^\prime, f', f'', f^{(3)}, \dot y, \ddot y |
同余与模算术 Modular arithmetic
样式 | LaTeX |
---|---|
s_k \equiv 0 \pmod{m} | |
a \bmod b | |
\gcd(m, n), \operatorname{lcm}(m, n) | |
\mid, \nmid, \shortmid, \nshortmid |
极限 Limits
样式 | LaTeX |
---|---|
\lim_{n \to \infty}x_n | |
\textstyle \lim_{n \to \infty}x_n |
界限与投影 Bounds and Projections
样式 | LaTeX |
---|---|
\min x, \max y, \inf s, \sup t | |
\lim u, \liminf v, \limsup w | |
\dim p, \deg q, \det m, \ker\phi | |
\Pr j, \hom l, \lVert z \rVert, \arg z |
积分 Integral
样式 | LaTeX |
---|---|
\int\limits_{1}^{3}\frac{e^3/x}{x^2}\, dx | |
\int_{1}^{3}\frac{e^3/x}{x^2}\, dx | |
\textstyle \int\limits_{-N}^{N} e^x dx | |
\textstyle \int_{-N}^{N} e^x dx | |
\iint\limits_D dx\,dy | |
\iiint\limits_E dx\,dy\,dz | |
\iiiint\limits_F dx\,dy\,dz\,dt | |
\int_{(x,y)\in C} x^3\, dx + 4y^2\, dy | |
\oint_{(x,y)\in C} x^3\, dx + 4y^2\, dy |
注意:积分符号可以使用\int_{}^{}
命令调用,如需双重积分符号只需将int
替换成iint
即可,以此类推,最高支持四重。曲线积分可使用\oint
命令调用,但曲面积分符号在MathJax环境中并不支持\oiint
的用法,但仍可通过\unicode{}
命令,即Unicode代码的方式进行调用(前提是您需要在设置中打开Unicode扩展),具体使用方法如下:
\unicode{8751} \unicode{x222F}_C %曲面积分符号的Unicode码十进制为8751,十六进制为x222F(注意x标识符)
$\Large\unicode{8751} \quad \unicode{x222F}_C %曲面积分符号的Unicode码十进制为8751,十六进制为x222F(注意x标识符)$
\unicode{8752} \unicode{x2230}_C %三维曲面积分符号的Unicode码十进制为8752,十六进制为x2230
$\Large\unicode{8752} \quad \unicode{x2230}_C %三维曲面积分符号的Unicode码十进制为8752,十六进制为x2230$
其他积分符号:
\unicode{8753} \unicode{x2231}_c
\unicode{8754} \unicode{x2232}_c
\unicode{8755} \unicode{x2233}_c
$\Large\unicode{8753} \qquad \unicode{x2231}_c \qquad \unicode{8754} \qquad \unicode{x2232}_c \qquad \unicode{8755} \qquad \unicode{x2233}_c $
其他大型运算 Large operators
类别 | 样式 | LaTeX |
---|---|---|
求和 Summation | \sum_{a}^{b} | |
求和 Summation | \textstyle \sum_{a}^{b} | |
连乘积 Product | \prod_{a}^{b} | |
连乘积 Product | \textstyle \prod_{a}^{b} | |
余积 Coproduct | \coprod_{a}^{b} | |
余积 Coproduct | \textstyle \coprod_{a}^{b} | |
并集 Union | \bigcup_{a}^{b} | |
并集 Union | \textstyle \bigcup_{a}^{b} | |
交集 Intersection | \bigcap_{a}^{b} | |
交集 Intersection | \textstyle \bigcap_{a}^{b} | |
析取 Disjunction | \bigvee_{a}^{b} | |
析取 Disjunction | \textstyle \bigvee_{a}^{b} | |
合取 Conjunction | \bigwedge_{a}^{b} | |
合取 Conjunction | \textstyle \bigwedge_{a}^{b} |
上下标 Sub & Super
类型 | 样式 | 代码 |
---|---|---|
上标 Superscript | a^2, a^{x+3} | |
下标 Subscript | a_2 | |
组合 Grouping | 10^{30} a^{2+2} | |
a{i,j} b{f'} | ||
上下标混合 Combining sub & super | x_2^3 | |
{x_2}^3 | ||
上标的上标 Super super | 10^{10^{8}} | |
混合标识 Preceding and/or additional sub & super | \sideset{1^2}{3^4}X_a^b | |
{}_1^2!\Omega_3^4 | ||
顶标底标 Stacking | \overset{\alpha}{\omega} | |
\underset{\alpha}{\omega} | ||
\overset{\alpha}{\underset{\gamma}{\omega}} | ||
\stackrel{\alpha}{\omega} | ||
导数 Derivatives | x', y'', f', f'' | |
x^\prime, y^{\prime\prime} | ||
导数 Derivative dots | \dot{x}, \ddot{x} | |
下划线、上划线与向量 Underlines, overlines, vectors | \hat a \ \bar b \ \vec c | |
\overrightarrow{a b} \ \overleftarrow{c d} \ \widehat{d e f} | ||
\overline{g h i} \ \underline{j k l} | ||
弧度 Arc (workaround) | \overset{\frown} {AB} | |
箭头 Arrows | A \xleftarrow{n+\mu-1} B \xrightarrow[T]{n\pm i-1} C | |
大括号 Overbraces | \overbrace{ 1+2+\cdots+100 }^{5050} | |
底部大括号 Underbraces | \underbrace{ a+b+\cdots+z }_{26} | |
求和运算 Sum | \sum_{k=1}^N k^2 | |
文本模式下的求和运算 Sum (force \textstyle) | \textstyle \sum_{k=1}^N k^2 | |
分式中的求和运算 Sum in a fraction (default \textstyle) | \frac{\sum_{k=1}^N k^2}{a} | |
分式中的求和运算 Sum in a fraction (force \displaystyle) | \frac{\displaystyle \sum_{k=1}^N k^2}{a} | |
分式中的求和运算 Sum in a fraction (alternative limits style) | \frac{\sum\limits^{^N}_{k=1} k^2}{a} | |
乘积运算 Product | \prod_{i=1}^N x_i | |
乘积运算 Product (force \textstyle) | \textstyle \prod_{i=1}^N x_i | |
副乘运算 Coproduct | \coprod_{i=1}^N x_i | |
副乘运算 Coproduct (force \textstyle) | \textstyle \coprod_{i=1}^N x_i | |
极限 Limit | \lim_{n \to \infty}x_n | |
极限 Limit (force \textstyle) | \textstyle \lim_{n \to \infty}x_n | |
积分 Integral | \int\limits_{1}^{3}\frac{e^3/x}{x^2}\, dx | |
积分 Integral (alternative limits style) | \int_{1}^{3}\frac{e^3/x}{x^2}\, dx | |
积分 Integral (force \textstyle) | \textstyle \int\limits_{-N}^{N} e^x dx | |
积分 Integral (force \textstyle, alternative limits style) | \textstyle \int_{-N}^{N} e^x dx | |
双重积分 Double integral | \iint\limits_D dx\,dy | |
三重积分 Triple integral | \iiint\limits_E dx\,dy\,dz | |
四重积分 Quadruple integral | \iiiint\limits_F dx\,dy\,dz\,dt | |
路径积分 Line or path integral | \int_{(x,y)\in C} x^3\, dx + 4y^2\, dy | |
环路积分 Closed line or path integral | \oint_{(x,y)\in C} x^3\, dx + 4y^2\, dy | |
交集 Intersections | \bigcap_{i=1}^n E_i | |
并集 Unions | \bigcup_{i=1}^n E_i |
矩阵与多行列式 Matrices & Multilines
类型 | 样式 | LaTeX |
---|---|---|
二项式系数 Binomial coefficients | \binom{n}{k} | |
小型二项式系数 Small binomial coefficients (force \textstyle) | \tbinom{n}{k} | |
大型二项式系数 Large (normal) binomial coefficients (force \displaystyle) | \dbinom{n}{k} | |
矩阵 Matrices | \begin{matrix} x & y \\ z & v \end{matrix} | |
\begin{vmatrix} x & y \\ z & v \end{vmatrix} | ||
\begin{Vmatrix} x & y \\ z & v \end{Vmatrix} | ||
\begin{bmatrix} 0 & \cdots & 0 \\ \vdots & \ddots & \vdots \\ 0 & \cdots & 0 \end{bmatrix} | ||
\begin{Bmatrix} x & y \\ z & v \end{Bmatrix} | ||
\begin{pmatrix} x & y \\ z & v \end{pmatrix} | ||
\bigl( \begin{smallmatrix} a&b\\ c&d \end{smallmatrix} \bigr) | ||
条件定义 Case distinctions | f(n) = \begin{cases} n/2, & \text{if }n\text{ is even} \\ 3n+1, & \text{if }n\text{ is odd} \end{cases} | |
多行等式 Multiline equations | \begin{align} f(x) & = (a+b)^2\\ & = a^2+2ab+b^2 \end{align} | |
\begin{alignat}{2} f(x) & = (a-b)^2 \\ & = a^2-2ab+b^2 \end{alignat} | ||
\begin{array}{lcl} z & = & a \\ f(x,y,z) & = & x + y + z \end{array} | ||
\begin{array}{lcr} z & = & a \\ f(x,y,z) & = & x + y + z \end{array} | ||
方程组 Simultaneous equations | \begin{cases} 3x + 5y + z \\ 7x - 2y + 4z \\ -6x + 3y + 2z \end{cases} | |
数组 Arrays | \begin{array}{ | c | c | c | } a & b & S \\ \hline 0 & 0 & 1 \\ 0 & 1 & 1 \\ 1 & 0 & 1 \\ 1 & 1 & 0 \end{array} |
括号 Brackets
常用的括号符号例如( )[ ]{ }……
这些也可以在输入环境中直接使用:
2(x+y)=z
$$ 2(x+y)=z $$
但如果是在较大的表达式中这些符号就显得不合适了
( \frac{\pi}{2} )^n
$$ ( \frac{\pi}{2} )^n $$
正确用法应配合\left
和\right
命令使用。
\left ( \frac{\pi}{2} \right )^n
$$ \left ( \frac{\pi}{2} \right )^n $$
具体可参考下表。
类型 | 样式 | LaTeX |
---|---|---|
圆括号、小括号 Parentheses | \left ( \frac{a}{b} \right ) | |
方括号、中括号 Brackets | \left [ \frac{a}{b} \right ] \quad \left \lbrack \frac{a}{b} \right \rbrack | |
花括号、大括号 Braces | \left { \frac{a}{b} \right } \quad \left \lbrace \frac{a}{b} \right \rbrace | |
角括号 Angle brackets | \left \langle \frac{a}{b} \right \rangle | |
单竖线和双竖线 Bars and double bars | \left | \frac{a}{b} \right \vert \quad \left \Vert \frac{c}{d} \right | | |
取整函数与取顶函数 Floor and ceiling functions: | \left \lfloor \frac{a}{b} \right \rfloor \quad \left \lceil \frac{c}{d} \right \rceil | |
斜线与反斜线 Slashes and backslashes | \left / \frac{a}{b} \right \backslash | |
上下箭头 Up, down, and up-down arrows | \left \uparrow \frac{a}{b} \right \downarrow \quad \left \Uparrow \frac{a}{b} \right \Downarrow \quad \left \updownarrow \frac{a}{b} \right \Updownarrow | |
混合括号 Delimiters can be mixed,as long as \left and \right match | \left [ 0,1 \right ) \left \langle \psi \right | | |
如果您不希望某一侧括号显示,可以使用\left. 和 \right.(带有英文句号) Use \left. and \right. if you do not want a delimiter to appear | \left . \frac{A}{B} \right } \to X | |
括号的大小 Size of the delimiters (add "l" or "r" to indicate the side for proper spacing) | ( \bigl( \Bigl( \biggl( \Biggl( \dots \Biggr] \biggr] \Bigr] \bigr] ] | |
{ \bigl{ \Bigl{ \biggl{ \Biggl{ \dots \Biggr\rangle \biggr\rangle \Bigr\rangle \bigr\rangle \rangle | ||
| \big| \Big| \bigg| \Bigg| \dots \Bigg | \bigg | \Big | \big | | ||
\lfloor \bigl\lfloor \Bigl\lfloor \biggl\lfloor \Biggl\lfloor \dots \Biggr\rceil \biggr\rceil \Bigr\rceil \bigr\rceil \rceil | ||
\uparrow \big\uparrow \Big\uparrow \bigg\uparrow \Bigg\uparrow \dots \Bigg\Downarrow \bigg\Downarrow \Big\Downarrow \big\Downarrow \Downarrow | ||
\updownarrow \big\updownarrow \Big\updownarrow \bigg\updownarrow \Bigg\updownarrow \dots \Bigg\Updownarrow \bigg\Updownarrow \Big\Updownarrow \big\Updownarrow \Updownarrow | ||
/ \big/ \Big/ \bigg/ \Bigg/ \dots \Bigg\backslash \bigg\backslash \Big\backslash \big\backslash \backslash |
空格与换行 Spacing & Line breaking
空格 Spacing
MathJax能够自动处理大多数空格间距的大小,但如果您需要自己控制,可参考下表。
序号 | 样式 | LaTeX | 中文说明英文说明 |
---|---|---|---|
1 | a \qquad b | 双空格 | |
2 | a \quad b | 单空格 | |
3 | a\ b | 字符空格 | |
4 | a \text{ } b | 文本模式中的字符空格 | |
5 | a\;b | 大空格 | |
6 | a\,b | 小空格 | |
7 | ab | 极小空格(用于乘因子) | |
8 | a b | 极小空格(用于区分其它语法) | |
9 | \mathit{ab} | 没有空格(用于多字母变量) | |
10 | a!b | 负空格 |
换行 Line breaking
在MathJax3.0中取消了使用\\
进行强制换行的功能,因此本页面也采取同样的逻辑,默认为单行公式环境。\\
强制换行命令只在支持多行编辑的数学环境中才起作用,如eqnarray
环境、align
环境、array
环境、matrix
环境等等。如您需要显示多行公式,建议在此类环境中输入公式,具体用法参见章节2.10。
或者您可直接在\displaylines{}
显示行命令中使用\\
强制换行命令,例如:
\displaylines{y=1729x \\ y=1729-x}
$$ \displaylines{y=1729x \\ y=1729-x} $$
颜色 Colors
字体颜色 Font colors
在公式中可以使用\color{options}{math}
来调用颜色命令,第一个参数为颜色,第二个参数为公式或文本内容。例如:
{\color{Blue}x^2}+{\color{Orange}2x}-{\color{LimeGreen}1}
$$ {\color{Blue}x^2}+{\color{Orange}2x}-{\color{LimeGreen}1} $$
x_{1,2}=\frac{{\color{Blue}-b}\pm\sqrt{\color{Red}b^2-4ac}}{\color{Green}2a }
$$ x_{1,2}=\frac{{\color{Blue}-b}\pm\sqrt{\color{Red}b^2-4ac}}{\color{Green}2a } $$
注意: 使用\color
命令时,请将需要设置颜色的部分用{ }
整体扩住,以表明\color
函数作用范围。
背景颜色 Background color
在文本环境中可以使用\colorbox{options}{text}
来调用背景颜色命令,第一个参数为颜色,第二个颜色为文本内容。例如:
\colorbox{yellow}{Thistext}
$$ \colorbox{yellow}{Thistext} $$
注意: 若需要在数学环境中使用\colorbox{}{}
,请在第二个参数内加入$\displaystyle + 公式$
,例如:
\colorbox{yellow}{$\displaystyle \frac{a}{b}$}
$$ \colorbox{yellow}{$\displaystyle \frac{a}{b}$} $$
或者您可以使用 Bbox扩展 来替换\colorbox
命令,详见下条2.7.3。
用Bbox扩展设置背景颜色 Setting background color with Bbox
Bbox扩展是一款自定义宏包,如需使用请在公式页面右上角【设置】处勾选后使用。 具体用法如下:
设置背景颜色 Setting Background color
在公式中可以使用\bbox[options]{math}
来调用背景颜色命令,第一个参数为颜色或大小,需注意用[ ]
包围,第二个参数为公式。例如:
\bbox[red]{x+y}
$\bbox[red]{x+y}$
调整背景大小 Setting Background Size
默认情况下,背景大小为作用范围的最大边界,如需扩大背景,可在第一个参数中加入大小信息,例如:
\bbox[2pt]{x+y} %设置透明背景,并增加2pt额外距离
$\bbox[2pt]{x+y} %设置透明背景,并增加2pt额外距离$
\bbox[red,5pt]{x+y} %设置红色背景,并增加5pt额外距离
$\bbox[red,5pt]{x+y} %设置红色背景,并增加5pt额外距离$
默认支持颜色 Colors supported
支持颜色 | |||
---|---|---|---|
${\color{Apricot}Apricot}$ | ${\color{Emerald}Emerald}$ | ${\color{OliveGreen}OliveGreen}$ | ${\color{RubineRed}RubineRed}$ |
${\color{Aquamarine}Aquamarine}$ | ${\color{ForestGreen}ForestGreen}$ | ${\color{Orange}Orange}$ | ${\color{Salmon}Salmon}$ |
${\color{Bittersweet}Bittersweet}$ | ${\color{Fuchsia}Fuchsia}$ | ${\color{OrangeRed}OrangeRed}$ | ${\color{SeaGreen}SeaGreen}$ |
${\color{Black}Black}$ | ${\color{Goldenrod}Goldenrod}$ | ${\color{Orchid}Orchid}$ | ${\color{Sepia}Sepia}$ |
${\color{Blue}Blue}$ | ${\color{Gray}Gray}$ | ${\color{Peach}Peach}$ | ${\color{SkyBlue}SkyBlue}$ |
${\color{BlueGreen}BlueGreen}$ | ${\color{Green}Green}$ | ${\color{Periwinkle}Periwinkle}$ | ${\color{SpringGreen}SpringGreen}$ |
${\color{BlueViolet}BlueViolet}$ | ${\color{GreenYellow}GreenYellow}$ | ${\color{PineGreen}PineGreen}$ | ${\color{Tan}Tan}$ |
${\color{BrickRed}BrickRed}$ | ${\color{JungleGreen}JungleGreen}$ | ${\color{Plum}Plum}$ | ${\color{TealBlue}TealBlue}$ |
${\color{Brown}Brown}$ | ${\color{Lavender}Lavender}$ | ${\color{ProcessBlue}ProcessBlue}$ | ${\color{Thistle}Thistle}$ |
${\color{BurntOrange}BurntOrange}$ | ${\color{LimeGreen}LimeGreen}$ | ${\color{Purple}Purple}$ | ${\color{Turquoise}Turquoise}$ |
${\color{CadetBlue}CadetBlue}$ | ${\color{Magenta}Magenta}$ | ${\color{RawSienna}RawSienna}$ | ${\color{Violet}Violet}$ |
${\color{CarnationPink}CarnationPink}$ | ${\color{Mahogany}Mahogany}$ | ${\color{Red}Red}$ | ${\color{VioletRed}VioletRed}$ |
${\color{Cerulean}Cerulean}$ | ${\color{Maroon}Maroon}$ | ${\color{RedOrange}RedOrange}$ | ${\color{White}White}$ |
${\color{CornflowerBlue}CornflowerBlue}$ | ${\color{Melon}Melon}$ | ${\color{RedViolet}RedViolet}$ | ${\color{WildStrawberry}WildStrawberry}$ |
${\color{Cyan}Cyan}$ | ${\color{MidnightBlue}MidnightBlue}$ | ${\color{Rhodamine}Rhodamine}$ | ${\color{Yellow}Yellow}$ |
${\color{Dandelion}Dandelion}$ | ${\color{Mulberry}Mulberry}$ | ${\color{RoyalBlue}RoyalBlue}$ | ${\color{YellowGreen}YellowGreen}$ |
${\color{DarkOrchid}DarkOrchid}$ | ${\color{NavyBlue}NavyBlue}$ | ${\color{RoyalPurple}RoyalPurple}$ | ${\color{YellowOrange}YellowOrange}$ |
使用RGB颜色 Use RGB color
如需在\color
命令中使用自选RGB颜色,可使用{\color[RGB]{0,0,0} }
命令,例如:
{\color[RGB]{0,200,0} e^{i \pi} + 1 = 0}
$$ {\color[RGB]{0,200,0} e^{i \pi} + 1 = 0} $$
自定义颜色 Custom colors
可使用\definecolor
命令进行自定义颜色,例如:
\definecolor{mygreen}{RGB}{0,200,0} {\color{mygreen}e^{i \pi} + 1 = 0 }
$$ \definecolor{mygreen}{RGB}{0,200,0} {\color{mygreen}e^{i \pi} + 1 = 0 } $$
字体字号 Fonts & Size
字体 Fonts
如您需要替换公式内容的字体,可以点击工具栏下方的【字体】按钮进行相关操作。因有一些特定代码Mathjax3.0并没有相关支持,所以下表仅做参考。
样式 | LaTeX |
---|---|
希腊字母 Greek alphabet | |
\mathrm{A} \mathrm{B} \Gamma \Delta \mathrm{E} \mathrm{Z} \mathrm{H} \Theta | |
\mathrm{I} \mathrm{K} \Lambda \mathrm{M} \mathrm{N} \Xi \mathrm{O} \Pi | |
\mathrm{R} \Sigma \mathrm{T} \Upsilon \Phi \mathrm{X} \Psi \Omega | |
\alpha \beta \gamma \delta \epsilon \zeta \eta \theta | |
\iota \kappa \lambda \mu \nu \xi \omicron \pi | |
\rho \sigma \tau \upsilon \phi \chi \psi \omega | |
\varGamma \varDelta \varTheta \varLambda \varXi \varPi \varSigma \varPhi \varUpsilon \varOmega | |
\varepsilon \digamma \varkappa \varpi \varrho \varsigma \vartheta \varphi | |
希伯来字母 Hebrew symbols | |
\aleph \beth \gimel \daleth | |
黑板报体 Blackboard bold/scripts | |
\mathbb{ABCDEFGHI} | |
\mathbb{JKLMNOPQR} | |
\mathbb{STUVWXYZ} | |
粗体 Boldface | |
\mathbf{ABCDEFGHI} | |
\mathbf{JKLMNOPQR} | |
\mathbf{STUVWXYZ} | |
\mathbf{abcdefghijklm} | |
\mathbf{nopqrstuvwxyz} | |
\mathbf{0123456789} | |
粗体希腊字母 Boldface (Greek) | |
\boldsymbol{\mathrm{A} \mathrm{B} \Gamma \Delta \mathrm{E} \mathrm{Z} \mathrm{H} \Theta} | |
\boldsymbol{\mathrm{I} \mathrm{K} \Lambda \mathrm{M} \mathrm{N} \Xi \mathrm{O} \Pi} | |
\boldsymbol{\mathrm{R} \Sigma \mathrm{T} \Upsilon \Phi \mathrm{X} \Psi \Omega} | |
\boldsymbol{\alpha \beta \gamma \delta \epsilon \zeta \eta \theta} | |
\boldsymbol{\iota \kappa \lambda \mu \nu \xi \omicron \pi} | |
\boldsymbol{\rho \sigma \tau \upsilon \phi \chi \psi \omega} | |
\boldsymbol{\varepsilon\digamma\varkappa\varpi} | |
\boldsymbol{\varrho\varsigma\vartheta\varphi} | |
斜体 Italics (拉丁字母默认default for Latin alphabet) | |
\mathit{0123456789} | |
罗马体 Roman typeface | |
\mathrm{ABCDEFGHI} | |
\mathrm{JKLMNOPQR} | |
\mathrm{STUVWXYZ} | |
\mathrm{abcdefghijklm} | |
\mathrm{nopqrstuvwxyz} | |
\mathrm{0123456789} | |
无衬线体 Sans serif | |
\mathsf{ABCDEFGHI} | |
\mathsf{JKLMNOPQR} | |
\mathsf{STUVWXYZ} | |
\mathsf{abcdefghijklm} | |
\mathsf{nopqrstuvwxyz} | |
\mathsf{0123456789} | |
手写体 Calligraphy/花体 script | |
\mathcal{ABCDEFGHI} | |
\mathcal{JKLMNOPQR} | |
\mathcal{STUVWXYZ} | |
德文尖角体 Fraktur typeface | |
\mathfrak{ABCDEFGHI} | |
\mathfrak{JKLMNOPQR} | |
\mathfrak{STUVWXYZ} | |
\mathfrak{abcdefghijklm} | |
\mathfrak{nopqrstuvwxyz} | |
\mathfrak{0123456789} | |
小型手写体 Small scriptstyle text | |
{\scriptstyle\text{abcdefghijklm}} |
字号 Size
样式 | LaTeX |
---|---|
{\tiny abc巨小tiny} | |
{\scriptsize abc超小scriptsize} | |
{\small abc小small} | |
{\normalsize abc正常normal} | |
{\large abc大large} | |
{\Large abc超大Large} | |
{\LARGE abc特大LARGE} | |
{\huge abc巨大huge} | |
{\Huge abc巨无霸Huge} |
注意:如您导出SVG格式,理论上字体的整体大小并无用处,因为SVG为矢量图,所以大可不必担心图片不清晰的问题,即便是您选择下载PNG格式的公式图片,图片整体尺寸也被默认设定为4K。所以此处的字号命令只为设置公式相对大小时使用,例如:
{\tiny x+y=z}x+y=z{\Huge x+y=z}
$$ {\tiny x+y=z}x+y=z{\Huge x+y=z} $$
标签:Latex,right,frac,数学公式,color,公式,textstyle,left,mathrm From: https://blog.csdn.net/Jay_NanX/article/details/143439817