Обсуждение: Re: pgsql: doc: Add some images

Поиск
Список
Период
Сортировка

Re: pgsql: doc: Add some images

От
Alvaro Herrera
Дата:
On 2019-Mar-27, Peter Eisentraut wrote:

> doc: Add some images
> 
> Add infrastructure for having images in the documentation, in SVG
> format.  Add two images to start with.  See the included README file
> for instructions.

> Author: Jürgen Purtz <juergen@purtz.de>
> Author: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>

Now when I test Jürgen's new proposed image genetic-algorithm I find
that this stuff doesn't work in VPATH builds, at least for PDF -- I
don't get a build failure, but instead I get just a section title that
doesn't precede any actual image.  (There's a very small warning hidden
in the tons of other fop output).  If I edit the .fo file by hand to
make the path to .svg absolute, the image appears correctly.

I don't see any way in the fop docs to specify the base path for images.

I'm not sure what's a good way to fix this problem in a general way.
Would some new rule in the xslt would work?

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



Re: pgsql: doc: Add some images

От
Jürgen Purtz
Дата:
On 16.08.19 23:00, Alvaro Herrera wrote:
> On 2019-Mar-27, Peter Eisentraut wrote:
>
>> doc: Add some images
>>
>> Add infrastructure for having images in the documentation, in SVG
>> format.  Add two images to start with.  See the included README file
>> for instructions.
>> Author: Jürgen Purtz <juergen@purtz.de>
>> Author: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
> Now when I test Jürgen's new proposed image genetic-algorithm I find
> that this stuff doesn't work in VPATH builds, at least for PDF -- I
> don't get a build failure, but instead I get just a section title that
> doesn't precede any actual image.  (There's a very small warning hidden
> in the tons of other fop output).  If I edit the .fo file by hand to
> make the path to .svg absolute, the image appears correctly.
>
> I don't see any way in the fop docs to specify the base path for images.
>
> I'm not sure what's a good way to fix this problem in a general way.
> Would some new rule in the xslt would work?
>

Hello Alvaro,

it is be possible that you face the following situation: the image 
subdirectory contains all ditaa and graphviz source files, but not all 
corresponding svg files. Those svg files are created by the given 
Makefile of this subdirectory resp. should be included in git (and 
patches - what was not the case in one of my patches).

Can you acknowledge, that this is your starting situation when you miss 
the graphic in PDF? If no, please give us more information: operation 
system, ... . If yes, we have the following options:

a) Make sure that all svg files exists in addition to the original 
source files (as it was originally planned)

b) Run make in images subdirectory manually

c) Append a line "    $(MAKE) -C images" to Makefile of sgml directory 
for PDF, HTML and EPUB targets to check the dependencies within the 
images subdirectory.

Kind regards, Jürgen





Re: pgsql: doc: Add some images

От
Alvaro Herrera
Дата:
Hi Jürgen,

On 2019-Aug-18, Jürgen Purtz wrote:

> it is be possible that you face the following situation: the image
> subdirectory contains all ditaa and graphviz source files, but not all
> corresponding svg files. Those svg files are created by the given Makefile
> of this subdirectory resp. should be included in git (and patches - what was
> not the case in one of my patches).

Not really ... I did create the .svg file by invoking the make rule for
it manually.

The files do exist, but they are in the wrong directory: they're in
/pgsql/source/master/doc/src/sgml/images
and the "make postgres-A4.pdf" was invoked in
/pgsql/build/master/doc/src/sgml/images
       ^^^^^

As I said, if I edit the .fo file to change the "images/foobar.svg"
entry to read "/pgsql/source/master/doc/src/sgml/images/foobar.svg" then
the built docco correctly includes the image.

A "VPATH" build is one where I invoke "configure" from a different
directory.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



Re: pgsql: doc: Add some images

От
Peter Eisentraut
Дата:
On 2019-08-16 22:00, Alvaro Herrera wrote:
> Now when I test Jürgen's new proposed image genetic-algorithm I find
> that this stuff doesn't work in VPATH builds, at least for PDF -- I
> don't get a build failure, but instead I get just a section title that
> doesn't precede any actual image.  (There's a very small warning hidden
> in the tons of other fop output).  If I edit the .fo file by hand to
> make the path to .svg absolute, the image appears correctly.

fixed

(I'm puzzled that one can't tell FOP to abort on an error like this.
The ASF JIRA is down right now, so I can't research this, but I'm
tempted to file a bug about this.)

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services