[texhax] \pdfoutput

Konstantin Karapetyan texnic at photonica.ru
Sat Jun 18 12:54:38 CEST 2005


> As I know, the code "\newif\ifPDF" will create a boolean variable whose value
> is set to FALSE. So we may use:

> \newif\ifPDF
> \ifx\pdfoutput\undefined
> \else\ifnum\pdfoutput > 0\PDFtrue
> \fi
> \fi

You are right, thank you! More information at
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=ifpdf

Can anybody here explain, why we need \relax and what the line
\ifx\pdfoutput\relax
means at all?

% From ifpdf package:
\newif\ifpdf
\ifx\pdfoutput\undefined
\else
  \ifx\pdfoutput\relax
  \else
    \ifcase\pdfoutput
    \else
      \pdftrue
    \fi
  \fi
\fi

Why cannot we just write

\newif\ifPDF
\ifx\pdfoutput\undefined\else\ifnum\pdfoutput>0\PDFtrue\fi\fi

Thank you!

Happy TeXing,
Konstantin.



More information about the texhax mailing list