summaryrefslogtreecommitdiff
path: root/tests/test-kitty-gfx.org
diff options
context:
space:
mode:
authorcashmere <cashmere@autistici.org>2026-02-26 10:18:42 +0100
committercashmere <cashmere@autistici.org>2026-02-26 10:18:42 +0100
commitb60fcceb5be147e7ec6237935aed8e5879fd1f75 (patch)
tree53273009111b800dc392ad6d0d53bf3a7c2df803 /tests/test-kitty-gfx.org
parentb2398257cd020ba4ce00a44cf30c0cd362a067b6 (diff)
downloadkitty-graphics-b60fcceb5be147e7ec6237935aed8e5879fd1f75.tar.gz
feat: add LaTeX fragment preview in org-mode via Kitty graphics
C-c C-x C-l now renders LaTeX fragments as images in terminal Emacs. Bypasses org's display-graphic-p guard since the latex+dvipng pipeline works fine without a GUI. - Advise org-latex-preview to handle terminal color fallbacks (unspecified-fg -> Black) and suppress clear-image-cache - Advise org--make-preview-overlay to display generated PNGs via kitty-gfx-display-image instead of Emacs image specs - Add kitty-gfx--org-clear-latex-preview for C-u cleanup - Add LaTeX test fragments to test-kitty-gfx.org
Diffstat (limited to 'tests/test-kitty-gfx.org')
-rw-r--r--tests/test-kitty-gfx.org12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test-kitty-gfx.org b/tests/test-kitty-gfx.org
index 4b34193..5d746ea 100644
--- a/tests/test-kitty-gfx.org
+++ b/tests/test-kitty-gfx.org
@@ -27,4 +27,16 @@ Line 10
[[./test-image.png]]
+* LaTeX fragment preview test
+
+Inline math: $E = mc^2$
+
+Display math:
+
+\begin{equation}
+\int_0^\infty e^{-x^2} dx = \frac{\sqrt{\pi}}{2}
+\end{equation}
+
+Another inline: $\sum_{i=1}^{n} i = \frac{n(n+1)}{2}$
+
End of test file.