I'm using the Subfiles package to compile a relatively large document in smaller steps. Each subfile is actually a chapter of the document. I would like to have a ToC in each chapter (in addition to the general ToC). I've used the lines
% !TEX encoding = IsoLatin9
\documentclass[./main.tex]{subfiles}
\begin{document}
\tableofcontents
\let\tableofcontents\relax
\chapter{My first chapter}
...
in a chapter, and I obtain indeed a ToC for the chapter, but it is placed after a header "Contents" and before the title of the chapter. Moreover, the ("Contents" + ToC) is placed in a different page with respect to the title of the chapter. I would like to obtain:
- Title of the chapter ("My first chapter" in the above example)
- ToC of the chapter (if possible, without the heading "Contents")
- beginning of the text of the chapter in this order and all on the same page. Is that possible?



