(setq org-highlight-latex-and-related '(latex script entities))
in my emacs config and yet
$..$ that contain more than one symbol aren't highlighted properly:
How to fix?
EDIT: This still does not work for me as of
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.Sign up to join this community
Actually, I experience the same behaviour, even if I choose
native highlight instead of
latex. It seems that it gets confused because in
org-mode you can insert even currency such as $3500 and .12$. So it's difficult to distinguish whether and expression is indeed a latex expression or if it's a text inside two monetary values.
If you are using latex I suggest to use the
\( \) notation, that's why I've never noticed this before.
If you want to dive deep to resolve the issue you can have a look at the function
org-inside-LaTeX-fragment-p and the variable
org-latex-regexps defined in
org.el. Unfortunately it's very complex.