Tables and axes > Table texts > Table titles
 
Table titles
Quick reference
To define a table title, type:
ttxtitle_text [<<tab>>][<<pag>>]
Parameters
x
The position of the title. One of:
l, r or c for left, right or centered justification
a number between 1 and 9 to indent the title by 10 times x spaces
g to line the text up with the start of the column headings
a or b to switch justification from left to right on alternate pages. tta prints on the left on the first, third, fifth and so on pages, while ttb prints on the left on the second, fourth, sixth and so on pages
title_text
The title you want to print above the table.
<<tab>>
Optional keyword which gives more control over the positioning of the table number. For more information, see Table numbers.
<<pag>>
Optional keyword which gives more control over the positioning of the page number. For more information, see Page numbers.
More information
Titles of any sort are created using tt statements at the appropriate place in the program. Their format is:
ttx[Text]
where x determines where on the line the text is to be printed:
Statement
Description
ttl
Left justified on the page.
ttr
Right justified on the page.
ttc
Centered within the page width.
ttn
Indented by ten times n spaces; for example, tt3 indents by 30 spaces.
tta
Left justified on the first, third, fifth pages, and so on, and right justified on the second, fourth, sixth pages, and so on.
ttb
The reverse of tta; that is right justified on the first, third and fifth pages, and left justified on the second, fourth and sixth pages.
ttg
Line up text with the first column allocated to the column headings. If you are using the standard row text width of 24 characters, ttg prints the first character of each table title in position 25 of each line. For example:
a;flush;pagwid=57
tab age sex;op=12;decp=0;flush
ttgBase: All Respondents
1 age
ttgQ2: Age
val c(110,111);Base;11-20 yrs;21-34 yrs;35-54 yrs;55+ yrs
1 sex
col 109;Base;Male;Female
The table produced by this program would look like this:
                                                      Page 1
                                    Absolutes/total percents
                        Q2. Age
                        Base: All Respondents
                              Base      Male    Female
 Base                          605       341       264
                                          56%       44%
 11-20 yrs                     120        73        47
                                20%       12%        8%
 21-34 yrs                     290       161       129
                                48%       27%       21%
 35-54 yrs                     146        81        65
                                24%       13%       11%
 55+ yrs                        49        26        23
                                 8%        4%        4%
You can type up to 200 characters on each tt statement. tt statements cannot be continued, but you can group any number of them together to form blocks of text. Text can be in upper or lower case, or both, and should be entered exactly as it is to be printed.
Titles can be made to refer to different levels in the tabulation hierarchy:
tts following the a statement define the run title which is printed at the top of each page.
tts after a flt statement refer to a group of tables, for example, a sub-report. For more information on the flt statement, see General filter statements.
tts following a tab statement are relevant to that table only.
tts can also appear in an axis immediately after the l statement. These are printed whenever that axis is used for the rows in a table; they are ignored when the axis is used for the columns in a table.
Here is part of a typical tabulation program:
a;side=20;spechar=-*;dsp;op=12
ttcProduct Awareness Test
tab age sex
ttlBase: All Respondents
tab brand area
ttlQ.5: Which brand did you try first?
ttlBase: All Respondents
When there are titles from more than one level to be printed at the top of the table, you can decide what the printing order should be. The default printing order is:
1 tts following the a statement
2 Table number from tb statement
3 tts following row l statements
4 tts following tab statements
5 tts following flt statements
6 tts following flt= statements
7 tts starting with the word Base
This order can be altered globally or for a group of tables or for an individual table using one of the options ttord=, ttbeg= or ttend= on the a, flt or tab statement. For more information on these options, see Output options.
See
Titles for T statistics tables only
See also
Table texts