# Removing Part Page & including bibliography leads to wrong arrangement in TOC [duplicate]

This question already has an answer here:

I have encountered a weird problem (in my eyes) to do with bibliographys in included chapters and the structure of a document and I just cannot find out whats the cause...

In the final document, I want to include a table of contents structured as follows:

I would like NOT to have the page for stating "PART 1 - Introduction", which I want to exclude using this command:

 \renewcommand{\part}[1]{\addcontentsline{toc}{part}{#1}}


However, if I include this into my document, I end up with the following TOC:

--> The "Introduction" part moves to the bottom of the TOC

I have already figured out using a MWE, that it has something to do with including the bibliography inside a chapter that I am including, as a MWE with the bibliography in the main file was fine as well as including a chapter without a bibliography was fine - but the combination of those somehow triggers this?

This works:

\documentclass{book}

\usepackage{lipsum}

\begin{document}

\tableofcontents
\cleardoublepage

\part{Introduction}
%\include{MWE_Chapter}
This is just a test and a citation \citep{Carmichael2008} -

\section{Hey ho Lets go}
\lipsum

\bibliographystyle{jneurosci} %apalike, abbrv
\bibliography{library}

\end{document}


This doesn't:

\documentclass{book}

\usepackage{lipsum}

\begin{document}

\tableofcontents
\cleardoublepage

\part{Introduction}
\include{MWE_Chapter}

\end{document}


with MWE_Chapter being:

\chapter{Wabbadabbadupdup} % (fold)
This is just a test and a citation \citep{Carmichael2008} -

\section{Hey ho Lets go}
\lipsum

\bibliographystyle{jneurosci} %apalike, abbrv
\bibliography{library}


I would really like to know what causes this behavior and if someone can reproduce it? Or if there is another possibility to remove the pages created by the \part syntax without changing the TOC! Thanks!

The same by the way happens if I use

\addcontentsline{toc}{part}{<Header of the part>}


instead of the renewcommand to remove the part page

## marked as duplicate by barbara beeton, marmot, Henri Menke, Stefan Pinnow, CircumscribeDec 23 '18 at 8:10

• By your definition of \part you will not have any part page again. If you want to remove it from the ToC, you must use more sophisticated strategies – user31729 Jan 25 '18 at 20:16
• Besides all, the document isn't compilable at all – user31729 Jan 25 '18 at 20:21
• I don't recommend it really, but try \renewcommand{\part}[1]{\addcontentsline{toc}{part}{#1}\null}, because you're getting into troubles with \include here. The non - \include version works as expected, but \include has some issues with \addcontentsline – user31729 Jan 25 '18 at 20:25
• I really do not understand what you want to achieve, but I'd not renew the \part comment. If you just want an entry in the toc, add \addcontentsline{toc}{part}{Introduction}, and if you want to increase the part number, put \stepcounter{part}. – marmot Jan 25 '18 at 20:28
• @marmot What I want to achieve in the end is a common structure of the document including the part sections in the TOC, but not having a seperate page for each part, and then additionally have chapters with a bibliography each (natbib+chapterbib) - which is why I would like to include the chapters instead of having 1 big file. I already tried your suggested solution (and have included this in the question, see above) but get the same result. – Julia Jan 25 '18 at 23:08

• while this does explain the problem, i would tend to call it a misfeature rather than a bug. the designer of latex had a good idea with \include, but clearly didn't think out the implications too well. would you consider closing this as a duplicate? it will still remain available for other users to find, who have a similar problem. – barbara beeton Oct 23 '18 at 23:28