xyz2tex / dot2tex

Convert graphs generated by Graphviz to LaTeX friendly formats
Other
151 stars 44 forks source link

Output missing borders #64

Closed SamuelMarks closed 5 years ago

SamuelMarks commented 5 years ago

Dot file:

digraph {
    label="How to make 'input' is valid"

    start[shape="box", style=rounded];
    end[shape="box", style=rounded];
    if_valid[shape="diamond", style=""];
    message[shape="parallelogram", style=""]
    input[shape="parallelogram", style=""]

    start -> input;
    input -> if_valid;
    if_valid -> message[label="no"];
    if_valid -> end[label="yes"];
    message -> input;
}

Output from PDF file (dot2tex -tmath d.dot --figonly -o d.tex):

screen shot 2019-01-27 at 12 21 14 am

Output from dot -Tpng: fig-introduction


This is quite deep in my LaTeX, but I have this in my preamble, which is a superset of what's produced by dot2tex without the --figonly argument:

% Sorted for your convenience
\usepackage[T1]{fontenc}
\usepackage[british]{babel}
\usepackage[compact]{titlesec}
\usepackage[draft]{todonotes}   % notes showed (JJUNJU)
\usepackage[final]{pdfpages}
\usepackage[labelformat=simple]{subcaption}
\usepackage[sectionbib,square,sort,comma,numbers]{natbib}
\usepackage[small,bf]{caption}
\usepackage[utf8]{inputenc}
\usepackage[x11names, rgb]{xcolor}
\usepackage{ae,aecompl}
\usepackage{amsmath} %equations and spacings
\usepackage{array}
\usepackage{booktabs}
\usepackage{chapterbib}
\usepackage{colortbl}
\usepackage{color}
\usepackage{courier}
\usepackage{dcolumn}
\usepackage{epstopdf} %support for eps.
\usepackage{float} % figure placing [H]
\usepackage{fncychap}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{lipsum} % acces to random text
\usepackage{longtable} %table on several pages
\usepackage{lscape} %Left down
\usepackage{multirow}
\usepackage{nomencl}
\usepackage{pdfpages}
\usepackage{sectsty}
\usepackage{sidecap}
\usepackage{tabularx}
\usepackage{tabulary}
\usepackage{tikz}
\usepackage{times}
\usepackage{type1cm}

In that file I have an \input command, which includes the tex which includes the tex file of the dot2tex generated typeset.

I'm sure that it's a simple problem, like I'm forgetting to wrap the \input for the dot2tex generated typeset with some special environment 😕 ❓

kjellmf commented 5 years ago

Sorry for the late response.

The issue here is style=rounded. If you remove it you get some output.

digraph {
    label="How to make 'input' is valid"

    start[shape="box", style=""];
    end[shape="box", style=""];
    if_valid[shape="diamond", style=""];
    message[shape="parallelogram", style=""]
    input[shape="parallelogram", style=""]

    start -> input;
    input -> if_valid;
    if_valid -> message[label="no"];
    if_valid -> end[label="yes"];
    message -> input;
}

image

I need to investigate why this happen.

kjellmf commented 5 years ago

Closed by c855592