The Repeat properties of an object or group are useful when you want to create a row, column, diagonal, or table from that single object or group. PlanetPress Design repeats the object or group to create the structure you specify. The Repeat properties can speed up the document design process and in some cases make the document more efficient to execute by optimizing the PostScript code for the resulting structure as a whole.
There are two types of repeats: static and line. In a static repeat, data selections remain static; the data selections in each repeat are identical to those in the source object or group. In a line repeat, data selections change with each repeat.
A line repeat is meaningful only with an object whose data selection exists on a single line. When PlanetPress Design performs the repeat, it advances to the next line of the data page after each repeat of the object. The data selection thus changes with each repeat. In the case of a group, each of the data selections referenced by objects in the group must exist on a single line (or in the case of a database emulation or XML file, in a single record). Note that when using Line repeat with a Repeat choice of Vertical only with a Vertical displacement, an initial displacement will be performed before the first item.
Note that in both cases, the specific line number you define in the Data properties of the object or objects is not important. You determine the start and end lines for the repeats when you set up the line repeat. When you do this, PlanetPress Design automatically sets the values of the From line and To line boxes in the Data properties of each object to ¤t.line. This ensures the data selection changes with each repeat. If you use a Custom data selection, you must manually adjust the references to the line (or record) to ¤t.line; if you do not make this adjustment, the Custom data selection remains the same for all repeats.
The start and end lines you define in the Repeat properties also determines the total number of repeats. In the Repeat properties you also define the layout you want to create, the horizontal and/or vertical order in which you want the data selection changes to occur. An Iteration condition can also be applied to determine whether the data selections that reference the current line or record that are being processed appear in the output.
When is a Line Repeat useful?
A line repeat is useful when all of the following are true:
When PlanetPress Design is processing an object with repeat properties and this condition becomes true, it stops repeating the object, performs the remaining objects on the document page and then performs the whole page once again, only this time using the surplus data. When all the data included in the current data page has been printed, PlanetPress Design stops repeating that page and goes on to the other pages that may be included in the document.
The fact that the same page is repeated to accommodate the surplus data does not mean that the initial page and the additional pages have to have the same appearance. The status of the condition to exit and overflow may be used to turn on objects that were turned off on the first page and vice versa. Note that all these objects must belong to the same group.
List of available variables when overflowing:
Variable Name | Type | Available on | Description |
¤t.overflowcount | integer | Object & Page | Indicates the overflow page number. Is always 0 on the first page and non-overflowing pages. Is the same before and after the object, wherever it is placed on the page or document order. |
¤t.overflowing | boolean | Object & Page | A true/false variable indicated if you are in an overflow loop. Is always false before the first overflow loop, true for all objects and pages during iteration, and false after the object after the last overflow loop. |
¤t.iteration | integer | Object only | The current iteration of the whole object, reset only when the overflow is finished on all pages. Useful for determining the total number of objects repeated in all pages. |
&iterationcount | integer | Object only | The current iteration on this page, reset on ever new overflow page. Most common use is to determine the maximum number of objects on the page in the overflow condition, e.g. =&iterationcount >= 15 |