[texhax] if condition: is macro body empty?

Philip G. Ratcliffe philip.ratcliffe at uninsubria.it
Thu Feb 12 11:02:59 CET 2009

Sorry, I should've been more carefully.  The following does work properly
(i.e., it's ok even when \buffer remains empty).  Evidently, \newcommand
does something strange (I left it in for the useual protection against
inadvertently overwriting a previous definition), but \def is obviously
cleaner.  The conditional should then also be \ifx and not \if.


	\g at addto@macro{\buffer}{\item #1}%


% create a list of items:
\fillbuffer{First part.}
\fillbuffer{Second part.}
\fillbuffer{Third part.}
\fillbuffer{Fourth part.}

% now print the item list:

This works:

Unfortunately I need some conditionals like this: 


Cheers,   Phil

More information about the texhax mailing list