| Search Locate Previous | Contents |
Master pages are saved by the designer in standard APL matrices. To set a single page layout as the working definition:
nlUse mypage © work with layout mypage
As you flow and place text, it will snake around the frames on the page layout until no more remain. The page will then be spooled to file, and a new page will be started using the same master, with any page numbers (marked by &p in fixed text) incremented automatically.
Note that you can pass a null argument to nlUse, in which case NewLeaf provides a default layout consisting of a single frame (with 1 margins all round) and a page number centred at the foot of the page.
If you have marked any parameters in the fixed text (using placeholders %1 to %9) you can substitute values for these by passing up to 9 items as the left argument to nlUse:
'Sales' 1998 nlUse salesrep
This will replace %1 with Sales and %2 with 1998 in the report master. You can update these substitutions at any time (see nlSubst for details).
Using a set of master pages
A common requirement is to alternate between left and right masters, possibly with a different design for the first page. It may also be necessary to make a follow-on page for a form letter which omits the address box. Simply pass a vector of page definitions to nlUse:
nlUse left right © alternates nlUse first left right © different 1st page nlUse (addr),2½followon © letter with follow-on pages
Note that NewLeaf uses up the pages until only two remain, then these are alternated. If you know exactly where your section breaks will occur, simply pass a vector of page definitions, reshaped to match your document.