TransWikia.com

Can not print the sign @ when using biblatex (author year style)

TeX - LaTeX Asked on April 15, 2021

I am using biblatex author year style and in my text I have an @ which biber does not like giving me error as below:

ERROR - BibTeX subsystem: C:UsersTEMPLE~1.000AppDataLocal
Tempbiber_tmp_kM22658097ff4c951e70db95e86474283432_17340.utf8, line 25, 
syntax error: found "using", expected one of: start of entry ("{" or "(") or 
quoted string ({...} or "...")

Below is the code.
To run: step1: pdflatex step 2: biber step3: pdflatex.

If you delete the symbole @ in the text the code works fine and we see the bibliography at the end.

documentclass{book}
 % to run: step1: pdflatex step 2: biber step3: pdflatex
usepackage[style=authoryear]{biblatex}
usepackage{filecontents}
begin{filecontents}{jobname.bib}
@book{mybook,
author       = { my author},
date         = { 2020},
title        = {my title},
publisher    = {city:press},
}
end{filecontents}
addbibresource{jobname}
begin{document}
I can not print  @ when using biblatex.(textcite{mybook})
printbibliography
end{document}

One Answer

addbibresource requires a full file name, so you should use addbibresource{jobname.bib}.

Without this biber picks up jobname.tex and tries to use this as a bib file. Obviously, this isn't a valid bib file, so biber generates an error. In particular, biber doesn't like the @ because that character is meant to mark the start of a bib record.

I have a feeling that biblatex used to allow addbibresource{jobname} but the documentation always specified the extension to be provided, so maybe a recent code clean up tightened the requirements.

Correct answer by David Purton on April 15, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP