数学中国

 找回密码
 注册
搜索
热搜: 活动 交友 discuz
查看: 8118|回复: 47

TeX/LaTeX文本数学公式简易教程

[复制链接]
发表于 2020-7-25 21:05 | 显示全部楼层 |阅读模式

Mathjax TeX/LaTeX简易教程

一、识别符(数学公式必须要夹在\(...\)\[...\]之间)才能正确显示出来

1、行内公式,允许和文字混排版,以\(...\)夹住,可以手动加上\displaystyle。

例如:\(a^2+b^2=c^2\),显示:\(a^2+b^2=c^2\)


2、行间公式,独占一行,以\[...\]夹住,自带\displaystyle效果,默认居中显示

例如:\[a^2+b^2=c^2\],显示\[a^2+b^2=c^2\]

3、公式中输入的所有空格都不会显示,如想要显示空格,看下表

a\!ba\,ba~ba\:ba\ ba\>ba\;ba\quad ba\qquad b
\(a\!b\)\(a\,b\)\(a~b\)\(a\:b\)\(a\ b\)\(a\>b\)\(a\;b\)\(a\quad b\)\(a\qquad b\)
-3mu3mu4mu4mu4mu4mu5mu18mu36mu

4、公式中可以用两个反斜杠\\或\cr进行换行

例如:\[x+y=0\\y=0\],显示\[x+y=0\\y=0\]

练习:\(a^2+b^2=c^2\)\[a^2+b^2=c^2\]

本帖被以下淘专辑推荐:

  • · 入先|主题: 21, 订阅: 0
 楼主| 发表于 2020-7-25 21:07 | 显示全部楼层

二、上下标,用^{}与_{}表示,如果后面只跟1位字符,则可以省略{}大括号

1、使用{}与不使用{}的区别

例如\(x_ij+y^{35}=0\)显示:\(x_ij+y^{35}=0\),再如:\(f'\,f''\,f^\prime\)显示:\(f'\,f''\,f^\prime\)


2、结合上下标,也就是先下标后上标格式_{}^{}表示,可以和这些符号配合使用

\sum\prod\coprod\lim\int\iint\iiint\iiiint\oint\bigcup\bigcap
\(\sum\)\(\prod\)\(\coprod\)\(\lim\)\(\int\)\(\iint\)\(\iiint\)\(\iiiint\)\(\oint\)\(\bigcup\)\(\bigcap\)

例如:\(\lim_{n \to \infty}x_n\),显示\(\lim_{n \to \infty}x_n\),\(\displaystyle\lim_{n \to \infty}x_n\),显示\(\displaystyle\lim_{n \to \infty}x_n\)

\(\sum_{k=1}^N k^2\),显示\(\sum_{k=1}^N k^2\),\(\displaystyle\sum_{k=1}^N k^2\),显示\(\displaystyle\sum_{k=1}^N k^2\)

3、前置上下标,有两种方法,用\sideset{}{}{}或\!都可以

3.1、用\sideset{}{}{}来设置,如\(\sideset{_1^2}{_3^4}X\)显示\(\sideset{_1^2}{_3^4}X\)

3.2、其实就是用\!把前面的上下标挨紧显示{}_1^2\!X_3^4显示\({}_1^2\!X_3^4\)

练习:\({x^5}^6 与 x^{5^6}\) 与 \(x_{i,j}\)

回复 支持 1 反对 0

使用道具 举报

 楼主| 发表于 2020-7-25 21:08 | 显示全部楼层

三、根式与分式

1、根式,使用\sqrt[]{}来表示。

例如:\(\sqrt 3\)显示:\(\sqrt 3\),\(\sqrt[2]{32}\)显示:\(\sqrt[2]{32}\)

2、分式,直接用a/b即可,显示效果为\(a/b\),如:\(e^{i\frac{\pi}{2}} \quad e^{\frac{i\pi}{2}} \quad e^{i\pi/2}\),第三种字更大

3、使用\frac{a}{b}表示竖排行间分式,字号小一些,例如:\(\frac abc\)显示:\(\frac abc\)

4、小型分式,使用\tfrac{a}{b},例如\(\tfrac abc\)显示\(\tfrac abc\)

5、大型分式(不嵌套),使用\dfrac{a}{b},例如\(\dfrac abc\)显示\(\dfrac abc\)

