← Prev in month ← Prev in thread
Next in thread → Next in month →

AW: [docbook-apps] individual indentation for sect1 - sect3

From
Hinrich Aue <>
Date
2006-12-20T13:13:56+00:00
ID
007e01c72438$b381b860$
Thread
AW: [docbook-apps] individual indentation for sect1 - sect3
Thanksm that worked.

I thought this would be more
difficult J

 

Hinrich

 

Von: Bob Stayton
[mailto:] 

Gesendet: Mittwoch, 20. Dezember
2006 07:39

An: Hinrich Aue; 

Betreff: Re: [docbook-apps]
individual indentation for sect1 - sect3

 

I can give you two basic guidelines for indents in XSL-FO:

 

a.  start-indent on an fo:block is an absolute value
measured from the region boundary, regardless of the indents of the fo:blocks
it might be nested inside.

 

b.  margin-left is a relative indent, that is, relative
to the left edge (indent) of the fo:block that contains it.

 

You can accomplish what you want by setting start-indent
values with the attribute-sets that the stylesheets provide. For example, put
these in your customization layer:

 

<!-- $body.start.indent sets the start-indent property on
a page-sequence's fo:flow. So this applies to all content not in section blocks
-->

<xsl:param
name="body.start.indent">0.5in</xsl:param>

 

<!-- This attribute set is applied to chapter titles and
such to bring them back out to zero -->

<xsl:attribute-set
name="component.title.properties">

  <xsl:attribute
name="start-indent">0in</xsl:attribute>

</xsl:attribute-set>

 

<!-- The section.properties attribute-set is copied to
all the section.levelN.properties attribute-sets. So it supplies the default
for section levels that don't specify their own start-indent. -->

<xsl:attribute-set
name="section.properties">

  <xsl:attribute
name="start-indent">1.5in</xsl:attribute>

</xsl:attribute-set>

 

<!-- The same with section.title.properties, except only
applies to section title blocks -->

<xsl:attribute-set
name="section.title.properties">

  <xsl:attribute
name="start-indent">1.5in</xsl:attribute>

</xsl:attribute-set>

 

<!-- This attribute-set overrides the default for
sections at level 1, so all the content in level 1 sections is indented 1in
-->

<xsl:attribute-set
name="section.level1.properties">

  <xsl:attribute
name="start-indent">1in</xsl:attribute>

</xsl:attribute-set>

 

<!-- Except for the section level1 titles, because this
one overrides the previous one -->

<xsl:attribute-set
name="section.title.level1.properties">

  <xsl:attribute
name="start-indent">0.5in</xsl:attribute>

</xsl:attribute-set>

 

<!-- Finally just set the level 2 section titles to be a
bit less than the default section indent. The rest of the section levels and
titles don't specify start-indent, so they get the default from
section.properties -->

<xsl:attribute-set
name="section.title.level2.properties">

  <xsl:attribute
name="start-indent">1.0in</xsl:attribute>

</xsl:attribute-set>

 

 

Bob Stayton

Sagehill Enterprises

DocBook Consulting



 

 

----- Original Message ----- 

From: Hinrich
Aue 

To: 

Sent: Monday, December
18, 2006 8:17 AM

Subject: [docbook-apps]
individual indentation for sect1 - sect3

 

Hello everybody,

 

I’m trying to change the indentation for sect1
to sect3 individually.

 

The indentation should become smaller. In section 3
the body should not be indented.

 

Like this:

 

Chapter

     Sect1

         
Text text text

         
Text text text

         
Text text text

         
Text text text

        Sect2

            
Text text

            
Text text

            
Text text

            
Text text

           
 Sect3

            
Text text

            
Text text

            
Text text

            
Text text

 

Is this actually possible?

 

I do not understand the indenting completely.

I guess you need indentation for the title and for
the body. is the indentation relative to the level?

Is there a detailed description somewhere?

 

Thanks,

 

Hinrich
← Prev in month ← Prev in thread
Next in thread → Next in month →