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: Sun, 04 Dec 2016 11:13:02 +0100 Message-ID: <87bmwsatox.fsf@nicolasgoaziou.fr> References: <49b70a0c-f81b-660b-e2f5-9921ab488d65@gmail.com> <50e77033-c13c-c0be-5d4a-ec5c107e93ae@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37530) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cDTnD-00025L-Qs for emacs-orgmode@gnu.org; Sun, 04 Dec 2016 05:13:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cDTnA-0002oa-Nk for emacs-orgmode@gnu.org; Sun, 04 Dec 2016 05:13:11 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:36797) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cDTnA-0002nA-Gk for emacs-orgmode@gnu.org; Sun, 04 Dec 2016 05:13:08 -0500 In-Reply-To: <50e77033-c13c-c0be-5d4a-ec5c107e93ae@gmail.com> (Scott Randby's message of "Sat, 3 Dec 2016 23:53:38 -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, "Charles C. Berry" Hello, Scott Randby writes: > There is an interesting issue here. I sometimes want to use ~ in a code > snippet, so I can't use ~code snippet~. Yet, Indeed, this was discussed in this ML. We need some escape character in Org. A general escape character is a bit ambitious, and not necessarily useful, but we could introduce one specifically for verbatim and code markers, much like in macros and verbatim blocks, e.g. ~some\~code\=with special\\ characters~ There is a design decision involved: what character can be escaped? It could be anything, or limit to "~" for code and "=" for verbatim markers. For example macros limit escape-able characters to "," and "\". This makes the contents easier to read, but the rule is inconsistent. Thoughts? > Org code: \verb@a_variable_deleteThisAndItWorks@ > > Exported LaTeX: \verb@a\(_{\text{variable}}_{\text{deleteThisAndItWorks}}\)@ > > The exported LaTeX is not what we want. Instead, > > Org code: #+latex:\verb@a_variable_deleteThisAndItWorks@ > > Alternative: @@latex:\verb@a_variable_deleteThisAndItWorks@@@ > > Exported LaTeX: \verb@a_variable_deleteThisAndItWorks@ > > I've wondered why \verb isn't exported correctly without specifying it > as literal LaTeX, It's because Org recognize LaTeX commands only if they are followed by a blank character, the end of buffer, or "{}", which is not the case with \verb@...@. Regards, -- Nicolas Goaziou