OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [docbook-apps] Wrapping & Indenting Section Titles


An answer to my own question!

The attribute settings I had made in section.title.properties in a
customization-layer version of param.xsl actually apply to an "outer",
generic fo:block, and "inner" blocks are used for specific levels of
section.  When a generic un-leveled section tag is used, it is treated as
level 1, by the level parameter to the section.heading template in
sections.xsl getting defaulted to "1".  So making the same attribute
settings instead to section.title.level1.properties in the
customization-layer version of param.xsl works.  

Thanks anyway!

I am still working on parsing for conditional indentation, and will post
this later.

Carl

-----Original Message-----
From: Carl Castro [mailto:ccastro@modeln.com] 
Sent: Monday, January 17, 2005 2:32 PM
To: 'docbook-apps@lists.oasis-open.org'
Subject: [docbook-apps] Wrapping & Indenting Section Titles

I'm trying to improve the styling of technical documentation that we
currently generate as PDFs using standard DocBook XSL:FO.  

One or our issues involves titles longer than one line.  These include both
chapter and section titles.  We need to wrap, but also to indent title lines
after the first line to offset those lines from the "Chapter" or "Ch."
prefix and numbering, e.g.:

Ch.  5: Wrapping Titles That Are Longer Than One
        Line

For chapter titles, I've successfully applied a recommendation from Ch. 18
("XSL Formatting Objects") of The XML Bible on using a "hanging indent" to a
custom overriding of the component.title template in the fo subdirectory.
For this, the start-indent property is set to indent the title lines, and
the text-indent property is set to a negative value to offset this
indentation for the first line only. The following code worked:

<fo:block keep-with-next.within-column="always"
            space-before.optimum="{$body.font.master}pt"
            space-before.minimum="{$body.font.master * 0.8}pt"
            space-before.maximum="{$body.font.master * 1.2}pt"
            hyphenate="true"
            wrap-option="wrap"
            text-align="left"
            text-indent="-80pt" 
            start-indent="32pt">

There is a problem with this in that the indentation required varies with
the length of the title number.  Checking this would seem to require some
parsing of the title in the template.

For section titles, applying the same attributes & values to the
section.title.properties attribute-set in param.xsl doesn't seem to work;
titles are wrapped and indented, but the negative value for text-indent
doesn't seem to work - all lines are equally indented.  This seems to be due
to other attribute settings for sections, but I haven't been able to "turn
off" the right setting in section.title.properties to make text-indent work.
Any suggestions?

Thanks!
Carl



Carl R. Castro | Technical Publications Manager | Model N, Inc. | Direct:
650.808.8150 | Mobile: 415.722.6459 | Fax: 650.808.8399 | ccastro@modeln.com
| www.modeln.com  taking the risk out of revenue  -- Model N Revenue
Management



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]