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.
On 9/16/23 06:38, Tassilo Horn wrote:
Jean Eid <jeid@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
* ⚠ 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.
--
|
Jean Eid (he, him, his) |
|
Associate Professor |
|
Office: +1(548)-889-4620
|
|
75 University Avenue West Waterloo, Ontario, N2L 3C5 |
|
Inspiring Lives
lazaridisschool.ca |
|