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

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

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


Subject: How to control left margin with programlisting?


Dear members,

I would like to contol the left margin when I use programlisting tag:

<chapter>
  ...
  <sect1> 
    ....
    <programlisting linenumbering="numbered">
      private Item orderItem; // NOT: private Item order_item;
    </programlisting>
  </sect1>
</chapter>

so the output is sensible to the indentation I am using when writing document, so the leading blank before the contents of the programlisting are considered. If I do instead:

<chapter>
  ...
  <sect1> 
    ....
    <programlisting linenumbering="numbered"> 
private Item orderItem; // NOT: private Item order_item;
    </programlisting>
  </sect1>
</chapter>


so I don't indent the contains of the programlisting, then I get the right output, but it is ugly source xml file and the format strategy could modify its possition. Is there any way in order don't consider such leading blank without affecting the format of the document?. I have tried also using: CDATA but I get the same result.

I think I have to redefine the monospace.verbatim.properties:

<xsl:attribute-set name="monospace.verbatim.properties" use-attribute-sets="verbatim.properties
monospace.properties">
<xsl:attribute name="text-align">start</xsl:attribute>
<xsl:attribute name="font-size">75%</xsl:attribute>
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
<xsl:attribute name="hyphenation-character">&#x25BA;</xsl:attribute>
<xsl:attribute name="linefeed-treatment">preserve</xsl:attribute>
</xsl:attribute-set>

I guess the text-align property should solve this, but I doesn't, I get the same result. Do I have to put a more restrictive value, or just I have to modify a different property or just directly the programlisting definition?

Thanks in avance,

David


Don't get soaked. Take a quick peak at the forecast
with theYahoo! Search weather shortcut.

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