On Mon, 30 Jun 2008, Charles P. Schaum wrote: > Question: > > Has anyone ever thought of integrating something dot-like into ConTeXt > or LaTeX?
Have a look at dot2tex: http://www.fauskes.net/code/dot2tex/ It uses a python script to convert the dot output to tikz or pgf code which can be included in a latex document. This package should also work with ConTeXt with very minor changes and has been in my to be investigated later list for a long time. > One thing that I have done is avail myself of the constrained > graphs for doing anything like timelines. It would be fantastic to get > that in TeX and friends. > > Or would that fall under dot -> MetaPost? >From what I remember, dot can output metapost code. However, the last time I looked, it was really bad at calculating the width of tex math commands (basically counted the width of the ascii markup rather than the typeset command). I do not know how dot2tex gets around this problem, but from the examples on the website, it does a remarkable good job. Another option is to see if there are lua bindings for dot. In that case, one could probably try to integrate it to luatex directly: find the width of the labels using tex, and then pass them on to dot (using the lua-bindings) to find the appropriate layout of the nodes, and then plot these nodes using metapost or pgf. I think that it will take a lot of work to get such an approach to work correctly, but it would be the cleanest solution. Aditya ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________