[texhax] Why pdftex in dvi mode and in pdf mode works differently?

Philip Taylor P.Taylor at Rhul.Ac.Uk
Wed Feb 15 10:18:52 CET 2017



Philip Taylor wrote:
> It is not a feature of PdfTeX, Igor, nor is it related to whether or not DVI/PDF output is selected -- exactly the same behaviour is manifested by the following, independent of engine, etc.
>
> \iffalse
>
>      \def \a #1#2{\myif #1\else #2\fi}
>
> \fi
>
> \end
>
I suppose I should have added :

your "\else" and "\fi" associate themselves with the initial "\iffalse" rather than with your "\myif" as presumably intended.  The behaviour would be very different were you to follow Knuth's guidance and use not "\myif" but a real \if declared with \newif :

> \newif \ifmy
>
> \iffalse
>
>      \def \a #1#2{\ifmy #1\else #2\fi}
>
> \fi
>
> \end
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texhax/attachments/20170215/5403ba72/attachment.html>


More information about the texhax mailing list