2

Reading the AUCTeX manual I see that it is possible to add expressions to those one wants to highlight in a .tex file. There are also many specific suggestions around for how to add specific commands to the list font-latex-keywords. Now, coming from another editor (ST3) where it seems that the default is to highlight anything starting with \, I wonder whether there's any reason not to do this in Emacs and, if not, exactly how to do it.

(From what I understand, you can't use a regex to specify a list of keywords, is that right?)

1 Answer 1

1

AUCTeX fontifies all control words: For known ones (added in font-latex.el or via AUCTeX style files), it uses different classes (e.g., warning, function, textual etc.) and for unknown ones, it simply uses the font-latex-sedate-face which defaults to Foreground: DimGray. You can customize this face if you want a different appearance. There is no fontification for control symbols.

You can load this file in your Emacs to see some basic ideas behind fontification of general macros in AUCTeX.

1
  • Thanks! I keep forgetting to disable global-hl-line-mode, which makes describe-face less helpful than it should be.
    – apc
    Nov 18, 2019 at 1:51

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.