Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have noticed that on some .tex files (making use of the graphicx and hyperref packages and PDF image files), the latex command produces PDF files instead of the expected DVI. How and when does this happen?

In case this matters, I'm using TeXLive 2012.20120611-3~ubuntu12.04.1 on Ubuntu 12.04 (from PPA):

$ latex
This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian)
restricted \write18 enabled.
share|improve this question
2  
latex and pdflatex use the same executable (pdftex); you can't include PDF files when you use latex, nor should pass the pdftex option to graphicx or hyperref, which would change the output mode from DVI to PDF. –  egreg Apr 2 '13 at 11:19
    
Beside \usepackage[pdftex]{graphicx} (which should give an error message) it is also possible that a faulty "\ifpdf"-code in some old package sets unvoluntarly \pdfoutput=1. –  Ulrike Fischer Apr 2 '13 at 11:35
add comment

1 Answer

up vote 12 down vote accepted

latex and pdflatex are the same executable in many modern distributions just having different default values for the output format.

pdf(la)tex writes DVI code by default and produces PDF just if the integer register \pdfoutput is set non zero. So presumably you are loading a package (perhaps with a pdftex option) that is setting this register.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.