When I'm using auctex with emacs to write LaTeX documents, I would like to be able to add a couple more options to the list of environment types that auctex "recognises" and can autocomplete, namely Theorem, Lemma, Proof, itemize* and a couple of others. Which variable to I need to edit? I have played around in customize-apropos LaTeX and auctex, but I haven't found it.

(lisp code snippet to add to my .emacs would be preferred, I don't quite understand the syntax yete)


Have a look at the AUCTeX manual that explains this in some detail. For your case and assuming you do not want to write new style files you would add this code to your ~/.emacs file.

(add-hook 'LaTeX-mode-hook
          (lambda ()
              '("theorem" LaTeX-env-label)
              '("lemma" LaTeX-env-label)
              '("proof" LaTeX-env-label)
              '("itemize" LaTeX-env-label)
              '("a_couple_of_others" LaTeX-env-label))))

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.