[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Highlighting special characters in math environment
From: |
Andreas Matthias |
Subject: |
Re: Highlighting special characters in math environment |
Date: |
Thu, 11 Nov 2021 00:30:25 +0100 |
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