为什么使用 XeLatex 时 EPS 文件不显示?

为什么使用 XeLatex 时 EPS 文件不显示?

此代码

\documentclass{article}

\usepackage{graphicx}

\begin{document}
    \begin{figure}
        \includegraphics{tiger}
    \end{figure}
\end{document}

正在为我制作一张空白页。

日志输出:

This is XeTeX, Version 3.14159265-2.6-0.99996 (MiKTeX 2.9 64-bit) (preloaded format=xelatex 2016.9.6)  9 SEP 2016 16:45
entering extended mode
**C:/projects/thesis/foo-thesis.tex
(C:/projects/thesis/foo-thesis.tex
LaTeX2e <2016/03/31> patch level 3
Babel <3.9r> and hyphenation patterns for 75 language(s) loaded.
("C:\Program Files\MiKTeX 2.9\tex\latex\base\article.cls"
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
("C:\Program Files\MiKTeX 2.9\tex\latex\base\size10.clo"
File: size10.clo 2014/09/29 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
) ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\graphicx.sty"
Package: graphicx 2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)
 ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\keyval.sty"
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks14
) ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\graphics.sty"
Package: graphics 2016/07/10 v1.0t Standard LaTeX Graphics (DPC,SPQR)
 ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\trig.sty"
Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
) ("C:\Program Files\MiKTeX 2.9\tex\latex\00miktex\graphics.cfg"
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: xetex.def on input line 99.
 ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics-def\xetex.def"
File: xetex.def 2016/07/11 v4.10 LaTeX color/graphics driver for XeTeX (L3/RRM/JK)
))
\Gin@req@height=\dimen103
\Gin@req@width=\dimen104
) (foo-thesis.aux)
\openout1 = `foo-thesis.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 8.
LaTeX Font Info:    ... okay on input line 8.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 8.
LaTeX Font Info:    ... okay on input line 8.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 8.
LaTeX Font Info:    ... okay on input line 8.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 8.
LaTeX Font Info:    ... okay on input line 8.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 8.
LaTeX Font Info:    ... okay on input line 8.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 8.
LaTeX Font Info:    ... okay on input line 8.
File: tiger.eps Graphic file (type eps)
 <tiger.eps>
Overfull \hbox (205.05501pt too wide) in paragraph at lines 11--12
[][] 
 []


LaTeX Warning: Float too large for page by 38.1975pt on input line 12.

[1] (foo-thesis.aux) ) 
Here is how much of TeX's memory you used:
 599 strings out of 428408
 6776 string characters out of 3160625
 58967 words of memory out of 3000000
 4061 multiletter control sequences out of 15000+200000
 3640 words of font info for 14 fonts, out of 3000000 for 9000
 1328 hyphenation exceptions out of 8191
 25i,4n,19p,293b,236s stack positions out of 5000i,500n,10000p,200000b,50000s

Output written on foo-thesis.pdf (1 page).

水平盒子过满不应该是问题所在,对吧?

一些说明:

  • 我尝试使用 libreoffice draw 导出的 eps 和从互联网上拉取的两个随机 eps 文件来实现这一点。
  • 如果我在其中添加更多文本,它看起来实际上为图形保留了正确的空间,但没有在其中放置任何内容。
  • png 文件工作正常。
  • 在 dvipdfmx.cfg 中,mgs.exe 已启用,而不是 rungs 或 eps2pdf。
  • 话虽如此,但任何地方都看不到任何类型的转换输出文件。
  • 使用例如[width=5cm]可以消除警告但仍然没有任何内容显示。

答案1

在命令行中运行 xetex 给出了以下输出:

<snip>
(foo-thesis.aux) )stdin -> foo-thesis.pdf
[1
xdvipdfmx:warning: No image converter available for converting file "./graphics/Lighting_pipeline_concept_rough.eps" to PDF format.
xdvipdfmx:warning: >> Please check if you have 'D' option in config file.
xdvipdfmx:warning: pdf: image inclusion failed for "graphics/Lighting_pipeline_concept_rough.eps".
xdvipdfmx:warning: Failed to read image file: graphics/Lighting_pipeline_concept_rough.eps
xdvipdfmx:warning: Interpreting special command PSfile (ps:) failed.
xdvipdfmx:warning: >> at page="1" position="(133.768, 630.034)" (in PDF)
xdvipdfmx:warning: >> xxx "PSfile="graphics/Lighting_pipeline_concept_rough.eps" llx=0 lly"
<snip>

这并没有显示在我看到的日志中。我不知道是什么原因导致了日志不完整,但我在 atom-latex 中提交了一个我使用的 bug:https://github.com/thomasjo/atom-latex/issues/212

关于实际问题:

此外, Miktexdvipdfmx.cfg中的文件C:\Program Files似乎将另一个文件dvipdfmx.cfg放入了 ProgramData 目录中。该文件非常空(例如,不包含 D 选项),显然完全覆盖了 Program Files 中的文件。删除 ProgramData 中的该文件解决了这个问题。我提交了https://sourceforge.net/p/miktex/bugs/2527/为了这。

相关内容