docbook-apps

  • 1.  Centered table cells

    Posted 02-04-2016 14:57
    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





  • 2.  Re: [docbook-apps] Centered table cells

    Posted 02-04-2016 15:01
    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

    --
    Ron Catterall Ph.D, DSc
    ron@catterall.net



  • 3.  AW: [docbook-apps] Centered table cells

    Posted 02-04-2016 15:22
    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:ron@catterall.net]
    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

    --
    Ron Catterall Ph.D, DSc
    ron@catterall.net



  • 4.  Re: AW: [docbook-apps] Centered table cells

    Posted 02-04-2016 16:30
    I have no problem centering content of cells for Docbook 5.1 using
    Oxygen 17.1 with docbook-xsl-ns-1.79.1 (or 1.79.0)

    I do NOT implement the extensions - this might possibly be relevant.


    Just for the record I do have some table customization but these do not
    appear to be relevant) These I do implement:

    <xsl:param name="table.frame.border.color" select="'black'" />
    <xsl:param name="table.cell.border.color" select="'black'" />
    <xsl:param name="table.frame.border.thickness" select="'medium'" />
    <xsl:param name="table.cell.border.thickness" select="'thin'" />
    <xsl:param name="table.frame.border.style" select="'solid'" />
    <xsl:param name="table.cell.border.style" select="'solid'" />


    <xsl:attribute-set name="table.table.properties">
    <xsl:attribute name="table-omit-header-at-break">true</xsl:attribute>
    </xsl:attribute-set>


    <xsl:attribute-set name="table.properties">
    <xsl:attribute name="space-before.minimum">0.5em</xsl:attribute>
    <xsl:attribute name="space-before.optimum">1.0em</xsl:attribute>
    <xsl:attribute name="space-before.maximum">2.0em</xsl:attribute>
    <xsl:attribute name="space-before.minimum">0.5em</xsl:attribute>
    <xsl:attribute name="space-before.optimum">1.0em</xsl:attribute>
    <xsl:attribute name="space-before.maximum">2.0em</xsl:attribute>
    <xsl:attribute name="keep-together.within-column">auto</xsl:attribute>
    </xsl:attribute-set>


    <xsl:attribute-set name="table.table.properties">
    <xsl:attribute name="table-omit-footer-at-break">true</xsl:attribute>
    </xsl:attribute-set>


    <xsl:attribute-set name="table.table.properties">
    <xsl:attribute name="table-omit-header-at-break">true</xsl:attribute>
    </xsl:attribute-set>



    <xsl:param name="local.l10n.xml" select="document('')"/>
    <l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
    <l:l10n language="en">
    <l:context name="title">
    <l:template name="table" text="%t"/>
    </l:context>
    <l:context name="xref-number-and-title">
    <l:template name="table" text="the table titled
    “%t”"/>
    </l:context>
    <l:context name="title">
    <l:template name="figure" text="%t"/>
    </l:context>
    <l:context name="xref-number-and-title">
    <l:template name="figure" text="the figure titled
    “%t”"/>
    </l:context>
    </l:l10n>
    </l:i18n>
    <xsl:template match="table" mode="label.markup"/>
    <xsl:template match="figure" mode="label.markup"/>


    On 02/04/2016 09: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:ron@catterall.net]
    > 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
    >

    --
    Ron Catterall Ph.D, DSc
    ron@catterall.net



  • 5.  Re: AW: [docbook-apps] Centered table cells

    Posted 02-04-2016 17:18
    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
    bobs@sagehill.net

    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:ron@catterall.net]
    > 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
    >



  • 6.  AW: AW: [docbook-apps] Centered table cells

    Posted 02-05-2016 07:57
    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:bobs@sagehill.net]
    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

    bobs@sagehill.net



    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:ron@catterall.net]

    > 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

    >



  • 7.  AW: AW: [docbook-apps] Centered table cells

    Posted 02-05-2016 10:06
    Dear all

    Shame on me. Long time ago it seems that I have customized the "table.cell.block.properties" template and pimped it with a fixed 'start' value.

    My big excuse to the group and wasting your time. Next time I promise to be more thorough before posting problems. :-)

    Thanks
    Ben

    Von: Kallauch, Benjamin (EEIN/5)
    Gesendet: Freitag, 5. Februar 2016 08:57
    An: Docbook
    Betreff: 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:bobs@sagehill.net]
    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

    bobs@sagehill.net<mailto:bobs@sagehill.net>



    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:ron@catterall.net]

    > 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

    >