← Prev in month ← Prev in thread

AW: AW: [docbook-apps] Centered table cells

From
Kallauch, Benjamin (EEIN/5) <>
Date
2016-02-05T07:56:36+00:00
ID
Thread
AW: AW: [docbook-apps] Centered table cells
Hi Bob, dear all

 

you say, the block inside the cell may reset the text-align attribute. This is indeed the case in my fo-export. Here is a code snippet, where you can see, that the cell has got the text-align
 attribute set correctly to 'center', but then the following child block element resets it to 'start'.

 

<fo:table-cell padding-start="2pt" padding-end="2pt" padding-top="2pt" padding-bottom="2pt" keep-together.within-column="always" border-end-width="0.5pt"
 border-end-style="solid" border-end-color="blue" display-align="center" text-align="center">

                <fo:block
font-size="70%" text-align="start">content here should be centered</fo:block>

</fo:table-cell>

 

Second, what confuses me is that a “text-align” attribute is not specified within a <fo:table-cell> element in FO as far as I know. So, text-align should not even show up within fo:table cell, in my eyes.

 

By the way, there is no difference whether I use a <para> inside the <entry> element or nor. The only (not remarkable) difference is a further fo:block child element within the fo:block above.

 

FOP version 1.1

XSL stylesheets v. 1.78.1

 

Thanks a lot for your help.

 

regards

Benjamin

 

 

-----Ursprüngliche Nachricht-----

Von: Bob Stayton [mailto:] 

Gesendet: Donnerstag, 4. Februar 2016 18:18

An: Kallauch, Benjamin (EEIN/5); Docbook

Betreff: Re: AW: [docbook-apps] Centered table cells

 

The text-align property is an inherited property in FO, so setting it on

the cell should center its content unless the block inside the cell

resets the text-align property.  Are you using para inside the cell, and

does the para's fo:block have a text-align property on it?

 

Also, what is the FO processor and version?

 

Bob Stayton

Sagehill Enterprises



 

On 2/4/2016 7:21 AM, Kallauch, Benjamin (EEIN/5) wrote:

> Dear Ron,

> 

> it's about centering only the content/text within a single or more cells.

> 

> regards,

> Ben

> 

> -----Ursprüngliche Nachricht-----

> Von: Ron Catterall [mailto:]

> Gesendet: Donnerstag, 4. Februar 2016 16:01

> An: Kallauch, Benjamin (EEIN/5); Docbook

> Betreff: Re: [docbook-apps] Centered table cells

> 

> Is your problem centering the whole table, or just the content of each cell

> 

> On 02/04/2016 08:57 AM, Kallauch, Benjamin (EEIN/5) wrote:

>> Dear community

>> I encountered a problem using XSL --> FO where I can't get centered

>> table cells (horizontally). In my opinion the cause is in a false

>> fo-structure, where the 'text-align' attribute is set in the

>> fo:table-cell element rather than in the fo:block child element.

>> The problem is maybe well known and solved long ago. Please, forgive me,

>> but I feel overwhelmed by the huge amount of hits when searching the

>> group. Can anyone please direct me to a solution, if there is any?

>> Thanks and best regards,

>> Benjamin

>
← Prev in month ← Prev in thread