[xep-support] Re: Fixed width field and leaders

From: Mark Burton <burtoogle@gmail.com>
Date: Thu Dec 30 2010 - 13:41:13 PST

Hi Kevin,
Many thanks for the response. I now have a solution based on yoursuggestions. FYI, here it is:
<fo:table width="100%"> <fo:table-column column-width="10%"/> <fo:table-column/> <fo:table-body> <fo:table-row padding-bottom="2pt"> <fo:table-cell start-indent="0pc"> <fo:block text-align="left"> <fo:basic-link internal-destination="{$id}"> <xsl:if test="$label != ''"> <xsl:copy-of select="$label"/> </xsl:if> </fo:basic-link> </fo:block> </fo:table-cell> <fo:table-cell start-indent="0pc"> <fo:block text-align="left" text-align-last="justify" width="90%"> <fo:basic-link internal-destination="{$id}"> <xsl:apply-templates select="." mode="title.markup"/> </fo:basic-link> <xsl:text> </xsl:text> <fo:inline keep-together.within-line="always"> <fo:leader leader-pattern="dots" keep-with-next.within-line="always"/> <xsl:text> </xsl:text>
  <fo:basic-link internal-destination="{$id}"> <fo:page-number-citation ref-id="{$id}"/> </fo:basic-link> </fo:inline> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table>
One oddity that took me by surprise was that I had to explicitly setthe table-cell start-indents to 0 otherwise some of the content inthe TOC was shifted to the right - specifically, the lines for sectionswere shifted to the right but the lines for sub-sections were not.
Anyway, thanks again for your help.
Cheers,
Mark
------------------

On Wed, 29 Dec 2010 15:21:47 -0800"Kevin Brown" <kevin@renderx.com> wrote:
> Mark:> > The right side might look something like this:> > <fo:block text-align="left" text-align-last="justify">Some Section> <fo:inline keep-together.within-line="always"><fo:leader> leader-pattern="dots"/>3</fo:inline>> </fo:block>> > Put it in a two column table. Or even a three column table with the page> numbers in the third.> > I have attached sample FO and PDF output for one such layout with only> blocks.> > Kevin Brown> RenderX> > -----Original Message-----> From: xep-support-bounces@renderx.com> [mailto:xep-support-bounces@renderx.com] On Behalf Of Mark Burton> Sent: Wednesday, December 29, 2010 1:55 PM> To: xep-support@renderx.com> Subject: [xep-support] Fixed width field and leaders> > Hi,> > I'm just starting with XSL-FO and I am trying to customise the docbook> stylesheets.> > Is it possible to construct a TOC line that looks like this?> > 1      Some section ......................... 3> 1.1    A sub-section ........................ 4> 2      Another section ...................... 5>
> So it's some text in a fixed width field, another text field that's> variable length, the dots and then the page number at the end of the> line.> > I tried putting the label text inside <fo:inline width="2cm"> but it> didn't have any effect, the leaders appear to gobble all of the space> in the line. Having spent quite a few hours trying to come up with a> solution, I would be grateful if anyone could suggest what is> required.> > Cheers,> > Mark> > > > > _______________________________________________> (*) To unsubscribe, please visit> http://lists.renderx.com/mailman/options/xep-support> (*) By using the Service, you expressly agree to these Terms of Service> http://w> ww.renderx.com/terms-of-service.html
!DSPAM:87,4d1cfc8163732633641135!

_______________________________________________(*) To unsubscribe, please visit http://lists.renderx.com/mailman/options/xep-support(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html
Received on Thu Dec 30 13:41:32 2010

This archive was generated by hypermail 2.1.8 : Thu Dec 30 2010 - 13:41:34 PST