top | item 45216665

(no title)

karthink | 5 months ago

> emacs org-mode: There is no live, inline LaTeX preview.

There is, but we haven't managed to merge it into Org mode yet because we (the feature authors) and the Org maintainer have been busy with other things.

Here are some screencasts:

- https://share.karthinks.com/olp-auto-mode-env-1.mp4

- https://share.karthinks.com/olp-auto-mode-inline-1.mp4

Here's a longer explainer (this is part 2/2): https://www.youtube.com/watch?v=u44X_th6_oY

Here are instructions if you want to try the fork of Org mode that provides this feature: https://abode.karthinks.com/org-latex-preview/

discuss

order

quamserena|5 months ago

Thanks! I followed the instructions to install it, they were super straight forward. This is exactly what I was looking for! Some notes:

- FYI there’s a typo in the docs of the sample use-package declaration, should be one dash instead of two in "org-latex-preview--mode”.

- Live preview works for me but only if I first do M-x org-latex-preview, it doesn’t do it automatically. Probably an issue of missing config on my end, but I haven't been able to figure it out yet.

- Unrelated issue is that org-cdlatex isn’t recognizing \begin{array} as math, e.g. it is inserting text mode latex there instead of math mode. No idea here, I don’t think I touched cdlatex from the built-in Doom Emacs version.

Unfortunately I’m out of time to spend configuring emacs… I’ll have to continue using Obsidian for now, but this is really cool! Hopefully I’ll have some time to come back to configuring emacs soon

karthink|5 months ago

> Live preview works for me but only if I first do M-x org-latex-preview, it doesn’t do it automatically.

Not an error on your end. Live previews for _new_ fragments are only supported when entering \[..\] and \(..\) delimiters, and not $..$ and $$..$$. With the latter you'll have to preview it manually once, and live previews will update from then on.

Fixed the typo, thank you for reporting it.