I want to draw some points on a grid with the condition x-y>1
, and I write the following code:
\documentclass[tikz]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\foreach\x in{1,...,10}{
\foreach\y in{1,...,10}{
\ifnum \x-\y>1
\shade[ball color=red] (\x,\y) circle (0.2cm);
\else
\relax
\fi
}
}
\end{tikzpicture}
\end{docume
The code above can't be compiled successfully.
ifthen
package.\if...\fi
would suffice.