You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Very useful package, and clever idea, congratulation!
Here, entering a newline (with the return key, e.g.) often wipes out the formula… But this workflow is often necessary, for example with an align environment. Actually, it seems the problem occurs if the formula contains an empty line.
Just a note: other packages, for example this in orgmode only, work with MathJax. Would that be faster?
The text was updated successfully, but these errors were encountered:
I think the issue you mention is that, as far as I understand, newlines are not supposed to occur in valid math environments. I'm not in the habit of introducing them myself, even in align environments, because I use abbrev expansions that avoid this (see for instance the "nal" and "cal" abbrevs in https://github.com/ultronozm/dynexp.el/blob/main/lisp/dynexp-abbrev.el).
I pushed a commit to czm-preview just now that adds a customization variable czm-preview-accomodate-newlines-in-environments, with default value t, that attempts to address the issue you mention by excising newlines before sending a region to TeX for processing. It seems to work OK (see pic). Please let me know if you have further issues.
I'm not sure what would be fastest. The bottleneck with preview.el (and hence with this package) is how long it takes latex to compile a nearly trivial tex file into a dvi file. It seems that org-latex-preview also uses preview.sty and compilation to dvi/png, so I would have guessed it'd be comparable in speed to preview.el, but there could be other optimizations. On my laptop, the previews generate with this package in about 400 ms on average, which feels very snappy and is good enough for my practical purposes. You could make them ever so slightly snappier by decreasing the customization variable czm-preview-timer-interval (default: 0.3).
Very useful package, and clever idea, congratulation!
Here, entering a newline (with the return key, e.g.) often wipes out the formula… But this workflow is often necessary, for example with an
align
environment. Actually, it seems the problem occurs if the formula contains an empty line.Just a note: other packages, for example this in orgmode only, work with MathJax. Would that be faster?
The text was updated successfully, but these errors were encountered: