# memoir: sections as chapters, reference numbering

In the following example, I've hacked the numbering of sections in the memoir class so that I can use "sections" as "chapters". This makes them show up nicely in the table of contents. However, numbering for \label and \ref is off by one. Can this be fixed without massively revising my code?

\documentclass[article, a4paper, 12pt, oneside]{memoir}

\setlrmarginsandblock{23mm}{63mm}{*}
\setulmarginsandblock{23mm}{28mm}{*}
\chapterstyle{plain}
\checkandfixthelayout

\renewcommand*\thesection{\arabic{chapter}}

\begin{document}

\tableofcontents

\section{Introduction} \label{beginning}
Beginning.  Just wait til you see the end, that's in Chapter \ref{end}.

\section{Conclusion} \label{end}
End.  Hopefully you read the beginning! (Chapter \ref{beginning})

\end{document}


-
If ones goal is to make chapters look like sections, one could use \chapterstyle{section}. – teelf Dec 6 '14 at 15:05

There's no need to play with counters. If you have to "promote" only sections, the following will work:

\documentclass[article, a4paper, 12pt, oneside]{memoir}

\setlrmarginsandblock{23mm}{63mm}{*}
\setulmarginsandblock{23mm}{28mm}{*}
% \chapterstyle{plain} % needed?
\checkandfixthelayout

\renewcommand{\thesection}{\arabic{section}}
\makeatletter
\let\l@section\l@chapter
\makeatother

\begin{document}

\tableofcontents

\section{Introduction} \label{beginning}
Beginning.  Just wait til you see the end, that's in Chapter \ref{end}.

\section{Conclusion} \label{end}
End.  Hopefully you read the beginning! (Chapter \ref{beginning})

\end{document}


If you have to promote also subsections, then

\renewcommand{\thesection}{\arabic{section}}
\renewcommand{\thesubsection}{\thesection.\arabic{subsection}}
\makeatletter
\let\l@subsection\l@section
\let\l@section\l@chapter
\makeatother


The strategy is to use for an entry in the table of contents the setting for the upper level (so we have to work from bottom up). The macro

\l@<sectional unit>


Of course \tableofcontents* should be used, in order to avoid that the table of contents is listed in itself, which makes little sense anyway.

-

If you only want to change the formatting for the chapter entries in the ToC, memoir offers you built-in commands to easily do so without redefining counters, nor changing the "natural" meaning of the sectional units:

\documentclass[article, a4paper, 12pt, oneside]{memoir}

\setlrmarginsandblock{23mm}{63mm}{*}
\setulmarginsandblock{23mm}{28mm}{*}
\chapterstyle{plain}
\checkandfixthelayout

\cftsetindents{chapter}{1.5em}{2.3em}
\renewcommand\cftchapterfont{\normalfont}
\renewcommand\cftchapterpagefont{\normalfont}
\renewcommand\cftchapterafterpnum{\par\vskip-10pt}

\begin{document}

\tableofcontents*

\chapter{Introduction} \label{beginning}
Beginning.  Just wait til you see the end, that's in Chapter \ref{end}.

\chapter{Conclusion} \label{end}
End.  Hopefully you read the beginning! (Chapter \ref{beginning})

\end{document}


-
Hi Gonzalo: This seems for all intents and purposes a "better" answer than the one from egreg, but I'm going to mark his answer as "accepted", since after trying yours, it seemed I would need to do further configuration to get the TOC to look right, whereas his solution "just works". Despite changing the look of the TOC, it looks good without any tweaking. Also, I don't have to rewrite the \section etc. commands in my document. But thank you for the answer, I'll likely use this next time! – Joe Corneli Oct 14 '12 at 13:17