[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Wrapping & Indenting Section Titles
If you want the "L" in "Line" to align with the "W" in "Wrapping", you might consider using a fo:list-block instead. You put the label in the list-item-label part, and the title in the list-item-body part. You still have to set a reasonable indent for the body part, but it just has to accomodate the longest label you have. Bob Stayton Sagehill Enterprises DocBook Consulting bobs@sagehill.net ----- Original Message ----- From: "Carl Castro" <ccastro@modeln.com> To: <docbook-apps@lists.oasis-open.org> Sent: Monday, January 17, 2005 2:32 PM 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]