OthersRemake PDF from EPS

Information and discussion about other tools not listed above.
Post Reply
mjmottram
Posts: 4
Joined: Fri Sep 09, 2011 12:02 am

Remake PDF from EPS

Post by mjmottram »

Hi,

I hope I'm posting this in the right section:
I'm using PDFLaTeX (3.141592-1.30.4-2.2) on a Mac with OS 10.4.11 and TeTeX (old, I know). When building documents pdflatex --shell-escape is converting EPS figures to PDF every time, even when the PDF has a newer time stamp than the EPS version. I thought --shell-escape would stop this from happening? The document is my thesis and has *alot* of figures so it's really slowing down the build ... can anyone help?


Cheers
Matt

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Remake PDF from EPS

Post by kaiserkarl13 »

All "--shell-escape" does is allow "\write18{command}" to work; note that "command" can literally be any shell command, which is why it's disabled by default. I assume something in the way you're converting EPS->PDF on-the-fly uses that construct.

If you want to use the PDF files instead of the EPS files, change the includegraphics commands to something like this:

Code: Select all

% old version
% \includegraphics[options]{figure.eps}
% new version
\includegraphics[options]{figure}
If you're worried about EPS files being newer than the PDF, try this makefile:

Code: Select all

SHELL=/bin/bash

pdfs := $(patsubst %.eps,%.pdf,$(wildcard *.eps))

update-pdfs : $(pdfs)

%.pdf : %.eps
    epstopdf $<
Then you can simply type "make" or "make update-pdfs" and it will update all PDF's from the corresponding EPS files (but only if they NEED to be updated).
Post Reply