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
\documentclass[%
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
]{memoir}
% CHAPTER STYLE
\makechapterstyle{olms}{%
\setlength{\beforechapskip}{50pt}
\setlength{\midchapskip}{20pt}% unused
\setlength{\afterchapskip}{40pt}
\renewcommand{\chapnamefont}{\sffamily\LARGE\bfseries}
\renewcommand{\chapnumfont}{\sffamily\LARGE\bfseries}
\renewcommand{\afterchapternum}{:\space}
\renewcommand{\chaptitlefont}{\sffamily\LARGE\bfseries}
}
\chapterstyle{olms}
% PAGE STYLE
\makepagestyle{olms}
\makeevenhead{olms}{\thepage}{\leftmark}{}
\makeoddhead{olms}{}{\rightmark}{\thepage}
\makepsmarks{olms}{%
\createmark{chapter}{both}{shownumber}{\@chapapp\space}{:\space}
\createmark{section}{right}{shownumber}{}{\space}
\createplainmark{toc}{both}{\contentsname}
\createplainmark{lof}{both}{\listfigurename}
\createplainmark{lot}{both}{\listtablename}
\createplainmark{bib}{both}{\bibname}
\createplainmark{index}{both}{\indexname}
\createplainmark{glossary}{both}{\glossaryname}
}
\pagestyle{olms}
\nouppercaseheads
\usepackage{lipsum}
\begin{document}
\frontmatter
\setcounter{page}{5}
\tableofcontents
\mainmatter
\chapter{First Chapter}
\lipsum[1]
\section{First section}\lipsum[3-5]
\appendix
\chapter{First Appendix}
\lipsum[1]
\section{First section}\lipsum[3-5]
\end{document}
The header on page 2 looks like this:
I'm stumped, so any help would be appreciated.
@
with a\makeatletter
...\makeatother
pair. See What do\makeatletter
and\makeatother
do?