Text variables and cross-references in Layout by Zaweba
Running headers, file names, dates, chapter numbers and custom text as text variables, plus cross-references that update, in Layout by Zaweba.

Text variables and cross-references are bits of text that Layout by Zaweba fills in for you and keeps up to date. A running header that always shows the current chapter title, a date that changes when you export, a "see page 42" that becomes "see page 44" when pages move. They take a class of small, easily forgotten updates off your hands.
Text variables
A text variable is a placeholder that shows a value. Layout offers several kinds.
A running header takes its text from a paragraph style. Put one on a parent page, point it at the chapter title style, and each page shows the title of the current chapter. In a reference book it could show the current section heading instead.
File name shows the document's name, useful in a slug for proofs so everyone knows which file a printout came from.
Creation, modification and output dates show when the document was made, last changed or exported. An output date in the slug of a proof tells you exactly which version you're looking at.
Chapter number shows the chapter's number, ready for a running footer or a chapter opener.
Custom text is a value you set once and use in many places, such as a product name or edition that might change, so you update it in one place.
Cross-references
Cross-references point to paragraphs or to anchors. A paragraph reference might point to a heading; an anchor can be placed at a particular spot in the text. Formats decide what the reference shows, such as the page number, the text of the heading, or both.
When the document changes, cross-references can be updated so they show the new page numbers or text. A manual that refers readers to other sections, or a book that says "see chapter four", stays accurate through every revision.
Setting up a book with variables
A typical arrangement for a book puts the chapter number and a running header on the parent page, so every left page shows the book or chapter title and every right page shows the current section. A file name and output date go in the slug, so proofs identify themselves. Nothing on those pages is typed by hand, and nothing goes stale when chapters are reordered.
Jobs where these earn their place
Long documents are the obvious case: books with running headers, manuals full of cross-references, reports with dated proofs. But even a short brochure can use a custom text variable for a price or date that appears several times.
Variable and reference slips
Typing running headers by hand is the most common. They'll be wrong as soon as a chapter moves. Use a running header variable on the parent page.
Not updating cross-references before export leaves old page numbers in the text. Make it part of the routine before a PDF goes out.
Pointing a running header at the wrong style gives you an empty or odd header. Check that the style you chose is the one your chapter titles actually use.
Deleting the heading a cross-reference points to breaks the reference. When reorganising, check references afterwards.
Text variables and cross-references sit well with paragraph styles, sections and books in Layout by Zaweba. Set them up once and the document keeps its own small details straight.