pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: doc: Add some images
6+ messages / 4 participants
[nested] [flat]

* pgsql: doc: Add some images
@ 2019-03-27 22:15  Peter Eisentraut <peter@eisentraut.org>
  0 siblings, 2 replies; 6+ messages in thread

From: Peter Eisentraut @ 2019-03-27 22:15 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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>
Discussion: https://www.postgresql.org/message-id/flat/aaa54502-05c0-4ea5-9af8-770411a6bf4b@purtz.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ea55aec0a97d6cade0186df1913da2c8cb5c6f2c

Modified Files
--------------
.gitattributes                           |   1 +
doc/src/sgml/Makefile                    |  14 +-
doc/src/sgml/gin.sgml                    |  12 +-
doc/src/sgml/images/Makefile             |  18 ++
doc/src/sgml/images/README               |  61 ++++++
doc/src/sgml/images/gin.dot              |  93 +++++++++
doc/src/sgml/images/gin.svg              | 320 +++++++++++++++++++++++++++++++
doc/src/sgml/images/pagelayout.svg       |  40 ++++
doc/src/sgml/images/pagelayout.txt       |  11 ++
doc/src/sgml/storage.sgml                |  14 ++
doc/src/sgml/stylesheet-hh.xsl           |   6 +
doc/src/sgml/stylesheet-html-common.xsl  |   1 +
doc/src/sgml/stylesheet-html-nochunk.xsl |  11 ++
doc/src/sgml/stylesheet.xsl              |   6 +
14 files changed, 602 insertions(+), 6 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: pgsql: doc: Add some images
@ 2019-03-27 22:33  Alvaro Herrera <alvherre@2ndquadrant.com>
  parent: Peter Eisentraut <peter@eisentraut.org>
  1 sibling, 0 replies; 6+ messages in thread

From: Alvaro Herrera @ 2019-03-27 22:33 UTC (permalink / raw)
  To: Peter Eisentraut <peter@eisentraut.org>; +Cc: pgsql-committers@lists.postgresql.org

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.

I think you need something like the attached.

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

Attachments:

images.patch (text/x-diff, 399B) download diff --git a/doc/src/sgml/Makefile b/doc/src/sgml/Makefile index 0d0db18ff89..ac742d600ad 100644 --- a/doc/src/sgml/Makefile +++ b/doc/src/sgml/Makefile @@ -28,8 +28,10 @@ include $(top_builddir)/src/Makefile.global all: html man -distprep: html distprep-man +distprep: distprep-images html distprep-man +distprep-images: + $(MKDIR_P) images ifndef DBTOEPUB DBTOEPUB = $(missing) dbtoepub
^ permalink raw reply [nested|flat] 6+ messages in thread

* Re: pgsql: doc: Add some images
@ 2019-08-16 20:00  Alvaro Herrera <alvherre@2ndquadrant.com>
  parent: Peter Eisentraut <peter@eisentraut.org>
  1 sibling, 2 replies; 6+ messages in thread

From: Alvaro Herrera @ 2019-08-16 20:00 UTC (permalink / raw)
  To: Peter Eisentraut <peter@eisentraut.org>; +Cc: pgsql-hackers@lists.postgresql.org, Jürgen Purtz <juergen@purtz.de>

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





^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: pgsql: doc: Add some images
@ 2019-08-18 15:29  Jürgen Purtz <juergen@purtz.de>
  parent: Alvaro Herrera <alvherre@2ndquadrant.com>
  1 sibling, 1 reply; 6+ messages in thread

From: Jürgen Purtz @ 2019-08-18 15:29 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@2ndquadrant.com>; Peter Eisentraut <peter@eisentraut.org>; +Cc: pgsql-hackers@lists.postgresql.org

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







^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: pgsql: doc: Add some images
@ 2019-08-19 00:18  Alvaro Herrera <alvherre@2ndquadrant.com>
  parent: Jürgen Purtz <juergen@purtz.de>
  0 siblings, 0 replies; 6+ messages in thread

From: Alvaro Herrera @ 2019-08-19 00:18 UTC (permalink / raw)
  To: Jürgen Purtz <juergen@purtz.de>; +Cc: Peter Eisentraut <peter@eisentraut.org>; pgsql-hackers@lists.postgresql.org

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





^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: pgsql: doc: Add some images
@ 2019-08-19 08:35  Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
  parent: Alvaro Herrera <alvherre@2ndquadrant.com>
  1 sibling, 0 replies; 6+ messages in thread

From: Peter Eisentraut @ 2019-08-19 08:35 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@2ndquadrant.com>; +Cc: pgsql-hackers@lists.postgresql.org, Jürgen Purtz <juergen@purtz.de>

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





^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2019-08-19 08:35 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-03-27 22:15 pgsql: doc: Add some images Peter Eisentraut <peter@eisentraut.org>
2019-03-27 22:33 ` Alvaro Herrera <alvherre@2ndquadrant.com>
2019-08-16 20:00 ` Alvaro Herrera <alvherre@2ndquadrant.com>
2019-08-18 15:29   ` Jürgen Purtz <juergen@purtz.de>
2019-08-19 00:18     ` Alvaro Herrera <alvherre@2ndquadrant.com>
2019-08-19 08:35   ` Peter Eisentraut <peter.eisentraut@2ndquadrant.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox