我刚刚使用该install-tl-unx.tar.gz
软件包在 Ubuntu 10.04 上安装了 TeX Live。然而,当我测试安装时,我注意到它无法编译为 DVI,但可以编译为 PDF。
我的测试安装的文档简单如下:
\documentclass{article}
\begin{document}
This is a document
\end{document}
我使用 进行编译latex test.tex
。编译后的文件为test.dvi
,但无法打开,且只有 240 字节。
编译日志的内容如下。您知道是什么原因导致了这个问题以及如何修复它吗?
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).
答案1
没有错误,输出正确。也许你的桌面环境不知道如何打开该文件。
你需要一个可以打开 DVI 文件的程序,例如表明或 xdvi(后者应该与 TeX Live 一起安装)。安装该程序后,您可以从命令行调用它(例如xdvi my-file.dvi
),也可以设置文件管理器以使用该程序打开 DVI 文件(如果尚未自动完成此操作)。
不过,您很可能根本不需要 DVI,而应该使用 PDF。请参阅latex 和 pdflatex 有什么实际区别?以说明原因。