On Tue, Mar 31, 2026 at 16:48 (+0200), Arash Esbati wrote:
> Jim <[email protected]> writes:
>> that may be the case, although in that case it removes functionality which
>> I think would be useful.
>> Namely, if you are editing the sub-file, and it has TeX-master set to the
>> master file, you can compile that chapter (or whatever portion it
>> represents) with
>> C-c C-b
>> and while still in that file, you can compile the whole document with
>> C-C C-b.
> Then I suggest you assemble an example with regular LaTeX macros for
> including sub-files, namely with \input or \include. I think the
> example with the standalone package/class is misleading here since the
> standalone bundle isn't meant to work like that (I think).
Hi Arash,
Ikumi gave an example of including sub-files with \input earlier today. Is
that what you are thinking of?
If not, before I (attempt to) do that... Is there some definitive arbiter
who can decree, from on high, "what AUCTeX is supposed to do" in these two
cases:
(1) editing sub-file without \usepackage{standalone) /
\documentclass{standalone}
What should happen for each of
C-c C-c
C-c C-b
C-c C-r
vis-a-vis hunting for preamble material, assuming TeX-master points to
the master file?
and
(2) editing sub-file *with* \usepackage{standalone) / \documentclass{standalone}
What should happen for each of
C-c C-c
C-c C-b
C-c C-r
vis-a-vis hunting for preamble material, assuming TeX-master points to
the master file?
I assume (*cough*) that for case (1) AUCTeX *should not* find any preamble
material in the sub-file, although it has to examine the beginning of the
sub-file to make sure it is, indeed, in case (1).
And I further imagine that if someone has *not* set up the standalone stuff
in the master file and sub-file, they won't attempt to compile the sub-file
by itself with any preamble other than what is in the master file.
Does that agree with your ideas about this?
I have no opinion on how the standalone case *should* behave for LaTeX.
But I see some virtue in what I suggested above about C-c C-c vs. C-c C-b.
I say that because that is currently working (to a reasonable degree) for
ConTeXt, and I have found it quite handy. Since I have found it handy, I
can imagine LaTeX users also finding the analogous thing handy.
Cheers.
Jim