The PGF/TikZ manual states in section 12.4 Using Graphic Options, page 120 (v2.10), that TikZ styles can be set using:
\tikzset{my style/.style={<tikz options>},...}
However, in several places in the same manual the otherwise undocumented macro \tikzstyle
is used for settings styles:
\tikzstyle{my style}=[<tikz options>]
I also have seen this usage in several online code examples.
Why are there two ways to set TikZ styles and which one should be used for new code?
Note: I actually know the answer but think that such a question with good answers would be beneficial for other users.
Best Answer
Someone on pgf-users list writes to T Tantau :
Answer of Till Tantau :
Now I think if you find some
\tikzstyle
in several places in the manual It's because it's not very important in these cases and perhaps the author forgot to correct the very big document.Remarks:
The full answer can be found online at http://osdir.com/ml/tex.pgf.user/2007-08/msg00004.html
The answer continued:
I never try this because I don't use
\tikzstyle
.For pgfplots, see page 8 of the pgfplots manual [revision 1.8]:
Then, on page 280: