TOC - page numbers not justified

2003-02-27 Thread Afshartous, Nick
Title: TOC - page numbers not justified






Hi,


I'm trying to generate a table of contents using a fragment 
similar to the example in Ch 10 of Pawson's book


xsl:for-each select=html:html/html:body/html:h1


 fo:block text-align-last=justify
 xsl:value-of select=./
 fo:inline
 fo:leader leader-pattern=dots/
 fo:page-number-citation ref-id={.}/
 /fo:inline
 /fo:block


 /xsl:for-each



The problem I'm seeing though is that the page numbers 
in the contents are  sample.pdf not right justified (see attached). Thanks for any suggestions
on how to resolve this. 
--
 Nick





sample.pdf
Description: Binary data
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: TOC - page numbers not justified

2003-02-27 Thread Myriam Delperier
Have a look at http://xml.apache.org/fop/faq.html :
Page numbers are not properly right aligned.
This happens for fo:page-number-citation elements if the citation occurs
before FOP formatted the requested page, usually in TOC or index pages.

It is caused by the problem that FOP has to guess how much space the yet
unknown page number will occupy, and usually the guesses are somewhat off.
You can try to use a non-proportional font like Courier to remedy this.
However, this is likely to look ugly, and wont fix the problem completely.

- Original Message -
From: Afshartous, Nick [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, February 27, 2003 3:39 PM
Subject: TOC - page numbers not justified



 Hi,

 I'm trying to generate a table of contents using a fragment
 similar to the example in Ch 10 of Pawson's book

  xsl:for-each select=html:html/html:body/html:h1

   fo:block text-align-last=justify
   xsl:value-of select=./
   fo:inline
   fo:leader leader-pattern=dots/
   fo:page-number-citation ref-id={.}/
   /fo:inline
   /fo:block

   /xsl:for-each


 The problem I'm seeing though is that the page numbers
 in the contents are  sample.pdf not right justified (see attached).
 Thanks for any suggestions
 on how to resolve this.
 --
 Nick








 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AW: TOC - page numbers not justified

2003-02-27 Thread Mark Baier
Title: TOC - page numbers not justified



Hi,

i 
think putting your TOC into a table with two columns 
could
solve 
the problem...

Mark



  -Ursprüngliche Nachricht-Von: Afshartous, Nick 
  [mailto:[EMAIL PROTECTED]Gesendet: Donnerstag, 27. 
  Februar 2003 15:40An: '[EMAIL PROTECTED]'Betreff: 
  TOC - page numbers not justified
  Hi, 
  I'm trying to generate a table of contents using a 
  fragment similar to the example in Ch 10 of 
  Pawson's book 
  xsl:for-each 
  select="html:html/html:body/html:h1" 
   fo:block 
  text-align-last="justify"  
  xsl:value-of select="."/  
  fo:inline  
  fo:leader leader-pattern="dots"/  
  fo:page-number-citation ref-id="{.}"/  
  /fo:inline  
  /fo:block 
   
  /xsl:for-each 
  The problem I'm seeing though is that the page 
  numbers in the contents are sample.pdf not right justified 
  (see attached). Thanks for any suggestions on how to resolve this. --  Nick 
  


RE: TOC - page numbers not justified

2003-02-27 Thread Afshartous, Nick
Title: TOC - page numbers not justified




 From: Mark Baier [mailto:[EMAIL PROTECTED]]

 i think putting your TOC into a table with two columns 
could
 solve the 
problem...

Thanks for the 
suggestion! I ended up using 3 columns
(title, dots, page 
number) and it looks great (see attached).
Thie 
template is 
below. Maybe someone can put this in the FAQ 
for "page numbers 
are not properly right aligned" ?

 http://xml.apache.org/fop/faq.html#faq-N10255

 
Nick

xsl:template 
match="/" mode="toc" fo:block 
text-align="center" font-size="large" 
space-after="1em" Table 
of Contents 
/fo:block

 
fo:tablefo:table-column 
column-width="6cm"/fo:table-column 
column-width="12cm"/fo:table-column 
column-width="2cm"/

 
fo:table-body

 xsl:for-each 
select="html:html/html:body/html:h1"

 
fo:table-row border-width="0.5pt"

 
fo:table-cell fo:block 
text-align="left" 
xsl:value-of select="."/ 
/fo:block 
/fo:table-cell

 
fo:table-cell 
fo:block fo:inline 
fo:leader leader-pattern="dots"/ 
/fo:inline 
/fo:block 
/fo:table-cell

 
fo:table-cell fo:block 
start-indent="0.5cm" 
fo:page-number-citation 
ref-id="{.}"/ 
/fo:block 
/fo:table-cell

 
/fo:table-row

 
/xsl:for-each

 
/fo:table-body 
/fo:table

 
/xsl:template


-Original Message-From: Mark 
Baier [mailto:[EMAIL PROTECTED]Sent: Thursday, February 27, 2003 9:50 
AMTo: [EMAIL PROTECTED]Subject: AW: TOC - page 
numbers not justified

  Hi,
  
  i 
  think putting your TOC into a table with two columns 
  could
  solve the problem...
  
  Mark
  
  
  
-Ursprüngliche Nachricht-Von: Afshartous, Nick 
[mailto:[EMAIL PROTECTED]Gesendet: Donnerstag, 27. 
Februar 2003 15:40An: 
'[EMAIL PROTECTED]'Betreff: TOC - page numbers not 
justified
Hi, 
I'm trying to generate a table of contents using 
a fragment similar to the example in Ch 
10 of Pawson's book 
xsl:for-each 
select="html:html/html:body/html:h1" 
 fo:block 
text-align-last="justify"  
xsl:value-of select="."/  
fo:inline  
fo:leader leader-pattern="dots"/  
fo:page-number-citation ref-id="{.}"/  
/fo:inline  
/fo:block 
 
/xsl:for-each 
The problem I'm seeing though is that the page 
numbers in the contents are sample.pdf not right 
justified (see attached). Thanks for any suggestions on how to resolve this. --  Nick 



sample.pdf
Description: Binary data
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: TOC - page numbers not justified

2003-02-27 Thread J.Pietschmann
Afshartous, Nick wrote:
Thanks for the suggestion!  I ended up using 3 columns
(title, dots, page number) and it looks great (see attached).
Thie template is below.  Maybe someone can put this in the FAQ 
for page numbers are not properly right aligned ?
The problem will be fixed next week anyway.
Your approach is indeed reasonable, but bigger page numbers
will still cause problems.
J.Pietschmann
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]