I solved the problem with the following in my custom layer:

    <xsl:attribute-set name="standard.para.spacing">
        <xsl:attribute name="text-indent">24pt</xsl:attribute>
    </xsl:attribute-set>

    <xsl:template match="d:para">
        <fo:block xsl:use-attribute-sets="standard.para.spacing">
            <xsl:call-template name="anchor"/>
            <xsl:apply-templates/>
        </fo:block>
    </xsl:template>

Merely changing the attribute set normal.para.spacing is not suitable,
since other block level templates are affected by normal.para.spacing
as well.

On 4 nov 2008, at 17.42, Bob Stayton wrote:

Hi,
Actually, simply removing the space-before attributes in a customization layer will not have any effect, because attribute-sets at different import levels are merged, so you would still inherit the original attribute values. Instead, you need to set them to zero in your customization layer, so the whole attribute-set would be:

<xsl:attribute-set name="normal.para.spacing">
<xsl:attribute name="space-before.optimum">0pt</xsl:attribute>
<xsl:attribute name="space-before.minimum">0pt</xsl:attribute>
<xsl:attribute name="space-before.maximum">0pt</xsl:attribute>
<xsl:attribute name="text-indent">24pt</xsl:attribute>
</xsl:attribute-set>

If you aren't clear what a customization layer is, see this reference:

http://www.sagehill.net/docbookxsl/CustomMethods.html#CustomizationLayer

Bob Stayton
Sagehill Enterprises
[EMAIL PROTECTED]


----- Original Message ----- From: "Scott Hudson" <[EMAIL PROTECTED] >
To: "Tommy Nordgren" <[EMAIL PROTECTED]>
Cc: <docbook@lists.oasis-open.org>
Sent: Tuesday, November 04, 2008 8:04 AM
Subject: Re: [docbook] Indenting paragraph start


Have you tried this?
http://sourceware.org/ml/docbook-apps/2004-q1/msg00211.html

By re-defining normal.para.spacing attribute set in the customization layer.

It is, by default,

<xsl:attribute-set name="normal.para.spacing">
 <xsl:attribute name="space-before.optimum">1em</xsl:attribute>
 <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
 <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute>
</xsl:attribute-set>

You want to remove space-before and add

 <xsl:attribute name="text-indent">24pt</xsl:attribute>

text-indent is the XSL FO way to first-line-indent.

David Tolpin


Best regards,

--Scott

Tommy Nordgren wrote:
How can I customize the style sheets, to indent the first line of a
paragraph?

----------------------------------
Skinheads are so tired of immigration, that they are going to move to
a country that don't accept immigrants!
Tommy Nordgren
[EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




------------------------------------------------------
"Home is not where you are born, but where your heart finds peace" -
Tommy Nordgren, "The dying old crone"
[EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to