Re: [tetex 3.0] Swapping between dvi and pdf
Robin Fairbairns <[email protected]> Thu, 29 Sep 2005 19:50:31 +0100
| Newsgroups | gmane.comp.tex.tetex.general |
|---|---|
| Message-ID | <[email protected]> |
>
> I used ensure I got the right output by having constructs at the top
> of the source files like this:
>
> \newif\ifpdf
> \ifx\pdfoutput\undefined
> \pdffalse % we are not running PDFLaTeX
> \else
> \pdfoutput=1 % we are running PDFLaTeX
> \pdftrue
> \fi
>
> \ifpdf
> ... do some pdf things
> \fi
>
> \ifpdf
> \usepackage[pdftex]{color}
> \else
> \usepackage{color}
> \fi
>
> and so on.
that has never been a reliable test, since pdftex is usable to create
dvi output, and is indeed desirable in that role for various reasons.
modern distributions use pdfetex for all latex commands, and set
\pdfoutput=1 in pdflatex, \pdfoutput=0 in latex.
see http://www.tex.ac.uk/cgi-bin/texfaq2html?label=ifpdf