3

I use latexmk to automatically generate my LaTeX files. I want to use vector graphics, exported from Matlab (*.eps) but I know, that this is not possible (for some reason) - just image files like *.jpg or *.png. Is there a way to tell latexmk to workaround that drawback or will there be no vector graphics for me in near future?

Sorry in case I bring up the issue again - but after quite some time with LaTeX it's still not clear to me...

Martin Scharrer
  • 262,582
Eric
  • 2,587
  • 5
  • 23
  • 26

1 Answers1

7

You can still export from Matlab in EPS format, if you need this for other purposes and load the epstopdf package that, in recent TeX distributions, will spawn an on-the-fly conversion:

\usepackage{graphicx}
\usepackage{epstopdf}

On the other hand, directly exporting in PDF from Matlab could be the faster solution.

egreg
  • 1,121,712
  • My last attempts to export figures directly to pdf by means of builtin matlab tools was a disaster. Eventually, I wrote a script which always took the fig -> eps -> pdf route. If I am not mistaken, matlab failed to produce bounding boxes for the pdf exports. But perhaps this has been solved in recent matlab versions (my information is two years old). – Christian Feuersänger Nov 10 '11 at 22:12
  • I should have said that I used print -depsc <filename> or print -dpdf <filename> in matlab. – Christian Feuersänger Nov 10 '11 at 22:14