[xep-support] TOC leader and page ref wrapping badly

From: Martin Holmes <mholmes@uvic.ca>
Date: Mon Apr 04 2005 - 13:25:58 PDT

Hi folks,

I wonder if anyone can help with this:

I have code (below) which formats a table of contents with the chapter
title, followed by a dotted leader, and the page number on the right. In
rare cases when the title of the chapter is a little too long, but not long
enough to wrap itself, I end up with a situation where the title will be
followed by one or two dots of the leader, then the page number will be
wrapped to the next line, where it is not right-justified, but justified
(which leads to digits in the page number being spread across the whole
line). Has anyone hit this problem before, and if so, can you suggest a

Here's the code:

         <xsl:for-each select="//TEI.2">
select="descendant::teiHeader/fileDesc/titleStmt/author/name/@reg" />
                 <fo:block text-align-last="justify">
                     <xsl:value-of select="text/front/docTitle/titlePart" />
                     <fo:leader leader-pattern="dots"/>
                         <xsl:attribute name="ref-id">
                             <xsl:value-of select="@id" />
<!-- Get the list of authors for the paper -->
                 <fo:block xsl:use-attribute-sets="TOCAuthors">
                     <xsl:for-each select=".//docAuthor/name">
                         <xsl:if test="position() &gt; 1">, </xsl:if>
                         <xsl:value-of select="." />

All help appreciated!

Martin Holmes
University of Victoria Humanities Computing and Media Centre

(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo@renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html
Received on Mon Apr 4 13:59:29 2005

This archive was generated by hypermail 2.1.8 : Mon Apr 04 2005 - 13:59:30 PDT