Style defined inside a foreach (or inside a TeX group)

View: New views
1 Messages — Rating Filter:   Alert me  

Style defined inside a foreach (or inside a TeX group)

by Christophe Jorssen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

The fellowing does not work because - I think - the style is defined
inside a TeX group.

\documentclass{minimal}

\usepackage{tikz}

\begin{document}

\begin{tikzpicture}
   \foreach \dummy in {0,...,2}{%
     \tikzset{Style-\dummy/.style={red}}}
   \draw[Style-1] (0,0) -- (1,1);
\end{tikzpicture}
\end{document}

Do you have an idea for a workaround?

Thanks in advance

--
Christophe

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
pgf-users mailing list
pgf-users@...
https://lists.sourceforge.net/lists/listinfo/pgf-users