I'm adding bookmarks to my PDF document, but I'm not completely satisfied with how they appear. I found this thread, which recommends the bookmark
package, and shows an example of how to group all appendices. I'd like to have the bookmarks appear as shown in the answer to the linked thread. I.e.
1. First chapter
|-- 1.1. First section
|----- 1.1.1. First subsection
|----- 1.1.2. Second subsection
|-- 1.2. Second section
2. Second chapter
Appendices
|-- A. First appendix
|-- B. Second appendix
However, when I try the same, I get no group named "Appendices", and appendix B shows up as the child of appendix A. Below is an MWE.
\documentclass[11pt]{scrreprt}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[hidelinks]{hyperref}
\usepackage[numbered,open]{bookmark}
\usepackage[page,titletoc]{appendix}
\usepackage{lipsum}
\renewcommand{\appendixpagename}{Appendices\thispagestyle{empty}}
\begin{document}
\tableofcontents
\chapter{First chapter}
\lipsum[1-2]
\section{First section}
\lipsum[3-6]
\subsection{First subsection}
\lipsum[7-10]
\subsection{Second subsection}
\lipsum[11-14]
\section{Second section}
\lipsum[15-18]
\chapter{Second chapter}
\lipsum[19-22]
\begin{appendices}
\bookmarksetupnext{level=part}
\chapter{First appendix}
\lipsum[23-26]
\chapter{Second appendix}
\lipsum[27-30]
\end{appendices}
\end{document}
Question 1:
What am I doing wrong in the above code?
Question 2:
I haven't fully decided on the appearance of the table of contents yet, and I am contemplating having the appendices listed as section-level entries within an "Appendices" chapter. Would this solve the problem? How can I lower the table of contents entry by one level for the appendix chapters only? The appendix chapters should still appear as chapters for all other purposes.
Edit: These questions appear to have answers here and here.
Question 3:
Also, I'd like to have the bookmark numbering end with a period (e.g. "A. First appendix" instead of "A First appendix"). How can I achieve this?