43 | | I know a workaround which is to [http://www.liafa.univ-paris-diderot.fr/~labbe/blogue/2012/11/using-sage-graphviz-dot2tex-tikz-tikz2pdf-to-draw-a-graph use the tikz2pdf script] which compiles fine. But, it would be nice if view could compile G as well. |
| 43 | It turns out that the following works: |
| 44 | |
| 45 | {{{ |
| 46 | sage: G.set_latex_options(format='dot2tex', prog='dot') |
| 47 | sage: view(G, engine='pdflatex') |
| 48 | sage: G.set_latex_options(format='dot2tex', prog='circo') |
| 49 | sage: view(G, engine='pdflatex') |
| 50 | }}} |
| 51 | |
| 52 | The default compilation is trying (tex -> dvi -> png, dvi -> ps -> pdf) and the useless (dvi -> png) conversion is broken because of overfull vbox and overfull hbox created in the first tex -> dvi compilation. |
| 53 | |
| 54 | The following does the trick: |
| 55 | |
| 56 | {{{ |
| 57 | sage: view(G, engine='pdflatex', tightpage=True) |
| 58 | }}} |