>> Q: Why does `org-latex-preview' not work on blocks like:
>>
>> #+begin_export latex
>> \begin{equation}
>> x^2 + y^2 = z^2
>> \end{equation}
>> #+end_export
>>
>> I use these blocks to take advantage of syntax highlighting (and it is
>> quicker to write than not including the export block around the latex).
>>
>> Shouldn't `org-latex-preview' work on such blocks?
>
> Maybe. I do not see why not.
> Karthik, what do you think?

org-latex-preview only previews Org elements of type `latex-fragment' or
`latex-environment'.  Export blocks are not elements of this type, so
they are skipped.  This is consistent with the current behavior of
org-latex-preview.

>> I use these blocks to take advantage of syntax highlighting

For syntax highlighting in LaTeX environments you can use

  (setq org-highlight-latex-and-related '(native))

>> (and it is quicker to write than not including the export block
>> around the latex).

I don't understand how this can be faster if it involves typing more
text.  Could you explain?

Karthik

Reply via email to