I'm using BasicTeX 2019 which includes pdfTeX 3.14159265-2.6-1.40.20 (TeX Live 2019).

I've installed the repstopdf tool and added this near the top of my document:


Then I include an EPS file like so:

% or \includegraphics{stride1}

This correct creates a converted file called build/stride1-eps-converted-to.pdf which contains the expected content.

But in the produced document, it's blank where the figure should go. What is missing?

If I don't include the \usepackage{epstopdf} it does work, but the converted files are placed in the top level directory, which is undesirable.

I also tried setting \graphicspath to the same build directory but this did not work.


If you have an eps file called img.eps in a directory build, you can include it like this:

\graphicspath{ {build/} }
Include graphics here: \includegraphics{img}

Compile with pdflatex and it automatically converts the file, leaving the pdf in the build directory, and compiles the whole thing together.

  • Sorry, to clarify, the build/ directory should be where the output files go, now where the input files are. But I think it started working...
    – rgov
    Feb 26 '20 at 21:05
  • 1
    pdflatex --output-directory=build Feb 26 '20 at 21:06
  • 1
    or latexmk -outdir=build -pdf Feb 26 '20 at 21:06

Here's what seems to have worked:

  1. I switched from epsfig to graphicx (not sure if this was relevant).

  2. I used this specific order of commands in my document:


  1. I build with latexmk -auxdir=build/ -outdir=build/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.