|
From: | Kauê da Silva Sena |
Subject: | Re: Highlighting special characters in math environment |
Date: | Wed, 10 Nov 2021 21:00:26 -0300 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |