My school requires tables of contents formatted like this -- please note the little headings, in red:

I have it almost ready, except for a pesky misalignment in the second page of the table of contents. "Chapter" gets thrown to the right.

As I prepare a minimal working example, it seems that a previous addtocontents line triggers the problem.

\documentclass[12pt,letterpaper,oneside]{book}
\usepackage{tocloft}

\usepackage[toc,page]{appendix}
\usepackage{titlesec}
\usepackage[nottoc]{tocbibind}
\usepackage{afterpage}
\usepackage{blindtext}
\usepackage{indentfirst}
\usepackage{fancyhdr}

\begin{document}

\tableofcontents

%  Is this line above the culprit? if commented, Chapter below aligns!

\chapter{Blah blah1}
\section{Basics}
\subsection{Margins}
\blindtext
\section{Blah in section}
\Blindtext
\subsection{More blah for a subsection}
\blindtext
\begin{figure}
\caption{picture}
\end{figure}
\chapter{Some Blah}
\section{One section}
\blindtext
\chapter{All}
\blindtext
\chapter{the}
\blindtext
\section{Good enough}
\blindtext
\subsection{Better}
\blindtext

% Not well aligned!

\chapter{way}
\section{Go}
\chapter{to}
\chapter{the}
\chapter{very}
\chapter{end}
\chapter{keep}
\section{keep uno}
\section{kep dos}
\chapter{going}
\chapter{more}

\end{document}


This minimal code will produce this:

Is there a way to fix that addtocontents line? or a more sensible way to do it?

If it helps, these are some lines from the .toc file:

\contentsline {subsection}{OM as city block distance}{28}
\afterpage {Chapter\hfill Page \par \vspace \medskipamount }
\contentsline {subsection}{Euclideanity of OM and Euclidean transformations}{29}
\contentsline {subsubsection}{Raw and transformed OM as Euclidean}{29}
\contentsline {subsubsection}{Low dimensional Euclidean via MDS}{32}
\contentsline {section}{Distribution of sequences and inter-sequence distances}{34}
\contentsline {subsection}{Distribution of true inter-triple and OM distances}{34}


And this is how it looks like:

\addtocontents{toc}{Chapter\hfill Page \par}
\section{Distribution of sequences and inter-sequence distances}


What a dirty thing.

You could try this approach which will certainly need some more modifications in case the ToC is more than two pages long. And perhaps there are some drawbacks which I don't see at the moment.

It uses the »atbegshi« package from the »oberdiek« bundle which allows to add the "headline" quite flexible to the next page of the ToC. If necessary, this can also be applied to the LoF an LoT.

\documentclass[11pt]{report}
\usepackage[T1]{fontenc}
\usepackage[nottoc]{tocbibind}
\usepackage{atbegshi}
\usepackage{blindtext}

\AtBeginDocument{%
\contentsline{chapter}{}{Page}%
\protect\AtBeginShipoutNext{\contentsline{chapter}{\chaptername}{Page}\vspace{\baselineskip}}%
}%
}

\begin{document}
\tableofcontents
\listoffigures
\listoftables

• @JuanZuluaga: A remote diagnosis is quite hard. So I suggest that you try to build a minimal example. Use the "build up" method, take my code as starting point and add code from your document step-by-step. Don't take too big steps, just small ones (e.g. one package or command definition after the other). Proceed this way until the problem occurs. Then you have the sample code that you can present here. Furthermore I suggest that you use the \contentsline command like I did to add the ToC entry. – Thorsten Donig Dec 11 '13 at 16:35