[Tex/LaTex] Changing grouping for bookmarks of appendix

appendiceshyperref

I have an appendix with multiple chapters, while I like it that the main chapters of the document appear on the highest hierarchy level in the bookmarks, I would like the appendix chaptes to be children of the appendix bookmark. It would be even better if i could prefix the chapter number

I have this for the bookmarks

Appendices
Additional Images
Additional Code

and would like this

Appendices
|-A Additional Images
|-B Additional Code

MNWE

\documentclass{report}
\usepackage{hyperref}
\usepackage[toc,page]{appendix}
\begin{document}
\begin{appendices}
    \chapter{Additional Images}
    blah
    \chapter{Additional Code}
\end{appendices}
\end{document}

Best Answer

With package bookmark, the level of the next bookmark entry can be changed via \bookmarksetupnext. In this case, the level of the appendix bookmark should behave as \part (numeric value -1):

\bookmarksetupnext{level=part}
\begin{appendices}
  \chapter{...}

Full example:

\documentclass{report}
\usepackage{hyperref}
\usepackage[toc,page]{appendix}
\usepackage{bookmark}
\bookmarksetup{open,numbered}
\begin{document}
\chapter{Introduction}
\section{Section A}
\chapter{Summary}
\bookmarksetupnext{level=part}
\begin{appendices}
    \chapter{Additional Images}
    blah
    \chapter{Additional Code}
\end{appendices}
\end{document}

Result