Hi,
A CALS table can be formatted the way you want.  Your CALS example included a 
rules="rows" attribute, but there is no such attribute on table or 
informaltable.  I think you wanted rowsep="1", and you only wanted it on the 
header row.  The outside borders on a CALS table is handled using the frame 
attribute.

Also, any time you include a proportional column specfication that has "*" 
means the table will take up the full-width of the available space.  If you 
leave out column width specifications, then the stylesheet will use 
table-layout="auto" (with XEP and Antenna House which support it) and the table 
width will try to fit the data.

Try this:

<informaltable frame="topbot">
       <tgroup cols='2' colsep="0" rowsep="0">
            <colspec colnum='1' colname='col1' align='right'/>
            <colspec colnum='2' colname='col2' align='left'/>
        <thead rowsep='1'>
          <row>
            <entry align='left'>type</entry>
            <entry>comments</entry>
          </row>
          </thead>
          <tbody>
          <row>
            <entry align='right'>0</entry>
            <entry>small group of binning settings</entry>
          </row>
          <row>
            <entry>1</entry>
            <entry>range of binning settings starting from 1</entry>
          </row>
        </tbody>
        </tgroup>
</informaltable>

Bob Stayton
Sagehill Enterprises
[EMAIL PROTECTED]


  ----- Original Message ----- 
  From: Lillian Sullam 
  To: [email protected] 
  Sent: Friday, September 26, 2008 1:49 PM
  Subject: [docbook-apps] Help! Tables


  Hello,

  I'm trying to format my tables (mainly for PDF output appearance, but a 
general look nonetheless).

  Here is what I would like:

  ______________________
  Column1   Column 2_____

             1   Some text here
             2   Some text here
           ...    ...
  ______________________


  The basic idea is that numbers would be right aligned and text would be left. 
The size of the table is determined by the longest row.

  I've tried making the tables with HTML and CALS, but my results are not 
satisfactory.  With HTML tables I get the size right, but no text alignment.  
With CALS tables I can control the border appearance, but not the row 
separation, and the text does not align correctly.

  Here is my code:

  WITH CALS
  <informaltable rules="rows"> 
         <tgroup cols='2'>
              <colspec colnum='1' colname='col1' colwidth='1*' align='right'/>
              <colspec colnum='2' colname='col2' colwidth='4*'/>
          <thead rowsep='1'>
            <row>
              <entry align='left'>type</entry>
              <entry>comments</entry>
            </row>
            </thead>
            <tbody>
            <row>
              <entry align='right'>0</entry>
              <entry>small group of binning settings</entry>
            </row>
            <row>
              <entry>1</entry>
              <entry>range of binning settings starting from 1</entry>
            </row>
          </tbody>
          </tgroup>
  </informaltable>

  WITH HTML
  <informaltable>
      <colgroup>
          <col align="right"/>
          <col/>
      </colgroup>
      <thead>
            <tr>
              <th align="left">type</th>
              <th>comments</th>         
            </tr>
       </thead>
        <tbody>
            <tr>
              <td>0</td>
              <td>small group of binning settings</td>          
            </tr>
            <tr>
              <td>1</td>
              <td>range of binning settings starting from 1</td>            
            </tr>
        </tbody>
   </informaltable>

  I use docbook-xsl-1.74.0, SAXON, XEP.  I've tried to do some tweeking with 
customizations, but I can't seem to get anything to work.  Thanks for any help!

  Lillian Sullam



Reply via email to