<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.5848" name=GENERATOR></HEAD>
<BODY style="MARGIN: 4px 4px 1px; FONT: 10pt Tahoma">
<DIV>Thank-you, I will try this.</DIV>
<DIV>&nbsp;</DIV>
<DIV>K<BR><BR>&gt;&gt;&gt; Andy Lin &lt;kiryen@gmail.com&gt; 25/09/2009 1:05 am &gt;&gt;&gt;<BR>I originally wrote the below code for automatically labelling examples<BR>(don't know why I wanted that functionality, since it would break if I<BR>ever rearranged the examples). I'm not sure why it works, but it does:<BR>\theALabel is just a counter<BR>\newcommand{\AutoLabel}[1]{\ifthenelse{\equal{#1}{}}{\label{\theALabel}}{\label{\theALabel}\label{#1}}}<BR><BR>-Andy<BR></DIV></BODY></HTML>