Titus von der Malsburg <malsb...@posteo.de> 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. Regards,