| Search Locate Previous Next | Contents |
Although NewLeaf will attempt to make good decisions about page-throws and new frames, it is sometimes necessary for the application program to check exactly where it is on the page, how many lines are left, and possibly how many pages have been used. The nlInfo function returns the current page (counting from 1 regardless of IO or your page-numbering counter); the current frame; how many frames there are on this page; how many lines remain at the font pitch in use at the time of the call.
For example:
nlInfo 3 1 2 22 nlPitch 18 © Increase the spacing nlInfo 3 1 2 12 © fewer lines now available
Here we are on the 3rd page, and text is being written into the 1st frame of a double-column layout. At normal spacing the frame has room for 22 more lines. If the line spacing is increased the number of available lines decreases, so (without writing anything) we are nearer the bottom of the page!
Some uses of this command might be:
Consider setting the MinAfter or Keep paragraph properties as simpler alternatives to fully manual control.