Leading Frames
Overview
Many catalog productions need leading numbers to connect images with their corresponding text content. A leading number is a short label, for example 1, 2, 3 or A, B, C, that sits on an image and is repeated next to the matching caption, price, or legend entry. Leading Frames builds this link with two placeholders and one Panel Action.
How It Works
Leading Frames uses two placeholders and the Set_Leading_Numbers Panel Action.
Placeholder "Leading Number Parent"
Placed on top of the image frame, the leading element. Two function variables control the output:
gNumberingStylesets the number format.gNumberingAreasets where the count resets.
The Panel Action reads these variables from the first Leading Number Parent placeholder it finds in the document. All parent placeholders share that one style and area.
Placeholder "Leading Number Child"
Placed on or inside the text frame that should show the matching number, for example the caption or legend. It needs no function variable. The placeholder ID is all that is required.
Panel Action "Set_Leading_Numbers"
Run this action after building the document. It works in these steps:
- Reads the two placeholder IDs from the document attributes
ParentPlaceholderIDandChildPlaceholderID. - Reads
gNumberingStyleandgNumberingAreafrom the first parent placeholder. The defaults are stylekNumberand areakPage. - Walks every page in the document.
- On each page it collects all Leading Number Parent placeholders, sorted by position, and gives them sequential numbers.
- For each parent placeholder it writes the current number in the chosen style. It then searches the whole document for the Leading Number Child placeholder that links the same data record and writes the same number into it.
- Increases the counter by 1 after each parent.
The match between parent and child is done by the linked data record, not by position. A child receives a number only when its record matches a parent that was numbered on the page.
Numbering style (gNumberingStyle)
| Value | Output | Description |
|---|---|---|
kNumber | 1, 2, 3 | Plain integers. This is the default. |
kZero | 01, 02, 03 | Zero-padded for the values 1 to 9. From 10 on, plain integers. |
kChar | A, B, C | Uppercase letters. The value 1 becomes A, 2 becomes B, and so on. |
Numbering area (gNumberingArea)
| Value | Reset point | Description |
|---|---|---|
kPage | Every page | The count restarts at 1 on each page. This is the default. |
kSpread | First page of a spread | The count restarts at 1 on the first page of a spread and continues across the other pages of that spread. |
Document attributes
| Attribute | Holds |
|---|---|
ParentPlaceholderID | Placeholder ID of the Leading Number Parent placeholder |
ChildPlaceholderID | Placeholder ID of the Leading Number Child placeholder |