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

Re: [XSL-FO] Centering a table in XSLFO

Expand Messages
  • Jirka Kosek
    ... It is also possible to place fo:table inside fo:inline-container which is in fo:block that is centered. Unfortunately fo:inline-container is also not
    Message 1 of 9 , Feb 14, 2007
      W. Eliot Kimber wrote:

      > Otherwise, your only choice is to set a start indent that 1/2 the
      > difference between the width of the current containing reference area
      > and the width of the table.

      It is also possible to place fo:table inside fo:inline-container which
      is in fo:block that is centered. Unfortunately fo:inline-container is
      also not supported by XEP.

      Jirka

      --
      ------------------------------------------------------------------
      Jirka Kosek e-mail: jirka@... http://xmlguru.cz
      ------------------------------------------------------------------
      Professional XML consulting and training services
      DocBook customization, custom XSLT/XSL-FO document processing
      ------------------------------------------------------------------
      OASIS DocBook TC member, W3C Invited Expert, ISO/JTC1/SC34 member
      ------------------------------------------------------------------
      Want to speak at XML Prague 2007 => http://xmlprague.cz/cfp.html



      [Non-text portions of this message have been removed]
    • mina_hurray
      fo:table-and-caption does not work with XEP. The table is not centered. ... start-indent.
      Message 2 of 9 , Feb 14, 2007
        fo:table-and-caption does not work with XEP. The table is not centered.


        --- In XSL-FO@yahoogroups.com, "W. Eliot Kimber" <ekimber@...> wrote:
        >
        > mina_hurray wrote:
        > >
        > >
        > > Hi:
        > >
        > > I was trying to center a table in XSLFO, and when I looked up on the
        > > lists, there were two answers
        > >
        > > 1) use <fo:table-and-caption text-align="center">
        > > 2) Centering a tbale is not possible in XSLFO. Instead use
        start-indent.
        >
        > Table and caption works using XSL Formatter 4. I didn't try it with the
        > latest RenderX.
        >
        > Otherwise, your only choice is to set a start indent that 1/2 the
        > difference between the width of the current containing reference area
        > and the width of the table.
        >
        > Cheers,
        >
        > E.
        >
        > --
        > W. Eliot Kimber
        > Professional Services
        > Innodata Isogen
        > 8500 N. Mopac, Suite 402
        > Austin, TX 78759
        > (214) 954-5198
        >
        > ekimber@...
        > www.innodata-isogen.com
        >
      • J.Pietschmann
        ... Try using padding columns, or a blind table with padding columns: http://xmlgraphics.apache.org/fop/fo.html#fo-center-table-horizon J.Pietschmann
        Message 3 of 9 , Feb 14, 2007
          mina_hurray wrote:
          > I was trying to center a table in XSLFO, and when I looked up on the
          > lists, there were two answers
          >
          > 1) use <fo:table-and-caption text-align="center">
          > 2) Centering a tbale is not possible in XSLFO. Instead use start-indent.
          >
          > I tried <fo:table-and-caption> and it does not center it,instead the
          > start-indent indents it. But what I would really like to do is center
          > the table. Is it that only XEP dpes not support this option? Please
          > let me know any suggestions.

          Try using padding columns, or a blind table with padding columns:
          http://xmlgraphics.apache.org/fop/fo.html#fo-center-table-horizon

          J.Pietschmann
        • mina_hurray
          Thanks for all your help on this. Instead of centering, if I want to make it page wide using the pgwide attribute from the cals table, when I say if
          Message 4 of 9 , Feb 16, 2007
            Thanks for all your help on this. Instead of centering, if I want to
            make it page wide using the "pgwide" attribute from the cals table,
            when I say if "pgwide="1" then make the width=100%, it does not work.
            Any suggestions are appreciated.


            --- In XSL-FO@yahoogroups.com, "J.Pietschmann" <j3322ptm@...> wrote:
            >
            > mina_hurray wrote:
            > > I was trying to center a table in XSLFO, and when I looked up on the
            > > lists, there were two answers
            > >
            > > 1) use <fo:table-and-caption text-align="center">
            > > 2) Centering a tbale is not possible in XSLFO. Instead use
            start-indent.
            > >
            > > I tried <fo:table-and-caption> and it does not center it,instead the
            > > start-indent indents it. But what I would really like to do is center
            > > the table. Is it that only XEP dpes not support this option? Please
            > > let me know any suggestions.
            >
            > Try using padding columns, or a blind table with padding columns:
            > http://xmlgraphics.apache.org/fop/fo.html#fo-center-table-horizon
            >
            > J.Pietschmann
            >
          • W. Eliot Kimber
            ... 100% means the width of the current containing reference area , which would usually mean the body page region. If you want the table to be literally the
            Message 5 of 9 , Feb 17, 2007
              mina_hurray wrote:
              >
              >
              > Thanks for all your help on this. Instead of centering, if I want to
              > make it page wide using the "pgwide" attribute from the cals table,
              > when I say if "pgwide="1" then make the width=100%, it does not work.
              > Any suggestions are appreciated.

              100% means "the width of the current containing reference area", which
              would usually mean the body page region.

              If you want the table to be literally the width of the page, then you
              would need to first create an absolutely-positioned block-container that
              is the width of the page and then put the table in that.

              If you're trying to implement processing of CALS or OASIS Interchange
              Model tables, the easiest thing to do is to crib the table processing
              code from the DocBook XSLTs.

              Cheers,

              E.

              --
              W. Eliot Kimber
              Professional Services
              Innodata Isogen
              8500 N. Mopac, Suite 402
              Austin, TX 78759
              (214) 954-5198

              ekimber@...
              www.innodata-isogen.com
            • mina_hurray
              For a pgwide attribute=1 , I tried span=all and width=100%. It does not work for both cases. I want the table to span the region-body when the pgwide attribute
              Message 6 of 9 , Feb 22, 2007
                For a pgwide attribute=1 , I tried span=all and width=100%. It does
                not work for both cases. I want the table to span the region-body when
                the pgwide attribute is set to 1. How can I dothis?



                --- In XSL-FO@yahoogroups.com, "W. Eliot Kimber" <ekimber@...> wrote:
                >
                > mina_hurray wrote:
                > >
                > >
                > > Thanks for all your help on this. Instead of centering, if I want to
                > > make it page wide using the "pgwide" attribute from the cals table,
                > > when I say if "pgwide="1" then make the width=100%, it does not work.
                > > Any suggestions are appreciated.
                >
                > 100% means "the width of the current containing reference area", which
                > would usually mean the body page region.
                >
                > If you want the table to be literally the width of the page, then you
                > would need to first create an absolutely-positioned block-container
                that
                > is the width of the page and then put the table in that.
                >
                > If you're trying to implement processing of CALS or OASIS Interchange
                > Model tables, the easiest thing to do is to crib the table processing
                > code from the DocBook XSLTs.
                >
                > Cheers,
                >
                > E.
                >
                > --
                > W. Eliot Kimber
                > Professional Services
                > Innodata Isogen
                > 8500 N. Mopac, Suite 402
                > Austin, TX 78759
                > (214) 954-5198
                >
                > ekimber@...
                > www.innodata-isogen.com
                >
              • W. Eliot Kimber
                ... Would have to see the FO data to know what should or shouldn t work as well as which XSL-FO engine you re using. There could be many reasons why it s not
                Message 7 of 9 , Feb 26, 2007
                  mina_hurray wrote:
                  >
                  >
                  > For a pgwide attribute=1 , I tried span=all and width=100%. It does
                  > not work for both cases. I want the table to span the region-body when
                  > the pgwide attribute is set to 1. How can I dothis?

                  Would have to see the FO data to know what should or shouldn't work as
                  well as which XSL-FO engine you're using. There could be many reasons
                  why it's not doing what you want, including things like inherited start
                  indent.

                  Cheers,

                  Eliot

                  --
                  W. Eliot Kimber
                  Professional Services
                  Innodata Isogen
                  8500 N. Mopac, Suite 402
                  Austin, TX 78759
                  (214) 954-5198

                  ekimber@...
                  www.innodata-isogen.com
                Your message has been successfully submitted and would be delivered to recipients shortly.