# PDF bookmarks don't work correctly (every reference points to the first page of the document) [closed]

As I almost described in the title of this question, my problem is the following: I'm trying to create suitable PDF bookmarks to my document but all the references (bookmarks on the left side, references of equations, etc.) always jump on the first page. Earlier the document was much longer but I reduced the code as much as possible in order to make it able to post here (and demonstrate the issue).

Could somebody suggest me something or maybe give a solution for this problem? I tried a lot things by the way: modified the order of the include package statements (didn't help), use only one of the packages 'bookmark' and 'hyperref' (this wasn't good since without the bookmark package the bookmark hierarchy in Acrobat Reader was not correct and without hyperref the references was working still in an incorrect way).

At the bottom of my post I'll put the mentioned code section of this document.

(Finally, it's possible the I'll edit this post later and put some other methods and tried but didn't help to solve this problem.)

One more thing: There was a similar issue about 10 months ago but it hasn't been answered correctly so far. In further posts and questions I did not find answer for this problem.


\documentclass[10pt,a4paper]{report}
\usepackage[utf8]{inputenc}
\usepackage[magyar]{babel}
\usepackage{amsmath, amsthm, amsfonts, amssymb}
\usepackage{setspace}
\usepackage{color}
\usepackage[]{hyperref}
\hypersetup{
pdfauthor={László Zsolt},
pdftitle={Doesn't matter},
pdfsubject={Something},
pdfkeywords={key, word},
pdfproducer={MiKTeX pdfTeX-1.40.13},
pdfcreator={PdfLaTeX},
bookmarksnumbered=true,
bookmarksopen=true,
bookmarksopenlevel=1,
pdfstartview=Fit,
unicode=true,
pdfpagemode=UseOutlines
}

\usepackage{algorithm}
\usepackage{bookmark}
\bookmarksetup{startatroot}

\onehalfspace

\begin{document}

\chapter{Elmélet}
\section{Alapfogalmak}
\subsection{A lineáris programozási modell felépítése}
\subsection{Műveletek az alakok közötti áttéréshez}
\section{A grafikus módszer}
\subsection{Az algoritmus}
\subsection{További definíciók}

$$\label{eq_sd} Standard\;deviation = \sqrt{\frac{\sum_{i=1}^n \left( x_i - \bar{x} \right)^2}{n - 1}}$$

\subsection{Speciális esetek a grafikus megoldás esetén}
\chapter{Some other chapter}

How should I calculate the standard deviation of a population? Look at equation (\ref{eq_sd}).

\chapter{One more chapter}

How should I calculate the standard deviation of a population again? Look at equation (\ref{eq_sd}).

\end{document}


## closed as off-topic by egreg, Mico, Andrew, barbara beeton, Paul GesslerApr 1 '15 at 12:11

• This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

• (Putting the equation into an other chapter makes it easier to see that it's reference doesn't work properly.) – laszlzso Mar 25 '15 at 8:38
• Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. – Symbol 1 Mar 25 '15 at 8:51
• When I compile your example, all links point where they are supposed to. The only glitch is \onehalfspace that should be \onehalfspacing, but it doesn't influence the final result. What TeX distribution are you using? – egreg Mar 25 '15 at 9:19
• I'm trying to create this document perfectly with the following conf.: Windows 7 operating system, Texmaker 4.0.3, MiKTeX 2.9. – laszlzso Mar 25 '15 at 9:31
• I'm voting to close this question as off-topic because it was solved by a software update – egreg Apr 1 '15 at 11:30