Using <$pageGroupTitle> in LaTeX

When I place the <$pageGroupTitle> Placeholder in my LaTeX header using the command:

\lhead{{<$pageGroupTitle>}}

I get the following error:

! Extra }, or forgotten $.
\f@nch@olh ->{<$sectiontitle>}

Any thoughts?

Thanks,
scrive
:thinking:

Sorry, @scrive, I’m pretty useless when it comes to LaTeX. But I’ve split this into its own thread so users with LaTeX knowledge might have an easier time finding it!

1 Like

I am trying to place the title of each chapter/section to appear in the center of the page header on each page of output using the LaTeX \chead{ } command,

image

When I use the <$title> placeholder in the above manner, however, all that appears in the heading on ALL of the pages output is the term ‘(Setup Packages)’ as shown below:

I’ve also tried substituting the <$pageGroupTitle> placeholder in lieu of <$title>, as follows:

image

but when I do, the LaTeX Typesetter treats the single $ in <$pageGroupTitle> as an unbalanced pair of $ normally used to represent an Inline Equation, resulting in the following error:

image

Any thoughts on what I need to do to have the chapter/section titles appear in the top center position on each page of output?

Thanks in advance,
scrive
:thinking:

I’ve never once had to bother with doing that manually or having to set up Scrivener to do it, the Memoir class handles it for me, when I have the right page style selected, because the \chapter macro in part handles setting up the header/footer text.

Even if I were to decide to roll my own rather than creating a custom page style or working within the Memoir infrastructure in other ways, I’d probably do that by renewing the chapter command or some component within it (not sure, as I’ve never tried!).

1 Like

I’m using the LaTeX (Memoir Book) format for my project, or at least that is what I started with, now close to two years ago.

Any idea how I might go about “renewing the chapter command or some component within it” ?

Thanks,
scrive
:thinking:

As I said I have never felt the need to reinvent the header and footer facilities in that document class.

Have you had a look at the documentation on pagestyles yet? There is close to a dozen built-in presets and just about every point of customisation you might like is provided. It would take a truly demanding header design to require digging all the way into the internals like you suggest.

1 Like

I’ve spent a bit of time (probably too much) tracing down what I believe may be what is going on with the Placeholder <$title> when I attempt to use the term in the document header.

The trick (which should have been obvious) is to understand that the <$title> is a Scrivener Placeholder, NOT anything LaTeX would recognize, hence the issue with the unbalanced pair of $ normally used to represent an Inline LaTeX Equation was due to my not defining the <$title> macro prior to typesetting.

The solution is quite simple: include the following Fancyhdr package command:

\fancyhead[C]{<$title>}

in the Section prefix within the following Section Layouts: Part, Acronym Items, Chapter w/ Text, Chapter, Section, Subsection and Subsubsection.

Works great!



You get the idea!

Thanks for reading,
scrive
:thinking:

1 Like