Search Locate Previous Next Contents

How to Make an Intelligent Function Lister

When listing APL functions, most people are anxious to avoid getting the odd lonely line at the top or bottom of a page. On the other hand, simply setting a paragraph as ‘keep together’ can result in huge amounts of white space if you are dealing with long functions.

In NewLeaf this is handled by two paragraph properties:

MinAfter – space in points
Keep – number of lines

These work together to keep subheadings attached to the paragraph they refer to, and to prevent blocks of text from being split in unfortunate places.

Typically, a function listing would be run using a paragraph style with Keep set to a number between 6 and 10. This would result in a function of (say) 12 lines skipping to a new frame if it found itself about to be placed within 6 lines of the end of the frame. If each listing was accompanied by a subheading, this could be set to MinAfter sufficient for 8 lines of listing, or around 96 points assuming our listings are running at 12-point line spacing.

Note that for normal text, the default value of MinAfter is 0, but that Keep is initially set to 2 to prevent ‘widows’ at the bottom of pages.



Continue to: How to Include Graphs
© Copyright Causeway Graphical Systems Ltd 2001