> It worked well all around except for three things: > > 1. I had to set org-latex-preview-precompile to nil to produce the > preview for ~2000 snippets. I got errors in process filters such > as arg-out-of-range, and Emacs completely blocked itself. I can > confirm that mylatexformat is installed
1. Are you using xelatex/lualatex? 2. If yes, precompilation should have turned itself off with a warning. 3. If no, do you mind sharing this file (or a stripped down version you're okay sharing that still has these issues) along with the LaTeX preamble? That would be `org-latex-preview-preamble' and `org-latex-packages-alist'. I would like to reproduce this bug. Previewing 2000 snippets is exactly where the new async/speedy system is expected to shine compared to the old one. > 2. Apparently, org-latex-default-packages-alist no longer contain > asmsymb and asmmath? This change pulled the rug under me since > it took me quite a while to figure out why some of my formulas > were coloured red... `org-latex-default-packages-alist' was modified to omit amsmath and amssymb (among others) in preparation for a conditional export system where required packages will be determined automatically from the buffer text -- i.e. to avoid exactly the kind of headache you encountered. Unfortunately this export system is not part of the patch set yet. > 3. The image sizes of the same latex environment (e.g., \[ \]) is > different for different formulas. I can send a screenshot of > this if required. This is a recent regression. Could you generate png previews by: 1. (setq org-latex-preview-default-process 'dvipng) 2. regenerating previews and checking if this still happens? If these look fine, this is a dvisvgm issue and we will fix it soon. >> If you do come across any issues, please let me know either in a reply here >> or >> the org-mode matrix room. If you could also run >> <https://gist.github.com/karthink/0ac48411a81459c0f3fd7557c4e817db> and >> share the >> diagnostic info, that would be quite helpful. > > If needed, I can do this after reproducing (1). > > BTW, would it possible to arrange other latex environments (\ch{} in my > case) to be previewed as well? Currently, I do \(\ch{}\) but omitting > \( \) would be nice. Previewing unadorned LaTeX macros is officially unsupported but partially supported in practice. If you move the cursor over the \ch{} and call `org-latex-preview' it should be previewed. From that point it should behave like a regular LaTeX fragment. Editing it should cause the preview to be auto-updated (If you are using org-latex-preview-auto-mode). Karthik