[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Inline LaTeX formulae

From: Nicolas Goaziou
Subject: Re: [O] Inline LaTeX formulae
Date: Sat, 09 May 2015 10:01:21 +0200

Titus von der Malsburg <address@hidden> writes:

> This looks indeed much nicer but it’s not what we want.  The Emacs
> documentation says:
>   ‘[:punct:]’
>     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’d use [:punct:] we would incorrectly detect a
> latex fragment in the following example:
>   50$=10$×5

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]