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
    Aug 28 at 20:21

Your Answer

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

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