works around a bug in FOP (see FOP-1444).
Make ToC fo:leader properties configurable via attribute set.
</fo:basic-link>
</fo:inline>
<fo:inline keep-together.within-line="always">
- <xsl:text> </xsl:text>
- <fo:leader leader-pattern="dots"
- leader-pattern-width="3pt"
- leader-alignment="reference-area"
- keep-with-next.within-line="always"/>
- <xsl:text> </xsl:text>
+ <fo:leader xsl:use-attribute-sets="toc.leader.properties"/>
<fo:basic-link internal-destination="{$id}">
<fo:page-number-citation ref-id="{$id}"/>
</fo:basic-link>
</fo:basic-link>
</fo:inline>
<fo:inline keep-together.within-line="always">
- <xsl:text> </xsl:text>
- <fo:leader leader-pattern="dots"
- leader-pattern-width="3pt"
- leader-alignment="reference-area"
- keep-with-next.within-line="always"/>
- <xsl:text> </xsl:text>
+ <fo:leader xsl:use-attribute-sets="toc.leader.properties"/>
<fo:basic-link internal-destination="{$id}">
<fo:page-number-citation ref-id="{$id}"/>
</fo:basic-link>
<!ENTITY title.font.family SYSTEM "../params/title.font.family.xml">
<!ENTITY title.margin.left SYSTEM "../params/title.margin.left.xml">
<!ENTITY toc.indent.width SYSTEM "../params/toc.indent.width.xml">
+<!ENTITY toc.leader.properties SYSTEM "../params/toc.leader.properties.xml">
<!ENTITY toc.margin.properties SYSTEM "../params/toc.margin.properties.xml">
<!ENTITY toc.max.depth SYSTEM "../params/toc.max.depth.xml">
<!ENTITY toc.section.depth SYSTEM "../params/toc.section.depth.xml">
&toc.max.depth;
&toc.indent.width;
&toc.line.properties;
+&toc.leader.properties;
&toc.margin.properties;
&bridgehead.in.toc;
&simplesect.in.toc;
<src:fragref linkend="title.margin.left.frag"/>
<src:fragref linkend="toc.indent.width.frag"/>
<src:fragref linkend="toc.line.properties.frag"/>
+<src:fragref linkend="toc.leader.properties.frag"/>
<src:fragref linkend="toc.margin.properties.frag"/>
<src:fragref linkend="toc.max.depth.frag"/>
<src:fragref linkend="toc.section.depth.frag"/>
<xsl:choose>
<xsl:when test="@linkend">
<fo:inline keep-together.within-line="always">
- <xsl:text> </xsl:text>
- <fo:leader leader-pattern="dots"
- keep-with-next.within-line="always"/>
- <xsl:text> </xsl:text>
+ <fo:leader xsl:use-attribute-sets="toc.leader.properties"/>
<fo:basic-link internal-destination="{@linkend}">
<xsl:choose>
<xsl:when test="@pagenum">
</xsl:when>
<xsl:when test="@pagenum">
<fo:inline keep-together.within-line="always">
- <xsl:text> </xsl:text>
- <fo:leader leader-pattern="dots"
- keep-with-next.within-line="always"/>
- <xsl:text> </xsl:text>
+ <fo:leader xsl:use-attribute-sets="toc.leader.properties"/>
<xsl:value-of select="@pagenum"/>
</fo:inline>
</xsl:when>
- <xsl:otherwise>
- <!-- just the leaders, what else can I do? -->
- <fo:inline keep-together.within-line="always">
- <xsl:text> </xsl:text>
- <fo:leader leader-pattern="space"
- keep-with-next.within-line="always"/>
- </fo:inline>
- </xsl:otherwise>
</xsl:choose>
</fo:block>
</xsl:template>
--- /dev/null
+<refentry xmlns="http://docbook.org/ns/docbook"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:xi="http://www.w3.org/2001/XInclude"
+ xmlns:src="http://nwalsh.com/xmlns/litprog/fragment"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="5.0" xml:id="toc.leader.properties">
+<refmeta>
+<refentrytitle>toc.leader.properties</refentrytitle>
+<refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>toc.leader.properties</refname>
+<refpurpose>How the leaders (rows of dots) are going to look like in ToC?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment xml:id="toc.leader.properties.frag">
+<xsl:attribute-set name="toc.leader.properties">
+ <xsl:attribute name="leader-pattern">dots</xsl:attribute>
+ <xsl:attribute name="leader-pattern-width">3pt</xsl:attribute>
+ <xsl:attribute name="leader-alignment">reference-area</xsl:attribute>
+ <xsl:attribute name="padding-left">3pt</xsl:attribute>
+ <xsl:attribute name="padding-right">3pt</xsl:attribute>
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+<refsection><info><title>Description</title></info>
+<para>Specify leader pattern, </para>
+</refsection>
+</refentry>
+