Leo Stein <leo.st...@gmail.com> writes: > I saw multiple style files using `TeX-auto-add-regexp', but sorry, I > don't understand how this is related to multi-file documents.
It is related because AUCTeX applies parsed information in a multi-file setup to all involved files. Suppose you have something like this: --8<---------------cut here---------------start------------->8--- \documentclass{article} \usepackage{graphicx} \begin{document} This is some text. \begin{equation} \label{eq:1} a + b = c \end{equation} \include{Temp/sub-file.tex} \end{document} %%% Local Variables: %%% mode: LaTeX %%% TeX-master: t %%% TeX-source-correlate-mode: t %%% End: --8<---------------cut here---------------end--------------->8--- --8<---------------cut here---------------start------------->8--- This is some text in a sub-file. %%% Local Variables: %%% mode: LaTeX %%% TeX-master: "../mwe.ltx" %%% End: --8<---------------cut here---------------end--------------->8--- in this directory layout: --8<---------------cut here---------------start------------->8--- . ├── Temp │ └── sub-file.tex └── mwe.ltx --8<---------------cut here---------------end--------------->8--- Now, when you open sub-file.tex, AUCTeX applies the parsed elements from ../mwe.ltx to sub-file.tex and loads graphicx.el there, so you can do 'C-c C-m includegraphics RET' in sub-file.tex (and sub-file.tex should also know about "eq:1"). > If this is explained clearly somewhere in the documentation, please > let me know, but I haven't found it yet. I don't think this is documented in the manual in detail; it is more a style writer thing. Best, Arash