I would like to do something like:
using PGF styles in TikZ
Here is the code:
\documentclass[tikz,convert={outfile=mwe.png}]{standalone}
\begin{document}
\pgfkeys{%
/tikz/style A/.style = {text=blue},
/tikz/style B/.style = {text=red},
}
\begin{tikzpicture}
\node [thin, draw, style A] at (1,3) {Style A};
\node [thin, draw, style B] at (1,2) {Style B};
\node [thin, draw] at (1,1) {Style A + Style B};
\end{tikzpicture}
\end{document}
But the "Style A + Style B" is always the same color. How can I do to get "Style A" in style A and "Style B" in style b and the "+" in the node style?
Of course I could use something like {\color{blue}Style A} + {\color{red}Style B} but it's not very flexible. I prefer to use styles instead.
Thanks in advance.



\node [thin, draw] at (1,1) {\tikzusestyle[style a]{Style A} + \tikzusestyle[style a]{Style B}};or something similar. – renard Aug 04 '16 at 11:35