The best place to customize entries in the printed table of contents is by
customizing the template named 'toc.line' in fo/autotoc.xsl. That template
is called once for each entry in the TOC to create the fo:block that formats
that line. You can add a color="#RRGGBB" property (substitute your
hexadecimal RGB values for your purple color) to the block.
You can do all kinds of customization of your printed TOC with this
template. The $node parameter in the template is the element whose TOC
entry is being created. So you can format each kind of entry (chapter,
section, etc.) differently by using a choose statement like this:
<xsl:choose>
<xsl:when test="$node/self::chapter">
<!-- format a chapter entry -->
</xsl:when>
etc.
Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net
----- Original Message -----
From: "David Shevitz" <dshevitz@singlestep.com>
Cc: <docbook-apps@lists.oasis-open.org>
Sent: Thursday, June 17, 2004 12:47 PM
Subject: Re: [docbook-apps] Another (hopefully) simple question: Table of
Contents
Yes, this would work. However, what about PDF files? Obviously, a CSS
file does not apply in that case.
Does anyone have any suggestions/further explanations on how to modify
the TOC fonts so the changes appear in a PDF file as well?
Thanks very much,
Dave
Rene Hache wrote:
Easiest to do that by creating and changing a CSS file. Let me know if
you
need further assistance.
Rene
-----Original Message-----
From: David Shevitz [mailto:dshevitz@singlestep.com]
Sent: Thursday, June 17, 2004 9:15 AM
To: docbook-apps@lists.oasis-open.org
Subject: [docbook-apps] Another (hopefully) simple question: Table of
Contents
Hello all,
I've been reading through the DocBook XSL: The Complete Guide, and I
think I have gotten myself confused. I want to do what I think is a
pretty simple task: I want to change the font color used when the Table
of Contents is generated (for example, I want the the color to be purple
instead of black). I'm having trouble identifying what change I need to
make to my customization layer to implement this.
Anyone willing to clarify things for a newbie?
Many thanks,
Dave
To unsubscribe from this list, send a post to
docbook-apps-unsubscribe@lists.oasis-open.org, or visit
http://www.oasis-open.org/mlmanage/.
To unsubscribe from this list, send a post to
docbook-apps-unsubscribe@lists.oasis-open.org, or visit
http://www.oasis-open.org/mlmanage/.
To unsubscribe from this list, send a post to
docbook-apps-unsubscribe@lists.oasis-open.org, or visit
http://www.oasis-open.org/mlmanage/.