docbook-apps

  • 1.  table vertical spans and page breaks

    Posted 11-06-2008 09:17
    Hi,

    I have a long table in which certain columns contain a large vertical
    span (using morerows attribute).

    When printing to pdf with fop, fop page breaks this large vertical cell
    at an arbitrary place.

    I have been trying to control this using the 'keep-together' directive,
    but I see no effect.

    What is the best way to make sure fop will only break a table at the end
    of cell that spans multiple rows?

    Thanks,

    Marcel
    --



  • 2.  Re: [docbook-apps] table vertical spans and page breaks

    Posted 11-06-2008 12:46
    Hi Marcel,

    Marcel Tromp wrote:
    > Hi,
    >
    > I have a long table in which certain columns contain a large vertical
    > span (using morerows attribute).
    >
    > When printing to pdf with fop, fop page breaks this large vertical cell
    > at an arbitrary place.
    >
    > I have been trying to control this using the 'keep-together' directive,
    > but I see no effect.
    >
    > What is the best way to make sure fop will only break a table at the end
    > of cell that spans multiple rows?

    keep-together set on the spanning cell should work. Which version of FOP
    are you using?


    > Thanks,
    >
    > Marcel

    Vincent



  • 3.  Re: [docbook-apps] table vertical spans and page breaks

    Posted 11-07-2008 08:45
    Hi,

    I am using fop 0.95. I am using code similar to this example:

    I've tried using this dbfo at different location as well (row, start of
    table) and I don't see any difference: fop breaks the table in the
    middle of a cell that straddles multiple rows.


    <row>
    <entry>
    <para>foo</para>
    </entry>
    <entry>
    <para>foo</para>
    </entry>
    <entry morerows="19">

    <para></para>
    </entry>

    What I am trying to do is to have a long (500 row) narrow, sorted table
    be printed three columns per page. I want to use the straddled cell to
    control page breaks:

    page 1:
    1 6 11
    2 7 12
    3 8 13
    4 9 14
    5 10 15

    page 2:
    16 21 26
    17 22 27
    18 23 28
    19 24 29
    20 25 30

    page 3:
    etc.

    Marcel
    --


    Vincent Hennebert wrote:
    > Hi Marcel,
    >
    > Marcel Tromp wrote:
    >> Hi,
    >>
    >> I have a long table in which certain columns contain a large vertical
    >> span (using morerows attribute).
    >>
    >> When printing to pdf with fop, fop page breaks this large vertical
    >> cell at an arbitrary place.
    >>
    >> I have been trying to control this using the 'keep-together'
    >> directive, but I see no effect.
    >>
    >> What is the best way to make sure fop will only break a table at the
    >> end of cell that spans multiple rows?
    >
    > keep-together set on the spanning cell should work. Which version of FOP
    > are you using?
    >
    >
    >> Thanks,
    >>
    >> Marcel
    >
    > Vincent
    >
    > ---------------------------------------------------------------------
    > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
    > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org




  • 4.  Re: [docbook-apps] table vertical spans and page breaks

    Posted 11-07-2008 11:29
    Hi,

    Marcel Tromp wrote:
    > Hi,
    >
    > I am using fop 0.95. I am using code similar to this example:
    >
    > I've tried using this dbfo at different location as well (row, start of
    > table) and I don't see any difference: fop breaks the table in the
    > middle of a cell that straddles multiple rows.
    >
    >
    > <row>
    > <entry>
    > <para>foo</para>
    > </entry>
    > <entry>
    > <para>foo</para>
    > </entry>
    > <entry morerows="19">
    >
    > <para></para>
    > </entry>

    This processing instruction only applies to formal object (table,
    example, figure, equation), not to other elements [1].
    [1] http://docbook.sourceforge.net/release/xsl/current/doc/pi/dbfo_keep-together.html

    You will have to customize the template matching <entry> and add
    a keep-together.within-column="always" to the produced fo:table-cell
    element. As to how to do that...


    > What I am trying to do is to have a long (500 row) narrow, sorted table
    > be printed three columns per page. I want to use the straddled cell to
    > control page breaks:
    >
    > page 1:
    > 1 6 11
    > 2 7 12
    > 3 8 13
    > 4 9 14
    > 5 10 15
    >
    > page 2:
    > 16 21 26
    > 17 22 27
    > 18 23 28
    > 19 24 29
    > 20 25 30
    >
    > page 3:
    > etc.

    I’m not sure this is the best way to achieve that. The source DocBook
    file should remain output-agnostic; by adding a row-spanning entry
    element you’re somehow abusing its semantics.
    A more proper way would be to customize the XSLT stylesheets so as to
    put a keep-together.within-column plus keep-with-next.within-column on
    every row, except every n-th row. Of course that requires some XSLT
    knowledge.


    HTH,
    Vincent