Illustrator, EPS and LaTeX

lokakuu 30, 2008

Ironically, Adobe Illustrator creates malformed files when you save your illustrations as EPS, and of course LaTeX, ghostscript and thus pdflatex choke on them. There’s however a simple remedy: the eps2eps “distiller” strips all non-essential parts away from EPS files thus fixing also malformed AI EPS files.

For reference, here’s the gist of my (unoptimized) eps2pdf script I use before I run pdflatex:

#!/bin/bash
mkdir temp-eps-eps
for file in *.eps; do
    echo -e "$file";
    eps2eps $file temp-eps-eps/$file;
    cd temp-eps-eps;
    epstopdf $file --outfile=`echo -e $file | sed -e "s/\.eps/\.pdf/g"`;
    mv `echo -e $file | sed -e "s/\.eps/\.pdf/g"` ..;
    rm $file;
    cd ..;
done
rmdir temp-eps-eps

This should be called in the directory whose EPS files you wish to convert to PDF.

And why do I use EPS? Pretty much any vector graphics application supports it. Pretty often, saving your illustrations directly as well-behaving PDFs can be much more difficult than using EPS.

This needs to be done whenever a new kernel is installed. (Sometimes a newer version of VBox is needed as well, if the current one does not support the new kernel.)

sudo /etc/init.d/vboxdrv setup

Just run:

iconv -f from -t to < input > output

where for example from=ISO88591 and to=UTF8

This guide saved my day: Pulseaudio Fedora 8 Howto. Now I can play MIDI music with TiMidity++ and sounds at the same time, which is good for playing DOS games :)

dd if=/dev/cdrom of=image.iso