RistmarkStart free

Block

Contents

A table of contents that writes itself — every heading of the document with the page it starts on, worked out again each time the document is produced.

What it is for

A Contents block lists the document's headings: each one's number, its words and the page it prints on, with a dotted line running to the page number. You never type an entry. Rename a heading, add one, or let a table grow so that a chapter moves to the next page, and the contents follow at the next preview or download.

A heading is a Text block marked with a heading level (1, 2 or 3). When the template numbers its headings, the contents show the same numbers the headings print ("2.1 Output by source"). A heading left unnumbered is listed by its words alone.

Where it comes from

Today a Contents block arrives with an imported document: when the source has a typed contents page whose lines match the document's headings exactly — same words, same pages — the import replaces those typed lines with a Contents block that looks the same. If any line does not match, the typed lines stay as they were, so nothing you had is lost. Adding a Contents block by hand from the block palette is not available yet.

Settings

  • Heading levels listed: 1 lists only the main headings, 3 lists every level (default 3).
  • Font size (points) and Color of the entries.
  • Space around each entry (millimetres).
  • Leader: dots from each title to its page number, or none.

An imported block also keeps the source's font, its indent per level and which levels are bold.

Where it works

Put the block straight in the page body of a section, not inside a Stack, Row or other container and not in a header or footer: only there does it list the headings. It lists the headings of the page body; a heading inside a container is not listed.

Output differences

  • PDF, web page (HTML) and the editor draw the same entries, indents and page numbers. A long contents list continues on the next page between two entries.
  • Word (.docx). The contents become Word's own table of contents, already filled in with the same entries and page numbers. If someone edits the Word file so that pages move, they can update it in Word (right-click → Update Field, or F9). Word does not ask to update it when the file opens.

Troubleshooting

  • The contents are empty. No Text block in the page body has a heading level, or the levels used are deeper than Heading levels listed.
  • A heading is missing. It is inside a container, in a header or footer, or hidden by its visibility condition — a hidden heading is not listed, and the numbers after it close up.
  • A page number looks wrong after editing the Word file. Update the table of contents in Word.