I am a fan of \foreach loops in tikz, but often find myself in a situation where I want to make an exception for a single iteration of the loop. For example,
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[every node/.style={draw, circle}]
\node[label=above:a] (a) at (3,1) {};
\node[label=below:b] (b) at (3,-1) {};
\foreach \i in {0,1,2,3,4,5,6} {
\node[label=above:\i] (x\i) at (\i, 0) {};
\draw (x\i)--(b);
}
\draw (a)--(x3);
\end{tikzpicture}
\end{document}
I would like to have label=right:\i for node 3 since otherwise it intersects the edge to a. I can think of some ugly solutions (e.g., taking this case out of the loop and copying the code with the difference for it alone), but do you have any nicer way to achieve this?
