[OS X TeX] ifthen
Nitecki, Zbigniew H.
Zbigniew.Nitecki at tufts.edu
Tue Jun 14 16:10:25 EDT 2016
I am trying to set up an association between certain numbers (positions in a braid diagram) and colors.
The macro
\newcommand{\strandcolor}[1]{\ifthenelse{\equal{#1}{1}}{orange}
{\ifthenelse{\equal{#1}{2}}{black}
{\ifthenelse{\equal{#1}{3}}{red}
{\ifthenelse{\equal{#1}{4}}{purple}
{\ifthenelse{\equal{#1}{5}}{green}{}
}
}
}
}
}
Seems to work fine: if I follow it with a multi do statement it prints out the names of the colors in order.
However, when I try to use it in the following macro
\newcommand{\colornode}[5]{\rput*(#4,#5){\circlenode[linecolor=white]{V#1#2}{\textcolor{\strandcolor{#3}}{$\boldsymbol{\scriptsize{#3}}$}}}}
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..
Zbigniew Nitecki
Department of Mathematics
Tufts University
Medford, MA 02155
telephones:
Office (617)627-3843
Dept. (617)627-3234
Dept. fax (617)627-3966
http://www.tufts.edu/~znitecki/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://email.esm.psu.edu/pipermail/macosx-tex/attachments/20160614/fcb3d0fe/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: BraidPictureTest3.tex
Type: application/octet-stream
Size: 807 bytes
Desc: BraidPictureTest3.tex
URL: <https://email.esm.psu.edu/pipermail/macosx-tex/attachments/20160614/fcb3d0fe/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: BraidPictureTest3.log
Type: application/octet-stream
Size: 8456 bytes
Desc: BraidPictureTest3.log
URL: <https://email.esm.psu.edu/pipermail/macosx-tex/attachments/20160614/fcb3d0fe/attachment-0001.obj>
More information about the MacOSX-TeX
mailing list