From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: Bug: parsing latex ``$\mathit{math}$'' in export [9.0.5 (release_9.0.5-474-g942b62 @ /home/joe/org-mode/lisp/)] Date: Fri, 12 May 2017 19:57:53 +0100 Message-ID: <87zieh7vim.fsf@t3610> References: <87inl619bg.fsf@gmail.com> <874lwq13xo.fsf@nicolasgoaziou.fr> <108e9a8cdc924e71afc3324c4bd4d1eb@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> Reply-To: Eric S Fraga Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33473) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d9FlT-00059h-IJ for emacs-orgmode@gnu.org; Fri, 12 May 2017 14:58:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d9FlP-0008MI-Ls for emacs-orgmode@gnu.org; Fri, 12 May 2017 14:58:11 -0400 Received: from mail-he1eur01on0127.outbound.protection.outlook.com ([104.47.0.127]:12064 helo=EUR01-HE1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d9FlP-0008LW-8x for emacs-orgmode@gnu.org; Fri, 12 May 2017 14:58:07 -0400 In-Reply-To: <108e9a8cdc924e71afc3324c4bd4d1eb@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> (Joe Corneli's message of "Fri, 12 May 2017 18:06:44 +0000") 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: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain On Friday, 12 May 2017 at 18:06, Joe Corneli wrote: > On Fri, May 12, 2017 at 4:37 PM, Nicolas Goaziou wrote: > > >> I'm not convinced it is worth changing the syntax class of "'" or even >> making a special case for "'". You can get rid of this problem using >> \(P\) instead. > > Thanks for suggesting this work around, I didn't know that bit of syntax! And if typing $...$ is hardwired, as it is for me, or because it's easier to type than the alternative, you can use this code snippet to change a $ when typed on the fly to \(..\): #+begin_src emacs-lisp ;; from Nicolas Richard ;; Date: Fri, 8 Mar 2013 16:23:02 +0100 ;; Message-ID: <87vc913oh5.fsf@yahoo.fr> (defun yf/org-electric-dollar nil "When called once, insert \\(\\) and leave point in between. When called twice, replace the previously inserted \\(\\) by one $." (interactive) (if (and (looking-at "\\\\)") (looking-back "\\\\(")) (progn (delete-char 2) (delete-char -2) (insert "$")) (insert "\\(\\)") (backward-char 2))) (define-key org-mode-map (kbd "$") 'yf/org-electric-dollar) #+end_src -- : Eric S Fraga (0xFFFCF67D), Emacs 26.0.50, Org release_9.0.6-425-gf4fca1 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQSPXCedOQfhSlwpVw3IkZPY//z2fQUCWRYFsQAKCRDIkZPY//z2 fa/aAKCaihlQJwAZyXk3aycP7nIsUFV10ACcDY1rlHPouhiV7eC99r/Zf0r9MGY= =i1Wr -----END PGP SIGNATURE----- --=-=-=--