# [OS X TeX] ifthen

Michael Sharpe msharpe at ucsd.edu
Tue Jun 14 22:50:44 CEST 2016

> On Jun 14, 2016, at 1:10 PM, Nitecki, Zbigniew H. <Zbigniew.Nitecki at tufts.edu> wrote:
>
> 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..
>
It  works if you replace your definition  of \strandcolor with

\def\strandcolor#1{%
\ifcase#1 %
\or orange%
\or black%
\or red%
\or purple%
\or green%
\fi}

Michael
----------- 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