I had a problem as I wanted to make my appendices look like sections.
I already found a solution to do this for the table of contents by using this code just before the \chapter
command in the appendix environment :
\makeatletter
\addtocontents{toc}{\let\protect\l@chapter\protect\l@section}
\makeatother
Now, I would like to make the bookmarks "realize" it. When I open the PDF file the Appendices appears at a chapter level, but the title of the appendix appears at chapter level too.
All the bookmarks I have come from the hyperref
package, so I guess I can't use the bookmark
package to find a solution.
Is there any way to make it look like a section of the chapter Appendices in the bookmarks?
Here is the code I use in my LaTeX program:
\begin{appendices}
\makeatletter
\addtocontents{toc}{\let\protect\l@chapter\protect\l@section}
\makeatother
\chapter{Appendix1}
\chapter{Appendix2}
...
\end{appendices}
I already tried to use the \section
function instead of \chapter
, but it doesn't seem to work.
Best Answer
Method via
\bookmarksetupnext
With package
bookmark
the following is possible:overwrites the bookmark setting of "Appendices" and moves it a level higher to part level. Then the appendix chapters become children to the "part" appendices.
The example is based on the example in Werner's answer.
Method via
\toclevel@<section>
Package
hyperref
configures the bookmark levels in macros\toclevel@chapter
,\toclevel@section
:These macros can be redefined:
Remark: You can use package
bookmark
together withhyperref
getting faster updated bookmarks and more features.