Hi Denis,

Denis Bitouzé <[email protected]> writes:

> I have a document with a custom LaTeX class which loads several
> packages. Because these packages aren't explicitly loaded in the
> preamble of the document, the completion of them is, AFAICS, not
> enabled by AUCTeX.
>
> Is there a way to manually enable the completion of these packages?

The easiest way is to write a small AUCTeX style file for your custom
class like this:

--8<---------------cut here---------------start------------->8---
(TeX-add-style-hook
 "name-of-your-custom-class"
 (lambda ()
   ;; Name of the styles you want to load:
   (TeX-run-style-hooks "article" "amsmath" "enumitem"))
 TeX-dialect)
--8<---------------cut here---------------end--------------->8---

Save this snippet as 'name-of-your-custom-class.el' in the directory you
have in `TeX-style-private'.  AUCTeX should load the style next time you
open your .tex file (assuming you have set `TeX-parse-self' to t).

Best, Arash


Reply via email to