【解决方法】Latex使用eps格式图片报错

用matlab制作了eps格式的矢量图片,在latex中使用时编译报错如下:

! Package pdftex.def Error: File `figures/lambda-eps-converted-to.pdf' not foun

d: using draft setting.

See the pdftex.def package documentation for explanation.

Type H <return> for immediate help.

...

l.451 ...egraphics[width=8 cm]{figures/lambda.eps}

?

我用的latex编辑器是MikTex,参考了网上的资料

MikTeX 2.9 报错Could not open the file Definitions/logo-mdpi-eps-converted-to.pdf_五月雨放晴时段的博客-优快云博客MikTeX 2.9 使用问题的记录(1)部分相关错误信息如下:MiKTeX GPL Ghostscript 9.25: **** Could not open the file Definitions/logo-mdpi-eps-converted-to.pdf .**** Unable to open the initial device, quitting.Sorry, but “...https://blog.youkuaiyun.com/wrccrwx/article/details/87891257说要在\begin{document}对应的那一行,之前加上\epstopdfsetup{outdir=./}

然而编译还是失败,报错信息变为

! Undefined control sequence.

<recently read> \epstopdfsetup

l.16 \epstopdfsetup

{outdir=./}

?

猜测epstopdf是一个包,于是通过\usepackage{epstopdf}引入这个包,编译成功。

总结:

在导入包的部分加入如下两行代码

\usepackage{epstopdf}
\epstopdfsetup{outdir=./}

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Toblerone_Wind

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值