xyz2tex / dot2tex

Convert graphs generated by Graphviz to LaTeX friendly formats
Other
148 stars 43 forks source link

Error with "rounded" style and tikz format #107

Open OldKrab opened 1 month ago

OldKrab commented 1 month ago

Dot code:

digraph {
"x" [shape=box, style=rounded]
}

run with cmd:

dot2tex -ftikz example.dot

Got next tex:

Details

``` \documentclass{article} \usepackage[x11names, svgnames, rgb]{xcolor} \usepackage[utf8]{inputenc} \usepackage{tikz} \usetikzlibrary{snakes,arrows,shapes} \usepackage{amsmath} % % % % \begin{document} \pagestyle{empty} % % % \enlargethispage{100cm} % Start of code \begin{tikzpicture}[>=latex',line join=bevel,] %% \node (x) at (27.0bp,18.0bp) [draw,rectangle,rounded] {x}; % \end{tikzpicture} % End of code % \end{document} % ```

Tex fails to compile with error "Package pgfkeys: I do not know the key '/tikz/rounded' and I am going to ignore it. Perhaps you misspelled it."

I think instead of [draw,rectangle,rounded] there should be something like [draw,rectangle,rounded corners].

OldKrab commented 1 month ago

According to customization_guide style attribute used by rendering backend.

So we can not render same dot file that can be rendered with graphviz, because style attribute has different meaning in graphviz.

is this the right behavior?