Re: First SVG graphic

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Jürgen Purtz <juergen(at)purtz(dot)de>, pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: First SVG graphic
Date: 2019-02-07 11:06:14
Message-ID: 4393cdcd-4efd-3198-4ffc-c080a5af79c7@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

First, let's fix some of these whitespace errors:

firstSvg_2.patch:677: trailing whitespace.
<rect x="1" y="1" width="99.4%" height="99.4%" rx="1%"
firstSvg_2.patch:752: trailing whitespace.
<rect x="1" y="1" width="99.4%" height="99.4%" rx="1%"
firstSvg_2.patch:705: new blank line at EOF.
+
firstSvg_2.patch:936: new blank line at EOF.
+
warning: 4 lines add whitespace errors.

Let's not use mixed-case file names:

Inkscape/
PageLayout.svg
gin.svg
pgDump.svg

> @@ -152,15 +156,15 @@ postgres.txt: postgres.html
> postgres.pdf:
> $(error Invalid target; use postgres-A4.pdf or postgres-US.pdf as targets)
>
> -%-A4.fo: stylesheet-fo.xsl %.sgml $(ALLSGML)
> +%-A4.fo: stylesheet-fo.xsl %.sgml
> $(XMLLINT) $(XMLINCLUDE) --noout --valid $(word 2,$^)
> $(XSLTPROC) $(XMLINCLUDE) $(XSLTPROCFLAGS) --stringparam paper.type A4 -o $@ $(wordlist 1,2,$^)
>
> -%-US.fo: stylesheet-fo.xsl %.sgml $(ALLSGML)
> +%-US.fo: stylesheet-fo.xsl %.sgml
> $(XMLLINT) $(XMLINCLUDE) --noout --valid $(word 2,$^)
> $(XSLTPROC) $(XMLINCLUDE) $(XSLTPROCFLAGS) --stringparam paper.type USletter -o $@ $(wordlist 1,2,$^)
>
> -%.pdf: %.fo
> +%.pdf: %.fo $(ALLSGML) $(SVGSRC)
> $(FOP) -fo $< -pdf $@
>

This seems a bit wrong. The .fo target does depend on ALLSGML. The
.pdf target does not, but it presumably does depend on SVGSRC.

The variable name SVGSRC is a bit confusing. What is it the source of?

> @@ -209,7 +213,7 @@ check: postgres.sgml $(ALLSGML) check-tabs
> install: install-html install-man
>
> installdirs:
> - $(MKDIR_P) '$(DESTDIR)$(htmldir)'/html $(addprefix '$(DESTDIR)$(mandir)'/man, 1 3 $(sqlmansectnum))
> + $(MKDIR_P) '$(DESTDIR)$(htmldir)'/html/svg html/svg $(addprefix '$(DESTDIR)$(mandir)'/man, 1 3 $(sqlmansectnum))
>
> # If the install used a man directory shared with other applications, this will remove all files.
> uninstall:

html/svg is not an installation directory. You need to create it
somewhere else.

> + <part>
> + <title>Lists of Figures, Tables and Examples</title>
> + <appendix id="list-of-figures">
> + <title>List of Figures</title>
> + <para />
> + </appendix>
> + <appendix id="list-of-tables">
> + <title>List of Tables</title>
> + <para />
> + </appendix>
> + <appendix id="list-of-examples">
> + <title>List of Examples</title>
> + <para />
> + </appendix>
> + </part>

These ought to be created by the stylesheet. We have probably turned
them off somewhere, so you should see where you can turn them on.

> diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgml
> index 9e0bb93f08..d31ee2d210 100644
> --- a/doc/src/sgml/ref/pg_dump.sgml
> +++ b/doc/src/sgml/ref/pg_dump.sgml
> @@ -73,6 +73,21 @@
> architectures.
> </para>
>
> + <figure id="pg_dump_svg">
> + <title><command>pg_dump</command>: Formats and Restore Proceedings</title>

This doesn't work for man page output.

I think we should avoid putting images into reference pages. This one
could perhaps go into the Backup chapter.

Also, it should be linked to from somewhere. An image that's just
floating around and not referred to in the text seems odd.

Also we tend to use hyphens instead of underscores for IDs. (At some
point, underscores where not allowed. I'm surprised that that's no
longer the case.) I also wouldn't put "_svg" into the ID. The format
is irrelevant to the ID.

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

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message PG Doc comments form 2019-02-07 12:11:05 What does the value 5874897 AD mean? Which year, month, day, please?
Previous Message Jürgen Purtz 2019-02-05 20:10:21 Re: First SVG graphic