Documentation Text & typography

Text & typography

Page numbers and text variables

designer

Last updated Sep 29, 2026

Text variables are placeholders that display a value from the document. Use them in a footer, running header, or label when the value may change later. Unlike a number typed by hand, a page number updates for the page on which the text appears.

Edit a text frame and put the cursor where the value belongs. Open Insert and choose Page number, Page count, Date, or File name. Add normal words and punctuation around the variable, such as Page [number] of [count]. The variable behaves as one item while editing, even when its displayed value has several characters.

For repeated headers or footers, put the frame on a page template, then apply that template to the relevant pages. Check the result on the first, middle, and last pages. A page count changes when pages are added or removed, and the file name depends on the saved design's name.

If you need a whole list of headings with their page numbers, use Build a table of contents. For per-record values from a spreadsheet, use data merge.