Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

This question already has an answer here:

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

share|improve this question
    
Please, take a look at tex.stackexchange.com/questions/33673/… –  Papiro Jul 12 '13 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 Jul 12 '13 at 16:22
    
You can try with \addtocontents{toc}{\unexpanded{\renewcommand{\cftchapterleader}{\hfill}}} just after \listoffigures. A real minimal example would be better. –  egreg Jul 12 '13 at 16:26
add comment

marked as duplicate by Werner, Kurt, Xavier, Marco Daniel, T. Verron Jul 12 '13 at 19:05

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer

up vote 2 down vote accepted

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

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.