dot2tex
dot2tex copied to clipboard
URL attribute neglected - active hyperlinks lost
When dot code contains the URL
attribute such as this:
digraph G {
node [shape="circle"];
x -> y [label="hotlink", URL=<https://github.com/kjellmf/dot2tex/issues/69>];
}
the attribute is being ignored and the resulting LaTeX code does not have the link. The output is something like this:
\begin{tikzpicture}[>=latex,line join=bevel,]
[...]
\draw (74.932bp,42.257bp) node {$hotlink$};
[...]
\end{tikzpicture}
That's just a label named "hotlink" with no effect when clicked. This is what it should be:
\usepackage{hyperref}
[...]
\begin{tikzpicture}[>=latex,line join=bevel,]
[...]
\draw (74.932bp,42.257bp) node {\href{https://github.com/kjellmf/dot2tex/issues/69}{hotlink}};
[...]
\end{tikzpicture}
This should be pretty straightforward to implement. I'll add it to my todo list, but dot2tex is unfortunately low on my priority list at the moment.
Ref: https://www.graphviz.org/doc/info/attrs.html#d:URL https://www.graphviz.org/doc/info/attrs.html#k:escString