2

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)

quack quixote
  • 43,504
Seamus
  • 905

1 Answers1

4

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 ()
            (LaTeX-add-environments
              '("theorem" LaTeX-env-label)
              '("lemma" LaTeX-env-label)
              '("proof" LaTeX-env-label)
              '("itemize" LaTeX-env-label)
              '("a_couple_of_others" LaTeX-env-label))))