I don't want the chapter number in the section headings:
That can be achieved by \counterwithout{section}{chapter}
, which works fine as long as one doesn't have more than one chapter at a time:
Because then the section counter also doesn't get reset in the next chapter, which of course is also odd.
Now I found two solutions for that, both redefining \thesection
, see the following example:
\documentclass{memoir}
%\counterwithout{section}{chapter} %remove chapter number from headings
%\renewcommand*\thesection{\arabic{section}}
\makeatletter
\renewcommand*{\thesection}{\@arabic\c@section}
\makeatother
\begin{document}
\chapter{First chapter}
\section{First section in first chapter}
\chapter{Second chapter}
\section{First section in second chapter}
\end{document}
Commented out line 3 seemed to work, but looking at memoir.cls
I saw the definition of \thesection
differed, so I adapted it and it also seems to work, but I'm not sure if it doesn't have any side effects, or if there would be a better way of doing it.
Also so far (before glueing my chapters together) I had used the \counterwithout
approach. If I don't do that anymore, would I get chapter numbers appearing in other places other than the section headings? Or will that be taken care of by the redefinition of \thesection
?
Best Answer
Using
is similar to
so use the former. Sectional numbering is defined recursively by default, meaning that if its removed from
\section
, it'll be removed from\subsection
,\subsubsection
, ...However, the chapter number may show elsewhere still, like in the captions of floats (like figure and table), since that's the default setting for
memoir
.