On Tue, Nov 26, 2002 at 01:42:35PM +0100, Jörg Johannes wrote: > For my documents, I have to use both LaTeX and pdfLaTeX. The problem I > have is, pdflatex does not (at least per default) understand .eps and > .ps files. So I have to convert my .eps figures from gnuplot into .png > for pdflatex in order to use them. The other way round, "normal" LaTeX > does not understand the .png format, so any photos or scanned-in images > have to be converted into .ps. My question now is: Are there any > \usepackage{s} for making use of .ps in pdflatex and .png in LaTeX? > Anything better than > for i in *.eps; do convert $i `echo $i | sed s/.eps/.png/` > ?
To solve this problem I use this in my template (I can't remember whether this list or the latex newsgroup helped me with it): ----------------- \newif\ifpdf \ifx\pdfoutput\undefined \pdffalse \documentclass[dvips,12pt,a4paper]{article} \else \pdfoutput=1 \let\special\message \pdftrue \documentclass[pdftex,12pt,a4paper]{article} \fi .... \ifpdf \usepackage[hyperindex=true]{hyperref} \usepackage{pslatex} \pdfcompresslevel=9 \else \usepackage[dvips]{graphicx} \usepackage[hypertex,hyperindex=true,colorlinks=false]{hyperref} \fi .... \begin{document} % End of preamble and beginning of text. \ifpdf \DeclareGraphicsExtensions{.png,.pdf,.jpeg,.jpg,.mps} \else \DeclareGraphicsExtensions{.eps,.ps} \fi \end{document} % End of document ------------------------------------- Regards. Johann -- Johann Spies Telefoon: 021-808 4036 Informasietegnologie, Universiteit van Stellenbosch "In the beginning God created the heaven and the earth." Genesis 1:1 -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]