[OS X TeX] ifthen

Nitecki, Zbigniew H. Zbigniew.Nitecki at tufts.edu
Tue Jun 14 22:10:25 CEST 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: <http://tug.org/pipermail/macostex-archives/attachments/20160614/fcb3d0fe/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: BraidPictureTest3.tex
Type: application/octet-stream
Size: 807 bytes
Desc: BraidPictureTest3.tex
URL: <http://tug.org/pipermail/macostex-archives/attachments/20160614/fcb3d0fe/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: BraidPictureTest3.log
Type: application/octet-stream
Size: 8456 bytes
Desc: BraidPictureTest3.log
URL: <http://tug.org/pipermail/macostex-archives/attachments/20160614/fcb3d0fe/attachment-0003.obj>
-------------- next part --------------
----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://www.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
                https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex


More information about the macostex-archives mailing list