<$chapter> Not Supported in Page Headers?

ch
chuckmiller
Posts: 112
Joined: Mon Nov 13, 2017 9:19 pm
Platform: Mac

Wed Jan 10, 2018 10:54 pm Post

From what I can tell, the <$chapter> placeholder is not supported in compile page headers. The placeholder list says...

"Not all placeholders are supported in headers and footers. In addition to the special header and footer placeholders specified below (which can only be used in headers and footers), only the placeholders listed under the sections Page Numbers, Current Date and Time, and User and Project Information are supported in headers and footers."

Is that true? Many books use the chapter name in place of author name in their facing page headers. It seems somewhat egotistical, in my mind, to have your name plastered on every other page. I want to use the chapter titles rather than my name. If anyone can't remember they're reading a book by Chuck Miller, they can look on the cover.

User avatar
Bridey
Posts: 390
Joined: Wed Nov 22, 2017 2:24 pm
Platform: Mac

Thu Jan 11, 2018 8:22 am Post

Might depend on the output you are compiling to, but this works for my projects (compiling to PDF, at least):

From the list of placeholder tags wrote:
<$pageGroupTitle>

Gets replaced with the title of the document that first comes after the page break most recently preceding the header or footer in which it occurs. In practice, this is useful for placing chapter titles in headers or footers. For instance, if you have a chapter in a single text document starting on a new page, then that document’s title will replace “<$pageGroupTitle>”; if your chapters are broken down into smaller sections placed inside folders, and the folders mark the start of each new chapter, then the folder’s title will replace “<$pageGroupTitle>” throughout the chapter headers and footers.

Note that if the section title cannot be calculated for any reason (for instance, because there is no text in the section associated with any documents), <$pageGroupTitle> may fall back on using the abbrevated project title (working the same as “<$abbr_projecttitle>” - see User and Project Information for details on where the abbreviated project title is drawn from).


Hope it does what you need it to.

User avatar
KB
Site Admin
Posts: 20716
Joined: Tue Jun 13, 2006 11:23 pm
Platform: Mac
Location: Truro, Cornwall
Contact:

Thu Jan 11, 2018 10:01 am Post

There's no <$chapter> placeholder at all, not just in headers and footers... A <$chapter> placeholder would make no sense in Scrivener, since Scrivener has concept of a chapter per se. Bridey's answer provides the solution, though - the <$pageGroupTitle> placeholder does exactly what you are after.
"You can't waltz in here, use my toaster, and start spouting universal truths without qualification."

ch
chuckmiller
Posts: 112
Joined: Mon Nov 13, 2017 9:19 pm
Platform: Mac

Thu Jan 11, 2018 1:35 pm Post

Thanks. The placeholder <$pageGroupTitle> works great. I couldn't find it in the documentation, but placing pageGroupTitle in uppercase makes the chapter name appear in uppercase. I was wanting that, as well.

de
derick
Posts: 420
Joined: Mon Aug 11, 2008 9:58 pm

Thu Jan 11, 2018 3:45 pm Post

Unfortunately with one of my big projects using <$pageGroupTitle> crashes Scrivener. Due to some illegal characters in my title no doubt. Filed a bug report and waiting to hear back...

User avatar
KB
Site Admin
Posts: 20716
Joined: Tue Jun 13, 2006 11:23 pm
Platform: Mac
Location: Truro, Cornwall
Contact:

Thu Jan 11, 2018 7:24 pm Post

derick - there are no characters not allowed in <$pageGroupTitle> in particular. What format are you exporting to? Could you please send us a project that shows the bug?
Thanks,
Keith
"You can't waltz in here, use my toaster, and start spouting universal truths without qualification."