Convert your graphics from EPS to PDF before running pdflatex. You need to do it only once:
epstopdf Figuer.eps
If will produce Figuer.pdf which is suitable for pdflatex. In your example dvipdf does it on every build.
In the document use
\usepackage[pdftex]{graphicx} % not [dvips]
And to include graphics, omit the extension:
\includegraphics[width=2in] {Figuer} % but {Figuer.pdf} works too
It will choose Figuer.pdf when compiled by pdflatex and Figuer.eps when compiled by latex. So the document remains compatible with legacy latex (only remember to chage \usepackage{graphics}).
Reducing the file size of your EPS files might help. Here are some ideas how to do that.
If you have the original image as JPEG, PNG, TIFF, GIF (or any other sampled image), reduce the original file size with whatever tools you have, then convert to EPS using sam2p. sam2p gives you much smaller EPS file sizes than what you get from most popular converters.
If your EPS is vector graphics, convert it to PDF using ps2pdf14 (part of Ghostscript), then convert back to eps using pdftops -eps (part of xpdf). This may reduce the EPS file size a lot.
您使用的是 DVI 预览器还是直接转为 pdf? 如果你一直转到pdf,你将付出取消编码和重新编码的成本(我曾经在使用visio图表时遇到过这个问题)。 但是,如果您可以在大部分时间生成 PS 或直接使用 DVI,那么体验将是可控的。
另外,一些软件包会根据图形为您创建 .pdf 文件,然后您可以嵌入该文件(我在我的 mac 上这样做)
Are you using a DVI previewer or going straight to pdf? If you go all the way to pdf, you'll pay the cost of unencoding and reencoding (I used to have that problem with visio diagrams). However, if you can generate PSs most of the time or work straight with the DVI, the experience would be manageable.
Also, some packages will create .pdf files for you from figures, which you can then embed (I do that on my mac)
发布评论
评论(6)
一些额外的想法:
我通常采用后一种方法(pdflatex)。
Some additional ideas:
I generally take the latter approach (pdflatex).
eps 文件有多大? Latex 只需要知道位于文件开头的边界框的大小。
dvips(不是 dvipdf)不会花费太多时间,因为它只需要将 eps 嵌入到 postscript 文件中。
另一方面,dvipdf 必须将 eps 转换为 pdf,这是昂贵的。
How big are the eps files? Latex only needs to know the size of the bounding box, which is at the beginning of the file.
dvips (not dvipdf) shouldn't take too much time since it just needs to embed the eps into the postscript file.
dvipdf, on the other hand has to convert the eps into pdf, which is expensive.
确实,你可以直接使用,
不需要做任何改变。
在运行
pdflatex
之前将图形从 EPS 转换为 PDF。 您只需执行一次:如果将生成适合
pdflatex
的Figuer.pdf
。 在您的示例中,dvipdf
在每次构建时都会执行此操作。在文档中使用
并包含图形,省略扩展名:
使用
pdflatex
编译时会选择Figuer.pdf
,使用latex
编译时会选择Figuer.eps
。 因此,该文档仍然与旧版latex
兼容(只需记住更改\usepackage{graphics}
)。Indeed, you can use directly
Few changes are required.
Convert your graphics from EPS to PDF before running
pdflatex
. You need to do it only once:If will produce
Figuer.pdf
which is suitable forpdflatex
. In your exampledvipdf
does it on every build.In the document use
And to include graphics, omit the extension:
It will choose
Figuer.pdf
when compiled bypdflatex
andFiguer.eps
when compiled bylatex
. So the document remains compatible with legacylatex
(only remember to chage\usepackage{graphics}
).减小 EPS 文件的大小可能会有所帮助。 以下是一些如何做到这一点的想法。
如果您的原始图像为 JPEG、PNG、TIFF、GIF(或任何其他采样图像),请使用您拥有的任何工具减小原始文件大小,然后使用 sam2p 转换为 EPS。 sam2p 为您提供的 EPS 文件大小比您从最流行的转换器获得的文件小得多。
如果您的 EPS 是矢量图形,请使用 ps2pdf14(Ghostscript 的一部分)将其转换为 PDF,然后使用
pdftops -eps
(xpdf 的一部分)转换回 eps。 这可能会大大减少 EPS 文件的大小。Reducing the file size of your EPS files might help. Here are some ideas how to do that.
If you have the original image as JPEG, PNG, TIFF, GIF (or any other sampled image), reduce the original file size with whatever tools you have, then convert to EPS using sam2p. sam2p gives you much smaller EPS file sizes than what you get from most popular converters.
If your EPS is vector graphics, convert it to PDF using ps2pdf14 (part of Ghostscript), then convert back to eps using
pdftops -eps
(part of xpdf). This may reduce the EPS file size a lot.作为快速修复,请尝试将 [draft] 选项传递给 graphix 包。
As a quick fix, try passing the [draft] option to the graphix package.
您使用的是 DVI 预览器还是直接转为 pdf?
如果你一直转到pdf,你将付出取消编码和重新编码的成本(我曾经在使用visio图表时遇到过这个问题)。 但是,如果您可以在大部分时间生成 PS 或直接使用 DVI,那么体验将是可控的。
另外,一些软件包会根据图形为您创建 .pdf 文件,然后您可以嵌入该文件(我在我的 mac 上这样做)
Are you using a DVI previewer or going straight to pdf?
If you go all the way to pdf, you'll pay the cost of unencoding and reencoding (I used to have that problem with visio diagrams). However, if you can generate PSs most of the time or work straight with the DVI, the experience would be manageable.
Also, some packages will create .pdf files for you from figures, which you can then embed (I do that on my mac)