[texhax] \newif, \csname and \endcsname

Vafa Khalighi vafakhlgh at gmail.com
Mon Jan 31 08:14:15 CET 2011


\documentclass{article}

\newif\ifok

\newif\ifnotok

\newcommand{\printtest}{%

\csname ifok\endcsname\csname ifnotok\endcsname print test\fi\fi}

\begin{document}

This is a test

\printtest

\end{document}


Tex complains that there is an "Extra \fi", why?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texhax/attachments/20110131/12332113/attachment.html>


More information about the texhax mailing list