I did some online research (e.g. here) but couldn't figure out how to solve the following problem so far (of course, I might have overlooked something since the whole emacs community is new to me).
For my daily work I will use the editor mainly to edit LaTeX documents, thus, I'm trying to set it up properly.
Most of my own .sty
and .csl
files rely heavily on LaTeX3. To get it going I have to load the specific packages with \usepackage
and afterwards parse the document with ctrl+c ctrl+n. I set up parsing automatically by inserting the line (setq TeX-parse-self t)
into my .emacs
file. So far, it works fine, but the problem is that I have to load the particular packages (xparse
and/or expl3
) explicitly with \usepackage
or \RequirePackage
in the specific document to get them parsed. Since the macros of both packages are part of the LaTeX kernel right know that adds some unnecessarly loaded packages to each file.
How can I add a hook to my .emacs
/init
file that parses both packages every time I'm using LaTeX-mode
without adding them to the document with one of LaTeX's package loading commands? I guess that should be possible since both files exist inside the style directory of AUCTeX: .../elpa/auctex-13.2.1/style/expl3.el
resp. .../elpa/auctex-13.2.1/style/xparse.el