List Info

Thread: AW: individual indentation for sect1 - sect3




AW: individual indentation for sect1 - sect3
user name
2006-12-20 13:13:53

Thanksm that worked.

I thought this would be more difficult J

 

Hinrich

 


Von: Bob Stayton [mailto:bobssagehill.net]
Gesendet: Mittwoch, 20. Dezember 2006 07:39
An: Hinrich Aue; docbook-appslists.oasis-open.org
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 --&gt;

<xsl:param name=&quot;body.start.indent&quot;>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&quot;>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&quot;>
&nbsp; <xsl:attribute name="start-indent&quot;>1.5in</xsl:attribute&gt;
</xsl:attribute-set>

 

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

<xsl:attribute-set name=";section.title.properties"&gt;
  <xsl:attribute name="start-indent&quot;>1.5in</xsl:attribute&gt;
</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"&gt;
  <xsl:attribute name="start-indent&quot;>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&quot;>
  <xsl:attribute name="start-indent&quot;>0.5in</xsl:attribute&gt;
</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&quot;>
  <xsl:attribute name="start-indent&quot;>1.0in</xsl:attribute&gt;
</xsl:attribute-set>

 

 

Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobssagehill.net">bobssagehill.net

 

 

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

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

 &nbsp; &nbsp; Sect1

 &nbsp; &nbsp; &nbsp; &nbsp;  Text text text

 &nbsp; &nbsp; &nbsp; &nbsp;  Text text text

 &nbsp; &nbsp; &nbsp; &nbsp;  Text text text

 &nbsp; &nbsp; &nbsp; &nbsp;  Text text text

 &nbsp; &nbsp; &nbsp;  Sect2

 &nbsp; &nbsp; &nbsp; &nbsp;   ;  Text text

 &nbsp; &nbsp; &nbsp; &nbsp;   ;  Text text

 &nbsp; &nbsp; &nbsp; &nbsp;   ;  Text text

 &nbsp; &nbsp; &nbsp; &nbsp;   ;  Text text

 &nbsp; &nbsp; &nbsp; &nbsp;   ;  Sect3

 &nbsp; &nbsp; &nbsp; &nbsp;   ;  Text text

 &nbsp; &nbsp; &nbsp; &nbsp;   ;  Text text

 &nbsp; &nbsp; &nbsp; &nbsp;   ;  Text text

 &nbsp; &nbsp; &nbsp; &nbsp;   ;  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

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )