# What does 'Tex-master' mean?

I use AUCTeX. AUCTeX has inserted a comment at the end of my `test4.tex` file that reads:

``````%%% TeX-master: "test3"
``````

What does it mean?

When I try to compile and pdf-print `test4.tex`, the document that gets opened is `test3.pdf`. Why?

• It says “`C-c C-c` runs LaTeX on `test3.tex` instead of the file corresponding to the current buffer”. Useful if you are working on a subfile and want to compile the main document, instead. – egreg May 14 '17 at 10:04

So you can have a section or even just a single equation in a file that is `\input` into your master document, and when you use `C-c C-c` or any other command that requires a full document, then the master document will be run.
• @EvanAad - You can customize `TeX-master`, check the documentation for options. – Arash Esbati May 14 '17 at 10:43