Volker Maximillian Koch, Zurich, Switzerland

Home Resume Information Search Contact

LaTeX, MiKTeX, and WinEdt Tips

 

How to delete a small part of a drawing in a PDF document?

  • This is an open question. Please email me if you have a (preferably free) solution.

 

Creating EPS files for LaTeX from an image

  • Copy the image into the clipboard
  • Open Adobe Acrobat Standard and go to File - Create PDF - From Clipboard Image
  • Go to File - Save As and select the EPS extension

 

Similarly: creating EPS files from PNG images (e.g. screenshots)

  • Use Adobe Acrobat Standard
  • File --> Create PDF--> From File
  • If you want to create a PDF file with your newly created EPS file using MiKTex, see MiKTex settings below!

 

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

 

MiKTex Settings

  • The command-line parameter "dEncodeColorImages=false" is important. Without it, ps2pdf will produce JPEG-like artifacts in screenshots that were originally bitmap images (e.g., png).

 

Creating EPS files for LaTeX from complicated 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));
plot(x,y,'--rs','LineWidth',2,...
'MarkerEdgeColor','k',...
'MarkerFaceColor','g',...
'MarkerSize',10)
xlabel('\omega t')
print -depsc2 test.eps

 


 

Exporting Figures for Publication

  • This article describes how to turn figures into publication-ready Encapsulated Postscript (EPS) files
 

Links to LaTeX tip

 


 

Creating EPS files with correct bounding boxes from any Windows program using OLETeX

  • This method creates large EPS files. I usually use Adobe Acrobat as describe above to convert images to EPS.
  • Creating EPS figures with correct bounding boxes can be tricky when using Windows. OLETeX is a free tool that does exactly this. Here is how it works.
  • Copy a picture to the clipboard.
  • Start the OTEditor of OLETeX and copy the image from the clipboard to a new OLETeX document by using Edit-Paste and OK.
  • Convert the picture to an EPS file by using OLETeX-Convert Current.

 

Including screenshots as EPS using Windows XP

  • The disadvantage of this technique is that the images might not be as sharp as wanted since the PNG file format is not a vector format. If possible create a PDF file as described above.
  • A better method is to use Adobe Acrobat Standard (see above).
  • Creating an EPS file with a working bounding box sometimes doesn't work on Windows.
  • Do a screenshot with IrfanView and save it as a PNG file.
  • Then import this into Inkscape.
  • Inkscape allows to save the picture as an EPS file, which works well with LaTeX.
  • Keep the PNG file in the same directory as the EPS file so that it can be used for PDF LaTeX.

 

12/2006