# Chapters without dots in ToC

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}

\begin{document}

\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?

• Why exactly do you want this? You'd have to add it inside the .toc file it self in order to remove it, and then once more to add it again afterwards. Wouldn't it look odd with a varying design? – daleif Jan 9 '15 at 16:29
• In the work I've done almost every Chapter is immediately followed by a section: the page of the section and of the chapter are the same. So when a chapter has no sections I would like to have at least a page number on the right (also without dots). So you say that is the only way to achieve this? – W4cc0 Jan 9 '15 at 16:39

Just put the toggles \addtocontents{toc}{\cftpagenumbersoff{chapter}} and \addtocontents{toc}{\cftpagenumberson{chapter}} when and where you need it.

\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}

\begin{document}

\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}

\chapter{Test Chapter Three}
\section{Section Three One}
\section{Section Three Two}

\end{document}


And if for some reason you wanted the page number, but not the dots, for a single entry, try this:

\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}

\begin{document}

\tableofcontents

\chapter{Test Chapter One}

\index{arte}
\section{Section One One}
\section{Section One Two}