diff --git a/docs/latex.md b/docs/latex.md index 8deaad2..3d95c27 100644 --- a/docs/latex.md +++ b/docs/latex.md @@ -140,7 +140,7 @@ Supported Functions `KaTex:\xcancel{ABC}` | `\xcancel{ABC}` | `KaTex:\not =` | `\not =` `KaTex:\sout{abc}` | `\sout{abc}` | `KaTex:\boxed{\pi=\frac c d}` | `\boxed{\pi=\frac c d}` `KaTex:\$a_{\angl n}` _MD语法冲突_ | `$a_{\angl n}` | `KaTex:a_\angln` | `a_\angln` -`KaTex:​\phase{-78^\circ}` | `​\phase{-78^\circ}` +`KaTex:\phase{-78^\circ}` | `\phase{-78^\circ}` \tag{hi} x+y^{2x} @@ -184,7 +184,7 @@ Supported Functions 预览 | 方法 | 预览 | 方法 | 预览 | 方法 :- | :- | :- | :- | :- | :- | `KaTex:\frac{abc}{xyz}` | `\frac{abc}{xyz}` | `KaTex:\overline{abc}` | `\overline{abc}` | `KaTex:\overrightarrow{abc}` | `\overrightarrow{abc}` | -| `KaTex:f’` | `f’` | `KaTex:\underline{abc}` | `\underline{abc}` | `KaTex:\overleftarrow{abc}` | `\overleftarrow{abc}` | +| `KaTex:f'` | `f'` | `KaTex:\underline{abc}` | `\underline{abc}` | `KaTex:\overleftarrow{abc}` | `\overleftarrow{abc}` | | `KaTex:\sqrt{abc}` | `\sqrt{abc}` | `KaTex:\widehat{abc}` | `\widehat{abc}` | `KaTex:\overbrace{abc}` | `\overbrace{abc}` | | `KaTex:\sqrt[n]{abc}` | `\sqrt[n]{abc}` | `KaTex:\widetilde{abc}` | `\widetilde{abc}` | `KaTex:\underbrace{abc}` | `\underbrace{abc}` | @@ -259,6 +259,62 @@ Supported Functions :- | :- | :- | :- `KaTeX:\Set{ x \| x<\frac 1 2 }` | \Set{ x \| x<\frac 1 2 } | `KaTeX:\set{x\|x<5}` | \set{x\|x<5} +运算符 +--- + +### 数学运算符 + + +:- | :- | :- | :- | :- | :- | :- | :- +:- | :- | :- | :- | :- | :- | :- | :- +`KaTex:\arcsin` | `\arcsin` | `KaTex:\cosec` | `\cosec` | `KaTex:\deg` | `\deg` | `KaTex:\sec` | `\sec` +`KaTex:\arccos` | `\arccos` | `KaTex:\cosh` | `\cosh` | `KaTex:\dim` | `\dim` | `KaTex:\sin` | `\sin` +`KaTex:\arctan` | `\arctan` | `KaTex:\cot` | `\cot` | `KaTex:\exp` | `\exp` | `KaTex:\sinh` | `\sinh` +`KaTex:\arctg` | `\arctg` | `KaTex:\cotg` | `\cotg` | `KaTex:\hom` | `\hom` | `KaTex:\sh` | `\sh` +`KaTex:\arcctg` | `\arcctg` | `KaTex:\coth` | `\coth` | `KaTex:\ker` | `\ker` | `KaTex:\tan` | `\tan` +`KaTex:\arg` | `\arg` | `KaTex:\csc` | `\csc` | `KaTex:\lg` | `\lg` | `KaTex:\tanh` | `\tanh` +`KaTex:\ch` | `\ch` | `KaTex:\ctg` | `\ctg` | `KaTex:\ln` | `\ln` | `KaTex:\tg` | `\tg` +`KaTex:\cos` | `\cos` | `KaTex:\cth` | `\cth` | `KaTex:\log` | `\log` | `KaTex:\th` | `\th` +`KaTex:\operatorname{f}` | `\operatorname{f}` | +`KaTex:\argmax` | `\argmax` | `KaTex:\injlim` | `\injlim` | `KaTex:\min` | `\min` | `KaTex:\varinjlim` | `\varinjlim` +`KaTex:\argmin` | `\argmin` | `KaTex:\lim` | `\lim` | `KaTex:\plim` | `\plim` | `KaTex:\varliminf` | `\varliminf` +`KaTex:\det` | `\det` | `KaTex:\liminf` | `\liminf` | `KaTex:\Pr` | `\Pr` | `KaTex:\varlimsup` | `\varlimsup` +`KaTex:\gcd` | `\gcd` | `KaTex:\limsup` | `\limsup` | `KaTex:\projlim` | `\projlim` | `KaTex:\varprojlim` | `\varprojlim` +`KaTex:\inf` | `\inf` | `KaTex:\max` | `\max` | `KaTex:\sup` | `\sup` | `KaTex:\operatorname*{f}` | `\operatorname*{f}` +`KaTex:\operatornamewithlimits{f}` | `\operatornamewithlimits{f}` | + +### 大运算符 + + +:- | :- | :- | :- | :- | :- | :- | :- +:- | :- | :- | :- | :- | :- | :- | :- +`KaTex:\sum` | `\sum` | `KaTex:\prod` | `\prod` | `KaTex:\bigotimes` | `\bigotimes` | `KaTex:\bigvee` | `\bigvee` +`KaTex:\int` | `\int` | `KaTex:\coprod` | `\coprod` | `KaTex:\bigoplus` | `\bigoplus` | `KaTex:\bigwedge` | `\bigwedge` +`KaTex:\iint` | `\iint` | `KaTex:\intop` | `\intop` | `KaTex:\bigodot` | `\bigodot` | `KaTex:\bigcap` | `\bigcap` +`KaTex:\iiint` | `\iiint` | `KaTex:\smallint` | `\smallint` | `KaTex:\biguplus` | `\biguplus` | `KaTex:\bigcup` | `\bigcup` + +### 分数和二项式 + + +:- | :- | :- | :- +:- | :- | :- | :- +`KaTex:\frac{a}{b}` | `\frac{a}{b}` | `KaTex:\tfrac{a}{b}` | `\tfrac{a}{b}` +`KaTex:{a \over b}` | `{a \over b}` | `KaTex:\dfrac{a}{b}` | `\dfrac{a}{b}` +`KaTex:\genfrac ( ] {2pt}{1}a{a+1}` | `\genfrac ( ] {2pt}{1}a{a+1}` | `KaTex:{a \above{2pt} b+1}` | `{a \above{2pt} b+1}` +`KaTex:a/b` | `a/b` | `KaTex:\cfrac{a}{1 + \cfrac{1}{b}}` | `\cfrac{a}{1 + \cfrac{1}{b}}` + +:- | :- | :- | :- +:- | :- | :- | :- +`KaTex:\binom{n}{k}` | `\binom{n}{k}` | `KaTex:\dbinom{n}{k}` | `\dbinom{n}{k}` +`KaTex:{n\brace k}` | `{n\brace k}` | `KaTex:{n \choose k}` | `{n \choose k}` +`KaTex:\tbinom{n}{k}` | `\tbinom{n}{k}` | `KaTex:{n\brack k}` | `{n\brack k}` + +### \sqrt + +:- | :- | :- | :- +:- | :- | :- | :- +`KaTex:\sqrt{x}` | `\sqrt{x}` | `KaTex:\sqrt[3]{x}` | `\sqrt[3]{x}` + Environments --- diff --git a/package.json b/package.json index 6149ef1..df14788 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "keywords": [], "devDependencies": { "@uiw/formatter": "^1.3.3", - "@wcj/markdown-to-html": "^2.1.2", + "@wcj/markdown-to-html": "^2.2.0", "chokidar": "^3.5.3", "fs-extra": "^10.1.0", "husky": "^8.0.1", diff --git a/scripts/create.mjs b/scripts/create.mjs index 85584a1..4557257 100644 --- a/scripts/create.mjs +++ b/scripts/create.mjs @@ -38,6 +38,9 @@ export function create(str = '', options = {}) { const mdOptions = { showLineNumbers: false, hastNode: false, + katexOptions: { + strict: false, + }, remarkPlugins: [remarkGemoji], rehypePlugins: [ rehypeSlug,