From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Embedded LaTeX does not work with Unicode quotes Date: Thu, 13 Nov 2014 19:24:49 +0100 Message-ID: <87wq6zot5a.fsf@nicolasgoaziou.fr> References: <877fz1e7s5.fsf@wmi.amu.edu.pl> <87k331j6mr.fsf@pierrot.dokosmarshall.org> <87k3302o1w.fsf@sophokles.streitblatt.de> 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]:57418) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xoz3v-0006PG-0V for emacs-orgmode@gnu.org; Thu, 13 Nov 2014 13:24:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xoz3m-0008Tb-Ia for emacs-orgmode@gnu.org; Thu, 13 Nov 2014 13:24:06 -0500 Received: from relay5-d.mail.gandi.net ([2001:4b98:c:538::197]:46774) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xoz3m-0008TT-Bo for emacs-orgmode@gnu.org; Thu, 13 Nov 2014 13:23:58 -0500 In-Reply-To: <87k3302o1w.fsf@sophokles.streitblatt.de> (Florian Beck's message of "Wed, 12 Nov 2014 20:53:31 +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: Florian Beck Cc: emacs-orgmode@gnu.org Hello, Florian Beck writes: > Nick Dokos writes: > >> "punctuation" in the syntax tables. Look for org-latex-regexps in >> org.el > > The line in question is > > #+BEGIN_SRC emacs-lisp > ("$" "\\([^$]\\|^\\)\\(\\(\\$\\([^ \r\n,;.$][^$\n\r]*?\\(\n[^$\n\r]*?\\)= \\{0,2\\}[^ \r\n,.$]\\)\\$\\)\\)\\([- .,?;:'\")\000]\\|$\\)" 2 nil) > #+END_SRC > > It's probably not too hard to see that the culprit is the bunch of > punctuation characters towards the end. Indeed if you change .,?;:'\" > to .,?;:'\"=E2=80=9D -- that solves the OPs problem. However, it might be= even > better to use a more general syntax, [:punct:], which matches all > punctuation (as we want). So: > > #+BEGIN_SRC emacs-lisp > ("$" "\\([^$]\\|^\\)\\(\\(\\$\\([^ \r\n,;.$][^$\n\r]*?\\(\n[^$\n\r]*?\\)= \\{0,2\\}[^ \r\n,.$]\\)\\$\\)\\)\\([- [:punct:]\000]\\|$\\)" 2 nil) > #+END_SRC Actually this variable is hardly used throughout Org code base. See org-element-latex-fragment-parser instead (which has the same "problem" anyway). Also, according to Elisp manual; [:punct:] is not ideal either: `[:punct:]' This matches any punctuation character. (At present, for multibyte characters, it matches anything that has non-word syntax.) There is also "\s.". Anyway, it might be better to know exactly what kind of false positives we want to avoid. Regards, --=20 Nicolas Goaziou