[Tex/LaTex] Hyperref links in bibliography do not work

bibliographiescompilinghyperreflinks

I added the hyperref package and got some errors. Thus I deleted the auxiliary files and compiled again. This time there were no errors, and the links work except in the cites (bibliography), where I get question marks and links that send me to the first page. Any ideas?

In fact I don't need the links in the cites, so if there's a way I can solve the problem by having just the links in the figures and in the index it's welcome.

Best Answer

LaTeX and its packages need several compilation runs to get everything correct. For example hyperref can't place a link forwards in the document in the very first run because that part of the document wasn't processed yet. Therefore it stores this information in the auxiliary file(s) and reads them back in at the next run. Unknown destinations are simply replaced by the first page. You simply need to compile the document at least twice, sometimes three times (if e.g. the table-of-content turns out to take more than one page and pushes the rest of the document further down).

I would recommend to use a compiler tool which runs all the nesseary steps in the right order and the right number of times for you. Many LaTeX editors do this for you. There is also the latexmk script which will do the job very well. For PDF output use latexmk -pdf filename.

If this doesn't fix your issue please try to provide a minimal working example (MWE) that recreates your problem. We would also need which tools you are using (OS, LaTeX distribution, the steps you takes, ...)