<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<div class="" style="word-wrap:break-word">I am trying to set up an association between certain numbers (positions in a braid diagram) and colors.
<div class=""><br class="">
</div>
<div class="">The macro</div>
<div class="">
<blockquote type="cite" class="">
<div class="">\newcommand{\strandcolor}[1]{\ifthenelse{\equal{#1}{1}}{orange}</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>{\ifthenelse{\equal{#1}{2}}{black}</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>{\ifthenelse{\equal{#1}{3}}{red}</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>{\ifthenelse{\equal{#1}{4}}{purple}</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>{\ifthenelse{\equal{#1}{5}}{green}{}</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>}</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>}</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>}</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>}</div>
<div class="">}</div>
<div class=""><br class="">
</div>
</blockquote>
<div class=""><br class="x_webkit-block-placeholder">
</div>
<div class=""><span class="x_Apple-style-span" style="border-collapse:separate; line-height:normal; border-spacing:0px"><span class="x_Apple-style-span" style="border-collapse:separate; color:rgb(0,0,0); font-family:Helvetica; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; orphans:2; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px">
<div class="" style="word-wrap:break-word"><span class="x_Apple-style-span" style="border-collapse:separate; color:rgb(0,0,0); font-family:Helvetica; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; orphans:2; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px">
<div class="" style="word-wrap:break-word">
<div class="" style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; font-size:12px">
<font face="Helvetica" size="3" class="" style="font:normal normal normal 12px/normal Helvetica">Seems to work fine: if I follow it with a multi do statement it prints out the names of the colors in order.</font></div>
<div class="" style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; font-size:12px">
<font face="Helvetica" size="3" class="" style="font:normal normal normal 12px/normal Helvetica"><br class="">
</font></div>
<div class="" style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; font-size:12px">
<font face="Helvetica" size="3" class="" style="font:normal normal normal 12px/normal Helvetica">However, when I try to use it in the following macro</font></div>
<div class="" style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; font-size:12px">
<font face="Helvetica" size="3" class="" style="font:normal normal normal 12px/normal Helvetica">
<blockquote type="cite" class="">
<div class="" style="margin:0px">\newcommand{\colornode}[5]{\rput*(#4,#5){\circlenode[linecolor=white]{V#1#2}{\textcolor{\strandcolor{#3}}{$\boldsymbol{\scriptsize{#3}}$}}}}</div>
</blockquote>
<div class="">
<div class="" style="margin:0px"><br class="">
</div>
</div>
<div class="" style="margin:0px">I get the error message that \equal is an undefined control sequence. Is there something about expanding or protecting macros that I am missing, or what other stupid mistake have I made. Attached is the pared-down total source
code and log of the (unfinished) run..</div>
<div class="" style="margin:0px"><br class="">
</div>
<div class="" style="margin:0px"></div>
</font></div>
</div>
</span></div>
</span></span></div>
</div>
</div>
<div style="word-wrap:break-word">
<div>
<div><span class="x_Apple-style-span" style="border-collapse:separate; line-height:normal; border-spacing:0px"><span class="x_Apple-style-span" style="border-collapse:separate; color:rgb(0,0,0); font-family:Helvetica; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; orphans:2; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px">
<div style="word-wrap:break-word"><span class="x_Apple-style-span" style="border-collapse:separate; color:rgb(0,0,0); font-family:Helvetica; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; orphans:2; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px">
<div style="word-wrap:break-word">
<div style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; font-size:12px">
<font face="Helvetica" size="3" style="font:normal normal normal 12px/normal Helvetica">
<div style="margin:0px"></div>
</font></div>
</div>
</span></div>
</span></span></div>
</div>
</div>
<div class="" style="word-wrap:break-word">
<div class="">
<div class=""><span class="x_Apple-style-span" style="border-collapse:separate; line-height:normal; border-spacing:0px"><span class="x_Apple-style-span" style="border-collapse:separate; color:rgb(0,0,0); font-family:Helvetica; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; orphans:2; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px">
<div class="" style="word-wrap:break-word"><span class="x_Apple-style-span" style="border-collapse:separate; color:rgb(0,0,0); font-family:Helvetica; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; orphans:2; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px">
<div class="" style="word-wrap:break-word">
<div class="" style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; font-size:12px">
<font face="Helvetica" size="3" class="" style="font:normal normal normal 12px/normal Helvetica">
<div class="" style="margin:0px"></div>
<div class="" style="margin:0px"><br class="">
</div>
<div class="" style="margin:0px"><br class="">
</div>
Zbigniew Nitecki</font></div>
<div class="" style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; font-size:12px">
<font face="Helvetica" size="3" class="" style="font:normal normal normal 12px/normal Helvetica">Department of Mathematics</font></div>
<div class="" style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; font-size:12px">
<font face="Helvetica" size="3" class="" style="font:normal normal normal 12px/normal Helvetica">Tufts University</font></div>
<div class="" style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; font-size:12px">
<font face="Helvetica" size="3" class="" style="font:normal normal normal 12px/normal Helvetica">Medford, MA 02155</font></div>
<div class="" style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; font:normal normal normal 12px/normal Helvetica; min-height:14px; font-size:12px">
<br class="">
</div>
<div class="" style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; font-size:12px">
<font face="Helvetica" size="3" class="" style="font:normal normal normal 12px/normal Helvetica">telephones:</font></div>
<div class="" style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; font-size:12px">
<font face="Helvetica" size="3" class="" style="font:normal normal normal 12px/normal Helvetica">Office<span class="x_Apple-converted-tab"> </span>(617)627-3843</font></div>
<div class="" style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; font-size:12px">
<font face="Helvetica" size="3" class="" style="font:normal normal normal 12px/normal Helvetica">Dept.<span class="x_Apple-converted-tab"> </span>(617)627-3234</font></div>
<div class="" style="margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; font-size:12px">
<font face="Helvetica" size="3" class="" style="font:normal normal normal 12px/normal Helvetica">Dept. fax<span class="x_Apple-converted-tab"> </span>(617)627-3966</font></div>
<a href="http://www.tufts.edu/~znitecki/" class="">http://www.tufts.edu/~znitecki/</a></div>
</span><br class="x_Apple-interchange-newline">
</div>
</span><br class="x_Apple-interchange-newline">
</span><br class="x_Apple-interchange-newline">
</div>
<br class="">
</div>
</div>
</body>
</html>