[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [OT] latex, pdflatex and graphics formats



Hello Johann

I'm not sure if we understand each other. I'll ask you what is unclear in comments below:
Johann Spies schrieb:

\newif\ifpdf
\ifx\pdfoutput\undefined
   \pdffalse
   \documentclass[dvips,12pt,a4paper]{article}
\else
   \pdfoutput=1 \let\special\message
   \pdftrue
   \documentclass[pdftex,12pt,a4paper]{article}
\fi
This determines if I run pdflatex file.tex or latex file.tex and changes the documentclass accordingly, right? Cool, I always had to do that by hand.

\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}
This is my point: I want to be able to put \includegraphics{outfile-of-gnuplot} (this means outfile-of-gnuplot.eps) in the text without having to convert it from .eps to .png. (Or am I too silly to see that .mps stands for .ps and .eps?)

\else
     \DeclareGraphicsExtensions{.eps,.ps}

Same here: \includegraphics{scanned-image} won't find scanned-image.png, will it?

\fi

\end{document}               % End of document
Sorry I'm not sitting in front of my own box, no latex here, so no chance to try it out at the moment.
I will try this evening and come back to you tomorow. Thanks so far

joerg



Reply to: