On 03/06/2010 5:58 PM, Leo Antunes wrote:
On 03/06/10 16:22, Julien Rioux wrote:

Why not already use the dot->pdf converter that comes with graphviz?

dot -Tpdf file.dot -o file.pdf


Because I wanna use dot2tex on the dot file beforehand. Importing pure
Dot files works like a charm, no problem there! :)


Cheers


Then define your own "dot2tex" file format, have a dot->dot2tex converter and a dot2tex->pdf converter. Remove the usual dot->pdf converter because LyX would use that if present (assuming LyX uses the shortest conversion pathway). Remove any other dot->something converters for that matter.

I tested this with one of my dot file and it works ok. The only problem is in the generated tex file: the graph is too large to fit on an article page. But I didn't play with the dot2tex options, and at this point I would say that the integration with LyX works.

Here is what I have in my LyX Preferences panel.

File Formats:

Format: LaTeX (dot2tex)
Short Name: dot2tex
Extension: tex

Converters:

Graphviz Dot -> LaTeX (dot2tex)
Converter: dot2tex $$i > $$o

LaTeX (dot2tex) -> PDF (ps2pdf)
Converter: pdflatex $$i

Cheers,
Julien

Reply via email to