docbook-apps

  • 1.  Centering Table Titles in Print

    Posted 11-08-2010 21:50
    I tried the solution on p. 494 of Bob Stayton's book ("DocBook XSL:
    The Complete Guide," 4th Ed.) in an attempt to center my tables'
    titles.

    However, I can't get it to work with fop--the title is still left aligned.

    Has anyone had success centering table titles with fop? Any other ideas?

    Thanks.

    Regards,

    -Tom

    Thomas M. Browder, Jr.
    Niceville, Florida
    USA



  • 2.  Re: [docbook-apps] Centering Table Titles in Print

    Posted 11-08-2010 23:57
    Tom,
    I have had this issue as well. Here is how I solved it.



    <xsl:attribute-set name="formal.title.properties">
    <xsl:attribute name="text-align">
    <xsl:choose>
    <xsl:when test="self::table">center</xsl:when>
    <xsl:otherwise>left</xsl:otherwise>
    </xsl:choose>
    </xsl:attribute>
    </xsl:attribute-set>


    Regards,
    Dean nelson



    In a message dated 11/08/10 13:51:46 Pacific Standard Time, tom.browder@gmail.com writes:
    I tried the solution on p. 494 of Bob Stayton's book ("DocBook XSL:
    The Complete Guide," 4th Ed.) in an attempt to center my tables'
    titles.

    However, I can't get it to work with fop--the title is still left aligned.

    Has anyone had success centering table titles with fop? Any other ideas?

    Thanks.

    Regards,

    -Tom

    Thomas M. Browder, Jr.
    Niceville, Florida
    USA

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
    For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org


  • 3.  Re: [docbook-apps] Centering Table Titles in Print

    Posted 11-09-2010 00:16
    On Mon, Nov 8, 2010 at 17:57, deannelson <deannelson@aol.com> wrote:
    > Tom,
    > I have had this issue as well. Here is how I solved it.
    >
    >
    >
    > <xsl:attribute-set name="formal.title.properties">
    > <xsl:attribute name="text-align">
    > <xsl:choose>
    > <xsl:when test="self::table">center</xsl:when>
    > <xsl:otherwise>left</xsl:otherwise>
    > </xsl:choose>
    > </xsl:attribute>
    > </xsl:attribute-set>

    But Dean, that's right out of the book as near as I can see. Unless
    I'm missing something, that doesn't work for me. What tools are you
    using? I'm using xsltproc and Apache fop.

    Regards,

    -Tom

    Thomas M. Browder, Jr.
    Niceville, Florida
    USA



  • 4.  Re: [docbook-apps] Centering Table Titles in Print

    Posted 11-09-2010 05:42
    Oh, right you are Tom! It didn't work for me as well - to top it off, I sent you the wrong section of my xsl.

    This section will do what you want - but you will need to use


    This section also does a bit more with alignment in other places as well.


    <xsl:attribute-set name="formal.title.properties"
    use-attribute-sets="normal.para.spacing">
    <xsl:attribute name="text-align">
    <xsl:choose>
    <xsl:when test="self::equation and descendant::imagedata/@align">
    <xsl:value-of select="descendant::imagedata/@align" />
    </xsl:when>
    <xsl:when test="self::equation[@align] and descendant::title">
    <xsl:value-of select="@align" />
    </xsl:when>

    <xsl:when test="self::figure[@align] and descendant::title">
    <xsl:value-of select="@align" />
    </xsl:when>

    <xsl:when test="self::table[@align] and descendant::title">
    <xsl:value-of select="@align" />
    </xsl:when>
    <xsl:otherwise>start</xsl:otherwise>
    </xsl:choose>
    </xsl:attribute>
    </xsl:attribute-set>

    Cheers
    Dean Nelson

    In a message dated 11/08/10 16:16:45 Pacific Standard Time, tom.browder@gmail.com writes:
    On Mon, Nov 8, 2010 at 17:57, deannelson <deannelson@aol.com> wrote:
    > Tom,
    > I have had this issue as well. Here is how I solved it.
    >
    >
    >
    > <xsl:attribute-set name="formal.title.properties">
    > <xsl:attribute name="text-align">
    > <xsl:choose>
    > <xsl:when test="self::table">center</xsl:when>
    > <xsl:otherwise>left</xsl:otherwise>
    > </xsl:choose>
    > </xsl:attribute>
    > </xsl:attribute-set>

    But Dean, that's right out of the book as near as I can see. Unless
    I'm missing something, that doesn't work for me. What tools are you
    using? I'm using xsltproc and Apache fop.

    Regards,

    -Tom

    Thomas M. Browder, Jr.
    Niceville, Florida
    USA

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
    For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org


  • 5.  Re: [docbook-apps] Centering Table Titles in Print

    Posted 11-09-2010 11:25
    On Mon, Nov 8, 2010 at 23:41, DeanNelson <deannelson@aol.com> wrote:
    > Oh, right you are Tom! It didn't work for me as well - to top it off, I sent
    > you the wrong section of my xsl.
    >
    > This section will do what you want - but you will need to use
    >
    ...

    Thanks, dean, I'll give that a shot.

    Cheers!

    -Tom



  • 6.  Re: [docbook-apps] Centering Table Titles in Print

    Posted 11-09-2010 11:42
    On Tue, Nov 9, 2010 at 05:24, Tom Browder <tom.browder@gmail.com> wrote:
    > On Mon, Nov 8, 2010 at 23:41, DeanNelson <deannelson@aol.com> wrote:
    >> Oh, right you are Tom! It didn't work for me as well - to top it off, I sent
    >> you the wrong section of my xsl.
    >>
    >> This section will do what you want - but you will need to use
    >>
    > ...

    It works great! Thanks, Dean, Bob needs to correct that section of his book.

    Regards,

    -Tom