3

In the following MWE, I only want the chapter titles in the TOC numbered. But using \setsecnumdepth{chapter} messes up indentation of long section headings.

\documentclass{memoir}

\setrmarg{3.55em plus 1fil}
\setsecnumdepth{chapter}


\newcommand*{\sometext}{%
  Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit,
  vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida
  mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna.
  Donec vehicula augue eu neque.%
}

\begin{document}

\tableofcontents

\chapter{\sometext}

\section{\sometext}

\end{document}

enter image description here

1 Answer 1

2

You can use \cftsetindents to have the desired indentation; in the example below I used

\cftsetindents{section}{2.5em}{0em}

but adjust the settings according to your needs.

\documentclass{memoir}

\setrmarg{3.55em plus 1fil}
\setsecnumdepth{chapter}
\cftsetindents{section}{2.5em}{0em}

\newcommand*{\sometext}{%
  Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit,
  vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida
  mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna.
  Donec vehicula augue eu neque.%
}

\begin{document}

\tableofcontents

\chapter{\sometext}

\section{\sometext}

\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .