Closed Andrew15-5 closed 1 year ago
Page 10 of the knots documentation covers this. The knot keys are in their own directory, knot diagram
, so if you want to define a key outside the knot environment then you need to use a prefix.
Right, thanks. But I have a following question. If this works:
\begin{tikzpicture}[
arrow/.style={-Triangle},
knot diagram/every knot diagram/.style={only when rendering/.style={arrow}},
]
\samecode
\begin{knot}[
% every knot diagram/.style={only when rendering/.style={arrow}},
]
\strand (a.east) -- (b.west);
\end{knot}
\end{tikzpicture}
Then why this doesn't work:
\begin{tikzpicture}[
arrow/.style={-Triangle},
% knot diagram/every knot diagram/.style={only when rendering/.style={arrow}},
]
\samecode
\begin{knot}[
every knot diagram/.style={only when rendering/.style={arrow}},
% knot diagram/every knot diagram/.style={only when rendering/.style={arrow}}, % This also doesn't work
]
\strand (a.east) -- (b.west);
\end{knot}
\end{tikzpicture}
Do I read documentation incorrectly?
The key every knot diagram
is processed at the start of the knot environment, so setting it in the options on that environment is too late.
Am I right in understanding that there is no way to set every knot diagram/.style
without adding the knot diagram/
prefix? Because this prefix is only implied in the knot
environment but setting every knot diagram/.style
in it is too late.
That is correct. I try to keep from polluting the main tikz namespace by putting my keys in families.
I want to modify example from https://github.com/loopspace/spath3/issues/22#issuecomment-1454947343 like this (just as a silly example):
But instead of
I get
There are probably more valid examples of using
every strand/.style
but it is a useful "command", right? Can it be added?