Hyperref とブックマーク: ブックマークのレベルをリセットおよび/または変更する

Hyperref とブックマーク: ブックマークのレベルをリセットおよび/または変更する

私の最初の質問回答がありましたが、新しい問題が発生しました。これは PDF のブックマークに関係しています。私は Overleaf を使用していますが、これは現在のものではなくhyperref、古いものです。次の MWE では、バックマターの章は「2 月」のブックマークの下に並べられています。しかし、私はそれを望んでいません。どうすればこれを防ぐことができますか? バックマターのブックマークをフロントマターのブックマークと同じように作成したいだけです。

\documentclass{book}
\usepackage[hidelinks, bookmarksopen=false]{hyperref}
\usepackage{bookmark}

\begin{document}

\frontmatter

\chapter{preface}
\chapter{introduction}

\mainmatter

\hypertarget{jan}{}
\bookmark[level=part,dest=jan]{January}
\chapter{1 jan}First January lecture
\chapter{2 jan}Another January lecture
\chapter{3 jan}Another January lecture

\cleardoublepage
\hypertarget{feb}{}
\bookmark[level=part,dest=feb]{February}
\chapter{1 feb}First February lecture
\chapter{2 feb}Another February lecture
\chapter{2 feb}Another February lecture
\chapter{3 feb}Another February lecture


\cleardoublepage
\backmatter
\chapter{appendix A}
\chapter{appendix B}

\end{document} 

答え1

ドキュメントで答えを見つけました。それは、を追加して、bookmarkの直後に新しいツリーを開始することです。\backmatter\bookmarksetup{startatroot}

\documentclass{book}
\usepackage[hidelinks, bookmarksopen=false]{hyperref}
\usepackage{bookmark}

\begin{document}

\frontmatter
\chapter{introduction}

\hypertarget{jan}{}
\bookmark[level=part,dest=jan]{January}
\chapter{1 jan}First January lecture
\chapter{2 jan}Another January lecture
\chapter{3 jan}Another January lecture
\cleardoublepage
\hypertarget{feb}{}
\bookmark[level=part,dest=feb]{February}
\chapter{1 feb}First February lecture
\chapter{2 feb}Another February lecture
\chapter{3 feb}Another February lecture

\cleardoublepage
\backmatter
\bookmarksetup{startatroot}
\chapter{appendix A}
\chapter{appendix B}

\end{document}

関連情報