forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ross Gardler" <>
Subject Re: Stop PDF Summary...
Date Mon, 18 Jun 2007 08:09:45 GMT
On 17/06/07, Patrick Ohly <> wrote:
> On Fr, 2007-02-09 at 20:44 +0000, Ross Gardler wrote:
> > wrote:
> > > How do I turn off the summary that's being created above my table of
> > > contents in each of the page-level PDFs?  It appears to be generated
> > > by the PDF Outline XSLT in common skins (src\documentation\skins
> > > \common\xslt\fo\pdfoutline.xsl), but I'm not positive.
> >
> > You are correct in that pdfoutline.xsl generates the outline. This is
> > called from the root document-2-fo.xsl.
> >
> > Currently there is no configuration option for removing this outline.
> > Adding one in is an easy job, just look at the way skinconf.xml values
> > are used elsewhere in document-2-fo.xsl. Of course, you could create
> > your own skin and provide your own XSL that does not call the outline.
> > But providing a patch to make it configurable would be well recieved here.
> I also wanted to turn off the TOC, so I patched the 0.8
> main/webapp/skins/common/xslt/fo/document-to-fo.xsl - see attachement. I
> don't know where "forrest seed" takes the skinconf.xml from, so I didn't
> patch anything related to that. Here's what I added to my project's
> skinconf.xml:
>     ...
>     <!--
>       Disable the generation of the table of content on the first page
>       of the PDF. By default the TOC is generated.
>     -->
>     <disable-toc>true</disable-toc>
>   </pdf>
> There's one problem with the patch: if <disable-toc> is not set in
> skinconf.xml, then the TOC is disabled nevertheless. I'm not sure why;
> what is the xsl:variable "disable-toc" set to in that case?
> If <disable-toc> is present, then it works as expected: only "true"
> disables the TOC, any other string generates the TOC.

Thank you very much for your contribution, this is how Forrest will
grow and survive, but it also means your upgrade path in the future
will be greatly simplified.

Can you please submit patches via our issue tracker [1]. You need to
be loggged in to create an issue (see top right of screen). Things
tend to get lost in the mailing list whereas in the issue tracker we
get nags to remind us to apply patches.

With respect to your question, if disable-toc is not present in the
skinconf.xml file is it not set and so your test against it will
always resolve to true:

<xsl:if test="$disable-toc != 'true' and $toc-max-depth > 0">

The way around this is to add the disable-toc parameter to the default skinconf.



View raw message