我正在使用 xelatex,并尝试使用epspdfconversion
包即时删除图形中不必要的空白边距。图形本身是动态生成的,通过bbox
选项计算紧密的边界框epspdf
似乎是个好主意。
不幸的是,epspdfconversion 似乎与 xelatex 配合得不太好。下面是一个最小工作示例:
\documentclass{tufte-handout}
%\usepackage{xltxtra}
\usepackage{color}
\usepackage[bbox,pdftopdf=true,suffix=]{epspdfconversion}
\begin{document}
\includegraphics{unnamed-chunk-2.pdf}
\end{document}`
但是,如果取消注释\usepackage{xltxtra}
并编译 xelatex,我会收到以下消息:
Package epstopdf Warning: Drivers other than `pdftex.def' are not supported.
epspdfconversion.sty is using epstopdf.sty with the following setup:
update=true,
verbose=true,
prefersuffix=true,
suffix=,
option outdir not set. Default: same directory as the .eps-source-file
append,
enable
epspdf is used with the following command:
epspdf --bbox <file>
Package epspdfconversion Info:
(epspdfconversion) epspdf --bbox <file> is used to convert eps-pdf
(epspdfconversion) (not epstopdf (script))
(epspdfconversion) on input line 334.
! Undefined control sequence.
l.345 \epstopdfDeclareGraphicsRule
{.eps}{pdf}{.pdf}{%
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
这似乎是 xelatex 和我正在使用的额外 OTF 字体之间的冲突epspdfconversion.sty
,使用 xelatex 似乎是必要的。有人有什么解决或绕过这个问题的建议吗?
答案1
epstopdf
仅与pdftex
驱动程序配合使用graphics
,如第一个警告所示。但是,lualatex
也可以与 一起使用pdflatex
。