![使用 epstopdf 时遇到巨大问题](https://linux22.com/image/382878/%E4%BD%BF%E7%94%A8%20epstopdf%20%E6%97%B6%E9%81%87%E5%88%B0%E5%B7%A8%E5%A4%A7%E9%97%AE%E9%A2%98%20.png)
我在 Windows 上使用 TeXstudio。我的 LaTeX 文件位于 C:/Users/Documents 我的图像位于同一位置。
\documentclass[preprint,12pt,3p]{elsarticle}
\newif\ifpdf
\ifx\pdfoutput\undefined
\pdffalse
\else
\pdfoutput=1
\pdftrue
\fi
\ifpdf
\usepackage{graphicx}
\usepackage{epstopdf}
\DeclareGraphicsRule{.eps}{pdf}{.pdf}{`epstopdf #1}
\pdfcompresslevel=9
\else
\usepackage{graphicx}
\fi
\usepackage{amsfonts,amssymb,amscd,amsmath,enumerate,verbatim,calc,float,wrapfig}
\usepackage[export]{adjustbox}
\epstopdfsetup{suffix=}
\begin{document}
\section{intro}
\begin{figure}[H]
\centering
\includegraphics{Figure 2.eps}
\end{figure}
\end{document}
日志文件显示:
! Package pdftex.def Error: File `Figure 2.pdf' not found: using draft setting.
LaTeX Warning: File `Figure 2.eps' not found on input line 59.
Package epstopdf Info: Source file: <Figure 2.eps>
(epstopdf) date: 2018-09-11 07:12:24
(epstopdf) size: 1751510 bytes
(epstopdf) Output file: <Figure 2.pdf>
(epstopdf) Command: <epstopdf Figure 2.eps>
(epstopdf) \includegraphics on input line 59.
runsystem(epstopdf Figure 2.eps)...executed.
Package epstopdf Info: Result file: <Figure 2.pdf>.
! Package pdftex.def Error: File `Figure 2.pdf' not found: using draft setting.
See the pdftex.def package documentation for explanation.
Type H <return> for immediate help.
...
l.59 \includegraphics{Figure 2.eps}
Overfull \hbox (2.61108pt too wide) has occurred while \output is active
现在,如果我只说 \includegraphics{Figure 1} 而不带 eps 扩展名,那么日志文件如下:
! LaTeX Error: File `Figure 2' not found.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.59 \includegraphics{Figure 2}
I could not locate the file with any of these extensions:
.pdf,.png,.jpg,.mps,.jpeg,.jbig2,.jb2,.PDF,.PNG,.JPG,.JPEG,.JBIG2,.JB2,.eps,.ep
s
Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
Overfull \hbox (2.61108pt too wide) has occurred while \output is active
如果我在 epstopdfsetup 中使用 outdir,我该如何根据文件位置来写入它?我的文件位置有问题吗?图像和源文件都位于同一文件夹中。