# How get “Section x.y” in header using \createmark with memoir?

The code

  \createmark{section}{right}{shownumber}{\@secapp}{\ }


in the following source gives error that \@secapp is undefined. I tried to use that by analogy with the use of \@chapapp in the preceding line, so as to produce, e.g.,

Section 1.1 Test section


in the odd-page header -- that is, include the word Section and not include a period after the 1.1 section number.

Question: How does one do that?

So far as I can see, the memoir docs don't speak to that.

\documentclass{memoir}
\usepackage{lipsum}

\makepagestyle{mystyle}
\makeatletter
\createmark{chapter}{left}{shownumber}{\@chapapp\ }{. \ }
\createmark{section}{right}{shownumber}{\@secapp}{\ }
}
\makeatother

\pagestyle{mystyle}

\begin{document}

\chapter{Test Chapter}
\lipsum[1]

\section{Test Section}
\lipsum[1-20]

\end{document}


\createmark{section}{right}{shownumber}{\@secapp}{\ }

\createmark{section}{right}{shownumber}{Section }{\ }

You tried a \@secapp to imitate \@chapapp, but the \@chapapp is special in that its value will change whether or not an Appendix is being set or a normal Chapter; it is an internal LaTeX macro. There is no need for such convolutions for Sections.