Hello, Carlos Pita <carlosjosep...@gmail.com> writes:
> The behavior of > > (P) previews, > (E) C-c ' editing and > (F) native fontification > > is very inconsistent for latex: > > 1. $xxx$ and $$xxx$$ no (F) no (E) but (P) I guess (E) could be added, we already do this for inline source code, but no one bothered implementing it. > 2. \begin{xxx}...\end{xxx} no (F) but (E) and (P) This is consistent with 1., with the (E) feature. > 3. #+BEGIN_EXPORT latex and #+LATEX no (P) but (E) and (F) This is something entirely different. #+BEGIN_EXPORT latex ... #+END_EXPORT latex, in Org lingo, is not LaTeX #code, but raw text for an export back-end called "latex". There is no guarantee export back-end "latex" correspond to real LaTeX code. You cannot expect the same behavior for apples and oranges, can you? > The lack of features for $$...$$ is more questionable. And you can do > \begin{displaymath}, which is exactly the same, and get (E). A missing feature is still not a bug, i.e., feature requests are not bug reports. > Anyway, if there were an option for long code fragments to be > correctly folded, fontified, edited and previewed I would pay the > price of the "#+BEGIN_EXPORT latex" extra typing. I'm not sure what you mean by "folded". You can see fontification and you can edit #+begin_export latex blocks with <C-c '>. There are not fontified in the Org buffer, but Org only fontifies source blocks. > The only problem is > that previews are not working there. So why not activate previews > inside export environments of latex type to get the full combo? There may not be something to preview in the first place. More precisely, they shouldn't contain something that can be previewed. For that, you can use environments, e.g. \begin{something}...\end{something}. Regards, -- Nicolas Goaziou