Skip to content

problem displaying eps #57

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
uninyhart opened this issue Jul 11, 2018 · 8 comments
Closed

problem displaying eps #57

uninyhart opened this issue Jul 11, 2018 · 8 comments

Comments

@uninyhart
Copy link

uninyhart commented Jul 11, 2018

您好。我在插入eps矢量图时,程序并无错误和警告,但是图片无法显示。
test3.pdf
eps文件ImageMagick中显示正常。
imdisplay-eps
环境:XeTeX Version 3.14159265-2.6-0.99999
原来在TeX Live并没有这个问题。

求教。

@yihui
Copy link
Member

yihui commented Jul 11, 2018

请提供完整的可重复的例子。

@uninyhart
Copy link
Author

代码:

\usepackage{graphicx}
\begin{document}

\begin{figure}
    \centering
    \includegraphics[width=10pt]{5.eps} 
    \caption{5.eps}
\end{figure}
\begin{figure}
    \centering
    \includegraphics{4.pdf}
    \caption{4.pdf}
\end{figure}

\end{document}

comment不支持eps文件……
5.eps

@yihui
Copy link
Member

yihui commented Jul 12, 2018

打包 zip 上传整个例子即可。

@yihui
Copy link
Member

yihui commented Jul 12, 2018

以后请提供一个完整的可重复例子,请不要让我先修正你的例子再运行(最好是你自己先跑一遍你的例子),上面的 LaTeX 文档中缺了 \documentclass{},而且你也没提供 5.pdf

修正这两个问题之后我依然无法重复你的问题。如果你的 tinytex 不是最新版,请先升级。否则请提供 xfun::session_info('tinytex')

@uninyhart
Copy link
Author

抱歉。我第一次发Issue。第一行不小心被我删了。
抱歉我不会用R,TinyTeX是直接用install-windows.bat安装,所以用session_info()直接报错"not found"。
已确认是最新版。
以下是整个文件包括log
test3.zip
希望有用。

@yihui
Copy link
Member

yihui commented Jul 13, 2018

好的。

我搜了半天也没找到解决办法,只能给出跟 sjtug/SJTUThesis#82 一样的建议了:不要再用 EPS 这种上古时代的图片格式,转 PDF 吧。如果不知道怎么转,可以装 tlmgr install epstopdf,然后用命令行 epstopdf 5.eps

这个问题只有 xelatex 存在,用 pdflatex 或 lualatex 都可以正常编译。

@uninyhart
Copy link
Author

好的,非常感谢。

之前查到TeX Live自带的GhostScript有问题,SublimeText/LaTeXTools#1148有提到gs没有写入注册表,不知道有没有联系。
TeX自带的和gs发行的不一样。已确认它们都是9.23版本。
gs
并且,直接打开TeX自带的\TinyTeX\tlpkg\tlgs\bin\gswin32c.exe会直接报错:

GPL Ghostscript 9.23: Can't find initialization file gs_init.ps. 

这个文件在\TinyTeX\tlpkg\tlgs\Resource\Init\下可以找到。
我根据那个Issus中提供的方法,添加系统变量或是修改注册表,并没有什么改变(LaTeXTools的问题的确解决了)。

在SublimeText中LaTeXTools check system
sublimetext
magick是单独安装的。在TeX Live下这些都是available,不知道有什么影响。

希望这些信息有用。
(以我有限的能力,我没有搞懂为什么编译没有报错,我也只能提供这些有限的信息。)

@yihui
Copy link
Member

yihui commented Jul 13, 2018

非常感谢回来分享!

鉴于我也无法提供进一步的帮助,我先关了。

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants