Docs / idml

IDML

Rig names InDesign layout meaning as rig.layout.* plus rig.story.*. InDesign Markup Language files stay host mappings at the boundary - same rule as IFC in openbim.md and SVG (design philosophy).

The Contract job is entities, POD components, and schema ids. An .idml reader / writer (SimpleIDML, a Pandoc wire, or a sibling pack) is fulfillment, not this catalog.

Thin layer

Do not invent rig.idml.*. One story and one frame use the schemas below; IDML Self ids land on rig.meta.named stableId. Visual typography stays on rig.layout.paragraph_style / character_style, never on rig.story.*.

IDML idea Rig
Page / Spread page rig.layout.page
MasterSpread rig.layout.master on a page
AppliedMaster rig.layout.applied_master
FacingPages / BindingLocation rig.layout.facing
MarginPreference / Bleed / Slug page margins / bleed / slug
Story rig.story.flow
ParagraphStyle (identity) rig.story.paragraph_style
CharacterStyle (identity) rig.story.character_style
ParagraphStyle (face / size / lead / align / colour) rig.layout.paragraph_style
CharacterStyle (face / size / colour / bold / italic) rig.layout.character_style
TextFrame rig.layout.frame
GeometricBounds + ItemTransform rig.spatial.transform + frame width / height
InsetSpacing frame insets
TextColumnCount / TextColumnGutter frame columnCount / columnGutter
FirstBaselineOffset / MinimumFirstBaselineOffset frame firstBaseline / firstBaselineMin
PreviousTextFrame / NextTextFrame / ParentStory rig.layout.frame_chain
Containment (on page or master) rig.spatial.relationship parent

GeometricBounds (y1, x1, y2, x2) become position (x1, y1) and size (x2 − x1, y2 − y1) in 2D page space (+X right, +Y down). ItemTransform composes onto the same transform. Do not store the IDML matrix as a second pose.

Encodings (fulfillment)

File Role
.idml ZIP of designmap.xml + Spreads / Stories / MasterSpreads / Resources - map into / out of layout + story
.indt / .indd InDesign private database - export IDML first
Word / .docx Story-only import to rig.story.*. Tables land as rig.story.table content; the document's rig.layout.table_style dresses them - Word table formatting does not travel. Not a layout

Do not put InDesign Self strings, story overflow, or composed line breaks in portable components - those are encoding / host cache.

Honest limit

Two hosts that speak rig.layout.frame + frame_chain + page / master / facing + story styles can exchange a threaded text layout as .rig. Round-tripping every InDesign object SimpleIDML can touch is not required.

Stay out of v1 (do not invent schemas for these):

  • Graphic frames / placed images
  • Groups
  • Object styles
  • Text wrap
  • Anchored objects
  • Hyphenation and justification settings (alignment justify is already on the paragraph style)
  • GREP / nested styles
  • Footnotes
  • Text variables (folio)
  • Notes
  • XML tags
  • Books (.indb)

A compose host that parents a flow to a page and clones pages on overflow is not an IDML layout - InDesign threads frames. Masters, facing, slug, and character styles beyond italic are already in this catalog; honor them at emit time.

A Word converter that emits only paragraphs is fine for a novel's rig.story.*. It is not a pictured book or a register until tables, lists, images, footnotes, and hyperlinks land in that fulfillment. Tables and list membership are already named here.

Example: examples/story-frames.json.