I am trying to include MATLAB figures as pdf files in my thesis. However after reinstalling my OS this doesn't work anymore and I am desperately trying to find a solution...

What I do: I use the function matlabfrag.m to export the .fig files to .eps and .tex files. This works perfectly fine. Then I create a temporary .tex file. This file contains the command


which replaces the standart MATLAB font with latex commands formulas etc. specified in the figurename.tex file. This temporary .tex file is then used to create a .pdf file with the command

pdflatex -shell-escape --src -interaction=nonstopmode tempfilename.tex 

So far so good. Before I reinstalled my OS everything worked fine. Now I get the Error:

Package pstool Warning: Execution failed during process: ps2pdf -dAutoFilterColorImages=false -dAutoFilterGrayImages=false -dColorImag eFilter=/FlateEncode -dGrayImageFilter=/FlateEncode -dPDFSETTINGS=/prepress "70 00_CFC60_acc_single-pstool.ps" "7000_CFC60_acc_single-pstool.pdf" This warning occurred on input line 16.

LaTeX Font Info: Try loading font information for T1+aett on input line 16. (/usr/share/texlive/texmf-dist/tex/latex/ae/t1aett.fd File: t1aett.fd 1997/11/16 Font definitions for T1/aett. ) runsystem(echo " === pstool: end processing === ")...executed.

runsystem(rm -- 7000_CFC60_acc_single2.oldaux)...executed.

[1 Non-PDF special ignored!{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] (./7000_CFC60_acc_single2.aux)

LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.

) (\end occurred when \ifx on line 16 was incomplete)

The .ps file looks perfectly alright. As the error suggests the problem must be .ps >> .pdf. I also stripped down the .tex file to a bare minimum, however only encountered other errors. Here is my temporary tempfilename.tex file:

\documentclass[11pt, oneside]{article}



I hope someone can help me :)

  • Do you know that you can export your Matlab figures to pdf directly? – jub0bs Jan 12 '14 at 17:20
  • 1
    Yes, I know. However in that case I do not have the latex font, only the standart matlab font for legends, axis-name, units etc. – alukar Jan 12 '14 at 17:31
  • You can also try matlab2tikz and/or matfig2pgf. There is also plot2svg which converts in to svg and then use inkscape to get tikz code. This is more reliable. Read: matlab figures with latex fonts – user11232 Jan 13 '14 at 0:16

Your Answer

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

Browse other questions tagged or ask your own question.