Previous Next Contents

Updates to Release 1.6e (July 2000)

nlEmphasis – allows bold and italic as simple alternatives to setting the font.

nltEmphasis – as above and also allows for numeric matrix argument to set entire table.

nltSpread – sets emphasis by cell from the above

nltList – also sets emphasis, but by entire column only

nltSpread/List – optional left argument can set any of emphasis,colour etc. For Spread only you can also set cell borders by cell. The left argument is a vector of property-value pairs, for example ...

 ('emph' emp)('col' clr)('shade' (3 5½1 2 3)) nltList mat

... where the values must be numeric arrays. The properties you may include are: Emphasis, Borders, Colour, BCol, Align, Clip, VGrid, HGrid, Indents

For Spread the array will normally match the shape of the data matrix. For List it will normally be a vector matching the number of columns. In both cases, hgrid and vgrid would match the number of rows and number of columns respectively.

Typically this could be use to make all -ve numbers bright red, for example

clr„9×mat<0 © see nl‘colours for the numbers

Colours 0..15 are indices into the colour table. Higher numbers are RGB composite values, e.g. 1234567 is a rather nice pastel green. For emphasis, use 1=bold, 2=italic, 4=underline, 8=strikethrough, summed as required. Cell borders are numbers in the range 0-9999 representing line-weights 1-9 for edges lrbt so 20 is a 2-pixel line below the cell.

Alignment can be 0,1,2 or 3.x for decimal (x is the number after the point). Clip can be 0 1 2 3 (see nltClip for details) Gridlines are line-weights in points (0 is no line) Cell-level indenting – typically this would be a depth-vector (0,1,2 ...) of indent levels for the first column. If you pass a vector it is reshaped to the number of ROWS in the table and taken to apply to column-1 only. If you pass a matrix, it applies on a cell-by-cell basis and should match the shape of your data. The actual degree of indent applied is computed from the indent level and font – you cannot currently control this. More than one column may be indented, but the indent structure should generally match across columns.

nltIndent depth © or ... ('ind' depth)('emph' (depth=0)) nltSpread budget

When the table crosses a page boundary, it is likely that the first row on the new page will not be a level-zero item. In this case a note is written above the table in the Caption font to indicate the continuation e.g. “Europe,UK ... continued”. This shows the ancestor levels of the item on the first row back to level-0. If more than one column has indents, the ancestors are taken from the leftmost. Indented columns may be repeated across wide reports in the normal way with KeyStyle 1.

psWrite etc. – updated to use ŒXN functions, so long filenames are supported now.

nlSpool etc. – updated to use ŒXF as above. Spool file name should now be given in full if you wish to change it from the default of newleaf.spl.

nl_GetMetrics – could still provoke unexplained crashes if used many times. Something to do with too many ‘?text’ calls on the same Gui object. This was particularly dangerous in RTF code which tends to have many font changes. Three lines of attack ...

  1. We now hold the metrics of all the common fonts in nl‘fcache permanently. This costs 17K of workspace, but who cares about that these days!
  2. When a new font is requested we make the form to measure on, do the ?text and delete the form immediately. More expensive, but safer. With the cache from strategy (a) in place, we very rarely need to do this at all.
  3. nlRichtext was vulnerable to daft RTF font-tables which specified several fonts which were all actually ‘Times Roman’. nlDefineFont now makes a quick check to see if a ‘new’ font is being redundantly defined and copies the metrics if so. Some say “Good old Microsoft ....”.

This should speed up most ‘normal’ reports quite a lot, as most people stick to times and Arial, and make these annoying errors go away permanently!

nlSkipToPage – allow page-numbering to be reset in flight, for example

nlUse ''
nlPlace 'Hello on page 1' 
nlSkipToPage 123 
nlPlace 'Hello on page 123'

Most likely use would be resetting to page-1 for section-based numbering.

psInfo 'spoolfile' – returns a 3-element vector giving:

A possible use for the bookmark table would be to build a table-of-contents for a report-browser, probably very similar to the PDF viewer.



Continue to: Updates to Release 1.6d (April 2000)
© Copyright Causeway Graphical Systems Ltd 1996-9