1

I realised my bibliography was not being included in the ToC, I was taking a look at https://tex.stackexchange.com/a/325853/66353 However, while the inclusion of the option heading=bibintoc in \printbibliography made the trick, in the PDF the link points to a previous section (p. 317 instead of p. 319):

enter image description here

Are there any options to include it on the PDF correctly. I have been going through https://fr.sharelatex.com/learn/Bibliography_management_with_biblatex with no luck. Concretely, the call I am making is

 \printbibliography[heading=bibintoc,title={References}]

Please, find below a minimum version of the skeleton (with only the implicated libraries) of the main file:

\documentclass[a4paper,12pt, oneside]{report}

\usepackage[style=apa, backend=biber, urldate=long, uniquename=false]{biblatex}
\DeclareLanguageMapping{british}{british-apa}
\usepackage[british]{babel}
\usepackage{hyperref}
\usepackage{lipsum}

\begin{document}

\begin{thebibliography}
% Fake bibliography
@article{bergquist2001power,
author = {Bergquist, Magnus and Ljungberg, Jan},
title = {{The power of gifts: organizing social relationships in open source communities}},
journal = {Information Systems Journal},
volume = {11},
number = {4},
publisher = {Blackwell Science Ltd},
issn = {1365-2575},
url = {http://dx.doi.org/10.1046/j.1365-2575.2001.00111.x},
doi = {10.1046/j.1365-2575.2001.00111.x},
pages = {305--320},
keywords = {Gift culture, open source, peer review},
year = {2001}
}

\end{thebibliography}
%% Print index 
\newpage
\setcounter{tocdepth}{1} 
\tableofcontents
\setcounter{tocdepth}{1} %to solve issue with appendixes affecting list of figs and tables

\newpage
\listoftables
\newpage
\listoffigures

%%%%%%%% CHAPTERS %%%%%%%%%%%%

\chapter{A}
\lipsum

\chapter{B}
\lipsum
\parencite{bergquist2001power}
\lipsum

\chapter{C}
\lipsum


%%%%%%%% END CHAPTERS %%%%%%%%%


%% Bibliography - define types and non-types to distinguish websites
\newpage
%% Added to include in ToC. Works in object, but not in PDF bookmark
\printbibliography[heading=bibintoc,title={References}]
\newpage

\end{document}
  • 1
    Mhhh, if you don't have other code that is supposed to add the bibliography to the toc, then \printbibliography[heading=bibintoc,title={References}] should work just fine. Can you reproduce your problem in an MWE/MWEB? – moewe Jul 21 '17 at 18:04
  • 2
    Have you tried deleting all auxiliary files (.aux, ...) and recompile from scratch? – moewe Jul 21 '17 at 19:30
  • Unfortunately, we can't run your example since we do not have all the files you \include. Can you reproduce the issue in a document where you don't use \include? See also tex.meta.stackexchange.com/q/3343/35864 – moewe Jul 22 '17 at 9:19
  • Note also that your MWE misses crucial packages. You do not load hyperref (which is integral to the question). The command \onehalfspacing also needs another package (either drop it in the MWE, or load the relevant package - if it is important, if you can reproduce the issue without it, drop it). Please check your MWE in an empty folder before you submit it to make sure it compiles and actually shows the problem. – moewe Jul 22 '17 at 9:23
  • Thanks a lot @moewe! I am going through minimalbeispiel.de/mini-en.html to create a MWE of this case, however, I am not really sure how to deal with the includes. Should I create "dummy" include ones? Otherwise it is not possible to reproduce the error with the index. Thanks! – drozas Jul 22 '17 at 9:26
2

I think I figured out what the issue was here, it is necessary to add a \phantomsection. Hence, the code regarding this part goes as follows:

\newpage
\phantomsection
\printbibliography[heading=bibintoc,title={References}]
|improve this answer|||||
  • It should not be necessary to have to resort to a \phantomsection with \printbibliography[heading=bibintoc,title={References}]. – moewe Jul 22 '17 at 9:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.