docbook-apps

  • 1.  put a table in abstract: suppress title

    Posted 02-07-2012 22:38
    Can anyone tell me how to suppress the title for a table just in the
    Abstract, using the xsl docbook stylesheets? For my work, it was
    suggested I put a table at the beginning of the document to outline the
    contents. (This idea did not come from me, and I don't think it a good
    one.) Hence, I put the table right after the abstract.

    I want to (1) suppress the title for this table, (2) start numbering the
    next table at 1, and (3) not include this table in the list of tables.

    1. ??

    2. <xsl:template match="d:table[@class = 'after-abstract']" mode="toc"
    />

    3. <xsl:template match="d:table" mode="label.markup">
    <xsl:choose>
    <xsl:when test="@label">
    <xsl:value-of select="@label"/>
    </xsl:when>
    <xsl:otherwise>
    <xsl:variable name="num">
    <xsl:number format="1" from="book|article" level="any"/>
    </xsl:variable>
    <xsl:value-of select="$num - 1"/>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:template>


    I found a way to implement (2), and a way to mostly implement (3), but I
    can't find the named template to suppress any title from the first table.

    Thanks

    Paul







  • 2.  Re: [docbook-apps] put a table in abstract: suppress title

    Posted 02-07-2012 23:18
    Won't <informaltable> do what you want?

    On 2/7/12 4:37 PM, Paul Tremblay wrote:
    > Can anyone tell me how to suppress the title for a table just in the
    > Abstract, using the xsl docbook stylesheets? For my work, it was
    > suggested I put a table at the beginning of the document to outline the
    > contents. (This idea did not come from me, and I don't think it a good
    > one.) Hence, I put the table right after the abstract.
    >
    > I want to (1) suppress the title for this table, (2) start numbering the
    > next table at 1, and (3) not include this table in the list of tables.
    >
    > 1. ??
    >
    > 2. <xsl:template match="d:table[@class = 'after-abstract']" mode="toc"
    > />
    >
    > 3. <xsl:template match="d:table" mode="label.markup">
    > <xsl:choose>
    > <xsl:when test="@label">
    > <xsl:value-of select="@label"/>
    > </xsl:when>
    > <xsl:otherwise>
    > <xsl:variable name="num">
    > <xsl:number format="1" from="book|article" level="any"/>
    > </xsl:variable>
    > <xsl:value-of select="$num - 1"/>
    > </xsl:otherwise>
    > </xsl:choose>
    > </xsl:template>
    >
    >
    > I found a way to implement (2), and a way to mostly implement (3), but I
    > can't find the named template to suppress any title from the first table.
    >
    > Thanks
    >
    > Paul
    >
    >
    >
    >
    >
    > ---------------------------------------------------------------------
    > 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] put a table in abstract: suppress title

    Posted 02-08-2012 16:52
    Doh! Yes it will. That saves me a lot of code. Thanks

    Paul

    On Tue, Feb 7, 2012 at 6:17 PM, Ron Catterall <ron@catterall.net> wrote:

    > Won't <informaltable> do what you want?
    >
    >
    > On 2/7/12 4:37 PM, Paul Tremblay wrote:
    >
    >> Can anyone tell me how to suppress the title for a table just in the
    >> Abstract, using the xsl docbook stylesheets? For my work, it was
    >> suggested I put a table at the beginning of the document to outline the
    >> contents. (This idea did not come from me, and I don't think it a good
    >> one.) Hence, I put the table right after the abstract.
    >>
    >> I want to (1) suppress the title for this table, (2) start numbering the
    >> next table at 1, and (3) not include this table in the list of tables.
    >>
    >> 1. ??
    >>
    >> 2. <xsl:template match="d:table[@class = 'after-abstract']" mode="toc"
    >> />
    >>
    >> 3. <xsl:template match="d:table" mode="label.markup">
    >> <xsl:choose>
    >> <xsl:when test="@label">
    >> <xsl:value-of select="@label"/>
    >> </xsl:when>
    >> <xsl:otherwise>
    >> <xsl:variable name="num">
    >> <xsl:number format="1" from="book|article" level="any"/>
    >> </xsl:variable>
    >> <xsl:value-of select="$num - 1"/>
    >> </xsl:otherwise>
    >> </xsl:choose>
    >> </xsl:template>
    >>
    >>
    >> I found a way to implement (2), and a way to mostly implement (3), but I
    >> can't find the named template to suppress any title from the first table.
    >>
    >> Thanks
    >>
    >> Paul
    >>
    >>
    >>
    >>
    >>
    >> ------------------------------**------------------------------**---------
    >> To unsubscribe, e-mail: docbook-apps-unsubscribe@**lists.oasis-open.org<docbook-apps-unsubscribe@lists.oasis-open.org>
    >> For additional commands, e-mail: docbook-apps-help@lists.oasis-**open.org<docbook-apps-help@lists.oasis-open.org>
    >>
    >>
    >>
    >>
    >



  • 4.  Re: put a table in abstract: suppress title

    Posted 02-08-2012 01:16
    On 2/7/12 5:37 PM, Paul Tremblay wrote:
    > Can anyone tell me how to suppress the title for a table just in the
    > Abstract, using the xsl docbook stylesheets? For my work, it was
    > suggested I put a table at the beginning of the document to outline
    > the contents. (This idea did not come from me, and I don't think it a
    > good one.) Hence, I put the table right after the abstract.
    >
    Figured out how to do it:


    <xsl:template match="d:table[@class = 'after-abstract']" mode="toc" />


    <xsl:template match="d:figure|d:table|d:example" mode="label.markup">
    <xsl:variable name="pchap"
    select="(ancestor::d:chapter
    |ancestor::d:appendix

    |ancestor::d:article[ancestor::d:book])[last()]"/>

    <xsl:variable name="prefix">
    <xsl:if test="count($pchap) > 0">
    <xsl:apply-templates select="$pchap" mode="label.markup"/>
    </xsl:if>
    </xsl:variable>

    <xsl:choose>
    <xsl:when test="@label">
    <xsl:value-of select="@label"/>
    </xsl:when>
    <xsl:otherwise>
    <xsl:choose>
    <xsl:when test="$prefix != ''">
    <xsl:apply-templates select="$pchap" mode="label.markup"/>
    <xsl:apply-templates select="$pchap" mode="intralabel.punctuation"/>
    <xsl:number format="1" from="d:chapter|d:appendix" level="any"/>
    </xsl:when>
    <xsl:otherwise>
    <xsl:variable name="num">
    <xsl:number format="1" from="d:book|d:article" level="any"/>
    </xsl:variable>
    <xsl:choose>
    <xsl:when test="self::d:table">
    <xsl:value-of select="$num - 1"/>
    </xsl:when>
    <xsl:otherwise>
    <xsl:value-of select="$num"/>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:template>



    <xsl:template match="d:table[@class='after-abstract']"
    mode="object.title.template"/>