Wednesday, August 30, 2006

Latex eps figures

Sometimes, when compiling a LaTex file, we may meet the following error:
LaTeX Error: Cannot determine size of graphic in 'figure'.eps (no BoundingBox). This is caused by EPS images without indicating proper boundings. Moreover, using the LaTex compiling button, you can only use .eps format figures (employ GSview to export it again), with PdfLaTex you cannot use .eps but .png, .jpg or .pdf.

How to generate proper EPS files:

  1. MATLAB Plots: export figures to EPS level 2 color in MATLAB
  2. Bitmap images: first, use the command imshow to show the images and then export figures to EPS level 2 color in MATLAB.
  3. Print images into EPS format (you don't need to buy Acrobat, free software, such as PDF creator can do it well). Or print the documents into PDF format first, then crop the images in Acrobat and save as EPS format (sometimes the stupid Acorbat will tell you it encounters a color space error, cannot save the images as EPS format. Changing the output of EPS to PostScript language level 2 will help to solve this problem ).
  4. Use any image processing softwares, convert the images into EPS images, then use GSview to export them to EPS again (the latter procedure is to overcome the LaTex error).

© Wenbin

No comments:

Post a Comment