The class file I'm using has this code inside the Table of Contents section. The problem with it is it doesn't conform to the university thesis requirements that the sections be indented inside the Table of Contents. For example I would like the Table of Contents to look more like this example:

Format ToC for thesis

Everything else is okay except for this indentation issue. I was wondering if I could get some help changing this code to fix this issue.

So here is my code which I have also pasted at this link here


%  In thesis class, \tableofcontents, \listoffigures, etc. are always
%  set in single-column style.  @restonecol

  \fi\chapter*{\bf Table of Contents\@mkboth{}{}\addcontentsline{toc}{chapter}{Table of Contents}}
 \@starttoc{toc}\if@restonecol\twocolumn\fi} %added \bf to print Table of Contents in bold on pg 2006nm

   \addvspace{2.25em plus 1pt}  % space above part line
   \@tempdima 3em         % width of box holding part number, used by
     \parindent \z@ \rightskip \@pnumwidth             %% \numberline
     \parfillskip -\@pnumwidth
     {%\large \bfseries          % set line in \large boldface 2006nm
     \leavevmode          % TeX command to enter horizontal mode.
     #1\hfil \hbox to\@pnumwidth{\hss #2}}\par
     \nobreak             % Never break after part entry

   \vskip 1.0em plus 1pt  % space above chapter line
   \@tempdima 1.5em       % width of box holding chapter number
     \parindent \z@ \rightskip \@pnumwidth
     \parfillskip -\@pnumwidth
     %\bfseries                  % Boldface removed. 2006nm
     \leavevmode          % TeX command to enter horizontal mode.
     #1\hfil \hbox to\@pnumwidth{\hss #2}\par

\def\l@chapter{\@dottedtocline{0}{1.5em}{2.3em}}  %added this line 2006nm
\def\l@section{\@dottedtocline{1}{1.5em}{2.3em}} %changed 1 to 0 2006nm

  \fi\chapter*{\bf{List of Figures and Illustrations}\markboth
   {}{}\addcontentsline{toc}{chapter}{List of Figures}}%(NM 2005 added List of Figures to TOC)


  \fi\chapter*{\bf{List of Tables}\markboth
   {}{}\addcontentsline{toc}{chapter}{List of Tables}}%(NM 2005 added List of Tables to TOC)


% List of Symbols, Abbreviations and Nomenclature
\def\listofsymbols{\input{symbols} \clearpage}
\def\addsymbol #1: #2{$#1$ \> \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \   \parbox{5in}{#2}\\}

%    ****************************************
%    *             BIBLIOGRAPHY             *
%    ****************************************
% The thebibliography environment executes the following commands:
%  \def\newblock{\hskip .11em plus .33em minus -.07em} --
%      Defines the `closed' format, where the blocks (major units of
%      information) of an entry run together.
%  \sloppy  -- Used because it's rather hard to do line breaks in
%      bibliographies,
%  \sfcode`\.=1000\relax --
%      Causes a `.' (period) not toproduce an end-of-sentence space.

    \def\newblock{\hskip .11em plus .33em minus -.07em}


% \def\@biblabel#1{[#1]\hfill}  % Produces the label for a \bibitem[...]
                                % command.
% \def\@cite#1{[#1]}            % Produces the output of the \cite command.

Control horizontal spacing in the TOC entries:


The first argument (with 1, 2, and 3) indicates section (1), subsection (2) or subsubsection (3). The second argument indicates the indent from the left and the third the separation between the number and the text.

If you want to modify them directly in a class file, then no need to wrap the commands with \makeatletter ... \makeatother

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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