Skip to content

Commit bf9324b

Browse files
committed
Make math work
1 parent 396e868 commit bf9324b

File tree

4 files changed

+23
-34
lines changed

4 files changed

+23
-34
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@
4343
"eslint-config-tyler": "^0.1.7",
4444
"github-markdown-css": "^5.7.0",
4545
"globals": "^15.11.0",
46+
"katex": "^0.16.11",
4647
"localforage": "^1.10.0",
4748
"manate": "^0.9.8",
48-
"markdown-extensible": "^0.1.9",
49+
"markdown-extensible": "^0.2.0",
4950
"parcel": "^2.12.0",
5051
"parcel-namer-hashless": "^1.0.6",
5152
"path-browserify": "^1.0.1",

src/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<title>Markdown Plus</title>
77
<link rel="icon" type="image/svg+xml" href="icon.svg" />
88
<link rel="stylesheet" href="index.css" />
9+
<link rel="stylesheet" href="../node_modules/katex/dist/katex.css" />
910
<link
1011
rel="stylesheet"
1112
href="../node_modules/@fortawesome/fontawesome-free/css/all.css"

src/sample.md

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,11 @@ note.]
120120

121121
## Mathematical formula
122122

123-
Inline math: `$\dfrac{ \tfrac{1}{2}[1-(\tfrac{1}{2})^n] }{ 1-\tfrac{1}{2} } = s_n$`.
123+
Inline math: `$\dfrac{ \tfrac{1}{2}[1-(\tfrac{1}{2})^n] }{ 1-\tfrac{1}{2} } = s_n$`
124124

125125
Math block:
126126

127-
```katex
127+
```math
128128
\oint_C x^3\, dx + 4y^2\, dy
129129
130130
2 = \left(
@@ -143,27 +143,6 @@ Math block:
143143

144144
[Mathematical Formula Syntax](https://www.mediawiki.org/wiki/Extension:Math/Syntax)
145145

146-
## AsciiMath
147-
148-
Inline AsciiMath: `@(1/2[1-(1/2)^n])/(1-(1/2))=s_n@`
149-
150-
```AsciiMath
151-
oint_Cx^3 dx+4y^2 dy
152-
153-
2=(((3-x)xx2)/(3-x))
154-
155-
sum_(m=1)^oosum_(n=1)^oo(m^2 n)/(3^m(m3^n+n3^m)
156-
```
157-
158-
```ASCIIMath
159-
phi_n(kappa) = 1/(4pi^2 kappa^2)
160-
int_0^oo (sin(kappa R))/(kappa R)
161-
del/(del R)
162-
[R^2 (del D_n (R))/(del R)] del R
163-
```
164-
165-
[AsciiMath Documentation](https://asciimath.org/)
166-
167146
## Mermaid charts
168147

169148
### Flowchart

yarn.lock

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2107,6 +2107,11 @@ commander@^7.0.0, commander@^7.2.0:
21072107
resolved "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7"
21082108
integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==
21092109

2110+
commander@^8.3.0:
2111+
version "8.3.0"
2112+
resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66"
2113+
integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==
2114+
21102115
compute-scroll-into-view@^3.0.2:
21112116
version "3.1.0"
21122117
resolved "https://registry.yarnpkg.com/compute-scroll-into-view/-/compute-scroll-into-view-3.1.0.tgz#753f11d972596558d8fe7c6bcbc8497690ab4c87"
@@ -3254,6 +3259,13 @@ json5@^2.2.0, json5@^2.2.1, json5@^2.2.3:
32543259
object.assign "^4.1.4"
32553260
object.values "^1.1.6"
32563261

3262+
katex@^0.16.11:
3263+
version "0.16.11"
3264+
resolved "https://registry.yarnpkg.com/katex/-/katex-0.16.11.tgz#4bc84d5584f996abece5f01c6ad11304276a33f5"
3265+
integrity sha512-RQrI8rlHY92OLf3rho/Ts8i/XvjgguEjOkO1BEXcU3N8BqPpSzBNwV/G0Ukr+P/l3ivvJUE/Fa/CwbS6HesGNQ==
3266+
dependencies:
3267+
commander "^8.3.0"
3268+
32573269
keyv@^4.5.4:
32583270
version "4.5.4"
32593271
resolved "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93"
@@ -3412,12 +3424,13 @@ manate@^0.9.8:
34123424
resolved "https://registry.yarnpkg.com/manate/-/manate-0.9.8.tgz#5a2b97f832a36389d7903cadef161692a67ff1b6"
34133425
integrity sha512-kFQ1APK53tG4o07+8SUuJYOzBzYMIwa7FnIN3Z8Czlo9C+g5OJ0RBy9wlV7q8Sw2uUojTfH72y8oSz8G2jFhSA==
34143426

3415-
markdown-extensible@^0.1.9:
3416-
version "0.1.9"
3417-
resolved "https://registry.yarnpkg.com/markdown-extensible/-/markdown-extensible-0.1.9.tgz#3c9c019088b6a1f9faa48bf3dbce586ef21eab9c"
3418-
integrity sha512-QIf+zLi1yTsVhTuNNTC8dsOYrJlN8YujYt5jm0TFlQt9tZF9B5cL6UA1tW9Qo/w25aGzI0zHuHxzUUIGc740mQ==
3427+
markdown-extensible@^0.2.0:
3428+
version "0.2.0"
3429+
resolved "https://registry.yarnpkg.com/markdown-extensible/-/markdown-extensible-0.2.0.tgz#c8aac398567b4e8079cf8675d762a1f8a18a4b6f"
3430+
integrity sha512-MXbRNofRu2hnqKarWSUB/vePgWGYRUbkpGHZOelLY9vyPqERbKDixYFIgwiBMIy+gzrKNGk2ICNdZSvpEaqSkQ==
34193431
dependencies:
34203432
"@sindresorhus/slugify" "^2.2.1"
3433+
katex "^0.16.11"
34213434
markdown-it "^14.1.0"
34223435
markdown-it-anchor "^9.2.0"
34233436
markdown-it-cjk-breaks "^2.0.0"
@@ -3853,16 +3866,11 @@ punycode.js@^2.3.1:
38533866
resolved "https://registry.yarnpkg.com/punycode.js/-/punycode.js-2.3.1.tgz#6b53e56ad75588234e79f4affa90972c7dd8cdb7"
38543867
integrity sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==
38553868

3856-
punycode@^2.1.0:
3869+
punycode@^2.1.0, punycode@^2.3.1:
38573870
version "2.3.1"
38583871
resolved "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5"
38593872
integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==
38603873

3861-
punycode@^2.3.1:
3862-
version "2.3.1"
3863-
resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5"
3864-
integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==
3865-
38663874
queue-microtask@^1.2.2:
38673875
version "1.2.3"
38683876
resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243"

0 commit comments

Comments
 (0)