[graphviz-interest] table formatting

steve roush <[email protected]>
Newsgroups gmane.comp.video.graphviz
Message-ID <[email protected]>
> *John Ellson* ellson at research.att.com 
> <mailto:graphviz-interest%40lists.research.att.com?Subject=Re:%20Re%3A%20%5Bgraphviz-interest%5D%20table%20formatting&In-Reply-To=%3C50FA47C5.6050008%40research.att.com%3E>
> /Sat Jan 19 02:14:13 EST 2013/
>
>   * Previous message: [graphviz-interest] table formatting
>     <http://lists.research.att.com/pipermail/graphviz-interest/2013q1/007440.html>
>   * Next message: [graphviz-interest] table formatting
>     <http://lists.research.att.com/pipermail/graphviz-interest/2013q1/007442.html>
>   * *Messages sorted by:* [ date ]
>     <http://lists.research.att.com/pipermail/graphviz-interest/2013q1/date.html#7441>
>     [ thread ]
>     <http://lists.research.att.com/pipermail/graphviz-interest/2013q1/thread.html#7441>
>     [ subject ]
>     <http://lists.research.att.com/pipermail/graphviz-interest/2013q1/subject.html#7441>
>     [ author ]
>     <http://lists.research.att.com/pipermail/graphviz-interest/2013q1/author.html#7441>
>
>
> --------------------------------------------------------------------------------
> On 01/18/2013 11:09 PM, Ryan Schmidt wrote:
> >/  On Jan 18, 2013, at 21:27, George Georgalis wrote:
> />/
> />>/  As soon as I resolve some other issues, I am planning to render some
> />>/  table information in a separate program (Latex) then figure out how to
> />>/  embed them as nodes in my graph. I've never used anything but default
> />>/  (built-in) shapes for the nodes. Is it possible to reference pdf node
> />>/  tables (or something ray-traced) when we build a graph? Best solution
> />>/  I could imagine would include query of the pdf tables for their
> />>/  dimensions as the graph is made.
> />/  Yes, you should be able to include PostScript (or PNG or SVG or ...) files in graphs, anywhere you can put an image. Attached is an example using PNGs (where the included PNG was itself coincidentally generated by Graphviz.
> />/
> />/
> />/  Postscript files should work too but I get this error when I try:
> />/
> />/  Error: 1.ps: gsapi_init_with_args() returned: -100 "(null)" (Ghostscript internal error)
> />/
> />/  gs is Ghostscript 9.06 on my system.
> />/
> />/
> />/
> /I think postscript embedding has broken on most platforms, since
> ghostscript developers withdrew support for the api that I used.
>
> I was hoping to write a PDF embedder using libpoppler, but I haven't
> made any progress on it yet.
>
> John

The program pdf2svg (http://www.cityinthesky.co.uk/opensource/pdf2svg) might be 
helpful.  It uses poppler to do a very good job of converting pdf to svg (sorry 
that I just stated the obvious, it is late at night).

Anyway,  I just tested this method of embedding images in nodes with SVG, 
similar to what George seems to want:
latex -> pdf output -> pdf2svg (svg output) -> inkscape (shrink the viewport 
from full page to "right sized") (svg out) -> Graphiz (use "image" attribute).
This produces a "pretty good" svg output file, except on some browsers (firefox 
and chrome?) the "image" files are converted to bitmaps!
At this point things get very browser dependent (i.e. chrome on windows is 
different from chrome on android!)
The only(?) way to get the node images to be treated as "real" (vector) svg by 
all the major browsers is to cut-and-paste all of the "image" svg files into a 
common "defs" section in the main svg file
and then tweak the lines that look like this:
    <image xlink:href="derivation_images30_2.svg"
to something like this:
    <use xlink:href="#svg3509"

I hope that makes some sense.  I'll try to post some examples of this in the 
next few days to add some clarity.

steve

_______________________________________________
[email protected]
http://lists.research.att.com/mailman/listinfo/graphviz-interest
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.