| Search Locate Previous Next | Contents |
As installed, NewLeaf uses 12-point Times as the default font for all printing. A font is specified by a three-part description: the typeface, the character height in points and the line-spacing in points. For example, TI,12 corresponds to 12-point Times with default line-spacing (120% of the character height); HEB,10/11 corresponds to 10-point Helvetica bold with 11-point line-spacing. See Customising NewLeaf for a detailed discussion of fonts. So, to produce the table in 10-point Helvetica with default (12-point) line-spacing, type:
nlInit ª nlUse'' nltFont 'HE,10' nltList salesQ1 View docnlClose
Note how many rows you can see in the Viewer. Now, squeeze them together by including an explicit value for the line-spacing in the font specification that is less than the calculated default and note how many rows you can see:
nlInit ª nlUse'' nltFont 'HE,10/11' nltList salesQ1 View docnlClose
In common with many other table-handling features of NewLeaf, the font can be set by column. For example, to emphasise the totals in the rightmost column, specify a bold version of the same font:
nlInit ª nlUse'' nltFont ((¯1+¯1½salesQ1)½'HE,10'),'HEB,10' nltList salesQ1 View docnlClose
Next, include product names in 10-point Times and combine this with the appropriate alignment and formatting in the sales report:
nlInit ª nlUse'' nltFont ('TI,10'),((¯1+¯1½salesQ1)½'HE,10'),'HEB,10' nltAlign ('left'),(¯1½salesQ1)½'decimal1' nltQfmt (''),((¯1+¯1½salesQ1)½'CF8.1'),'CF9.1' nltList products,salesQ1 View docnlClose