Force AUCTeX to parse the whole document
Asked Answered
B

1

6

I'm using AUCTeX 11.87 along with emacs 24.3 for writing my LaTeX documents. This is working nicely with one exception: The parsing.

My document structure is as follows:

./
Master.tex
Chapter_1.tex
Chapter_2.tex
...
header/
header/header.tex
header/packages.tex
header/options.tex
...

Where Master.tex \inputs header.tex which in turn inputs all files in header/. Furthermore Master.tex includes the Chapter_N.tex files within the document environment.

Here comes the problem: AUCTeX does not generate the parse files (the ones in the auto folder) until I have actually opened the file. Meaning that until I have not opened and saved the header/packages.tex and header/header.tex files AUCTeX does not know about the loaded packages and thus their commands/environments.

An now the question: Can I force AUCTeX to (re)parse the whole source-tree (and then reload the style hooks for all open documents)?

Bosnia answered 2/4, 2014 at 11:12 Comment(0)
D
3

If all files are in the same directory, or in subdirectories under it, open the master file and issue M-x TeX-auto-generate RET and as TeX file or directory insert the directory of the master file and as AUTO lisp directory the auto/ subdirectory of the previous directory.

For instance, if your master file is placed in ~/my-document/, insert ~/my-document/ at the first prompt and ~/my-document/auto at the second one (you can also use relative paths if you prefer them).

Dusk answered 11/4, 2014 at 17:59 Comment(1)
You need to force reparsing in a sub-document (C-c C-n), but it works! Thanks.Interlaminate

© 2022 - 2024 — McMap. All rights reserved.