Skip to content

Commit 270fec9

Browse files
committed
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>
1 parent 4867d7f commit 270fec9

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

doc/src/sgml/stylesheet-fo.xsl

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,28 @@
7070
<xsl:apply-templates mode="no.anchor.mode"/>
7171
</xsl:template>
7272

73+
<!-- include refsects in PDF bookmarks
74+
(https://github.com/docbook/xslt10-stylesheets/issues/46) -->
75+
76+
<xsl:template match="refsect1|refsect2|refsect3"
77+
mode="bookmark">
78+
79+
<xsl:variable name="id">
80+
<xsl:call-template name="object.id"/>
81+
</xsl:variable>
82+
<xsl:variable name="bookmark-label">
83+
<xsl:apply-templates select="." mode="object.title.markup"/>
84+
</xsl:variable>
85+
86+
<fo:bookmark internal-destination="{$id}">
87+
<xsl:attribute name="starting-state">
88+
<xsl:value-of select="$bookmarks.state"/>
89+
</xsl:attribute>
90+
<fo:bookmark-title>
91+
<xsl:value-of select="normalize-space($bookmark-label)"/>
92+
</fo:bookmark-title>
93+
<xsl:apply-templates select="*" mode="bookmark"/>
94+
</fo:bookmark>
95+
</xsl:template>
96+
7397
</xsl:stylesheet>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy