Re: fo:leader issue
Thanks for the help. Ed --- "J.Pietschmann" <[EMAIL PROTECTED]> wrote: > Eduardos wrote: > > The problem is that the fo:leader does not take > into > > account the size of the $author text and therefore > > produces a longer than expected leader. > > I tried it with FOP 0.20.3 and indeed, the table > cell > overflows. I read the spec multiple times, and the > interesting point seems to be, the leader is allowed > to fill the the available space in the line up to > the > percentage declared in leader-length, possibly > overflowing the region by both the space needed for > any text before and after the leader which can't be > stuffed into another line. This is not exactly what > I expected, but it does not violate the spec. The > expected behaviour, using the room provided by > leader-length.minimum and leader-length.maximum to > justify the text properly, is actually formulated > as "it's common practice", some sort of weak > recommendation. > > > I am not sure if this is a bug in fop or if I am > using > > fo:leader incorrectly. > In some sense you are using fo:leader incorrectly by > setting leader-length to 100%, which IIRC means that > *all* values, .minimum, .optimum and .maximum are > set > to 100%, causing the formatter to use the full line > width for the leader length. It ought to be a good > idea > to use the default values (.min=0, .opt=12pt, > .max=100%). > > It's also probably a good idea to use > text-align="justify" > and text-align-last="justify" to tell the formatter > it > should indeed try to justify. This wont work with > the > current FOP, and in this case it is a real bug > (areas > overlap). > > With FOP, your best bet is to get a reasonable guess > for > how much space is available to the leader, assign it > to > leader-length.maximum, use text-align-last="justify" > and > put a space after the leader to allow for additional > justification room. Unfortunately, none of the > interesting > stuff provided by the spec for making this a bit > easier > is currently implemented in FOP. > > text-align-last="justify">Title:Subtitle > leader-length.maximum="24em" > leader-pattern-width="5pt"/> > AuthorInfo > > > Some other hints: > > column-width="{concat($text-width - > > 1.25, 'in')}"/> > You can write this as > > > > > > : > You are introducing a white space here, which could > induce > an unwanted line break. > > J.Pietschmann > > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, email: > [EMAIL PROTECTED] > __ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: fo:leader issue
Eduardos wrote: > The problem is that the fo:leader does not take into > account the size of the $author text and therefore > produces a longer than expected leader. I tried it with FOP 0.20.3 and indeed, the table cell overflows. I read the spec multiple times, and the interesting point seems to be, the leader is allowed to fill the the available space in the line up to the percentage declared in leader-length, possibly overflowing the region by both the space needed for any text before and after the leader which can't be stuffed into another line. This is not exactly what I expected, but it does not violate the spec. The expected behaviour, using the room provided by leader-length.minimum and leader-length.maximum to justify the text properly, is actually formulated as "it's common practice", some sort of weak recommendation. > I am not sure if this is a bug in fop or if I am using > fo:leader incorrectly. In some sense you are using fo:leader incorrectly by setting leader-length to 100%, which IIRC means that *all* values, .minimum, .optimum and .maximum are set to 100%, causing the formatter to use the full line width for the leader length. It ought to be a good idea to use the default values (.min=0, .opt=12pt, .max=100%). It's also probably a good idea to use text-align="justify" and text-align-last="justify" to tell the formatter it should indeed try to justify. This wont work with the current FOP, and in this case it is a real bug (areas overlap). With FOP, your best bet is to get a reasonable guess for how much space is available to the leader, assign it to leader-length.maximum, use text-align-last="justify" and put a space after the leader to allow for additional justification room. Unfortunately, none of the interesting stuff provided by the spec for making this a bit easier is currently implemented in FOP. Title:Subtitle AuthorInfo Some other hints: > You can write this as > > : You are introducing a white space here, which could induce an unwanted line break. J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
fo:leader issue
Hi All, I am building the table-of-contents for a pdf document using fop-0.20.3, XSL, and XML. Each row of the TOC has to be in the following format: ^[--- column 1 ][-- col 2 --]$ ^[title]:[subtitle].[author][page number]$ ^ - start of line $ - end of line I am using the code below to auto-layout the dotted leader: ... : ... The problem is that the fo:leader does not take into account the size of the $author text and therefore produces a longer than expected leader. If the $author text is removed, then fo:leader works properly. I am not sure if this is a bug in fop or if I am using fo:leader incorrectly. Any help would be appriciated. Thanks, Ed __ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]