Commit 13b8307

HPCesia <me@hpcesia.com>
2026-02-03 11:56:13
MathML support using akida/mathyml
1 parent 1729135
Changed files (3)
src
contents
_lib
posts
src/contents/_lib/lib.typ
@@ -0,0 +1,9 @@
+#import "mathyml/src/lib.typ" as mathyml
+
+#import mathyml: to-mathml
+#import mathyml.prelude: *
+
+#let post-template(body) = {
+  show math.equation: to-mathml
+  body
+}
src/contents/posts/test.typ
@@ -1,3 +1,6 @@
+#import "../_lib/lib.typ":*
+#show: post-template
+
 #metadata(
   (
     title: "Test page",
@@ -11,7 +14,7 @@
   )
 )<frontmatter>
 
-This _Is_ *A* _*TEST*_ Page.
+// ======================================
 
 == Equations
 
@@ -19,9 +22,6 @@ Some equations here: $E = m c^2$
 
 $ integral_(0)^(+infinity) (ln x) / (x^2 - 1) dif x = 1/2integral_(x > 0) integral_(y>0) (dif x dif y) / ((1+y)(1+x^2 y)) = pi^2 / 4. $
 
-#text(fill:red)[*TODO: *] Solve math equations render.
-Two method: `#html.frame` or #link("https://codeberg.org/akida/mathyml")[#underline[mathyml]]
-
 == Plain Text
 
 Some random text#footnote[A footnote here.]:
.gitmodules
@@ -0,0 +1,3 @@
+[submodule "src/contents/_lib/mathyml"]
+	path = src/contents/_lib/mathyml
+	url = https://codeberg.org/akida/mathyml.git