0

This question already has an answer here:

I have divided my tex files as follows:

.
├── content
│   ├── abstract.tex
│   ├── mainA
│   │   └── a.tex
│   ├── mainB.tex
│   ├── mainC.tex
│   └── MainD
│       ├── d.tex
│       └── dd.tex
├── main.tex

In my main.tex file, I include all these files.

My \tableofcontents just outputs one line with title. What am I missing? Below is my MWP.

\documentclass[runningheads]{llncs}

\begin{document}
\title{How fancy can the title be}

\maketitle
\tableofcontents

\input{content/mainA/a.tex}
\input{content/mainB.tex}
\input{content/mainC.tex}
\input{content/mainD/d.tex}
\input{content/mainD/dd.tex}


\bibliography{references}}

\end{document}

marked as duplicate by esdd, siracusa, Phelype Oleinik, Stefan Pinnow, David Carlisle Jun 28 at 15:10

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    You need to have main.tex compiled several times without having auxiliary files (.aux, .toc, etc) deleted between the single compilation-runs. – Ulrich Diez Jun 28 at 13:02
  • 1
    did you compile twice? – Ulrike Fischer Jun 28 at 13:02
  • I did. It didn't do anything better – kingmakerking Jun 28 at 13:05
  • Then deliver a minimal (non-)working example which the reader can copy and compile as is for reproducing the erroneous behavior. By the way: In the subject-line you write \input, in text of the question you write include. Do you use plain TeX? Do you use LaTeX? If LaTeX: Is there some \includeonly-directive which prevents other files than the one containing the \tableofcontents-command from being processed/included? If so, these other files will not contribute to the table of contents, and from time to time you need to compile without the \includeonly-directive... – Ulrich Diez Jun 28 at 13:09
  • 2
    the file structure and \input are unrelated to \tableofcontents so if you have an error in the table of contents you need to show some example code. – David Carlisle Jun 28 at 13:10