[Top][All Lists]

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

Re: Fontification of $ sign

From: Tassilo Horn
Subject: Re: Fontification of $ sign
Date: Sat, 16 Sep 2023 12:38:25 +0200
User-agent: mu4e 1.11.17; emacs 30.0.50

Jean Eid <> 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)))
    (setq font-latex-keywords-1 (funcall #'f font-latex-keywords-1))
    (setq font-latex-keywords-2 (funcall #'f font-latex-keywords-2))))

--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.


reply via email to

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