Loading ...
Sorry, an error occurred while loading the content.

Tables within lists

Expand Messages
  • arianhojat2000
    Is it just me but when i use fop and have a table within a few lists, I expect the table to start where the indentations start (so when 2 lists deep, it should
    Message 1 of 5 , Jun 16, 2005
    • 0 Attachment
      Is it just me but when i use fop and have a table within a few lists,
      I expect the table to start where the indentations start (so when 2
      lists deep, it should start at the 2nd indentation point).

      Instead, looking at border-colors to debug, it seems that the column-
      widths start at the left most part of page yet starts the actual text
      in the column where u would expect it to start... BUTTT gets cut off
      by the right edge of the unshifted part)

      A pic might explain better than my words...
      http://www.pages.drexel.edu/~ah49/images/table.jpg
      notice how in the 1st column it starts off where it should (left
      aligned to the 'shifted' cell). By shifted i mean indented cause it
      starts inside of a list.

      But the colored unshifted cell cuts off the right part of text. It
      makes me think where does the table really start? the shifted or
      unshifted one. both seem to be influencing the 1st column, starting
      at the shifted cell, but being cut off at the unshifted cell(shown by
      the brown lines i drew).

      I can post code later if it makes a difference. But its a standard
      table with left aligned column text, inside of a few lists.
    • arianhojat2000
      I think I can better phraze my question shorter..., How can you give a table margins? I tried to move a table with margin- left to no avail. I tried putting it
      Message 2 of 5 , Jun 17, 2005
      • 0 Attachment
        I think I can better phraze my question shorter...,
        How can you give a table margins? I tried to move a table with margin-
        left to no avail. I tried putting it within a block and giving the
        block margin-left's to no avail also.


        i was hoping some dynamic way could set up the margins since in my
        more complicated example, a table itself can be within many lists,
        and it should inherit indent/margins somehow. (as you can see from
        the pic i posted, it will inherit it fine for the text in a table
        cell but not the table itself.)

        <a href="http://www.pages.drexel.edu/~ah49/images/table.jpg">
        http://www.pages.drexel.edu/~ah49/images/table.jpg
        </a>

        Thanks if anyone can help me with this stumper,
        Arian Hojat



        --- In XSL-FO@yahoogroups.com, "arianhojat2000" <arianhojat2000@y...>
        wrote:
        > Is it just me but when i use fop and have a table within a few
        lists,
        > I expect the table to start where the indentations start (so when 2
        > lists deep, it should start at the 2nd indentation point).
        >
        > Instead, looking at border-colors to debug, it seems that the
        column-
        > widths start at the left most part of page yet starts the actual
        text
        > in the column where u would expect it to start... BUTTT gets cut
        off
        > by the right edge of the unshifted part)
        >
        > A pic might explain better than my words...
        > http://www.pages.drexel.edu/~ah49/images/table.jpg
        > notice how in the 1st column it starts off where it should (left
        > aligned to the 'shifted' cell). By shifted i mean indented cause it
        > starts inside of a list.
        >
        > But the colored unshifted cell cuts off the right part of text. It
        > makes me think where does the table really start? the shifted or
        > unshifted one. both seem to be influencing the 1st column, starting
        > at the shifted cell, but being cut off at the unshifted cell(shown
        by
        > the brown lines i drew).
        >
        > I can post code later if it makes a difference. But its a standard
        > table with left aligned column text, inside of a few lists.
      • J.Pietschmann
        ... Use an additional table row, or nest the table into a blind table. E.g.
        Message 3 of 5 , Jun 17, 2005
        • 0 Attachment
          arianhojat2000 wrote:
          > How can you give a table margins?

          Use an additional table row, or nest the table into a blind table.
          E.g.
          <fo:table...
          <fo:table-column column-width="12pt"/> <!-- left margin -->
          <fo:table-column column-width="4cm"/> <!-- first content row -->
          ...
          <fo:table-body>
          <fo:table-row>
          <fo:table-cell/> <!-- cell for column acting as margin -->
          <fo:table-cell border="...">
          ... real content...
          etc.

          J.Pietschmann
        • arianhojat2000
          Hey J.Pietschmann, Thanks again for spreading your knowledge about xsl-fo in this group... Setting a blind table seems like a workaround for Xsl-fo or Fop?
          Message 4 of 5 , Jun 19, 2005
          • 0 Attachment
            Hey J.Pietschmann,
            Thanks again for spreading your knowledge about xsl-fo in this group...

            Setting a 'blind table' seems like a workaround for Xsl-fo or Fop?
            it would be nice if you could just give tables margins or place them
            within a list and hope they are interpreted as is.
            Do any commercial formatters treat tables without a workaround or its
            not in the Xsl-fo Spec to respect these values?

            I think the problem in my case is that the table can be nested within 3
            many lists or blocks with margins so never sure of the exact value to
            set for the column...
            Is there anyway I can specify the dummy columns width, which sets the
            margin, based on how far the parent is (I was hoping maybe 'from-
            parent' would work although I have never used it)?

            In my xsl, maybe I can check to see what type of parent it has and
            maybe set the property based off of margin value(for block parents) or
            start-indent(for list parents) accordingly. Good idea?

            Thanks,
            Arian Hojat






            --- In XSL-FO@yahoogroups.com, "J.Pietschmann" <j3322ptm@y...> wrote:
            > arianhojat2000 wrote:
            > > How can you give a table margins?
            >
            > Use an additional table row, or nest the table into a blind table.
            > E.g.
            > <fo:table...
            > <fo:table-column column-width="12pt"/> <!-- left margin -->
            > <fo:table-column column-width="4cm"/> <!-- first content row -->
            > ...
            > <fo:table-body>
            > <fo:table-row>
            > <fo:table-cell/> <!-- cell for column acting as margin -->
            > <fo:table-cell border="...">
            > ... real content...
            > etc.
            >
            > J.Pietschmann
          • J.Pietschmann
            ... Frankly, I don t know. Table margins is one of the many points in the spec I d wish would be more clear. The spec doesn t even make it explicit that a
            Message 5 of 5 , Jun 20, 2005
            • 0 Attachment
              arianhojat2000 wrote:
              > Setting a 'blind table' seems like a workaround for Xsl-fo or Fop?

              Frankly, I don't know. Table margins is one of the many points
              in the spec I'd wish would be more clear. The spec doesn't even
              make it explicit that a table is a block object (i.e. ends a line
              in mixed content), although there are various hints in this direction
              buried here and there.
              Note that "margin" is actually defined as derived from indentation,
              border and padding, and that margin is an inherited property (which
              is the reason you get the margin in the table cells rather than the
              table itself.

              > Is there anyway I can specify the dummy columns width, which sets the
              > margin, based on how far the parent is (I was hoping maybe 'from-
              > parent' would work although I have never used it)?

              The from-parent function has an implementation in FOP and might just do
              what you need. Or not, because of the possible difference between
              specified and computed value.

              > In my xsl, maybe I can check to see what type of parent it has and
              > maybe set the property based off of margin value(for block parents) or
              > start-indent(for list parents) accordingly. Good idea?

              Probably not. There are no conditionals in XSLFO, and you can't get
              computed values from the XSLFO stage back into XSLT processing.

              J.Pietschmann
            Your message has been successfully submitted and would be delivered to recipients shortly.