emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using org-latex-preview in other major modes


From: Tony Zorman
Subject: Re: Using org-latex-preview in other major modes
Date: Sun, 21 Apr 2024 21:10:53 +0200
User-agent: Notmuch/0.38.3, Emacs 30.0.50

On Tue, Apr 09 2024 22:06, Tony Zorman wrote:
> As a very brief summary, one currently needs to—in addition to supplying
> a preamble and a way to recognise maths and environments—patch the
> following functions:
>
>   · org-latex-preview--place-from-elements
>   · org-latex-preview-auto--regenerate-overlay 
>   · org-latex-preview-auto--maybe-track-element-here
>   · org-latex-preview-live--ensure-overlay
>
> The last two are only needed for the "live" part of the live previews to
> work.
>
> I will clean the code up a little bit (hopefully by the weekend, but no
> promises),

Whoops!

Anyways, before I put this off for much longer, there is some more code
attached. Live previews (and general environments) work now, and besides
the above mentioned points there were no new surprises waiting—at least
for getting the basic functionality to work.

I did notice that precompilation being a bit flaky. In the end, this was
the result of importing local packages; with the precompilation
happening somewhere in /tmp/, access to these files wasn't given. I
haven't looked too closely into this—and it's probably a use-case that's
specific to LaTeX-mode—but it seems worth considering (lots of people
carry one big style file around that they include in all of their
projects).

  Tony

Attachment: latex-latex-preview.el
Description: application/emacs-lisp

-- 
Tony Zorman | https://tony-zorman.com/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]