I am trying to obtain nice Matlab figures in my LaTeX report and although there are many ways to achieve this, a lot of them don't work for my large data plots.

But using LaPrint gets me nice graphical results but I have a problem with my labels. They are all shown like:


I localized the problem in the fact that my TeXstudio invokes pdflatex where it should invoke latex -> dvips -> ps2pdf. How do I properly set that up? I did like this following latex-dvips-ps2pdf

I added a user command as follows:

user0: LaTex.DVIPS.PS2PDF
latex --synctex=1 -interaction=nonstopmode --shell-escape %.tex | dvips -o %.ps %.dvi| ps2pdf %.ps

and set that as default compiler command



Could not start the command: user0:LaTex.DVIPS.PS2PDF


If you set the latex command to:

latex --synctex=1 -interaction=nonstopmode --shell-escape %.tex | dvips -o %.ps %.dvi| ps2pdf %.ps

it works, only it is an ugly solution since you are inserting other commands dvips and ps2pdf into the latex command.

  • Hope the edited title is OK (if not, do change it), it seems like my suggestion more accurately describes the problem. Jan 15, 2015 at 15:19
  • Thankyou, that is indeed a better description. Halfway trough my posting I learned something that made the question a bit different.
    – MaxBaeten
    Jan 15, 2015 at 15:51

1 Answer 1


Probably the only error in the first solution was the naming of the default compiler.

You should call txs:///user0 there.

The naming pattern for user commands is <command id>:<display name> see the manual. In your case (user0:LaTex.DVIPS.PS2PDF), user0 is the id, "LaTex.DVIPS.PS2PDF" is used for the label in the Tools menu.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .