Memoir marks and fonts

Joel C. Salomon joelcsalomon at gmail.com
Wed Jan 15 04:47:33 CET 2020


After applying some content updates to a book for a client, I tried to
recompile the book, but the page headers were being set in the wrong
font.  The code that worked about two years ago looked something like this:

    \makepagestyle{headings}
    \makepsmarks{headings}
      {
        \def\chaptermark##1 { \markboth {\thetitle} {##1} }
      }
    \makeevenhead{headings}{\headingsize \gingerfont \thepage \quad
\gingerspacedfont \leftmark}{}{}
    \makeoddhead{headings}{}{}{\headingsize \gingerspacedfont \rightmark
\quad \gingerfont\thepage}

(I’m taking advantage of ExplSyntaxOn to indent and space my code.)

Tonight, this left the `\leftmark` and `\rightmark` set in the default
text font.  A bit of experimenting pointed me to this fix:

    \makepagestyle{headings}
    \makepsmarks{headings}
      {
        \def\chaptermark##1 { \markboth {\gingerspacedfont \thetitle}
{\gingerspacedfont ##1} }
      }
    \makeevenhead{headings}{\headingsize \gingerfont \thepage \quad
\leftmark}{}{}
    \makeoddhead{headings}{}{}{\headingsize \rightmark \quad
\gingerfont\thepage}

Has there been a recent change to Memoir that broke my old code?

—Joel C. Salomon


More information about the texhax mailing list