In orgmode, it is quite useful to view the equations inline. However, sometimes this can take a while to execute. Running org-toggle-latex-fragment
asynchronously would be quite useful. However, most of what I can find about async is about how to execute external commands in an async way. I did try this post (https://emacspeak.blogspot.com/2018/07/using-emacs-threads-to-execute-commands.html?m=1) and emacs-aio (https://github.com/skeeto/emacs-aio) but it did not quite work/ I could not get it to work.
Please let me know if anyone here knows how to execute this function in an async way.
Thank you for your response!
start-process
ormake-process
and do all the work in sentinels or in hooks of such. That is enough for LaTeX fragments.texfrag
completely replaces the LaTeX strategy of orgmode with that one ofpreview-latex
. After installingtexfrag
runM-x texfrag-mode
in the orgmode buffer. You get a TeX menu with most of the menu entries of thePreview
menu of AucTeX. The strategy ofpreview-latex
is different from that one of orgmode.preview-latex
does many steps in a asynchronous way. You can work with Emacs while the overlays for the LaTeX fragments are generated.