Closed
Description
I've been using texlive 2016 with ST3 LaTeXTools. I have my source images at location ./figure
. My code is like this:
\usepackage{graphicx}
\usepackage{epstopdf}
\graphicspath{{./figure/}}
\DeclareGraphicsExtensions{.eps}
...
\begin{figure}[t]
\center{\includegraphics[width=0.49\textwidth]{iie1}}
\caption{...}
\label{fig: iie1}
\end{figure}
When building, it reports that
Basic Builder: running pdflatex...done.
Errors:
[no file]:964: Package pdftex.def Error: File `./figure/iie1-eps-converted-to.pdf' not found. [...cludegraphics[width=0.49\textwidth]{iie1}]
Warnings:
(Log parsing issues. Disregard unless something else is wrong.)
[Done!]
I did it this way before, with other similar images having already converted to .pdf files. But after a recovery of OS, this converting is not working. What's the problem?
Activity
znss1989 commentedon Oct 31, 2016
This is some information shown in the log file.
Other existing images with such file names as
foo-eps-converted-to.pdf
are just OK.ig0774 commentedon Oct 31, 2016
Can you try running
repstopdf --outfile=./figure/iie1-eps-converted-to.pdf ./figure/iie1. eps
directly from the directory containing your TeX file?Do other
eps
images convert or does it just insert the pre-existing PDF? I'm asking because the most obvious cause of issues withepstopdf
is that GhostScript isn't available on the PATH being used by LaTeXTools (in which case, you'd need to modify thetexpath
setting).znss1989 commentedon Oct 31, 2016
I ran the command you gave in git bash, the corresponding pdf file is generated correctly. Then what's the problem of automatically processing then?
And about the PATH, how should I do to include it in the PATH used by LaTeXTools? Not the Windows system variable PATH, right?
Thanks.
ig0774 commentedon Oct 31, 2016
You can just ensure its in the Windows PATH system variable or you can use the
texpath
setting provided by LaTeXTools to add it just for LaTeXTools (if you use that setting, remember to include;$PATH
at the end so it includes the standard Windows PATH).znss1989 commentedon Nov 1, 2016
I've added
D:\Program Files\gs\gs9.20
to Windows PATH, and change thetexpath
setting inLaTeXTools.sublime-setting
in Package setting - User as below:But it still does not automatically convert eps to pdf, but have to manually do that job. Anything else I should check? Thanks.
znss1989 commentedon Nov 1, 2016
I found a typo in my
texpath
, fix it fromC:\\texlive\\2016\bin\\win32
toC:\\texlive\\2016\\bin\\win32
. Problem gone.My bad. But not sure why the compiling of text runs anyway when the path is not correct.
Thanks for helping.
ig0774 commentedon Nov 1, 2016
Yes, that is strange. Glad you've got things sorted!
cchen-vis commentedon Sep 2, 2018
works for me! Thks!
lxk-221 commentedon Jun 23, 2023
works for me!Thks!Just to note, you need to install GhostScript first from https://www.ghostscript.com/releases/ , and then add gs path to the tex path. the package itself can't convert eps to pdf, it needs to use repstopdf or gs! hope this note can help someone who read this.