0

I use emacs + auctex to typeset ConTeXt documents. There are some features in the LaTeX mode that do not transpose into ConTeXt mode, and I would like to make some minor changes. Problem is, I am not a Lisp programmer, and I don't know how much work this represents, and I've already been drowning in the auctex package options and did not succeed.

The main thing is the environment highlighting : in LaTeX mode, the \begin{foo} \end{foo} are highlighted in purple (for the \begin - \end) and blue (for the foo). This contrasts clearly with the rest and makes it highly readable. In ConTeXt mode, the corresponding \startfoo \stopfoo structure is not identified and these keywords are simply typeset in grey (the default color for an unrecognized command).

I hope there is a simple way to make emacs reognize the \startfoo \stopfoo pattern, even if it just highlights the whole thing in purple (I suppose cutting the command between the start and foo parts and highlight them with different colors may not be realy readable).

I guess it already identifies correctly the structure, since the indentation is correctly handled between the commands, and it is "just" a font dictionnary issue... but as I previously said, I am no Lisp expert and this may be a different thing.

Does anyone know how to change this highlighting behavior ? Thank you in advance,

  • I am not an emacs user myself, but have you seen this? Does it give you what you need? On this page you can also read that "The official AUCTeX distribution beginning with 11.50 has ConTeXt support. Berend de Boers ConTeXt mode for Emacs has been merged with the former ConTeXt support in AUCTeX by Patrick Gundlach." – mickep Sep 4 '18 at 16:56
  • I already use some of the definitions of this page in my .emacs, and I just tried again as you suggested, but it doesn't do the trick. I also use auctex version 12.1.1, so I thought these additions were in the auctex extension anyway. – A. Licari Sep 5 '18 at 8:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.