0

In LaTeX I use a number of custom commands for which I created a keyword highlight in init.el. For example, I have a command to write argmax/argmin and therefore I have the following in in my init.el

;; latex :: custom keywords highlight (setq font-latex-match-reference-keywords '(("argmax" "[{") ("argmin" "[{") )) 

I also use custom commands that use a prefix or a suffix word, e.g. \figref, \tabref, \algoref, etc. Is there any simple way to construct a keyword highlight so that any command that finish with ref is highlighted?

1 Answer 1

0

it looks like that variable does not support regexp patterns, only the list of keywords. I guess you have to list them all if you use that variable. Otherwise you have to do your own font-lock mechanism.

1
  • "\<[a-zA-Z]+ref\>" does not seem to work. Commented Feb 21, 2022 at 16:26

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.