Linux texworks script to include eps figures in latex pdf

Using eps figures can help you to create good-looking pdf files for your papers/reports. Such files can be easily generated from bitmaps or vector graphics with Inkscape.

Nevertheless, using eps files in latex manuscript might not be as easy as it should be. Many examples of latex compilation in the internet focus on pdfLatex, which can not manage eps files.

Here I show the way I work:

1.- Download a latex compiler (typically already included in Ubuntu linux):

>sudo apt-get install texLive texlive-latex-extra

2.- Install texworks:

>sudo apt-get install texworks

3.- Create a build script (build.sh) that contains the following calls:

#!/bin/sh

latex “$1.tex” && bibtex “$1.aux” && latex “$1.tex” && latex “$1.tex” && dvipdfmx “$1.dvi”

4.- Set execution permissions to the file:

>sudo chmod +x build.sh

5.- Add it to the scripts in texworks Edit/Preferences, call it as you want (e.g. latex/bibtex/dvipdfmx as I did), and set $basename as argument.

6.- Now, you have it in the texworks compile button!

When you press the button, the process chain will call latex, bibtex and dvidpfmx to create the dvi, aux and the pdf files, reading the eps figures without problems.

Hope it helps!

This entry was posted in Latex and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s