Hi,
Yes, it is possible. This customization of the attribute set named
'section.title.properties' might do it:
<xsl:attribute-set name="section.title.properties">
<xsl:attribute name="start-indent">
<xsl:choose>
<xsl:when test="self::bridgehead">
<xsl:value-of select="$body.start.indent"/>
</xsl:when>
<xsl:otherwise>0pt</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</xsl:attribute-set>
The stylesheets assume that a bridgehead should be formatted like a section
head. So the template with match="bridgehead" in fo/sections.xsl spends time
to figure out what level of heading the current bridgehead would be. Then it
calls the template named 'section.heading', which applies the attribute-sets
normally used for section titles.
So this customization sets the start-indent property to the value of
$body.start.indent if the current element is a bridgehead, otherwise to 0pt
(the default). Since it is in the 'section.title.properties' attribute-set, it
applies to all levels of bridgehead.
However, if you have customized the individual section level attribute sets
(such as 'section.level2.properties') for start-indent, then those will
override my example. In that case, do something similar in each of those
attribute-sets that set start-indent.
Bob Stayton
Sagehill Enterprises
[email protected]
----- Original Message -----
From: Sherwood Hu
To: [email protected]
Sent: Thursday, February 11, 2010 10:01 AM
Subject: [docbook-apps] Rendering <bridgehead> indented as normal paragraph
in FO
Is it possible to render a <bridgehead> element indented as normal paragraph?
For example, I have the docbook piece
<sect3>
<title>TOOLINFO structure</title>
<bridgehead>Syntax</bridgehead>
<programlisting language='c'><![CDATA[struct TOOLINFO
{
UINT cbSize;
UINT uFlags;
HWND hwnd;
UINT_PTR uId;
RECT rect;
HINSTANCE hinst;
LPTSTR lpszText;
LPARAM lParam;
};]]></programlisting>
<bridgehead>Members</bridgehead>
.
</sect3>
In the PDF rendered, it showed:
TOOL Structure -> sect3 font, no
indent
Syntax ->
bridgehead, indented
struct TOOLINFO
{
UINT cbSize;
UINT uFlags;
HWND hwnd;
UINT_PTR uId;
RECT rect;
HINSTANCE hinst;
LPTSTR lpszText;
LPARAM lParam;
};
I want the bridgehead blocks have the same indent as normal paragraphs. Is it
possible? Thanx.