![]() |
|
<?frame> |
Longname: | frame | ![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Released: | 7.67a | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Created: | 7.67a | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
See also: | <?page> clear default width height kill add-to-page raw position size text text-margins page-kill event pageoffset end-of pb (n/a) after-page resize update ttmaptab (n/a) select setcols |
Summary |
Using the frame command, frames can be created inline during a format. Similar to footnotes and anchors, these inline frames are removed at the beginning of the format and are regenerated. This command is used in conjunction with a multitude of keywords and raw verbs. |
Example extract |
This sample when placed inline and formatted will create a frame of 80 x 30mm positioned at 50mm down 70mm accross with the frame name "Simple_1".
|
Syntax
|
keyw_param:keyw +
> |
keyw_param:keyw |
One of the many frame verbs, raw verbs and applicable parameters. See the associated commands for details. |
The inline frame verbs can be used in any order, although <?frame clear> must always start a new frame and <?frame add-to-page> must be at the end. |
Auto frame/page parameters must always be placed consecutively without any other commands, like footnotes or anchors, in between, or the successful result cannot be guaranteed. |
In-Depth |
Getvars |
Attributes of the most recently created auto frame, can be accessed by getvar 01693, for example: |
|
Within a script. |
|
or as a showstring |
Error Messages |
The following error messages are displayed in the format log.They indicate a page or frame which could not be created. |
|
Warning Messages |
The following warning messages are displayed in the format log, although the frame had been successfully created. |
|
Using autoframes |
Creating a document from the preformat stream |
You need to first create a 'base' page on which to place any frames, underlays, overlays.This can be as simple as <?page clear><?page insert> and is the same as the tpins macro. |
Creating layers |
The tplay macro can create an overlay/underlay and add it to a range of pages. To do this with auto pages requires three steps: |
First you need to create the layer: |
|
![]() |
A page layer must always have a name. |
Second, add any frames to the page: |
|
Here it is not necessary to do <?page clear> before defining the frame because it is being added to the page which has just been created. |
![]() |
It should also be noted that autoframes on autopage layers cannot be addressed later with <?frame ...> commands. For this reason if layers are used and a frame on a layer needs to change, then the layer must be removed and replaced with another one containing the changed frame. |
Finally, add the layer to the 'base' page: |
|
The default, without a range of pages given, will put the layer on the current page. |
Creating layers to add later |
Page layers can be created at any point in the document, and only used at a later stage. When the layer needs to be used it can be added by using : |
|
To remove an autopage layer at any point : |
|
Creating Autoframes |
<?frame clear> must always be done at the start of each new frame. Autoframes must always have a name, in order to address them again later. If ?frame raw frame l,t,r,b is used to specify the frame's position and size, this must be done immediately after <?frame clear> as it reinitialises all other frame attributes. |
A good way to discover which 'raw' verbs are needed to enable certain properties, is to copy a selected frame to an internal 'file' with tp:tcopy "{0}before", make changes to the frame, copy it again with tp:tcopy "{0}after" and then compare the "before" and "after" streams.This will also show how the parameters of each verb are used. Autoframes, like footntotes, are deleted when a page is formatted, except if the page is frozen and the autoframe contains a cut/frozen text stream.To find out if a frame is an autoframe, do the above, and look if the frame has an attribute $auto 1. |
When a document is saved, the information about which autoframes exist at the start and end of a page is written to the fdf section of the .3d file. This information can be extracted with the tputfdf (n/a) macro. |
Resizing pages and frames |
If you change the size of a frame at the beginning of a page, and that page contains frames which have size or positioning relative to the frame which has changed, then if that frame's size/position is wrong after formatting the page you will have to do <?frame update> after changing the size of the frame.This re-adjusts the internal layout of the page to the new frame size. e.g.: |
|
Errors and warnings |
Various error and warning messages are output in the format log, so if something is not working correctly, try turning the format log on to display any messages. |
Formatting Autoframes on frozen pages |
A new document preference for version 9 under Format Control selects the action to take place if the contents of a cut/frozen auto stream change when autoframes on a frozen page are formatted. |
|
During formatting:
|
Preventing duplicate autoframes |
It is highly recommended that autoframe commands are NOT used in 3B2’s "fstart" loop, as you may end upwith duplicate autoframes around a page break. Thismeans you should, as a general rule, use the <?> (or <?=>..<?=0>) command before your autoframe commands. An alternative approach would be to use the <?queue> command to queue up your autoframe commands until the first printable character. |
For further information on inline pages and frames, please see Technote 0057; Inline Pages and Frames; 7.67a for further details. |
Document created on 08-Feb-2003 (revision 1)