6、大型分式(嵌套连分式),使用\cfrac{a}{b},例如\(\cfrac abc\)显示\(\cfrac abc\)

7、使用{{}\over{}}来分隔一个组的前后两部分,例如\({a+1\over b+1}\),显示\({a+1\over b+1}\)

练习:\(x=a_0+\frac{1^2}{a_1+\frac{2^2}{a_2+\frac{3^2}{a_3+\frac{4^2}{a_4+...}}}}\)
与:\(x=a_0+\cfrac{1^2}{a_1+\cfrac{2^2}{a_2+\cfrac{3^2}{a_3+\cfrac{4^2}{a_4+...}}}}\)

回复 支持 反对

使用道具 举报

 楼主| 发表于 2020-7-25 21:08 | 显示全部楼层

四、上下符号,与上下标不同,符号出现在正上下方

1、上符号,用\overset{}{},例如:\overset{\frown}{AB},显示:\(\overset{\frown}{AB}\),还有\(\overset\rightharpoonup{AB}\)等

2、下符号,用\underset{}{}表示

例如:\underset{|A|}{\underbrace{x+y}},显示:\(\underset{|A|}{\underbrace{x+y}}\)

3、其它的上下符号

\underline{xy}\dot x
\ddot x
\dddot x
\ddddot x
\bar a
\overline{xy}
\acute{a}
\grave{a}
\check{a}
\breve{a}
\(\underline{xy}\)\(\dot x\quad\ddot x\)\(\dddot x\quad\ddddot x\)\(\bar a\quad\overline{xy}\)\(\acute{a}\quad\grave{a}\)\(\check{a}\quad\breve{a}\)
\overleftarrow{xy}\vec{xy}
\overrightarrow{xy}
\hat x
\widehat{xy}
\tilde{x}
\widetilde{xy}
\overbrace{xy}\underbrace{xy}
\(\overleftarrow{xy}\)\(\vec{xy}\quad\overrightarrow {xy}\)\(\hat x\quad\widehat{xy}\)\(\tilde{x}\quad\widetilde{xy}\)\(\overbrace{1+2+3}\)\(\underbrace{1+2+3}\)

注意:\overbrace和\underbrace这两个后面使用上下标,会把文字加在正上方和正下方

例如:\(\overbrace{1+2+\cdots+100}^{5050}\) 与 \(\underbrace{x+y}_{|A|}\)显示为\(\underbrace{x+y}_{|A|}\)

练习:\(a + \rlap{\overbrace{\phantom{b+c+d}}^m} b+ \underbrace{c+d+e}_n + f\)

回复 支持 反对

使用道具 举报

 楼主| 发表于 2020-7-25 21:08 | 显示全部楼层

五、括号,()[]{}<>||等,前面加上\left与\right后可以自动调整高度

1、二项式,自动加上小括号,用\binom{}{}和{{}\choose{}}表示,小型二项式:\tbinom{}{},大型二项式:\dbinom{}{}

例如:{n+1\choose 2k}显示为\({n+1\choose 2k}\)。\binom{n+1}{2k}=\tbinom{n+1}{2k}=\dbinom{n+1}{2k},显示为\(\binom{n+1}{2k}=\tbinom{n+1}{2k}=\dbinom{n+1}{2k}\)

2、其它括号(定界符)

()\lbrack 或 [
\rbrack 或 ]
\lbrace 或 \{
\rbrace 或 \}
\langle\rangle\mid 或 |\| \|\lfloor\rfloor\lceil\rceil
\(\left(~\right)\)\(\left[~\right]\)\(\left\{~\right\}\)\(\left\langle~\right\rangle\)\(\left|~\right|\)\(\left\|~\right\|\)\(\left\lfloor~\right\rfloor\)\(\left\lceil~\right\rceil\)
\((\cfrac ab)\)\([\cfrac{a}{b}]\)\(\{\cfrac{a}{b}\}\)\(\langle\cfrac{a}{b}\rangle\)\(|\cfrac{a}{b}|\)\(\|\cfrac{a}{b}\|\)\(\lfloor\cfrac{a}{b}\rfloor\)\(\lceil\cfrac{a}{b}\rceil\)
\left(
\right)
\left[
\right]
\left\{
\right\}
\left\langle
\right\rangle
\left|
\right|
\left\|
\right\|
\left\lfloor
\right\rfloor
\left\lceil
\right\rceil
\(\left(\cfrac ab\right)\)\(\left[\cfrac{a}{b}\right]\)\(\left\{\cfrac{a}{b}\right\}\)\(\left\langle\cfrac{a}{b}\right\rangle\)\(\left|\cfrac{a}{b}\right|\)\(\left\|\cfrac{a}{b}\right\|\)\(\left\lfloor\cfrac{a}{b}\right\rfloor\)\(\left\lceil\cfrac{a}{b}\right\rceil\)

