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'm including the dvisvgm svg output of tikz in an html page, and I would like to be able to refer to some specific elements to eg restyle them or animate them via javascript.
To this end, it would be extremely useful if dvisvgm could add a id attribute matching the named tikz nodes & paths, algonside some class information (for instance, node, the shape -- circle, etc).
For instance,
\documentclass[tikz,dvisvgm]{standalone}
\begin{document}
\begin{tikzpicture}
\node[draw] (node1) at (0,0) {Hello world};
\node[draw, shape=circle] (node2) at (1,1) {Hello world 2};
\path (node1) edge[->,name=edge1] (node2);
\end{tikzpicture}
\end{document}
Brief outline of the proposed feature
Issue originally reported in
dvisvgm
: mgieseki/dvisvgm#270I'm including the
dvisvgm
svg output of tikz in an html page, and I would like to be able to refer to some specific elements to eg restyle them or animate them via javascript.To this end, it would be extremely useful if
dvisvgm
could add aid
attribute matching the named tikz nodes & paths, algonside some class information (for instance,node
, the shape --circle
, etc).For instance,
would generate something like:
This would require tikz to expose the names to the
dvisvgm
backend. Would it be feasible?Usage example
No response
The text was updated successfully, but these errors were encountered: