[Top][All Lists]

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

Re: [EXTERNAL *] Re: Fontification of $ sign

From: Jean Eid
Subject: Re: [EXTERNAL *] Re: Fontification of $ sign
Date: Sat, 16 Sep 2023 23:52:48 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0

Hello Tassilo,

Thanks for this but it does not work for me. I also worked on the code yesterday (for polymode) so the $ sign inside a R code chunks is not the problem. The problem is having the code chunk inside the $ signs.  as this image shows. You see that the first \Rexpr is not a problem but the second one is. The init.el file is very simple just defining these code chunks and loading ess and auctex ( I can send it if need be). I tried it with your code and without, I had the same outcome.

image to show
        fontificxation where when Rexpr is whithin $ signs it bleeds

On 9/16/23 06:38, Tassilo Horn wrote:
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.


* ⚠ Notice: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Lazaridis School of Business and Economics. Jean Eid (he, him, his)

Associate Professor

Office: +1(548)-889-4620

75 University Avenue West Waterloo, Ontario, N2L 3C5

Inspiring Lives

reply via email to

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