My \cite{} command doesn't seem to work as expected while my bibliographical references are correctly set. How could I fix that? Could you please tell me if I didn't forget something anywhere? This is my MWE:
\documentclass[a4paper,12pt,twoside]{book}
\usepackage{mathptmx}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\usepackage{setspace}
\usepackage[left=4.5cm,right=4.5cm,top=5cm,bottom=5cm]{geometry}
\onehalfspacing
\usepackage[frenchb]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{tocloft}
\renewcommand{\cftchapleader}{\cftdotfill{\cftdotsep}} % for chapters
\usepackage[numberedbib,nosectionbib]{apacite}
\usepackage[makeindex]{imakeidx}
\makeindex[name=npr, title=Index des noms cités]
\makeindex[name=mat, title=Index des matières]
\begin{filecontents}{mybib.bib}
@book{Tufte2002,
author = {Tufte, Blabla},
year = {2002},
title = {A title},
}
\end{filecontents}
\usepackage{hyperref}
\begin{document}
\title{A title}
\maketitle
\renewcommand{\contentsname}{Table}
\tableofcontents
\chapter{A title}
\cite{Tufte2002}
\bibnewpage
{%start grouping
\doublespacing % <====================================================
\raggedright
\nocite{}
\bibliographystyle{apacite}
\bibliography{mybib}
}%end grouping
\phantomsection
\cleardoublepage
\printindex[npr]
\addcontentsline{toc}{chapter}{Index des noms cités}
\printindex[mat]
\addcontentsline{toc}{chapter}{Index des matières}
\end{document}
apaciteafterhyperref. – leandriis Dec 27 '20 at 15:12\nocite{}looks wrong. If you want to add all entries from the.bibfile to the bibliography, you want to use\nocite{*}. I would remove the\nocite{}, but I should stress again that this probably won't resolve the problem at hand. – moewe Dec 27 '20 at 17:28\citecommands don't work for you after you applied the changes suggested in the answer below. Do you get error messages (if so, what do the messages say)? Does the output look wrong (if so, what output do you get, what do you expect instead)? ... – moewe Dec 27 '20 at 17:29