I'm creating a customisable TikZ pic where I want to enable or disable certain parts of it (e.g. some labels).
Is there a style that I can pass to a node, pic, path or so that doesn't visibly draw it?
So basically like draw=none, except that it should also extend to text, fill and so on.
One first try would be \tikzset{none/.style={draw=none,fill=none,text opacity=0}}, but I can't believe there is no "proper solution" for this. Maybe there is, and I just don't know which style to look for.
See for example how my first try could be used:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[bla/.pic={\node {A};},none/.style={draw=none,fill=none,text opacity=0}]
\pic at (0,0) {bla};
\pic[none] at (2,0) {bla};
\node at (0,2) {B};
\node[none] at (2,2) {B};
\draw (0,4) -- node[right] {C} (0,5);
\draw[none] (0,4) -- node[right] {C} (0,5);
\end{tikzpicture}
\end{document}
Edit: As Percusse points out, it might be hard to make TeX actually not draw it, so maybe it's easier to ask how to invisibly draw it.
return to default style. Because all keys must be swept to reset everything. Instead draw your picture with that option in mind and appendnoneto stuff that you want to turn off. Then you can activate/deactivate on demand. – percusse Dec 01 '14 at 12:15