Re: Images in the official documentation

Поиск
Список
Период
Сортировка
От Jürgen Purtz
Тема Re: Images in the official documentation
Дата
Msg-id 4ea1bacb-02ca-e967-31d7-d2a6db30abff@purtz.de
обсуждение исходный текст
Ответ на Re: Images in the official documentation  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Ответы Re: Images in the official documentation
Список 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


Вложения

В списке pgsql-docs по дате отправления:

Предыдущее
От: PG Doc comments form
Дата:
Сообщение: Multivariate statistics
Следующее
От: PG Doc comments form
Дата:
Сообщение: RETURN NULL in the sample of insert trigger on partitioned table