From: | Jürgen Purtz <juergen(at)purtz(dot)de> |
---|---|
To: | pgsql-docs(at)lists(dot)postgresql(dot)org |
Subject: | Re: Images in the official documentation |
Date: | 2018-07-11 09:07:29 |
Message-ID: | 4ea1bacb-02ca-e967-31d7-d2a6db30abff@purtz.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
Our discussion about grafics in the documentation reached to the
conclusion that we shall use SVG, the importance to 'diff-ability' is
rated differently, and there is no consensus about tools.
To push the issue forward I modify my original proposal to use plain svg
files in a standard editor as follows:
* We define a 'Simplified SVG format' (SSVG)
* We create libraries where complex elements are predefined and can be
referenced
* We write the source in ssvg-format
* A compiler (written in bison or xslt) converts ssvg-files to svg-files
* We extend the sgml-files to include the svg-files
* The ssvg and svg-files are located in a new svg directory, Makefile
copies them to sgml and html directory
* A proof-of-concept is performed in 11beta2 for HTML and PDF generation.
* The ssvg-format may be XML (as used in the examples), JSON, C-style
function calls
PRO:
* SVG 1.x has many restrictions and SVG 2.x does not make progress in
the last years. Tools and Browsers support different ranges of the
specification. The planned compiler cuts everything down to the
basic language level, where a broad support is possible.
* Predefinded elements and default values reduce the ssvg file to a
small and clear source file.
* You can embed original svg commands into ssvg files.
* When you use an editor and a browser in parallel, you get the visual
result with few clicks.
* Everything is diff-able.
* The Makefile needs only slightly amendments: additional cp commands
and some target-dependencies. We need no new tool.
CON:
* The development is done in a non-wysiwyg editor and without mouse.
* You have to count pixel.
Example:
PageLayout.ssvg: written in the new language
PageLayout.svg: the generated svg file (actually by hand, the compiler
is not yet implemented)
storage.sgml: an additional paragraph to refer to the svg-file
<para>
<mediaobject id="PageLayoutSVG">
<imageobject role="html">
<imagedata fileref="PageLayout.svg" format="SVG"/>
</imageobject>
<imageobject role="fo">
<imagedata fileref="PageLayout.svg" format="SVG" scalefit="1"
width="100%" contentdepth="100%"/>
</imageobject>
</mediaobject>
</para>
PageLayoutHtml.png: the HTML result
PageLayoutPdf.png: the PDF result
A second example: pgDump.svg within backup.sgml
Kind regards, Jürgen Purtz
Attachment | Content-Type | Size |
---|---|---|
PageLayout.ssvg | text/xml | 1.6 KB |
PageLayout.svg | image/svg+xml | 3.2 KB |
image/png | 42.2 KB | |
image/png | 43.4 KB | |
storage.sgml | text/sgml | 41.4 KB |
pgDump.svg | image/svg+xml | 3.3 KB |
image/png | 48.1 KB | |
image/png | 41.8 KB | |
backup.sgml | text/sgml | 74.5 KB |
LibBasicObjects.svg | image/svg+xml | 715 bytes |
LibCSS.svg | image/svg+xml | 1.1 KB |
LibIt.svg | image/svg+xml | 1.7 KB |
LibMarker.svg | image/svg+xml | 2.4 KB |
LibUML.svg | image/svg+xml | 845 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | PG Doc comments form | 2018-07-11 09:34:59 | RETURN NULL in the sample of insert trigger on partitioned table |
Previous Message | PG Doc comments form | 2018-07-10 15:57:52 | Multivariate statistics |