Sections and numbering
The Section element — where numbering restarts, its PageNumberStyle, prefix and marker — and how pages, page-number markers and the chapter number use it.
A Section says where page numbering restarts and how its numbers look; each page's label is the result.
In short A Section element in designmap.xml starts at a page (PageStart) and
covers Length pages. It either continues the previous section's count or restarts at
PageNumberStart, in the style named by a typed <Properties><PageNumberStyle> child
(Arabic, LowerRoman, UpperLetters, …). It can add a SectionPrefix to its
numbers and defines the text of its section marker in Marker. Every document has at
least one section. Page-number markers in stories (<?ACE 18?>) print the number the
section gives the page; <?ACE 19?> prints the section's marker.
Two sections: the left page is numbered ii in lowercase Roman, the right page restarts at 1 and prints its section marker.
Where sections go
Sections are direct children of Document in the design map, after the idPkg:Spread
references and before the stories. Every InDesign-exported document in the census (271
of them) carries at least one: InDesign writes a section on the first page even when the
numbering never restarts. Each section covers its pages up to the start of the next.
The Section element
PageStartnames theSelfof the page where the section begins, andLengthis the number of pages it covers. InDesign writesLengthon every section.ContinueNumbering="true"carries the count on from the previous section;ContinueNumbering="false"restarts atPageNumberStart.SectionPrefixis text such as "A-" that can be shown with the page numbers;IncludeSectionPrefixdecides whether it is.Markeris the section marker: the text a<?ACE 19?>marker prints on the pages of this section, such as a chapter title.Nameis the section's name in InDesign's interface, usually empty.
| Attribute · Section | Values | Paged | paged.set |
|---|---|---|---|
| PageNumberStyle | Arabic | UpperRoman | LowerRoman | UpperLetters | LowerLetters | read · written | numberingStyle |
| PageStart | id | read · written | |
| Self | id / reference | read · written | |
| ContinueNumbering | false | true | read · written | |
| IncludeSectionPrefix | boolean | read · written | |
| Length | integer | written | |
| Marker | — | read · written | |
| Name | — | written | |
| SectionPrefix | text | read · written | prefix |
| AlternateLayout | builtin / enum / text | not read |
These rules were measured in InDesign 20.0.1:
- Write
ContinueNumbering="false"beforePageNumberStart. InDesign applies the start number only once it has read the restart; with the attributes the other way round, it keeps the section and its marker but numbers straight through. - An absent
ContinueNumberingmeans continue. A restart must say"false".
The numbering style
The style is a typed property, not an attribute:
<Properties><PageNumberStyle type="enumeration">LowerRoman</PageNumberStyle></Properties>.
It is a property because its value can be either one of the built-in styles or a
reference to a custom numbering list. The common built-in values are:
PageNumberStyle | Numbers as |
|---|---|
Arabic | 1, 2, 3 |
UpperRoman | I, II, III |
LowerRoman | i, ii, iii |
UpperLetters | A, B, C |
LowerLetters | a, b, c |
A PageNumberStyle attribute on Section appears only in generated files; InDesign
writes the property.
How pages, markers and chapters use it
- The page's label. Every
Pagecarries aName, the label InDesign shows for it, with the section's style applied. In the example the two pages are namediiand1. - Page-number markers.
<?ACE 18?>inside a story'sContentprints the current page's number, or withPageNumberType="NextPageNumber"or"PreviousPageNumber"on its range, the number of the page the story continues on or came from. All of them use the numbering of the page they refer to. See text variables for the full marker table. - The section marker.
<?ACE 19?>prints theMarkerof the section the page belongs to. - The chapter number is not part of a section. It is the document's own
ChapterNumber, set inChapterNumberPreferenceinResources/Preferences.xml, and theChapterNumberTypetext variable prints it.
In Paged: sections are read in both spellings of the numbering style; Arabic, Roman and letter styles are applied, and any other style falls back to Arabic. A page's label comes from its
Supported · verifiedName; only a page without one is numbered from the sections, and the build reports when that happens. Scripts can add, edit and remove sections, which re-labels the pages, and saving writes InDesign's spelling.
Frequently asked questions
Where is page numbering defined in IDML?
In Section elements in designmap.xml. Each section starts at a page, covers Length
pages, and either continues the count or restarts at PageNumberStart.
How is the numbering style written?
As a typed property:
<Properties><PageNumberStyle type="enumeration">LowerRoman</PageNumberStyle></Properties>.
The value can also name a custom numbering list, which is why it is not an attribute.
Why does my section restart not take effect?
Check the attribute order: InDesign applies PageNumberStart only when
ContinueNumbering="false" comes before it. An absent ContinueNumbering means the
numbering continues.
What does <?ACE 19?> print?
The Marker text of the section the page belongs to. The page number itself is
<?ACE 18?>.
Is the chapter number a section setting?
No. It belongs to the document, in ChapterNumberPreference, and defaults to 1.
Sections, numbering & variables
How IDML numbers its pages with sections and fills text with computed values — page-number markers, the section marker, the chapter number and text variables.
Text variables
IDML text variables and page markers — the TextVariable definition, its VariableType kinds, TextVariableInstance in a story, and the <?ACE?> page-number codes.