0

hope you are well!

I usually use "Overleaf" but recently I decided to switch to the offline version - LaTex. And, I am encountering this issue with references appearing as bold question marks "????". Do you know how to solve this? I've been reading and trying different things from the LaTeX forum but haven't been able to solve it. Thank you

\documentclass[12pt]{article}

\usepackage{mathptmx}
\usepackage{times} % these two packages "times" and "mathptmx" are for "times new roman" font, if you dont want these font, then delete these 2 packages

\usepackage{apacite} %for citations in APA style

\usepackage{etoolbox} %for bibliography

\usepackage{graphicx,url}

\usepackage{amsmath}

\usepackage[utf8]{inputenc}  

\usepackage{placeins}

\usepackage{hyperref}

\usepackage{setspace}

\usepackage{csquotes}

\usepackage{natbib}

\typeout{}
\bibliographystyle{apalike}
 \bibliography{bibfile}
 
\title{Bibliography management: \texttt{natbib} package}


\usepackage{listings}

\usepackage{color}

\usepackage[affil-it]{authblk}

\usepackage{soul}

\usepackage{booktabs} %For Tables

\usepackage{float} %For Tables

\usepackage{graphicx} %For Tables

\usepackage{caption} %For Tables

\usepackage{lscape} %for Tables 

\usepackage{blindtext}

\pagestyle{plain}
 

\begin{document} 



\addcontentsline{toc}{section}{References}

\begin{flushleft}
    \raggedbottom
     \bibliographystyle{apalike}
  \bibliography{bibfile}
\end{flushleft}
\end{document}*
10
  • 4
    you didn't run bibtex. Jun 29 at 7:55
  • Exactly which editor are you using with the offline version you have installed.
    – daleif
    Jun 29 at 8:41
  • 1
    you need to run pdflatex then bibtex then pdflatex again (overleaf does this for you) Jun 29 at 9:17
  • You should also not use \usepackage{apacite} and \usepackage{natbib} in the same document. Rather, load apacite with the option usepackage[natbibapa]{apacite}, which will automatically load natbib with the correct compatibility options. Jun 29 at 10:50
  • 1
    @RachelBrann Yeah, well, the TeXShop documentation is not the best. However, on their webpage it seems there is a dropdown menu (the one that says "LaTeX" in the background window of the image they show). Can you switch this to "BibTeX" maybe? You then must run "LaTeX" -> "BibTeX" -> "LaTeX" -> "LaTeX" and all should be fine. For further details, compare this thread. Jun 29 at 12:39

Your Answer

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

Browse other questions tagged or ask your own question.