Fast Latex previews in Org-mode

This is a post in my Latex editing series, a quick package announcement for better Latex previews.

After complaining the other day about Latex previews in org-mode being unbearably slow, I decided to take a crack at adapting Org-mode to use AucTeX’s preview library, which is blazing fast in comparison:

Direct link to video

It was both easier and more annoying than I expected it to be, but perhaps less annoying on balance than org-latex-preview locking up Emacs for a good minute on every fresh invocation in medium sized documents.

For now the package is available online in its fledgling state. It’s intended for use as a drop-in replacement for org-latex-preview. Turn on org-auctex-mode and use your keybinding for org-latex-preview (or call org-auctex-preview-dwim), and it should use the Auctex-based backend instead. This is very early, everything including the name of the package might change in the future.

Interestingly, there’s very little Org-specific code in there. It should be trivial to extend the preview library to work in Markdown and other text buffers.