Is there a way to avoid having duplicate sections in the Table of Contents?
At the moment, I need to add a bunch of section tags in my master file. I would prefer to have the section tags in the multiple .tex files. Then simple add a bunch of include commands, and if two consecutive sections have the same name, latex would ignore the section commands.
Here's my code:
Code: Select all
\tableofcontents
\clearpage
\section*{Charles Darwin}
\addcontentsline{toc}{section}{Charles Darwin}
\input{Darwin-origine-chap4}
\input{Darwin-descendance}
\clearpage
\section*{René Descartes}
\addcontentsline{toc}{section}{René Descartes}
\input{Descartes-methode}
\input{Descartes-meditations}
\clearpage
Except I want to be able to just use a couple of includes. I tried putting the section tags inside the different .tex files, but then I get duplicate entries in the ToC.
Any idea how I can make the script "understand" that it's the same section title and ignore the subsequent section commands until a different section title is given?