From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] curly nested latex fragments Date: Sun, 29 Jun 2014 15:53:47 +0200 Message-ID: <87simng6tw.fsf@nicolasgoaziou.fr> References: <86simqocpz.fsf@moguhome00.in.awa.tohoku.ac.jp> <878uoiy3bd.fsf@nicolasgoaziou.fr> <86pphshr82.fsf_-_@moguhome00.in.awa.tohoku.ac.jp> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33845) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1FXi-0000U7-8g for emacs-orgmode@gnu.org; Sun, 29 Jun 2014 09:53:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X1FXZ-0003zf-BM for emacs-orgmode@gnu.org; Sun, 29 Jun 2014 09:53:18 -0400 Received: from relay5-d.mail.gandi.net ([2001:4b98:c:538::197]:54377) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1FXZ-0003zV-5G for emacs-orgmode@gnu.org; Sun, 29 Jun 2014 09:53:09 -0400 In-Reply-To: <86pphshr82.fsf_-_@moguhome00.in.awa.tohoku.ac.jp> (heroxbd@gentoo.org's message of "Sun, 29 Jun 2014 20:47:57 +0900") 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: heroxbd@gentoo.org Cc: emacs-orgmode@gnu.org Hello, heroxbd@gentoo.org writes: > Nesting braces is already implemented in the classic org-latex.el[1], > and is forward ported into org-element.el. Thanks for your patch. I think you are misunderstanding something. I didn't port this limitation in Org 8. AFAIK it has been there for a long time. See `org-inside-latex-macro-p' for example. The main problem with Org < 8 is that every exporter implemented its own parser for the Org buffer. As you can see, "org-latex.el" was in contradiction with "org.el". > Would you like to take a look at the attached patch? Thanks. I do not mind extending syntax for LaTeX macros a bit if it helps users, but first, I would like a clear definition of what subset of macros should be supported in Org. See, for example, http://orgmode.org/worg/dev/org-syntax.html#Entities_and_LaTeX_Fragments Also, I do not want to add constructs like "\\(?:<[^<>\n]*>\\)*" in this definition, as this isn't supported even in `TeX-find-macro-end-helper' (from auctex), which I consider as a reference for macro syntax (i.e. we shouldn't support more than what is supports). Eventually, please note that this imply to change not only "org-element.el", but also "org.el" and possibly other parts where the limitation is encoded. But first, we need to agree on what exactly a valid a LaTeX macro is in Org. > If \ce{^2H} works as above, it is not a problem for me. Although make > it configurable is more user-friendly; "^:{}" is already there afterall, > adding another style feels natural. It's not about adding another style. "^:{}" allows less (without changing syntax, because the limitation is done at the export level), you want to allow more, which implies to change syntax. I don't want the latter to be configurable. I explained in this thread why it wasn't possible, for the time being, to allow a blank character before sub or superscript. This was discussed on this ML, you may want to search archives. Regards, -- Nicolas Goaziou