@8btc/mditor 0.0.40 → 0.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +2 -2
- package/dist/index.js +42 -4
- package/dist/index.min.js +1 -1
- package/dist/method.js +42 -4
- package/dist/method.min.js +1 -1
- package/package.json +1 -1
- package/src/ts/constants.ts +39 -1
package/src/ts/constants.ts
CHANGED
|
@@ -330,11 +330,49 @@ export abstract class Constants {
|
|
|
330
330
|
public static readonly MATH_OPTIONS: IMath = {
|
|
331
331
|
engine: "MathJax",
|
|
332
332
|
inlineDigit: true,
|
|
333
|
-
//
|
|
333
|
+
// 默认宏:补充常见但部分引擎未内置的符号/算子
|
|
334
334
|
// oiint: 关闭曲面积分(∯),在 MathJax 下通过 unicode 宏渲染
|
|
335
335
|
// 说明:KaTeX 若不支持 \unicode,将退化为普通 \iint(由 mathRender 保证)
|
|
336
|
+
// 以下算子使用 \operatorname / \operatorname* 统一排版为直立体
|
|
336
337
|
macros: {
|
|
337
338
|
oiint: "\\unicode{x222F}",
|
|
339
|
+
// 常用数系
|
|
340
|
+
N: "\\mathbb{N}",
|
|
341
|
+
Z: "\\mathbb{Z}",
|
|
342
|
+
Q: "\\mathbb{Q}",
|
|
343
|
+
R: "\\mathbb{R}",
|
|
344
|
+
C: "\\mathbb{C}",
|
|
345
|
+
// 双曲函数
|
|
346
|
+
sech: "\\operatorname{sech}",
|
|
347
|
+
csch: "\\operatorname{csch}",
|
|
348
|
+
coth: "\\operatorname{coth}",
|
|
349
|
+
// 常见优化 / 线代算子
|
|
350
|
+
argmin: "\\operatorname*{argmin}",
|
|
351
|
+
argmax: "\\operatorname*{argmax}",
|
|
352
|
+
rank: "\\operatorname{rank}",
|
|
353
|
+
diag: "\\operatorname{diag}",
|
|
354
|
+
tr: "\\operatorname{tr}",
|
|
355
|
+
// 概率统计
|
|
356
|
+
Var: "\\operatorname{Var}",
|
|
357
|
+
Cov: "\\operatorname{Cov}",
|
|
358
|
+
Std: "\\operatorname{Std}",
|
|
359
|
+
E: "\\mathbb{E}",
|
|
360
|
+
Pr: "\\mathbb{P}",
|
|
361
|
+
Normal: "\\mathcal{N}",
|
|
362
|
+
Bern: "\\operatorname{Bern}",
|
|
363
|
+
Poiss: "\\operatorname{Poiss}",
|
|
364
|
+
iid: "\\stackrel{\\text{i.i.d.}}{\\sim}",
|
|
365
|
+
indep: "\\perp\\!\\!\\!\\perp",
|
|
366
|
+
// 其他常见记号
|
|
367
|
+
sgn: "\\operatorname{sgn}",
|
|
368
|
+
supp: "\\operatorname{supp}",
|
|
369
|
+
Span: "\\operatorname{span}",
|
|
370
|
+
ker: "\\operatorname{ker}",
|
|
371
|
+
im: "\\operatorname{im}",
|
|
372
|
+
spec: "\\operatorname{spec}",
|
|
373
|
+
// 逻辑
|
|
374
|
+
implies: "\\Rightarrow",
|
|
375
|
+
iff: "\\Leftrightarrow",
|
|
338
376
|
},
|
|
339
377
|
};
|
|
340
378
|
public static readonly THEME_OPTIONS = {
|