I am doing something simple with tikz, but code keeps not compiling. I would like to have something like this:
\foreach \x in {0,...,4}
\foreach \y in {0,...,4}
\ifthenelse{mod(\x, 2)=0 \AND \y=3 }{ \node (\x\y) at (1.5*\x,1.5*\y) { $e^{l+1}_{1}$ };} {};
What is correct tikz syntax for this?
\pgfmathifthenelse{and(mod(\x,2)=0,\y=3)}{...}{}should do it. If not, please provide a minimal working example (MWE), which shows your problem – Mike Nov 15 '17 at 20:57\pgfmathifthenelse{mod(\i,2)=0}{\node at (\i,\i) {$A$}}{\node at (\i,\i) {$B$}}, but it appears to always just write $B$. That is, it always takes the second branch of the ifthenelse. – Thomas Ahle Feb 09 '19 at 12:59