[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: 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]