Hi Ikumi,

On Dec 16, 2024, at 12:42-0500 Ikumi Keita <[email protected]> wrote:
> You can use C-c C-b (TeX-command-buffer) in the subfile buffer. It will
> work out of the box (unless you have extraordinarily strange preamble).

Thank you for your response. =C-c C-b= works, but I am looking for a cleaner 
solution, ideally closer to what =C-c C-a (TeX-command-run-all)= does for the 
main file.

Specifically, I’d like the following behavior when working with subfiles:

1. Compile using the subfile’s name (not =_region.tex= which is the result of 
C-c C-b).
2. Automatically run the compilation multiple times as needed to resolve 
references and bibliography correctly.
3. Highlight the region in the corresponding PDF output where the pointer 
currently is.

Effectively, I’d like =C-c C-a= to compile the subfile when working within a 
subfile, and to compile the whole document when invoked in the main parent file 
(=main.tex=).

Is there a straightforward way to achieve this behavior in AUCTeX?

Thanks,
Kourosh Kalayeh

Reply via email to