2

I am new to latex and I am using memoir package to generate the TOC. I need to remove the highlighted part in the below TOC image. I just want it as CHAPTER and want to remove the dots and the page number.

This is the code in my .sty file ---

%%%% Do the ToC
\let\oldtoc\tableofcontents
\renewcommand{\tableofcontents}{\clearpage\pagestyle{toc}\oldtoc}

 \renewcommand{\contentsname}{TABLE OF CONTENTS}
 \renewcommand{\listfigurename}{LIST OF FIGURES}
 \renewcommand{\listtablename}{LIST OF TABLES}
 \renewcommand*{\tocheadstart}{\vspace*{-\topfiddle}}
 \renewcommand*{\aftertoctitle}{\thispagestyle{plain}%
 \par\nobreak \mbox{}\hfill{\normalfont Page}\par\nobreak}
 \renewcommand*{\cftchapterfont}{\normalfont}
 \renewcommand*{\cftchapterpagefont}{\normalfont}
 \renewcommand*{\cftchapterleader}{
 % \cftchapterfont\cftdotfill{\cftchapterdotsep}}
 \renewcommand*{\cftchapterdotsep}{\cftdotsep}
 %\renewcommand*{\cftchaptername}{CHAPTER~}
 %%% no extra space before the entry
 \setlength{\cftbeforechapterskip}{0pt plus 0pt}
 %% no extra 'chapter' space in LoF/LoT
 \renewcommand*{\insertchapterspace}{}

Can you please help me out with this?

enter image description here

3
  • Please, take a look at tex.stackexchange.com/questions/33673/…
    – user13907
    Commented Jul 12, 2013 at 16:20
  • I tried that but I need to remove the dots only for "Chapter" .. If I use \renewcommand*{\cftchapterleader}{\hfill} then the dots for all the "List of tables" and "List of Figures" also disapper...
    – Fox
    Commented Jul 12, 2013 at 16:22
  • You can try with \addtocontents{toc}{\unexpanded{\renewcommand{\cftchapterleader}{\hfill}}} just after \listoffigures. A real minimal example would be better.
    – egreg
    Commented Jul 12, 2013 at 16:26

1 Answer 1

2

This is a proof of concept:

\documentclass{memoir}

\renewcommand\cftchapterdotsep{\cftdotsep}

\begin{document}
\frontmatter
\tableofcontents*
\listoftables
\listoffigures

\addtocontents{toc}{%
  \unexpanded{\unexpanded{\renewcommand{\cftchapterdotsep}{\cftnodots}}}%
}

\mainmatter
\chapter{One}

\end{document}

The double \unexpanded is needed because the argument goes written twice.

enter image description here

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