Skip to content

Commit a8dd23d

Browse files
committed
docs: update demo
1 parent 441e958 commit a8dd23d

File tree

6 files changed

+104
-14
lines changed

6 files changed

+104
-14
lines changed

package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,11 @@
2121
".": {
2222
"import": {
2323
"node": "./dist/index.node.mjs",
24-
"default": "./dist/index.mjs",
25-
"types": "./dist/index.d.ts"
24+
"default": "./dist/index.mjs"
2625
},
2726
"require": {
2827
"node": "./dist/index.node.cjs",
29-
"default": "./dist/index.cjs",
30-
"types": "./dist/index.d.ts"
28+
"default": "./dist/index.cjs"
3129
}
3230
},
3331
"./package.json": "./package.json"

tests/screenshots.png

-403 KB
Loading

web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717
},
1818
"dependencies": {
1919
"clsx": "^2.1.1",
20-
"markdown-docx": "^1.3.0"
20+
"markdown-docx": "^1.4.0"
2121
}
2222
}

web/pnpm-lock.yaml

Lines changed: 38 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/src/template.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,52 @@ const buffer = await Packer.toBuffer(doc);
7777
<dd>Does *not* work **very** well. Use HTML <em>tags</em>.</dd>
7878
</dl>
7979

80+
81+
## Math Equations
82+
83+
## Inline Math
84+
85+
You can write inline equations like $E=mc^2$ directly in your text. Here are more examples:
86+
87+
- Einstein's mass-energy equivalence: $E=mc^2$
88+
- Pythagorean theorem: $a^2 + b^2 = c^2$
89+
- Quadratic formula: $x = \frac{-b \pm \sqrt{b^2-4ac}}{2a}$
90+
- Greek letters: $\alpha$, $\beta$, $\gamma$, $\delta$, $\pi$, $\omega$
91+
92+
## Block Math
93+
94+
For display equations, use double dollar signs:
95+
96+
$$
97+
i\hbar\frac{\partial}{\partial t}\Psi(\mathbf{r},t) = -\frac{\hbar^2}{2m}\nabla^2\Psi(\mathbf{r},t) + V(\mathbf{r})\Psi(\mathbf{r},t)
98+
$$
99+
100+
### More Examples
101+
102+
The Pythagorean theorem:
103+
104+
$$
105+
a^2 + b^2 = c^2
106+
$$
107+
108+
Sum of Greek letters:
109+
110+
$$
111+
\alpha + \beta + \gamma = \pi
112+
$$
113+
114+
Inequality:
115+
116+
$$
117+
x \leq y
118+
$$
119+
120+
Mathematical operations:
121+
122+
$$
123+
a \times b \div c \pm d
124+
$$
125+
80126
---
81127

82128
Enjoy!

web/src/zh-template.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,23 @@ const buffer = await Packer.toBuffer(doc);
7575
<dd>*不*能完美支持 **所有** 语法,请使用 HTML <em>标签</em></dd>
7676
</dl>
7777

78+
## 数学公式
79+
80+
### 行内公式
81+
82+
您可以直接在文本中编写行内公式,例如 $E=mc^2$。以下是更多示例:
83+
84+
- Einstein's mass-energy equivalence: $E=mc^2$
85+
- Pythagorean theorem: $a^2 + b^2 = c^2$
86+
- Quadratic formula: $x = \frac{-b \pm \sqrt{b^2-4ac}}{2a}$
87+
- Greek letters: $\alpha$, $\beta$, $\gamma$, $\delta$, $\pi$, $\omega$
88+
89+
### 块级公式
90+
91+
$$
92+
i\hbar\frac{\partial}{\partial t}\Psi(\mathbf{r},t) = -\frac{\hbar^2}{2m}\nabla^2\Psi(\mathbf{r},t) + V(\mathbf{r})\Psi(\mathbf{r},t)
93+
$$
94+
7895
---
7996

8097
祝您使用愉快!

0 commit comments

Comments
 (0)