[Tex/LaTex] Putting appendix outside the last part

appendiceshyperrefpartstable of contents

I have the following LaTeX structure:

\documentclass{book}

\usepackage{hyperref}

\begin{document}

\tableofcontents

\chapter{Introduction}

\part{Fruits}
\chapter{The Apple}
\chapter{The Peach}
\chapter{The Banana}

\part{Animals}
\chapter{The Dog}
\chapter{The Cat}
\chapter{The Horse}

\appendix
\addcontentsline{toc}{chapter}{Appendices}

\chapter{Summary}
\chapter{Bibliography}

\end{document} 

The problem with this is the structure of the bookmark in the final pdf: all the appendices are found within part II.

Bookmark structure

Is it somehow possible to put the Appendices to the outermost level, i.e. parallel with I Fruits, II Animals, and not inside II Animals?

I want to keep the numbering of the table of contents as it is now, i.e. no numbers for chapters within appendix:

Table of Contents

Thanks in advance!

Best Answer

Use \addcontentsline{toc}{part}{Appendices} instead of \addcontentsline{toc}{chapter}{Appendices}.

Alternatively use the appendix package.

\documentclass{book}

\usepackage{hyperref}

\begin{document}

\tableofcontents

\chapter{Introduction}

\part{Fruits}
\chapter{The Apple}
\chapter{The Peach}
\chapter{The Banana}

\part{Animals}
\chapter{The Dog}
\chapter{The Cat}
\chapter{The Horse}

\cleardoublepage
\phantomsection
\appendix
\addcontentsline{toc}{part}{Appendices}
\chapter{Summary}
\chapter{Bibliography}

\end{document} 

enter image description here