I am having some difficulty in aligning the multiline chapter title in ToC.
There is an extra space after Chapter 1:
What I do not want is that extra space. Also, all multiline chapters, sections, and subsections in ToC should be aligned properly, i.e. second, third (so on) lines should align exactly like first line (after removing the space in the first line). In my case, second and third line are aligned properly, but not the first line. Please note that there is an extra space in Appendices (after :) too which I do not need either.
Any of your help is much appreciated.
I am using the below code to achieve (in USC-Thesis class file) ToC settings:
\newlength\mylenprt %part
\newlength\mylenchp %chp
\newlength\mylenapp %app
\newlength\mylena %fig
\newlength\mylenb %tab
\renewcommand\cftpartpresnum{\partname~}
\renewcommand\cftchappresnum{\chaptername~}
\renewcommand\cftfigpresnum{\figurename~}
\renewcommand\cfttabpresnum{\tablename~}
\renewcommand\cftchapaftersnum{:}
\renewcommand{\cftfigaftersnum}{:}
\renewcommand{\cfttabaftersnum}{:}
\settowidth\mylenprt{\cftpartfont\cftpartpresnum\cftpartaftersnum}
\settowidth\mylenchp{\cftchapfont\cftchappresnum\cftchapaftersnum}
\settowidth\mylenapp{\cftchapfont\appendixname~\cftchapaftersnum}
\settowidth\mylena{\cftfigfont\figurename~\cftfigaftersnum}
\settowidth\mylenb{\cfttabfont\tablename~\cfttabaftersnum}
\addtolength\mylenprt{\cftpartnumwidth}
\addtolength\mylenchp{\cftchapnumwidth}
\addtolength\mylenapp{\cftchapnumwidth}
\addtolength\cftfignumwidth{\mylena}
\addtolength\cfttabnumwidth{\mylenb}
\setlength\cftpartnumwidth{\mylenprt}
\setlength\cftchapnumwidth{\mylenchp}
\setlength\cftbeforefigskip{30pt}
Below is my minimal example:
\documentclass[final]{USC-Thesis}
\usepackage[titles]{tocloft}
\usepackage[lofdepth,lotdepth]{subfig}
\usepackage{appendix} %[titletoc]
\renewcommand{\cftchapfont}{
\bfseries %\normalfont
}
\renewcommand{\cftchappagefont}{%
\bfseries %\normalfont
}
\begin{document}
\renewcommand{\contentsname}{Table of Contents}
\tableofcontents
\mainmatter
\chapter{This is a super long chapter heading that requires more than one
line in the Table of Contents. It can go more than 3 lines.}
\section{Section I}
\subsection{This is a super long chapter heading that requires more than one
line in the Table of Contents. It can go more than 3 lines Section II}
\subsection{Section III}
\subsubsection{Subsection I}
\appendix
\addtocontents{toc}{% NB!!! must be inside the first \include
\protect\renewcommand\protect\cftchappresnum{\appendixname~}%
\protect\setlength{\cftchapnumwidth}{\mylenapp} \protect\newpage
}%
\noappendicestocpagenum
\addappheadtotoc
\chapter{Some title 1}
\chapter{Some title 2}
\chapter{Some title 3}
\end{document}
USC_Thesis.cls
available online?.cls
file from your link. I clicked on the link which got me somewhere in dropbox showing what looked like a.cls
file in Firefox. I then clicked onSave page as ...
and got a copy of the file. When I looked at it usingemacs
it consisted of a mess of HTML. All I want is a plain text version ofUSC-Thesis.cls
that I can use to try and help with your problem. What should I have done [GOM]?