0

This question already has an answer here:

I am trying to add a bibliograph to my document but I keep encountering the same error. My mwe is:

\documentclass{article}
\usepackage{biblatex}
\addbibresource{refs.bib}
\begin{document}
\cite{Lettenmeier.2017}
\end{document}

And I get the following error:

! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.3776   australian,newzealand}

?

I checked the biblatex.sty and the lite it refers to is:

\DeclareCaseLangs{%
  american,british,canadian,
  english,USenglish,UKenglish,
  australian,newzealand}

I already tried adding the babel package:

\usepackage[american]{babel}

But I get the same error. Does anyone have a clue what I might be doing wrong?

My refs.bib file looks like:

@article{Lettenmeier.2017,
 author = {Lettenmeier, P. and Kolb, S. and Sata, N. and Fallisch, A. and Zielke, L. and Thiele, S. and Gago, A. S. and Friedrich, K. A.},
 year = {2017},
 title = {{Comprehensive investigation of novel pore-graded gas diffusion layers for high-performance and cost-effective proton exchange membrane electrolyzers}},
 pages = {2521--2533},
 volume = {10},
 number = {12},
 issn = {1754-5692},
 journal = {{Energy {\&} Environmental Science}},
 doi = {\url{10.1039/C7EE01240C}}
}

Cheers.

marked as duplicate by moewe biblatex Apr 24 '18 at 19:22

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    Update the etoolbox package. See github.com/plk/biblatex/issues/706 and tex.stackexchange.com/q/413898/35864 – moewe Apr 24 '18 at 15:31
  • doi = {\url{10.1039/C7EE01240C}} should just be doi = {10.1039/C7EE01240C} but that does not cause the error in question. The double braces in title = {{Comprehensive investigation of novel pore-graded gas diffusion layers for high-performance and cost-effective proton exchange membrane electrolyzers}}, are useless and should be avoided. The double braces in journal = {{Energy {\&} Environmental Science}}, are not completely useless, but don't do anything in your example - and rarely at all. – moewe Apr 24 '18 at 15:33
  • I updated the etoolbox package with the same MWE and now latex prints whatever is inside the brackets of \cite, prints square brackets and makes it bold e.g. if instead of \cite{Lettenmeier.2017} i write \cite{foobar}it will print: [foobar] and ignore the refs.bib file. – elporsche Apr 24 '18 at 15:47
  • Have you run Biber on your document? See Question mark or bold citation key instead of citation number for hints on why you need to run Biber and https://tex.stackexchange.com/q/154751/35864 for help with running Biber. – moewe Apr 24 '18 at 15:50
  • It works now with Biber instead of Bibtex. I had to update Biber because it had compatibility issues. Thanks! – elporsche Apr 24 '18 at 16:31