Bad Latex Ouput Using dot2tex

R. A. Bilonick rab at consolidated.net
Tue Jun 22 14:21:57 UTC 2010


I'm using dot2tex in Ubuntu 10.04. If I take simple examples of dot
files that have latex math notation for node labels (or similar latex
type examples), and process them using dot2tex, the graphs are always
bad. The graph is drawn but ALL of the node labels are missing from the
nodes. Instead, all of the node labels are printed on top of each other
in the lower left corner.

I tried this simple example (among others):

digraph G {
    a_1-> a_2 -> a_3 -> a_1;
}

The above text was stored in ex1.dot.

> dot2tex -tmath ex1.dot > ex1.tex

The node labels (a_1, etc.) are shown correctly as "a subscript 1",
etc.), but not in the nodes. They end up in the lower left hand corner,
all piled on top of each other.

Same with ex4.dot:

digraph G {
    a_1 [texlbl="$\frac{\gamma}{2x^2+y^3}$"];
    a_1 -> a_2 -> a_3 -> a_1
    node [texmode="math"];
    a_1 -> b_1 -> b_2 -> a_3;
    b_1 [label="\\frac{\\gamma}{x^2}"];
    node [texmode="verbatim"]
    b_4 [label="\\beta"]
    a_3 -> b_4 -> a_1;
}

> dot2tex --preproc ex4.dot | dot2tex > ex4.tex

The output under Ubuntu 10.04 does not look anything like what it is
supposed to look like. Does anyone know what the problem is and if there
is a fix?





More information about the ubuntu-users mailing list