I am compiling a LaTeX file with 10 chapters and a table of contents. I have added the following in the first page.
But why is the table of contents still missing?
\pdfbookmark[1]{TABLE OF CONTENTS}{table}
\tableofcontents
\addtocontents{toc}{\def\protect\@chapapp{}} \cleardoublepage \phantomsection
\addcontentsline{toc}{chapter}{LIST OF TABLES}
\listoftables
\cleardoublepage \phantomsection \addcontentsline{toc}{chapter}{LIST OF FIGURES}
\listoffigures
% Comment out the next line if NOT using chaptertitle
\addtocontents{toc}{\def\protect\@chapapp{CHAPTER\ }}
This is the output of .toc file: All section titles are there.
\def \@chapapp {}
\contentsline {chapter}{LIST OF TABLES}{iv}{section*.3}
\contentsline {chapter}{LIST OF FIGURES}{v}{section*.5}
\def \@chapapp {CHAPTER\ }
\def \@chapapp {}
\contentsline {chapter}{ACKNOWLEDGEMENTS}{vi}{section*.7}
\def \@chapapp {CHAPTER\ }
\def \@chapapp {}
\contentsline {chapter}{ABSTRACT}{vii}{section*.8}
\def \@chapapp {CHAPTER\ }
\contentsline {chapter}{\numberline {1.}Introduction }{1}{chapter.9}
\contentsline {section}{\numberline {1.1}Network flow problems}{1}{section.10}
\contentsline {section}{\numberline {1.2}Classical Linear network flow problems (LNF)}{1}
{section.11}
\contentsline {section}{\numberline {1.3}{A LNF problem formulation } }{2}{section.12}
\contentsline {section}{\numberline {1.4}Capacity expansion multi-commodity network flow
(CEMNF) Problems formulation}{3}{section.15}
\contentsline {section}{\numberline {1.5}Linear programming optimization method}{7}{section.19}
\contentsline {section}{\numberline {1.6}High performance computing for linear programming models}{7}{section.20}
.................
This is the output of .aux
\relax
\bibstyle{apa}
\ifx\hyper@anchor\@undefined
\global \let \oldcontentsline\contentsline
\gdef \contentsline#1#2#3#4{\oldcontentsline{#1}{#2}{#3}}
\global \let \oldnewlabel\newlabel
\gdef \newlabel#1#2{\newlabelxx{#1}#2}
\gdef \newlabelxx#1#2#3#4#5#6{\oldnewlabel{#1}{{#2}{#3}}}
\AtEndDocument{\let \contentsline\oldcontentsline
\let \newlabel\oldnewlabel}
\else
\global \let \hyper@last\relax
\fi
\@input{Preface/titlepage.aux}
\@input{Preface/dedication.aux}
\@writefile{toc}{\def \@chapapp{}}
\@writefile{toc}{\contentsline {chapter}{LIST OF TABLES}{iv}{section*.3}}
\@writefile{toc}{\contentsline {chapter}{LIST OF FIGURES}{v}{section*.5}}
\@writefile{toc}{\def \@chapapp{CHAPTER\ }}
\@input{Preface/acknowl.aux}
\@input{Preface/abstract.aux}
\@input{Body/chapter1.aux}
\@input{Body/chapter2.aux}
\@input{Body/chapter3.aux}
\@input{Body/chapter4.aux}
\@input{Body/chapter5.aux}
\@input{Body/chapter6.aux}
\@input{Body/chapter7.aux}
\@input{Body/chapter8.aux}
\@input{Body/chapter9.aux}
\@input{Body/chapter10.aux}
\@input{Appendix/appendix1.aux}
\@input{Reference/bibtex.aux}
\@input{Images.aux}
\global\NAT@numberstrue
Is there something wrong?
\addcontentslinecommands indicates a broken design (e.g. wrong choice or use of class). – Ulrike Fischer Feb 2 '12 at 19:12.tocand.auxfiles as well. – tohecz Feb 3 '12 at 10:10