From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Inline LaTeX formulae Date: Sat, 09 May 2015 10:01:21 +0200 Message-ID: <87fv76xjqm.fsf@nicolasgoaziou.fr> References: <876186zsrc.fsf@posteo.de> <874mnqzp4t.fsf@posteo.de> <87wq0mc8bc.fsf@gmx.us> <87vbg5xx4z.fsf@posteo.de> <87bnhwq1ez.fsf@delle7240.chemeng.ucl.ac.uk> <87vbg4gtef.fsf@posteo.de> <87egmsi2ex.fsf@nicolasgoaziou.fr> <87twvmkfsu.fsf@posteo.de> <87vbg2ycgv.fsf@nicolasgoaziou.fr> <87sib6r9kt.fsf@posteo.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]:34440) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yqzfz-0006Pk-Hc for emacs-orgmode@gnu.org; Sat, 09 May 2015 04:00:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yqzfy-00027b-2n for emacs-orgmode@gnu.org; Sat, 09 May 2015 03:59:59 -0400 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:42950) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yqzfx-00026H-T0 for emacs-orgmode@gnu.org; Sat, 09 May 2015 03:59:58 -0400 In-Reply-To: <87sib6r9kt.fsf@posteo.de> (Titus von der Malsburg's message of "Fri, 08 May 2015 15:25:06 -0700") 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: Titus von der Malsburg Cc: emacs-orgmode@gnu.org Titus von der Malsburg writes: > This looks indeed much nicer but it=E2=80=99s not what we want. The Emacs > documentation says: > > =E2=80=98[:punct:]=E2=80=99 > This matches any punctuation character. (At present, for multibyte > characters, it matches anything that has non-word syntax.) > > If this matches any non-word multibyte character, it also matches things > like the multiplication sign along with a lot of other non-punctuation > characters. So if we=E2=80=99d use [:punct:] we would incorrectly detect= a > latex fragment in the following example: > > 50$=3D10$=C3=975 Too bad, then. The current regexp is really ugly. > Fix detection of latex fragments > > * org-element.el (org-element-latex-fragment-parser): > * org.el (org-latex-regexps): Fix the detection of latex > fragments. Uses syntax tables to detect whitespaces and punctuation > marks following the final $ sign. > > In order to qualify as a math delimiter, the final $ sign of a LaTeX > fragment has to be followed by a whitespace or punctuation mark but the > regexp used in the previous code matched only a small number of > punctuation marks and therefore missed some latex fragments. Applied. Thank you. Regards,