This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Linebreaks in TOC
I found the following to work pretty well.
<xsl:template match="idx/item">
<fo:block
start-indent="0.5in"
end-indent="0.5in"
font-size="{$base-font-spec}"
text-align-last="justify">
<xsl:apply-templates/>
<fo:leader leader-pattern="dots"/><fo:basic-link
internal-destination="{@idref}"> <fo:page-number-citation color="blue"
ref-id="{@idref}"/></fo:basic-link>
</fo:block>
</xsl:template>
Hmm, in passivetex at least page-number-citation makes a link all by
itself, so the above would produce nested links (to the same place).
Looking at the spec again I can't see anything to justify this
(although it seems reasonably useful)
Sebastian?
To answer the original posters question, I _think_ that if you ensure
that the <xsl:apply-templates/> above doesn't put any white space
after your text then there isn't a breakpoint after the last word, and
so if the line is broken then the word (or part of the word) should come
down on to the last line, before the start of the leaders.
David
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list