Is there a convention in TikZ for defining a new style as an extension of an existing style?
As it stands, I can do:
a/.style = { black, very thin }
Then I could extend this style locally within, e.g., a scope:
\begin{scope}[a/.append style = { thick }]
…
\end{scope}
or I could define an entire new style:
b/.style = { black, thick }
but this requires replicating the shared style information across both a
and b
.
It seems there could be some way of specifying b
as an extension of a
(everywhere equivalent to "appending" b
's definitions to a
's definitions), akin to:
b/.style = { extends = a, thick }
or:
b/.inherits = a,
b/.style = { thick }
Is there a canonical answer in TikZ beyond just "use a TeX macro to define the shared contents"?
b/.style={a, thick}
, orb/.style={a}
and then somewhereb/.append style={thick}
..style
is.inherits
but you will need to use.append style
then (or.prefix style
if settings froma
should overwrite those given in.prefix style
). – Qrrbrbirlbel Oct 9 '13 at 22:07