I've used this code
\addtocontents{toc}{\cftpagenumbersoff{chapter}}
to remove the dots and page numbers after the entries in my ToC for all chapters. Is there a way to do this just for an arbitrary chapter?
The following is essentially the code I have.
\documentclass[twoside,openright, titlepage,numbers=noenddot, headinclude, %openany openright oneside twoside
footinclude=true,cleardoublepage=empty, abstractoff,
BCOR=5mm,paper=a4,fontsize=11pt,%11pt,a4paper,
ngerman,american
]{scrreprt}
\usepackage{tocloft}
\addtocontents{toc}{\cftpagenumbersoff{chapter}}
\begin{document}
\renewcommand{\cftchapleader}{\cftdotfill{\cftdotsep}}
\renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}}
\tableofcontents
\chapter{Test Chapter One}
\index{arte}
\section{Section One One}
\section{Section One Two}
\chapter{Test Chapter Two}
\section{Section Two One}
\section{Section Two Two}
\end{document}
The result is this
What I want is, for instance, only Test Chapter Two with dots after the title.
In particular is there a way to make the dots appear when the chapter has no sections?
Best Answer
Just put the toggles
\addtocontents{toc}{\cftpagenumbersoff{chapter}}
and\addtocontents{toc}{\cftpagenumberson{chapter}}
when and where you need it.And if for some reason you wanted the page number, but not the dots, for a single entry, try this: