Documentation Text & typography

Text & typography

Page numbers and text variables

Insert live page numbers, page counts, dates, and document names into text.

Designer 1 min read Updated

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. The same four buttons are under Insert variable at the top of the text Properties panel. If a text frame is selected but you aren't editing it, the variable is added at the end of its text. If no text frame is selected, a new text frame holding just the variable appears in the middle of the canvas. Add normal words and punctuation around the variable, for example the words Page and of around a page number and a page count. The variable behaves as one item while editing, even when its displayed value has several characters.

The Insert menu, open. The first group lists Page number, Page count, Date and File name. The next group lists Column break, Frame break and Page break with their shortcuts. Then come Inline image, Paste as inline object (dimmed), and Hyperlink. Data merge and a Data field submenu follow, and the last item is Table of contents.
Figure 1The Insert menu with a text frame selected. The four variables are at the top. Inline image, Paste as inline object, Hyperlink and Table of contents, covered in other guides, are in the same menu.

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.

Want to try it?

Take this into the editor and work on a design.

Open Popcorn Editor →
Share this page

Send a link to a teammate or save it for later.