公式编辑器
渲染的公式:

编辑器选项

数学公式编辑器

介绍

数学编辑器(MathEditor)是一款经典的数学公式在线编辑器,使用katex核心构建,同时拥有数学公式在线查询、编辑、保存、分享功能,可以实现在所有主流浏览器上快速渲染公式。

支持的功能

这是数学公式编辑器支持的功能列表。 它被分类为多个逻辑功能组。

有一个类似的功能列表, 按字母顺序排列,列出支持和不支持的功能。

音调(Accents)

aa' a'a~\tilde{a} \tilde{a}g˚\mathring{g} \mathring{g}
aa'' a''ac~\widetilde{ac} \widetilde{ac}AB\overgroup{AB} \overgroup{AB}
aa^{\prime} a^{\prime}AB~\utilde{AB} \utilde{AB}AB\undergroup{AB} \undergroup{AB}
aˊ\acute{a} \acute{a}F\vec{F} \vec{F}AB\Overrightarrow{AB} \Overrightarrow{AB}
yˉ\bar{y} \bar{y}AB\overleftarrow{AB} \overleftarrow{AB}AB\overrightarrow{AB} \overrightarrow{AB}
a˘\breve{a} \breve{a}AB\underleftarrow{AB} \underleftarrow{AB}AB\underrightarrow{AB} \underrightarrow{AB}
aˇ\check{a} \check{a}ac\overleftharpoon{ac} \overleftharpoon{ac}ac\overrightharpoon{ac} \overrightharpoon{ac}
a˙\dot{a} \dot{a}AB\overleftrightarrow{AB} \overleftrightarrow{AB}AB\overbrace{AB} \overbrace{AB}
a¨\ddot{a} \ddot{a}AB\underleftrightarrow{AB} \underleftrightarrow{AB}AB\underbrace{AB} \underbrace{AB}
aˋ\grave{a} \grave{a}AB\overline{AB} \overline{AB}ABundefined\overlinesegment{AB} \overlinesegment{AB}
θ^\hat{\theta} \hat{\theta}AB\underline{AB} \underline{AB}ABundefined\underlinesegment{AB} \underlinesegment{AB}
ac^\widehat{ac} \widehat{ac}acˇ\widecheck{ac} \widecheck{ac}

\text{…}内的重音函数

