From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: [PATCH] Distinguish = and ~ delimiters in LaTeX export Date: Sun, 30 Jan 2011 16:30:38 +0100 Message-ID: References: <7D426067-ED81-42E7-B517-29F06F35EB8F@tsdye.com> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=33059 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PjZEm-0005iG-48 for emacs-orgmode@gnu.org; Sun, 30 Jan 2011 10:30:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PjZEk-0002ju-VP for emacs-orgmode@gnu.org; Sun, 30 Jan 2011 10:30:47 -0500 Received: from mail-fx0-f41.google.com ([209.85.161.41]:50065) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PjZEk-0002jf-Qc for emacs-orgmode@gnu.org; Sun, 30 Jan 2011 10:30:46 -0500 Received: by fxm12 with SMTP id 12so5758433fxm.0 for ; Sun, 30 Jan 2011 07:30:46 -0800 (PST) In-Reply-To: <7D426067-ED81-42E7-B517-29F06F35EB8F@tsdye.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "Thomas S. Dye" Cc: Org Mode Aloha Tom, On Jan 29, 2011, at 7:40 PM, Thomas S. Dye wrote: > Aloha all, > > The default value of org-export-latex-emphasis-alist treats the = > and ~ delimiters as \\verb. Both settings are ignored because org- > export-latex-use-verb is nil by default. The = and ~ delimiters > produce \texttt{} instead of \verb. This patch distinguishes = and > ~ by changing the default for = to \\texttt{%s}. > > The docstring has also been changed to refer to org-export-latex-use- > verb. > > With this patch, users exporting to LaTeX will be able to use = for > \texttt text in LaTeX moving environments and ~ for \verb text in > places where it is safe to use this construct. This is a pretty good patch, but I think we should still modify it. Org users traditionally use =stuff= to mark code pieces, and I think it is still important to escape special characters like ^ and ~ and others. The modified patch below does the following: - Like your patch, it makes Org use \\verb for the ~...~ emphasis. - For =...= emphasis, it uses a new keyword \\protectedtexttt. This will protect special characters and then do texttt. And I have extended the protection to include multiple hyphens by converting "--" to "-{}-". Do you agree with this solution? - Carsten > > Tom > > <0001-Changed-org-export-latex-emphasis-alist-to-distingui.patch> > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode