| Previous Next | Contents |
Spread/List new 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)) leaf.table.List mat
... where the values must be numeric arrays. The properties you may include are:
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 used to make -ve numbers red, for example
clr9×mat≤0 © see leaf.colours for the names/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 leaf.table.Clip for details)
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.
leaf.table.Indent depth © or ... ('ind' depth)('emph' (depth=0)) leaf.table.Spread 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.
leaf.SkipToPage allow page-numbering to be reset in flight, for example
leaf.Use '' leaf.Place 'Hello on page 1' leaf.SkipToPage 123 leaf.Place 'Hello on page 123'
Most likely use would be resetting to page-1 for section-based numbering.
PostScrp.Info '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.