Prof. Dr. Volker M. Koch, Switzerland

Homepage Contact

LaTeX Tips


My LaTeX Software Environment


LaTeX Manuals and Links



Further Downloads



  • I use pdfLaTeX. For users who would like to use psfrag and therefore need to use LaTeX, here is some information.
  • To create an EPS file from various applicatons (Eclipse source code, LTspice circuit diagrams, MATLAB code), print a PDF. Then import and modify the document with Adobe Illustrator. If you want to use psfrag, use strings that are only one character long (e.g., 'a', 'b', 'A', 'B', '0', '1') and save as EPS. (To be able to use longer strings, select "Illustrator 3 EPS" when saving the EPS file in Illustrator.)
  • After LaTeX compilation, I create PDF documents from PS with Acrobat Distiller.
  • To make forward search in Yap work when using TeXnicCenter, use the following command line arguments for latex.exe:
    --src -interaction=nonstopmode "%pm"
  • For creating figures, the following programs may be useful:


Creating EPS files for LaTeX from Eclipse source code

  • Select the source code in Eclipse
  • Print "Adobe PDF"
  • Crop it in Adobe Acrobat by using the Crop Tool or by entering the margins manually. I prefer the Crop Tool. Just click on the Crop Tool icon (see below), select a box, double click inside of the box, and press ok.

  • Save as EPS in Adobe Acrobat


Creating EPS files for LaTeX from MATLAB figures

  • Let's say you would like to include a MATLAB figure (like the one below) in a LaTeX document.

  • In the MATLAB figure, go to File - Page Setup and change the settings as below:

  • Save it as a PDF file:

  • If necessary, crop and rotate the figure in Adobe Acrobat
  • Save as EPS from Adobe Acrobat


Create an EPS file from a MATLAB figure using the command line 

  • figure;
    x = -pi:pi/10:pi;
    y = tan(sin(x)) - sin(tan(x));
    xlabel('\omega t')
    print -depsc2 test.eps
  • This article describes how to turn figures into publication-ready Encapsulated Postscript (EPS) files


Please do not hesitate to email me if you have suggestions for improving this page.