On Thu, Apr 03 2025, Ihor Radchenko <yanta...@posteo.net> wrote:

> Karthik Chikmagalur <karthikchikmaga...@gmail.com> writes:
>
>> For org-latex-preview, one of the other things we tried was to keep all
>> utf-8 font-related settings out of the header that is precompiled.  If
>> we manage this precompilation can work (somewhat unreliably) with
>> lualatex, and previews are a bit faster.  But doing this via string
>> matching is difficult and fragile.  And even with precompilation,
>> lualatex has a slow startup time, and we are some distance away from < 1
>> sec preview updates.
>
> I am wondering if the current design with many previews generated using
> the same latex process can be extended. May we somehow add a Lua code to
> preview.sty that will not exit at all and watch for new .tex fragments
> to appear and preview them. The idea is to avoid stopping lualatex
> process most of the time (unless preamble has to be changed) and make it
> work like a server. That may bring the preview speed to acceptable levels.

Do you mean preview.sty from the preview package [1]?

My understanding of this thread on tug.org [2] is that there isn't an
easy way to do what you want from within luatex (and the luatex
developpers are un-interested in speeding up luatex).

I suppose that we could create a stable of luatex processes that are
waiting for input. I don't know if that would speed things up
appreciably, though.

Leo

[1] - https://ctan.org/tex-archive/macros/latex/contrib/preview
[2] - https://tug.org/pipermail/luatex/2023-December/thread.html#7898

Reply via email to