From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aaron Ecay Subject: Re: [PATCH] Protect active characters such as `~' when exporting to LaTeX Date: Fri, 16 Jan 2015 12:12:58 -0500 Message-ID: <87oapyk5t1.fsf@gmail.com> References: <86vbk63h7q.fsf@example.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40925) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YCASJ-0007RH-8O for emacs-orgmode@gnu.org; Fri, 16 Jan 2015 12:13:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YCASD-0000zk-Qi for emacs-orgmode@gnu.org; Fri, 16 Jan 2015 12:13:07 -0500 Received: from mail-qg0-x230.google.com ([2607:f8b0:400d:c04::230]:60770) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YCASD-0000xs-N3 for emacs-orgmode@gnu.org; Fri, 16 Jan 2015 12:13:01 -0500 Received: by mail-qg0-f48.google.com with SMTP id j5so17226924qga.7 for ; Fri, 16 Jan 2015 09:13:01 -0800 (PST) In-Reply-To: <86vbk63h7q.fsf@example.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: Sebastien Vauban , emacs-orgmode@gnu.org Hi Sebastien, 2015ko urtarrilak 16an, Sebastien Vauban-ek idatzi zuen: >=20 > Hello, >=20 > When ~code~ is converted to LaTeX, it becomes \verb~code~; i.e., it uses > a potentially "dangerous" character, in this case `~' which is active. >=20 > In most cases, it is unnoticeable, but in some environments, it breaks. >=20 > The solution is to protect the command, what the attached patch does. If this is the problem, would a simpler solution be to remove ~ (and other special characters, like #^_$) from =E2=80=98org-latex--find-verb-separator= =E2=80=99? But as Nick points out, the problem with \verb is probably deeper. The protectedtexttt case in ox-latex already implements the suggestion from the thread he linked. Perhaps the solution is to change the code entry in =E2=80=98org-latex-text-markup-alist=E2=80=99 to use protectedtexttt and= drop the verb case entirely from =E2=80=98org-latex--text-markup=E2=80=99. What do = you think? Thanks, --=20 Aaron Ecay