LEARN@IGP IGP:Writer

Infogrid Pacific-The Science of Information

26

Structuring and Styling Tables

How to

Tables editing is always problematic whether for online, formats and print presentation. With the exception of the most rudimentary table in the simplest presentation, some form of default table styling is generally unacceptable. At a minimum it is necessary to define column widths and alignment.  More advanced informational tables may require colour schemes for columns, rows and individual cells. 

IGP:Digital Publisher has two tools that are designed to help reduce "table pain"; the Table Structure Editor for getting text into a table, and the Table Style Editor for getting the presentation the way you want it. These are two different processes and in table intensive work (such as financial documents), enables a multi-pass and team based approach to table structure and layout, or any one person can easily do it all.

Table Structure Editing

The table structure editor allows you to quickly convert paragraphs or lists to X-Y table structures.

The Structure Table Editor is a "single shot" tool. That means it will turn text into a table once, but after the table is corrected it cannot be used again. You must use the standard table editing tools for any other changes. 

It is accessed from the Document Toolbar - Table Editor button. Click to launch the table Editor.

alt

25-1 The Table Structure Editor after launch and before converting to table

Assuming you have the right number of lines of text: rows x cols = text lines = table cells; the editor will quickly and easily convert your text into a correctly dimensioned table.

Enter the number of rows and columns and insert a table ID. This is VERY IMPORTANT if you are going to use the Table Style Editor because the table stylesheet uses the table ID's to allow each table to be styled independently.

Click Convert to Table and you will instantly see the new table structured as rows and cells.

Check you layout and if you are happy click Insert Table.

Before you insert the table you can edit the text in the Left-hand pane, and click Convert to Table any number of times. 

The Table Structure Editor will close and where your selected text was, will be converted to a table. 

Converting text to tables is never particularly enjoyable. Either you type into the cells of a prepared table, or you cut and past the content in. If the table has sparse content (that means empty cells, or row and column spans) the problem is compounded. IGP:Digital Publisher has a simple and relatively painless method to create very large tables from lists or paragraphs.

Step 1. Compute your required table model in terms of columns and rows. Multiply the two and you have the number of cells or paragraphs that must exist. In our example (which is admittedly simple) we have 12 cells in three columns and four rows, but there are three empty cells.

Col1 Header

Col2 Header

Col3 Header

Row 1 Col 1

 

Row 1 Col 2

Row 2 Col 1

Row 2 Col 3 

 

Row 3 Col 2

Row 3 Col 3

Step 2. To ensure you have the right number of paragraphs, convert the content to an ordered list and insert the missing lines to come up to the number of cells. Insert empty list items containing at least one space where the empty cells occur in the column/row map.

$content$

         
         

Table 25-1 Your Caption

  1. Col1 Header
  2. Col2 Header
  3. Col3 Header
  4. Row 1 Col 1
  5. Row 1 Col 2
  6.  
  7. Row 2 Col 1
  8.  
  9. Row 2 Col 3
  10.  
  11. Row 3 Col 2
  12. Row 3 Col 3

Step 3. You can now select the table content and wrap it in a table block. You could have done the previous steps in a table block also. The last step is to convert the list to a real table.

 
Col1 Header Col2 Header Col3 Header Row 1 Col 1
Row 1 Col 2   Row 2 Col 1  
Row 2 Col 3   Row 3 Col 2 Row 3 Col 3
       

Table 25-2 Your Caption

Step 4. Create the table. Select all items on the list and click the Launch table editor button on the Document Toolbar. Then content will be opened in the Table Structure editor. Set the number of rows and columns, give an ID and click Insert. The table is complete.

Col1 Header Col2 Header Col3 Header Row 1 Col 1
Row 1 Col 2   Row 2 Col 1  
Row 2 Col 3   Row 3 Col 2 Row 3 Col 3

Table 25-3 Your Caption