
Ich möchte nur die erste Schaltfläche des Baums öffnen
um die Ebenen zu erstellen habe ich dies verwendet
\pdfbookmark[0]{Start}{start}
Um die anderen Ebenen zu schließen, verwende ich dies
\hypersetup{
bookmarksopen=false
}
aber ich bekomme dieses Ergebnis:
Wie öffnet man nur den ersten Knopf?
\documentclass{book}
\usepackage[utf8]{inputenc}
\usepackage{imakeidx}
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
\usepackage[pdftex, bookmarksnumbered, pagebackref, colorlinks=true, citecolor=Blue, linkcolor=DarkBlue!30!Black, urlcolor=Black,bookmarksopen]{hyperref}
\makeindex[columns=3, title=Alphabetical Index, intoc]
\begin{document}
\tableofcontents
\cleardoublepage
\pdfbookmark{Dedicatory}{dedic}
\chapter*{Dedicatory}
to all my family
\cleardoublepage
\pdfbookmark{Abstract}{abstr}
\chapter*{Abstract}
hello world
\chapter{chapter}
\section{Introduction}
In this example several keywords\index{keywords} will be
used which are important and deserve to appear in the
Index\index{Index}.
\subsection{subsection}
Terms like generate\index{generate} and some\index{others}
will also show up. Terms in the index can also be
nested \index{Index!nested}
\clearpage
\section{Second section}
This second section\index{section} may include some special
word, and expand the ones already used\index{keywords!used}.
\printindex
\end{document}
Antwort1
So wie ich Ihre Anfrage verstehe, sollten nur die Lesezeichen der ersten Ebene geöffnet werden. Mit Ihrem MWE können Sie bookmarksopenlevel=0
als Option hinzufügen hyperref
. (Wenn Sie tiefere Ebenen öffnen möchten, können Sie 0 in 1 oder einen anderen Wert ändern.)
Mit dieser Änderung Ihres aktuellen MWE:
\usepackage[pdftex, bookmarksnumbered, pagebackref, colorlinks=true, citecolor=Blue, linkcolor=DarkBlue!30!Black, urlcolor=Black,bookmarksopen,bookmarksopenlevel=0]{hyperref}
%
Wenn ich die Tiefe um 1 erhöhe, wie folgt
\usepackage[pdftex, bookmarksnumbered, pagebackref, colorlinks=true, citecolor=Blue, linkcolor=DarkBlue!30!Black, urlcolor=Black,bookmarksopen,bookmarksopenlevel=1]{hyperref}
%
dann bekomme ich: