xmmath 1.0.4 → 1.0.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xmmath",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "",
5
5
  "main": "./dist/xmmath.umd.js",
6
6
  "module": "./dist/xmmath.es.js",
@@ -10,6 +10,7 @@
10
10
  "require": "./dist/xmmath.umd.js"
11
11
  }
12
12
  },
13
+ "homepage": "https://github.com/xushengfeng/xmmath",
13
14
  "type": "module",
14
15
  "types": "./src/main.ts",
15
16
  "scripts": {
package/readme.md CHANGED
@@ -57,3 +57,42 @@ For more details, please go to [typst docs](https://typst.app/docs) for more inf
57
57
  - the function is a string of letters and can contain `.`, followed by parentheses to pass the parameter: `sum` `gt.eq` (display `≥` [symbol](https://typst.app/docs/reference/symbols/sym/) `sqrt(2)` `root(2,4)`).
58
58
  - string is wrapped with `"`, and can be escaped with `\"`.
59
59
  - `^_`is the superscript, and the numbers can be linked together: `2^10`. `/` is division, and the function `frac(1,2)`is available. They can use `()`to disambiguate.
60
+
61
+ ## 实现的函数(Realized function)
62
+
63
+ - [x] accent
64
+ - [x] attach
65
+ - [x] binom
66
+ - [x] cancel (仅支持 inverted 和 cross 参数)
67
+ - [x] cases
68
+ - [ ] equation
69
+ - [x] frac
70
+ - [x] lr
71
+ - [x] mat
72
+ - [x] op
73
+ - [x] roots
74
+ - [x] sizes
75
+ - [x] styles
76
+ - [x] underover
77
+ - [x] variants
78
+ - [x] vec
79
+ - [x] \换行
80
+ - [x] &
81
+ - [x] Symbols (no emoji)
82
+ - [ ] 变量 (不打算支持)
83
+
84
+ ## 使用(use)
85
+
86
+ ```typescript
87
+ xmmath.toMMLHTML("e^(i pi)=-1"); // 输出html
88
+ ```
89
+
90
+ ```typescript
91
+ xmmath.toMML("e^(i pi)=-1"); // 输出mathml元素
92
+ ```
93
+
94
+ ```typescript
95
+ xmmath.init({
96
+ emoji: true, // 默认false false:🇺🇳=>🇺 🇳 true:性能会降低slow 字符类型(string)不影响
97
+ });
98
+ ```