From: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
---|---|
To: | pgsql-docs(at)lists(dot)postgresql(dot)org |
Cc: | Jürgen Purtz <juergen(at)purtz(dot)de> |
Subject: | Re: First SVG graphic |
Date: | 2019-03-11 09:13:47 |
Message-ID: | c2d9a262-0f9d-8c76-b011-bdf3acfc60e3@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
I played with this further. My conclusion is that SVG as a source
format is not workable. Aside from the tooling issues that are being
discussed, which might be solvable, I think it's not the right level of
abstraction. The problem is that it is a *vector* format, but not a
*graph* or *chart* format. You can draw boxes and lines and text, but
nothing in the format indicates how they are connected. You can see
that in the provided example graphs: The alignment of the arrow tips to
the boxes and the text in the boxes is not pixel-perfect. If you open
this in Inkscape and move a box around, the edges don't move with it.
The final appearance of the picture is subject to how shaky the hand
holding the mouse was. ;-) I suppose experienced graphics artists have
ways to deal with that, but they are not in evidence here. I'm thinking
of someone, say, adding a tweak to the GIN code and wanting to update
the image, and I don't see that as being pleasant.
I looked at some alternatives. I rebuilt the GIN image using Graphviz
and the page layout image using Ditaa. See attached patch. The results
look fine and useful to me. I would be much more comfortable using
those tools: They use a higher level of abstraction, so an author can
focus on the logical structure of the image and not the pixel details.
The source formats are easily diffable. Both can convert to SVG, so the
rest of the tooling can still be used. (I didn't find the pg_dump image
all that useful, so I didn't do anything with it here. But I think it
could be done using either Ditaa or Graphviz.)
Using SVG as an output format looks good. It works in HTML, PDF, and
EPUB. I did some tweaks to your tooling so that the images scale
automatically in the PDF output. Everything looks good, so I would be
happy to proceed in this direction.
(We can have some discussion about whether we want to commit the
intermediate SVG files and what the directory layout should be etc. I
didn't bother with that in my patch yet.)
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Attachment | Content-Type | Size |
---|---|---|
0001-doc-Add-some-images.patch | text/plain | 28.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2019-03-11 14:50:52 | Re: First SVG graphic |
Previous Message | Jürgen Purtz | 2019-03-10 12:44:20 | Re: First SVG graphic |