Paged.The open publishing system
The format atlas
Styles

IDML Reference

Styles

How IDML keeps formatting in named, reusable styles, which kinds of style there are, which part each lives in, and how text and frames refer to them.

Tier: IntermediateIntermediateIIexplanation

Reviewed against engine v0.71.9

A style in IDML is a named bundle of formatting that text, frames and tables point at instead of repeating the values.

In short Most formatting in an InDesign document lives in styles. A paragraph refers to its paragraph style by id, a run to its character style, a frame to its object style, a table and its cells to table and cell styles. Each style can inherit from a parent through BasedOn, and the element that applies a style can override any single attribute locally. The value a glyph or a frame ends up with is the result of folding those three layers together. Most style kinds live in Resources/Styles.xml; stroke styles and numbering lists live elsewhere.

The kinds of style

Style kindElementWhere it livesApplied by
Paragraph style<ParagraphStyle>Resources/Styles.xml, under <RootParagraphStyleGroup>AppliedParagraphStyle on a <ParagraphStyleRange>
Character style<CharacterStyle>Resources/Styles.xml, under <RootCharacterStyleGroup>AppliedCharacterStyle on a <CharacterStyleRange>
Object style<ObjectStyle>Resources/Styles.xml, under <RootObjectStyleGroup>AppliedObjectStyle on a frame or shape
Table style<TableStyle>Resources/Styles.xml, under <RootTableStyleGroup>AppliedTableStyle on a <Table>
Cell style<CellStyle>Resources/Styles.xml, under <RootCellStyleGroup>AppliedCellStyle on a <Cell>, or a table style's region
TOC style<TOCStyle> with <TOCStyleEntry> childrenResources/Styles.xmla table of contents generated from it
Stroke style<StrokeStyle>, <DashedStrokeStyle>, <DottedStrokeStyle>, <StripedStrokeStyle>, <WavyStrokeStyle>Resources/Graphic.xmlStrokeType and the …StrokeType attributes
Numbering list<NumberingList>designmap.xml, as a child of <Document>AppliedNumberingList on a paragraph or paragraph style

Paragraph, character, object, table and cell styles share the same two mechanics: inheritance through BasedOn and local overrides. TOC styles name the paragraph styles a table of contents collects and the styles its entries take. Stroke styles define the dash, dot or stripe pattern of a line; the built-in ones (Solid, ThickThick, Dashed, …) are <StrokeStyle> elements named in the reserved $ID/ namespace, such as StrokeStyle/$ID/Solid. A numbering list ties numbered paragraphs in different stories into one sequence (see lists, keep options and span columns).

In Paged: paragraph, character, object, table, cell and TOC styles are read, and the five cascading kinds resolve through their BasedOn chains. Stroke styles are read from Resources/Graphic.xml and numbering lists from designmap.xml, where InDesign writes them; definitions in Resources/Styles.xml, where earlier Paged versions wrote them, are still read. A built-in stroke style draws by its name. Supported · verified

Names, ids and groups

Every style has a Self id and a Name. References always use the Self id, so a style can be renamed without touching the text that applies it. A style id is the kind followed by the name, for example ParagraphStyle/Body; a colon in a name is escaped as %3a in the id.

InDesign's built-in styles are named in the reserved $ID/ namespace, which keeps them language-independent: ParagraphStyle/$ID/[No paragraph style], CharacterStyle/$ID/[No character style], ObjectStyle/$ID/[None]. The bracketed [No paragraph style] and [No character style] are the roots every paragraph and character style inherits from in the end.

Styles can be organised into groups (<ParagraphStyleGroup>, <CharacterStyleGroup>, …) nested inside the root group. A group is a folder for the user: it changes neither the style's id nor how it inherits.

Local overrides

The element that applies a style can set any of the style's attributes on itself. A <CharacterStyleRange> with PointSize="24" sets the size at 24 pt whatever its character style says. The override belongs to that range only; the style is unchanged. Conflict resolution walks through the order in which local values, character styles and paragraph styles combine.

Frequently asked questions

What is a style in IDML? A named, reusable bundle of formatting. Text, frames and tables refer to a style by its Self id instead of repeating the values on every element.

What kinds of styles does IDML have? Paragraph, character, object, table and cell styles, which all inherit through BasedOn, plus TOC styles, stroke styles and numbering lists. The first six live in Resources/Styles.xml, stroke styles in Resources/Graphic.xml and numbering lists in designmap.xml.

Do style groups affect formatting? No. A <ParagraphStyleGroup> or similar group only organises styles in the user interface. References use the style's Self id, and inheritance follows BasedOn, not the group.

What does $ID/ mean in a style name? It marks one of InDesign's built-in styles, such as [No paragraph style] or [None]. The $ID/ prefix keeps the name independent of the interface language.

On this page