Michal Kwiatek wrote:
I need to enter a TOC into my document. Titles should be left-aligned, but
numbers of pages must be right-aligned, although they're in the same lines,
as titiles. There should also be dots between titles and page numbers.

I looked for tabulators in xsl specs, but there seem to be none. So there
has to be some other way! Any ideas?

In general, if you think on tabulators, try to translate it into tables first. The following comes pretty close: <fo:table-body> <fo:table-row> <fo:table-cell> <fo:block>1. Foo Chapter<fo:leader leader-pattern="dots"/></fo:block> </fo:table-cell> <fo:table-cell text-align="end"> <fo:block><fo:leader leader-pattern="dots"/>1</fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell> <fo:block>2. Bar Chapter Lorem<fo:leader leader-pattern="dots"/></fo:block> </fo:table-cell> <fo:table-cell text-align="end"> <fo:block><fo:leader leader-pattern="dots"/>22</fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> (Insert your page-number-citations appropriately) Of course, you'll have to work a bit that none of your columns overflow, and there could be an artifact in your leader, even though i never met one. Don't worry about a rugged right margin, that's a known deficiency with page number forward references.

It's interesting to see that
      <fo:block text-align="end">1.&#160;Foo&#160;Chapter<fo:leader
         leader-pattern="dots"/>1</fo:block>
*almost* works too. :-)

J.Pietschmann



Reply via email to