注意:普通括号也可以用\big \Big \bigg \Bigg放大显示,\(\{x|x\in\Bbb Z\}\)与\(\{x\mid x\in\Bbb Z\}\)的区别

例如:\(\Big[\sum_{k=0}^n e^{k^2}\Big]\)显示为\(\Big[\sum_{k=0}^n e^{k^2}\Big]\)

练习:\(x \in \left[\dfrac12,+\infty\right)\)
与:\(\left\lbrace\sum_{i=0}^0 i^2 = \frac{(n^2+n)(2n+2)}{6}\right\rbrace\tag{1.2}\)

回复 支持 2 反对 1

使用道具 举报

 楼主| 发表于 2020-7-25 21:09 | 显示全部楼层

六、多行公式,用\begin{xxx}...\end{xxx}夹住,可以用\hline画横线,最好不要省略\(...\)与\[...\]

1、对于超长的公式,手动换行并指定对齐,用\begin{split}...\end{split}夹住,用\\换行,用&对齐每行字符

\begin{split}
(a+b)^2 &=(a+b)×(a+b)\\
&=a^2+ab+ab+b^2\\
&=a^2+2ab+b^2
\end{split}
等于号对齐 \begin{split}(a+b)^2 &=(a+b)×(a+b)\\ &=a^2+ab+ab+b^2\\ &=a^2+2ab+b^2\end{split}

