Hi
A year ago I asked such a question concerning reftex and the feature I
proposed was implemented (thanks). I scanned the archives but I am not
sure whether the following issue also has been treated (the feature is
not implemented). I vaguely remember that Tassilo said it is not
possible.
Anyhow:
Given the following minimal example for subfiles.
First the master file.
,----
|
| \documentclass[12pt]{article}
|
| \newcommand{\ubcomment}[2][]{%
| \refstepcounter{ubcomment}%
| {%
| \todo[linecolor=black,backgroundcolor={green!40!},size=\footnotesize]{%
| \textbf{Fixme: UB [\uppercase{#1}\theubcomment]:}~#2}%
| }}
|
|
| \usepackage{subfiles}
|
| \begin{document}
|
| This is the main file.
|
| \subfile{sec-01-introduction.tex}
| \end{document}
`----
As usual if I use TeX-insert-macro in that file auctex will complete the
name of the macro.
Now to a slave file
,----
|
| \documentclass[main.tex]{subfiles}
| \begin{document}
|
| \section{Introduction}
| \label{sec:introduction}
|
| \end{document}
|
`----
In that file file TeX-insert-macro in that file will not work. I could
either insert the definition of that macro, write a private small style
which I insert, or use
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "main"
%%% End:
In the slave file. But the latter solution which is the most elegant
causes sometimes problems if I run the main.tex file. The problem is if
the master file contains more slave files, then running slave 1 (which
contains the reference to TeX-master will then run master and so defy
the whole idea of the subfiles package.
Therefore: Is it possible without too much hassle that auctex could provide more
support for subfiles and would scan the master file main.tex, just based on
the line
\documentclass[main.tex]{subfiles}???
Uwe Brauer
_______________________________________________
auctex-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/auctex-devel