From mboxrd@z Thu Jan 1 00:00:00 1970 From: Suvayu Ali Subject: Re: LaTeX math mode and export Date: Sat, 12 Oct 2013 12:56:28 +0200 Message-ID: <20131012105628.GA31274@kuru.dyndns-at-home.com> References: <87d2nb95jm.fsf@gmail.com> <874n8m9azg.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53315) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUwsC-0003wO-P6 for emacs-orgmode@gnu.org; Sat, 12 Oct 2013 06:56:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VUws7-00050C-N1 for emacs-orgmode@gnu.org; Sat, 12 Oct 2013 06:56:40 -0400 Received: from mail-ee0-x22a.google.com ([2a00:1450:4013:c00::22a]:46000) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUws7-0004zZ-Ek for emacs-orgmode@gnu.org; Sat, 12 Oct 2013 06:56:35 -0400 Received: by mail-ee0-f42.google.com with SMTP id b45so2402553eek.15 for ; Sat, 12 Oct 2013 03:56:34 -0700 (PDT) Content-Disposition: inline In-Reply-To: <874n8m9azg.fsf@gmail.com> 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: emacs-orgmode@gnu.org On Sat, Oct 12, 2013 at 09:58:27AM +0200, Nicolas Goaziou wrote: > Fabrice Popineau writes: > > > The problem as I feel it is that \[ \] works sometimes, but not as > > often as with LaTeX, which is disconcerting. > > \[...\] is more limited in Org than in LaTeX, indeed. > > > I know that theparagraph entity in Org mode is different than what it is is > > in LaTeX, but still. > > > > Why \[ ... \] couldn't be handled as if it where \begin{equation} ... > > \end{equation} ? > > Is there any other use of \[ that would prevent its detection ? > > There are two types of structures in Org syntax: inline (i.e. contained > in a paragraph) and not inline. inlined structures always belong to > a non-inlined one. Therefore, the parser always gives precedence to > non-inlined syntax over inlined one. > > Thus, the following example will be a single paragraph with some maths > inside: > > A paragraph with \[1+1=2\] maths. > > But the following one: > > A paragraph > \[1 > + 1 > = 2 > \] > with maths. > > will be a paragraph, a list and another paragraph: "A paragraph\n\[1", > " + 1" and " = 2\n\]\nwith maths." > > If \[...\] constructs were to be changed into non-inlined, the maths > snippet in the first example would not be recognized. > > It is theoretically possible to make "\[...\]" both inline and > non-inline. Though, I have the feeling that it would come with its own > set of problems. A very nice explanation. Thank you. > > Sorry to be such an hassle, but that would help to smooth the conversion of > > previous LaTeX files/users > > to Org. > > I think that a major pitfall for these users is to think that you can > wrap LaTeX syntax in Org structures. Actually, Org only supports > a limited set of LaTeX syntax. If I may, I think these users are better off using some of the Org outside Org libraries. One of Org's goals, with regards to exporters, is to be uniform across all backends so that one can export the same document using multiple backends without major changes. Including more and more LaTeX source deviates from that goal. Hope this helps, -- Suvayu Open source is the future. It sets us free.