I have several problems with my latex book:
-
I want the appendix bookmark as an extra bookmark on part level, now it is under my second part. In the table of content its is right, but not on the pdf bookmarks.
-
The bookmark link of the Index is not correct, if I click on it, I go to the list of tables, not to the Index
-
The page numbering is totaly wrong. How can I do big roman Letters for the frontmatter and normal letters on the mainmatter without getting problems with the linking? I want that page numbers on every page, now there is no number or totally wrong.
My Latex – Code:
\documentclass{book}
\usepackage{geometry}
\geometry{left=4cm,right=3cm, top=2cm, bottom=2cm}
\usepackage{titlesec}
\titlespacing*{\chapter}{0pt}{-30pt}{20pt}
\titleformat{\chapter}[display]{\normalfont\huge\bfseries}{\chaptertitlename\\
hechapter}{20pt}{\Huge}
\usepackage[ngerman]{babel}
\usepackage{mathptmx}
\usepackage{helvet}
\usepackage{wallpaper}
\usepackage{color}
\usepackage[final]{pdfpages}
%,bookmarksopenlevel={1}
%\usepackage[bookmarks=true,bookmarksopen=true,bookmarksnumbered=true,colorlinks=true,linkcolor=black]{hyperref}
\usepackage[colorlinks,linkcolor=black,bookmarksopen=false]{hyperref}
\hypersetup{
pdftitle={test},
pdfauthor={\textcopyright test},
pdfsubject={test},
pdfkeywords={test},
}
\usepackage{xcolor,bookmark}
\usepackage{scrextend}
\usepackage{titlepic}
\usepackage{shorttoc}
\usepackage{courier}
%
\usepackage{type1cm}
\usepackage{makeidx} % allows index generation
\usepackage{graphicx} % standard LaTeX graphics tool
% when including figure files
\usepackage{multicol} % used for the two-column index
\usepackage[bottom]{footmisc}% places footnotes at page bottom
\usepackage{tocstyle}
\usetocstyle{allwithdot}
\makeindex % used for the subject index
% please use the style svind.ist with
% your makeindex program
\setcounter{tocdepth}{4}
\setcounter{secnumdepth}{4}
\begin{document}
\author{test}
\bookmark[page=\thepage,rellevel=1,keeplevel,view={XYZ},bold,color=blue]{Cover}
\includepdf{cover}
\pagestyle{empty}
\newpage
\section*{}
\newpage
\huge
\textbullet \hspace{0.1cm} test \hspace{-0.1cm} \textbullet\\
\\
\vspace{7cm}
\\
\large
test test\\
\vspace{4cm}
\\
\bookmark[page=\thepage,rellevel=1,keeplevel,view={XYZ},bold,color=blue]{Info}
Die Verlagsseite
\frontmatter
\include{dedic}
\newpage\section*{}
\include{foreword}
\newpage\section*{}
\include{preface}
\newpage\section*{}
\include{acknow}
\newpage\section*{}
\include{acronym}
%
\shorttableofcontents{Inhalts\"ubersicht}{1}
\bookmark[page=15,rellevel=1,keeplevel,view={XYZ},color=red]{Inhalts\"ubersicht}
\bookmark[page=17,rellevel=1,keeplevel,view={XYZ},color=red]{Inhaltsverzeichnis}
\tableofcontents
%
\mainmatter
\include{part1}
\include{chapter1}
\include{chapter2}
\include{part2}
\include{chapter3}
\include{chapter4}
\backmatter
\appendix
\include{appendix}
\listoffigures
\newpage
\listoftables
\backmatter%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\include{glossary}
%\include{solutions}
\printindex
\addcontentsline{toc}{part}{Index}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\includepdf{ueberautor}
\includepdf{back}
\end{document}
I tried a lot and hard for it and I could find no solution – would be great, if you could help me. Thanks
Best Answer
1. Appendix bookmark
Package bookmarks allows to restart the bookmark hierarchy at top level:
If the appendix is something like
then the entry in the table of contents is formatted as chapter, not as part. Instead of
something like the following can be used:
Explanation, see 2.
2. Index bookmark
Then you get the page number from the end of the index in the table of contents. The bookmark also needs an anchor that can be set by
\phantomsection
.3. Page bookmark links
The following example shows, how the correct absolute page numbers can be get from labels for use in
\bookmark
. I use packagezref
here for the labels and references, because it provides absolute page numbers and expandable extraction methods.The bookmark window:
4. Empty pages
is not the best way to create empty pages, the risk of side effects because of the complex
\section
is too large. A simple\null
is sufficient to get something invisible on the page:Headers/footers can also be suppressed, if needed:
But in the cases above often a simple
might suffice.
5. Invisible links
Because the document is intended for printing, invisible links make sense. Since
hyperref
2011/02/05 v6.82a optionhidelinks
is added for this purpose.