ALD Objects > Frames
  
Frames
At its most basic, a frame is a container for content:
Text
Raster graphic, e.g. BMP file
Object graphic, e.g. vector files such as CGM or SVG files
These content types can appear alone in a frame, or together in any combination, for example an object graphic with a title and a caption. This ability to amalgamate information types in a single frame is unique to PTC ALD. Most other publishing applications require the creation and maintenance of separate frames for each type.
Creation of Frames
A frame can be built in several ways:
Manually : select the Layout > Frame > New Frame menu option to invoke the frame draw cursor. Use Layout > Frame > Properties to select and add properties to the new frame.
In a script: use the tfmk macro and its associated parameters
Inline: via <?frame> command plus associated keywords
Via a page control sequence
Allocating Content to a Frame
Contents are allocated to a frame via the tfcont macro or the Layout > Frame > Contents desktop menu option. A box at the top left corner of each frame indicates the information types that it contains.
* 
Page guides must be active for this information to be displayed - see WYSIWYG View for details about how to activate this view).
Specific content can also be added to frames by executing the one of the following macros:
tft or tftext
Allocate a text stream tag (.Tx) to a frame
tfo or tfobject
Allocate an object graphic tag (.Og) to the frame
tfr or tfraster
Allocate a raster graphic tag (.Rg) to the frame
Frames can also be set to carry footnote information, instead of including it in the text stream or document itself. With this option each frame can display a different footnote.
Frame Properties
Frames are added to page layers and given a specific size and position, color, rules, columns and margins to make up a page layout. This can be done either manually by a desktop user or dynamically via a programmatic sequence of macros or inline PIs. A list of common tasks for the treatment of frames is detailed in the list at the end of this section.
 
Although it is possible to allocate an infinite number of properties or combinations of properties to a frame to ensure it can fulfil the requirements of even the most rigorous of publishing environments, it is restricted by shape. At the current time only rectangular frames are permitted. This restriction can be circumvented by the use of vector graphics to create the required shape.
Frames and Columns
Frames can be split further, into columns, to provide even more variation for the display of content on a page. Columns can be of any width and any position within the frame. They are positioned using x and y coordinates to guarantee pinpoint accuracy of placement. Frames and columns can be sized via a variety of methods, some of which size the columns themselves while others size their contents:
Equal widths
Using the tfcol macro or the Layout > Frame > Properties > Columns/Margins menu selection, columns are automatically drawn to the same width. PTC ALD calculates their width by assessing the amount of space available in the relevant frame, less any gutters and internal margins that have been set, and dividing that by the number of columns to be drawn.
Unequal widths
The width of each column and the required gutter margin can be specified individually via the Layout > Frame > Properties > Columns/Margins menu selection.
Copyfit to frame
Using the tffit macro, the attributes assigned to a text stream are changed to fit columns and content in two ways:
1. the whole stream fits into the specified frame
2. the size of the frame changes to incorporate the content
Graphic
When loading a graphic into a frame via the tfcont macro the graphic can be given a "fit to frame" scaling option to ensure it is automatically given the same width and/or height as its target frame.
Text Flow in Frames
By default, text will automatically flow through frames that have had the same text stream name allocated to them. This means that when a page is copied, during either a page down operation or an autocopy process, the frames it contains (and by default any text stream allocation given to that frame) are also copied, thus ensuring flow through the copied frames. It is also possible to have the text from a particular stream flow into a completely unrelated frame. In this instance you would simply allocate the same stream name to the required frame.
See the menu option Layout > Frame > Properties > Frame Copy Modes for the copy options available during this operation.
As an alternative to this default behaviour, however, PTC ALD can be set to handle text flow statically. Here, whenever a frame is copied as detailed above, the text stream will restart at the top of that frame. This is useful when dealing with short text streams but it must be noted that the whole text stream will not appear in the frame if the frame is not large enough to contain it.
In terms of text flow direction, PTC ALD's default setting is to have text flow from left to right in a column. This can be changed, however, to support the following language based requirements:
Set text to flow vertically for CJK language documents: use the tfcjk macro or the Frame > CJK (vertical) menu option.
Set columns to be filled from right to left for Arabic text
Functional Treatment of Frames
It is useful to be able to provide specific instructions on how frames should behave in certain situations, for example when adding new frames to a page, or using multiple associated frames on a page:
Anchor frames: use rules to define the position of a frame relative to a specified anchor point during the page build process.
Lock frames: prevent a frame from being resized or moved.
Layer frames: if frames have been placed in a layered arrangement, it is possible to specify an order for their display by bringing frames to the front or sending them to the back of the page.
Group frames: join specified frames together to allow them to be moved or rotated en masse. Grouped frames cannot be manipulated individually.
Tie frames: join specified frames together consecutively, as in a chain or tree formation, so that when one frame is edited or resized its tied frames move or change accordingly.
Common Task Macros for Frames
Although a full list of macros that can be used to treat frames is out of scope of this document, the list below contains details of some common tasks:
tfmk
Change the cursor to allow the freehand draw of a frame in a desktop application.
tfmk 20mm, 10pt, 11in, 210mm
Draw a frame sized 11 inches x 210 mm at a position of 20mm across and 10pt down from the top left corner of the page.
tfsel 1+3+4
Select frames 1,3 and 4
tfpos
Invoke the Position/Size Frame dialog box in a desktop application, from which to manually select position and size coordinates for a selected frame.
tfpos 20mm, 10pt, 11in, 210mm
Resize a selected frame to 11 inches x 210 mm and move it to a position of 20mm across and 10pt down from the top left corner of the page.
tfcol 3,10mm
Add three columns of equal width to the selected frame, with a gutter of 10mm between each
tfrules "+"1, 5pt, red, "tblr"
Add a red rule of width 5pt to all four sides of the selected frame
tfend
Send the selected frame to the back of a set of layered frames
tfgroup
Groups the selected frame(s). Use tfsel to select the required frames
tftie
Invoke the Frame Ties dialog box to enable specification of tying criteria
A full list of PTC ALD macros is contained in the Macro Language Reference. Please refer to the PTC ALD Help Center, accessed via the Help menu option.