0

Problem: I am trying to create a lists bookmark under which my list of tables, figures, reaction schemes etc can go so that the PDF bookmarks do not look cluttered with just a long list expanded. This is how my thesis document bookmarks look presently:

enter image description here

Using \pdfbookmark[0]{Front Matter}{FMbookmark} and manually changing the PDF bookmark levels of the "Front Matter" sections worked as intended but I am running into an issue with the lists, presumably because the lists are included in the TOC.

What I have tried: The MWE shows what I tried, namely using the * versions of the LOF, LOT and manually creating TOC entries and PDF Bookmark entries but the bookmarks are still being generated based upon the TOC and looks like this:

enter image description here

I am not sure how to square the issue of wanting the TOC entries of the lists to be at one level and for the bookmarks to be at a different level whilst still automatically generating bookmarks from the TOC entries with hyperref.

What I would like: Ideally, I want the PDF bookmarks to still be generated by hyperref automatically (main body, appendices etc) and the TOC entries for the lists to still show as chapters (i.e. be in bold with no \ldots) but for the lists section bookmarks to all be under a lists heading although I am open to alternatives

MWE:

\documentclass[oneside]{memoir}

\usepackage[bookmarks=true]{hyperref}

\begin{document}

\pdfbookmark[0]{Contents}{contentsbookmark}
\tableofcontents*
\newpage

\pdfbookmark[0]{Lists}{listsbookmark}
\pdfbookmark[1]{List of Figures}{lofbookmark}

\listoffigures*
\addcontentsline{toc}{chapter}{List of Figures}
\newpage

\pdfbookmark[1]{List of Tables}{lotbookmark}

\listoftables* 
\addcontentsline{toc}{chapter}{List of Tables}
\newpage

\chapter{Test}
\begin{table} \caption{Test} \end{table}
\begin{figure} \caption{Test} \end{figure}
\newpage
\begin{table} \caption{Test} \end{table}
\begin{figure} \caption{Test} \end{figure}

\end{document}

I have looked through the automatically generated similar questions and after a search could not find anything that answers this, if this is a duplicate of a question that I could not find then I would appreciate a comment pointing to it please.

1 Answer 1

1
\documentclass[oneside]{memoir}

\usepackage[bookmarks=true]{hyperref}
\usepackage{bookmark} %not required but makes it faster
\begin{document}

\tableofcontents

\clearpage
\phantomsection
\pdfbookmark[0]{Lists}{listsbookmark}

\makeatletter
\def\toclevel@chapter{1}
\makeatother
\listoffigures
\listoftables

\makeatletter
\def\toclevel@chapter{0}
\makeatother


\chapter{Test}
\begin{table} \caption{Test} \end{table}
\begin{figure} \caption{Test} \end{figure}
\newpage
\begin{table} \caption{Test} \end{table}
\begin{figure} \caption{Test} \end{figure}

\end{document}

enter image description here

You must log in to answer this question.