From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: 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 Message-ID: <87d0qpsc4g.fsf@nicolasgoaziou.fr> References: <87h8g2kv81.fsf@gmail.com> <87lg5ershk.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35942) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRxWo-0007tX-Ag for emacs-orgmode@gnu.org; Wed, 28 Nov 2018 05:57:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gRxWj-0003Lx-EW for emacs-orgmode@gnu.org; Wed, 28 Nov 2018 05:57:09 -0500 Received: from relay10.mail.gandi.net ([217.70.178.230]:52635) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gRxWh-0003KG-Vt for emacs-orgmode@gnu.org; Wed, 28 Nov 2018 05:57:04 -0500 In-Reply-To: (Carlos Pita's message of "Tue, 27 Nov 2018 21:14:22 -0300") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Carlos Pita Cc: emacs-orgmode@gnu.org Hello, Carlos Pita 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 . 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