You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am experiencing problems when a notebook contains more than one itikz drawing. Somehow the text labels in the second drawing is corrupted. In the below example, if you enter the code into three separate cells, in the second plot instead of a and y the text labels show x and z.
What I Did
%load_ext itikz
%%itikz --implicit-pic --file-prefix aa- --tikz-libraries=positioning,shapes,shadows,arrows
\tikzstyle{node}=[circle, draw=black, text centered, text width=0.5cm]
\node[node] (I-0) at (0,-0) {$x$};
\node[node] (O-0) at (3,-0) {$z$};
%%itikz --implicit-pic --file-prefix ab- --tikz-libraries=positioning,shapes,arrows
\tikzstyle{node}=[circle, draw=black, text centered, text width=0.5cm]
\node[node] (I-0) at (0,0) {$a$};
\node[node] (G-0) at (3,-0) {$y$};
The text was updated successfully, but these errors were encountered:
I think I know what's happening. Are you using Jupyter lab or Jupyter notebook? I'm assuming the latter, as I replicated the problem in notebook but failed to do so in lab. If you're using notebook, give it a try in lab and see if the problem persists. (I don't mean this as a solution; it's diagnostic.)
I'm not sure if there is an easy fix here. The SVGs are isolated at generation time so you can extract them and process accordingly, but in a joined document they share IDs and get garbled. It would be nice if there was a way to mangle identifiers so they didn't do this but I'm not aware of a simple way of doing so.
How do you work around this problem? I've resorted to using itikz to generate an SVG and then just drop the cell and embed the result (as an image). I wish there was a better option!
Description
I am experiencing problems when a notebook contains more than one itikz drawing. Somehow the text labels in the second drawing is corrupted. In the below example, if you enter the code into three separate cells, in the second plot instead of a and y the text labels show x and z.
What I Did
%load_ext itikz
%%itikz --implicit-pic --file-prefix aa- --tikz-libraries=positioning,shapes,shadows,arrows
\tikzstyle{node}=[circle, draw=black, text centered, text width=0.5cm]
\node[node] (I-0) at (0,-0) {$x$};
\node[node] (O-0) at (3,-0) {$z$};
%%itikz --implicit-pic --file-prefix ab- --tikz-libraries=positioning,shapes,arrows
\tikzstyle{node}=[circle, draw=black, text centered, text width=0.5cm]
\node[node] (I-0) at (0,0) {$a$};
\node[node] (G-0) at (3,-0) {$y$};
The text was updated successfully, but these errors were encountered: