summaryrefslogtreecommitdiff
path: root/tests/test-typst.typ
diff options
context:
space:
mode:
authorcashmeredev <cashmere@autistici.org>2026-04-26 20:37:15 +0200
committerGitHub <noreply@github.com>2026-04-26 20:37:15 +0200
commit4dfd1df3bc1f936ff7119beceae22b19e0c728d3 (patch)
tree103e8d459f7f3a79dd7985f9b36f8ff263a672ad /tests/test-typst.typ
parent7e4faffa32d6f0ef885fceb0a9ecd93b3fe5c43f (diff)
parentbaa6cf8cc43ce676b806db01e390668dc4aa6790 (diff)
downloadkitty-graphics-4dfd1df3bc1f936ff7119beceae22b19e0c728d3.tar.gz
Merge pull request #8 from cashmeredev/feat/typst-support
feat: add typst inline equation preview
Diffstat (limited to 'tests/test-typst.typ')
-rw-r--r--tests/test-typst.typ31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/test-typst.typ b/tests/test-typst.typ
new file mode 100644
index 0000000..a28fcbf
--- /dev/null
+++ b/tests/test-typst.typ
@@ -0,0 +1,31 @@
+// Test fixture for kitty-graphics.el typst inline equation preview.
+//
+// Usage:
+// TERM=xterm-256color emacs -nw -Q -l kitty-graphics.el \
+// --eval "(kitty-graphics-mode 1)" tests/test-typst.typ
+// M-x kitty-gfx-typst-preview
+// M-x kitty-gfx-typst-clear-preview
+//
+// Inline math fragments below should each be replaced by a rendered
+// PNG overlay. Escaped dollar signs (\$ ... \$) must be ignored.
+
+= Inline samples
+
+Pythagoras: $a^2 + b^2 = c^2$, classic.
+
+Euler: $e^(i pi) + 1 = 0$ -- the famous identity.
+
+Display style with surrounding spaces:
+$ integral_(-oo)^(+oo) e^(-x^2) dif x = sqrt(pi) $
+
+Mixed line: $x = 1$ and $y = 2$ on the same line.
+
+Escaped dollar signs should be skipped: \$not math\$ here.
+
+= Edge cases
+
+Sum: $sum_(k=0)^n binom(n, k) = 2^n$.
+
+Matrix: $mat(1, 2; 3, 4)$.
+
+Greek: $alpha + beta = gamma$.