| Search Locate Previous Next | Contents |
At this point, the content of the table is complete but it would benefit from the addition of a caption. You have considerable flexibility in associating text with the table, using any or all of the following properties:
You can set the font and colour of any of these elements, and the alignment (left, centre, right) of the headers and footnote.
For now, set a standard heading, centred above the table:
nlUse'' nltHeading'Table 1. First Quarter Sales ($000''s)' nltList salesQ1 View docnlClose
Observe what happens when the left and right indents are set to one inch:
nlInit ª nlUse'' nlIndent 72 × 1 1 0 nlAlign 'centre' nltHeading'Table 1. First Quarter Sales ($000''s)' nltList salesQ1 View docnlClose
Now, try setting each of the first two indents separately to one inch to see what happens to the width and the position of the table and caption.
Completing the Sales Report
By default, a table will occupy the entire frame width, but if you give the all the cell widths explicitly it may be less wide than the frame (in which case it will be aligned using the current paragraph alignment) or some columns may be dropped from the right-hand edge. So, to centre the complete sales report, together with its heading and a footnote:
nlInit ª nlUse''
ncol¯1½products,salesQ1 ª cw72×0.9,((ncol-2)½0.75),0.8
nlAlign'centre'
nltFont('TI,10'),((ncol-2)½'HE,10'),'HEB,10'
nltQfmt(''),((ncol-2)½'CF8.1'),'CF9.1'
nltAlign('left'),(ncol-1)½'decimal1'
nltCellWidths cw
nltGridlines 1,(0.5,(2-ncol)0.5),0
nltSpacing 1 1
nltTFont'TI,10'
nltTitles('' 'North'),(2districts),('South'),2districts
nltTDepth 0 0 1 1 0 1 1 1 0
nltTAlign('centre' 'right')[1+0 0 1 1 0 1 1 1 0]
nltHeading'Table 1. First Quarter Sales ($000''s)'
nltFootnote'Printed on 25/12/1999' 'by Adrian'
nltList ¯1[1]products,salesQ1
nltRule 0.5
nltSpacing 3 3
nltList ¯1[1]products,salesQ1
View docnlClose