@webc.site/math 0.1.1 → 0.1.2
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/README.md +18 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -90,8 +90,11 @@ Depending on your project setup, choose one of the following methods to import t
|
|
|
90
90
|
```javascript
|
|
91
91
|
// Import the bundle (includes Source Han Sans t, monospace c, and math font m)
|
|
92
92
|
import "18s/_.css";
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Or import math font `m` only:
|
|
93
96
|
|
|
94
|
-
|
|
97
|
+
```javascript
|
|
95
98
|
import "18s/m.css";
|
|
96
99
|
```
|
|
97
100
|
|
|
@@ -100,8 +103,11 @@ import "18s/m.css";
|
|
|
100
103
|
```css
|
|
101
104
|
/* Import the bundle (includes Source Han Sans t, monospace c, and math font m) */
|
|
102
105
|
@import "18s/_.css";
|
|
106
|
+
```
|
|
103
107
|
|
|
104
|
-
|
|
108
|
+
Or import math font `m` only:
|
|
109
|
+
|
|
110
|
+
```css
|
|
105
111
|
@import "18s/m.css";
|
|
106
112
|
```
|
|
107
113
|
|
|
@@ -185,7 +191,7 @@ Designed to be extremely lightweight, this library supports the most commonly us
|
|
|
185
191
|
- **Matrices & Multi-line Layouts**:
|
|
186
192
|
- Matrix environments: `matrix`, `pmatrix`, `bmatrix`, `vmatrix`, `Vmatrix` (e.g., `\begin{pmatrix} a & b \\ c & d \end{pmatrix}`)
|
|
187
193
|
- Systems of equations & conditional branches: `cases` (e.g., `\begin{cases} x & x \ge 0 \\ -x & x < 0 \end{cases}`)
|
|
188
|
-
-
|
|
194
|
+
- General-purpose array layouts: `array`
|
|
189
195
|
- Line breaks & alignments: use `\\`, `\\*`, or `\\[width]` (for custom row spacing, e.g. `\\[10px]`) for line breaks, and `&` for column alignments
|
|
190
196
|
|
|
191
197
|
### Unsupported Syntax (Non-Goals)
|
|
@@ -399,6 +405,7 @@ The `18s` project provides a optimized math font `m` (Latin Modern Math, derived
|
|
|
399
405
|
- [功能特性](#功能特性)
|
|
400
406
|
- [支持的语法清单](#支持的语法清单)
|
|
401
407
|
- [什么是 MathML?](#什么是-mathml?)
|
|
408
|
+
- [为什么需要 TeX 公式转 MathML?](#为什么需要-tex-公式转-mathml?)
|
|
402
409
|
- [性能对比](#性能对比)
|
|
403
410
|
- [设计思路与调用流程](#设计思路与调用流程)
|
|
404
411
|
- [如何添加新的语法支持](#如何添加新的语法支持)
|
|
@@ -469,8 +476,11 @@ npm install 18s
|
|
|
469
476
|
```javascript
|
|
470
477
|
// 引入合并后的字体 CSS(包含思源黑体 t、代码字体 c 及数学字体 m)
|
|
471
478
|
import "18s/_.css";
|
|
479
|
+
```
|
|
472
480
|
|
|
473
|
-
|
|
481
|
+
或者仅按需引入数学字体 `m`:
|
|
482
|
+
|
|
483
|
+
```javascript
|
|
474
484
|
import "18s/m.css";
|
|
475
485
|
```
|
|
476
486
|
|
|
@@ -479,8 +489,11 @@ import "18s/m.css";
|
|
|
479
489
|
```css
|
|
480
490
|
/* 引入合并后的字体 CSS(包含思源黑体 t、代码字体 c 及数学字体 m) */
|
|
481
491
|
@import "18s/_.css";
|
|
492
|
+
```
|
|
482
493
|
|
|
483
|
-
|
|
494
|
+
或者仅按需引入数学字体 `m`:
|
|
495
|
+
|
|
496
|
+
```css
|
|
484
497
|
@import "18s/m.css";
|
|
485
498
|
```
|
|
486
499
|
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@webc.site/math","version":"0.1.
|
|
1
|
+
{"name":"@webc.site/math","version":"0.1.2","description":"The world's smallest and fastest web Markdown formula renderer / 全球最小最快的网页Markdown公式渲染器","keywords":["markdown","math","mathml","render","tex"],"homepage":"https://math.webc.site","license":"MulanPSL-2.0","author":"i18n.site@gmail.com","repository":{"type":"git","url":"git+https://github.com/webc-site/math.git"},"type":"module","exports":{".":"./mathml.js","./*":"./*"},"scripts":{"prepare":"husky"},"dependencies":{},"lint-staged":{"**/*.svg":"bun sh/hook/svg.js","**/*.styl":"bun sh/hook/styl.js"}}
|