From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: LaTeX-export: letters after $..$ turn off math-mode Date: Sat, 16 Feb 2013 08:25:58 +0100 Message-ID: <87bobk7m9l.fsf@gmail.com> References: <85272.1359978716@greg-minshalls-mbp.local> <87mwv58c8n.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:53231) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U6cFB-0005am-Me for emacs-orgmode@gnu.org; Sat, 16 Feb 2013 02:31:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U6cFA-0002ok-Bw for emacs-orgmode@gnu.org; Sat, 16 Feb 2013 02:31:33 -0500 Received: from mail-wg0-f43.google.com ([74.125.82.43]:53613) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U6cFA-0002oZ-68 for emacs-orgmode@gnu.org; Sat, 16 Feb 2013 02:31:32 -0500 Received: by mail-wg0-f43.google.com with SMTP id e12so3407395wge.22 for ; Fri, 15 Feb 2013 23:31:31 -0800 (PST) In-Reply-To: <87mwv58c8n.fsf@bzg.ath.cx> (Bastien's message of "Fri, 15 Feb 2013 23:04:56 +0100") 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: Bastien Cc: Greg Minshall , emacs-orgmode@gnu.org Hello, Bastien writes: > Greg Minshall writes: > >> i'd like to plead the case of allowing the user to suppress dollar-sign >> behavior (or, force dollar-signs to mean math-mode). > > I'm attaching a patch that introduces `org-latex-escape-chars' which > would allow you to bind it to something different for each buffer -- > e.g., without the dollar sign. > > Nicolas, let me know if this looks okay for you. I think this solution is not appropriate. Even if you patch latex back-end, the rest of Org still doesn't recognize the construct as a math snippet. So, this would be a mere hack. A correct solution would be to modify `org-latex-regexps' so math snippets can be followed by a letter. But you may find yourself opening a can of worm. Getting there regexps right is difficult, as can probably testify Carsten. IMO, I would call that an Org limitation. Org is not LaTeX, even if it provides many LaTeX facilities. Also, the OP's problem can be solved in many ways under Emacs. For example, I use "mt" (both "m" and "t" are on my home row) as a snippet to insert "\(\)" in an Org buffer and put point inside. Regards, -- Nicolas Goaziou