1

In AUCTex there is font-latex-math-face which makes color of string in between $ and $ as green.

Example output:

enter image description here

or:

enter image description here

Is is possible to disable/delete font-latex-math-face, where the green color won't apply?

Could be related to: How to delete a face

1 Answer 1

1

There is no built-in way to enable font lock inside a math environment, but you can prevent AUCTeX from recognizing the dollar as a math delimiter replacing the definition of font-latex-match-dollar-math with

(with-eval-after-load 'font-latex
  (defun font-latex-match-dollar-math (limit)
    nil))
12
  • It made string color in between $$ all white which is now more difficult to read. is it possible to keep the normal coloring
    – alper
    Commented May 13, 2022 at 9:49
  • @alper see updated answer
    – matteol
    Commented May 13, 2022 at 16:50
  • Prefered color is default face I believe , where it also changes coloring text based on the key words like \mathrm should be blue and so on. I have put the color change in my question. Is it possible to keep the original face colors?
    – alper
    Commented May 13, 2022 at 19:14
  • @alper I think now I understand what you asked
    – matteol
    Commented May 14, 2022 at 6:24
  • 1
    tex.stackexchange.com/questions/510/…
    – matteol
    Commented May 17, 2022 at 5:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.