I edit my LaTeX files in Emacs using AUCTeX. To compile, I press C-c C-c, which will run pdflatex root
, if root.tex
is the file displayed in the current buffer.
But what if I want it to run pdflatex
on a file that is not displayed in the current buffer?
For example, I am editing an included .tex
file, chapter2.tex
, and press C-c C-c. The command I want it to run is still pdflatex root
, since chapter2.tex
is just included in root.tex
.
How can I do that?