0

I am making a handout with beamer, and I get the error message undefined control sequence when I add the \addbibresource command to the preamble. This seems to happen only when document class is beamer, not in articles. I have MikTex 2.9 and I use Winedt 10.

The MWE:

\documentclass[14pt, handout]{beamer}
\usepackage[english]{babel}
\usepackage{xyling}
\usepackage[normalem]{ulem}
\usepackage{pgfpages}
\pgfpagesuselayout{2 on 1}[a4paper, border shrink=5mm]
\addbibresource{ref.bib}
\begin{document}
\begin{frame}
Some text \cite{EKP2018}
\end{frame}
\end{document}
  • 4
    \addbibresource is a biblatex command. You need to load biblatex yourself. beamer does not load it. – moewe Oct 15 '18 at 10:14
2

\addbibresource is a biblatex command and therefore only available if biblatex is loaded.

beamer does not load biblatex automatically (and neither does any other package in the preamble of the MWE), hence the command comes out as undefined. The solution is to load biblatex explicitly, for example with

\usepackage[backend=biber, style=numeric]{biblatex}

The error can also be reproduced for me with article instead of beamer as document class, which makes sense because article (like most normal document classes) does not load biblatex either.

  • +1, I would add the bibTeX way too in case that (possibly) the OP just didn't know – koleygr Oct 15 '18 at 12:39
  • @koleygr I'd like to wait for a response by the OP first. I try to keep my answers focussed on the main issue of the question and I'm not sure if adding a paragraph about BibTeX bibliographies would really be relevant. FWIW the OP seems to be an occasional biblatex user (cf. tex.stackexchange.com/q/440133/35864), so chances are they really want biblatex. – moewe Oct 15 '18 at 12:43
  • I would add another vote if possible, since I never thought yo find out if the OP was a biblatex user... I just thought form the question that he/she didn't knew about the cases for adding bibliography... and so, I focused to that problem that I thought it was the basic problem of the OP... – koleygr Oct 15 '18 at 12:46
  • Sorry late feedback: @moewe is right, it was quity simply a matter of calling biblatex explicitly, which I also normally do, I had simply forgotten it. Yes, I normally use biblatex on biber. – EspenJK Oct 22 '18 at 7:19

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.