When I create a new environment via the \newenvironment-Command, AUCTeX automatically detects it and when I type C-c C-e the new environment is suggested and when I chose it, it asks for the right number of arguments. On the other hand, when I create a new environment via \newtcbtheorem this does not happen. How can I make AUCTeX also detect this automatically, such that by creating a new theorem it also asks for the right number of arguments?

P.S. Is this the right place to ask, or should I also ask this on tex-Stackexchange? What is the right place for such interdisciplinary questions, concerning multiple Stackexchanges?

1 Answer 1


I also think the ability to parse a .tex document and cater for completion of newly defined macros and/or environments is one of AUCTeX's bigger advantages. But it also needs to write some lisp code in order to extend AUCTeX's parser. Things are even a little more complicated for the different libraries provided by the tcolorbox package.

I have added a style file to AUCTeX for the theorems library which will be available then with the next release of AUCTeX.

Reg. P.S.: I think there is no big difference between tex-sx or emacs-sx reg. AUCTeX questions, so you can probably take one of them. But for these kind of requests, you better drop a line to the developer list.

  • Wow! I did not expect this kind of reply! Thank you very much!
    – Sinthoras
    Commented Aug 28, 2022 at 20:21
  • Do you have an idea, for which reasons it could be not working? I have AUCTeX 13.1.4 installed and still the same behavior as in the question. (That my theorems, defined with \newtcbtheorem are not displayed on pressing C-c C-e)
    – Sinthoras
    Commented Oct 12, 2022 at 18:26
  • @Sinthoras - Does it work if you hit C-c C-n and then C-c C-e? Commented Oct 12, 2022 at 19:57
  • Not, it does not.
    – Sinthoras
    Commented Oct 13, 2022 at 13:21

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.