Anchored & inline objects
An anchored object is a page item written inside a run of text instead of on the spread, so it moves with the words; how IDML expresses that nesting.
An anchored object is a frame that lives inside a run of text, not on the spread.
In short Most page items sit on a spread at a fixed position. An anchored object is
written inside a story instead, as a child of a CharacterStyleRange, at the point in the
text where it is anchored. Edit the text before it and it moves along. A child
<AnchoredObjectSetting> says where it goes: in the line like a character (inline), on a line
of its own above the anchor (above line), or at a position measured from the text frame, the
column or the page (custom).
Why an author anchors an object
A free frame belongs to a place on the page. An anchored object belongs to a point in the text: an icon in a sentence, a figure that must stay with the paragraph that describes it, a side note that follows its paragraph when the text reflows. Because the object is part of the story, reflow carries it along instead of leaving it behind.
How IDML writes it
The object element is written in the story, between the <Content> before the anchor and the
<Content> after it, inside the same CharacterStyleRange. Its place among the content is the
anchor's position in the text. The element is an ordinary page item, with its outline in
<Properties><PathGeometry> like any other, plus one extra child:
ParagraphStyleRange
└── CharacterStyleRange
├── Content text before the anchor
├── Rectangle / TextFrame / Group the anchored object, at the anchor
│ ├── Properties / PathGeometry its outline, as for any page item
│ └── AnchoredObjectSetting where it goes, relative to the anchor
└── Content text after the anchorAn anchored text frame has its own story, named by ParentStory, like any text frame. In the
surveyed documents the anchored objects are text frames, rectangles and groups.
A 36 x 18 pt rectangle anchored inline in the middle of a sentence. It takes its own width in the line, and the text after it continues to its right.
Pages in this chapter
- Anchored objects: the element model and
every attribute of
<AnchoredObjectSetting>. - Inline vs anchored positioning: what inline, above-line and custom placement do to the object and to the lines around it.
The frame itself works as in frames & paths; the run it lives in is explained in story structure.
In Paged: anchored objects are drawn at their anchors in all three modes, and inline and above-line objects take room in their lines. Text does not yet wrap around an anchored object. Supported · verified
Frequently asked questions
What is an anchored object in IDML?
A page item written inside a CharacterStyleRange of a story instead of on a spread. It is
anchored at its position in the text and carries an <AnchoredObjectSetting>.
How is an anchored object different from a frame on the spread? A spread frame has a fixed position on the spread. An anchored object's position follows its anchor in the text, so it moves when the text before it changes.
Where does the anchor sit in the text?
Where the object element is written: between the <Content> before it and the <Content>
after it in the run.
Does Paged place anchored objects at their anchors? Yes, inline, above-line and custom objects alike, and inline objects take room in their line. Text wrap around anchored objects is not applied yet.
Feathering
The IDML FeatherSetting, DirectionalFeatherSetting and GradientFeatherSetting, which fade an object's own edges or fade it across a gradient of opacity.
Anchored objects
The element model of an IDML anchored object, a page item nested in a CharacterStyleRange, and every attribute of its AnchoredObjectSetting.