Tables and axes > Table texts > Page numbers
 
Page numbers
Quick reference
To define the page number to be printed on a page, type:
pag number
or type:
<<pag>>
on a tt statement.
More information
Page numbers are always printed in the top right corner of the table, unless you use the option nopage on the a, flt or tab statement. The first page is Page 1, the second is Page 2, and so on. Page numbers are independent of table numbers: a table might cover several pages with different numbers, but the table number remains the same.
Page numbering is controlled by the pag statement which looks like this:
pag n
where n is the page number of the next table.
As with tb, page numbers for various tables can be set individually by preceding the relevant tabs with a pag.
To turn off page numbering for a single table, include nopage on the tab statement. To switch off page numbering for a group of tables, put nopage on a flt statement. When page numbers are switched off, Quantum does not stop incrementing the page count for each new page, it does not print the page number. Therefore, if you write:
tab ax01 bk01
tab ax02 bk02;nopage
tab ax01 bk03
the page number for the third table is Page 3.
If you want more control over the positioning of the page number, switch off the automatic page numbering with nopage and define the page number on a tt statement, using the notation:
<<pag>>
to mark the position in which the page number is to be printed.
For example:
bot
ttrPage <<pag>>
tab age sex
ttlTable <<tab>>: Age by Sex
When the table is created, Quantum will substitute the appropriate page number in place of <<pag>>. Since the page number is defined on a ttr statement under bot, it is printed right-justified at the bottom of the page.
If you want to force a page to have a specific number, use a pag statement with the required number just before that table.
Expand the above example with tb by adding page numbers:
a;dsp;op=12;notbl;nopage
tba 1
pag 1
tab age sex
ttlTable <<tab>>: Age by Sex
bot
ttrPage <<pag>>
pag 5
tab marry sex
foot
ttl
ttl
ttcTable <<tab>>: Marital Status by Sex
bot
ttrPage <<pag>>
tbl 10
tab prefer region
bot
ttrPage <<pag>>
l region
ttlTable <<tab>>: Regional breakdown
In this example, all tables have their page number in the lower right corner of the page. The first table starts on Page 1, the second starts on Page 5, and the third starts on Page 6 (assuming the previous table did not spread over more than one page).
See also
Table texts