From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Multiple underscores crash org latex export; other exporters survive Date: Wed, 07 Dec 2016 00:50:32 +0100 Message-ID: <87mvg8ipmf.fsf@nicolasgoaziou.fr> References: <49b70a0c-f81b-660b-e2f5-9921ab488d65@gmail.com> <50e77033-c13c-c0be-5d4a-ec5c107e93ae@gmail.com> <87bmwsatox.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35463) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cEPVM-0004KD-Bv for emacs-orgmode@gnu.org; Tue, 06 Dec 2016 18:50:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cEPVH-0007SA-Bv for emacs-orgmode@gnu.org; Tue, 06 Dec 2016 18:50:36 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:60646) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cEPVH-0007Rr-4B for emacs-orgmode@gnu.org; Tue, 06 Dec 2016 18:50:31 -0500 In-Reply-To: (Scott Randby's message of "Mon, 5 Dec 2016 20:33:57 -0500") 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: Scott Randby Cc: "Emacs-orgmode@gnu.org" , Scott Otterson 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\). Regards, -- Nicolas Goaziou