forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric BURGHARD <eburg...@free.fr>
Subject Re: table of contents in pdf
Date Thu, 18 Sep 2003 14:19:35 GMT
Le Jeudi 18 Septembre 2003 14:07, Juan Jose Pablos a écrit :
> Victor,
>
> I went back to the page, check the examples and I could not find
> <fox:bookmarks>. But I am pretty sure that I was that tag before
>
> I am sorry about giving misleading information.
>

no it's my fault because the solution was not here and the implementation is 
in fact pretty mmmm... basic: just add an fo:basic-link tag like this

    <xsl:template match="section" mode="toc">
        <fo:block space-before="5pt" text-align-last="justify">
            <fo:inline>
                <fo:basic-link internal-destination="{generate-id( )}">
                    <xsl:number count="section" format="1.1.1.1.1.1.1" 
level="multiple"/>
                    <xsl:text>. </xsl:text>
                    <xsl:value-of select="title"/>
                    <fo:leader leader-pattern="dots"/>
                    <fo:page-number-citation ref-id="{generate-id(  )}"/>
                </fo:basic-link>
            </fo:inline>
            <xsl:apply-templates mode="toc2" select="section"/>
        </fo:block>
    </xsl:template>
    <!-- -->
    <xsl:template match="section" mode="toc2">
        <fo:block start-indent=".5em" text-align-last="justify" 
text-indent=".5em">
            <fo:inline padding-start="1em">
                <fo:basic-link internal-destination="{generate-id( )}">
                    <xsl:number count="section" format="1.1.1.1.1.1.1" 
level="multiple"/>
                    <xsl:text>. </xsl:text>
                    <xsl:value-of select="title"/>
                    <fo:leader leader-pattern="dots"/>
                    <fo:page-number-citation ref-id="{generate-id(  )}"/>
                </fo:basic-link>
            </fo:inline>
        </fo:block>
    </xsl:template>

I don't really know how to contribute to forrest efficiently via patchs 
submissions. I think it's simple with eclipse and cvs, but give the time to 
find how (anyway any infos would be appreciated ;-)

A+


Mime
View raw message