Hello

The subfiles package is a different approach (besides the classical one with
include/input and the standalone package) to have a master file and
different subfiles, which however can be compiled completely
independently from the master file. The master file looks like

,----
| \documentclass[12pt]{article}
| \usepackage{subfiles}
| 
| \begin{document}
| 
| \subfile{section-0001.tex}
| \subfile{section-0002.tex}
| \end{document}
`----
while say section-0001.tex
,----
| 
| \documentclass[main.tex]{subfiles}
| \begin{document}
| blbla
| \end{document}
| 
| %%% Local Variables:
| %%% mode: latex
| %%% TeX-master: t
| %%% End:
`----

Important: all \usepackage commands have to be in main.tex!!

Now one can run LaTeX (even without auctex) run on all 3 files, main,
section-0001.tex and section-0002.tex.

As far as auctex is concerned there is the following conflict of
interests.

%%% TeX-master: t:
in section--001.tex

Rationale:
Otherwise running latex in section-001.tex will run main.tex and
therefore the whole bease.

%%% TeX-master: "main"
in section--001.tex


Rationale:

If one wants to check references, using
reftex, between section-001 and section-0002 or if auctex should scan
the header for additional usepackages in main.tex

Which however leads to the undesired behaviour as mentioned above.



So the proposal is:

Could the line
\documentclass[main.tex]{subfiles}

Be used in that context instead of
%%% TeX-master: "main"

Or would that have the same effect?

Regards

Uwe Brauer 

_______________________________________________
auctex-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/auctex-devel

Reply via email to