Search Locate Previous Next Contents

leaf.table.Indent – set table indents

A common use of tables is to present information like budgets or sales summaries where the leftmost column is a tree-structure of organisational units. You can manage the indenting manually by inserting leading blanks, but if the text is forced to wrap into a narrow column, the indenting structure is obscured. A better strategy is to set the indent level for the table and have NewLeaf wrap the text correctly for each entry.

leaf.table.Indent orglevel
leaf.table.Spread salesmat

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. Note that you can also pass the indenting as an element in the optional left argument to Spread:

('ind' depth) 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.

See also ...
leaf.table.Spread – spread matrix into a table


Continue to: leaf.table.KeyStyle – set column key style
© Copyright Causeway Graphical Systems Ltd 2001