I'm converting a book from FrameMaker to the memoir class using XeLaTeX and am having to design my own chapter and page styles to suit the publisher's requirements. Mostly it works fine, except that my attempt to pull 'Chapter' or 'Appendix' as the case may be by placing \@chapapp into the left mark doesn't seem to work: instead of giving me the correct literal I just get 'chapapp'.

MWE follows:

% !TEX TS-program = xelatexmk
    a4paper,            % minus margins = A5
    11pt,               % reduce to 10 if required
    twoside,            % two-sided printing
    one column,         % single column of text on a page
    openright,          % chapters/lessons begin on odd pages only; review later
%   draft               % mark overfull lines and provide change bars; change later

    \setlength{\midchapskip}{20pt}% unused





\chapter{First Chapter}
\section{First section}\lipsum[3-5]

\chapter{First Appendix}
\section{First section}\lipsum[3-5]


The header on page 2 looks like this:

enter image description here

I'm stumped, so any help would be appreciated.


1 Answer 1


You need


because you're using \@chapapp - a macro with an @ in it (outside of a .style file/class). See What do \makeatletter and \makeatother do? that explains what happens within this pair.

enter image description here

If you're not using an appendix, you can get away with using \chaptername instead of \@chapapp:

  • Curious. I wouldn't have thought of that from any of the examples I've seen. I wonder about the placement of \makeatletter? It seems it has to be outside the \makepsmarks to work, rather than just before the pertinent \createmark, which seems uninituitive. I wonder why? Thanks for the fix. Oct 11, 2017 at 11:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.