OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [docbook-apps] Question about 3 column Index formatting


Hi Dick,
 
Been to that page all day today.  I have the following:
 
Defined at the top of my Stylesheet:

    <xsl:param name="generate.index" select="1"/>

    <xsl:param name="column.count.index" select="3"/>

Template to match the index's I have in my book.  This is intended to place the index's in a single table row that has a 2.5" height. 

<xsl:template match="article/section/index">

    <fo:table width="100%">

        <fo:table-column column-width="proportional-column-width(1)"/>

        <fo:table-body>

        <fo:table-row>

        <fo:table-cell height="2.5in">

            <xsl:apply-templates select="." mode="index.in.table"/>

        </fo:table-cell>

        </fo:table-row>

        <fo:table-row>

        <fo:table-cell>

            <xsl:apply-templates select="following-sibling::index[1]" mode="index.in.table"/>

        </fo:table-cell>

        </fo:table-row>

        <fo:table-row>

        <fo:table-cell>

            <xsl:apply-templates select="following-sibling::index[2]" mode="index.in.table"/>

        </fo:table-cell>

        </fo:table-row>

        <fo:table-row>

        <fo:table-cell>

            <xsl:apply-templates select="following-sibling::index[3]" mode="index.in.table"/>

        </fo:table-cell>

        </fo:table-row>

        </fo:table-body>

        </fo:table>

        </xsl:template>

<xsl:template match="article/section/index[(position() mod 3) != 1]"/>

<xsl:template match="article/section/index" mode="index.in.table">

    <xsl:variable name="id">

        <xsl:call-template name="object.id"/>

    </xsl:variable>

    <xsl:variable name="lang" select="@lang"/>

    <xsl:if test="count(indexentry) = 0 and count(indexdiv) = 0">

    <fo:block id="{$id}">

        <xsl:call-template name="index.titlepage"/>

    </fo:block>

    <xsl:apply-templates/>

    <xsl:choose>

    <xsl:when test="/book/article[@lang = $lang]">

    <xsl:call-template name="generate-index">

        <xsl:with-param name="scope" select="/book/article[@lang = $lang]"/>

    </xsl:call-template>

    </xsl:when>

    <xsl:otherwise>

    <xsl:call-template name="generate-index">

    <xsl:with-param name="scope" select="."/>

    </xsl:call-template>

    </xsl:otherwise>

    </xsl:choose>

    </xsl:if>

 </xsl:template>

 

The goal is to make a 3 column index that spans the width of the page and is only 2.5" high (or somehwere in that general area). 

Any ideas?  The primary problem I am having is that I do not know how I would flow the index within a table, to get it to have 3 columns.

and my <xsl:param name="column.count.index" select="3"/> is ignored completely.

Thanks,

David White



From: Dick Hamilton [mailto:rlhamilton@frii.com]
Sent: Wednesday, March 08, 2006 3:27 PM
To: 'David White'; docbook-apps@lists.oasis-open.org
Subject: RE: [docbook-apps] Question about 3 column Index formatting

David,
 
There's an explanation of how to change the index column count in Bob Stayton's
DocBook XSL book.  Here's a link to that section:
 
http://www.sagehill.net/docbookxsl/FormatPrintIndex.html
 
There are other sections in this document that can help with setting the
page size, etc.
 
Although the book is online, I'd suggest buying the print version, it's
essential if you're going to do very much with the style sheets.
 
Dick Hamilton
 
-----Original Message-----
From: David White [mailto:davidw@kencook.com]
Sent: Wednesday, March 08, 2006 1:39 PM
To: docbook-apps@lists.oasis-open.org
Subject: [docbook-apps] Question about 3 column Index formatting

Hello everyone,

I'm looking for information on how to generate a 3 column index.   I'd like to achieve a 2.5" tall index thats 3 columns across a page.  Any suggestions on how to go about this? I've only been able to produce a single column Index so far.

 

Thanks,

David White



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]