Kauê da Silva Sena wrote:

> In this section of the AUCTeX manual, it is described how one could customize 
> the highlighting of commands started with a backslash. I'd like, however, to 
> give special highlighting to certain unicode symbols when they are inside a 
> math environment. For example, =,+,×,⊆, ⊂, ∩, ↦, →,≥,≤,≅,≃,∀,∃,∈,∑. I use 
> those with XeLaTeX and have a method for directly inputting them.

Just adding keywords is not so difficult. However, I do not know how
to restrict keywords
to the math environment.

(defconst my-special-face
  '(:foreground "blue"
    :background "cornsilk"))

(font-lock-add-keywords
 'latex-mode
 '(("[≤≥×≅]" . font-lock-warning-face)
   ("[∑∩]" . my-special-face)))

Kind regards
Andreas

Reply via email to