Re: Keeping the \tikzstyle command
Till Tantau <till.tantau <at> gmx.de>
2007-08-02 15:27:53 GMT
Hello everyone,
I'm a bit undecided on this.
First, for compatibility reasons \tikzstyle will be around
indefinitely, so the real question is what will be better for new code.
The reason I'm trying to kick out the \tikzstyle is that I would like
to encourage people to keep style settings as local as possible. So,
normally, style definitions should be given at the beginning of a
picture as in
\begin{tikzpicture}
[some options,
first style/.style={blah},
second style/.style={blub}]
...
\end{tikzpicture}
Then, if the tikzpicture is moved/copied/whatever, the styles are
moved around with it. Furthermore, styles given as options always
apply to the whole scope and end with it automatically.
However, I'm also not quite sure whether this argument is all that
convincing. Global styles still have to be set globally using
\tikzset anyway...
I have started to change the whole documentation code to the new
system and it does not seem to change the readability much.
Anyway, you can now say things like
\tikzstyle{my style}=[draw=#1,fill=#1!20]
and I have actually extended the syntax of \tikzstyle so that one can
also provide a default argument as in
\tikzstyle{my style}[red]=[draw=#1,fill=#1!20]
More comments on this would be appreciated.
Best regards,
Till
Am 02.08.2007 um 17:01 schrieb Björn Steffen:
> Hi Till Tantau,
>
> I noticed that you introduced a new key management facility into pgf.
> This is great because the new system is a lot more powerful. Specially
> for library writers the new pgfkeys package is useful. But I consider
> the new syntax for specifying styles too cumbersome for the "ordinary"
> user.
> \tikzset{my style/.style={some options,...}}
>
> I suggest keeping the old syntax,
> \tikzstyle{my style}=[some options,...]
> since it is much easier to read and understand. The new syntax would
> be for the more "advanced" users and library writers.
>
> Just my thoughts about the topic. Keep up the wonderful work on TikZ.
>
> Best regards,
> Björn
> ----------------------------------------------------------------------
> ---
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a
> browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> pgf-users mailing list
> pgf-users <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pgf-users
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/