Hi Ihor, > As discussed during the meetup, let's try to get things moving faster. > > We have discussed two options (that I recall): > 1. You can try to finalize the unpublished blog post describing how the > preview system works and I will then work from there reviewing the > code
I've updated the manual sections for org-latex-preview on Teco's branch -- dev branch at https://code.tecosaur.net/tec/org-mode.git, in commit 2a18b4014cd1fec5730e7fdf7591b0ad2ceb5691. You can check out the branch and build it to read the updated manual. As discussed, this is probably the best starting point for understanding what options are available. The blog post is about the architecture of the code and hopefully a secondary concern right now. > 2. You can post one single problem/breaking change that you believe > require discussion. We can then focus on that problem itself and move > step by step. Sure, there are several, I'll focus on just one here. org-latex-preview does not support the :matchers field in org-latex-preview-appearance-options (previously org-format-latex-options). That is, it is not possible to preview only certain kinds of LaTeX math delimiters. Adding this is a fair bit of work, and I'm not sure it's necessary? Note that :matchers is still used for creating font-lock rules in org-compute-latex-and-related-regexp, what's missing is selective LaTeX preview support only. On a related note, auto/live-previews of LaTeX fragments does not preview $...$ and $$...$$ fragments as you type. This is independent of the specification in matchers. We track insertions for auto-previews using after-change-functions, and the logic needs to be very fast -- we perform a fast, "inner" heuristic check with possible false positives before we call the "outer", exact org-element-type check. We couldn't make recognizing $...$ delimiters as you type fast enough to never block Emacs. Again, this paragraph is about auto/live-previews only, as activated by org-latex-preview-auto-mode. Karthik