Skip to content

Commit 3f8114e

Browse files
authored
feat(image): match latex code tag for math preview (#945)
* feat(image): match latex code tag for math preview * feat(image): match latex code tag for math preview * feat(ts): Match latex_env for image rendering
1 parent 0ebe2e3 commit 3f8114e

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

queries/org/images.scm

+16-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,22 @@
66
(block
77
name: (expr) @name
88
parameter: (expr) @lang
9-
contents: (contents (expr) @image.content)
9+
contents: (contents) @image.content
1010
(#match? @name "(src|SRC)")
11-
(#eq? @lang "math")
11+
(#match? @lang "(math|latex)")
1212
(#set! injection.language "latex")
1313
(#set! image.ext "math.tex"))
14+
15+
16+
(block
17+
name: (expr) @name
18+
contents: (contents) @image.content
19+
(#match? @name "(equation|EQUATION)")
20+
(#set! injection.language "latex")
21+
(#set! image.ext "math.tex"))
22+
23+
(latex_env
24+
(contents) @image.content
25+
(#set! injection.language "latex")
26+
(#set! image.ext "math.tex"))
27+

0 commit comments

Comments
 (0)