I have a main document referring to four files and want to create a ToC with the titles of these four files as well as their structure.

Here`s a MWE for my main file:

\documentclass[a4paper, 12pt, english]{article}



\renewcommand{\contentsname}{Table of Contents}



and here is an MWE for my included files, all similar:

{\bfseries Title} 
\section{Conceptual Foundations}
\subsection{Topic A}

I`d like my ToC to look like:

Title file 1

Section file 1

Subsection File 1

Title file 2


Currently I have the problem that the titles are not shown since they have not been labeled as a section (I haven`t done that because I want them to appear as unnumbered titles and the following sections/subsections within the file to appear as section/subsection and not a level lower). The second problem is that the sections after the first file are not numbered but labelled with letters "A", "B", etc - I have an appendix in the first file, not sure whether that influences the rest.

  • 1
    Why are you doing it this way? Use the report class instead of article and make each paper a \chapter{} instead of hand formatting the titles. Then they will appear in the TOC automatically. You can use titlesec to format the chapter titles the way you want.
    – Alan Munn
    Jan 11, 2016 at 16:50
  • fair enough, that works fine - I guess I can get rid of "Chapter 1" in each title. However, the problem with the numbering still persists - Chaptr 2 is now not Chapter 2, but Chapter A. The reason why I was not using chapter for the titles was that I want a line break within each title itself, e.g. Paper 1 Title of paper 1
    – latexQ
    Jan 11, 2016 at 16:55
  • 1
    @latexQ: Most likely you have some \renewcommand{\thechapter} somewhere that uses A instead of a number
    – user31729
    Jan 11, 2016 at 16:58
  • @latexQ: By the way, I answered a question recently about including external toc from other documents: tex.stackexchange.com/questions/262977/…
    – user31729
    Jan 11, 2016 at 16:59

1 Answer 1


Here's a sample document to get you started. I've used titlesec to format the chapter headings and the appendix package to make use of its {subappendices} environment. The reason your chapters are mislabeled is that the default \appendix command turns \chapter level headings into appendices. Since you want per chapter appendices you need to make appendices as section level elements. So you need to remove the \appendix commands from your included documents and then enclose the appendix sections in the {subappendices} environment.


\chapter{Paper title one}
\section{A section}
\subsection{A subsection}
\section{A chapter appendix}
\section{Another chapter appendix}
\chapter{Paper title two}
\section{A section}
\section{An appendix}

output of code

  • Ok, now I understand where the problem was - thank you, it works just as expected!
    – latexQ
    Jan 12, 2016 at 8:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .