I try to hide a tikzpicture :

Depending on a boolean, I want to see or not the tikzpicures of a document (show them on display, but hide them on paper) in order to students draw them. The hidden tikzpicture as to leave its blank space.

\vpanthom or \hphantom don't work.


You can combine the every picture style and execute at end picture:

%\hidepicstrue % uncomment to hide tikzpicture

\tikzset{every picture/.append style={
execute at end picture={
\fill [white] (current bounding box.south west) rectangle (current bounding box.north east);

Something here.

\node at (0,0) {A};
\node at (2,5) {B};

More text.

\node at (0,0) {A};
\node at (2,2) {B};



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.