| Previous Next | Contents |
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
clr9×mat<0 © see nlcolours 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 ...
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.