<$title> in header not converting from placeholder to title


At the top of each compiled page, I would like the title of the document that is printed on that page to appear. To that end, I entered the placeholder tag <$title> in one of the header boxes in the compile dialogue.

When I compile my draft, however, the header displays “<$title>” just like that, instead of the title of each document. For a little while it instead grabbed the title of the first document and printed that on every page, even after the contents had long moved on from that document, though I can’t reproduce that now. Italics and underlining work as they should, so
in my compile dialogue becomes
in the headers of the compiled draft.

Oddly, section titles work as they should, when I type
<$sectiontitle> - <$title>
into the header box of the compile dialogue, compiling does pull the correct section titles throughout the draft and it looks like this
Introduction - <$title>
First Part - <$title>

I am attaching screenshots of my settings and resulting top right of my page. In the settings, the part before <$title> in the settings is <$sectiontitle>, that got cut from view.

I appreciate any thoughts you might have!
Section title and document title in compiled header.jpg
Compile settings.jpg

There is no way for Scrivener to know the page range that a document exists within, it is unaware of pagination in general, so none of the document meta-data placeholders will work in this context. Section titles are different, we can know what those are because the compiler itself generates them when it inserts a page break, a known position that is regardless of ordinary pagination. So the name of the thing that caused a page break can be declared as the new page header at that time.

I see, thank you for clearing that up. So what would I use the <$title> placeholder for? Ebooks?

I cannot think of anything that e-books would benefit from using this placeholder, over any other type of format. All but a few scriptwriting compile formats have primary access to an item’s title through the Formatting pane, but occasionally there can be use for it if the title is needed elsewhere. I’d wager it’s rather rarely used in the compiler itself. It is of more interest in the main text editor area. If you need to refer to the title of a section, you can do so with this placeholder, or remotely by linking the placeholder text to the item you wish to refer to. I’ve used it for glossary style sections (where each term is its own item).

Ah! Explains why it shows up in a different spot in the placeholder tag help list, too. Thank you!