From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Randby Subject: Re: Multiple underscores crash org latex export; other exporters survive Date: Tue, 6 Dec 2016 21:06:47 -0500 Message-ID: <084a9c31-e7b1-72af-8d78-9655dc006d00@gmail.com> References: <49b70a0c-f81b-660b-e2f5-9921ab488d65@gmail.com> <50e77033-c13c-c0be-5d4a-ec5c107e93ae@gmail.com> <87bmwsatox.fsf@nicolasgoaziou.fr> <87mvg8ipmf.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60651) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cERfn-0001Pg-J5 for emacs-orgmode@gnu.org; Tue, 06 Dec 2016 21:10:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cEReW-00011a-9y for emacs-orgmode@gnu.org; Tue, 06 Dec 2016 21:09:31 -0500 Received: from mail-io0-f176.google.com ([209.85.223.176]:34008) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cEReW-0000v4-1T for emacs-orgmode@gnu.org; Tue, 06 Dec 2016 21:08:12 -0500 Received: by mail-io0-f176.google.com with SMTP id c21so632369234ioj.1 for ; Tue, 06 Dec 2016 18:07:50 -0800 (PST) In-Reply-To: <87mvg8ipmf.fsf@nicolasgoaziou.fr> 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: Nicolas Goaziou , emacs-orgmode@gnu.org On 12/06/2016 06:50 PM, Nicolas Goaziou wrote: > Hello, > > Scott Randby writes: > >> I don't think you can blame Org for the crashes you've experienced. Org >> exports the string "a_variable_deleteThisAndItWorks" to >> "a\(_{\text{variable}}_{\text{deleteThisAndItWorks}}\)" which is not a >> valid LaTeX expression. This invalid output is not the fault of Org, it >> is the fault of the input string. Since there are different ways of >> interpreting "a_variable_deleteThisAndItWorks," you have to tell Org >> which interpretation you want it to make when you export to LaTeX. This >> means additional markup of the string is required. >> >> That the exported LaTeX file crashes your installation of pdfTeX (or >> whatever TeX engine you use) when you process it is not the fault of >> Org. The exported LaTeX file contains an invalid LaTeX expression that >> came from a ambiguous string, so pdfTeX shows an error when processing >> the LaTeX file. Using additional markup of the string so that Org >> exports it as a valid LaTeX expression is the solution to the problem. > > Even though the OP used an ambiguous string, I don't think Org should > generate invalid LaTeX. > > I fixed it in maint. Basically, a_b_c is translated as a\(_b\)\(_c\). With this solution, "a" will be exported as text while "b" and "c" will be exported as a single subsrcipt using the math font. I would prefer that a_b_c be translated as \(a_{b_{c}}\). Scott Randby > > Regards, >