From: Jürgen Purtz <juergen@purtz.de>
To: Pg Docs <pgsql-docs@lists.postgresql.org>
Subject: TOC: List of Figures
Date: Tue, 2 Jul 2019 10:13:37 +0200
Message-ID: <e9e5faa4-e920-3253-f6bb-794109e228a1@purtz.de> (raw)
After the integration of figures into the documentation it may be
helpful to extent the TOC with a 'List of Figures'. Any opinion?
If yes: The same for 'List of Tables' and 'List of Examples'?
There is a simple way to enable this feature: change line 56 of
stylesheet-html-common.xsl to: "book toc,title,figure,table,example". As
shown in a previous thread this leads to an ugly swelling of the TOC
similar to the formerly handling of release notes - especially for
tables and examples -, see attachment 1.
The alternative is a downshift of the postings by one level, see
attachment 2. How to realize this behavior is shown in attachment 3.
Attachments:Screenshot from 2019-07-01 17-26-13.png (image/png, 58.0K) downloadview imageScreenshot from 2019-07-01 17-27-39.png (image/png, 13.0K) downloadview imagetoc.patch (text/x-patch, 1.8K) downloaddiff --git a/doc/src/sgml/postgres.sgml b/doc/src/sgml/postgres.sgmlindex 3e115f1c76..6a1b5228d0 100644--- a/doc/src/sgml/postgres.sgml+++ b/doc/src/sgml/postgres.sgml@@ -281,6 +281,22 @@
</part>
+ <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>+
&biblio;
<index id="bookindex"></index>
diff --git a/doc/src/sgml/stylesheet-html-common.xsl b/doc/src/sgml/stylesheet-html-common.xslindex 9edce52a10..eb04549fb9 100644--- a/doc/src/sgml/stylesheet-html-common.xsl+++ b/doc/src/sgml/stylesheet-html-common.xsl@@ -81,6 +81,27 @@ set toc,title
</xsl:call-template>
</xsl:template>
+<!-- List of Figures and more -->+<xsl:template match="/book/part/appendix[@id='list-of-figures']/para">+ <xsl:call-template name="list.of.titles">+ <xsl:with-param name="titles" select="'figure'"/>+ <xsl:with-param name="nodes" select="//figure"/>+ </xsl:call-template>+</xsl:template>++<xsl:template match="/book/part/appendix[@id='list-of-tables']/para">+ <xsl:call-template name="list.of.titles">+ <xsl:with-param name="titles" select="'table'"/>+ <xsl:with-param name="nodes" select="//table"/>+ </xsl:call-template>+</xsl:template>++<xsl:template match="/book/part/appendix[@id='list-of-examples']/para">+ <xsl:call-template name="list.of.titles">+ <xsl:with-param name="titles" select="'example'"/>+ <xsl:with-param name="nodes" select="//example"/>+ </xsl:call-template>+</xsl:template>
<!-- Put index "quicklinks" (A | B | C | ...) at the top of the bookindex page. -->
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: juergen@purtz.de, pgsql-docs@lists.postgresql.org
Subject: Re: TOC: List of Figures
In-Reply-To: <e9e5faa4-e920-3253-f6bb-794109e228a1@purtz.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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