[Tex/LaTex] \addbibresource yields undefined control sequence with Beamer

beamerbibliographiesundefined

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}

Best Answer

\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.