Jean Eid <j...@wlu.ca> writes:

Hi Jean,

> Anyway to turn off the fontification of math within $ signs? I know I
> can change the color  to white but that is not what I want,  I would
> like to  turn it right off.

There is no simple option for it but this seems to work:

--8<---------------cut here---------------start------------->8---
(defun my/font-latex-disable-dollar-math ()
  (cl-flet ((f (lst)
              (seq-filter (lambda (e)
                            (not (eq (car e) #'font-latex-match-dollar-math)))
                          lst)))
    (setq font-latex-keywords-1 (funcall #'f font-latex-keywords-1))
    (setq font-latex-keywords-2 (funcall #'f font-latex-keywords-2))))

(advice-add
 #'font-latex-make-user-keywords
 :after
 #'my/font-latex-disable-dollar-math)
--8<---------------cut here---------------end--------------->8---

Note however, that this will also disable $$...$$.  And since
super/subscript fontification is only performed in regions which are
already identified to be math, that's also disabled.

Bye,
Tassilo

Reply via email to