Customizing header alignment with image

View: New views
6 Messages — Rating Filter:   Alert me  

Customizing header alignment with image

by spr :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

When I add an image to page header, the text is aligned on top of the header table.

Have tried following, without success:
  <xsl:attribute-set name="header.table.properties">
    <xsl:attribute name="table-layout">fixed</xsl:attribute>
    <xsl:attribute name="background-color">yellow</xsl:attribute>
    <xsl:attribute name="vertical-align">bottom</xsl:attribute>
  </xsl:attribute-set>

As you can see in attached image, the chapter title is on top of table. Would like to align with base of image (shown with red line).



Ideas?

~spr
~spr

Re: Customizing header alignment with image

by Bob Stayton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

There is no "vertical-align" property in XSL-FO.  You are looking for
display-align, whose enumerated values are:

 auto | before | center | after | inherit

You want "after" instead of bottom.  A good reference is necessary when
working with XSL-FO.  I use the original specification at:

http://www.w3.org/TR/xsl/

In particular, see Appendix D, Property index.

Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@...


----- Original Message -----
From: "spr" <spremi@...>
To: <docbook-apps@...>
Sent: Thursday, October 04, 2007 10:43 AM
Subject: [docbook-apps] Customizing header alignment with image


>
> When I add an image to page header, the text is aligned on top of the
> header
> table.
>
> Have tried following, without success:
>  <xsl:attribute-set name="header.table.properties">
>    <xsl:attribute name="table-layout">fixed</xsl:attribute>
>    <xsl:attribute name="background-color">yellow</xsl:attribute>
>    <xsl:attribute name="vertical-align">bottom</xsl:attribute>
>  </xsl:attribute-set>
>
> As you can see in attached image, the chapter title is on top of table.
> Would like to align with base of image (shown with red line).
>
> http://www.nabble.com/file/p13045056/header-curr..png
>
> Ideas?
>
> ~spr
> --
> View this message in context:
> http://www.nabble.com/Customizing-header-alignment-with-image-tf4570315.html#a13045056
> Sent from the docbook apps mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@...
> For additional commands, e-mail: docbook-apps-help@...
>
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@...
For additional commands, e-mail: docbook-apps-help@...


Re: Customizing header alignment with image

by spr :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

This didn;t work either:
  <xsl:attribute-set
    name    = "header.table.properties">
    <xsl:attribute
      name  = "table-layout">fixed</xsl:attribute>
    <xsl:attribute
      name  = "width">100%</xsl:attribute>
    <xsl:attribute
      name  = "background-color">yellow</xsl:attribute>
    <xsl:attribute
      name  = "alignment-adjust">alphabetic</xsl:attribute>
    <xsl:attribute
      name  = "display-align">after</xsl:attribute>
  </xsl:attribute-set>

Added attribute alignment-adjust in addition to display-align as well...
:( spr


There is no "vertical-align" property in XSL-FO.  You are looking for
display-align, whose enumerated values are:

 auto | before | center | after | inherit

You want "after" instead of bottom.  A good reference is necessary when
working with XSL-FO.  I use the original specification at:

http://www.w3.org/TR/xsl/

In particular, see Appendix D, Property index.

Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net
~spr

RE: Customizing header alignment with image

by Mauritz Jeanson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> -----Original Message-----
> From: spr
>
> This didn;t work either:
>   <xsl:attribute-set
>     name    = "header.table.properties">
>     <xsl:attribute
>       name  = "table-layout">fixed</xsl:attribute>
>     <xsl:attribute
>       name  = "width">100%</xsl:attribute>
>     <xsl:attribute
>       name  = "background-color">yellow</xsl:attribute>
>     <xsl:attribute
>       name  = "alignment-adjust">alphabetic</xsl:attribute>
>     <xsl:attribute
>       name  = "display-align">after</xsl:attribute>
>   </xsl:attribute-set>


When working with FOP, the compliance page is handy:
http://xmlgraphics.apache.org/fop/compliance.html.

According to that page, display-align is only partially implemented, which
may explain why it did not work as you expected.

/MJ



---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@...
For additional commands, e-mail: docbook-apps-help@...


Re: Customizing header alignment with image

by Vincent Hennebert-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Sorry for the delay...

Mauritz Jeanson wrote:

>> -----Original Message-----
>> From: spr
>>
>> This didn;t work either:
>>   <xsl:attribute-set
>>     name    = "header.table.properties">
>>     <xsl:attribute
>>       name  = "table-layout">fixed</xsl:attribute>
>>     <xsl:attribute
>>       name  = "width">100%</xsl:attribute>
>>     <xsl:attribute
>>       name  = "background-color">yellow</xsl:attribute>
>>     <xsl:attribute
>>       name  = "alignment-adjust">alphabetic</xsl:attribute>
>>     <xsl:attribute
>>       name  = "display-align">after</xsl:attribute>
>>   </xsl:attribute-set>
>
>
> When working with FOP, the compliance page is handy:
> http://xmlgraphics.apache.org/fop/compliance.html.
>
> According to that page, display-align is only partially implemented, which
> may explain why it did not work as you expected.

This is not a FOP issue here. The display-align setting on the header
table is overriden by display-align="before" set on the table-cells.
This is hardcoded in the header.table template in pagesetup.xsl.

Copy/paste this template in your customization layer, remove the
display-align setting for each table-cell in it, and then that should
work. Maybe DocBook customization wizards will have better
recommendations.

HTH,
Vincent

---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@...
For additional commands, e-mail: docbook-apps-help@...


Re: Customizing header alignment with image

by spr :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks Vincent!
It really works :)

I changed display-align for all columns in the header.

Not sure if i could file a defect/ enhancement for docbook-xsl...
Copying a big template to customize only alignment doesn't seem elegant.

~spr

Vincent Hennebert-3 wrote:
Hi,

Sorry for the delay...

Mauritz Jeanson wrote:
>> -----Original Message-----
>> From: spr
>>
>> This didn;t work either:
>>   <xsl:attribute-set
>>     name    = "header.table.properties">
>>     <xsl:attribute
>>       name  = "table-layout">fixed</xsl:attribute>
>>     <xsl:attribute
>>       name  = "width">100%</xsl:attribute>
>>     <xsl:attribute
>>       name  = "background-color">yellow</xsl:attribute>
>>     <xsl:attribute
>>       name  = "alignment-adjust">alphabetic</xsl:attribute>
>>     <xsl:attribute
>>       name  = "display-align">after</xsl:attribute>
>>   </xsl:attribute-set>
>
>
> When working with FOP, the compliance page is handy:
> http://xmlgraphics.apache.org/fop/compliance.html.
>
> According to that page, display-align is only partially implemented, which
> may explain why it did not work as you expected.

This is not a FOP issue here. The display-align setting on the header
table is overriden by display-align="before" set on the table-cells.
This is hardcoded in the header.table template in pagesetup.xsl.

Copy/paste this template in your customization layer, remove the
display-align setting for each table-cell in it, and then that should
work. Maybe DocBook customization wizards will have better
recommendations.

HTH,
Vincent

---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
~spr