aˊ\text{\'{a}} \'{a}a˜\text{\~{a}} \~{a}a˙\text{\.{a}} \.{a}a˝\text{\H{a}} \H{a}
aˋ\text{\`{a}} \`{a}aˉ\text{\={a}} \={a}a¨\text{\"{a}} \"{a}aˇ\text{\v{a}} \v{a}
aˆ\text{\^{a}} \^{a}a˘\text{\u{a}} \u{a}a˚\text{\r{a}} \r{a}

另见letters

分隔符(Delimiters)

( )(~) ( )( )\lparen~\rparen \lparen
    ~~~~\rparen
 ⌈~⌉ ⌈ ⌉ \lceil~\rceil \lceil
     ~~~~~\rceil
\uparrow \uparrow
[ ][~] [ ][ ]\lbrack~\rbrack \lbrack
    ~~~~\rbrack
 ⌊~⌋ ⌊ ⌋ \lfloor~\rfloor \lfloor
     ~~~~~\rfloor
\downarrow \downarrow
{}\{ \} \{ \}{}\lbrace \rbrace \lbrace
    ~~~~\rbrace
⎰⎱ ⎰⎱\lmoustache \rmoustache \lmoustache
    ~~~~\rmoustache
\updownarrow \updownarrow
 ⟨~⟩ ⟨ ⟩ \langle~\rangle \langle
    ~~~~\rangle
 ⟮~⟯ ⟮ ⟯ \lgroup~\rgroup \lgroup
     ~~~~~\rgroup
\Uparrow \Uparrow
\vert |\vert \vert┌ ┐ ┌ ┐\ulcorner \urcorner \ulcorner
    ~~~~\urcorner
\Downarrow \Downarrow
\Vert \|\Vert \Vert└ ┘ └ ┘\llcorner \lrcorner \llcorner
    ~~~~\lrcorner
\Updownarrow \Updownarrow
 \lvert~\rvert \lvert
    ~~~~\rvert
 \lVert~\rVert \lVert
     ~~~~~\rVert
\left.\right.\\backslash \backslash
 \lang~\rang \lang
    ~~~~\rang
< >\lt~\gt \lt \gt ⟦~⟧ ⟦ ⟧ \llbracket~\rrbracket \llbracket
    ~~~~\rrbracket
 \lBrace~\rBrace \lBrace \rBrace

分隔符大小

(AB)\left(\LARGE{AB}\right) \left(\LARGE{AB}\right)

(((((( \big( \Big( \bigg( \Bigg( ( \big( \Big( \bigg( \Bigg(

\left\big\bigl\bigm\bigr
\middle\Big\Bigl\Bigm\Bigr
\right\bigg\biggl\biggm\biggr
\Bigg\Biggl\Biggm\Biggr

环境(Environments)

abcd\begin{matrix} a & b \\ c & d \end{matrix}\begin{matrix}
   a & b \\
   c & d
\end{matrix}
abcd\begin{array}{cc}a & b\\c & d\end{array}\begin{array}{cc}
   a & b \\
   c & d
\end{array}
(abcd)\begin{pmatrix} a & b \\ c & d \end{pmatrix}\begin{pmatrix}
   a & b \\
   c & d
\end{pmatrix}
[abcd]\begin{bmatrix} a & b \\ c & d \end{bmatrix}\begin{bmatrix}
   a & b \\
   c & d
\end{bmatrix}
abcd\begin{vmatrix} a & b \\ c & d \end{vmatrix}\begin{vmatrix}
   a & b \\
   c & d
\end{vmatrix}
abcd\begin{Vmatrix} a & b \\ c & d \end{Vmatrix}\begin{Vmatrix}
   a & b \\
   c & d
\end{Vmatrix}
{abcd}\begin{Bmatrix} a & b \\ c & d \end{Bmatrix}\begin{Bmatrix}
   a & b \\
   c & d
\end{Bmatrix}
abcdefghi\def\arraystretch{1.5}\begin{array}{c:c:c} a & b & c \\ \hline d & e & f \\ \hdashline g & h & i \end{array}\def\arraystretch{1.5}
   \begin{array}{c:c:c}
   a & b & c \\ \hline
   d & e & f \\
   \hdashline
   g & h & i
\end{array}
a=b+cd+e=f\begin{aligned} a&=b+c \\ d+e&=f \end{aligned}\begin{aligned}
   a&=b+c \\
   d+e&=f
\end{aligned}
10x+3y=23x+13y=4\begin{alignedat}{2}10&x+&3&y=2\\3&x+&13&y=4\end{alignedat}\begin{alignedat}{2}
   10&x+ &3&y = 2 \\
   3&x+&13&y = 4
\end{alignedat}
a=be=b+c\begin{gathered} a=b \\ e=b+c \end{gathered}\begin{gathered}
   a=b \\
   e=b+c
\end{gathered}
x={aif bcif dx = \begin{cases} a &\text{if } b \\ c &\text{if } d \end{cases}x = \begin{cases}
   a &\text{if } b \\
   c &\text{if } d
\end{cases}

公式编辑器同意支持darraydcases

可接受的行分隔符包括:\\, \cr, \\[distance], 和 \cr[distance]. 可以使用任何公式单元写入距离(Distance )。

{array} 环境支持 |: 垂直分隔符。

{array} 环境尚不支持 \cline 或者 \multicolumn

网页(HTML)

MathEditor\href{https://www.matheditor.cn/}{\MathEditor}\href{https://www.matheditor.cn/}{\KaTeX}
https://www.matheditor.cn/\url{https://www.matheditor.cn/}\url{https://www.matheditor.cn/}

字母(Letters)和Unicode

希腊(Greek)字母

直接输入: ABΓΔEZHΘIKΛMNΞOΠPΣTΥΦXΨΩΑ Β Γ Δ Ε Ζ Η Θ Ι \allowbreak Κ Λ Μ Ν Ξ Ο Π Ρ Σ Τ Υ Φ Χ Ψ Ω
αβγδϵζηθικλμνξoπρστυϕχψωεϑϖϱςφ\allowbreak α β γ δ ϵ ζ η θ ι κ λ μ ν ξ o π \allowbreak ρ σ τ υ ϕ χ ψ ω ε ϑ ϖ ϱ ς φ

A\Alpha \AlphaB\Beta \BetaΓ\Gamma \GammaΔ\Delta \Delta
E\Epsilon \EpsilonZ\Zeta \ZetaH\Eta \EtaΘ\Theta \Theta
I\Iota \IotaK\Kappa \KappaΛ\Lambda \LambdaM\Mu \Mu
N\Nu \NuΞ\Xi \XiO\Omicron \OmicronΠ\Pi \Pi
P\Rho \RhoΣ\Sigma \SigmaT\Tau \TauΥ\Upsilon \Upsilon
Φ\Phi \PhiX\Chi \ChiΨ\Psi \PsiΩ\Omega \Omega
Γ\varGamma \varGammaΔ\varDelta \varDeltaΘ\varTheta \varThetaΛ\varLambda \varLambda
Ξ\varXi \varXiΠ\varPi \varPiΣ\varSigma \varSigmaΥ\varUpsilon \varUpsilon
Φ\varPhi \varPhiΨ\varPsi \varPsiΩ\varOmega \varOmega
α\alpha \alphaβ\beta \betaγ\gamma \gammaδ\delta \delta
ϵ\epsilon \epsilonζ\zeta \zetaη\eta \etaθ\theta \theta
ι\iota \iotaκ\kappa \kappaλ\lambda \lambdaμ\mu \mu
ν\nu \nuξ\xi \xiο\omicron \omicronπ\pi \pi
ρ\rho \rhoσ\sigma \sigmaτ\tau \tauυ\upsilon \upsilon
ϕ\phi \phiχ\chi \chiψ\psi \psiω\omega \omega
ε\varepsilon \varepsilonϰ\varkappa \varkappaϑ\vartheta \varthetaϑ\thetasym \thetasym
ϖ\varpi \varpiϱ\varrho \varrhoς\varsigma \varsigmaφ\varphi \varphi
ϝ\digamma \digamma

其他字母

ı\imath \imath\nabla \nabla\Im \ImR\Reals \RealsŒ\text{\OE} \text{\OE}
ȷ\jmath \jmath\partial \partial\image \image\wp \wpø\text{\o} \text{\o}
\aleph \aleph\Game \Gamek\Bbbk \Bbbk\weierp \weierpØ\text{\O} \text{\O}
\alef \alef\Finv \FinvN\N \NZ\Z \Zß\text{\ss} \text{\ss}
\alefsym \alefsymC\cnums \cnumsN\natnums \natnumsa˚\text{\aa} \text{\aa}ı\text{\i} \text{\i}
\beth \bethC\Complex \ComplexR\R \RA˚\text{\AA} \text{\AA}ȷ\text{\j} \text{\j}
\gimel \gimel\ell \ell\Re \Reæ\text{\ae} \text{\ae}
\daleth \daleth\hbar \hbar\real \realÆ\text{\AE} \text{\AE}
ð\eth \eth\hslash \hslashR\reals \realsœ\text{\oe} \text{\oe}

直接输入: ð∂ ∇ ℑ Ⅎ ℵ ℶ ℷ ℸ ⅁ ℏ ð ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖÙÚÛÜÝÞßàáâãäåçèéêëìíîïðñòóôöùúûüýþÿ

Unicode数学字母数字符号

项目(Item)范围(Range)项目(Item)范围(Range)
Bold𝐀-𝐙 𝐚-𝐳 𝟎-𝟗\text{𝐀-𝐙 𝐚-𝐳 𝟎-𝟗}Double-struck𝔸-Z 𝕜\text{𝔸-}ℤ\ 𝕜
Italic𝐴-𝑍 𝑎-𝑧\text{𝐴-𝑍 𝑎-𝑧}Sans serif𝖠-𝖹 𝖺-𝗓 𝟢-𝟫\text{𝖠-𝖹 𝖺-𝗓 𝟢-𝟫}
Bold Italic𝑨-𝒁 𝒂-𝒛\text{𝑨-𝒁 𝒂-𝒛}Sans serif bold𝗔-𝗭 𝗮-𝘇 𝟬-𝟵\text{𝗔-𝗭 𝗮-𝘇 𝟬-𝟵}
Script𝒜-𝒵\text{𝒜-𝒵}Sans serif italic𝘈-𝘡 𝘢-𝘻\text{𝘈-𝘡 𝘢-𝘻}
Fractur𝔄-Z 𝔞-𝔷\text{𝔄-}ℨ\text{ 𝔞-𝔷}Monospace𝙰-𝚉 𝚊-𝚣 𝟶-𝟿\text{𝙰-𝚉 𝚊-𝚣 𝟶-𝟿}

Unicode

上面列出的字母将以任意渲染模式呈现。

如果渲染模式设置为 strict: false 或者 strict:"warn" (默认), 那么将接受所有Unicode字母。上面未列出的字母将使用系统字体呈现,而不是本公式提供的字体,因此它们的排版可能会发生冲突。 它们也可能导致小的垂直对齐问题。同时本编辑器有拉丁语,希腊语和西里尔语中字形的详细指标,但其他字形被视为与字母M一样高。

对于波斯复合字符,正在开发用户提供的插件。查看插件

布局(Layout)

注解(Annotation)

5\cancel{5} \cancel{5}a+b+cnote\overbrace{a+b+c}^{\text{note}} \overbrace{a+b+c}^{\text{note}}
5\bcancel{5} \bcancel{5}a+b+cnote\underbrace{a+b+c}_{\text{note}} \underbrace{a+b+c}_{\text{note}}
ABC\xcancel{ABC} \xcancel{ABC}\not = \not =
abc\sout{abc} \sout{abc}π=cd\boxed{\pi=\frac c d} \boxed{\pi=\frac c d}

\tag{hi} x+y^{2x} x+y2x(hi)\tag{hi} x+y^{2x}

\tag*{hi} x+y^{2x} x+y2xhi\tag*{hi} x+y^{2x}

换行(Line Breaks)

当前编辑器版本或更高版本将在关系或二元运算符(如“=”或“+”)之后插入内联数学中的自动换行符。这些可以通过\nobreak 或将数学放在一对括号中来抑制,如{F = ma}。 \allowbreak将允许在关系或运算符以外的位置自动换行。

硬换行符是\\ and \newline.

在显示数学中,不会插入自动换行符。 它在渲染选项 strict: true时忽略显示数学硬换行。

垂直布局(Vertical Layout)

xnx_n x_n=!\stackrel{!}{=} \stackrel{!}{=}aba \atop b a \atop b
exe^x e^x=!\overset{!}{=} \overset{!}{=}abca\raisebox{0.25em}{b}c a\raisebox{0.25em}{b}c
uo_u^o _u^o=!\underset{!}{=} \underset{!}{=}

\raisebox 的第二个参数可以包含数学,如果它嵌套在$…$ 分隔符中, 如 \raisebox{0.25em}{$\frac a b$}

重叠和间距(Overlap and Spacing)

=/{=}\mathllap{/\,} {=}\mathllap{/\,}(x2)\left(x^{\smash{2}}\right) \left(x^{\smash{2}}\right)
/=\mathrlap{\,/}{=} \mathrlap{\,/}{=}y\sqrt{\smash[b]{y}} \sqrt{\smash[b]{y}}

1ijnxij\displaystyle\sum_{\mathclap{1\le i\le j\le n}} x_{ij} \sum_{\mathclap{1\le i\le j\le n}} x_{ij}

公式编辑器同样支持 \llap, \rlap, 和 \clap, 但它们只接受文本而不是数学作为参数。

间距(Spacing)

FunctionProducesFunctionProduces
\,³∕₁₈ em space\kern{distance}space, width = distance
\thinspace³∕₁₈ em space\mkern{distance}space, width = distance
\>⁴∕₁₈ em space\mskip{distance}space, width = distance
\:⁴∕₁₈ em space\hskip{distance}space, width = distance
\medspace⁴∕₁₈ em space\hspace{distance}space, width = distance
\;⁵∕₁₈ em space\hspace*{distance}space, width = distance
\thickspace⁵∕₁₈ em space\phantom{content}space the width and height of content
\enspace½ em space\hphantom{content}space the width of content
\quad1 em space\vphantom{content}a strut the height of content
\qquad2 em space\!– ³∕₁₈ em space
~non-breaking space\negthinspace– ³∕₁₈ em space
\<space>space\negmedspace– ⁴∕₁₈ em space
\nobreakspacenon-breaking space\negthickspace– ⁵∕₁₈ em space
\spacespace

小贴士(Notes):

距离(distance)可以接受任何单位(units)。

\kern, \mkern, \mskip, 和 \hspace 接受无支撑距离,如:\kern1em

\mkern\mskip 将无法在文本模式下工作,并且两者都会为除 mu之外的任何单元写入控制台警告。

逻辑和集合论(Logic and Set Theory)

\forall \forall\complement \complement\therefore \therefore\emptyset \emptyset
\exists \exists\subset \subset\because \because\empty \empty
\exist \exist\supset \supset\mapsto \mapsto\varnothing \varnothing
\nexists \nexists\mid \mid\to \to    \implies \implies
\in \in\land \land\gets \gets    \impliedby \impliedby
\isin \isin\lor \lor\leftrightarrow \leftrightarrow    \iff \iff
\notin \notin\ni \ni\notni \notni¬\neg \neg or \lnot

直接输入: ¬∀ ∴ ∁ ∵ ∃ ∣ ∈ ∉ ∋ ⊂ ⊃ ∧ ∨ ↦ → ← ↔ ¬ ℂ ℍ ℕ ℙ ℚ ℝ

宏(Macros)

x2+x2\def\foo{x^2} \foo + \foo\def\foo{x^2} \foo + \foo
y2+y2\gdef\bar#1{#1^2} \bar{y} + \bar{y}\gdef\bar#1{#1^2} \bar{y} + \bar{y}
\global\def\macroname#1#2…{definition}
\newcommand\macroname[numargs]{definition}
\renewcommand\macroname[numargs]{definition}
\providecommand\macroname[numargs]{definition}

宏也可以在渲染选项中定义。

宏接受最多九个参数: #1, #2, 等.

\gdef\global\def 宏将在数学表达式之间保持不变。

可用功能包括:

\char \mathchoice \TextOrMath \@ifstar \@ifnextchar \@firstoftwo \@secondoftwo \relax

@ 是命令的有效字符,就像 \makeatletter 的效果一样。

运算符(Operators)

大运算符(Big Operators)

\sum \sum\prod \prod\bigotimes \bigotimes\bigvee \bigvee
\int \int\coprod \coprod\bigoplus \bigoplus\bigwedge \bigwedge
\iint \iint\intop \intop\bigodot \bigodot\bigcap \bigcap
\iiint \iiint\smallint \smallint\biguplus \biguplus\bigcup \bigcup
\oint \oint\oiint \oiint\oiiint \oiiint\bigsqcup \bigsqcup

直接输入:∫ ∬ ∭ ∮ ∏ ∐ ∑ ⋀ ⋁ ⋂ ⋃ ⨀ ⨁ ⨂ ⨄ ⨆

二元运算符(Binary Operators)

++ +\cdot \cdot\gtrdot \gtrdotx(moda)x \pmod a x \pmod a
- -\cdotp \cdotp\intercal \intercalx(a)x \pod a x \pod a
// /\centerdot \centerdot\land \land\rhd \rhd
* *\circ \circ\leftthreetimes \leftthreetimes\rightthreetimes \rightthreetimes
⨿\amalg \amalg\circledast \circledast.\ldotp \ldotp\rtimes \rtimes
&\And \And\circledcirc \circledcirc\lor \lor\setminus \setminus
\ast \ast\circleddash \circleddash\lessdot \lessdot\smallsetminus \smallsetminus
\barwedge \barwedge\Cup \Cup\lhd \lhd\sqcap \sqcap
\bigcirc \bigcirc\cup \cup\ltimes \ltimes\sqcup \sqcup
mod\bmod \bmod\curlyvee \curlyveexmodax \mod a x\mod a×\times \times
\boxdot \boxdot\curlywedge \curlywedge\mp \mp\unlhd \unlhd
\boxminus \boxminus÷\div \div\odot \odot\unrhd \unrhd
\boxplus \boxplus\divideontimes \divideontimes\ominus \ominus\uplus \uplus
\boxtimes \boxtimes\dotplus \dotplus\oplus \oplus\vee \vee
\bullet \bullet\doublebarwedge \doublebarwedge\otimes \otimes\veebar \veebar
\Cap \Cap\doublecap \doublecap\oslash \oslash\wedge \wedge
\cap \cap\doublecup \doublecup±\pm \pm or \plusmn\wr \wr

直接输入:+/±×÷+ - / * ⋅ ± × ÷ ∓ ∔ ∧ ∨ ∩ ∪ ≀ ⊎ ⊓ ⊔ ⊕ ⊖ ⊗ ⊘ ⊙ ⊚ ⊛ ⊝

分数和二项式(Fractions and Binomials)

ab\frac{a}{b} \frac{a}{b}ab\tfrac{a}{b} \tfrac{a}{b}(aa+1]\genfrac ( ] {2pt}{1}a{a+1} \genfrac ( ] {2pt}{1}a{a+1}
ab{a \over b} {a \over b}ab\dfrac{a}{b} \dfrac{a}{b}ab+1{a \above{2pt} b+1} {a \above{2pt} b+1}
a/ba/b a/ba1+1b\cfrac{a}{1 + \cfrac{1}{b}} \cfrac{a}{1 + \cfrac{1}{b}}
(nk)\binom{n}{k} \binom{n}{k}(nk)\dbinom{n}{k} \dbinom{n}{k}{nk}{n\brace k} {n\brace k}
(nk){n \choose k} {n \choose k}(nk)\tbinom{n}{k} \tbinom{n}{k}[nk]{n\brack k} {n\brack k}

数学运算符(Math Operators)

arcsin\arcsin \arcsincotg\cotg \cotgln\ln \lndet\det \det
arccos\arccos \arccoscoth\coth \cothlog\log \loggcd\gcd \gcd
arctan\arctan \arctancsc\csc \cscsec\sec \secinf\inf \inf
arctg\arctg \arctgctg\ctg \ctgsin\sin \sinlim\lim \lim
arcctg\arcctg \arcctgcth\cth \cthsinh\sinh \sinhlim inf\liminf \liminf
arg\arg \argdeg\deg \degsh\sh \shlim sup\limsup \limsup
ch\ch \chdim\dim \dimtan\tan \tanmax\max \max
cos\cos \cosexp\exp \exptanh\tanh \tanhmin\min \min
cosec\cosec \cosechom\hom \homtg\tg \tgPr\Pr \Pr
cosh\cosh \coshker\ker \kerth\th \thsup\sup \sup
cot\cot \cotlg\lg \lgf\operatorname{f} \operatorname{f}arg max\argmax \argmax
arg min\argmin \argmin

此表右列的函数可以采用\limits

开方(\sqrt)

x\sqrt{x} \sqrt{x}

x3\sqrt[3]{x} \sqrt[3]{x}

关系(Relations)

=!\stackrel{!}{=} \stackrel{!}{=}

== =\eqcirc \eqcirc\lesseqgtr \lesseqgtr\sqsupset \sqsupset
<< <\eqcolon \eqcolon\lesseqqgtr \lesseqqgtr\sqsupseteq \sqsupseteq
>> >\Eqcolon \Eqcolon\lessgtr \lessgtr\Subset \Subset
:: :\eqqcolon \eqqcolon\lesssim \lesssim\subset \subset or \sub
\approx \approx=\Eqqcolon \Eqqcolon\ll \ll\subseteq \subseteq or \sube
\approxeq \approxeq\eqsim \eqsim\lll \lll\subseteqq \subseteqq
\asymp \asymp\eqslantgtr \eqslantgtr\llless \llless\succ \succ
\backepsilon \backepsilon\eqslantless \eqslantless<\lt \lt\succapprox \succapprox
\backsim \backsim\equiv \equiv\mid \mid\succcurlyeq \succcurlyeq
\backsimeq \backsimeq\fallingdotseq \fallingdotseq\models \models\succeq \succeq
\between \between\frown \frown\multimap \multimap\succsim \succsim
\bowtie \bowtie\ge \ge\owns \owns\Supset \Supset
\bumpeq \bumpeq\geq \geq\parallel \parallel\supset \supset
\Bumpeq \Bumpeq\geqq \geqq\perp \perp\supseteq \supseteq or \supe
\circeq \circeq\geqslant \geqslant\pitchfork \pitchfork\supseteqq \supseteqq
:\colonapprox \colonapprox\gg \gg\prec \prec\thickapprox \thickapprox
\Colonapprox \Colonapprox\ggg \ggg\precapprox \precapprox\thicksim \thicksim
:\coloneq \coloneq\gggtr \gggtr\preccurlyeq \preccurlyeq\trianglelefteq \trianglelefteq
\Coloneq \Coloneq>\gt \gt\preceq \preceq\triangleq \triangleq
\coloneqq \coloneqq\gtrapprox \gtrapprox\precsim \precsim\trianglerighteq \trianglerighteq
=\Coloneqq \Coloneqq\gtreqless \gtreqless\propto \propto\varpropto \varpropto
:\colonsim \colonsim\gtreqqless \gtreqqless\risingdotseq \risingdotseq\vartriangle \vartriangle
\Colonsim \Colonsim\gtrless \gtrless\shortmid \shortmid\vartriangleleft \vartriangleleft
\cong \cong\gtrsim \gtrsim\shortparallel \shortparallel\vartriangleright \vartriangleright
\curlyeqprec \curlyeqprec\in \in or \isin\sim \sim:\vcentcolon \vcentcolon
\curlyeqsucc \curlyeqsucc\Join \Join\simeq \simeq\vdash \vdash
\dashv \dashv\le \le\smallfrown \smallfrown\vDash \vDash
\dblcolon \dblcolon\leq \leq\smallsmile \smallsmile\Vdash \Vdash
\doteq \doteq\leqq \leqq\smile \smile\Vvdash \Vvdash
\Doteq \Doteq\leqslant \leqslant\sqsubset \sqsubset
\doteqdot \doteqdot\lessapprox \lessapprox\sqsubseteq \sqsubseteq

直接输入:=<>:= < > : ∈ ∋ ∝ ∼ ∽ ≂ ≃ ≅ ≈ ≊ ≍ ≎ ≏ ≐ ≑ ≒ ≓ ≖ ≗ ≜ ≡ ≤ ≥ ≦ ≧ ≫ ≬ ≳ ≷ ≺ ≻ ≼ ≽ ≾ ≿ ⊂ ⊃ ⊆ ⊇ ⊏ ⊐ ⊑ ⊒ ⊢ ⊣ ⊩ ⊪ ⊸ ⋈ ⋍ ⋐ ⋑ ⋔ ⋙ ⋛ ⋞ ⋟ ⌢ ⌣ ⩾ ⪆ ⪌ ⪕ ⪖ ⪯ ⪰ ⪷ ⪸ ⫅ ⫆ ≲ ⩽ ⪅ ≶ ⋚ ⪋ ⟂ ⊨ ≔ ≕ ⩴

否定关系(Negated Relations)

\not = \not =

\gnapprox \gnapprox\ngeqslant \ngeqslant\nsubseteq \nsubseteq\precneqq \precneqq
\gneq \gneq\ngtr \ngtr\nsubseteqq \nsubseteqq\precnsim \precnsim
\gneqq \gneqq\nleq \nleq\nsucc \nsucc\subsetneq \subsetneq
\gnsim \gnsim\nleqq \nleqq\nsucceq \nsucceq\subsetneqq \subsetneqq
\gvertneqq \gvertneqq\nleqslant \nleqslant\nsupseteq \nsupseteq\succnapprox \succnapprox
\lnapprox \lnapprox\nless \nless\nsupseteqq \nsupseteqq\succneqq \succneqq
\lneq \lneq\nmid \nmid\ntriangleleft \ntriangleleft\succnsim \succnsim
\lneqq \lneqq\notin \notin\ntrianglelefteq \ntrianglelefteq\supsetneq \supsetneq
\lnsim \lnsim\notni \notni\ntriangleright \ntriangleright\supsetneqq \supsetneqq
\lvertneqq \lvertneqq\nparallel \nparallel\ntrianglerighteq \ntrianglerighteq\varsubsetneq \varsubsetneq
\ncong \ncong\nprec \nprec\nvdash \nvdash\varsubsetneqq \varsubsetneqq
\ne \ne\npreceq \npreceq\nvDash \nvDash\varsupsetneq \varsupsetneq
\neq \neq\nshortmid \nshortmid\nVDash \nVDash\varsupsetneqq \varsupsetneqq
\ngeq \ngeq\nshortparallel \nshortparallel\nVdash \nVdash
\ngeqq \ngeqq\nsim \nsim\precnapprox \precnapprox

直接输入:∉ ∌ ∤ ∦ ≁ ≆ ≠ ≨ ≩ ≮ ≯ ≰ ≱ ⊀ ⊁ ⊈ ⊉ ⊊ ⊋ ⊬ ⊭ ⊮ ⊯ ⋠ ⋡ ⋦ ⋧ ⋨ ⋩ ⋬ ⋭ ⪇ ⪈ ⪉ ⪊ ⪵ ⪶ ⪹ ⪺ ⫋ ⫌

箭头(Arrows)

\circlearrowleft \circlearrowleft\leftharpoonup \leftharpoonup\rArr \rArr
\circlearrowright \circlearrowright\leftleftarrows \leftleftarrows\rarr \rarr
\curvearrowleft \curvearrowleft\leftrightarrow \leftrightarrow\restriction \restriction
\curvearrowright \curvearrowright\Leftrightarrow \Leftrightarrow\rightarrow \rightarrow
\Darr \Darr\leftrightarrows \leftrightarrows\Rightarrow \Rightarrow
\dArr \dArr\leftrightharpoons \leftrightharpoons\rightarrowtail \rightarrowtail
\darr \darr\leftrightsquigarrow \leftrightsquigarrow\rightharpoondown \rightharpoondown
\dashleftarrow \dashleftarrow\Lleftarrow \Lleftarrow\rightharpoonup \rightharpoonup
\dashrightarrow \dashrightarrow\longleftarrow \longleftarrow\rightleftarrows \rightleftarrows
\downarrow \downarrow\Longleftarrow \Longleftarrow\rightleftharpoons \rightleftharpoons
\Downarrow \Downarrow\longleftrightarrow \longleftrightarrow\rightrightarrows \rightrightarrows
\downdownarrows \downdownarrows\Longleftrightarrow \Longleftrightarrow\rightsquigarrow \rightsquigarrow
\downharpoonleft \downharpoonleft\longmapsto \longmapsto\Rrightarrow \Rrightarrow
\downharpoonright \downharpoonright\longrightarrow \longrightarrow\Rsh \Rsh
\gets \gets\Longrightarrow \Longrightarrow\searrow \searrow
\Harr \Harr\looparrowleft \looparrowleft\swarrow \swarrow
\hArr \hArr\looparrowright \looparrowright\to \to
\harr \harr\Lrarr \Lrarr\twoheadleftarrow \twoheadleftarrow
\hookleftarrow \hookleftarrow\lrArr \lrArr\twoheadrightarrow \twoheadrightarrow
\hookrightarrow \hookrightarrow\lrarr \lrarr\Uarr \Uarr
    \iff \iff\Lsh \Lsh\uArr \uArr
    \impliedby \impliedby\mapsto \mapsto\uarr \uarr
    \implies \implies\nearrow \nearrow\uparrow \uparrow
\Larr \Larr\nleftarrow \nleftarrow\Uparrow \Uparrow
\lArr \lArr\nLeftarrow \nLeftarrow\updownarrow \updownarrow
\larr \larr\nleftrightarrow \nleftrightarrow\Updownarrow \Updownarrow
\leadsto \leadsto\nLeftrightarrow \nLeftrightarrow\upharpoonleft \upharpoonleft
\leftarrow \leftarrow\nrightarrow \nrightarrow\upharpoonright \upharpoonright
\Leftarrow \Leftarrow\nRightarrow \nRightarrow\upuparrows \upuparrows
\leftarrowtail \leftarrowtail\nwarrow \nwarrow
\leftharpoondown \leftharpoondown\Rarr \Rarr

直接输入:← ↑ → ↓ ↔ ↕ ↖ ↗ ↘ ↙ ↚ ↛ ↞ ↠ ↢ ↣ ↦ ↩ ↪ ↫ ↬ ↭ ↮ ↰ ↱↶ ↷ ↺ ↻ ↼ ↽ ↾ ↾ ↿ ⇀ ⇁ ⇂ ⇃ ⇄ ⇆ ⇇ ⇈ ⇉ ⇊ ⇋ ⇌⇍ ⇎ ⇏ ⇐ ⇑ ⇒ ⇓ ⇔ ⇕ ⇚ ⇛ ⇝ ⇠ ⇢ ⟵ ⟶ ⟷ ⟸ ⟹ ⟺ ⟼

Extensible Arrows

abc\xleftarrow{abc} \xleftarrow{abc}underover\xrightarrow[under]{over} \xrightarrow[under]{over}
abc\xLeftarrow{abc} \xLeftarrow{abc}abc\xRightarrow{abc} \xRightarrow{abc}
abc\xleftrightarrow{abc} \xleftrightarrow{abc}abc\xLeftrightarrow{abc} \xLeftrightarrow{abc}
abc\xhookleftarrow{abc} \xhookleftarrow{abc}abc\xhookrightarrow{abc} \xhookrightarrow{abc}
abc\xtwoheadleftarrow{abc} \xtwoheadleftarrow{abc}abc\xtwoheadrightarrow{abc} \xtwoheadrightarrow{abc}
abc\xleftharpoonup{abc} \xleftharpoonup{abc}abc\xrightharpoonup{abc} \xrightharpoonup{abc}
abc\xleftharpoondown{abc} \xleftharpoondown{abc}abc\xrightharpoondown{abc} \xrightharpoondown{abc}
abc\xleftrightharpoons{abc} \xleftrightharpoons{abc}abc\xrightleftharpoons{abc} \xrightleftharpoons{abc}
abc\xtofrom{abc} \xtofrom{abc}abc\xmapsto{abc} \xmapsto{abc}
=abc\xlongequal{abc} \xlongequal{abc}

可扩展箭头都可以以相同的方式采用可选参数
\xrightarrow[under]{over}.

样式,颜色,大小和字体(Style, Color, Size, and Font)

类选择器(Class Assignment)

\mathbin \mathclose \mathinner \mathop
\mathopen \mathord \mathpunct \mathrel

颜色(Color)

F=ma\color{blue} F=ma \color{blue} F=ma

请注意, \color就像一个开关。 这与LaTeX一致,与MathJax不同。 其他KaTeX颜色函数期望内容是函数参数:

F=ma\textcolor{blue}{F=ma} \textcolor{blue}{F=ma}
F=ma\textcolor{#228B22}{F=ma} \textcolor{#228B22}{F=ma}
A\colorbox{aqua}{A} \colorbox{aqua}{A}
A\fcolorbox{red}{aqua}{A} \fcolorbox{red}{aqua}{A}

对于颜色定义,KaTeX颜色函数将接受标准的HTML预定义颜色名称。 他们还将接受CSS十六进制样式的RGB参数。 在六位数规格之前,"#" 是可选的。

字体(Font)

Ab0\mathrm{Ab0} \mathrm{Ab0}Ab0\mathbf{Ab0} \mathbf{Ab0}Ab0\mathit{Ab0} \mathit{Ab0}
Ab0\mathnormal{Ab0} \mathnormal{Ab0}Ab0\textbf{Ab0} \textbf{Ab0}Ab0\textit{Ab0} \textit{Ab0}
Ab0\textrm{Ab0} \textrm{Ab0}Ab0\bf Ab0 \bf Ab0Ab0\it Ab0 \it Ab0
Ab0\rm Ab0 \rm Ab0Ab0\bold{Ab0} \bold{Ab0}Ab0\textup{Ab0} \textup{Ab0}
Ab0\textnormal{Ab0} \textnormal{Ab0}Ab0\boldsymbol{Ab0} \boldsymbol{Ab}AB\Bbb{AB} \Bbb{AB}
Ab0\text{Ab0} \text{Ab0}Ab0\bm{Ab0} \bm{Ab0}AB\mathbb{AB} \mathbb{AB}
Ab0\mathsf{Ab0} \mathsf{Ab0}Ab0\textmd{Ab0} \textmd{Ab0}Ab0\frak{Ab0} \frak{Ab0}
Ab0\textsf{Ab0} \textsf{Ab0}Ab0\mathtt{Ab0} \mathtt{Ab0}Ab0\mathfrak{Ab0} \mathfrak{Ab0}
Ab0\sf Ab0 \sf Ab0Ab0\texttt{Ab0} \texttt{Ab0}AB0\mathcal{AB0} \mathcal{AB0}
Ab0\tt Ab0 \tt Ab0AB\mathscr{AB} \mathscr{AB}

可以使用\textXX版本的字体函数来堆叠字体系列( font family),字体粗细( font weight)和字体形状(font shape)。因此 \textsf{\textbf{H}} 将生成 H\textsf{\textbf{H}}. 其他版本不会叠加,例如 \mathsf{\mathbf{H}}将生成 H\mathsf{\mathbf{H}}.

如果字体没有粗体字形, \pmb 可以模拟一个。 例如, \pmb{\mu} 渲染为: μ\pmb{\mu}

(大小)Size

AB\Huge AB \Huge ABAB\normalsize AB \normalsize AB
AB\huge AB \huge ABAB\small AB \small AB
AB\LARGE AB \LARGE ABAB\footnotesize AB \footnotesize AB
AB\Large AB \Large ABAB\scriptsize AB \scriptsize AB
AB\large AB \large ABAB\tiny AB \tiny AB

样式(Style)

i=1n\displaystyle\sum_{i=1}^n \displaystyle\sum_{i=1}^n
i=1n\textstyle\sum_{i=1}^n \textstyle\sum_{i=1}^n
x\scriptstyle x \scriptstyle x         (The size of a first sub/superscript)
x\scriptscriptstyle x \scriptscriptstyle x (The size of subsequent sub/superscripts)
limx\lim\limits_x \lim\limits_x
limx\lim\nolimits_x \lim\nolimits_x
x^2\verb!x^2! \verb!x^2!

\text{…}将接受嵌套的$…$片段并以数学模式呈现它们。

符号和标点符号(Symbols and Punctuation)

% comment\dots \dotsKaTeX\KaTeX \KaTeX
%\% \%\cdots \cdotsLaTeX\LaTeX \LaTeX
#\# \#\ddots \ddotsTeX\TeX \TeX
&\& \&\ldots \ldots\nabla \nabla
_\_ \_\vdots \vdots\infty \infty
_\text{\textunderscore} \text{\textunderscore}\dotsb \dotsb\infin \infin
\text{--} \text{--}\dotsc \dotsc\checkmark \checkmark
\text{\textendash} \text{\textendash} ⁣\dotsi \dotsi\dag \dag
\text{---} \text{---}\dotsm \dotsm\dagger \dagger
\text{\textemdash} \text{\textemdash}\dotso \dotso\text{\textdagger} \text{\textdagger}
~\text{\textasciitilde} \text{\textasciitilde}\sdot \sdot\ddag \ddag
^\text{\textasciicircum} \text{\textasciicircum}\mathellipsis \mathellipsis\ddagger \ddagger
` `\text{\textellipsis} \text{\textellipsis}\text{\textdaggerdbl} \text{\textdaggerdbl}
\text{\textquoteleft} text{\textquoteleft}\Box \Box\Dagger \Dagger
\lq \lq\square \square\angle \angle
\text{\textquoteright} \text{\textquoteright}\blacksquare \blacksquare\measuredangle \measuredangle
\rq \rq\triangle \triangle\sphericalangle \sphericalangle
\text{\textquotedblleft} \text{\textquotedblleft}\triangledown \triangledown\top \top
"" "\triangleleft \triangleleft\bot \bot
\text{\textquotedblright} \text{\textquotedblright}\triangleright \triangleright$\$ \$
 ⁣:\colon \colon\bigtriangledown \bigtriangledown$\text{\textdollar} \text{\textdollar}
\backprime \backprime\bigtriangleup \bigtriangleup£\pounds \pounds
\prime \prime\blacktriangle \blacktriangle£\mathsterling \mathsterling
<\text{\textless} \text{\textless}\blacktriangledown \blacktriangledown£\text{\textsterling} \text{\textsterling}
>\text{\textgreater} \text{\textgreater}\blacktriangleleft \blacktriangleleft¥\yen \yen
|\text{\textbar} \text{\textbar}\blacktriangleright \blacktriangleright\surd \surd
\text{\textbardbl} \text{\textbardbl}\diamond \diamond°\degree \degree
{\text{\textbraceleft} \text{\textbraceleft}\Diamond \Diamond°\text{\textdegree} \text{\textdegree}
}\text{\textbraceright} \text{\textbraceright}\lozenge \lozenge\mho \mho
\\text{\textbackslash} \text{\textbackslash}\blacklozenge \blacklozenge\diagdown \diagdown
\text{\P} \text{\P}\star \star\diagup \diagup
§\text{\S} \text{\S}\bigstar \bigstar\flat \flat
§\text{\sect} \text{\sect}\clubsuit \clubsuit\natural \natural
©\copyright \copyright\clubs \clubs\sharp \sharp
®\circledR \circledR\diamondsuit \diamondsuit\heartsuit \heartsuit
®\text{\textregistered} \text{\textregistered}\diamonds \diamonds\hearts \hearts
\circledS \circledS\spadesuit \spadesuit\spades \spades
a\text{\textcircled a} \text{\textcircled a}\maltese \maltese

直接输入:£¥!£ ¥ ∇ ∞ · ∠ ∡ ∢ ♠ ♡ ♢ ♣ ♭ ♮ ♯ ✓ … ⋮ ⋯ ⋱ !

单位(Units)

在LaTeX中,单位与TeX中的比例相同。
LaTeX单位与CSS单位不同。

KaTeX UnitValueKaTeX UnitValue
emCSS embp1/72​ inch × F × G
exCSS expc12 KaTeX pt
mu1/18 CSS emdd1238/1157​ KaTeX pt
pt1/72.27 inch × F × Gcc14856/1157 KaTeX pt
mm1 mm × F × Gnd685/642 KaTeX pt
cm1 cm × F × Gnc1370/107​ KaTeX pt
in1 inch × F × Gsp1/65536 KaTeX pt

请注意:

F = (周围HTML文本的字体大小)/(10 pt)

默认情况下G = 1.21,因为KaTeX字体大小通常是周围字体大小的1.21倍。 HTML页面的CSS可以覆盖此值。

样式和尺寸的影响:

Unittextstylescriptscripthuge
em or ex\rule{1em}{1em}\scriptscriptstyle\rule{1em}{1em}\huge\rule{1em}{1em}
mu\rule{18mu}{18mu}\scriptscriptstyle\rule{18mu}{18mu}\huge\rule{18mu}{18mu}
others\rule{10pt}{10pt}\scriptscriptstyle\rule{10pt}{10pt}\huge\rule{10pt}{10pt}

友情链接

javaEar jar包下载 markdown编辑器 口碑博客 Html编辑器 数学公式编辑器 PDF视图在线阅读器