使用 pdflatex 即时将 EPS 转换为 PDF
我试图在将使用 pdflatex 编译的文档中包含 EPS 图形。 当然,可以使用 epstopdf(MikTeX 发行版附带的)将图片转换为 pdf。 有什么方法可以即时执行此操作,即让 pdflatex 进行转换?
我正在寻找这样的解决方案,因为我想为学生建立一个易于学习的环境。 理想情况下,转换后的图片放置在还包含原始 .eps 的目录中,并且使用 .pdf(如果可用)。
I'm trying to include an EPS figure in a document that will be compiled using pdflatex. Of course, the picture can be converted to pdf using epstopdf (which comes with the MikTeX distribution). Is there any way to do this on the fly, that is, make pdflatex do the conversion?
I'm looking for such a solution because I want to set up an easy-to-learn environment for students. Ideally, the converted picture is placed in the directory that also contains the original .eps, and the .pdf is used if available.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
TeX FAQ 中的相关答案指向
epstopdf.sty
,包含在 Heiko Oberdiek 的软件包中。The relevant answer in the TeX FAQ points to
epstopdf.sty
, included with Heiko Oberdiek's packages.我建议使用 latex-mk 这是一个很好的方法,可以为乳胶构建提供一个非常简单的 Makefile 。 当然,您可以在构建过程中将 eps 文件转换为 pdf,或将无花果转换为 eps 等。
目前我的 Makefile 看起来像这样:
当我调用 make 时,它所做的第一件事是将一些 .fig 转换为 .pdf 文件。 我很确定它会对 eps 文件做同样的事情。
I would recommend using latex-mk which is a nice way to have a very simple Makefile for latex construction. Of course you can have eps file converted to pdf, or fig to eps, etc, during the build process.
Currently my Makefile look like that :
When I invoke make, the first thing it does is converting some .fig into .pdf files. I'm pretty sure it would do the same with eps files.
如果你想在乳胶中包含一个 EPS 图形,那么你需要首先将图形设置为 EPS 格式(如果它不是 EPS 格式)。就像如果你的图形扩展名为 .jpeg,那么你需要将其设置为 .eps
然后你需要使用 LaTex 中常见的一些代码将其包含在 LaTex 中,然后要将其制作为 pdf 格式,你需要使用一条小指令,即 \usepackage{epstopdf}
我也面临这个问题,发现这篇文章非常有帮助“如何在 Latex 中将 .eps 转换为 PDF?"
现在我可以在 LaTex 中包含 EPS 图,也可以将其转换为 PDF。 我想您也可以从上面的链接中获得帮助和所有详细信息。如果您遇到任何进一步的问题,请告诉我。
If you want to include one EPS figure in latex then you need to at first make the figure in EPS format if it is not in EPS format.Like if your figure is in .jpeg extension, then you need to make it .eps
Then you need to include it in the LaTex with using some code which is common in LaTex and then to make it in pdf format you need to use one small instruction that is \usepackage{epstopdf}
I was also facing this problem and found this post very helpful "How to Convert .eps to PDF in Latex ?"
Now i am able to include EPS figure in LaTex and also can convert it in PDF. I think you will also get help and all the details from the above link.Let me know if you face any further problem.