# File-specific TeX compiling options?

I have TeX files that Aquamacs compiles by default with pdflatex and other files compiled by default with latex (so I get a dvi).

If I make a copy of file that Aquamacs compiles with latex, that copy is compiled with latex. Similarly, a copy of a "pdflatex file" will be compiled with pdflatex.

I can't see where there could be some metadata of my TeX files that could tell Aquamacs with which engine it has to compile.

I have `setq-default TeX-global-PDF-mode t` in my .emacs

What determines which compilation is done?

AUCTeX, used by Aquamacs for tex files, when the option `TeX-parse-self` is `t` parses the document preamble, and if it finds some package that requires the creation of dvi (e.g. pstricks) uses latex instead of pdflatex.