BibTeX, biblatex and biberCitation keys not converting to citations in text

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
jemmacardiff
Posts: 3
Joined: Fri Oct 02, 2020 6:35 pm

Citation keys not converting to citations in text

Post by jemmacardiff »

I've just started using overleaf to write my thesis and I'm having some problems with my citations.

I'm using \citep{} to add each citation, but when I compile the document, my citations aren't displaying as I thought they would.
E.g. rather than (Monteiro, 2018) it's showing as (Monteiro'household'2018)
I'm aware that this will be the case in my text but I can't understand why it's not in my PDF.

This is the code in my main.tex:
\usepackage[style=authoryear,natbib=true,firstinits=true,maxcitenames=2,maxbibnames=99,uniquename=false,uniquelist=false,dashed=false,url=false,isbn=false,doi=false]{biblatex}
%\addbibresource{references_copied.bib}
\addbibresource{references.bib}
\AtEveryBibitem{\clearfield{month}}
\AtEveryBibitem{\clearfield{day}}

I'd be grateful for any assistance.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
Bartman
Posts: 366
Joined: Fri Jan 03, 2020 2:39 pm

Citation keys not converting to citations in text

Post by Bartman »

Can you please give us a Infominimal working example so that we can recreate the problem?

The firstinits option has been out of date since spring 2016.

I don't know why you are using the \citep command, but the \autocite command set to inline (that behaves like \parencite) by the authoryear style should no longer need the natbib package option in this context.
jemmacardiff
Posts: 3
Joined: Fri Oct 02, 2020 6:35 pm

Citation keys not converting to citations in text

Post by jemmacardiff »

Thank you for the response.
Hopefully these screenshots will help. I'm also using zotero if that makes a difference.

With regards to why i'm using \citep - this was recommended by a friend who's been using overleaf for a little longer than me. She used code identical to mine and has had no issues.
Attachments
Screen Shot 2020-10-02 at 21.12.30.png
Screen Shot 2020-10-02 at 21.12.30.png (68.16 KiB) Viewed 17153 times
Screen Shot 2020-10-02 at 21.12.10.png
Screen Shot 2020-10-02 at 21.12.10.png (187.17 KiB) Viewed 17153 times
Bartman
Posts: 366
Joined: Fri Jan 03, 2020 2:39 pm

Citation keys not converting to citations in text

Post by Bartman »

Unfortunately that is not a Infominimal working example.

Have you tried to delete the auxiliary files using the garbage button?

Of course, when looking for possible sources of error, the entries used in the bib file should also be checked to see whether they are correctly formatted.

Off-topic: You should get one less error message if you remove the \\ macro after the sectioning command, which can be seen in the source code area of the screenshot.
jemmacardiff
Posts: 3
Joined: Fri Oct 02, 2020 6:35 pm

Citation keys not converting to citations in text

Post by jemmacardiff »

I've tried to fix the problem by following the 'How to write a thesis in latex' series.
Below is my main.tex

Code: Select all

\documentclass[12pt,twoside]{report}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\graphicspath{ {images/} }
\usepackage{appendix}
\usepackage[a4paper,width=150mm,top=25mm,bottom=25mm,bindingoffset=6mm]{geometry}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead{}
\fancyfoot{}
\fancyfoot[LE,RO]{\thepage}
\renewcommand{\footrulewidth}{0.4pt}

\usepackage[{biblatex}
\addbibresource{references.bib}

\begin{document}

\chapter{Prefrontal brain stimulation during food-related inhibition training: Effects on food craving, food consumption and inhibitory control}
\input{chapters/chapter02}

\printbibliography

\end{document}
My references seem to be formatted correctly, but as mentioned the citation is appearing as the key rather than the authors and year.

Code: Select all

@article{montenegro_prefrontal_2012,
	title = {Prefrontal cortex transcranial direct current stimulation associated with aerobic exercise change aspects of appetite sensation in overweight adults},
	volume = {58},
	issn = {01956663},
	url = {https://linkinghub.elsevier.com/retrieve/pii/S0195666311006374},
	doi = {10.1016/j.appet.2011.11.008},
	abstract = {This study investigated whether transcranial direct current stimulation ({tDCS}) on dorsolateral prefrontal cortex ({DLPFC}) isolated or combined with aerobic exercise influenced the desire to eat, hunger, and satiety in overweight subjects. Nine volunteers underwent anodal or sham {tDCS} (2 {mA}; 20 min) over {DLPFC} and isocaloric exercise bouts (70\%{VO}2R; \$200 kcal). The appetite sensations were evaluated by visual analogue scales at four moments: I – Baseline; {II} – After {tDCS}; {III} – Post-Exercise and {IV} – 30-min Post-Exercise. The {tDCS} on left {DLPFC} decreased the desire to eat at baseline ({tDCS} À26\% vs. À14\% Sham). The {tDCS} associated with exercise had greater suppressing effect in desire to eat compared to either {tDCS} or exercise alone ({tDCS} À39\% vs. À27\% Sham). Moreover, the {tDCS} associated with exercise decreased hunger ({tDCS} À48\% vs. 36\% Sham) and increased satiety ({tDCS} 28\% vs. 7\% Sham) immediately after exercise. The postexercise 30-min recovery elicited an overall increase in appetite. However the increase in desire to eat and hunger after recovery was lower after {tDCS} (29\% and 13\%, respectively) compared to sham stimulation (77\% and 113\%, respectively). These findings in overweight subjects indicate that the combination of {tDCS} over {DLPFC} and aerobic exercise induced greater decrease in appetite sensations compared to anodal {tDCS} or exercise alone.},
	pages = {333--338},
	number = {1},
	journaltitle = {Appetite},
	shortjournal = {Appetite},
	author = {Montenegro, Rafael A. and Okano, Alexandre H. and Cunha, Felipe A. and Gurgel, Jonas L. and Fontes, Eduardo B. and Farinatti, Paulo T.V.},
	urldate = {2020-04-30},
	date = {2012-02},
	langid = {english}
Bartman
Posts: 366
Joined: Fri Jan 03, 2020 2:39 pm

Citation keys not converting to citations in text

Post by Bartman »

Is the closing brace missing only at the end of your article entry type in your post or also in your bib file?
elisasophie2001
Posts: 1
Joined: Fri Feb 16, 2024 7:43 pm

Citation keys not converting to citations in text

Post by elisasophie2001 »

Hey,
did you ever fix the issue? Cause I currently have the same problem ahhh
rais
Posts: 419
Joined: Sun Nov 16, 2014 8:51 pm

Citation keys not converting to citations in text

Post by rais »

Assuming you're using biblatex like the OP: did you run biber? Perhaps show your .blg file...

KR
Rainer
Post Reply