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