pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jürgen Purtz <juergen@purtz.de>
To: pgsql-docs@lists.postgresql.org
Subject: Re: TOC: List of Figures
Date: Wed, 3 Jul 2019 16:03:36 +0200
Message-ID: <c6b89df9-32e1-be55-3ff9-b013a97e7a59@purtz.de> (raw)
In-Reply-To: <e9e5faa4-e920-3253-f6bb-794109e228a1@purtz.de>
References: <e9e5faa4-e920-3253-f6bb-794109e228a1@purtz.de>

> 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.

I understood that the majority of voters recommend the 'list of figures' 
but refuses lists for 'tables' and 'examples' (please consider that PDF 
generates all of them by default). The attached patch realizes the 
desired behavior. In 'func.sgml' there is also a modification because 
the given example isn't a figure, it's an example/programlisting.

Jürgen Purtz

Attachments:

Screenshot from 2019-07-03 15-44-45.png (image/png, 11.8K) download view image
Screenshot from 2019-07-03 15-48-00.png (image/png, 14.4K) download view image
toc_1.patch (text/x-patch, 1.6K) download diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 3a8581d205..538a9c45fd 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -11444,7 +11444,7 @@ table2-mapping converted into other XML-based formats. </para> - <figure id="xslt-xml-html"> + <example id="xslt-xml-html"> <title>XSLT Stylesheet for Converting SQL/XML Output to HTML</title> <programlisting><![CDATA[ <?xml version="1.0"?> @@ -11492,7 +11492,7 @@ table2-mapping </xsl:stylesheet> ]]></programlisting> - </figure> + </example> </sect2> </sect1> diff --git a/doc/src/sgml/postgres.sgml b/doc/src/sgml/postgres.sgml index 3e115f1c76..626b19bfe8 100644 --- a/doc/src/sgml/postgres.sgml +++ b/doc/src/sgml/postgres.sgml @@ -279,6 +279,11 @@ &limits; &acronyms; + <appendix id="list-of-figures"> + <title>List of Figures</title> + <para /> + </appendix> + </part> &biblio; diff --git a/doc/src/sgml/stylesheet-html-common.xsl b/doc/src/sgml/stylesheet-html-common.xsl index 9edce52a10..d730f469a4 100644 --- a/doc/src/sgml/stylesheet-html-common.xsl +++ b/doc/src/sgml/stylesheet-html-common.xsl @@ -81,6 +81,13 @@ set toc,title </xsl:call-template> </xsl:template> +<!-- List of Figures --> +<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> <!-- Put index "quicklinks" (A | B | C | ...) at the top of the bookindex page. -->

view thread (14+ messages)  latest in thread

Message-ID: <c6b89df9-32e1-be55-3ff9-b013a97e7a59@purtz.de>
Permalink:  ../c6b89df9-32e1-be55-3ff9-b013a97e7a59@purtz.de/
Also on:    postgresql.org/message-id/c6b89df9-32e1-be55-3ff9-b013a97e7a59@purtz.de

 ·  · 

reply

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: <c6b89df9-32e1-be55-3ff9-b013a97e7a59@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