1

Hej!

I am a super beginner and I tried to write an assignment in apa style for which I downloaded apa6 and apacite. However, I cannot seem to make the references work. There is no bibliography and in-text it shows the citations as "(?, ?)" and I really have no clue about what I am doing wrong and nothing I found in these forums and others could solve the issue (I already tried the pdflatex-bibtex-pdflatex(2x) sequence which is the standard in Texmaker and loads of variations of adding or deleted parts of the code). I think I might actually be missing how this is all working in latex.

I am using Windows 10, MiKTeX, and texmaker.

To test this all out, I created this example template to understand which parts are not working.

\documentclass[a4paper,man,british]{apa6}

\usepackage[british]{babel}
\usepackage[utf8]{inputenc}
\usepackage{csquotes}
\usepackage{apacite}
\usepackage{ragged2e}
\justifying


\bibliographystyle{apacite}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\title{Long Sample Banana Title : How APA can be used for your Banana Article}
\shorttitle{Short Sample Banana Title}
\author{Mr Bananaman}
\affiliation{Some banana university}

\abstract{About bananas}
\keywords{banana, love}

\begin{document}
\maketitle

Things are often bananas.

\section{Bananas: A declaration of love}
Banana banana banana banana \cite{ex25-t1}

\subsection{Bananas are yellow}
Banana banana banana. \citeA{bananacite} banana.

\subsection{They taste heavenly}
Banana banana \citeyear{bananacite}.

\section{Conclusion}
Bananas are everything.

\bibliography{bananarefs}
\end{document}

with this bananarefs.bib-file:

@Article{bananacite,
author = {banana man},
title = {banana test citation},
journal = {banana publishing},
year = {2023},
}

@book{ex25-t1,
  author         = {Vygotsky, L. S.},
  year           = {1978},
  title          = {Mind in Society: {T}he Development of Higher Mental
                    Processes},
  editor         = {Rice, Edgar},
  address        = {Cambridge, MA},
  publisher      = {Harvard University Press},
}

gives these errors:

...
Class apa6 Info: No bibliography package was specified; defaulting to (but not
loading) Biblatex on input line 213

...
LaTeX Warning: Citation `ex25-t1' undefined on input line 33.
No file "apa test".bbl

Again, everything is fine with the apa style in the pdf, only the citations show as "(?, ?)" or "? (?)" depending on my citation in the text and no reference list in the end.

I hope someone understands what is going wrong and enlighten me.

2 Answers 2

1
  • the class apa6 is special, instead of loading the apacite package, it has a document class option for that. This will also deal with the style, so \bibliographystyle{...} is not necessary

  • \bibliography{bananarefs} is missing


\documentclass[a4paper,man,british,apacite]{apa6}

\usepackage[british]{babel}
\usepackage[utf8]{inputenc}
\usepackage{csquotes}
%\usepackage{apacite}
\usepackage{ragged2e}
\justifying

%\bibliographystyle{apacite}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\title{Long Sample Banana Title : How APA can be used for your Banana Article}
\shorttitle{Short Sample Banana Title}
\author{Mr Bananaman}
\affiliation{Some banana university}

\abstract{About bananas}
\keywords{banana, love}

\begin{document}
\maketitle

Things are often bananas.

\section{Bananas: A declaration of love}
Banana banana banana banana \cite{ex25-t1}
\bibliography{bananarefs}

\end{document}

enter image description here

1
  • Thank you so much for your response to my question.I tried to run it with your fixes, and also just your shortened version, but it still shows the citations as questionmarks, just as before. Does that mean there is something wrong with my bib-file?
    – dlisy
    Commented Nov 17, 2019 at 18:23
0

I suggest you check out the manual of apa6 and have a look at the examples.

To be concrete: Remove apacite and use biblatex instead. Use \textcite and \parencite as citation commands. At the end print the bibliography with \printbibliography:

\documentclass[a4paper,man,british]{apa6}
\usepackage[british]{babel}
\usepackage[utf8]{inputenc}
\usepackage{csquotes}
%\usepackage{apacite}
\usepackage{ragged2e}
\justifying

\usepackage[style=apa,sortcites=true,sorting=nyt,backend=biber]{biblatex}
\DeclareLanguageMapping{american}{american-apa}
\addbibresource{bananarefs.bib}
%\bibliographystyle{apacite}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\title{Long Sample Banana Title : How APA can be used for your Banana Article}
\shorttitle{Short Sample Banana Title}
\author{Mr Bananaman}
\affiliation{Some banana university}

\abstract{About bananas}
\keywords{banana, love}

\begin{document}
\maketitle

Things are often bananas.

\section{Bananas: A declaration of love}
Banana banana banana banana \textcite{ex25-t1}

\subsection{Bananas are yellow}
Banana banana banana. \parencite{bananacite} banana.

\subsection{They taste heavenly}
Banana banana \citeyear{bananacite}.

\section{Conclusion}
Bananas are everything.

%\bibliography{bananarefs}
\printbibliography
\end{document}

If you are still having problems, try to run it from the shell: pdflatex yourfile.tex. If the citations are undefined, run biber yourfile.bcf and then pdflatex again. (Note that these are instructions for GNU/Linux, they will not work on Windows.)

3
  • Thank you! I reinstalled everything but I was too busy to try if that solved anything. So I would need to try again if the same problems persist.
    – dlisy
    Commented Feb 24, 2020 at 10:54
  • I have of course read the apa6 attentively and that's why I included apacite because it is mentioned to load there in case I want to use this specific citation package (also because most examples I found loaded it). But I guess I have not yet fully understood the difference between the packages
    – dlisy
    Commented Feb 24, 2020 at 10:59
  • Sorry, you are right. You can obviously also use apacite, but it is actually not the default, so if there is no specific reason to deviate, I would just stick to biblatex. The example in the documentation also uses biblatex. Anyway, goy's solution also works for me. Maybe it is best if you run pdflatex and bibtex from the command line to see where exactly it fails: tex.stackexchange.com/questions/241612/… Commented Feb 25, 2020 at 12:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .