Using KOMA and scrbook I find that the pdf bookmark for the table of contents comes in on the wrong hierarchy level, see image below.
Briefly, following "The Guide - KOMA-Script" by Markus Kohm version 2017-08-08, page 89, the document is divided into three sections: front matter, main matter, and back matter. All pdf bookmarks are on the correct hierarchy level, except that for Table of Contents (TOC). In this example, TOC is placed under "About the Authors", obviously not correct. Can anyone see what is wrong in the code below?
Note, to add a PDF bookmark entry for the Cover page I successfully used
\hypertarget{Cover}{}
\bookmark[level=section,dest=Cover]{Cover}
Thanks
John
Code example (compiles with miktex-portable-2.9.6361)
\documentclass[twoside=false]{scrbook}
\usepackage{lipsum}
\usepackage{tikz}
\usepackage{bookmark}
\hypersetup{
colorlinks=false,
linkbordercolor=1 1 1,
}
\begin{document}
\frontmatter
%--------------------------------
% 1. Cover (frontmatter)
%--------------------------------
\begingroup
\hypertarget{Cover}{}
\bookmark[level=section,dest=Cover]{Cover}
\thispagestyle{empty}
\begin{tikzpicture}[remember picture,overlay]
\draw (current page.center) node []{\Huge\centering\bfseries\sffamily\parbox[c][][t]{\paperwidth}{\centering Lorem ipsum dolor\\[18pt]
{\Large Consectetuer adipiscing elit}\\[20pt]
{\huge J. Appleseed \& B. Doe}}};
\end{tikzpicture}
\vfill
\endgroup
\clearpage
\thispagestyle{empty}
%--------------------------------
% 2. Copyright (frontmatter)
%--------------------------------
\chapter{Copyright}
Copyright 2017 by Authors\\
\noindent This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0) license. This license is available at\\
\noindent http://creativecommons.org/licenses/by-nc-sa/3.0/
%----------------------------------------------------------------------------------------
% About the Author (frontmatter)
%----------------------------------------------------------------------------------------
\chapter{About the Authors}
\textbf{Johnny Appleseed}
\lipsum[30]
\bigskip
\noindent \textbf{Bob Doe}
\lipsum[31]
\clearpage
\thispagestyle{empty}
%----------------------------------------------------------------------------------------
% Table of contents (frontmatter)
%----------------------------------------------------------------------------------------
\hypertarget{tableofcontents}{}
\bookmark[level=section,dest=tableofcontents]{Table of Contents}
\tableofcontents
%----------------------------------------------------------------------------------------
% Foreword (frontmatter)
%----------------------------------------------------------------------------------------
\chapter{Foreword}
\lipsum[1-3]
\mainmatter
\chapter{Lorem ipsum}
\lipsum[1-2]
\section{Donec felis erat}
\lipsum[3-6]
\chapter{Sed commodo}
\lipsum[7-8]
\section{Pharetra ligula}
\lipsum[9-12]
\backmatter
\end{document}
level=chapter
in the argument of\bookmark
.\\
at the end of a paragraph.