3

I am using memoir and trying to hide chapter numbering in the table of contents ONLY. I wish to keep it in the \mainmatter
right now I am using \chapter[Chapter 1]{} to keep the "Chapter 1" text hidden at the start of each chapter but keep the -1- numbering. And "Chapter 1" text is in the table of contents as well.

I would like to keep this as is, but hide the 1 2 3 4 in the table of contents. Right now I have 1 Chapter 1 2 2 Chapter 2 5 3 Chapter 3 15 4 Chapter 4 23 which is a bit redundant. Therefore I would like to remove the chapter numbers at the very start of each line before the word "Chapter". Other packages I am using are:

\usepackage{palatino}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage{textcomp}
\usepackage{nextpage}

I have heard that the package etoc might be able to do this, but so far I have been unable to get it to do what I want. I either hide every chapter from the table of contents or it hides the numbers from both the TOC and the chapters themselves.

Here is my MWE

\documentclass[statementpaper,11pt,openany,twoside,extrafontsizes,final]{memoir}
\usepackage{palatino}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage{textcomp}
\usepackage{nextpage}
\chapterstyle{dash}
\pagestyle{plain}
\begin{document}
\frontmatter
\tableofcontents
\mainmatter
\newpage\null\thispagestyle{empty}\newpage
\chapter[Chapter 1]{}
All characters in this publication are fictitious and any resemblance to real persons, living or dead, is purely coincidental.\par
\end{document}
1
  • Apparently, the markdown force is not really strong in you, DarthNewton ;-) Please use backticks to mark code as such ;-)
    – user31729
    Commented Apr 9, 2016 at 21:18

1 Answer 1

3

The easiest way is to 'gooble' the chapter number away with

\def\cftchapterpresnum #1\@cftasnum{}

In addition, I suggest to reduce the chapter indent to 0pt as well as the numwidth.

\cftsetindents{chapter}{0pt}{0pt}

Here's the file:

\documentclass[statementpaper,11pt,openany,twoside,extrafontsizes,final]{memoir}
\usepackage{palatino}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage{textcomp}
\usepackage{nextpage}
\chapterstyle{dash}
\pagestyle{plain}
\makeatletter
\def\cftchapterpresnum #1\@cftasnum{}
\cftsetindents{chapter}{0pt}{0pt}
\makeatother

\begin{document}

\frontmatter

\tableofcontents
\mainmatter
\newpage\null\thispagestyle{empty}\newpage

\chapter{Chapter 1}
All characters in this publication are fictitious and any resemblance to real persons, living or dead, is purely coincidental.\par
\end{document}

enter image description here

4
  • 1
    Wonderful! Just what I was looking for. Knew I was missing something and there had to be a easier way. One question: is there a reason you have \cftsetindents{chapter}{0pt}{0pt} in the example twice? I tested and it seemed to work fine with the first one above document class omitted from my document. Commented Apr 12, 2016 at 2:12
  • @DarthNewton: Oh, there was a mistake actually: The first \cftsetindents was just a short explanation, but I forgot to use normal text as a clear separation from the MWE.
    – user31729
    Commented Apr 12, 2016 at 6:46
  • Ahh ok. No problem easy to do (I have certainly made my share). Thanks! Commented Apr 20, 2016 at 6:06
  • @DarthNewton: You're welcome! Happy TeXing!
    – user31729
    Commented Apr 20, 2016 at 6:20

You must log in to answer this question.

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