Templates

Template structure

Each page of a report template must have a line that starts with:

/page/,...

it is followed by a sequence of lines and must finish with the line:

/end/

Example

The complete first line of a template could be:

/page/,Your High School Year 7,2,1

In the help this statement is shown as:

/page/,<name of report>,<report style>,<page number>

The <> symbols are shown in the generic description to show what is to appear in the actual report template. In the keywords topics each keyword is defined with a generic description followed by a specific example.

Each keyword in a report template must begin on a new line in the template file. When drawing a page the keywords are acted on in sequence. Starting with the /page/ keyword and continuing until the /end/ keyword is found.

The order of the keywords is significant as many keywords affect the keywords that follow. For example, the /sans/ sets the font used for all keywords that follow and draw text until the next /sans/ or /serif/ keyword.

Generally, putting the keywords in the same order is convenient as they are drawn on the page from top to bottom. Starting with keywords that set up the pen and colours used. Then keywords that draw the fixed parts of the page such as tables and headings. Finally, the keywords for the variable parts of the page.

Sometimes grouping keywords that use the same font is useful. This reduces the number of times the /serif/ and /sans/ and keyword must be used and can simplify the template. Similarly grouping together keywords that draw text with the same justification, /left/, /right/, and /centre/ reduces the number of times the keywords must be used.

 

Contents
Search