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