[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] how to left-indent <programlisting>, <screen>??
On Fri, Sep 05, 2003 at 07:48:41AM -0400, Robert P. J. Day wrote: > > i wanted to automatically left indent some of the monospace > verbatim environments, and after checking some of the other > .xsl files in the fo/ stylesheets directory, as a first attempt, > i tried adding the customization: > > <xsl:attribute-set name="monospace.verbatim.properties"> > <xsl:attribute name="start-indent">0.25in</xsl:attribute> > </xsl:attribute-set> > > (NOTE that this is not the ideal approach in case i wanted > to have different amounts of indentation for the different > monospace verbatim environments, but i figured it was a > good first attempt.) > > while the above *did* in fact generate the proper left indent > for my sample <screen> and <programlisting>, it *totally* > screwed the contents of those elements. > > suddenly, their contents were justified (that is, both left > and right, massive amounts of inserted white space) while, > for the most part, the font reverted from monospace to regular > for both elements. > > this is not what i expected. is there any reason (or docs) > to explain why simply adding that "start-indent" attribute would > cause this kind of change in processing? (can anyone reproduce > this, just so i know i'm not hallucinating?) You have run into a bug in the current version of xsltproc. It is not merging attribute-sets. So your attribute-set addition became the entire attribute set, so the other monospace properties were lost and it reverted back to the inherited properties. Currently you have to copy the entire attribute-set definition from the docbook stylesheet file to your customization and make changes. > and, on a related topic, is there a better way to add that > kind of customization so that i can do it on a per-element > basis? would it make sense to wrap the element in a > fo:block with a "start-indent" attribute instead? Generally it is easier to merge property changes in an attribute-set if one is available to be customized. But it will work better when this bug in xsltproc is fixed. -- Bob Stayton 400 Encinal Street Publications Architect Santa Cruz, CA 95060 Technical Publications voice: (831) 427-7796 The SCO Group fax: (831) 429-1887 email: bobs@sco.com
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]