2

I am using Biber to cite my sources with biblatex-apa, with the package apa6 on OS X. Everything was going smoothly until I added a certain source which caused xelatex to stop compiling with the error:

(./test.bbl
! Illegal parameter number in definition of \NewValue.
<to be read again> 
                   }
l.36 ...{Introduction to Neural Networks for {C#}}

?

I will provide an MWE that produces the error (to reproduce, run xelatex test, biber test, then xelatex test again):

test.tex

\documentclass[man, 12pt]{apa6}
\usepackage{fontspec}
\usepackage[english]{babel}
\usepackage{csquotes}
\usepackage[backend=biber, style=apa, sorting=nty]{biblatex}
\DeclareLanguageMapping{british}{british-apa}
\addbibresource{test.bib}
\setmainfont{Times New Roman}
\DeclareFieldFormat[online]{title}{\mkbibemph{#1}}

\begin{document}
\title{My Title}
\author{My Name}
\affiliation{Chemistry I H, 4th hour, Ms. Kris Clements}
\note{October 15, 2013}
\shorttitle{Algorithms for protein sequence alignment}

\maketitle
Hello world \parencite{heatonresearch}.
\printbibliography
\end{document}

test.bib

@book{heatonresearch,
    Author = {Heaton, Jeff},
    Publisher = {Heaton Research},
    Title = {Introduction to Neural Networks for {C#}},
    Year = {2008}}

A strange thing happens with this setup: If I rerun biber test, an error pops up:

Entity: line 2063: parser error : Extra content at the end of the document
  <bcf:section number="0">

Could someone please explain what the errors mean, and how I can fix this? My paper is due tomorrow, and it's worked fine up until now.

Thanks!

2

It was the pound symbol in the book title, "Introduction to Neural Networks for C#". I didn't know that these symbols have to be escaped using the backslash '\' character.

The corrected test.bib should look like this:

@book{heatonresearch,
    Author = {Heaton, Jeff},
    Publisher = {Heaton Research},
    Title = {Introduction to Neural Networks for {C\#}},
    Year = {2008}}
  • 1
    I got the same error, but what was your clue to find out that it was the unescaped #? – doctorate Jun 9 '14 at 8:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.