emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Embedded LaTeX does not work with Unicode quotes


From: Nicolas Goaziou
Subject: Re: [O] Embedded LaTeX does not work with Unicode quotes
Date: Thu, 13 Nov 2014 19:24:49 +0100

Hello,

Florian Beck <address@hidden> writes:

> Nick Dokos <address@hidden> 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 .,?;:'\"” -- 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,

-- 
Nicolas Goaziou



reply via email to

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