TeX Live and MacTeX ⇒ Why is 'latex' command producing pdf, not dvi?
Why is 'latex' command producing pdf, not dvi?
My file is compiling just fine, into a beautiful pdf. I have kdvi and kpdf installed, so that is not an issue. But I can't seem to squeeze a .dvi out of TexLive.
Thanks in advance for any advice, I'm very confused.
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Why is 'latex' command producing pdf, not dvi?
Code: Select all
thorsten@localghost:~> ls /usr/bin -l | grep latex
lrwxrwxrwx 1 root root 35 3. Mär 22:22 cslatex -> ../lib/texmf/bin/i586-linux/cslatex
lrwxrwxrwx 1 root root 35 3. Mär 22:22 delatex -> ../lib/texmf/bin/i586-linux/delatex
lrwxrwxrwx 1 root root 33 1. Mär 15:18 htlatex -> ../share/texmf/bin/noarch/htlatex
lrwxrwxrwx 1 root root 35 1. Mär 15:18 htxelatex -> ../share/texmf/bin/noarch/htxelatex
-rwxr-xr-x 1 root root 5127 8. Jul 2008 kopete_latexconvert.sh
lrwxrwxrwx 1 root root 33 3. Mär 22:22 latex -> ../lib/texmf/bin/i586-linux/latex
lrwxrwxrwx 1 root root 36 3. Mär 22:22 lualatex -> ../lib/texmf/bin/i586-linux/lualatex
lrwxrwxrwx 1 root root 35 3. Mär 22:22 mllatex -> ../lib/texmf/bin/i586-linux/mllatex
lrwxrwxrwx 1 root root 38 3. Mär 22:22 pdfcslatex -> ../lib/texmf/bin/i586-linux/pdfcslatex
lrwxrwxrwx 1 root root 36 3. Mär 22:22 pdflatex -> ../lib/texmf/bin/i586-linux/pdflatex
lrwxrwxrwx 1 root root 39 3. Mär 22:22 pdflualatex -> ../lib/texmf/bin/i586-linux/pdflualatex
-rwxr-xr-x 1 root root 10255 28. Jan 16:30 pod2latex
lrwxrwxrwx 1 root root 33 3. Mär 22:22 pslatex -> ../share/texmf/bin/noarch/pslatex
lrwxrwxrwx 1 root root 35 3. Mär 22:24 xelatex -> ../lib/texmf/bin/i586-linux/xelatex
Another (and the more probable) reason could be that in your source code somewhere there is the pdftex driver loaded. This driver option can appear in the option list for the document class or packages like geometry, graphicx, hyperref or xcolor. If you find it somewhere, remove it because it is not necessary. These packages detect the running compiler and load the appropriate driver on their own.
Best regards and welcome to the board
Thorsten¹
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Why is 'latex' command producing pdf, not dvi?
latex, pdftex and pdflatex are all symlinked to pdftex, but this doesn't matter because pdftex sets the output format according to the command by which it was called. But pdftex.def actually does enable PDF output if called with DVI output active, but it also issues an error in this case.localghost wrote:This can have more than one probable cause. On Linux system the shell command latex is mostly a symbolic link to the actual executable which is located in the texmf tree.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Why is 'latex' command producing pdf, not dvi?
Sorry, but I'm afraid that you are only partly right. pdftex is merely the engine called with according preloaded formats (latex, pdflatex). Consider the following example.phi wrote:latex, pdftex and pdflatex are all symlinked to pdftex, but this doesn't matter because pdftex sets the output format according to the command by which it was called. But pdftex.def actually does enable PDF output if called with DVI output active, but it also issues an error in this case.
Code: Select all
\documentclass[11pt,a4paper,english,pdftex]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{babel}
\usepackage{lmodern}
\usepackage{graphicx}
\usepackage{blindtext}
\begin{document}
\Blinddocument
\end{document}
- Attachments
-
- pdftex-xmpl.log.zip
- The log files of two different LaTeX systems.
- (5.8 KiB) Downloaded 266 times
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Why is 'latex' command producing pdf, not dvi?
- Noah
Why is 'latex' command producing pdf, not dvi?
that's only caused by different versions of pdftex.def. The current version 0.04l gives this error (also in TeX Live), version 0.04k does not. Probably that change (2008/09/08) was introduced to avoid the unexpected behavior described here.localghost wrote:It compiles to a proper PDF output when processed with latex but only MiKTeX gives an error. TeX Live (Web2C) compiles without any complaints.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Why is 'latex' command producing pdf, not dvi?
Now that you say it I also notice that in the log files. The devil is in the detail. Thanks for this useful information.phi wrote:[...] The current version 0.04l gives this error (also in TeX Live), version 0.04k does not. Probably that change (2008/09/08) was introduced to avoid the unexpected behavior described here.
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10