Biblatex prints reference keys instead of author names and year

by Jan   Last Updated August 14, 2019 09:23 AM - source

I'm having trouble implementing my citations in my Latex document on overleaf. I'm using the following preamble-options:

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

\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{epstopdf}
\usepackage{ragged2e}
\usepackage{lscape}
\usepackage{pdflscape}
\usepackage{longtable}
\usepackage{adjustbox}
\usepackage{mathptmx}
\usepackage[T1]{fontenc}
\usepackage{dcolumn}
\usepackage{array}
\usepackage{textcomp}
\usepackage{multirow}
\usepackage{fixltx2e}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{booktabs}
\usepackage{tabularx}
\usepackage{dcolumn}
\usepackage{setspace}
\usepackage{threeparttable}
\usepackage{amsmath}
\usepackage{array}
\usepackage{longtable}
\usepackage{pdflscape}
\usepackage{eurosym}
\usepackage{xcolor}
\usepackage{soul}
\clubpenalty=10000 
\widowpenalty=10000
\usepackage[colorlinks=true,linkcolor=black, citecolor=black,filecolor=black, urlcolor=black]{hyperref}
\usepackage{filecontents}

% for back reference in bibliography
\usepackage[style=apa,backend=biber,backref=true]{biblatex}
\addbibresource{ref.bib}
\DeclareLanguageMapping{english}{english-apa}

% maps apacite commands to biblatex commands
\let \citeNP \cite
\let \citeA \textcite
\let \cite \parencite

%%%
% Apa Bib - enable reprint according to apa
%%%

\input{enable-reprint}
\raggedbottom
\bibliography{./ref}

I uploaded a ref.bib file containing all my bibliography-information. I can also access the various objects of my ref.bib file by using the \cite{Green.2016} call. However, in the pdf it does print the reference key "Green.2016" instead of the authors name and year. I would really appreciate any hints on how to solve the problem.

Tags : biblatex


Answers 2


The apa6 documentclass has a special option to enable biblatex, use this option instead of loading the package yourself.

With biblatex you should use \printbibliography instead of \bibliography{...}

Unrelated to the bibliograpy, but \shorttitle{...} was missing in your document and you should not load the same package more than once

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

\usepackage{babel}
\usepackage[utf8]{inputenc}
\usepackage{epstopdf}
\usepackage{ragged2e}
\usepackage{lscape}
\usepackage{pdflscape}
\usepackage{longtable}
\usepackage{adjustbox}
\usepackage{mathptmx}
\usepackage[T1]{fontenc}
\usepackage{dcolumn}
\usepackage{array}
\usepackage{textcomp}
\usepackage{multirow}
\usepackage{fixltx2e}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{booktabs}
\usepackage{tabularx}
%\usepackage{dcolumn}
\usepackage{setspace}
\usepackage{threeparttable}
\usepackage{amsmath}
%\usepackage{array}
%\usepackage{longtable}
%\usepackage{pdflscape}
\usepackage{eurosym}
\usepackage{xcolor}
\usepackage{soul}
\clubpenalty=10000 
\widowpenalty=10000
\usepackage[colorlinks=true,linkcolor=black, citecolor=black,filecolor=black, urlcolor=black]{hyperref}
\usepackage{filecontents}

% for back reference in bibliography
%\usepackage[style=apa,backend=biber,backref=true]{biblatex}

\addbibresource{ref.bib}
\DeclareLanguageMapping{english}{english-apa}

% maps apacite commands to biblatex commands
\let \citeNP \cite
\let \citeA \textcite
\let \cite \parencite

\title{text}
\shorttitle{dd}
\begin{document}
\cite{knuth}

%%%
% Apa Bib - enable reprint according to apa
%%%

%\input{enable-reprint}
\raggedbottom
%\bibliography{./ref}
\printbibliography

\end{document}

For the special case of the ancient texlive version of overleaf, the following should work:

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

%\usepackage{babel}
\usepackage[utf8]{inputenc}
\usepackage{epstopdf}
\usepackage{ragged2e}
\usepackage{lscape}
\usepackage{pdflscape}
\usepackage{longtable}
\usepackage{adjustbox}
\usepackage{mathptmx}
\usepackage[T1]{fontenc}
\usepackage{dcolumn}
\usepackage{array}
\usepackage{textcomp}
\usepackage{multirow}
%\usepackage{fixltx2e}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{booktabs}
\usepackage{tabularx}
%\usepackage{dcolumn}
\usepackage{setspace}
\usepackage{threeparttable}
\usepackage{amsmath}
%\usepackage{array}
%\usepackage{longtable}
%\usepackage{pdflscape}
\usepackage{eurosym}
\usepackage{xcolor}
\usepackage{soul}
\clubpenalty=10000 
\widowpenalty=10000
\usepackage[colorlinks=true,linkcolor=black, citecolor=black,filecolor=black, urlcolor=black]{hyperref}
\usepackage{filecontents}

% for back reference in bibliography
%\usepackage[style=apa,backend=biber,backref=true]{biblatex}
\DeclareLanguageMapping{english}{english-apa}
\addbibresource{ref.bib}


% maps apacite commands to biblatex commands
\let \citeNP \cite
\let \citeA \textcite
\let \cite \parencite

\title{text}
\shorttitle{dd}
\begin{document}
\cite{1992JEEEA..12..103F}

%%%
% Apa Bib - enable reprint according to apa
%%%

%\input{enable-reprint}
\raggedbottom
%\bibliography{./ref}
\printbibliography

\end{document}

(https://www.overleaf.com/read/qwqgydyqfjyr)

enter image description here

user36296
user36296
August 13, 2019 14:29 PM

Screenshot of Input and logs/output

Jan
Jan
August 14, 2019 08:01 AM

Related Questions




Revert packages to prior versions

Updated March 06, 2017 22:23 PM