Hello,

Timothy <tecos...@gmail.com> writes:

> This time, I'm wanting to be able to use the lovely org latex preview 
> functionality for more than just the default blocks.
> For instance, I'm interested in applying it to mhchem \ce{ … }
> fragments, as well as siunitx \SI{ … }{ … }.

I think you can preview \ce{...} just fine, with appropriate LaTeX
headers.

> I thought modifying org-latex-regexps may do the trick, yet despite
> trying a few different things, I was confused when unable to get it to
> work. It looks like I'm being confounded by the fact that
> org-format-latex doesn't even reference org-latex-regexps, and instead
> uses it's own hard-coded regexps.
> Hopefully it may be possible to tweak this so that once can preview
> more than just the defaults hardcoded into org-format-latex.

This should not be possible. Org cannot recognize all LaTeX syntax. If
you cannot preview it, Org does not understand it. IOW, it would be
a poor experience if you preview something that doesn't exist, e.g.,
upon exporting the document.

OTOH, nothing prevents an external library to allow previewing any LaTeX
code (probably re-using AucTeX facilities).

Regards,

-- 
Nicolas Goaziou

Reply via email to