2、方程组,用\cases{}或\begin{cases}...\end{cases}夹住的公式,前面自带等高的大括号{,用&符号对齐字符,\\换行

\begin{cases}
2x+y=8&(1)\\x+y=6&(2)
\end{cases}
隔\quad对齐\begin{cases}2x+y=8&(1)\\x+y=6&(2)\end{cases}

3、矩阵,用\begin{matrix}...\end{matrix}夹住的公式,以&分隔每项(居中对齐),以\\换行

\[ A = \left\langle \begin{smallmatrix}
a_{11} & \dots & a_{1n} \\
& \ddots & \vdots \\
0 && a_{mn}
\end{smallmatrix}\right\rangle _{m×n } \]
小矩阵 \[ A = \left\langle \begin{smallmatrix}a_{11} & \dots & a_{1n} \\& \ddots & \vdots \\0 && a_{mn}\end{smallmatrix}\right\rangle _{m×n} \]

注意:矩阵外面其实是可以自动加不同的括号的,这样就可以省略\left与\right,比如

matrixpmatrixbmatrixBmatrixvmatrixVmatrix
\[ \begin{matrix}
aa & b\\
c & dd
\end{matrix} \]
\[ \begin{pmatrix}
aa & b\\
c & dd
\end{pmatrix} \]
\[ \begin{bmatrix}
aa & b\\
c & dd
\end{bmatrix} \]
\[ \begin{Bmatrix}
aa & b\\
c & dd
\end{Bmatrix} \]
\[ \begin{vmatrix}
aa & b\\
c & dd
\end{vmatrix} \]
\[ \begin{Vmatrix}
aa & b\\
c & dd
\end{Vmatrix} \]

4、表格,用\begin{array}{lcr}...\end{array}夹住,lcr为左中右对齐,|竖线,\hline横线,&换列,\\换行

\begin{array}{|l|c|r|}
\hline 左对齐(l) & 居中(c) & 右对齐(r)\\
\hline xy & xy & xy\\
\hline 123 & 123 & 123\\
\hline \end{array}
表格线全画上 \begin{array}{|l|c|r|} \hline 左对齐(l) & 居中(c) & 右对齐(r)\\ \hline xy & xy & xy\\ \hline 123 & 123 & 123\\ \hline \end{array}
\begin{array}{l|c|r}
左对齐(l) & 居中(c) & 右对齐(r)\\
\hline xy & xy & xy\\
\hline 123 & 123 & 123\\
\end{array}
去掉四周的线 \begin{array}{l|c|r} 左对齐(l) & 居中(c) & 右对齐(r)\\ \hline xy & xy & xy\\ \hline 123 & 123 & 123\\ \end{array}

注意:由于本论坛除了用\tag{}手动编号外,没有配置自动编号,一些的命令可以使用,但不会出现编号,如: equation、multline、align、gather等

练习环节:

回复 支持 1 反对 0

使用道具 举报

 楼主| 发表于 2020-7-25 21:09 | 显示全部楼层

七、希腊字母与函数

1、希腊字母,首字母大写表示大写希腊字母,前加var表示斜体希腊字母,但不绝对

\alpha\beta\gamma
\Gamma
\delta
\Delta
\epsilon
\varepsilon
\zeta\eta\theta
\Theta
\iota\kappa
\varkappa
\(\alpha\)\(\beta\)\(\gamma\;\Gamma\)\(\delta\;\Delta\)\(\epsilon\;\varepsilon\)\(\zeta\)\(\eta\)\(\theta\;\Theta\)\(\iota\)\(\kappa\;\varkappa\)
\lambda
\Lambda
\mu\nu\xi
\Xi
\omicron\pi
\Pi
\varpi\rho
\varrho
\sigma
\Sigma
\tau
\(\lambda\;\Lambda\)\(\mu\)\(\nu\)\(\xi\;\Xi\)\(\omicron\)\(\pi\;\Pi\)\(\varpi\)\(\rho\;\varrho\)\(\sigma\;\Sigma\)\(\tau\)
\upsilon
\Upsilon
\phi \Phi\varphi
\varPhi
\chi\psi
\Psi
\omega
\Omega
\digamma\vartheta
\varTheta
\varsigma
\varSigma
\backepsilon
\(\upsilon\;\Upsilon\)\(\phi\;\Phi\)\(\varphi\;\varPhi\)\(\chi\)\(\psi\;\Psi\)\(\omega\;\Omega\)\(\digamma\)\(\vartheta\;\varTheta\)\(\varsigma\;\varSigma\)\(\backepsilon\)

2、函数,是为了让字体显示正体字,因为默认情况下是斜体字,且自动留些间距

例如:\(sinx\)与\(\sin x\)的区别,显示\(sinx与\sin x\),\pmod{m}与a\bmod b显示\(\pmod{m}与{a\bmod b}\)

\(\sin\)\(\cos\)\(\tan\)\(\sec\)\(\csc\)\(\cot\)\(\exp\)\(\log\)\(\ln\)\(\lg\)mod
\(\sinh\)\(\cosh\)\(\tanh\)\(\coth\)\(\det\)\(\dim\)\(\ker\)\(\deg\)\(\arg\)\(\gcd\)\(\hom\)
\(\arcsin\)\(\arccos\)\(\arctan\)\(\min\)\(\max\)\(\inf\)\(\sup\)\(\liminf\)\(\limsup\)\(\lim\)\(\Pr\)

练习环节:

回复 支持 1 反对 0

使用道具 举报

 楼主| 发表于 2020-7-25 21:09 | 显示全部楼层

八、符号大全

1、箭头

\to
\rightarrow
\gets
\leftarrow
\leftrightarrow\nearrow\searrow
\(\to\;\rightarrow\)\(\gets\;\leftarrow\)\(\leftrightarrow\)\(\nearrow\)\(\searrow\)
\downarrow\uparrow\updownarrow\swarrow\nwarrow
\(\downarrow\)\(\uparrow\)\(\updownarrow\)\(\swarrow\)\(\nwarrow\)
\Leftarrow\Rightarrow\Leftrightarrow\rightharpoonup\rightharpoondown
\(\Leftarrow\)\(\Rightarrow\)\(\Leftrightarrow\)\(\rightharpoonup\)\(\rightharpoondown\)
\impliedby
\Longleftarrow
\implies
\Longrightarrow
\iff
\Longleftrightarrow
\leftharpoonup\leftharpoondown
\(\impliedby\;\Longleftarrow\)\(\implies\;\Longrightarrow\)\(\iff\;\Longleftrightarrow\)\(\leftharpoonup\)\(\leftharpoondown\)
\longleftarrow\longrightarrow\longleftrightarrow\upharpoonleft\upharpoonright
\restriction
\(\longleftarrow\)\(\longrightarrow\)\(\longleftrightarrow\)\(\upharpoonleft\)\(\upharpoonright\;\restriction\)
\Uparrow\Downarrow\Updownarrow\rightleftharpoons
\leftrightharpoons
\downharpoonright
\downharpoonleft
\(\Uparrow\)\(\Downarrow\)\(\Updownarrow\)\(\rightleftharpoons\;\leftrightharpoons\)\(\downharpoonright\;\downharpoonleft\)
\nleftarrow\nleftrightarrow\nrightarrow\rightleftarrows
\leftrightarrows
\hookleftarrow
\hookrightarrow
\(\nleftarrow\)\(\nleftrightarrow\)\(\nrightarrow\)\(\rightleftarrows\;\leftrightarrows\)\(\hookleftarrow\;\hookrightarrow\)
\nLeftarrow\nLeftrightarrow\nRightarrow\rightrightarrows
\leftleftarrows
\rightarrowtail
\leftarrowtail
\(\nLeftarrow\)\(\nLeftrightarrow\)\(\nRightarrow\)\(\rightrightarrows\;\leftleftarrows\)\(\rightarrowtail\;\leftarrowtail\)
\mapsto
\longmapsto
\leadsto
\leftrightsquigarrow
\dashrightarrow
\dashleftarrow
\curvearrowright
\curvearrowleft
\Rsh \Lsh
\(\mapsto\;\longmapsto\)\(\leadsto\;\leftrightsquigarrow\)\(\dashrightarrow\;\dashleftarrow\)\(\curvearrowright\;\curvearrowleft\)\(\Rsh\;\Lsh\)
\circlearrowleft
\circlearrowright
\twoheadrightarrow
\twoheadleftarrow
\Lleftarrow
\Rrightarrow
\upuparrows
\downdownarrows
\looparrowleft
\looparrowright
\(\circlearrowleft\;\circlearrowright\)\(\twoheadrightarrow\;\twoheadleftarrow\)\(\Lleftarrow\;\Rrightarrow\)\(\upuparrows\;\downdownarrows\)\(\looparrowleft\;\looparrowright\)

2、其它符号,一些符号如\#,\&,\_,\%,\{,\}等,前面必须要加\

\Cup
\Cap
\subset
\supset
\succneqq
\precneqq
\subsetneqq
\supsetneqq
\varsupsetneqq
\varsubsetneqq
\nsupseteqq
\nsubseteqq
\subseteq
\supseteq
\ni
\not\ni
\in
\notin
\(\Cup\;\Cap\)\(\subset\;\supset\)\(\succneqq\;\precneqq\)\(\subsetneqq\;\supsetneqq\)\(\varsupsetneqq\;\varsubsetneqq\)\(\nsupseteqq\;\nsubseteqq\)\(\subseteq\;\supseteq\)\(\ni\;\not\ni\)\(\in\;\notin\)
\nprec
\nsucc
\Subset
\Supset
\succnsim
\precnsim
\supseteqq
\subseteqq
\supsetneq
\varsupsetneq
\nsupseteq
\nsubseteq
\succsim
\precsim
\succ
\succeq
\lt
\gt
\(\nprec\;\nsucc\)\(\Subset\;\Supset\)\(\succnsim\;\precnsim\)\(\supseteqq\;\subseteqq\)\(\supsetneq\;\varsupsetneq\)\(\nsupseteq\;\nsubseteq\)\(\succsim\;\precsim\)\(\succ\;\succeq\)\(\lt\;\gt\)
\leqq
\geqq
\cap
\bigcap
\lnapprox
\gnapprox
\succnapprox
\precnapprox
\subsetneq
\varsubsetneq
\doublecap
\doublecup
\lessgtr
\gtrless
\prec
\preceq
\ge
\le
\(\leqq\;\geqq\)\(\cap\;\bigcap\)\(\lnapprox\;\gnapprox\)\(\succnapprox\;\precnapprox\)\(\subsetneq\;\varsubsetneq\)\(\doublecap\;\doublecup\)\(\lessgtr\;\gtrless\)\(\prec\;\preceq\)\(\ge\;\le\)
\lnot
\net
\cup
\bigcup
\uplus
\biguplus
\succcurlyeq
\preccurlyeq
\risingdotseq
\fallingdotseq
\curlyeqprec
\curlyeqsucc
\lessdot
\gtrdot
\not\lt
\ngtr
\ll
\gg
\(\lnot\;\neg\)\(\cup\;\bigcup\)\(\uplus\;\biguplus\)\(\succcurlyeq\;\preccurlyeq\)\(\risingdotseq\;\fallingdotseq\)\(\curlyeqprec\;\curlyeqsucc\)\(\lessdot\;\gtrdot\)\( \not\lt\;\ngtr\)\(\ll\;\gg\)
\lneq
\gneq
\equiv
\eqcirc
\approx
\approxeq
\succapprox
\precapprox
\doublebarwedge\curlyvee
\curlywedge
\lesssim
\gtrsim
\lll
\ggg
\lnsim
\gnsim
\(\lneq\;\gneq\)\(\equiv\;\eqcirc\)\(\approx\;\approxeq\)\(\succapprox\;\precapprox\)\(\doublebarwedge\)\(\curlyvee\;\curlywedge\)\(\lesssim\;\gtrsim\)\(\lll\;\ggg\)\(\lnsim\;\gnsim\)
\nleq
\ngeq
\doteq
\Doteq
\sim
\backsim
\eqslantgtr
\eqslantless
\vartriangle
\bigtriangleup
\gtreqqless
\lesseqqgtr
\leqslant
\geqslant
\gneqq
\lneqq
\ncong
\cong
\(\nleq\;\ngeq\)\(\doteq\;\Doteq\)\(\sim\;\backsim\)\(\eqslantgtr\;\eqslantless\)\(\vartriangle\;\bigtriangleup\)\(\gtreqqless\;\lesseqqgtr\)\(\leqslant\;\geqslant\)\(\gneqq\;\lneqq\)\(\ncong\;\cong\)
\ne
\neq
\Vvdash
\Vdash
\lesseqgtr
\gtreqless
\lessapprox
\gtrapprox
\ntrianglerighteq
\ntrianglelefteq
\ngeqslant
\nleqslant
\simeq
\backsimeq
\nleqq
\ngeqq
\nsim
\eqsim
\(\ne\;\neq\)\(\Vvdash\;\Vdash\)\(\lesseqgtr\;\gtreqless\)\(\lessapprox\;\gtrapprox\)\(\ntrianglerighteq\;\ntrianglelefteq\)\(\ngeqslant\;\nleqslant\)\(\simeq\;\backsimeq\)\(\nleqq\;\ngeqq\)\(\nsim\;\eqsim\)
\dashv
\vdash
\nVDash
\nVdash
\vDash
\models
\sqsubset
\sqsubseteq
\ntriangleright
\ntriangleleft
\sqsupset
\sqsupseteq
\sqcup
\bigsqcup
\nvDash
\nvdash
\bot
\perp
\(\dashv\;\vdash\)\(\nVDash\;\nVdash\)\(\vDash\;\models\)\(\sqsubset\;\sqsubseteq\)\(\ntriangleright\;\ntriangleleft\)\(\sqsupset\;\sqsupseteq\)\(\sqcup\;\bigsqcup\)\(\nvDash\;\nvdash\)\(\bot\perp\)
\lor
\vee
\exists
\nexists
\land
\wedge
\circeq
\triangleq
\triangledown
\bigtriangledown
\veebar
\barwedge
\sqcap\partial\eth
\(\lor\;\vee\)\(\exists\;\nexists\)\(\land\;\wedge\)\(\circeq\;\triangleq\)\(\triangledown\;\bigtriangledown\)\(\veebar\;\barwedge\)\(\sqcap\)\(\partial\)\(\eth\)
\nabla\forall\top
\intercal
\bigvee
\bigwedge
\trianglelefteq
\trianglerighteq
\emptyset
\varnothing
\ominus
\oslash
\star
\bigstar
\ddots
\(\nabla\)\(\forall\)\(\top\;\intercal\)\(\bigvee\;\bigwedge\)\(\trianglelefteq\;\trianglerighteq\)\(\emptyset\;\varnothing\)\(\ominus\;\oslash\)\(\star\;\bigstar\)\(\ddots\)
\unlhd
\unrhd
\angle\ulcorner
\urcorner
\Diamond
\diamondsuit
\triangleleft
\triangleright
\lvertneqq
\gvertneqq
\triangle\Box
\square
\rhd
\lhd
\(\unlhd\;\unrhd\)\(\angle\)\(\ulcorner\;\urcorner\)\(\Diamond\;\diamondsuit\)\(\triangleleft\;\triangleright\)\(\lvertneqq\;\gvertneqq\)\(\triangle\)\(\Box\;\square\)\(\rhd\;\lhd\)
\cdot
\ldotp
\infty
\propto
\llcorner
\lrcorner
\boxtimes
\boxplus
\sphericalangle
\measuredangle
\lmoustache
\rmoustache
\lgroup
\rgroup
\rtimes
\ltimes
\aleph
\(\cdot\;\ldotp\)\(\infty\;\propto\)\(\llcorner\;\lrcorner\)\(\boxtimes\;\boxplus\)\(\sphericalangle\;\measuredangle\)\(\lmoustache\;\rmoustache\)\(\lgroup\;\rgroup\)\(\rtimes\ltimes\)\(\aleph\)
\S\circ
\bigcirc
\dagger
\ddagger
\backslash
\setminus
\leftthreetimes
\rightthreetimes
\smallsmile
\smallfrown
\diagup
\diagdown
\smile
\frown
\wr
\(\S\)\(\circ\;\bigcirc\)\(\dagger\;\ddagger\)\(\backslash\;\setminus\)\(\leftthreetimes\;\rightthreetimes\)\(\smallsmile\;\smallfrown\)\(\diagup\;\diagdown\)\(\smile\;\frown\)\(\wr\)
\pm
\mp
\Join
\bowtie
\bumpeq
\Bumpeq
\circledcirc
\circleddash
\blacktriangle
\blacktriangledown
\otimes
\bigotimes
\sharp
\natural
\vdots\Game
\(\pm\;\mp\)\(\Join\;\bowtie\)\(\bumpeq\;\Bumpeq\)\(\circledcirc\;\circleddash\)\(\blacktriangle\;\blacktriangledown\)\(\otimes\;\bigotimes\)\(\sharp\;\natural\)\(\vdots\)\(\Game\)
\times\div\circledR
\circledS
\because
\therefore
\blacktriangleleft
\blacktriangleright
\oplus
\bigoplus
\odot
\bigodot
\boxdot\gimel
\beth
\(\times\)\(\div\)\(\circledR\;\circledS\)\(\because\;\therefore\)\(\blacktriangleleft\;\blacktriangleright\)\(\oplus\;\bigoplus\)\(\odot\;\bigodot\)\(\boxdot\)\(\gimel\;\beth\)
\flat\Finv\asymp
\between
\clubsuit
\spadesuit
\circledast
\divideontimes
\parallel
\nparallel
\diamond
\lozenge
\amalg
\coprod
\nmid
\(\flat\)\(\Finv\)\(\asymp\;\between\)\(\clubsuit\;\spadesuit\)\(\circledast\;\divideontimes\)\(\parallel\;\nparallel\)\(\diamond\;\lozenge\)\(\amalg\;\coprod\)\(\nmid\)
\yen\ldots
\cdots
\bullet
\centerdot
\surd
\checkmark
\blacksquare
\blacklozenge
\pitchfork\multimap\daleth\ell
\iota
\(\yen\)\(\ldots\;\cdots\)\(\bullet\;\centerdot\)\(\surd
\checkmark\)
\(\blacksquare\;\blacklozenge\)\(\pitchfork\)\(\multimap\)\(\daleth\)\(\ell\;\iota\)
\dots\hbar
\hslash
\dotplus\nshortmid
\shortmid
\shortparallel
\nshortparallel
f'
\backprime
\intop
\smallint
\jmath\Im
\imath
\(\dots\)\(\hbar\;\hslash\)\(\dotplus\)\(\nshortmid\;\shortmid\)\(\shortparallel\;\nshortparallel\)\(f'\;\backprime\)\(\intop\;\smallint\)\(\jmath\)\(\Im\;\imath\)
\Re\maltese\boxminus\complement\smallsetminus\heartsuit\idotsint\wp\mho
\(\Re\)\(\maltese\)\(\boxminus\)\(\complement\)\(\smallsetminus\)\(\heartsuit\)\(\idotsint\)\(\wp\)\(\mho\)

练习环节:

回复 支持 1 反对 0

使用道具 举报

 楼主| 发表于 2020-7-25 21:09 | 显示全部楼层

九、字体与颜色

1、字体

默认\mathsf{}\mathbf{}\mathtt{}\mathbb{}\mathit{}
\[{ABCabc123}\]\[\mathsf{ABCabc123}\]\[\mathbf{ABCabc123}\]\[\mathtt{ABCabc123}\]\[\mathbb{ABCabc123}\]\[\mathit{ABCabc123}\]
\mathrm{}\mathcal{}\mathscr{}\mathfrak{}\boldsymbol{}
\[\mathrm{ABCabc123}\]\[\mathcal{ABCabc123}\]\[\mathscr{ABCabc123}\]\[\mathfrak{ABCabc123}\]\[\boldsymbol{ABCabc123}\]

2、字号,从小到大

\tiny\Tiny\small默认\large\Large\LARGE\huge\Huge
\(\tiny{Aa12}\)\(\Tiny{Aa12}\)\(\small{Aa12}\)\(Aa12\)\(\large{Aa12}\)\(\Large{Aa12}\)\(\LARGE{Aa12}\)\(\huge{Aa12}\)\(\Huge{Aa12}\)

3、前景颜色,用\color{}{}表示,前面那个大括号中填写颜色名称或颜色值#RGB表示

例如:\(\color{red}{www}.\color{#168}{mathchina}.com\)显示:\(\color{red}{www}.\color{#168}{mathchina}.com\)

\(\rm\color{black}{black}\)\(\rm\color{red}{red}\)\(\rm\color{green}{green}\)\(\rm\color{blue}{blue}\)\(\rm\color{maroon}{maroon}\) \(\rm\color{yellow}{yellow}\)\(\rm\color{lime}{lime}\)\(\rm\color{olive}{olive}\)\(\rm\color{teal}{teal}\)\(\rm\color{aqua}{aqua}\) \(\rm\color{navy}{navy}\)\(\rm\color{purple}{purple}\)\(\rm\color{fuchsia}{fuchsia}\)

4、背景颜色,可以用\style{background-color:red}{}来设置公式区的背景颜色,颜色可以是代码或#RGB值

例如:\(\style{background-color:aqua}{c=2\pi r}\)显示为\(\style{background-color:aqua}{c=2\pi r}\),当然\style{}{}可以设置任何的css样式

练习环节:

回复 支持 1 反对 0

使用道具 举报

 楼主| 发表于 2020-7-25 21:09 | 显示全部楼层

十、其它公式

1、加框,可以用\boxed或\fbox,二者的区别是\fbox中文本原样显示,而\boxed中则以公式显示

例如:\(x+\boxed{y^2}=0\)与\(x+\fbox{y^2}=0\)显示为\(x+\boxed{y^2}=0\)与\(x+\fbox{y^2}=0\)


2、垂直居中显示\vcenter{}

例如:\(y_2\)显示为\(y_2\),而用\vcenter{y}_2后,显示为\(\vcenter{y}_2\)


3、单位,也就是指定一些字符上下左右微调,单位有pt,em,mu,px等

px:屏幕像素点,如1920*1080分辩率表示横坐标有1920px,纵坐标有1080px
pt:磅,也就是1/72英寸
以96dpi来计算,1em=12pt=16px=18mu


4、水平移动XX单位,负值为左移,正值为右移\kern{}{}

例如:\(I\kern{-3pt}R\),显示为\(I\kern{-3pt}R\),\(I\kern{1em}R\)显示为\(I\kern{1em}R\)


5、上下升降XX单位,\raise{}{}上移,\lower{}{}下移,负号正好相反

例如:\(a\raise{5pt}{bc}d\),显示为\(a\raise{5pt}{bc}d\),\(a\lower{5pt}{bc}d\)显示为\(a\lower{5pt}{bc}d\)


6、本教程中没有包函的字符,但在符号库中有,如何打入数学公式呢?

例如:\(\unicode{x2153}\),显示为\(\unicode{x2153}\)


7、当公式中出现与论坛主贴标签[b]冲突时怎么办?

例如:论坛用来设置粗体字,此时公式中只能用\lbrack与\rbrack来代替[],\(\lbrack b\rbrack\)显示为\(\lbrack b\rbrack\)

练习:\(\kern3mu\raise1mu{.}\kern3mu\raise6mu{.}\kern3mu\raise12mu{.}\)

回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|数学中国 ( 京ICP备05040119号 )

GMT+8, 2021-12-4 23:49 , Processed in 0.076172 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表