From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Otterson Subject: Re: Multiple underscores crash org latex export; other exporters survive Date: Mon, 5 Dec 2016 09:36:26 +0100 Message-ID: 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: multipart/alternative; boundary=001a1145a8366119e10542e53159 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48566) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cDols-0003X2-Ju for emacs-orgmode@gnu.org; Mon, 05 Dec 2016 03:37:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cDolo-0000nV-LY for emacs-orgmode@gnu.org; Mon, 05 Dec 2016 03:37:12 -0500 Received: from mail-wm0-x232.google.com ([2a00:1450:400c:c09::232]:35531) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cDolo-0000nF-9G for emacs-orgmode@gnu.org; Mon, 05 Dec 2016 03:37:08 -0500 Received: by mail-wm0-x232.google.com with SMTP id a197so85262100wmd.0 for ; Mon, 05 Dec 2016 00:37:08 -0800 (PST) In-Reply-To: <87bmwsatox.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: Scott Randby , "Charles C. Berry" , "Emacs-orgmode@gnu.org" --001a1145a8366119e10542e53159 Content-Type: text/plain; charset=UTF-8 Yes, there's a general question of how to escape multiple underscores. But there's a bigger question too: Should an org-doc that runs fine in other exporters cause a messy-to-debug crash when it's exported to Latex? Is that the Pandoc-like behavior that orgmode seems to be aiming for? I love org-mode. For years, I've used it as a project organizer, brainstorming tool, and extremely versatile notekeeper. I've already got a big investment in it, so I'll spend the time to track down this kind of problem. But I'd guess that such unexpected Latex crashes have driven new users back to Word or whatever. On Sun, Dec 4, 2016 at 11:13 AM, Nicolas Goaziou wrote: > 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 > > --001a1145a8366119e10542e53159 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Yes, there's a general question of how to escape multi= ple underscores. =C2=A0

But there's a bigger questio= n too: =C2=A0Should an org-doc that runs fine in other exporters cause a me= ssy-to-debug crash when it's exported to Latex?=C2=A0 Is that the Pando= c-like behavior that orgmode seems to be aiming for?

I love org-mode.=C2=A0 For years, I've used it as a project organize= r, brainstorming tool, and extremely versatile notekeeper.=C2=A0 I've a= lready got a big investment in it, so I'll spend the time to track down= this kind of problem. =C2=A0

But I'd guess th= at such unexpected Latex crashes have driven new users back to Word or what= ever.

= On Sun, Dec 4, 2016 at 11:13 AM, Nicolas Goaziou <mail@nicolasgoaziou= .fr> wrote:
Hello,

Scott Randby <srandby@gmail.com= > writes:

> There is an interesting issue here. I sometimes want to use ~ in a cod= e
> 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.

=C2=A0 ~some\~code\=3Dwith special\\ characters~

There is a design decision involved: what character can be escaped? It
could be anything, or limit to "~" for code and "=3D" f= or verbatim
markers. For example macros limit escape-able characters to "," a= nd "\".
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{deleteThisAndI= tWorks}}\)@
>
> 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 speci= fying it
> as literal LaTeX,

It's because Org recognize LaTeX commands only if they are follo= wed by
a blank character, the end of buffer, or "{}", which is not the c= ase
with \verb@...@.

Regards,

--
Nicolas Goaziou


--001a1145a8366119e10542e53159--