SublimeText / LaTeXTools

LaTeX plugin for Sublime Text
https://latextools.readthedocs.io/
2.01k stars 366 forks source link

Can't Convert EPS Images #662

Open enoordam opened 8 years ago

enoordam commented 8 years ago

I can't seem to figure out how to get LatexTools to let me use image files. I always get the an error *****-eps-converted-to.pdf' not found The Latex code and EPS files work fine when I upload them to Overleaf to work with my lab partners. Looking at #7 I made sure SumatraPDF and Ghostscript are both in my path. I am using TexLive and the default builder.

Am I missing something?

ig0774 commented 8 years ago

You're quite non-specific about what you're trying to do, but I'm going to assume your trying to run pdflatex using the epstopdf package or something similar, in which case the solutions are substantially the same as for #453.

The easiest option is just to enable --shell-escape which you can do via the %!TEX options= magic comment in your root tex file or by setting the options setting in the builder_settings section of your settings to ["--shell-escape"]. See the documentation in the README on this feature.

enoordam commented 8 years ago

Yes I'm believe I'm using pdflatex.

I have tried with and without epstopdf. When using the online program I mentioned it wasn't required, which was interesting.

I did find that solution, but it didn't work for me either. I have the following in my settings: "options": ["--shell-escape"], },

I also added %!TEX options=--shell-escape to the top of my file.

ig0774 commented 8 years ago

Actually without any tweaking the following minimal example works for me:

\documentclass{article}
\usepackage{graphicx}
\begin{document}
\includegraphics{example.eps}
\end{document}

To include a file called example.eps using pdflatex (the default) and without needing to tweak the building options or do anything else. Can you provide a small example the reproduces the issue you're having? It's very hard to troubleshoot when I'm basically guessing what packages and settings you might be using. Thanks...

bartvbl commented 8 years ago

I'd like to pitch in a minimal example of my own, because I had the exact same issue, and am also on Windows.

Here it is:

\documentclass[journal]{IEEEtran}

\usepackage{blindtext}
\usepackage{graphicx}
\usepackage{cite}
\usepackage{epstopdf}
\graphicspath{{D:/git/Master/paper/images/}}

\begin{document}

\begin{figure}[!t]
\centering
\includegraphics[width=2.5in]{setup_3d.eps}
\caption{A schematic drawing.}

\label{fig:overview_3d}
\end{figure}

\end{document}

My user settings file of latexTools: http://pastebin.com/AANJCgxj I use TexLive version 2015 on Windows 8.1. And here's the log file of the compilation process: http://pastebin.com/ZJs8czcX I also asked about this issue on StackOverflow.

ig0774 commented 8 years ago

@bartvbl: In your settings, your texpath is "C:\\texlive\\2015\\bin\\win32". You want this to be "C:\\texlive\\2015\\bin\\win32;%PATH%", like the model shown in the settings file.

bartvbl commented 8 years ago

@ig0774 And that solved my problem. Thank you very much!