[Tex/LaTex] Compiles to PDF but not DVI

compilingdvi-modepdftextexlive

I just installed TeX Live on Ubuntu 10.04 using the install-tl-unx.tar.gz package. However, when I tested the installation I noticed that it cannot compile to DVI but it can compile to PDF.

My document for testing the installation is simply as follows:

\documentclass{article}
\begin{document}
This is a document
\end{document}

which I compile using latex test.tex. This results in the compiled file test.dvi, however it cannot be opened and is only 240 bytes.

The contents of the compilation log is below. Any ideas on what is causing this problem and how I can fix it?

This is pdfTeX, Version 3.1415926-2.3-1.40.12 (TeX Live 2011)
(format=latex 2012.3.8)  8 MAR 2012 18:43 entering extended mode 
restricted \write18 enabled.  %&-line parsing enabled.
**test.tex (./test.tex LaTeX2e <2011/06/27> Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, ge
rman-x-2011-07-01, ngerman-x-2011-07-01, afrikaans, ancientgreek,
ibycus, arabi c, armenian, basque, bulgarian, catalan, pinyin, coptic,
croatian, czech, danis h, dutch, ukenglish, usenglishmax, esperanto,
estonian, ethiopic, farsi, finnis h, french, galician, german,
ngerman, swissgerman, monogreek, greek, hungarian,  icelandic,
assamese, bengali, gujarati, hindi, kannada, malayalam, marathi, or
iya, panjabi, tamil, telugu, indonesian, interlingua, irish, italian,
kurmanji,  lao, latin, latvian, lithuanian, mongolian, mongolianlmc,
bokmal, nynorsk, pol ish, portuguese, romanian, russian, sanskrit,
serbian, serbianc, slovak, sloven ian, spanish, swedish, turkish,
turkmen, ukrainian, uppersorbian, welsh, loaded .
(/usr/local/texlive/2011/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/local/texlive/2011/texmf-dist/tex/latex/base/size10.clo File:
size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option) )
\c@part=\count79 \c@section=\count80 \c@subsection=\count81
\c@subsubsection=\count82 \c@paragraph=\count83
\c@subparagraph=\count84 \c@figure=\count85 \c@table=\count86
\abovecaptionskip=\skip41 \belowcaptionskip=\skip42
\bibindent=\dimen102 ) No file test.aux. \openout1 = `test.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line
2. LaTeX Font Info:    ... okay on input line 2. LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 2. LaTeX Font Info:   
... okay on input line 2. LaTeX Font Info:    Checking defaults for
OT1/cmr/m/n on input line 2. LaTeX Font Info:    ... okay on input
line 2. LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on
input line 2. LaTeX Font Info:    ... okay on input line 2. LaTeX Font
Info:    Checking defaults for OMX/cmex/m/n on input line 2. LaTeX
Font Info:    ... okay on input line 2. LaTeX Font Info:    Checking
defaults for U/cmr/m/n on input line 2. LaTeX Font Info:    ... okay
on input line 2. [1

] (./test.aux) )  Here is how much of TeX's memory you used:  198
strings out of 493630  2112 string characters out of 3143368  49273
words of memory out of 3000000  3591 multiletter control sequences out
of 15000+200000  3640 words of font info for 14 fonts, out of 3000000
for 9000  831 hyphenation exceptions out of 8191  23i,4n,17p,151b,107s
stack positions out of 5000i,500n,10000p,200000b,50000s

Output written on test.dvi (1 page, 240 bytes).

Best Answer

There is no error, the output is correct. Perhaps your desktop environment does not know how to open the file.

You need a program that can open DVI files, such as Evince or xdvi (the latter should have been installed with TeX Live). Once the program is installed, you can either invoke it from command line (say, xdvi my-file.dvi) or set up your file manager to open DVI files with this program (if this had not been already done automatically).

It is most likely, however, that you don't need DVI altogether and should use PDF instead. See What is the practical difference between latex and pdflatex? for the reasoning.