Hi all,<br><br>I&#39;m trying to define a command that changes it&#39;s behavior depending on whether the class file defines chapters or not.&nbsp; Is there an easy way to test for whether a macro is defined?&nbsp; I&#39;d like to do something like this:<br>
<br>\newcommand{\todo}[2][]<br>\stepcounter{TodoCounter}<br>\ifx &lt;\chapter is defined&gt;<br>\addcontentsline{tdo}{todo}{\textbf{\arabic{chapter}.\arabic{section}-\arabic{TodoCounter}:} #2}<br>\else<br>\addcontentsline{tdo}{todo}{\textbf{\arabic{section}-\arabic{TodoCounter}:} #2}<br>
\fi<br>}<br><br>Can anyone let me know what the correct way to test for this is?&nbsp; Thanks!<br><br>-- Chris<br><br><br><br>