Next in thread →
Next in month →
Re: [docbook-apps] Customization of chapter titles and generated pdf bookmarks
It may be that you just need to replace
this:
axf:outline-title="$otitle"
with this:
axf:outline-title="{$otitle}"
When specifying attributes in literal result
elements such as fo:block, you can't just use a variable reference, it has to be
an attribute value template.
Bob Stayton
Sagehill Enterprises
----- Original Message -----
From:
Stock,
Jan
To:
Sent: Thursday, November 27, 2008 5:29
AM
Subject: [docbook-apps] Customization of
chapter titles and generated pdf bookmarks
Hello,
I am working on a customization
concerning chapter titles in print output because the standard DocBook titles
are not indented if they need a second line.
E.g.:
2.1.3
Title title title title title title
title title title title title title
title title
I found a posting in the mailing
list archive (http://sourceware.org/ml/docbook/2004-02/msg00076.html)
and worked with the explanations in the DocBook Guide (http://www.sagehill.net/docbookxsl/TitleFontSizes.html#ChapterTitles).
I modified the spec file, transformed it to the title page customization and I
added a template named “chapappendix.title” to the customization which main
idea is the same like the solution in the DocBook Guide. The only difference
is that I added a FO table structure. I tried several “table-width” settings
to find a solution that holds title and label together (means that the space
between title and label is always the same) and give me the advantage of using
tables to have indented second title lines. The best solution for our layout
(Perhaps it helps someone else.) is to set ‘width="auto"’ in the first table
cell (which contains the label) and ‘width="85%"’ in the second (containing
the title). Regarding the indent problem my solution works well, but we use
the Antenna House's XSL Formatter to transform FO files into PDFs and the
interactive bookmarks (on the left-hand side in Acrobat Reader) won’t be
generated anymore. Before I used the new template the FO files consisted
attributes with the antennahouse namespace “axf”.
E.g.:
xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"
keep-with-next.within-column="always" axf:outline-level="2"
axf:outline-expand="false" axf:outline-title="1 first
title"
Does anyone know what I have to
add to my template, that the interactive bookmarks will be generated? I tried
to use a variable and a fixed FO block inside my customization template but it
didn’t work:
<xsl:variable
name="otitle">
<xsl:apply-templates select="$node"
mode="title.markup"/>
</xsl:variable>
<fo:block
xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"
keep-with-next.within-column="always" axf:outline-level="2"
axf:outline-expand="false"
axf:outline-title="$otitle">
.
.
.
</fo:block>
Here the entire template I
added:
<xsl:template
name="chapappendix.title">
<fo:block>
<fo:block>
<fo:block keep-together.within-column="always"
font-family="sans-serif,Arial Unicode MS,Symbol,ZapfDingbats"
margin-left="0pt">
<fo:block space-before.minimum="1.8em" space-before.optimum="2.4em"
space-before.maximum="3.0em" space-after.minimum="0.6em"
space-after.optimum="0.8em" space-after.maximum="1.0em"
font-family="sans-serif" font-weight="bold"
keep-with-next.within-column="always" text-align="left"
start-indent="0pt">
<fo:block text-align="left">
<fo:table table-layout="auto"
width="100%">
<fo:table-body>
<fo:table-row>
<fo:table-cell width="auto" background-color="lightblue"
text-align="left">
<fo:block
text-align="left">
<xsl:apply-templates select="$node"
mode="label.markup"/>
   
</fo:block>
</fo:table-cell>
<fo:table-cell width="85%" background-color="lightgreen"
text-align="left">
<fo:block
text-align="left">
<xsl:apply-templates select="$node"
mode="title.markup"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:block>
</fo:block>
</fo:block>
</fo:block>
</fo:block>
</xsl:template>
I would be pleased to receive any
help concerning that problem.
Regards,
Jan
Becker-Göring-Straße
16
76307 Karlsbad, Germany
Phone: +49 (0)
7248/713478
Fax: +49 (0)
7248/713612
Email:
Web: www.harman.com
JAN
STOCK
Tool
Group
Harman/Becker Automotive
Systems GmbH
Confidentiality Notice:
This e-mail message, including any attachments, is for the sole use of the
intended recipient(s) and may contain confidential and privileged information.
Any unauthorized review, use, disclosure or distribution is prohibited. If you
are not the intended recipient, please contact the sender by return e-mail and
destroy all copies of the original message.
*******************************************
Harman Becker Automotive Systems GmbH
Management Board: Dr. Klaus Blickle (Chairman), Dr. Udo
Hüls, Michael Mauser
Chairman of the Supervisory Board: Ansgar Rempp | Domicile:
Karlsbad |
Local Court Mannheim: Register No. 361395
*******************************************
Diese E-Mail
enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen. Wenn Sie
nicht der richtige Adressat sind oder diese E-Mail irrtuemlich erhalten haben,
informieren Sie bitte sofort den Absender und loeschen Sie diese Mail. Das
unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht
gestattet.
This e-mail may contain confidential and/or privileged
information. If you are not the intended recipient (or have received this
e-mail in error) please notify the sender immediately and delete this e-mail.
Any unauthorized copying, disclosure or distribution of the contents in this
e-mail is strictly forbidden.
*******************************************
Next in thread →
Next in month →