[Tex/LaTex] pdflatex producing dvi output instead of pdf

pdfpdftex

I have a template for a paper that I am using that produces dvi output when I run pdflatex on the input file. Whereas most of the papers that I have worked with produce pdf output when I run pdflatex.

I was looking at the log files for the two different papers and the one that produces dvi output includes the line:

(/etc/texmf/tex/latex/config/graphics.cfg
File: graphics.cfg 2009/08/28 v1.8 graphics configuration of TeX Live
)
Package graphics Info: Driver file: dvips.def on input line 91.

Whereas the one that produces pdf output contains the lines:

(/etc/texmf/tex/latex/config/graphics.cfg
File: graphics.cfg 2009/08/28 v1.8 graphics configuration of TeX Live
)
Package graphics Info: Driver file: pdftex.def on input line 91.

I am trying to figure out what the setting in that would cause this difference. The packages that are included for the two different papers are very similar, but I'm guessing it's related to one of them. So basically I want to figure out how to make pdflatex produce pdf output, and I'm wondering if the different driver file gives a hint as to what I should be looking at.

Best Answer

In you tex file, you have put %&latex

%&latex
\documentclass[12pt,letterpaper]{article}

If you give %&latex this will produce dvi only. Just remove this line or put %&pdflatex.