|Subject:||Re: [docbook-apps] Header out of alignment - space before graphic|
|From:||Colin Shapiro (cmsh...@gmail.com)|
|Date:||Apr 12, 2007 9:55:56 am|
I have had this problem before, where I had to set the font-size to 0pt to prevent unwanted space before and after images.
All that it requires is an fo:block with this property:
If you're customizing the header.content template, simply surround the desired content with one of these fo:blocks; i.e:
<xsl:template name="header.content"> ... <xsl:when test="$sequence = 'first'"> <fo:block font-size="0pt"> ...content... </fo:block> </xsl:when> ... </xsl:template>
I think that will be all that is necessary... by specifying font-size="0pt" on a block within a header table cell, I don't think you will actually need to do anything to the table-cell itself. If you find that this doesn't work, however, and you'd like to try customizing the table-cell itself, then search pagesetup.xsl for the template called header.table. Copy it to your customization layer, and work with it as necessary.
I hope that helps.
On 4/12/07, Paul Moloney <paul...@hotmail.com> wrote:
Bob Stayton wrote: > > but I don't think those are the problem. You might try adding a > background > color to the table cell, and add borders around the cell, block, and > external-graphic to see what is contributing the space.
Only got back to this problem now.... I tried your suggestion, and the result is at http://img175.imageshack.us/my.php?image=headerwithcolorle3.png . It just seems that something is forcing space before (and indeed, a small amount of space after) the left-hand graphic. (The yellow and blue colors indicate the left-most and right-most cells in the header table, respectively, while the left-hand pink indicates the background of the graphic). Nothing in the .fo file seemed to indicates where this space is from.
Then I remembered an answer you gave to a previous question I had about unwanted space before graphics (http://www.nabble.com/forum/ViewPost.jtp?post=9620007&framed=y) so I edited the .fo and, for the header cell containing the graphic, set both line-height and font-size to zero. That works! Result is here: http://img239.imageshack.us/img239/365/headerwithcolorafterxo6.png
Unfortunately, I have _no_ idea how to do this in my custom layer. The instructions at http://www.sagehill.net/docbookxsl/PrintHeaders.html#PrintHeadersText don't seem to indicate that such a problem might happen, and only describes how to specify the content of the cells, and not the attributes of the cells themselves. Any ideas? Is there perhaps a setting in my custom layer which is causing this problem?
P. -- View this message in context: http://www.nabble.com/Header-out-of-alignment---space-before-graphic-tf3504806.html#a9962233 Sent from the docbook apps mailing list archive at Nabble.com.
Visible links 1. http://img175.imageshack.us/my.php?image=headerwithcolorle3.png 2. http://www.sagehill.net/docbookxsl/PrintHeaders.html#PrintHeadersText 3. http://www.nabble.com/Header-out-of-alignment---space-before-graphic-tf3504806.html#a9962233 4. mailto:docb...@lists.oasis-open.org