Shared bibliography

I am trying to use the same .bib file for different versions of my paper, but when I use different versions of the original .tex file the bibliography stops working (it works only with the original).

This below is the code before the beginning of the document:

\documentclass[a4paper,12pt]{article}
\usepackage{natbib}
\usepackage{caption}
\captionsetup{font=footnotesize}
\usepackage{color}
\usepackage{graphicx}
\usepackage[fleqn]{mathtools}
\setlength{\parindent}{0em}
\usepackage{enumitem}
\setlength{\parskip}{0.5em}
\usepackage{subcaption}
\usepackage{float}
\usepackage[utf8]{inputenc}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\cfoot{\thepage}
\usepackage{setspace}
\doublespacing
\usepackage[bottom]{footmisc}
\renewcommand{\arraystretch}{1.5}
\usepackage{geometry}
\geometry{margin=3cm}
\usepackage{dirtytalk}

\renewenvironment{abstract}
{\small
\begin{center}
\bfseries \abstractname\vspace{-.5em}\vspace{0pt}
\end{center}
\list{}{%
\setlength{\leftmargin}{0mm}% <---------- CHANGE HERE
\setlength{\rightmargin}{\leftmargin}%
}%
\item\relax}
{\endlist}

\title{}
\author{}


and this is how I call the bibliography within the file:

\bibliographystyle{apa}
\bibliography{BiblioC1}


What am I missing? Thanks for your help! Manuel

New contributor
Manuel is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
• Welcome to TeX.SE! What do you mean with 'the bibliography stops working'? Do you get an error message? If so, which one? Or is the bibliography empty, or incorrect? Or do you get [?] marks in your text? Did you remember to run bibtex for the new document? – Marijn Feb 23 at 14:27
• Thanks Marijn! The bibliography does not appear at the end and I get question marks instead of in text references. The error message is: The top-level auxiliary file: Chapter_one_06.07.20_copy.aux I couldn't open style file apa.bst ---line 120 of file Chapter_one_06.07.20_copy.aux : \bibstyle{apa : } I'm skipping whatever remains of this command I found no style file---while reading file Chapter_one_06.07.20_copy.aux (There were 2 error messages) Also, how should I run bibtex for the new document? Thanks a lot – Manuel Feb 23 at 15:29
• If that is the exact error message then it is a typo in your copied document: \bibstyle{apa : } should be \bibstyle{apa} (so without the spaces and :). But in the more likely scenario that you introduced the typo when copying the error message in your comment and the call in the document is actually correct then BibTeX can't find the file apa.bst which contains the bibliography style definition. Actually in natbib the APA style is called apalike, so maybe you entered the wrong name by mistake. Or you actually have a file called apa.bst which is located in the folder of your [...] – Marijn Feb 23 at 15:38
• [...] old document and you didn't copy it to the folder of your new document. For running BibTeX again you probably don't need to worry, from your error message it seems that you are using an editor or a build tool that runs BibTeX automatically when it is needed so you don't need to do that yourself. – Marijn Feb 23 at 15:39
• Thanks Marijn. It is kind of weird because actually there is no typo, it is exactly the error message I get. However, in the document I do not use \bibstyle, I just use \bibliographystyle{apa} at the end but there is no typo there. The previous document is in the same folder, so all the file needed to compile the previous version should be available for the new version too. – Manuel Feb 23 at 16:38