[texhax] \pdfoutput
Konstantin Karapetyan
texnic at photonica.ru
Sat Jun 18 09:34:13 CEST 2005
You should use \ifnum\pdfoutput > 0. Here is the definition I use in
my style file:
\newif\ifPDF
\ifx\pdfoutput\undefined\PDFfalse
\else\ifnum\pdfoutput > 0\PDFtrue
\else\PDFfalse
\fi
\fi
Example of use:
\ifPDF
\pdfpagewidth=\paperwidth
\pdfpageheight=\paperheight
\RequirePackage[pdftex]{graphicx}
\else
\RequirePackage[dvips]{graphicx,color}
\fi
HTH.
Happy TeXing!
Konstantin.
> I would like to ask whether the following checking is correct.
> [tex]
> \newif\ifpdf
> \ifx\pdfoutput\undefined\relax\else\ifnum\pdfoutput=1\relax\pdftrue\fi\fi
> [/tex]
> I mean that whether using "\ifnum\pdfoutput=1" gives the best result? Or we
> must use "\ifnum\pdfoutput>1" ??
> Thank you for reply.
More information about the texhax
mailing list