diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2017-08-15 14:37:44 -0400 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2017-08-15 14:47:03 -0400 |
commit | 4e7cd035abaae16e45305417073e7009518acc61 (patch) | |
tree | a38548eeb48a5e1f95f6bc44ef7eea487c477ed4 | |
parent | 870da1e1546c9563c5ae45918392cf7bbc7e5b0e (diff) | |
download | postgresql-4e7cd035abaae16e45305417073e7009518acc61.tar.gz postgresql-4e7cd035abaae16e45305417073e7009518acc61.zip |
doc: Improve PDF bookmarks
Also create PDF bookmarks/ToC entries for subsections of reference
pages. This was a regression from the previous jadetex-based build.
Reported-by: Erik Rijkers <er@xs4all.nl>
-rw-r--r-- | doc/src/sgml/stylesheet-fo.xsl | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/doc/src/sgml/stylesheet-fo.xsl b/doc/src/sgml/stylesheet-fo.xsl index 7a0fbe9564f..ea754084be0 100644 --- a/doc/src/sgml/stylesheet-fo.xsl +++ b/doc/src/sgml/stylesheet-fo.xsl @@ -70,4 +70,28 @@ <xsl:apply-templates mode="no.anchor.mode"/> </xsl:template> +<!-- include refsects in PDF bookmarks + (https://github.com/docbook/xslt10-stylesheets/issues/46) --> + +<xsl:template match="refsect1|refsect2|refsect3" + mode="bookmark"> + + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + <xsl:variable name="bookmark-label"> + <xsl:apply-templates select="." mode="object.title.markup"/> + </xsl:variable> + + <fo:bookmark internal-destination="{$id}"> + <xsl:attribute name="starting-state"> + <xsl:value-of select="$bookmarks.state"/> + </xsl:attribute> + <fo:bookmark-title> + <xsl:value-of select="normalize-space($bookmark-label)"/> + </fo:bookmark-title> + <xsl:apply-templates select="*" mode="bookmark"/> + </fo:bookmark> +</xsl:template> + </xsl:stylesheet> |