使用 pdflatex 即时将 EPS 转换为 PDF

发布于 2024-07-25 08:54:18 字数 213 浏览 1 评论 0原文

我试图在将使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

雄赳赳气昂昂 2024-08-01 08:54:19

TeX FAQ 中的相关答案指向epstopdf.sty,包含在 Heiko Oberdiek 的软件包中。

The relevant answer in the TeX FAQ points to epstopdf.sty, included with Heiko Oberdiek's packages.

妞丶爷亲个 2024-08-01 08:54:19

我建议使用 latex-mk 这是一个很好的方法,可以为乳胶构建提供一个非常简单的 Makefile 。 当然,您可以在构建过程中将 eps 文件转换为 pdf,或将无花果转换为 eps 等。

目前我的 Makefile 看起来像这样:

NAME=report
TEXSRCS=report.tex
BIBTEXSRCS=biblio.bib
USE_PDFLATEX=true
VIEWPDF=open # cause i'm on osx, gv for most unix
XFIGDIRS=img

## For osx users :
include /opt/local/share/latex-mk/latex.gmk

## For unix users :
#include /usr/share/latex-mk/latex.gmk

当我调用 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 :

NAME=report
TEXSRCS=report.tex
BIBTEXSRCS=biblio.bib
USE_PDFLATEX=true
VIEWPDF=open # cause i'm on osx, gv for most unix
XFIGDIRS=img

## For osx users :
include /opt/local/share/latex-mk/latex.gmk

## For unix users :
#include /usr/share/latex-mk/latex.gmk

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.

携君以终年 2024-08-01 08:54:19

如果你想在乳胶中包含一个 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文