emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Bug: Add option to fontify latex blocks [9.1.9 (release_9.1.9-65


From: Nicolas Goaziou
Subject: Re: [O] Bug: Add option to fontify latex blocks [9.1.9 (release_9.1.9-65-g5e4542 @ /home/carlos/local/stow/emacs-26/share/emacs/26.1.50/lisp/org/)]
Date: Wed, 28 Nov 2018 11:57:35 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Hello,

Carlos Pita <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]