[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook] <programlisting> customization
The problem is in your XML. The programlisting is not centered, it is manually indented. In the programlisting element, all white space is preserved, including all the spaces you used to indent your programlisting to match your other elemen indents. Change this: <programlisting> <emphasis>private void getMe()</emphasis> </programlisting> To this: <programlisting> <emphasis>private void getMe()</emphasis> </programlisting> Even this has an extra line feed at the begining, just after the start tag. So it should be: <programlisting><emphasis>private void getMe()</emphasis> [continue the listing here] </programlisting> Bob Stayton Sagehill Enterprises DocBook Consulting bobs@sagehill.net ----- Original Message ----- From: "Hiral Parikh" <hparikh@amesondemand.com> To: <docbook@lists.oasis-open.org> Sent: Tuesday, March 22, 2005 7:14 AM Subject: [docbook] <programlisting> customization > Hi all, > I have a <table> that has <programlisting> in one of the columns. > Instead of both the columns being left aligned, the <programlisting> column > is 'centered' at page level because of which it overlaps the text in > column2. > I guess this is the default alignment of <programlisting>. > > Can we do a customization such that when <programlisting> is enclosed in > <table> then use left alignment and also use different font size? > > Following is a sample code: > <table id="someid" label="1.1"> > <title>Sample table</title> > <tgroup cols="2"> > <colspec colnum="1" colname="col1"/> > <colspec colnum="2" colname="col2"/> > <thead> > <row> > <entry> > <para>Method</para> > </entry> > <entry> > <para>Description</para> > </entry> > </row> > </thead> > <tbody> > <row> > <entry> > <programlisting> > <emphasis>private void getMe()</emphasis> > </programlisting> > </entry> > <entry> > <para>gets me</para> > </entry> > </row> > </tbody> > </tgroup> > </table> > > > Thanks for your help in advance! > > Hiral > > > >
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]