
트리의 첫 번째 버튼만 열고 싶습니다.
내가 이것을 사용한 레벨을 만들기 위해
\pdfbookmark[0]{Start}{start}
다른 레벨을 닫으려면 이것을 사용합니다.
\hypersetup{
bookmarksopen=false
}
하지만 나는 이 결과를 얻습니다:
첫 번째 버튼만 여는 방법은 무엇입니까?
\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}
답변1
귀하의 요청을 이해한 바에 따르면 첫 번째 수준의 북마크만 열어두라는 것이었습니다. MWE를 사용하여 bookmarksopenlevel=0
에 옵션으로 추가할 수 있습니다 hyperref
. (더 깊은 레벨을 열려면 0을 1 또는 다른 값으로 변경할 수 있습니다.)
현재 MWE를 수정하면 다음과 같습니다.
\usepackage[pdftex, bookmarksnumbered, pagebackref, colorlinks=true, citecolor=Blue, linkcolor=DarkBlue!30!Black, urlcolor=Black,bookmarksopen,bookmarksopenlevel=0]{hyperref}
%
다음과 같이 깊이를 1로 늘리면
\usepackage[pdftex, bookmarksnumbered, pagebackref, colorlinks=true, citecolor=Blue, linkcolor=DarkBlue!30!Black, urlcolor=Black,bookmarksopen,bookmarksopenlevel=1]{hyperref}
%
그러면 나는 다음을 얻습니다: