3

I'm trying to simply add a table of contents to my report using TeXStudio by using the following command after the abstract:

\tableofcontents

This creates a heading Table of Contents but it doesn't list the sections only the title of the report.

My headings are as follows: Intro,Lit Review,Methodology,Conclusion.

Does anyone have any idea how to remedy this?

This is the skeleton of the template with content removed:

%%%%%%%%%%%%%%%%%%%%%%% file typeinst.tex %%%%%%%%%%%%%%%%%%%%%%%%%
%
% This is the LaTeX source for the instructions to authors using
% the LaTeX document class 'llncs.cls' for contributions to
% the Lecture Notes in Computer Sciences series.
% http://www.springer.com/lncs       Springer Heidelberg 2006/05/04
%
% It may be used as a template for your own input - copy it
% to a new file with a new name and use it as the basis
% for your article.
%
% NB: the document class 'llncs' has its own and detailed documentation, see
% ftp://ftp.springer.de/data/pubftp/pub/tex/latex/llncs/latex2e/llncsdoc.pdf
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\documentclass[runningheads,a4paper]{llncs}


\usepackage{url}
\usepackage{paralist}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage[numbers]{natbib}
\graphicspath{ {images/} }

\urldef{\mailsa}\path|{firstname.lastname}@xxx.ie|

\begin{document}

\mainmatter  % start of an individual contribution

\title{Final Year Project Report}

\subtitle{xxxxxxxxxxxxxxxxxxxxxxxx }


\author{Brian Varley \inst{1}
}
%
\institute{xxxxxxx Institute of Technology, Ireland\\
\url{http://www.xxx.ie}\\
}

\maketitle


\begin{abstract}



\end{abstract}

\smallskip
\noindent \textbf{Keywords.} 



\tableofcontents




\section{Project Introduction}



\begin{itemize}
  \item 
  \item 
  \item 
\end{itemize}


\begin{figure}
\centering
\begin{minipage}{.5\textwidth}
  \centering
  \includegraphics[width=.4\linewidth]{myo}
  \caption{figure}{Thalmic Lab's Myo arm band}
  \label{fig:test1}
\end{minipage}%
\begin{minipage}{.5\textwidth}
  \centering
  \includegraphics[width=.4\linewidth]{kinect}
  \caption{figure}{Microsoft Kinect V2 Sensor}
  \label{fig:test2}
\end{minipage}
\end{figure}


Kinect v2 sensor capabilities:

\begin{itemize}
  \item 
  \item 

\end{itemize}



The proposed application's core features are outlined as follows in order of precedence: 
\begin{itemize}
  \item 
  \item 
  \item 
\end{itemize} 






\begin{figure}[h]
\caption{ Proposed physio application prototype system architecture, detailing flow of user input.}
\centering
\includegraphics[width=1\textwidth]{gesture_arc}
\end{figure}


\





\section{Literature Review}





\section{Methodology}
\label{sec:Applications of Vision Based Gesture Recognition in HCI} 




\begin{figure}[h]
\caption{ Proposed project time line.}
\centering
\includegraphics[width=1\textwidth]{initial_timieline}
\end{figure}



\section{Conclusion}




\section{Appendices}


\listoffigures



\bibliographystyle{plainnat}
\bibliography{Bibliography}



\end{document}

table contents incorrect headings

The declaration in the report:

  • 3
    Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – Mike Renfro Dec 7 '14 at 16:38
  • 6
    To be more explicit, there's nothing in the code you posted that indicates what's going wrong. A simple test would be to replace whatever template you're likely using with \documentclass{article} \begin{document} \tableofcontents \section{Project Introduction} ... \end{document}. That will almost certainly work, indicating a problem in your template or preamble. – Mike Renfro Dec 7 '14 at 16:40
  • 3
    Note that you must compile twice to see the entries in the ToC. If you only compile once - or if you remove generated files between compilations - the ToC will be empty. – cfr Dec 7 '14 at 16:55
  • I compiled twice but the contents of the table is still just the title of my report. I'll re edit my question to include the above revisions. – Brian J Dec 7 '14 at 17:51
  • @cfr using llncs class you could run latex 1000 times and still have truncated table of content. It's a feature:-0 – David Carlisle Dec 7 '14 at 23:05
3

the llncs class has lots of interesting feature, unless publishing in LLNCS, it's probably not really the class I would choose.

Here it sets

  \setcounter{tocdepth}{0}

so you might want to add

  \setcounter{tocdepth}{3}

to your preamble so that your table of contents has some content.

  • I tried the above solution by adding the lie \setcounter{tocdepth}{3} under the line that declares the table of contents. But the table stays the same, only show the report title as a heading. – Brian J Dec 7 '14 at 23:43
  • @BrianJ The answer says to add it to your preamble. Did you try that? – cfr Dec 7 '14 at 23:48
  • 1
    @BrianJ why add it there after the truncated table of contents has already been printed? Put it before \begin{document} as in the answer posted above. – David Carlisle Dec 7 '14 at 23:52
  • Okay thanks for clarifying, I didn't know what the preamble was. Added it to the preamble now its working. – Brian J Dec 8 '14 at 0:03

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.