Closed rka97 closed 3 years ago
Thanks for the PR! I didn't know about math-preview and it looks really cool. Unfortunately though, I feel like this PR is outside the scope of org-fragtog
, since it's just supposed to be about automatically toggling org-mode fragments (sorry). That said, I think you can fully replace org's built in fragments with math-preview with:
(defalias #'org-latex-preview #'math-preview-at-point)
(defalias #'org-clear-latex-preview #'math-preview-clear-region)
That way, using the built-in org preview functions will actually call math-preview. I haven't tested it, but I think it should work, and it has the benefit of also working with the built-in C-c C-x C-l binding.
This adds math-preview as a backend instead of the built in org-latex-preview. math-preview is a lot faster than org-latex-preview.