Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad parsing #5

Open
kjellmf opened this issue Apr 16, 2014 · 1 comment
Open

Bad parsing #5

kjellmf opened this issue Apr 16, 2014 · 1 comment
Labels

Comments

@kjellmf
Copy link
Collaborator

kjellmf commented Apr 16, 2014

Having

digraph example {
    a -> b
    a -> c
    {rank=same; b;c}
}

will generate (dot2tex --preproc -tmath)

digraph example{
    a -> b ;
    subgraph c{
    b;
    c[fixedsize=true,width=0.75,label=" ",texlbl="$c$",height=0.5];

    graph [rank=same];
    }    a -> b ;
    a -> c ;
    a[fixedsize=true,width=0.75,label=" ",texlbl="$a$",height=0.5];
    c[fixedsize=true,width=0.75,label=" ",texlbl="$c$",height=0.5];
    b[fixedsize=true,width=0.75,label=" ",texlbl="$b$",height=0.5];

    graph [d2toutputformat=pgf];
}

Having

digraph example {
    a -> b;
    a -> c;
    {rank=same; b;c};
}

(the same but semicolons)

will produce "correct" (or at least expected)

digraph example{
    a -> b ;
    a -> c ;
    subgraph {
    b;
    c;

    graph [rank=same];
    }    a[fixedsize=true,width=0.75,label=" ",texlbl="$a$",height=0.5];
    c[fixedsize=true,width=0.75,label=" ",texlbl="$c$",height=0.5];
    b[fixedsize=true,width=0.75,label=" ",texlbl="$b$",height=0.5];

    graph [d2toutputformat=pgf];
}

Original GC issue: https://code.google.com/p/dot2tex/issues/detail?id=19

@kjellmf kjellmf added the bug label Apr 16, 2014
@kjellmf
Copy link
Collaborator Author

kjellmf commented Apr 16, 2014

There is a test for this issue in test_dot2tex.py

thisiscam added a commit to thisiscam/dot2tex that referenced this issue Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant