0

I'd like to have certain math symbols highlighted. I checked AUCTeX manual but there does not seem to be a built-in way to do that. They are not folded forms or anything, but the real glyphs, which I use with xelatex. For example, I'd like to highlight the unicode characters =,+,×,⊆, ⊂, ∩, ↦, →,≥,≤,≅,≃,∀,∃,∈, etc. But I'd like that to happen only inside a math, not if the characters appear in text mode.

This section of AUCTeX's manual talks only about adding custom keywords started with a backslash.

6
  • Please make clear what kind of highlighting you want/need. You added tag syntax-highlighting - is that what you need? Do you want font-lock highlighting, or do you just want to highlight those chars?
    – Drew
    Nov 10, 2021 at 20:50
  • @Drew I'd like syntax hilighting.
    – Tera
    Nov 10, 2021 at 21:42
  • Then define font-lock-keywords (via font-lock-add-keywords or font-lock-defaults), to specify those chars within a "math" context (only). See the Elisp manual, node Font Lock Mode and its subnodes.
    – Drew
    Nov 10, 2021 at 23:12
  • Thanks. I'll have a look at that.
    – Tera
    Nov 10, 2021 at 23:49
  • 1
    @Lindydancer It does seem to require an effort. Thank you for your suggestions. I'll have a look at your packages too.
    – Tera
    Nov 12, 2021 at 12:25

0

Your Answer

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